From b579d68ac1fc973d498bc16babc7f956e9f52be5 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Mon, 13 Nov 2023 05:54:24 +0000 Subject: [PATCH 1/4] fix: upgrade figlet from 1.6.0 to 1.7.0 Snyk has created this PR to upgrade figlet from 1.6.0 to 1.7.0. See this package in npm: https://www.npmjs.com/package/figlet See this project in Snyk: https://app.snyk.io/org/jlenon7/project/f7598444-7b01-4b91-a3b7-c412423e4e02?utm_source=github&utm_medium=referral&page=upgrade-pr --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index c16a432..537bb4b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "cli-table3": "^0.6.3", "columnify": "^1.6.0", "commander": "^9.5.0", - "figlet": "^1.6.0", + "figlet": "^1.7.0", "inquirer": "^9.2.11", "log-update": "^5.0.1", "ora": "^6.3.1" @@ -5039,9 +5039,9 @@ } }, "node_modules/figlet": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.6.0.tgz", - "integrity": "sha512-31EQGhCEITv6+hi2ORRPyn3bulaV9Fl4xOdR169cBzH/n1UqcxsiSB/noo6SJdD7Kfb1Ljit+IgR1USvF/XbdA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.7.0.tgz", + "integrity": "sha512-gO8l3wvqo0V7wEFLXPbkX83b7MVjRrk1oRLfYlZXol8nEpb/ON9pcKLI4qpBv5YtOTfrINtqb7b40iYY2FTWFg==", "bin": { "figlet": "bin/index.js" }, diff --git a/package.json b/package.json index 1d840dd..d987a5b 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "cli-table3": "^0.6.3", "columnify": "^1.6.0", "commander": "^9.5.0", - "figlet": "^1.6.0", + "figlet": "^1.7.0", "inquirer": "^9.2.11", "log-update": "^5.0.1", "ora": "^6.3.1" From c268b0b8127a2d343e56d3dcdd7c8941bb470a9f Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Wed, 29 Nov 2023 17:15:48 +0000 Subject: [PATCH 2/4] fix: upgrade inquirer from 9.2.11 to 9.2.12 Snyk has created this PR to upgrade inquirer from 9.2.11 to 9.2.12. See this package in npm: https://www.npmjs.com/package/inquirer See this project in Snyk: https://app.snyk.io/org/jlenon7/project/f7598444-7b01-4b91-a3b7-c412423e4e02?utm_source=github&utm_medium=referral&page=upgrade-pr --- package-lock.json | 27 ++++++++++++--------------- package.json | 2 +- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index c16a432..2fef113 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "columnify": "^1.6.0", "commander": "^9.5.0", "figlet": "^1.6.0", - "inquirer": "^9.2.11", + "inquirer": "^9.2.12", "log-update": "^5.0.1", "ora": "^6.3.1" }, @@ -1163,9 +1163,12 @@ "dev": true }, "node_modules/@ljharb/through": { - "version": "2.3.9", - "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.9.tgz", - "integrity": "sha512-yN599ZBuMPPK4tdoToLlvgJB4CLK8fGl7ntfy0Wn7U6ttNvHYurd81bfUiK/6sMkiIwm65R6ck4L6+Y3DfVbNQ==", + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.11.tgz", + "integrity": "sha512-ccfcIDlogiXNq5KcbAwbaO7lMh3Tm1i3khMPYpxlK8hH/W53zN81KM9coerRLOnTGu3nfXIniAmQbRI9OxbC0w==", + "dependencies": { + "call-bind": "^1.0.2" + }, "engines": { "node": ">= 0.4" } @@ -2587,7 +2590,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, "dependencies": { "function-bind": "^1.1.1", "get-intrinsic": "^1.0.2" @@ -5296,8 +5298,7 @@ "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "node_modules/function.prototype.name": { "version": "1.1.6", @@ -5348,7 +5349,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", - "dev": true, "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -5636,7 +5636,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", - "dev": true, "engines": { "node": ">= 0.4.0" } @@ -5693,7 +5692,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -5705,7 +5703,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -6221,11 +6218,11 @@ "dev": true }, "node_modules/inquirer": { - "version": "9.2.11", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.11.tgz", - "integrity": "sha512-B2LafrnnhbRzCWfAdOXisUzL89Kg8cVJlYmhqoi3flSiV/TveO+nsXwgKr9h9PIo+J1hz7nBSk6gegRIMBBf7g==", + "version": "9.2.12", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.12.tgz", + "integrity": "sha512-mg3Fh9g2zfuVWJn6lhST0O7x4n03k7G8Tx5nvikJkbq8/CK47WDVm+UznF0G6s5Zi0KcyUisr6DU8T67N5U+1Q==", "dependencies": { - "@ljharb/through": "^2.3.9", + "@ljharb/through": "^2.3.11", "ansi-escapes": "^4.3.2", "chalk": "^5.3.0", "cli-cursor": "^3.1.0", diff --git a/package.json b/package.json index 1d840dd..707e1e3 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "columnify": "^1.6.0", "commander": "^9.5.0", "figlet": "^1.6.0", - "inquirer": "^9.2.11", + "inquirer": "^9.2.12", "log-update": "^5.0.1", "ora": "^6.3.1" }, From faaf0791232981eedce5af76cc7d95f66f9bbc0c Mon Sep 17 00:00:00 2001 From: jlenon7 Date: Sat, 9 Dec 2023 20:08:27 +0000 Subject: [PATCH 3/4] chore(npm): update dependencies --- package.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 1d840dd..f780537 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/artisan", - "version": "4.15.2", + "version": "4.16.0", "description": "The Athenna CLI application. Built on top of commander and inspired in @adonisjs/ace.", "license": "MIT", "author": "João Lenon ", @@ -76,13 +76,13 @@ "ora": "^6.3.1" }, "devDependencies": { - "@athenna/common": "^4.18.0", - "@athenna/config": "^4.7.0", - "@athenna/ioc": "^4.7.0", - "@athenna/logger": "^4.8.0", - "@athenna/test": "^4.12.0", + "@athenna/common": "^4.21.0", + "@athenna/config": "^4.8.0", + "@athenna/ioc": "^4.8.0", + "@athenna/logger": "^4.9.0", + "@athenna/test": "^4.13.0", "@athenna/tsconfig": "^4.9.1", - "@athenna/view": "^4.6.0", + "@athenna/view": "^4.7.0", "@typescript-eslint/eslint-plugin": "^6.7.4", "@typescript-eslint/parser": "^6.7.4", "commitizen": "^4.2.6", From 34b7e296afad95dcb56bfb3f25005963d3c234d4 Mon Sep 17 00:00:00 2001 From: jlenon7 Date: Sat, 9 Dec 2023 23:35:54 +0000 Subject: [PATCH 4/4] chore(npm): update dependencies --- .github/workflows/cd.yml | 2 +- .github/workflows/ci.yml | 4 +- package-lock.json | 351 +++++++----------- package.json | 4 +- src/commands/TemplateCustomizeCommand.ts | 9 +- .../commands/TemplateCustomizeCommandTest.ts | 4 +- .../handlers/ConsoleExceptionHandlerTest.ts | 10 +- 7 files changed, 150 insertions(+), 234 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 2fb4dac..c38be3d 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: '20.x' + node-version: '21.x' registry-url: 'https://registry.npmjs.org' - name: Install dependencies diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0cfdb76..e5054bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: node-version: - - 20.x + - 21.x steps: - uses: actions/checkout@v2 with: @@ -38,7 +38,7 @@ jobs: strategy: matrix: node-version: - - 20.x + - 21.x steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} diff --git a/package-lock.json b/package-lock.json index 81f9fb7..05fbfbc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@athenna/artisan", - "version": "4.15.2", + "version": "4.17.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@athenna/artisan", - "version": "4.15.2", + "version": "4.17.0", "license": "MIT", "dependencies": { "chalk-rainbow": "^1.0.0", @@ -20,13 +20,13 @@ "ora": "^6.3.1" }, "devDependencies": { - "@athenna/common": "^4.18.0", - "@athenna/config": "^4.7.0", - "@athenna/ioc": "^4.7.0", - "@athenna/logger": "^4.8.0", - "@athenna/test": "^4.12.0", + "@athenna/common": "^4.21.0", + "@athenna/config": "^4.8.0", + "@athenna/ioc": "^4.8.0", + "@athenna/logger": "^4.9.0", + "@athenna/test": "^4.13.0", "@athenna/tsconfig": "^4.9.1", - "@athenna/view": "^4.6.0", + "@athenna/view": "^4.7.0", "@typescript-eslint/eslint-plugin": "^6.7.4", "@typescript-eslint/parser": "^6.7.4", "commitizen": "^4.2.6", @@ -101,9 +101,9 @@ "dev": true }, "node_modules/@athenna/common": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@athenna/common/-/common-4.18.0.tgz", - "integrity": "sha512-vYUEcQu80V5zjFf0WjKJ7f9XmhmtziFUL1l6VfH+h6ZHnNWvcjlIYoHU1pONTnVC9b8vFElrJHWz7xo5IDFvIA==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@athenna/common/-/common-4.21.0.tgz", + "integrity": "sha512-1FCgoWxFzKHyC72UMa49VRaQMxbZS6PpagBE4pxAN0YqQ3hYQM8XDToVHc9NP/4geVyb2p5Qz3N06M/GpJn3jA==", "dev": true, "dependencies": { "@fastify/formbody": "^7.4.0", @@ -113,10 +113,11 @@ "change-case": "^4.1.2", "collect.js": "^4.36.1", "execa": "^8.0.1", - "fastify": "^4.23.2", + "fastify": "^4.24.0", "got": "^12.6.1", "http-status-codes": "^2.2.0", "is-wsl": "^2.2.0", + "js-yaml": "^4.1.0", "kind-of": "^6.0.3", "lodash": "^4.17.21", "mime-types": "^2.1.35", @@ -127,21 +128,39 @@ "prepend-file": "^2.0.1", "uuid": "^8.3.2", "validator-brazil": "^1.2.2", - "youch": "^3.3.1", + "youch": "^3.3.3", "youch-terminal": "^2.2.2" }, "engines": { - "node": ">=20.0.0" + "node": ">=21.0.0" + } + }, + "node_modules/@athenna/common/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/@athenna/common/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, "node_modules/@athenna/config": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@athenna/config/-/config-4.7.0.tgz", - "integrity": "sha512-WXx5Tsx6BBVq+QlX5Tm+HMUp+b/ft15YC4oFvdRi3Gj6HBXIcEPpw2zsdLS+Qa/TDDuwa2bYLrToBtLd8EpXpw==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@athenna/config/-/config-4.8.0.tgz", + "integrity": "sha512-pTRNivg1fmViJ45237qhBiVAQU2R7iWTA28MPsJgePt0Jve0z6unhwPSBAaH/oI1KO/Ki9N3jKkwICehyT62sg==", "dev": true, "dependencies": { "dotenv": "^16.3.1", - "magicast": "^0.2.11", + "magicast": "^0.3.0", "syntax-error": "^1.4.0" }, "engines": { @@ -149,9 +168,9 @@ } }, "node_modules/@athenna/ioc": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@athenna/ioc/-/ioc-4.7.0.tgz", - "integrity": "sha512-TTyNLjtNPk+P5DHmKT/IuMiNFdXKI7yMsiJyA6DSlLTZSSt8tPzbSPQYY0EvfQX19EFihiaSXX5/I+De8MUnpQ==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@athenna/ioc/-/ioc-4.9.0.tgz", + "integrity": "sha512-oJPWF6u0INBwuW4rAEVN5hHXIgKCA6ywvTnuWhRJnUPDU1T+4yWAxbENesydbhJpiP7ID9JSoEDA/NV9+V5wOg==", "dev": true, "dependencies": { "awilix": "^7.0.3" @@ -161,29 +180,29 @@ } }, "node_modules/@athenna/logger": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@athenna/logger/-/logger-4.8.0.tgz", - "integrity": "sha512-V88sEF8D/pwCmuh2zDZu+BhgL/M4e0MQrmxUvefa82//pytFuDYpNowqKFdUjPEL1zcuocskEeE0nnquOW3rIw==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@athenna/logger/-/logger-4.9.0.tgz", + "integrity": "sha512-RBGCZ64IH2Zw0tnmjjxOmLARHkF0WmUWSQL8TZjXZEXOM501uEPUqoW1ntRBxEOlQH1eYvPYTpZDpsblMf58gg==", "dev": true, "dependencies": { "cls-rtracer": "^2.6.3", - "telegraf": "^4.13.1" + "telegraf": "^4.15.0" }, "engines": { "node": ">=20.0.0" } }, "node_modules/@athenna/test": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.12.0.tgz", - "integrity": "sha512-rBEOCVXomQtVR9568L7icSQHOE+PmkVbsDjb4Ac0icICR/Nji0O4l9O7DfizSpaAttH4bB9SLhVaFBsrBQNjAw==", + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.14.0.tgz", + "integrity": "sha512-Gha600d82tROu3MNUmqHZKX913cInOc1VONiq2Z6G1ZwoWgGv32bFdTyNLsqgwPNWeWrjTN6AWI8XD/6cxkShA==", "dev": true, "dependencies": { "@japa/assert": "^1.4.1", "@japa/run-failed-tests": "^1.1.0", "@japa/runner": "^2.2.2", "@japa/spec-reporter": "^1.3.3", - "@types/sinon": "^10.0.16", + "@types/sinon": "^10.0.20", "c8": "^8.0.1", "sinon": "^15.1.0" }, @@ -207,9 +226,9 @@ } }, "node_modules/@athenna/view": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@athenna/view/-/view-4.6.0.tgz", - "integrity": "sha512-K/IJNB7blaNCqvHCjFwzMgd+m6Gh1Qt1mBkUKi0KIgNFY1GHZ/GqD+/8n11RSfwReEpP0Loj42uynN+icw/ELA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@athenna/view/-/view-4.7.0.tgz", + "integrity": "sha512-gtnseNKlJyVjj2IeQ4f2kfua2gonbw9hogQL5vE4mQssBrn/meeiFFclx4RLI1RosQ3RPQfWJEnQoNF56wu4Bg==", "dev": true, "dependencies": { "edge.js": "^5.5.1" @@ -288,9 +307,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -376,9 +395,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz", + "integrity": "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -388,12 +407,12 @@ } }, "node_modules/@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.5.tgz", + "integrity": "sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-string-parser": "^7.23.4", "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, @@ -782,9 +801,9 @@ "dev": true }, "node_modules/@fastify/error": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@fastify/error/-/error-3.4.0.tgz", - "integrity": "sha512-e/mafFwbK3MNqxUcFBLgHhgxsF8UT1m8aj0dAlqEa2nJEgPsRtpHTZ3ObgrgkZ2M1eJHPTwgyUl/tXkvabsZdQ==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@fastify/error/-/error-3.4.1.tgz", + "integrity": "sha512-wWSvph+29GR783IhmvdwWnN4bUxTD01Vm5Xad4i7i1VuAOItLvbPAb69sb0IQ2N57yprvhNIwAP5B6xfKTmjmQ==", "dev": true }, "node_modules/@fastify/fast-json-stringify-compiler": { @@ -1554,18 +1573,18 @@ "dev": true }, "node_modules/@types/sinon": { - "version": "10.0.18", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.18.tgz", - "integrity": "sha512-OpQC9ug8BcnNxue2WF5aTruMaDRFn6NyfaE4DmAKOlQMn54b7CnCvDFV3wj5fk/HbSSTYmOYs2bTb5ShANjyQg==", + "version": "10.0.20", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.20.tgz", + "integrity": "sha512-2APKKruFNCAZgx3daAyACGzWuJ028VVCUDk6o2rw/Z4PXT0ogwdV4KUegW0MwVs0Zu59auPXbbuBJHF12Sx1Eg==", "dev": true, "dependencies": { "@types/sinonjs__fake-timers": "*" } }, "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.3.tgz", - "integrity": "sha512-4g+2YyWe0Ve+LBh+WUm1697PD0Kdi6coG1eU0YjQbwx61AZ8XbEpL1zIT6WjuUKrCMCROpEaYQPDjBnDouBVAQ==", + "version": "8.1.5", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz", + "integrity": "sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==", "dev": true }, "node_modules/@types/yargs": { @@ -2242,19 +2261,6 @@ "printable-characters": "^1.0.42" } }, - "node_modules/assert": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz", - "integrity": "sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "is-nan": "^1.3.2", - "object-is": "^1.1.5", - "object.assign": "^4.1.4", - "util": "^0.12.5" - } - }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -2264,18 +2270,6 @@ "node": "*" } }, - "node_modules/ast-types": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.16.1.tgz", - "integrity": "sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==", - "dev": true, - "dependencies": { - "tslib": "^2.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -4936,9 +4930,9 @@ "dev": true }, "node_modules/fast-json-stringify": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-5.8.0.tgz", - "integrity": "sha512-VVwK8CFMSALIvt14U8AvrSzQAwN/0vaVRiFFUVlpnXSnDGrSkOAO5MtzyN8oQNjLd5AqTW5OZRgyjoNuAuR3jQ==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-5.9.1.tgz", + "integrity": "sha512-NMrf+uU9UJnTzfxaumMDXK1NWqtPCfGoM9DYIE+ESlaTQqjlANFBy0VAbsm6FB88Mx0nceyi18zTo5kIEUlzxg==", "dev": true, "dependencies": { "@fastify/deepmerge": "^1.0.0", @@ -4946,6 +4940,7 @@ "ajv-formats": "^2.1.1", "fast-deep-equal": "^3.1.3", "fast-uri": "^2.1.0", + "json-schema-ref-resolver": "^1.0.1", "rfdc": "^1.2.0" } }, @@ -4996,33 +4991,33 @@ } }, "node_modules/fast-uri": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-2.2.0.tgz", - "integrity": "sha512-cIusKBIt/R/oI6z/1nyfe2FvGKVTohVRfvkOhvx0nCEW+xf5NoCXjAHcWp93uOUBchzYcsvPlrapAdX1uW+YGg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-2.3.0.tgz", + "integrity": "sha512-eel5UKGn369gGEWOqBShmFJWfq/xSJvsgDzgLYC845GneayWvXBf0lJCBn5qTABfewy1ZDPoaR5OZCP+kssfuw==", "dev": true }, "node_modules/fastify": { - "version": "4.23.2", - "resolved": "https://registry.npmjs.org/fastify/-/fastify-4.23.2.tgz", - "integrity": "sha512-WFSxsHES115svC7NrerNqZwwM0UOxbC/P6toT9LRHgAAFvG7o2AN5W+H4ihCtOGuYXjZf4z+2jXC89rVEoPWOA==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/fastify/-/fastify-4.24.3.tgz", + "integrity": "sha512-6HHJ+R2x2LS3y1PqxnwEIjOTZxFl+8h4kSC/TuDPXtA+v2JnV9yEtOsNSKK1RMD7sIR2y1ZsA4BEFaid/cK5pg==", "dev": true, "dependencies": { "@fastify/ajv-compiler": "^3.5.0", - "@fastify/error": "^3.2.0", + "@fastify/error": "^3.4.0", "@fastify/fast-json-stringify-compiler": "^4.3.0", "abstract-logging": "^2.0.1", "avvio": "^8.2.1", - "fast-content-type-parse": "^1.0.0", - "fast-json-stringify": "^5.7.0", - "find-my-way": "^7.6.0", - "light-my-request": "^5.9.1", - "pino": "^8.12.0", + "fast-content-type-parse": "^1.1.0", + "fast-json-stringify": "^5.8.0", + "find-my-way": "^7.7.0", + "light-my-request": "^5.11.0", + "pino": "^8.16.0", "process-warning": "^2.2.0", "proxy-addr": "^2.0.7", "rfdc": "^1.3.0", - "secure-json-parse": "^2.5.0", - "semver": "^7.5.0", - "toad-cache": "^3.2.0" + "secure-json-parse": "^2.7.0", + "semver": "^7.5.4", + "toad-cache": "^3.3.0" } }, "node_modules/fastify-plugin": { @@ -5119,9 +5114,9 @@ } }, "node_modules/find-my-way": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-7.6.2.tgz", - "integrity": "sha512-0OjHn1b1nCX3eVbm9ByeEHiscPYiHLfhei1wOUU9qffQkk98wE0Lo8VrVYfSGMgnSnDh86DxedduAnBf4nwUEw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-7.7.0.tgz", + "integrity": "sha512-+SrHpvQ52Q6W9f3wJoJBbAQULJuNEEQwBvlvYwACDhBTLOTMiQ0HYWh4+vC3OivGP2ENcTI1oKlFA2OepJNjhQ==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.3", @@ -6435,22 +6430,6 @@ "node": ">= 0.10" } }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", @@ -6588,21 +6567,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -6659,22 +6623,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-nan": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", - "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -7219,6 +7167,15 @@ "node": ">=6.0.0" } }, + "node_modules/json-schema-ref-resolver": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-schema-ref-resolver/-/json-schema-ref-resolver-1.0.1.tgz", + "integrity": "sha512-EJAj1pgHc1hxF6vo2Z3s69fMjO1INq6eGHXZ8Z6wCQeldCuwxGK9Sxf4/cScGn3FZubCVUehfWtcDM/PLteCQw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3" + } + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -7964,14 +7921,14 @@ "dev": true }, "node_modules/magicast": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.2.11.tgz", - "integrity": "sha512-6saXbRDA1HMkqbsvHOU6HBjCVgZT460qheRkLhJQHWAbhXoWESI3Kn/dGGXyKs15FFKR85jsUqFx2sMK0wy/5g==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.2.tgz", + "integrity": "sha512-Fjwkl6a0syt9TFN0JSYpOybxiMCkYNEeOTnOTNRbjphirLakznZXAqrXgj/7GG3D1dvETONNwrBfinvAbpunDg==", "dev": true, "dependencies": { - "@babel/parser": "^7.22.16", - "@babel/types": "^7.22.17", - "recast": "^0.23.4" + "@babel/parser": "^7.23.3", + "@babel/types": "^7.23.3", + "source-map-js": "^1.0.2" } }, "node_modules/make-dir": { @@ -8326,22 +8283,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -8866,9 +8807,9 @@ } }, "node_modules/pino": { - "version": "8.15.6", - "resolved": "https://registry.npmjs.org/pino/-/pino-8.15.6.tgz", - "integrity": "sha512-GuxHr61R0ZFD1npu58tB3a3FSVjuy21OwN/haw4OuKiZBL63Pg11Y51WWeD52RENS2mjwPZOwt+2OQOSkck6kQ==", + "version": "8.16.2", + "resolved": "https://registry.npmjs.org/pino/-/pino-8.16.2.tgz", + "integrity": "sha512-2advCDGVEvkKu9TTVSa/kWW7Z3htI/sBKEZpqiHk6ive0i/7f5b1rsU8jn0aimxqfnSz5bj/nOYkwhBUn5xxvg==", "dev": true, "dependencies": { "atomic-sleep": "^1.0.0", @@ -8880,7 +8821,7 @@ "quick-format-unescaped": "^4.0.3", "real-require": "^0.2.0", "safe-stable-stringify": "^2.3.1", - "sonic-boom": "^3.1.0", + "sonic-boom": "^3.7.0", "thread-stream": "^2.0.0" }, "bin": { @@ -9103,9 +9044,9 @@ "dev": true }, "node_modules/process-warning": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-2.2.0.tgz", - "integrity": "sha512-/1WZ8+VQjR6avWOgHeEPd7SDQmFQ1B5mC1eRXsCm5TarlNmx/wCsa5GEaxGm05BORRtyG/Ex/3xq3TuRvq57qg==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-2.3.2.tgz", + "integrity": "sha512-n9wh8tvBe5sFmsqlg+XQhaQLumwpqoAUruLwjCopgTmUBjJ/fjtBsJzKleCaIGBOMXYEhp1YfKl4d7rJ5ZKJGA==", "dev": true }, "node_modules/proxy-addr": { @@ -9229,22 +9170,6 @@ "node": ">= 12.13.0" } }, - "node_modules/recast": { - "version": "0.23.4", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.23.4.tgz", - "integrity": "sha512-qtEDqIZGVcSZCHniWwZWbRy79Dc6Wp3kT/UmDA2RJKBPg7+7k51aQBZirHmUGn5uvHf2rg8DkjizrN26k61ATw==", - "dev": true, - "dependencies": { - "assert": "^2.0.0", - "ast-types": "^0.16.1", - "esprima": "~4.0.0", - "source-map": "~0.6.1", - "tslib": "^2.0.1" - }, - "engines": { - "node": ">= 4" - } - }, "node_modules/reflect-metadata": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", @@ -9863,9 +9788,9 @@ } }, "node_modules/sonic-boom": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.6.0.tgz", - "integrity": "sha512-5Rs7m4IO/mW1WHouC6q6PGJsXO6hSAduwB3ltTsKaDU0Bd7sc5QEUK/jF0YL583g3BG7QV0Dg0rQNZrwZhY6Xg==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.7.0.tgz", + "integrity": "sha512-IudtNvSqA/ObjN97tfgNmOKyDOs4dNcg4cUUsHDebqsgb8wGBBwb31LIgShNO8fye0dFI52X1+tFoKKI6Rq1Gg==", "dev": true, "dependencies": { "atomic-sleep": "^1.0.0" @@ -9880,6 +9805,15 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/spdx-correct": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", @@ -10209,12 +10143,12 @@ } }, "node_modules/telegraf": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/telegraf/-/telegraf-4.14.0.tgz", - "integrity": "sha512-Nn2EBsuar/Mf3SD6O9tHmJ0FyJWnwAi4rewkJMmzd/O1xWYKglEuzSnCuHHRY7oD5NJ6WNPsavta5DbED8tG3w==", + "version": "4.15.3", + "resolved": "https://registry.npmjs.org/telegraf/-/telegraf-4.15.3.tgz", + "integrity": "sha512-pm2ZQAisd0YlUvnq6xdymDfoQR++8wTalw0nfw7Tjy0va+V/0HaBLzM8kMNid8pbbt7GHTU29lEyA5CAAr8AqA==", "dev": true, "dependencies": { - "@telegraf/types": "^6.9.0", + "@telegraf/types": "^6.9.1", "abort-controller": "^3.0.0", "debug": "^4.3.4", "mri": "^1.2.0", @@ -10428,9 +10362,9 @@ } }, "node_modules/toad-cache": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/toad-cache/-/toad-cache-3.3.0.tgz", - "integrity": "sha512-3oDzcogWGHZdkwrHyvJVpPjA7oNzY6ENOV3PsWJY9XYPZ6INo94Yd47s5may1U+nleBPwDhrRiTPMIvKaa3MQg==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/toad-cache/-/toad-cache-3.4.1.tgz", + "integrity": "sha512-T0m3MxP3wcqW0LaV3dF1mHBU294sgYSm4FOpa5eEJaYO7PqJZBOjZEQI1y4YaKNnih1FXCEYTWDS9osCoTUefg==", "dev": true, "engines": { "node": ">=12" @@ -10727,19 +10661,6 @@ "punycode": "^2.1.0" } }, - "node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -11086,9 +11007,9 @@ } }, "node_modules/youch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/youch/-/youch-3.3.2.tgz", - "integrity": "sha512-9cwz/z7abtcHOIuH45nzmUFCZbyJA1nLqlirKvyNRx4wDMhqsBaifAJzBej7L4fsVPjFxYq3NK3GAcfvZsydFw==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/youch/-/youch-3.3.3.tgz", + "integrity": "sha512-qSFXUk3UZBLfggAW3dJKg0BMblG5biqSF8M34E06o5CSsZtH92u9Hqmj2RzGiHDi64fhe83+4tENFP2DB6t6ZA==", "dev": true, "dependencies": { "cookie": "^0.5.0", diff --git a/package.json b/package.json index b8d9869..cf8e049 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/artisan", - "version": "4.16.0", + "version": "4.17.0", "description": "The Athenna CLI application. Built on top of commander and inspired in @adonisjs/ace.", "license": "MIT", "author": "João Lenon ", @@ -25,7 +25,7 @@ "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 --enable-source-maps --import=@athenna/tsconfig bin/test.ts", + "test": "npm run --silent lint:fix && node --no-warnings --enable-source-maps --import=@athenna/tsconfig bin/test.ts", "test:debug": "cross-env NODE_DEBUG=athenna:* node --inspect --enable-source-maps --import=@athenna/tsconfig bin/test.ts", "test:coverage": "c8 npm run --silent test" }, diff --git a/src/commands/TemplateCustomizeCommand.ts b/src/commands/TemplateCustomizeCommand.ts index 9ab4549..ba1f942 100644 --- a/src/commands/TemplateCustomizeCommand.ts +++ b/src/commands/TemplateCustomizeCommand.ts @@ -34,10 +34,11 @@ export class TemplateCustomizeCommand extends BaseCommand { } const file = new File(path) + const copyPath = Path.resources(`templates/${file.base}`) - await file.copy(Path.resources(`templates/${file.base}`)) + await file.copy(copyPath) - templates[key] = `./resources/templates/${file.base}` + templates[key] = copyPath.replace(Path.pwd(), '.') }) await this.rc.setTo('templates', templates).save() @@ -51,7 +52,9 @@ export class TemplateCustomizeCommand extends BaseCommand { ) this.logger.success( - 'Template files successfully moved to ({yellow} resources/templates) folder.' + `Template files successfully moved to ({yellow} ${Path.resources( + 'templates' + ).replace(Path.pwd(), '.')}) folder.` ) } } diff --git a/tests/unit/commands/TemplateCustomizeCommandTest.ts b/tests/unit/commands/TemplateCustomizeCommandTest.ts index 2b48cd5..4d86bec 100644 --- a/tests/unit/commands/TemplateCustomizeCommandTest.ts +++ b/tests/unit/commands/TemplateCustomizeCommandTest.ts @@ -22,7 +22,7 @@ export default class TemplateCustomizeCommandTest extends BaseTest { output.assertLogged('[ MOVING TEMPLATES ]') output.assertLogged('Athenna RC updated:') output.assertLogged('"command": "./resources/templates/command.edge"') - output.assertLogged('[ success ] Template files successfully moved to resources/templates folder.') + output.assertLogged('[ success ] Template files successfully moved to ./resources/templates folder.') assert.isTrue(await Folder.exists(Path.resources())) assert.isTrue(await File.exists(Path.resources('templates/command.edge'))) assert.equal(athenna.templates.command, './resources/templates/command.edge') @@ -44,7 +44,7 @@ export default class TemplateCustomizeCommandTest extends BaseTest { output.assertLogged('Athenna RC updated:') output.assertLogged('"command": "./resources/templates/command.edge"') output.assertLogged('"test": "./resources/templates/test.edge"') - output.assertLogged('[ success ] Template files successfully moved to resources/templates folder.') + output.assertLogged('[ success ] Template files successfully moved to ./resources/templates folder.') assert.isTrue(await Folder.exists(Path.resources())) assert.isTrue(await File.exists(Path.resources('templates/test.edge'))) assert.isTrue(await File.exists(Path.resources('templates/command.edge'))) diff --git a/tests/unit/handlers/ConsoleExceptionHandlerTest.ts b/tests/unit/handlers/ConsoleExceptionHandlerTest.ts index 1c0b4ac..835254d 100644 --- a/tests/unit/handlers/ConsoleExceptionHandlerTest.ts +++ b/tests/unit/handlers/ConsoleExceptionHandlerTest.ts @@ -82,15 +82,7 @@ export default class ConsoleExceptionHandlerTest { await new ConsoleExceptionHandler().handle(error) - const exception = error.toAthennaException() - - exception.name = 'Internal error' - exception.code = 'E_INTERNAL_ERROR' - exception.message = 'An internal error has occurred.' - - delete exception.stack - assert.calledWith(this.processExitMock, 1) - assert.calledWith(errorFake, await exception.prettify()) + assert.calledOnce(errorFake) } }