From 6c4511c2db53f88bd80010d8bd7d11d06e74bca0 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Fri, 29 Sep 2023 17:20:44 +0000 Subject: [PATCH 01/11] fix: upgrade youch from 3.2.3 to 3.3.1 Snyk has created this PR to upgrade youch from 3.2.3 to 3.3.1. See this package in npm: https://www.npmjs.com/package/youch See this project in Snyk: https://app.snyk.io/org/jlenon7/project/f15ac352-d8b8-407e-9f29-b569d1087684?utm_source=github&utm_medium=referral&page=upgrade-pr --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index aa1505f..aac9b9b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "prepend-file": "^2.0.1", "uuid": "^8.3.2", "validator-brazil": "^1.2.2", - "youch": "^3.2.3", + "youch": "^3.3.1", "youch-terminal": "^2.2.2" }, "devDependencies": { @@ -9214,9 +9214,9 @@ } }, "node_modules/youch": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/youch/-/youch-3.2.3.tgz", - "integrity": "sha512-ZBcWz/uzZaQVdCvfV4uk616Bbpf2ee+F/AvuKDR5EwX/Y4v06xWdtMluqTD7+KlZdM93lLm9gMZYo0sKBS0pgw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/youch/-/youch-3.3.1.tgz", + "integrity": "sha512-Rg9ioi+AkKyje2Hk4qILSVvayaFW98KTsOJ4aIkjDf97LZX5WJVIHZmFLnM4ThcVofHo/fbbwtYajfBPHFOVtg==", "dependencies": { "cookie": "^0.5.0", "mustache": "^4.2.0", @@ -16096,9 +16096,9 @@ "dev": true }, "youch": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/youch/-/youch-3.2.3.tgz", - "integrity": "sha512-ZBcWz/uzZaQVdCvfV4uk616Bbpf2ee+F/AvuKDR5EwX/Y4v06xWdtMluqTD7+KlZdM93lLm9gMZYo0sKBS0pgw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/youch/-/youch-3.3.1.tgz", + "integrity": "sha512-Rg9ioi+AkKyje2Hk4qILSVvayaFW98KTsOJ4aIkjDf97LZX5WJVIHZmFLnM4ThcVofHo/fbbwtYajfBPHFOVtg==", "requires": { "cookie": "^0.5.0", "mustache": "^4.2.0", diff --git a/package.json b/package.json index e04f320..9f1c0d9 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "prepend-file": "^2.0.1", "uuid": "^8.3.2", "validator-brazil": "^1.2.2", - "youch": "^3.2.3", + "youch": "^3.3.1", "youch-terminal": "^2.2.2" }, "devDependencies": { From 9fab55a3ed3f11e8c1138bcfe01609365d1a6ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Tue, 3 Oct 2023 19:05:05 +0100 Subject: [PATCH 02/11] chore(npm): upgrade project for Node.js v20.x --- node | 22 --------------- package-lock.json | 31 ++++++++++++++------ package.json | 9 +++--- src/exceptions/NotFoundResolveException.ts | 20 ------------- src/helpers/Module.ts | 16 ++++------- tests/unit/ExecTest.ts | 6 +++- tests/unit/ModuleTest.ts | 10 ------- tsconfig.json | 33 ++-------------------- 8 files changed, 39 insertions(+), 108 deletions(-) delete mode 100755 node delete mode 100644 src/exceptions/NotFoundResolveException.ts diff --git a/node b/node deleted file mode 100755 index 5a47d02..0000000 --- a/node +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# This file is useful for development purposes because -# it allows you to run TypeScript files without having -# to add the --loader option every time. - -# Usage: - -# ./node --version -# ./node bin/test.ts -# ./node --inspect bin/test.ts - -# Usage with "sh" or "bash": - -# sh node --version -# sh node bin/test.ts -# sh node --inspect bin/test.ts - -# Node.js executable with all arguments required to run the application. -node="node --loader=ts-node/esm --experimental-import-meta-resolve --no-warnings" - -$node "$@" diff --git a/package-lock.json b/package-lock.json index aa1505f..66d86fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@athenna/common", - "version": "4.15.5", + "version": "4.16.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@athenna/common", - "version": "4.15.5", + "version": "4.16.0", "license": "MIT", "dependencies": { "@fastify/formbody": "^7.4.0", @@ -34,7 +34,8 @@ "youch-terminal": "^2.2.2" }, "devDependencies": { - "@athenna/test": "^4.7.0", + "@athenna/test": "^4.9.1", + "@athenna/tsconfig": "^4.5.0", "@types/bytes": "^3.1.1", "@types/callsite": "^1.0.31", "@types/debug": "^4.1.7", @@ -106,9 +107,9 @@ "dev": true }, "node_modules/@athenna/test": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.7.0.tgz", - "integrity": "sha512-2g5M9SVY55IIJ/ucznwUPIJIdRJXt5a1r4eR2oLGLR/EEdvCyDEf4oRCjCIfsM5KBq3H0ubHRm5ec7dAISg4HQ==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.9.1.tgz", + "integrity": "sha512-oyhqLj6Y9turEF7G+HTtznX9f389j2fjpE+rLCtt1gb3D3IJqigRxKxhhbbalG0j2LAmwex4HtoWqDbkxH+PKg==", "dev": true, "dependencies": { "@japa/assert": "^1.4.1", @@ -119,6 +120,12 @@ "sinon": "^15.1.0" } }, + "node_modules/@athenna/tsconfig": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@athenna/tsconfig/-/tsconfig-4.5.0.tgz", + "integrity": "sha512-jgLFpxCAzMiE6zavulwMrZl0/02gDQGWEU8Ysy4V00QgAXypUCEqv42XTYU7u1xQqG+xNPc/w0yX8Mdhu+2M+A==", + "dev": true + }, "node_modules/@babel/code-frame": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", @@ -9286,9 +9293,9 @@ "dev": true }, "@athenna/test": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.7.0.tgz", - "integrity": "sha512-2g5M9SVY55IIJ/ucznwUPIJIdRJXt5a1r4eR2oLGLR/EEdvCyDEf4oRCjCIfsM5KBq3H0ubHRm5ec7dAISg4HQ==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.9.1.tgz", + "integrity": "sha512-oyhqLj6Y9turEF7G+HTtznX9f389j2fjpE+rLCtt1gb3D3IJqigRxKxhhbbalG0j2LAmwex4HtoWqDbkxH+PKg==", "dev": true, "requires": { "@japa/assert": "^1.4.1", @@ -9299,6 +9306,12 @@ "sinon": "^15.1.0" } }, + "@athenna/tsconfig": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@athenna/tsconfig/-/tsconfig-4.5.0.tgz", + "integrity": "sha512-jgLFpxCAzMiE6zavulwMrZl0/02gDQGWEU8Ysy4V00QgAXypUCEqv42XTYU7u1xQqG+xNPc/w0yX8Mdhu+2M+A==", + "dev": true + }, "@babel/code-frame": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", diff --git a/package.json b/package.json index e04f320..7ca3a31 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/common", - "version": "4.15.5", + "version": "4.16.0", "description": "The Athenna common helpers to use in any Node.js ESM project.", "license": "MIT", "author": "João Lenon ", @@ -19,8 +19,8 @@ "scripts": { "build": "rimraf build && tsc --project bin/tsconfig.build.json", "lint:fix": "eslint \"{bin,src,tests}/**/*.ts\" --fix", - "test": "npm run --silent lint:fix && sh node bin/test.ts", - "test:debug": "cross-env NODE_DEBUG=athenna:* sh node --inspect bin/test.ts", + "test": "npm run --silent lint:fix && node --import=@athenna/tsconfig bin/test.ts", + "test:debug": "cross-env NODE_DEBUG=athenna:* node --inspect bin/test.js", "test:coverage": "c8 npm run --silent test" }, "files": [ @@ -75,7 +75,8 @@ "youch-terminal": "^2.2.2" }, "devDependencies": { - "@athenna/test": "^4.7.0", + "@athenna/test": "^4.9.1", + "@athenna/tsconfig": "^4.5.0", "@types/bytes": "^3.1.1", "@types/callsite": "^1.0.31", "@types/debug": "^4.1.7", diff --git a/src/exceptions/NotFoundResolveException.ts b/src/exceptions/NotFoundResolveException.ts deleted file mode 100644 index 0e14d83..0000000 --- a/src/exceptions/NotFoundResolveException.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @athenna/common - * - * (c) João Lenon - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -import { Exception } from '#src/helpers/Exception' - -export class NotFoundResolveException extends Exception { - public constructor() { - super({ - code: 'E_NOT_FOUND_RESOLVE', - message: `The importa.meta.resolve function does not exist in import.meta object.`, - help: 'The resolve function is not defined because the --experimental-import-meta-resolve option in Node CLI is required when running your application. Try to set up this option when running your application.' - }) - } -} diff --git a/src/helpers/Module.ts b/src/helpers/Module.ts index 2d0dab9..df0806c 100644 --- a/src/helpers/Module.ts +++ b/src/helpers/Module.ts @@ -12,7 +12,6 @@ import { Path, File, Folder } from '#src' import { createRequire } from 'node:module' import { fileURLToPath, pathToFileURL } from 'node:url' import { extname, dirname, resolve, isAbsolute } from 'node:path' -import { NotFoundResolveException } from '#src/exceptions/NotFoundResolveException' export class Module { /** @@ -188,14 +187,10 @@ export class Module { * Resolve the module path by meta url and import it. */ public static async resolve(path: string, meta: string): Promise { - if (!import.meta.resolve || process.env.RESOLVE_TESTING) { - throw new NotFoundResolveException() - } - - const splited = path.split('?') - const queries = splited[1] || '' + const splitted = path.split('?') + const queries = splitted[1] || '' - path = splited[0] + path = splitted[0] if (!path.startsWith('#') && extname(path)) { path = resolve(path) @@ -212,9 +207,8 @@ export class Module { queries ) - return import.meta - .resolve(path, meta) - .then(resolved => Module.get(import(`${resolved}?${queries}`))) + // `await` is not needed for `import.meta.resolve` method, but TypeScript complains on it. + return Module.get(import(await import.meta.resolve(path, meta))) } /** diff --git a/tests/unit/ExecTest.ts b/tests/unit/ExecTest.ts index dcc441b..7c49986 100644 --- a/tests/unit/ExecTest.ts +++ b/tests/unit/ExecTest.ts @@ -109,7 +109,11 @@ export default class ExecTest { @Test() public async shouldBeAbleToExecuteANodeScriptInTheVMAndGetTheStdout({ assert }: Context) { - const { stdout, stderr, exitCode } = await Exec.node(Path.fixtures('node-script.ts')) + const { stdout, stderr, exitCode } = await Exec.node(Path.fixtures('node-script.ts'), [ + 'node', + '--loader=ts-node/esm', + Path.fixtures('node-script.ts') + ]) assert.equal(exitCode, 0) assert.equal(stdout, 'hello') diff --git a/tests/unit/ModuleTest.ts b/tests/unit/ModuleTest.ts index df2b546..debca0e 100644 --- a/tests/unit/ModuleTest.ts +++ b/tests/unit/ModuleTest.ts @@ -9,7 +9,6 @@ import { Module, Path } from '#src' import { Test, type Context } from '@athenna/test' -import { NotFoundResolveException } from '#src/exceptions/NotFoundResolveException' export default class ModuleTest { @Test() @@ -150,13 +149,4 @@ export default class ModuleTest { assert.deepEqual(chalk, (await import('chalk')).default) } - - @Test() - public async shouldThrownAnExceptionWhenTheImportMetaResolveFunctionIsNotDefined({ assert }: Context) { - process.env.RESOLVE_TESTING = 'true' - - await assert.rejects(() => Module.resolve('chalk', import.meta.url), NotFoundResolveException) - - delete process.env.RESOLVE_TESTING - } } diff --git a/tsconfig.json b/tsconfig.json index 5a20cac..14f70e0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,33 +1,4 @@ { - "ts-node": { - "esm": true, - "transpileOnly": true, - "ignoreDiagnostics": [5104] - }, - "compilerOptions": { - "strict": false, - "rootDir": ".", - "baseUrl": ".", - "outDir": "build", - "module": "NodeNext", - "target": "ESNext", - "moduleResolution": "NodeNext", - "declaration": true, - "skipLibCheck": true, - "esModuleInterop": true, - "removeComments": false, - "resolveJsonModule": true, - "experimentalDecorators": true, - "useDefineForClassFields": false, - "verbatimModuleSyntax": true, - "forceConsistentCasingInFileNames": true, - "paths": { - "#bin/*": ["./bin/*.ts"], - "#src/*": ["./src/*.ts"], - "#tests/*": ["./tests/*.ts"], - "#src/types": ["./src/types/index.ts"] - } - }, - "include": ["./**/*"], - "exclude": ["build", "node_modules"] + "extends": "@athenna/tsconfig/tsconfig.lib.json", + "compilerOptions": {} } From 316f999d50b1b75bcc78b7d0a59bf5f2b03d590b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Tue, 3 Oct 2023 20:07:17 +0100 Subject: [PATCH 03/11] cd(build): change cd process --- .github/workflows/cd.yml | 15 +- .github/workflows/ci.yml | 6 +- bin/tsconfig.build.json | 5 - package-lock.json | 928 ++++++++++++++-------- package.json | 18 +- src/exceptions/NodeCommandException.ts | 28 - src/exceptions/NotFoundFileException.ts | 4 +- src/exceptions/NotFoundFolderException.ts | 4 +- src/helpers/HttpClient.ts | 3 +- src/helpers/Path.ts | 2 +- 10 files changed, 612 insertions(+), 401 deletions(-) delete mode 100644 bin/tsconfig.build.json delete mode 100644 src/exceptions/NodeCommandException.ts diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 33d0647..2fb4dac 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -15,7 +15,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v1 with: - node-version: '18.x' + node-version: '20.x' registry-url: 'https://registry.npmjs.org' - name: Install dependencies @@ -24,17 +24,8 @@ jobs: - name: Compile code run: npm run build - - name: Copy README to build - run: cp README.md build/README.md | true - - - name: Copy LICENSE to build - run: cp LICENSE.md build/LICENSE.md | true - - - name: Copy templates to build - run: cp -r templates build/templates | true - - - name: Copy configurer to build - run: cp -r configurer build/configurer | true + - name: Install production dependencies + run: cd build && npm ci --omit=dev - name: Automatic GitHub Release uses: justincy/github-action-npm-release@2.0.1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7685da5..3fb98fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,7 @@ jobs: strategy: matrix: node-version: - - 16.13.1 - - 18.x + - 20.x steps: - uses: actions/checkout@v2 with: @@ -42,8 +41,7 @@ jobs: strategy: matrix: node-version: - - 16.13.1 - - 18.x + - 20.x steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} diff --git a/bin/tsconfig.build.json b/bin/tsconfig.build.json deleted file mode 100644 index 88ef64e..0000000 --- a/bin/tsconfig.build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../tsconfig.json", - "include": ["../src", "../templates", "../configurer", "../package.json"], - "exclude": ["../bin", "../build", "../tests", "../node_modules"] -} diff --git a/package-lock.json b/package-lock.json index 66d86fe..8227874 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@athenna/test": "^4.9.1", - "@athenna/tsconfig": "^4.5.0", + "@athenna/tsconfig": "^4.7.0", "@types/bytes": "^3.1.1", "@types/callsite": "^1.0.31", "@types/debug": "^4.1.7", @@ -44,11 +44,10 @@ "@types/ms": "^0.7.31", "@types/pluralize": "^0.0.29", "@types/uuid": "^9.0.0", - "@typescript-eslint/eslint-plugin": "^5.56.0", - "@typescript-eslint/parser": "^5.56.0", + "@typescript-eslint/eslint-plugin": "^6.7.4", + "@typescript-eslint/parser": "^6.7.4", "c8": "^8.0.0", "commitizen": "^4.3.0", - "cross-env": "^7.0.3", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.36.0", "eslint-config-prettier": "^8.8.0", @@ -60,11 +59,7 @@ "husky": "^3.1.0", "lint-staged": "^12.5.0", "minimist": "^1.2.7", - "prettier": "^2.8.7", - "reflect-metadata": "^0.1.13", - "rimraf": "^5.0.1", - "ts-node": "^10.9.1", - "typescript": "^5.0.2" + "prettier": "^2.8.7" } }, "../..": { @@ -121,10 +116,18 @@ } }, "node_modules/@athenna/tsconfig": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@athenna/tsconfig/-/tsconfig-4.5.0.tgz", - "integrity": "sha512-jgLFpxCAzMiE6zavulwMrZl0/02gDQGWEU8Ysy4V00QgAXypUCEqv42XTYU7u1xQqG+xNPc/w0yX8Mdhu+2M+A==", - "dev": true + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@athenna/tsconfig/-/tsconfig-4.7.0.tgz", + "integrity": "sha512-LjMU6ipBxsN1I5AtwwuhKHQilDP5+Q/5XH2ISAyfswyiIynyCKnNEQfSEIBcYFcnwbljvvCnkkeoSyoC9ivx+A==", + "dev": true, + "dependencies": { + "copyfiles": "^2.4.1", + "cross-env": "^7.0.3", + "reflect-metadata": "^0.1.13", + "rimraf": "^5.0.5", + "ts-node": "^10.9.1", + "typescript": "^5.2.2" + } }, "node_modules/@babel/code-frame": { "version": "7.22.5", @@ -460,9 +463,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.1.tgz", - "integrity": "sha512-BISJ6ZE4xQsuL/FmsyRaiffpq977bMlsKfGHTQrOGFErfByxIe6iZTxPf/00Zon9b9a7iUykfQwejN3s2ZW/Bw==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.9.1.tgz", + "integrity": "sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -1371,9 +1374,9 @@ } }, "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "version": "7.0.13", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz", + "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==", "dev": true }, "node_modules/@types/json5": { @@ -1422,9 +1425,9 @@ "dev": true }, "node_modules/@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==", "dev": true }, "node_modules/@types/sinon": { @@ -1464,32 +1467,33 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.56.0.tgz", - "integrity": "sha512-ZNW37Ccl3oMZkzxrYDUX4o7cnuPgU+YrcaYXzsRtLB16I1FR5SHMqga3zGsaSliZADCWo2v8qHWqAYIj8nWCCg==", + "version": "6.7.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.4.tgz", + "integrity": "sha512-DAbgDXwtX+pDkAHwiGhqP3zWUGpW49B7eqmgpPtg+BKJXwdct79ut9+ifqOFPJGClGKSHXn2PTBatCnldJRUoA==", "dev": true, "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.56.0", - "@typescript-eslint/type-utils": "5.56.0", - "@typescript-eslint/utils": "5.56.0", + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.7.4", + "@typescript-eslint/type-utils": "6.7.4", + "@typescript-eslint/utils": "6.7.4", + "@typescript-eslint/visitor-keys": "6.7.4", "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1498,25 +1502,26 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.56.0.tgz", - "integrity": "sha512-sn1OZmBxUsgxMmR8a8U5QM/Wl+tyqlH//jTqCg8daTAmhAk26L2PFhcqPLlYBhYUJMZJK276qLXlHN3a83o2cg==", + "version": "6.7.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.4.tgz", + "integrity": "sha512-I5zVZFY+cw4IMZUeNCU7Sh2PO5O57F7Lr0uyhgCJmhN/BuTlnc55KxPonR4+EM3GBdfiCyGZye6DgMjtubQkmA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.56.0", - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/typescript-estree": "5.56.0", + "@typescript-eslint/scope-manager": "6.7.4", + "@typescript-eslint/types": "6.7.4", + "@typescript-eslint/typescript-estree": "6.7.4", + "@typescript-eslint/visitor-keys": "6.7.4", "debug": "^4.3.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1525,16 +1530,16 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.56.0.tgz", - "integrity": "sha512-jGYKyt+iBakD0SA5Ww8vFqGpoV2asSjwt60Gl6YcO8ksQ8s2HlUEyHBMSa38bdLopYqGf7EYQMUIGdT/Luw+sw==", + "version": "6.7.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.4.tgz", + "integrity": "sha512-SdGqSLUPTXAXi7c3Ob7peAGVnmMoGzZ361VswK2Mqf8UOYcODiYvs8rs5ILqEdfvX1lE7wEZbLyELCW+Yrql1A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/visitor-keys": "5.56.0" + "@typescript-eslint/types": "6.7.4", + "@typescript-eslint/visitor-keys": "6.7.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1542,25 +1547,25 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.56.0.tgz", - "integrity": "sha512-8WxgOgJjWRy6m4xg9KoSHPzBNZeQbGlQOH7l2QEhQID/+YseaFxg5J/DLwWSsi9Axj4e/cCiKx7PVzOq38tY4A==", + "version": "6.7.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.7.4.tgz", + "integrity": "sha512-n+g3zi1QzpcAdHFP9KQF+rEFxMb2KxtnJGID3teA/nxKHOVi3ylKovaqEzGBbVY2pBttU6z85gp0D00ufLzViQ==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.56.0", - "@typescript-eslint/utils": "5.56.0", + "@typescript-eslint/typescript-estree": "6.7.4", + "@typescript-eslint/utils": "6.7.4", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1569,12 +1574,12 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.56.0.tgz", - "integrity": "sha512-JyAzbTJcIyhuUhogmiu+t79AkdnqgPUEsxMTMc/dCZczGMJQh1MK2wgrju++yMN6AWroVAy2jxyPcPr3SWCq5w==", + "version": "6.7.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.4.tgz", + "integrity": "sha512-o9XWK2FLW6eSS/0r/tgjAGsYasLAnOWg7hvZ/dGYSSNjCh+49k5ocPN8OmG5aZcSJ8pclSOyVKP2x03Sj+RrCA==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1582,21 +1587,21 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.56.0.tgz", - "integrity": "sha512-41CH/GncsLXOJi0jb74SnC7jVPWeVJ0pxQj8bOjH1h2O26jXN3YHKDT1ejkVz5YeTEQPeLCCRY0U2r68tfNOcg==", + "version": "6.7.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.4.tgz", + "integrity": "sha512-ty8b5qHKatlNYd9vmpHooQz3Vki3gG+3PchmtsA4TgrZBKWHNjWfkQid7K7xQogBqqc7/BhGazxMD5vr6Ha+iQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/visitor-keys": "5.56.0", + "@typescript-eslint/types": "6.7.4", + "@typescript-eslint/visitor-keys": "6.7.4", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1609,64 +1614,41 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.56.0.tgz", - "integrity": "sha512-XhZDVdLnUJNtbzaJeDSCIYaM+Tgr59gZGbFuELgF7m0IY03PlciidS7UQNKLE0+WpUTn1GlycEr6Ivb/afjbhA==", + "version": "6.7.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.7.4.tgz", + "integrity": "sha512-PRQAs+HUn85Qdk+khAxsVV+oULy3VkbH3hQ8hxLRJXWBEd7iI+GbQxH5SEUSH7kbEoTp6oT1bOwyga24ELALTA==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.56.0", - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/typescript-estree": "5.56.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.7.4", + "@typescript-eslint/types": "6.7.4", + "@typescript-eslint/typescript-estree": "6.7.4", + "semver": "^7.5.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" + "eslint": "^7.0.0 || ^8.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.56.0.tgz", - "integrity": "sha512-1mFdED7u5bZpX6Xxf5N9U2c18sb+8EvU3tyOIj6LQZ5OOvnmj8BVeNNP603OFPm5KkS1a7IvCIcwrdHXaEMG/Q==", + "version": "6.7.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.4.tgz", + "integrity": "sha512-pOW37DUhlTZbvph50x5zZCkFn3xzwkGtNoJHzIM3svpiSkJzwOYr/kVBaXmf+RAQiUDs1AHEZVNPg6UJCJpwRA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.56.0", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "6.7.4", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -2796,6 +2778,53 @@ "node": ">= 0.6" } }, + "node_modules/copyfiles": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", + "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", + "dev": true, + "dependencies": { + "glob": "^7.0.5", + "minimatch": "^3.0.3", + "mkdirp": "^1.0.4", + "noms": "0.0.0", + "through2": "^2.0.1", + "untildify": "^4.0.0", + "yargs": "^16.1.0" + }, + "bin": { + "copyfiles": "copyfiles", + "copyup": "copyfiles" + } + }, + "node_modules/copyfiles/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/copyfiles/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, "node_modules/cosmiconfig": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.2.0.tgz", @@ -3670,12 +3699,15 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/ansi-styles": { @@ -4665,6 +4697,12 @@ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -5107,9 +5145,9 @@ ] }, "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, "engines": { "node": ">= 4" @@ -5765,9 +5803,9 @@ } }, "node_modules/jackspeak": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz", - "integrity": "sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" @@ -6761,14 +6799,26 @@ } }, "node_modules/minipass": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-6.0.2.tgz", - "integrity": "sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", "dev": true, "engines": { "node": ">=16 || 14 >=14.17" } }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -6794,12 +6844,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, "node_modules/nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -6837,6 +6881,34 @@ "tslib": "^2.0.3" } }, + "node_modules/noms": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", + "integrity": "sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "~1.0.31" + } + }, + "node_modules/noms/node_modules/readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/noms/node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", + "dev": true + }, "node_modules/normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -7293,13 +7365,13 @@ "dev": true }, "node_modules/path-scurry": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.9.2.tgz", - "integrity": "sha512-qSDLy2aGFPm8i4rsbHd4MNyTcrzHFsLQykrtbuGRknZZCBBVXSv2tSCDN2Cg6Rt/GFRw8GoW9y9Ecw5rIPG1sg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", "dev": true, "dependencies": { - "lru-cache": "^9.1.1", - "minipass": "^5.0.0 || ^6.0.2" + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -7309,9 +7381,9 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.1.2.tgz", - "integrity": "sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", + "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", "dev": true, "engines": { "node": "14 || >=16.14" @@ -7616,6 +7688,12 @@ "node": ">= 0.6.0" } }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, "node_modules/process-warning": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-2.2.0.tgz", @@ -7908,15 +7986,15 @@ "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" }, "node_modules/rimraf": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.1.tgz", - "integrity": "sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", + "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", "dev": true, "dependencies": { - "glob": "^10.2.5" + "glob": "^10.3.7" }, "bin": { - "rimraf": "dist/cjs/src/bin.js" + "rimraf": "dist/esm/bin.mjs" }, "engines": { "node": ">=14" @@ -7942,19 +8020,19 @@ } }, "node_modules/rimraf/node_modules/glob": { - "version": "10.2.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.2.7.tgz", - "integrity": "sha512-jTKehsravOJo8IJxUGfZILnkvVJM/MOfHRs8QcXolVef2zNI9Tqyy5+SeuOAZd3upViEZQLyFpQhYiHLrMUNmA==", + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", + "jackspeak": "^2.3.5", "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2", - "path-scurry": "^1.7.0" + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" }, "bin": { - "glob": "dist/cjs/src/bin.js" + "glob": "dist/esm/bin.mjs" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -7964,9 +8042,9 @@ } }, "node_modules/rimraf/node_modules/minimatch": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz", - "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -7979,9 +8057,9 @@ } }, "node_modules/rimraf/node_modules/signal-exit": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz", - "integrity": "sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, "engines": { "node": ">=14" @@ -8105,9 +8183,9 @@ "integrity": "sha512-B9osKohb6L+EZ6Kve3wHKfsAClzOC/iISA2vSuCe5Jx5NAKiwitfxx8ZKYapHXr0sYRj7UZInT7pLb3rp2Yx6A==" }, "node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -8653,6 +8731,52 @@ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/through2/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/through2/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/through2/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/through2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/time-span": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/time-span/-/time-span-4.0.0.tgz", @@ -8697,6 +8821,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/ts-api-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "dev": true, + "engines": { + "node": ">=16.13.0" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/ts-node": { "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", @@ -8766,27 +8902,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -8835,16 +8950,16 @@ } }, "node_modules/typescript": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.2.tgz", - "integrity": "sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=12.20" + "node": ">=14.17" } }, "node_modules/unbox-primitive": { @@ -8871,6 +8986,15 @@ "node": ">= 10.0.0" } }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/upper-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-2.0.2.tgz", @@ -9149,6 +9273,15 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -9307,10 +9440,18 @@ } }, "@athenna/tsconfig": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@athenna/tsconfig/-/tsconfig-4.5.0.tgz", - "integrity": "sha512-jgLFpxCAzMiE6zavulwMrZl0/02gDQGWEU8Ysy4V00QgAXypUCEqv42XTYU7u1xQqG+xNPc/w0yX8Mdhu+2M+A==", - "dev": true + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@athenna/tsconfig/-/tsconfig-4.7.0.tgz", + "integrity": "sha512-LjMU6ipBxsN1I5AtwwuhKHQilDP5+Q/5XH2ISAyfswyiIynyCKnNEQfSEIBcYFcnwbljvvCnkkeoSyoC9ivx+A==", + "dev": true, + "requires": { + "copyfiles": "^2.4.1", + "cross-env": "^7.0.3", + "reflect-metadata": "^0.1.13", + "rimraf": "^5.0.5", + "ts-node": "^10.9.1", + "typescript": "^5.2.2" + } }, "@babel/code-frame": { "version": "7.22.5", @@ -9572,9 +9713,9 @@ } }, "@eslint-community/regexpp": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.1.tgz", - "integrity": "sha512-BISJ6ZE4xQsuL/FmsyRaiffpq977bMlsKfGHTQrOGFErfByxIe6iZTxPf/00Zon9b9a7iUykfQwejN3s2ZW/Bw==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.9.1.tgz", + "integrity": "sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==", "dev": true }, "@eslint/eslintrc": { @@ -10280,9 +10421,9 @@ } }, "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "version": "7.0.13", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz", + "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==", "dev": true }, "@types/json5": { @@ -10331,9 +10472,9 @@ "dev": true }, "@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==", "dev": true }, "@types/sinon": { @@ -10373,120 +10514,103 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.56.0.tgz", - "integrity": "sha512-ZNW37Ccl3oMZkzxrYDUX4o7cnuPgU+YrcaYXzsRtLB16I1FR5SHMqga3zGsaSliZADCWo2v8qHWqAYIj8nWCCg==", + "version": "6.7.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.4.tgz", + "integrity": "sha512-DAbgDXwtX+pDkAHwiGhqP3zWUGpW49B7eqmgpPtg+BKJXwdct79ut9+ifqOFPJGClGKSHXn2PTBatCnldJRUoA==", "dev": true, "requires": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.56.0", - "@typescript-eslint/type-utils": "5.56.0", - "@typescript-eslint/utils": "5.56.0", + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.7.4", + "@typescript-eslint/type-utils": "6.7.4", + "@typescript-eslint/utils": "6.7.4", + "@typescript-eslint/visitor-keys": "6.7.4", "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" } }, "@typescript-eslint/parser": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.56.0.tgz", - "integrity": "sha512-sn1OZmBxUsgxMmR8a8U5QM/Wl+tyqlH//jTqCg8daTAmhAk26L2PFhcqPLlYBhYUJMZJK276qLXlHN3a83o2cg==", + "version": "6.7.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.4.tgz", + "integrity": "sha512-I5zVZFY+cw4IMZUeNCU7Sh2PO5O57F7Lr0uyhgCJmhN/BuTlnc55KxPonR4+EM3GBdfiCyGZye6DgMjtubQkmA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.56.0", - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/typescript-estree": "5.56.0", + "@typescript-eslint/scope-manager": "6.7.4", + "@typescript-eslint/types": "6.7.4", + "@typescript-eslint/typescript-estree": "6.7.4", + "@typescript-eslint/visitor-keys": "6.7.4", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.56.0.tgz", - "integrity": "sha512-jGYKyt+iBakD0SA5Ww8vFqGpoV2asSjwt60Gl6YcO8ksQ8s2HlUEyHBMSa38bdLopYqGf7EYQMUIGdT/Luw+sw==", + "version": "6.7.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.4.tgz", + "integrity": "sha512-SdGqSLUPTXAXi7c3Ob7peAGVnmMoGzZ361VswK2Mqf8UOYcODiYvs8rs5ILqEdfvX1lE7wEZbLyELCW+Yrql1A==", "dev": true, "requires": { - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/visitor-keys": "5.56.0" + "@typescript-eslint/types": "6.7.4", + "@typescript-eslint/visitor-keys": "6.7.4" } }, "@typescript-eslint/type-utils": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.56.0.tgz", - "integrity": "sha512-8WxgOgJjWRy6m4xg9KoSHPzBNZeQbGlQOH7l2QEhQID/+YseaFxg5J/DLwWSsi9Axj4e/cCiKx7PVzOq38tY4A==", + "version": "6.7.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.7.4.tgz", + "integrity": "sha512-n+g3zi1QzpcAdHFP9KQF+rEFxMb2KxtnJGID3teA/nxKHOVi3ylKovaqEzGBbVY2pBttU6z85gp0D00ufLzViQ==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.56.0", - "@typescript-eslint/utils": "5.56.0", + "@typescript-eslint/typescript-estree": "6.7.4", + "@typescript-eslint/utils": "6.7.4", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^1.0.1" } }, "@typescript-eslint/types": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.56.0.tgz", - "integrity": "sha512-JyAzbTJcIyhuUhogmiu+t79AkdnqgPUEsxMTMc/dCZczGMJQh1MK2wgrju++yMN6AWroVAy2jxyPcPr3SWCq5w==", + "version": "6.7.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.4.tgz", + "integrity": "sha512-o9XWK2FLW6eSS/0r/tgjAGsYasLAnOWg7hvZ/dGYSSNjCh+49k5ocPN8OmG5aZcSJ8pclSOyVKP2x03Sj+RrCA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.56.0.tgz", - "integrity": "sha512-41CH/GncsLXOJi0jb74SnC7jVPWeVJ0pxQj8bOjH1h2O26jXN3YHKDT1ejkVz5YeTEQPeLCCRY0U2r68tfNOcg==", + "version": "6.7.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.4.tgz", + "integrity": "sha512-ty8b5qHKatlNYd9vmpHooQz3Vki3gG+3PchmtsA4TgrZBKWHNjWfkQid7K7xQogBqqc7/BhGazxMD5vr6Ha+iQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/visitor-keys": "5.56.0", + "@typescript-eslint/types": "6.7.4", + "@typescript-eslint/visitor-keys": "6.7.4", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" } }, "@typescript-eslint/utils": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.56.0.tgz", - "integrity": "sha512-XhZDVdLnUJNtbzaJeDSCIYaM+Tgr59gZGbFuELgF7m0IY03PlciidS7UQNKLE0+WpUTn1GlycEr6Ivb/afjbhA==", + "version": "6.7.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.7.4.tgz", + "integrity": "sha512-PRQAs+HUn85Qdk+khAxsVV+oULy3VkbH3hQ8hxLRJXWBEd7iI+GbQxH5SEUSH7kbEoTp6oT1bOwyga24ELALTA==", "dev": true, "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.56.0", - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/typescript-estree": "5.56.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "dependencies": { - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - } + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.7.4", + "@typescript-eslint/types": "6.7.4", + "@typescript-eslint/typescript-estree": "6.7.4", + "semver": "^7.5.4" } }, "@typescript-eslint/visitor-keys": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.56.0.tgz", - "integrity": "sha512-1mFdED7u5bZpX6Xxf5N9U2c18sb+8EvU3tyOIj6LQZ5OOvnmj8BVeNNP603OFPm5KkS1a7IvCIcwrdHXaEMG/Q==", + "version": "6.7.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.4.tgz", + "integrity": "sha512-pOW37DUhlTZbvph50x5zZCkFn3xzwkGtNoJHzIM3svpiSkJzwOYr/kVBaXmf+RAQiUDs1AHEZVNPg6UJCJpwRA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.56.0", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "6.7.4", + "eslint-visitor-keys": "^3.4.1" } }, "abort-controller": { @@ -11334,6 +11458,48 @@ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" }, + "copyfiles": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", + "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", + "dev": true, + "requires": { + "glob": "^7.0.5", + "minimatch": "^3.0.3", + "mkdirp": "^1.0.4", + "noms": "0.0.0", + "through2": "^2.0.1", + "untildify": "^4.0.0", + "yargs": "^16.1.0" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, "cosmiconfig": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.2.0.tgz", @@ -12033,9 +12199,9 @@ } }, "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true }, "espree": { @@ -12736,6 +12902,12 @@ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -13055,9 +13227,9 @@ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true }, "import-fresh": { @@ -13526,9 +13698,9 @@ } }, "jackspeak": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz", - "integrity": "sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", "dev": true, "requires": { "@isaacs/cliui": "^8.0.2", @@ -14288,9 +14460,15 @@ "dev": true }, "minipass": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-6.0.2.tgz", - "integrity": "sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true }, "ms": { @@ -14315,12 +14493,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -14360,6 +14532,36 @@ "tslib": "^2.0.3" } }, + "noms": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", + "integrity": "sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "~1.0.31" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", + "dev": true + } + } + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -14689,19 +14891,19 @@ "dev": true }, "path-scurry": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.9.2.tgz", - "integrity": "sha512-qSDLy2aGFPm8i4rsbHd4MNyTcrzHFsLQykrtbuGRknZZCBBVXSv2tSCDN2Cg6Rt/GFRw8GoW9y9Ecw5rIPG1sg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", "dev": true, "requires": { - "lru-cache": "^9.1.1", - "minipass": "^5.0.0 || ^6.0.2" + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "dependencies": { "lru-cache": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.1.2.tgz", - "integrity": "sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", + "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", "dev": true } } @@ -14919,6 +15121,12 @@ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, "process-warning": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-2.2.0.tgz", @@ -15123,12 +15331,12 @@ "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" }, "rimraf": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.1.tgz", - "integrity": "sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", + "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", "dev": true, "requires": { - "glob": "^10.2.5" + "glob": "^10.3.7" }, "dependencies": { "foreground-child": { @@ -15142,31 +15350,31 @@ } }, "glob": { - "version": "10.2.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.2.7.tgz", - "integrity": "sha512-jTKehsravOJo8IJxUGfZILnkvVJM/MOfHRs8QcXolVef2zNI9Tqyy5+SeuOAZd3upViEZQLyFpQhYiHLrMUNmA==", + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, "requires": { "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", + "jackspeak": "^2.3.5", "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2", - "path-scurry": "^1.7.0" + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" } }, "minimatch": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz", - "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "requires": { "brace-expansion": "^2.0.1" } }, "signal-exit": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz", - "integrity": "sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true } } @@ -15243,9 +15451,9 @@ "integrity": "sha512-B9osKohb6L+EZ6Kve3wHKfsAClzOC/iISA2vSuCe5Jx5NAKiwitfxx8ZKYapHXr0sYRj7UZInT7pLb3rp2Yx6A==" }, "semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "requires": { "lru-cache": "^6.0.0" } @@ -15684,6 +15892,54 @@ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "time-span": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/time-span/-/time-span-4.0.0.tgz", @@ -15713,6 +15969,13 @@ "integrity": "sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==", "dev": true }, + "ts-api-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "dev": true, + "requires": {} + }, "ts-node": { "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", @@ -15759,23 +16022,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -15809,9 +16055,9 @@ } }, "typescript": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.2.tgz", - "integrity": "sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true }, "unbox-primitive": { @@ -15832,6 +16078,12 @@ "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true }, + "untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true + }, "upper-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-2.0.2.tgz", @@ -16058,6 +16310,12 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/package.json b/package.json index 7ca3a31..250ea34 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,10 @@ "standalone" ], "scripts": { - "build": "rimraf build && tsc --project bin/tsconfig.build.json", + "build": "node node_modules/@athenna/tsconfig/src/build.js", "lint:fix": "eslint \"{bin,src,tests}/**/*.ts\" --fix", "test": "npm run --silent lint:fix && node --import=@athenna/tsconfig bin/test.ts", - "test:debug": "cross-env NODE_DEBUG=athenna:* node --inspect bin/test.js", + "test:debug": "cross-env NODE_DEBUG=athenna:* node --inspect --import=@athenna/tsconfig bin/test.js", "test:coverage": "c8 npm run --silent test" }, "files": [ @@ -37,6 +37,7 @@ "exports": { ".": "./src/index.js", "./types": "./src/types/index.js", + "./package": "./package.json", "./package.json": "./package.json" }, "imports": { @@ -76,7 +77,7 @@ }, "devDependencies": { "@athenna/test": "^4.9.1", - "@athenna/tsconfig": "^4.5.0", + "@athenna/tsconfig": "^4.7.0", "@types/bytes": "^3.1.1", "@types/callsite": "^1.0.31", "@types/debug": "^4.1.7", @@ -85,11 +86,10 @@ "@types/ms": "^0.7.31", "@types/pluralize": "^0.0.29", "@types/uuid": "^9.0.0", - "@typescript-eslint/eslint-plugin": "^5.56.0", - "@typescript-eslint/parser": "^5.56.0", + "@typescript-eslint/eslint-plugin": "^6.7.4", + "@typescript-eslint/parser": "^6.7.4", "c8": "^8.0.0", "commitizen": "^4.3.0", - "cross-env": "^7.0.3", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.36.0", "eslint-config-prettier": "^8.8.0", @@ -101,11 +101,7 @@ "husky": "^3.1.0", "lint-staged": "^12.5.0", "minimist": "^1.2.7", - "prettier": "^2.8.7", - "reflect-metadata": "^0.1.13", - "rimraf": "^5.0.1", - "ts-node": "^10.9.1", - "typescript": "^5.0.2" + "prettier": "^2.8.7" }, "c8": { "all": true, diff --git a/src/exceptions/NodeCommandException.ts b/src/exceptions/NodeCommandException.ts deleted file mode 100644 index ec0fd5a..0000000 --- a/src/exceptions/NodeCommandException.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * @athenna/common - * - * (c) João Lenon - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -import { Exception } from '#src/helpers/Exception' - -export class NodeCommandException extends Exception { - public constructor(command: string, error: any) { - let help = '' - - help = help.concat(`Command code:\n\n ${error.exitCode}`) - help = help.concat(`\n\n Command stdout:\n\n ${error.stdout}`) - help = help.concat(`\n\n Command stderr:\n\n ${error.stderr}`) - - help = help.concat(`\n\n ${error.stack}`) - - super({ - help, - code: 'E_NODE_EXEC', - message: `Error has occurred when executing the command "${command}"` - }) - } -} diff --git a/src/exceptions/NotFoundFileException.ts b/src/exceptions/NotFoundFileException.ts index 3ed5097..44b9fbf 100644 --- a/src/exceptions/NotFoundFileException.ts +++ b/src/exceptions/NotFoundFileException.ts @@ -13,8 +13,8 @@ export class NotFoundFileException extends Exception { public constructor(filePath: string) { super({ code: 'E_NOT_FOUND_FILE', - message: `The file ${filePath} doesnt exist.`, - help: 'Try using File.create method to create the file.' + message: `The file ${filePath} doesn't exist.`, + help: `If your file doesn't exist, you will need to add a content to it as second parameter of File constructor: new File('${filePath}', 'Hello World!'). Also try using file.load() or file.loadSync() method to create the file.` }) } } diff --git a/src/exceptions/NotFoundFolderException.ts b/src/exceptions/NotFoundFolderException.ts index 7bdae60..e0d71b9 100644 --- a/src/exceptions/NotFoundFolderException.ts +++ b/src/exceptions/NotFoundFolderException.ts @@ -13,8 +13,8 @@ export class NotFoundFolderException extends Exception { public constructor(filePath: string) { super({ code: 'E_NOT_FOUND_FILE', - message: `The folder ${filePath} doesnt exist.`, - help: 'Try using Folder.create method to create the folder.' + message: `The folder ${filePath} doesn't exist.`, + help: 'Use folder.load() or folder.loadSync() method to create the folder.' }) } } diff --git a/src/helpers/HttpClient.ts b/src/helpers/HttpClient.ts index ceb9b3a..37f759b 100644 --- a/src/helpers/HttpClient.ts +++ b/src/helpers/HttpClient.ts @@ -10,6 +10,7 @@ import got from 'got' import CacheableLookup from 'cacheable-lookup' +import type { URL } from 'node:url' import { Is } from '#src/helpers/Is' import { Json } from '#src/helpers/Json' @@ -518,7 +519,7 @@ export class HttpClientBuilder { * Set the request url. */ public url(url: string | URL): HttpClientBuilder { - if (url instanceof URL) { + if (!Is.String(url)) { this.options.url = url return this diff --git a/src/helpers/Path.ts b/src/helpers/Path.ts index 7da8c7b..000c6f3 100644 --- a/src/helpers/Path.ts +++ b/src/helpers/Path.ts @@ -11,8 +11,8 @@ import callSite from 'callsite' import { homedir, tmpdir } from 'node:os' import type { PathDirs } from '#src/types' -import { pathToFileURL, fileURLToPath } from 'node:url' import { sep, normalize, dirname, parse } from 'node:path' +import { pathToFileURL, fileURLToPath, type URL } from 'node:url' export class Path { public static dirs: PathDirs = { From 0b2a363836c3dfa9816db6afcaa86cf7a1440784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Tue, 3 Oct 2023 20:49:53 +0100 Subject: [PATCH 04/11] fix(path): export as import alias --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index cb159bf..f5d0efb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,7 +7,7 @@ * file that was distributed with this source code. */ -export * from './types/index.js' +export * from '#src/types' export * from '#src/globals/Path' export * from '#src/globals/Error' From ffa693fed318bcfd33bd248663b24ec57672a383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Tue, 3 Oct 2023 20:53:23 +0100 Subject: [PATCH 05/11] fix(npm): adjust script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c57c39f..f53124e 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "build": "node node_modules/@athenna/tsconfig/src/build.js", "lint:fix": "eslint \"{bin,src,tests}/**/*.ts\" --fix", "test": "npm run --silent lint:fix && node --import=@athenna/tsconfig bin/test.ts", - "test:debug": "cross-env NODE_DEBUG=athenna:* node --inspect --import=@athenna/tsconfig bin/test.js", + "test:debug": "cross-env NODE_DEBUG=athenna:* node --inspect --import=@athenna/tsconfig bin/test.ts", "test:coverage": "c8 npm run --silent test" }, "files": [ From c361eee963dd3ca5079edbc7371a75bbc2a00421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Tue, 3 Oct 2023 23:01:41 +0100 Subject: [PATCH 06/11] test(exec): remove args --- package-lock.json | 287 +++++++++++++++++++++++++++++++++-------- package.json | 2 +- tests/unit/ExecTest.ts | 6 +- 3 files changed, 235 insertions(+), 60 deletions(-) diff --git a/package-lock.json b/package-lock.json index ebf3d4f..9131527 100644 --- a/package-lock.json +++ b/package-lock.json @@ -46,7 +46,7 @@ "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^6.7.4", "@typescript-eslint/parser": "^6.7.4", - "c8": "^8.0.0", + "c8": "^8.0.1", "commitizen": "^4.3.0", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.36.0", @@ -130,34 +130,79 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.22.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -2217,9 +2262,9 @@ } }, "node_modules/c8": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/c8/-/c8-8.0.0.tgz", - "integrity": "sha512-XHA5vSfCLglAc0Xt8eLBZMv19lgiBSjnb1FLAQgnwkuhJYEonpilhEB4Ea3jPAbm0FhD6VVJrc0z73jPe7JyGQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/c8/-/c8-8.0.1.tgz", + "integrity": "sha512-EINpopxZNH1mETuI0DzRA4MZpAUH+IFiRhnmFD3vFr3vdrgxqi3VfE3KL0AIL+zDq8rC9bZqwM/VDmmoe04y7w==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", @@ -2227,13 +2272,13 @@ "find-up": "^5.0.0", "foreground-child": "^2.0.0", "istanbul-lib-coverage": "^3.2.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-reports": "^3.1.4", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.6", "rimraf": "^3.0.2", "test-exclude": "^6.0.0", "v8-to-istanbul": "^9.0.0", - "yargs": "^16.2.0", - "yargs-parser": "^20.2.9" + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1" }, "bin": { "c8": "bin/c8.js" @@ -2242,6 +2287,20 @@ "node": ">=12" } }, + "node_modules/c8/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/c8/node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -2257,6 +2316,33 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/c8/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/c8/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/cacheable-lookup": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", @@ -5776,23 +5862,38 @@ } }, "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "dependencies": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -9454,28 +9555,63 @@ } }, "@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "requires": { - "@babel/highlight": "^7.22.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "dependencies": { @@ -11029,9 +11165,9 @@ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" }, "c8": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/c8/-/c8-8.0.0.tgz", - "integrity": "sha512-XHA5vSfCLglAc0Xt8eLBZMv19lgiBSjnb1FLAQgnwkuhJYEonpilhEB4Ea3jPAbm0FhD6VVJrc0z73jPe7JyGQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/c8/-/c8-8.0.1.tgz", + "integrity": "sha512-EINpopxZNH1mETuI0DzRA4MZpAUH+IFiRhnmFD3vFr3vdrgxqi3VfE3KL0AIL+zDq8rC9bZqwM/VDmmoe04y7w==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", @@ -11039,15 +11175,26 @@ "find-up": "^5.0.0", "foreground-child": "^2.0.0", "istanbul-lib-coverage": "^3.2.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-reports": "^3.1.4", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.6", "rimraf": "^3.0.2", "test-exclude": "^6.0.0", "v8-to-istanbul": "^9.0.0", - "yargs": "^16.2.0", - "yargs-parser": "^20.2.9" + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1" }, "dependencies": { + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -11056,6 +11203,27 @@ "requires": { "glob": "^7.1.3" } + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true } } }, @@ -13677,20 +13845,31 @@ "dev": true }, "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "requires": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" + }, + "dependencies": { + "make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "requires": { + "semver": "^7.5.3" + } + } } }, "istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", "dev": true, "requires": { "html-escaper": "^2.0.0", diff --git a/package.json b/package.json index f53124e..3ada9b4 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^6.7.4", "@typescript-eslint/parser": "^6.7.4", - "c8": "^8.0.0", + "c8": "^8.0.1", "commitizen": "^4.3.0", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.36.0", diff --git a/tests/unit/ExecTest.ts b/tests/unit/ExecTest.ts index 7c49986..dcc441b 100644 --- a/tests/unit/ExecTest.ts +++ b/tests/unit/ExecTest.ts @@ -109,11 +109,7 @@ export default class ExecTest { @Test() public async shouldBeAbleToExecuteANodeScriptInTheVMAndGetTheStdout({ assert }: Context) { - const { stdout, stderr, exitCode } = await Exec.node(Path.fixtures('node-script.ts'), [ - 'node', - '--loader=ts-node/esm', - Path.fixtures('node-script.ts') - ]) + const { stdout, stderr, exitCode } = await Exec.node(Path.fixtures('node-script.ts')) assert.equal(exitCode, 0) assert.equal(stdout, 'hello') From 4882d91542dec3e1922826ae8324d60326e75305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Wed, 4 Oct 2023 09:27:25 +0100 Subject: [PATCH 07/11] fix(c8): use loader flag instead --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3ada9b4..85193da 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "lint:fix": "eslint \"{bin,src,tests}/**/*.ts\" --fix", "test": "npm run --silent lint:fix && node --import=@athenna/tsconfig bin/test.ts", "test:debug": "cross-env NODE_DEBUG=athenna:* node --inspect --import=@athenna/tsconfig bin/test.ts", - "test:coverage": "c8 npm run --silent test" + "test:coverage": "npm run --silent lint:fix && c8 node --loader=ts-node/esm --no-warnings bin/test.ts" }, "files": [ "src/*.js", From 080ae3e3935ee1994b958c7b7b1ba7b1bb2010c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Wed, 4 Oct 2023 10:26:37 +0100 Subject: [PATCH 08/11] fix(c8): disable code coverage for now --- package-lock.json | 3 +++ package.json | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 9131527..f7faf7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -60,6 +60,9 @@ "lint-staged": "^12.5.0", "minimist": "^1.2.7", "prettier": "^2.8.7" + }, + "engines": { + "node": ">=20.0.0" } }, "../..": { diff --git a/package.json b/package.json index 85193da..8919930 100644 --- a/package.json +++ b/package.json @@ -16,12 +16,15 @@ "helpers", "standalone" ], + "engines": { + "node": ">=20.0.0" + }, "scripts": { "build": "node node_modules/@athenna/tsconfig/src/build.js", "lint:fix": "eslint \"{bin,src,tests}/**/*.ts\" --fix", "test": "npm run --silent lint:fix && node --import=@athenna/tsconfig bin/test.ts", "test:debug": "cross-env NODE_DEBUG=athenna:* node --inspect --import=@athenna/tsconfig bin/test.ts", - "test:coverage": "npm run --silent lint:fix && c8 node --loader=ts-node/esm --no-warnings bin/test.ts" + "test:coverage": "npm run test" }, "files": [ "src/*.js", From 07e13247739a8c2e84200da1e4dea5f6b3bdfded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Wed, 4 Oct 2023 11:51:40 +0100 Subject: [PATCH 09/11] ci(exec): comment Exec class tests to see results --- package.json | 2 +- tests/unit/ExecTest.ts | 378 ++++++++++++++++++++--------------------- 2 files changed, 190 insertions(+), 190 deletions(-) diff --git a/package.json b/package.json index 8919930..2139267 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "lint:fix": "eslint \"{bin,src,tests}/**/*.ts\" --fix", "test": "npm run --silent lint:fix && node --import=@athenna/tsconfig bin/test.ts", "test:debug": "cross-env NODE_DEBUG=athenna:* node --inspect --import=@athenna/tsconfig bin/test.ts", - "test:coverage": "npm run test" + "test:coverage": "c8 npm run --silent test" }, "files": [ "src/*.js", diff --git a/tests/unit/ExecTest.ts b/tests/unit/ExecTest.ts index dcc441b..d4ed444 100644 --- a/tests/unit/ExecTest.ts +++ b/tests/unit/ExecTest.ts @@ -1,189 +1,189 @@ -/** - * @athenna/common - * - * (c) João Lenon - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -import { Test, BeforeEach, type Context } from '@athenna/test' -import { Clean, Exec, File, Folder, Is, Module, Path } from '#src' - -export default class ExecTest { - @BeforeEach() - public async beforeEach() { - await Folder.safeRemove(Path.storage()) - } - - @Test() - public async shouldBeAbleToSleepTheCodeForSomeMs() { - await Exec.sleep(10) - } - - @Test() - public async shouldBeAbleToExecuteACommandInTheVMAndGetTheStdout({ assert }: Context) { - const { stdout, exitCode } = await Exec.command('ls') - - assert.equal(exitCode, 0) - assert.isTrue(stdout.includes('README.md')) - } - - @Test() - public async shouldThrowAnExceptionWhenCommandFails({ assert }: Context) { - if (Is.Windows()) { - return - } - - const useCase = async () => { - await Exec.command('exit 255') - } - - await assert.rejects(useCase) - } - - @Test() - public async shouldBeAbleToIgnoreExceptionWhenRejectOptionIsSetToFalseInCommand({ assert }: Context) { - if (Is.Windows()) { - return - } - - const useCase = async () => { - await Exec.command('exit 255', { reject: false }) - } - - await assert.doesNotRejects(useCase) - } - - @Test() - public async shouldBeAbleToExecuteAShellCommandInTheVMAndGetTheStdout({ assert }: Context) { - if (Is.Windows()) { - return - } - - const { stdout, exitCode } = await Exec.shell('ls && cat README.md') - - assert.equal(exitCode, 0) - assert.isTrue(stdout.includes('README.md')) - assert.isTrue(stdout.includes('# Common')) - } - - @Test() - public async shouldThrowAnExceptionWhenShellCommandFails({ assert }: Context) { - if (Is.Windows()) { - return - } - - const useCase = async () => { - await Exec.shell('exit 255') - } - - await assert.rejects(useCase) - } - - @Test() - public async shouldBeAbleToIgnoreExceptionWhenRejectOptionIsSetToFalseInShellCommand({ assert }: Context) { - if (Is.Windows()) { - return - } - - const useCase = async () => { - await Exec.shell('exit 255', { reject: false }) - } - - await assert.doesNotRejects(useCase) - } - - @Test() - public async shouldBeAbleToExecuteMultipleShellCommandsAtOnce({ assert }: Context) { - if (Is.Windows()) { - return - } - - const { stdout, stderr, exitCode } = await Exec.shell('echo "error thrown" && exit 255', { reject: false }) - - assert.equal(stderr, '') - assert.equal(exitCode, 255) - assert.isTrue(stdout.includes('error thrown')) - } - - @Test() - public async shouldBeAbleToExecuteANodeScriptInTheVMAndGetTheStdout({ assert }: Context) { - const { stdout, stderr, exitCode } = await Exec.node(Path.fixtures('node-script.ts')) - - assert.equal(exitCode, 0) - assert.equal(stdout, 'hello') - assert.equal(stderr, 'hello') - } - - @Test() - public async shouldThrowAnExceptionWhenNodeScriptFails({ assert }: Context) { - const useCase = async () => { - await Exec.node(Path.fixtures('node-script-throw.ts')) - } - - await assert.rejects(useCase) - } - - @Test() - public async shouldBeAbleToIgnoreExceptionWhenRejectOptionIsSetToFalseInNodeScript({ assert }: Context) { - const useCase = async () => { - await Exec.node(Path.fixtures('node-script-throw.ts'), [], { reject: false }) - } - - await assert.doesNotRejects(useCase) - } - - @Test() - public async shouldBeAbleToDownloadFiles({ assert }: Context) { - const file = await Exec.download(Path.storage('downloads/node.pkg'), 'https://nodejs.org/dist/latest/node.pkg') - - assert.equal(file.base, 'node.pkg') - assert.isTrue(await File.exists(file.path)) - } - - @Test() - public async shouldBeAbleToPaginateACollectionOfData({ assert }: Context) { - let i = 0 - const collection = [] - - while (i < 10) { - collection.push({ - joao: 'lenon', - hello: 'world' - }) - - i++ - } - - const paginatedData = Exec.pagination(collection, collection.length + 1, { - page: 0, - limit: 10, - resourceUrl: 'https://my-api.com/products' - }) - - assert.deepEqual(paginatedData.data, collection) - assert.deepEqual(paginatedData.meta, { - itemCount: 10, - totalItems: 11, - totalPages: 2, - currentPage: 0, - itemsPerPage: 10 - }) - assert.deepEqual(paginatedData.links, { - first: 'https://my-api.com/products?limit=10', - previous: 'https://my-api.com/products?page=0&limit=10', - next: 'https://my-api.com/products?page=1&limit=10', - last: 'https://my-api.com/products?page=2&limit=10' - }) - } - - @Test() - public async shouldBeAbleToExecuteSomeCallbackConcurrentlyInAllArrayIndexesAndGetTheValue({ assert }: Context) { - const paths = ['#src/helpers/Clean', '#src/helpers/Collection', '#src/helpers/Color', '#src/helpers/Exception'] - - const modules = await Exec.concurrently(paths, async path => Module.resolve(path, import.meta.url)) - - assert.deepEqual(modules[0], Clean) - } -} +// /** +// * @athenna/common +// * +// * (c) João Lenon +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. +// */ + +// import { Test, BeforeEach, type Context } from '@athenna/test' +// import { Clean, Exec, File, Folder, Is, Module, Path } from '#src' + +// export default class ExecTest { +// @BeforeEach() +// public async beforeEach() { +// await Folder.safeRemove(Path.storage()) +// } + +// @Test() +// public async shouldBeAbleToSleepTheCodeForSomeMs() { +// await Exec.sleep(10) +// } + +// @Test() +// public async shouldBeAbleToExecuteACommandInTheVMAndGetTheStdout({ assert }: Context) { +// const { stdout, exitCode } = await Exec.command('ls') + +// assert.equal(exitCode, 0) +// assert.isTrue(stdout.includes('README.md')) +// } + +// @Test() +// public async shouldThrowAnExceptionWhenCommandFails({ assert }: Context) { +// if (Is.Windows()) { +// return +// } + +// const useCase = async () => { +// await Exec.command('exit 255') +// } + +// await assert.rejects(useCase) +// } + +// @Test() +// public async shouldBeAbleToIgnoreExceptionWhenRejectOptionIsSetToFalseInCommand({ assert }: Context) { +// if (Is.Windows()) { +// return +// } + +// const useCase = async () => { +// await Exec.command('exit 255', { reject: false }) +// } + +// await assert.doesNotRejects(useCase) +// } + +// @Test() +// public async shouldBeAbleToExecuteAShellCommandInTheVMAndGetTheStdout({ assert }: Context) { +// if (Is.Windows()) { +// return +// } + +// const { stdout, exitCode } = await Exec.shell('ls && cat README.md') + +// assert.equal(exitCode, 0) +// assert.isTrue(stdout.includes('README.md')) +// assert.isTrue(stdout.includes('# Common')) +// } + +// @Test() +// public async shouldThrowAnExceptionWhenShellCommandFails({ assert }: Context) { +// if (Is.Windows()) { +// return +// } + +// const useCase = async () => { +// await Exec.shell('exit 255') +// } + +// await assert.rejects(useCase) +// } + +// @Test() +// public async shouldBeAbleToIgnoreExceptionWhenRejectOptionIsSetToFalseInShellCommand({ assert }: Context) { +// if (Is.Windows()) { +// return +// } + +// const useCase = async () => { +// await Exec.shell('exit 255', { reject: false }) +// } + +// await assert.doesNotRejects(useCase) +// } + +// @Test() +// public async shouldBeAbleToExecuteMultipleShellCommandsAtOnce({ assert }: Context) { +// if (Is.Windows()) { +// return +// } + +// const { stdout, stderr, exitCode } = await Exec.shell('echo "error thrown" && exit 255', { reject: false }) + +// assert.equal(stderr, '') +// assert.equal(exitCode, 255) +// assert.isTrue(stdout.includes('error thrown')) +// } + +// @Test() +// public async shouldBeAbleToExecuteANodeScriptInTheVMAndGetTheStdout({ assert }: Context) { +// const { stdout, stderr, exitCode } = await Exec.node(Path.fixtures('node-script.ts')) + +// assert.equal(exitCode, 0) +// assert.equal(stdout, 'hello') +// assert.equal(stderr, 'hello') +// } + +// @Test() +// public async shouldThrowAnExceptionWhenNodeScriptFails({ assert }: Context) { +// const useCase = async () => { +// await Exec.node(Path.fixtures('node-script-throw.ts')) +// } + +// await assert.rejects(useCase) +// } + +// @Test() +// public async shouldBeAbleToIgnoreExceptionWhenRejectOptionIsSetToFalseInNodeScript({ assert }: Context) { +// const useCase = async () => { +// await Exec.node(Path.fixtures('node-script-throw.ts'), [], { reject: false }) +// } + +// await assert.doesNotRejects(useCase) +// } + +// @Test() +// public async shouldBeAbleToDownloadFiles({ assert }: Context) { +// const file = await Exec.download(Path.storage('downloads/node.pkg'), 'https://nodejs.org/dist/latest/node.pkg') + +// assert.equal(file.base, 'node.pkg') +// assert.isTrue(await File.exists(file.path)) +// } + +// @Test() +// public async shouldBeAbleToPaginateACollectionOfData({ assert }: Context) { +// let i = 0 +// const collection = [] + +// while (i < 10) { +// collection.push({ +// joao: 'lenon', +// hello: 'world' +// }) + +// i++ +// } + +// const paginatedData = Exec.pagination(collection, collection.length + 1, { +// page: 0, +// limit: 10, +// resourceUrl: 'https://my-api.com/products' +// }) + +// assert.deepEqual(paginatedData.data, collection) +// assert.deepEqual(paginatedData.meta, { +// itemCount: 10, +// totalItems: 11, +// totalPages: 2, +// currentPage: 0, +// itemsPerPage: 10 +// }) +// assert.deepEqual(paginatedData.links, { +// first: 'https://my-api.com/products?limit=10', +// previous: 'https://my-api.com/products?page=0&limit=10', +// next: 'https://my-api.com/products?page=1&limit=10', +// last: 'https://my-api.com/products?page=2&limit=10' +// }) +// } + +// @Test() +// public async shouldBeAbleToExecuteSomeCallbackConcurrentlyInAllArrayIndexesAndGetTheValue({ assert }: Context) { +// const paths = ['#src/helpers/Clean', '#src/helpers/Collection', '#src/helpers/Color', '#src/helpers/Exception'] + +// const modules = await Exec.concurrently(paths, async path => Module.resolve(path, import.meta.url)) + +// assert.deepEqual(modules[0], Clean) +// } +// } From 33e37415108462d901ca7017e76b938a8c8ab450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Wed, 4 Oct 2023 11:59:17 +0100 Subject: [PATCH 10/11] fix(c8): disable code coverage for now --- package.json | 2 +- tests/unit/ExecTest.ts | 378 ++++++++++++++++++++--------------------- 2 files changed, 190 insertions(+), 190 deletions(-) diff --git a/package.json b/package.json index 2139267..2655ba8 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "lint:fix": "eslint \"{bin,src,tests}/**/*.ts\" --fix", "test": "npm run --silent lint:fix && node --import=@athenna/tsconfig bin/test.ts", "test:debug": "cross-env NODE_DEBUG=athenna:* node --inspect --import=@athenna/tsconfig bin/test.ts", - "test:coverage": "c8 npm run --silent test" + "test:coverage": "npm run --silent test" }, "files": [ "src/*.js", diff --git a/tests/unit/ExecTest.ts b/tests/unit/ExecTest.ts index d4ed444..dcc441b 100644 --- a/tests/unit/ExecTest.ts +++ b/tests/unit/ExecTest.ts @@ -1,189 +1,189 @@ -// /** -// * @athenna/common -// * -// * (c) João Lenon -// * -// * For the full copyright and license information, please view the LICENSE -// * file that was distributed with this source code. -// */ - -// import { Test, BeforeEach, type Context } from '@athenna/test' -// import { Clean, Exec, File, Folder, Is, Module, Path } from '#src' - -// export default class ExecTest { -// @BeforeEach() -// public async beforeEach() { -// await Folder.safeRemove(Path.storage()) -// } - -// @Test() -// public async shouldBeAbleToSleepTheCodeForSomeMs() { -// await Exec.sleep(10) -// } - -// @Test() -// public async shouldBeAbleToExecuteACommandInTheVMAndGetTheStdout({ assert }: Context) { -// const { stdout, exitCode } = await Exec.command('ls') - -// assert.equal(exitCode, 0) -// assert.isTrue(stdout.includes('README.md')) -// } - -// @Test() -// public async shouldThrowAnExceptionWhenCommandFails({ assert }: Context) { -// if (Is.Windows()) { -// return -// } - -// const useCase = async () => { -// await Exec.command('exit 255') -// } - -// await assert.rejects(useCase) -// } - -// @Test() -// public async shouldBeAbleToIgnoreExceptionWhenRejectOptionIsSetToFalseInCommand({ assert }: Context) { -// if (Is.Windows()) { -// return -// } - -// const useCase = async () => { -// await Exec.command('exit 255', { reject: false }) -// } - -// await assert.doesNotRejects(useCase) -// } - -// @Test() -// public async shouldBeAbleToExecuteAShellCommandInTheVMAndGetTheStdout({ assert }: Context) { -// if (Is.Windows()) { -// return -// } - -// const { stdout, exitCode } = await Exec.shell('ls && cat README.md') - -// assert.equal(exitCode, 0) -// assert.isTrue(stdout.includes('README.md')) -// assert.isTrue(stdout.includes('# Common')) -// } - -// @Test() -// public async shouldThrowAnExceptionWhenShellCommandFails({ assert }: Context) { -// if (Is.Windows()) { -// return -// } - -// const useCase = async () => { -// await Exec.shell('exit 255') -// } - -// await assert.rejects(useCase) -// } - -// @Test() -// public async shouldBeAbleToIgnoreExceptionWhenRejectOptionIsSetToFalseInShellCommand({ assert }: Context) { -// if (Is.Windows()) { -// return -// } - -// const useCase = async () => { -// await Exec.shell('exit 255', { reject: false }) -// } - -// await assert.doesNotRejects(useCase) -// } - -// @Test() -// public async shouldBeAbleToExecuteMultipleShellCommandsAtOnce({ assert }: Context) { -// if (Is.Windows()) { -// return -// } - -// const { stdout, stderr, exitCode } = await Exec.shell('echo "error thrown" && exit 255', { reject: false }) - -// assert.equal(stderr, '') -// assert.equal(exitCode, 255) -// assert.isTrue(stdout.includes('error thrown')) -// } - -// @Test() -// public async shouldBeAbleToExecuteANodeScriptInTheVMAndGetTheStdout({ assert }: Context) { -// const { stdout, stderr, exitCode } = await Exec.node(Path.fixtures('node-script.ts')) - -// assert.equal(exitCode, 0) -// assert.equal(stdout, 'hello') -// assert.equal(stderr, 'hello') -// } - -// @Test() -// public async shouldThrowAnExceptionWhenNodeScriptFails({ assert }: Context) { -// const useCase = async () => { -// await Exec.node(Path.fixtures('node-script-throw.ts')) -// } - -// await assert.rejects(useCase) -// } - -// @Test() -// public async shouldBeAbleToIgnoreExceptionWhenRejectOptionIsSetToFalseInNodeScript({ assert }: Context) { -// const useCase = async () => { -// await Exec.node(Path.fixtures('node-script-throw.ts'), [], { reject: false }) -// } - -// await assert.doesNotRejects(useCase) -// } - -// @Test() -// public async shouldBeAbleToDownloadFiles({ assert }: Context) { -// const file = await Exec.download(Path.storage('downloads/node.pkg'), 'https://nodejs.org/dist/latest/node.pkg') - -// assert.equal(file.base, 'node.pkg') -// assert.isTrue(await File.exists(file.path)) -// } - -// @Test() -// public async shouldBeAbleToPaginateACollectionOfData({ assert }: Context) { -// let i = 0 -// const collection = [] - -// while (i < 10) { -// collection.push({ -// joao: 'lenon', -// hello: 'world' -// }) - -// i++ -// } - -// const paginatedData = Exec.pagination(collection, collection.length + 1, { -// page: 0, -// limit: 10, -// resourceUrl: 'https://my-api.com/products' -// }) - -// assert.deepEqual(paginatedData.data, collection) -// assert.deepEqual(paginatedData.meta, { -// itemCount: 10, -// totalItems: 11, -// totalPages: 2, -// currentPage: 0, -// itemsPerPage: 10 -// }) -// assert.deepEqual(paginatedData.links, { -// first: 'https://my-api.com/products?limit=10', -// previous: 'https://my-api.com/products?page=0&limit=10', -// next: 'https://my-api.com/products?page=1&limit=10', -// last: 'https://my-api.com/products?page=2&limit=10' -// }) -// } - -// @Test() -// public async shouldBeAbleToExecuteSomeCallbackConcurrentlyInAllArrayIndexesAndGetTheValue({ assert }: Context) { -// const paths = ['#src/helpers/Clean', '#src/helpers/Collection', '#src/helpers/Color', '#src/helpers/Exception'] - -// const modules = await Exec.concurrently(paths, async path => Module.resolve(path, import.meta.url)) - -// assert.deepEqual(modules[0], Clean) -// } -// } +/** + * @athenna/common + * + * (c) João Lenon + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +import { Test, BeforeEach, type Context } from '@athenna/test' +import { Clean, Exec, File, Folder, Is, Module, Path } from '#src' + +export default class ExecTest { + @BeforeEach() + public async beforeEach() { + await Folder.safeRemove(Path.storage()) + } + + @Test() + public async shouldBeAbleToSleepTheCodeForSomeMs() { + await Exec.sleep(10) + } + + @Test() + public async shouldBeAbleToExecuteACommandInTheVMAndGetTheStdout({ assert }: Context) { + const { stdout, exitCode } = await Exec.command('ls') + + assert.equal(exitCode, 0) + assert.isTrue(stdout.includes('README.md')) + } + + @Test() + public async shouldThrowAnExceptionWhenCommandFails({ assert }: Context) { + if (Is.Windows()) { + return + } + + const useCase = async () => { + await Exec.command('exit 255') + } + + await assert.rejects(useCase) + } + + @Test() + public async shouldBeAbleToIgnoreExceptionWhenRejectOptionIsSetToFalseInCommand({ assert }: Context) { + if (Is.Windows()) { + return + } + + const useCase = async () => { + await Exec.command('exit 255', { reject: false }) + } + + await assert.doesNotRejects(useCase) + } + + @Test() + public async shouldBeAbleToExecuteAShellCommandInTheVMAndGetTheStdout({ assert }: Context) { + if (Is.Windows()) { + return + } + + const { stdout, exitCode } = await Exec.shell('ls && cat README.md') + + assert.equal(exitCode, 0) + assert.isTrue(stdout.includes('README.md')) + assert.isTrue(stdout.includes('# Common')) + } + + @Test() + public async shouldThrowAnExceptionWhenShellCommandFails({ assert }: Context) { + if (Is.Windows()) { + return + } + + const useCase = async () => { + await Exec.shell('exit 255') + } + + await assert.rejects(useCase) + } + + @Test() + public async shouldBeAbleToIgnoreExceptionWhenRejectOptionIsSetToFalseInShellCommand({ assert }: Context) { + if (Is.Windows()) { + return + } + + const useCase = async () => { + await Exec.shell('exit 255', { reject: false }) + } + + await assert.doesNotRejects(useCase) + } + + @Test() + public async shouldBeAbleToExecuteMultipleShellCommandsAtOnce({ assert }: Context) { + if (Is.Windows()) { + return + } + + const { stdout, stderr, exitCode } = await Exec.shell('echo "error thrown" && exit 255', { reject: false }) + + assert.equal(stderr, '') + assert.equal(exitCode, 255) + assert.isTrue(stdout.includes('error thrown')) + } + + @Test() + public async shouldBeAbleToExecuteANodeScriptInTheVMAndGetTheStdout({ assert }: Context) { + const { stdout, stderr, exitCode } = await Exec.node(Path.fixtures('node-script.ts')) + + assert.equal(exitCode, 0) + assert.equal(stdout, 'hello') + assert.equal(stderr, 'hello') + } + + @Test() + public async shouldThrowAnExceptionWhenNodeScriptFails({ assert }: Context) { + const useCase = async () => { + await Exec.node(Path.fixtures('node-script-throw.ts')) + } + + await assert.rejects(useCase) + } + + @Test() + public async shouldBeAbleToIgnoreExceptionWhenRejectOptionIsSetToFalseInNodeScript({ assert }: Context) { + const useCase = async () => { + await Exec.node(Path.fixtures('node-script-throw.ts'), [], { reject: false }) + } + + await assert.doesNotRejects(useCase) + } + + @Test() + public async shouldBeAbleToDownloadFiles({ assert }: Context) { + const file = await Exec.download(Path.storage('downloads/node.pkg'), 'https://nodejs.org/dist/latest/node.pkg') + + assert.equal(file.base, 'node.pkg') + assert.isTrue(await File.exists(file.path)) + } + + @Test() + public async shouldBeAbleToPaginateACollectionOfData({ assert }: Context) { + let i = 0 + const collection = [] + + while (i < 10) { + collection.push({ + joao: 'lenon', + hello: 'world' + }) + + i++ + } + + const paginatedData = Exec.pagination(collection, collection.length + 1, { + page: 0, + limit: 10, + resourceUrl: 'https://my-api.com/products' + }) + + assert.deepEqual(paginatedData.data, collection) + assert.deepEqual(paginatedData.meta, { + itemCount: 10, + totalItems: 11, + totalPages: 2, + currentPage: 0, + itemsPerPage: 10 + }) + assert.deepEqual(paginatedData.links, { + first: 'https://my-api.com/products?limit=10', + previous: 'https://my-api.com/products?page=0&limit=10', + next: 'https://my-api.com/products?page=1&limit=10', + last: 'https://my-api.com/products?page=2&limit=10' + }) + } + + @Test() + public async shouldBeAbleToExecuteSomeCallbackConcurrentlyInAllArrayIndexesAndGetTheValue({ assert }: Context) { + const paths = ['#src/helpers/Clean', '#src/helpers/Collection', '#src/helpers/Color', '#src/helpers/Exception'] + + const modules = await Exec.concurrently(paths, async path => Module.resolve(path, import.meta.url)) + + assert.deepEqual(modules[0], Clean) + } +} From 59b0e43e308a7e637a21fc39d9e48ff2c47ce200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Wed, 4 Oct 2023 12:27:38 +0100 Subject: [PATCH 11/11] chore(npm): update dependencies --- .github/workflows/ci.yml | 2 +- package-lock.json | 20 ++++++++++++-------- package.json | 5 ++--- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3fb98fa..0da1045 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: run: npm link @athenna/common - name: Run tests - run: npm run test:coverage + run: npm run test - name: Test code compilation run: npm run build diff --git a/package-lock.json b/package-lock.json index f7faf7d..55a7fdd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "youch-terminal": "^2.2.2" }, "devDependencies": { - "@athenna/test": "^4.9.1", + "@athenna/test": "^4.10.0", "@athenna/tsconfig": "^4.7.0", "@types/bytes": "^3.1.1", "@types/callsite": "^1.0.31", @@ -46,7 +46,6 @@ "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^6.7.4", "@typescript-eslint/parser": "^6.7.4", - "c8": "^8.0.1", "commitizen": "^4.3.0", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.36.0", @@ -105,9 +104,9 @@ "dev": true }, "node_modules/@athenna/test": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.9.1.tgz", - "integrity": "sha512-oyhqLj6Y9turEF7G+HTtznX9f389j2fjpE+rLCtt1gb3D3IJqigRxKxhhbbalG0j2LAmwex4HtoWqDbkxH+PKg==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.10.0.tgz", + "integrity": "sha512-NgveUhrIMyUD8LBWAF/gCGKWfE1zW9CJSSKM8WPrq8GgUnycOSVg0h8Jo9rAgb+YSf7g90okR/YkMzwkOMnb7Q==", "dev": true, "dependencies": { "@japa/assert": "^1.4.1", @@ -115,7 +114,11 @@ "@japa/runner": "^2.2.2", "@japa/spec-reporter": "^1.3.3", "@types/sinon": "^10.0.16", + "c8": "^8.0.1", "sinon": "^15.1.0" + }, + "engines": { + "node": ">=20.0.0" } }, "node_modules/@athenna/tsconfig": { @@ -9530,9 +9533,9 @@ "dev": true }, "@athenna/test": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.9.1.tgz", - "integrity": "sha512-oyhqLj6Y9turEF7G+HTtznX9f389j2fjpE+rLCtt1gb3D3IJqigRxKxhhbbalG0j2LAmwex4HtoWqDbkxH+PKg==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.10.0.tgz", + "integrity": "sha512-NgveUhrIMyUD8LBWAF/gCGKWfE1zW9CJSSKM8WPrq8GgUnycOSVg0h8Jo9rAgb+YSf7g90okR/YkMzwkOMnb7Q==", "dev": true, "requires": { "@japa/assert": "^1.4.1", @@ -9540,6 +9543,7 @@ "@japa/runner": "^2.2.2", "@japa/spec-reporter": "^1.3.3", "@types/sinon": "^10.0.16", + "c8": "^8.0.1", "sinon": "^15.1.0" } }, diff --git a/package.json b/package.json index 2655ba8..5026c22 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "lint:fix": "eslint \"{bin,src,tests}/**/*.ts\" --fix", "test": "npm run --silent lint:fix && node --import=@athenna/tsconfig bin/test.ts", "test:debug": "cross-env NODE_DEBUG=athenna:* node --inspect --import=@athenna/tsconfig bin/test.ts", - "test:coverage": "npm run --silent test" + "test:coverage": "c8 npm run --silent test" }, "files": [ "src/*.js", @@ -79,7 +79,7 @@ "youch-terminal": "^2.2.2" }, "devDependencies": { - "@athenna/test": "^4.9.1", + "@athenna/test": "^4.10.0", "@athenna/tsconfig": "^4.7.0", "@types/bytes": "^3.1.1", "@types/callsite": "^1.0.31", @@ -91,7 +91,6 @@ "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^6.7.4", "@typescript-eslint/parser": "^6.7.4", - "c8": "^8.0.1", "commitizen": "^4.3.0", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.36.0",