diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index fb26b9b..f0e01b1 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -4,7 +4,9 @@ on: pull_request: branches: - main - + push: + branches: + - main jobs: lint-and-build: runs-on: ubuntu-latest @@ -16,3 +18,4 @@ jobs: - run: npm install - run: npm run lint - run: npm run build + - run: npm run test diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cdd27c9..5c34211 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,8 +2,8 @@ name: Publish on: push: - branches: - - main + tags: + - 'v*' jobs: publish: @@ -15,6 +15,9 @@ jobs: node-version: '20' registry-url: 'https://registry.npmjs.org/' - run: npm i + - run: npm run lint + - run: npm run build + - run: npm run test - run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/README.md b/README.md index ca7333e..96075cf 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ -# terminal +# Terminal -> See more at the [extended docs](https://docs.digital-alchemy.app/05-Terminal/%F0%9F%A7%AD-Terminal-Overview) +- [Extended docs](https://docs.digital-alchemy.app/Terminal) +- [Discord](https://discord.com/invite/mtWHk36upW) diff --git a/package-lock.json b/package-lock.json index 02a4562..5f256c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@digital-alchemy/terminal", - "version": "0.3.1", + "version": "0.3.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@digital-alchemy/terminal", - "version": "0.3.1", + "version": "0.3.2", "license": "MIT", "dependencies": { - "@digital-alchemy/core": "^0.3.6", + "@digital-alchemy/core": "^0.3.8", "chalk": "^5.3.0", "chrono-node": "^2.7.5", "dayjs": "^1.11.10", @@ -20,7 +20,7 @@ "mute-stream": "^1.0.0" }, "devDependencies": { - "@cspell/eslint-plugin": "^8.6.0", + "@cspell/eslint-plugin": "^8.6.1", "@types/figlet": "^1.5.8", "@types/jest": "^29.5.12", "@types/js-yaml": "^4.0.9", @@ -28,8 +28,8 @@ "@types/mute-stream": "^0.0.4", "@types/node": "^20.11.30", "@types/uuid": "^9.0.8", - "@typescript-eslint/eslint-plugin": "7.3.1", - "@typescript-eslint/parser": "7.3.1", + "@typescript-eslint/eslint-plugin": "7.4.0", + "@typescript-eslint/parser": "7.4.0", "eslint": "8.57.0", "eslint-config-prettier": "9.1.0", "eslint-plugin-import": "^2.29.1", @@ -43,11 +43,11 @@ "eslint-plugin-unicorn": "^51.0.1", "jest": "^29.7.0", "jest-environment-node": "^29.7.0", - "npm-check-updates": "^16.14.17", + "npm-check-updates": "^16.14.18", "prettier": "^3.2.5", "ts-jest": "^29.1.2", "tsx": "^4.7.1", - "type-fest": "^4.13.1", + "type-fest": "^4.14.0", "typescript": "^5.4.3" }, "engines": { @@ -718,9 +718,9 @@ } }, "node_modules/@cspell/cspell-bundled-dicts": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-8.6.0.tgz", - "integrity": "sha512-hRVvir4G4276Kz/Cru34AJg1FObIw5MrzezAwHkD3obNMwZkof8aX3MEN6AzWusJSVG2ZxZxZAEnYbgqvGr2Fg==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-8.6.1.tgz", + "integrity": "sha512-s6Av1xIgctYLuUiazKZjQ2WRUXc9dU38BOZXwM/lb7y8grQMEuTjST1c+8MOkZkppx48/sO7GHIF3k9rEzD3fg==", "dev": true, "dependencies": { "@cspell/dict-ada": "^4.0.2", @@ -750,6 +750,7 @@ "@cspell/dict-html": "^4.0.5", "@cspell/dict-html-symbol-entities": "^4.0.0", "@cspell/dict-java": "^5.0.6", + "@cspell/dict-julia": "^1.0.1", "@cspell/dict-k8s": "^1.0.2", "@cspell/dict-latex": "^4.0.0", "@cspell/dict-lorem-ipsum": "^4.0.0", @@ -769,6 +770,7 @@ "@cspell/dict-sql": "^2.1.3", "@cspell/dict-svelte": "^1.0.2", "@cspell/dict-swift": "^2.0.1", + "@cspell/dict-terraform": "^1.0.0", "@cspell/dict-typescript": "^3.1.2", "@cspell/dict-vue": "^3.0.0" }, @@ -777,18 +779,18 @@ } }, "node_modules/@cspell/cspell-pipe": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-8.6.0.tgz", - "integrity": "sha512-gbAZksz38OHaN8s4fOmmgtgQfie1K8dRGlo9z/uxSx5FIELV48GWTbHn9t1TY2yBXBwJ7+4NF2+r624rtlPoHQ==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-8.6.1.tgz", + "integrity": "sha512-guIlGhhOLQwfqevBSgp26b+SX4I1hCH+puAksWAk93bybKkcGtGpcavAQSN9qvamox4zcHnvGutEPF+UcXuceQ==", "dev": true, "engines": { "node": ">=18" } }, "node_modules/@cspell/cspell-resolver": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-8.6.0.tgz", - "integrity": "sha512-ARwO6TWKy8fLHNhC/ls5Wo/AK86E1oLVChwWtHdq7eVyEUIykQaXGLqoRThkIT2jyLfGDrhSvaU+yqcXVLE48Q==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-8.6.1.tgz", + "integrity": "sha512-ZUbYcvEhfokHG9qfUlIylUqEobG84PiDozCkE8U4h/rTSmYkf/nAD+M6yg+jQ0F2aTFGNbvpKKGFlfXFXveX7A==", "dev": true, "dependencies": { "global-directory": "^4.0.1" @@ -798,18 +800,18 @@ } }, "node_modules/@cspell/cspell-service-bus": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-8.6.0.tgz", - "integrity": "sha512-veCGlhlNGmYMgzX/rMiDp8j7ndLxFHIZq3h6DNlIsIoSjP1v5Rk6UcCwEoWYexwKmNXo7c2VooB0GM9LSBcPAQ==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-8.6.1.tgz", + "integrity": "sha512-WpI3fSW8t00UMetfd6tS8f9+xE3+ElIUO/bQ1YKK95TMIRdEUcH+QDxcHM66pJXEm4WiaN3H/MfWk1fIhGlJ8g==", "dev": true, "engines": { "node": ">=18" } }, "node_modules/@cspell/cspell-types": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-8.6.0.tgz", - "integrity": "sha512-+CU/nuFOpswJAA3IS2TcKGskfM/o/4aNG1IMUVaOEQi1Sc5qZQ4Wj1qDIWJArSHFYW1Q4XFa4U8K1jnVHkAhZQ==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-8.6.1.tgz", + "integrity": "sha512-MXa9v6sXbbwyiNno7v7vczNph6AsMNWnpMRCcW3h/siXNQYRuMssdxqT5sQJ8Kurh3M/Wo7DlKX4n74elKL3iQ==", "dev": true, "engines": { "node": ">=18" @@ -983,6 +985,12 @@ "integrity": "sha512-kdE4AHHHrixyZ5p6zyms1SLoYpaJarPxrz8Tveo6gddszBVVwIUZ+JkQE1bWNLK740GWzIXdkznpUfw1hP9nXw==", "dev": true }, + "node_modules/@cspell/dict-julia": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@cspell/dict-julia/-/dict-julia-1.0.1.tgz", + "integrity": "sha512-4JsCLCRhhLMLiaHpmR7zHFjj1qOauzDI5ZzCNQS31TUMfsOo26jAKDfo0jljFAKgw5M2fEG7sKr8IlPpQAYrmQ==", + "dev": true + }, "node_modules/@cspell/dict-k8s": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@cspell/dict-k8s/-/dict-k8s-1.0.2.tgz", @@ -1100,6 +1108,12 @@ "integrity": "sha512-gxrCMUOndOk7xZFmXNtkCEeroZRnS2VbeaIPiymGRHj5H+qfTAzAKxtv7jJbVA3YYvEzWcVE2oKDP4wcbhIERw==", "dev": true }, + "node_modules/@cspell/dict-terraform": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-terraform/-/dict-terraform-1.0.0.tgz", + "integrity": "sha512-Ak+vy4HP/bOgzf06BAMC30+ZvL9mzv21xLM2XtfnBLTDJGdxlk/nK0U6QT8VfFLqJ0ZZSpyOxGsUebWDCTr/zQ==", + "dev": true + }, "node_modules/@cspell/dict-typescript": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@cspell/dict-typescript/-/dict-typescript-3.1.2.tgz", @@ -1113,9 +1127,9 @@ "dev": true }, "node_modules/@cspell/dynamic-import": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-8.6.0.tgz", - "integrity": "sha512-yDJZ/uXCpZcAkXwaWa0JcCZHZFxnF3qtiFiq2WG5cEw8tiJiNdawjSCd8/D35dT3QFNaInMP+H3sOf68dNueew==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-8.6.1.tgz", + "integrity": "sha512-Fjvkcb5umIAcHfw/iiciYWgO2mXVuRZzQAWPSub6UFCxxcJlRz39YPXa+3O/m3lnXCeo8ChoaEN8qnuV4ogk6g==", "dev": true, "dependencies": { "import-meta-resolve": "^4.0.0" @@ -1125,13 +1139,13 @@ } }, "node_modules/@cspell/eslint-plugin": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/@cspell/eslint-plugin/-/eslint-plugin-8.6.0.tgz", - "integrity": "sha512-l32es7hfqx90+HQc07rANbRS1g0sHTee7LsI7mpMqj+G/CKHXfPVeTj1iOJK4NPo/rlpv2CFLS3pr6UvpfJroA==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@cspell/eslint-plugin/-/eslint-plugin-8.6.1.tgz", + "integrity": "sha512-PIY7lyaVFd1CuLpnuCtXD07Qlod1mLGcUy2NI6ghgXku34oyTrbU4NYC5lNNM1tUxNSGwz2NQOdoTWnEOacllw==", "dev": true, "dependencies": { - "@cspell/cspell-types": "8.6.0", - "cspell-lib": "8.6.0", + "@cspell/cspell-types": "8.6.1", + "cspell-lib": "8.6.1", "estree-walker": "^3.0.3", "synckit": "^0.9.0" }, @@ -1156,18 +1170,18 @@ } }, "node_modules/@cspell/strong-weak-map": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-8.6.0.tgz", - "integrity": "sha512-QenBOdIT1zRa0kF3Z1mwObcvmdhxn+rzQDdmkxwSyRB/9KsNnib6XXTUo8P+Z/ZKXOYbP9Wmf4FX+vKd3yVX0Q==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-8.6.1.tgz", + "integrity": "sha512-X6/7cy+GGVJFXsfrZapxVKn5mtehNTr7hTlg0bVj3iFoNYEPW9zq9l6WIcI4psmaU8G4DSrNsBK7pp87W3u16A==", "dev": true, "engines": { "node": ">=18" } }, "node_modules/@digital-alchemy/core": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@digital-alchemy/core/-/core-0.3.6.tgz", - "integrity": "sha512-r9DD4ZDzTh8o43aWE8fGh97jRqLLsUL22hXbAOxQXMtZ+OQarkTKfZrXKLUl4O7VNA3jInaFxgpkOJLFFoJs8g==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@digital-alchemy/core/-/core-0.3.8.tgz", + "integrity": "sha512-8FtrxW8ZCwc1yUjKB+q0bbo5uv5y2UisCrD8aWnKTXVl6ntOmbw8Fr6lbhYc+tYYRZKiQ6Zu1B5+Z/QMB7UePA==", "dependencies": { "chalk": "^5.3.0", "dayjs": "^1.11.10", @@ -3065,6 +3079,12 @@ "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "dev": true }, + "node_modules/@types/semver-utils": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/semver-utils/-/semver-utils-1.1.3.tgz", + "integrity": "sha512-T+YwkslhsM+CeuhYUxyAjWm7mJ5am/K10UX40RuA6k6Lc7eGtq8iY2xOzy7Vq0GOqhl/xZl5l2FwURZMTPTUww==", + "dev": true + }, "node_modules/@types/stack-utils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", @@ -3093,16 +3113,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.3.1.tgz", - "integrity": "sha512-STEDMVQGww5lhCuNXVSQfbfuNII5E08QWkvAw5Qwf+bj2WT+JkG1uc+5/vXA3AOYMDHVOSpL+9rcbEUiHIm2dw==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.4.0.tgz", + "integrity": "sha512-yHMQ/oFaM7HZdVrVm/M2WHaNPgyuJH4WelkSVEWSSsir34kxW2kDJCxlXRhhGWEsMN0WAW/vLpKfKVcm8k+MPw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "7.3.1", - "@typescript-eslint/type-utils": "7.3.1", - "@typescript-eslint/utils": "7.3.1", - "@typescript-eslint/visitor-keys": "7.3.1", + "@typescript-eslint/scope-manager": "7.4.0", + "@typescript-eslint/type-utils": "7.4.0", + "@typescript-eslint/utils": "7.4.0", + "@typescript-eslint/visitor-keys": "7.4.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -3128,15 +3148,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.3.1.tgz", - "integrity": "sha512-Rq49+pq7viTRCH48XAbTA+wdLRrB/3sRq4Lpk0oGDm0VmnjBrAOVXH/Laalmwsv2VpekiEfVFwJYVk6/e8uvQw==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.4.0.tgz", + "integrity": "sha512-ZvKHxHLusweEUVwrGRXXUVzFgnWhigo4JurEj0dGF1tbcGh6buL+ejDdjxOQxv6ytcY1uhun1p2sm8iWStlgLQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.3.1", - "@typescript-eslint/types": "7.3.1", - "@typescript-eslint/typescript-estree": "7.3.1", - "@typescript-eslint/visitor-keys": "7.3.1", + "@typescript-eslint/scope-manager": "7.4.0", + "@typescript-eslint/types": "7.4.0", + "@typescript-eslint/typescript-estree": "7.4.0", + "@typescript-eslint/visitor-keys": "7.4.0", "debug": "^4.3.4" }, "engines": { @@ -3156,13 +3176,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.3.1.tgz", - "integrity": "sha512-fVS6fPxldsKY2nFvyT7IP78UO1/I2huG+AYu5AMjCT9wtl6JFiDnsv4uad4jQ0GTFzcUV5HShVeN96/17bTBag==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.4.0.tgz", + "integrity": "sha512-68VqENG5HK27ypafqLVs8qO+RkNc7TezCduYrx8YJpXq2QGZ30vmNZGJJJC48+MVn4G2dCV8m5ZTVnzRexTVtw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.3.1", - "@typescript-eslint/visitor-keys": "7.3.1" + "@typescript-eslint/types": "7.4.0", + "@typescript-eslint/visitor-keys": "7.4.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -3173,13 +3193,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.3.1.tgz", - "integrity": "sha512-iFhaysxFsMDQlzJn+vr3OrxN8NmdQkHks4WaqD4QBnt5hsq234wcYdyQ9uquzJJIDAj5W4wQne3yEsYA6OmXGw==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.4.0.tgz", + "integrity": "sha512-247ETeHgr9WTRMqHbbQdzwzhuyaJ8dPTuyuUEMANqzMRB1rj/9qFIuIXK7l0FX9i9FXbHeBQl/4uz6mYuCE7Aw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.3.1", - "@typescript-eslint/utils": "7.3.1", + "@typescript-eslint/typescript-estree": "7.4.0", + "@typescript-eslint/utils": "7.4.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -3200,9 +3220,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.3.1.tgz", - "integrity": "sha512-2tUf3uWggBDl4S4183nivWQ2HqceOZh1U4hhu4p1tPiIJoRRXrab7Y+Y0p+dozYwZVvLPRI6r5wKe9kToF9FIw==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.4.0.tgz", + "integrity": "sha512-mjQopsbffzJskos5B4HmbsadSJQWaRK0UxqQ7GuNA9Ga4bEKeiO6b2DnB6cM6bpc8lemaPseh0H9B/wyg+J7rw==", "dev": true, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -3213,13 +3233,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.3.1.tgz", - "integrity": "sha512-tLpuqM46LVkduWP7JO7yVoWshpJuJzxDOPYIVWUUZbW+4dBpgGeUdl/fQkhuV0A8eGnphYw3pp8d2EnvPOfxmQ==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.4.0.tgz", + "integrity": "sha512-A99j5AYoME/UBQ1ucEbbMEmGkN7SE0BvZFreSnTd1luq7yulcHdyGamZKizU7canpGDWGJ+Q6ZA9SyQobipePg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.3.1", - "@typescript-eslint/visitor-keys": "7.3.1", + "@typescript-eslint/types": "7.4.0", + "@typescript-eslint/visitor-keys": "7.4.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -3241,17 +3261,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.3.1.tgz", - "integrity": "sha512-jIERm/6bYQ9HkynYlNZvXpzmXWZGhMbrOvq3jJzOSOlKXsVjrrolzWBjDW6/TvT5Q3WqaN4EkmcfdQwi9tDjBQ==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.4.0.tgz", + "integrity": "sha512-NQt9QLM4Tt8qrlBVY9lkMYzfYtNz8/6qwZg8pI3cMGlPnj6mOpRxxAm7BMJN9K0AiY+1BwJ5lVC650YJqYOuNg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.3.1", - "@typescript-eslint/types": "7.3.1", - "@typescript-eslint/typescript-estree": "7.3.1", + "@typescript-eslint/scope-manager": "7.4.0", + "@typescript-eslint/types": "7.4.0", + "@typescript-eslint/typescript-estree": "7.4.0", "semver": "^7.5.4" }, "engines": { @@ -3266,12 +3286,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.3.1.tgz", - "integrity": "sha512-9RMXwQF8knsZvfv9tdi+4D/j7dMG28X/wMJ8Jj6eOHyHWwDW4ngQJcqEczSsqIKKjFiLFr40Mnr7a5ulDD3vmw==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.4.0.tgz", + "integrity": "sha512-0zkC7YM0iX5Y41homUUeW1CHtZR01K3ybjM1l6QczoMuay0XKtrb93kv95AxUGwdjGr64nNqnOCwmEl616N8CA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.3.1", + "@typescript-eslint/types": "7.4.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -4621,28 +4641,28 @@ } }, "node_modules/cspell-config-lib": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-8.6.0.tgz", - "integrity": "sha512-Q1rvQFUDJTu4hUtxwL6+q83Hjx/a5grEjMS5axxFJzjJuFRbRsXCagncdSCx/YBqLkNM5noBbRP/0rVh7ufqxw==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-8.6.1.tgz", + "integrity": "sha512-I6LatgXJb8mxKFzIywO81TlUD/qWnUDrhB6yTUPdP90bwZcXMmGoCsZxhd2Rvl9fz5fWne0T839I1coShfm86g==", "dev": true, "dependencies": { - "@cspell/cspell-types": "8.6.0", + "@cspell/cspell-types": "8.6.1", "comment-json": "^4.2.3", - "yaml": "^2.4.0" + "yaml": "^2.4.1" }, "engines": { "node": ">=18" } }, "node_modules/cspell-dictionary": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-8.6.0.tgz", - "integrity": "sha512-ohToeOQznIrb2/z7RfKxX3NID0WiO4sXK3IxKdnbn2viGgdn17tQ8Z2f4Xuy9egjSGRKyr6N25Z5AOes1C8R3w==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-8.6.1.tgz", + "integrity": "sha512-0SfKPi1QoWbGpZ/rWMR7Jn0+GaQT9PAMLWjVOu66PUNUXI5f4oCTHpnZE1Xts+5VX8shZC3TAMHEgtgKuQn4RQ==", "dev": true, "dependencies": { - "@cspell/cspell-pipe": "8.6.0", - "@cspell/cspell-types": "8.6.0", - "cspell-trie-lib": "8.6.0", + "@cspell/cspell-pipe": "8.6.1", + "@cspell/cspell-types": "8.6.1", + "cspell-trie-lib": "8.6.1", "fast-equals": "^5.0.1", "gensequence": "^7.0.0" }, @@ -4651,9 +4671,9 @@ } }, "node_modules/cspell-glob": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-8.6.0.tgz", - "integrity": "sha512-AyuExc34F8JsEYNl4inx1m1v5VoSRA/cTptREq/AoNTcMTyG5s+wt5J+VWBfvJjEDEEpd9Cb2it0j8TMo/Tpjw==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-8.6.1.tgz", + "integrity": "sha512-QjtngIR0XsUQLmHHDO86hps/JR5sRxSBwCvcsNCEmSdpdofLFc8cuxi3o33JWge7UAPBCQOLGfpA7/Wx31srmw==", "dev": true, "dependencies": { "micromatch": "^4.0.5" @@ -4663,13 +4683,13 @@ } }, "node_modules/cspell-grammar": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-8.6.0.tgz", - "integrity": "sha512-wVpZ4pPOqRoOmzLUc34wyOQnBi/6RsV3Y1KiPn8BNSkObb9XSohb1xJJMJ69unEmgE0snQDMHIeUaLTQH414MA==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-8.6.1.tgz", + "integrity": "sha512-MaG0e/F0b2FnIRULCZ61JxEiJgTP/6rsbUoR5nG9X+WmJYItYmxC1F/FPPrVeTu+jJr/8O4pdnslE20pimHaCw==", "dev": true, "dependencies": { - "@cspell/cspell-pipe": "8.6.0", - "@cspell/cspell-types": "8.6.0" + "@cspell/cspell-pipe": "8.6.1", + "@cspell/cspell-types": "8.6.1" }, "bin": { "cspell-grammar": "bin.mjs" @@ -4679,38 +4699,38 @@ } }, "node_modules/cspell-io": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-8.6.0.tgz", - "integrity": "sha512-jx7ccRpcshqxN6xnOiGnX4VycaqTpmatRjHITn4vLoDmQNfxQeU69YT62bhyjogCBuJsZS9ksjo7GQIsrYBekA==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-8.6.1.tgz", + "integrity": "sha512-ofxBB8QtUPvh/bOwKLYsqU1hwQCet8E98jkn/5f4jtG+/x5Zd80I0Ez+tlbjiBmrrQfOKh+i8ipfzHD8JtoreQ==", "dev": true, "dependencies": { - "@cspell/cspell-service-bus": "8.6.0" + "@cspell/cspell-service-bus": "8.6.1" }, "engines": { "node": ">=18" } }, "node_modules/cspell-lib": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-8.6.0.tgz", - "integrity": "sha512-l1bBxBz8noPOxEIIu1Ahvd4e/j6Re1PNDD9FwZgaRmvMyIPZbupTxzCM0MZWvYz1VymBmrrVEKRwtZ34VocaCw==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-8.6.1.tgz", + "integrity": "sha512-kGeDUypRtThFT81IdUK7yU8eUwO5MYWj8pGQ0N8WFsqbCahJrUdcocceVSpnCX48W3CXu12DkqYG9kv5Umn7Xw==", "dev": true, "dependencies": { - "@cspell/cspell-bundled-dicts": "8.6.0", - "@cspell/cspell-pipe": "8.6.0", - "@cspell/cspell-resolver": "8.6.0", - "@cspell/cspell-types": "8.6.0", - "@cspell/dynamic-import": "8.6.0", - "@cspell/strong-weak-map": "8.6.0", + "@cspell/cspell-bundled-dicts": "8.6.1", + "@cspell/cspell-pipe": "8.6.1", + "@cspell/cspell-resolver": "8.6.1", + "@cspell/cspell-types": "8.6.1", + "@cspell/dynamic-import": "8.6.1", + "@cspell/strong-weak-map": "8.6.1", "clear-module": "^4.1.2", "comment-json": "^4.2.3", "configstore": "^6.0.0", - "cspell-config-lib": "8.6.0", - "cspell-dictionary": "8.6.0", - "cspell-glob": "8.6.0", - "cspell-grammar": "8.6.0", - "cspell-io": "8.6.0", - "cspell-trie-lib": "8.6.0", + "cspell-config-lib": "8.6.1", + "cspell-dictionary": "8.6.1", + "cspell-glob": "8.6.1", + "cspell-grammar": "8.6.1", + "cspell-io": "8.6.1", + "cspell-trie-lib": "8.6.1", "fast-equals": "^5.0.1", "gensequence": "^7.0.0", "import-fresh": "^3.3.0", @@ -4723,13 +4743,13 @@ } }, "node_modules/cspell-trie-lib": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-8.6.0.tgz", - "integrity": "sha512-S8nGCnEJBL1maiKPd3FhI54QG+OgtOkcJ/yUDXGXGrokSruWFdNocioPirlFAHf959ax1GBUVEYNIgnu/EIWNg==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-8.6.1.tgz", + "integrity": "sha512-iuJuAyWoqTH/TpFAR/ISJGQQoW3oiw54GyvXIucPoCJt/jgQONDuzqPW+skiLvcgcTbXCN9dutZTb2gImIkmpw==", "dev": true, "dependencies": { - "@cspell/cspell-pipe": "8.6.0", - "@cspell/cspell-types": "8.6.0", + "@cspell/cspell-pipe": "8.6.1", + "@cspell/cspell-types": "8.6.1", "gensequence": "^7.0.0" }, "engines": { @@ -9619,11 +9639,12 @@ } }, "node_modules/npm-check-updates": { - "version": "16.14.17", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.14.17.tgz", - "integrity": "sha512-ElnDdXKe60f8S6RhzFeaGuH2TFJmt2cU2HjLdowldabdm27nWFCxV2ebeP3xGbQkzp2+RPDQNdW9HqU1lcY8ag==", + "version": "16.14.18", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.14.18.tgz", + "integrity": "sha512-9iaRe9ohx9ykdbLjPRIYcq1A0RkrPYUx9HmQK1JIXhfxtJCNE/+497H9Z4PGH6GWRALbz5KF+1iZoySK2uSEpQ==", "dev": true, "dependencies": { + "@types/semver-utils": "^1.1.1", "chalk": "^5.3.0", "cli-table3": "^0.6.3", "commander": "^10.0.1", @@ -11936,9 +11957,9 @@ } }, "node_modules/type-fest": { - "version": "4.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.13.1.tgz", - "integrity": "sha512-ASMgM+Vf2cLwDMt1KXSkMUDSYCxtckDJs8zsaVF/mYteIsiARKCVtyXtcK38mIKbLTctZP8v6GMqdNaeI3fo7g==", + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.14.0.tgz", + "integrity": "sha512-on5/Cw89wwqGZQu+yWO0gGMGu8VNxsaW9SB2HE8yJjllEk7IDTwnSN1dUVldYILhYPN5HzD7WAaw2cc/jBfn0Q==", "dev": true, "engines": { "node": ">=16" @@ -12532,9 +12553,9 @@ "devOptional": true }, "node_modules/yaml": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.0.tgz", - "integrity": "sha512-j9iR8g+/t0lArF4V6NE/QCfT+CO7iLqrXAHZbJdo+LfjqP1vR8Fg5bSiaq6Q2lOD1AUEVrEVIgABvBFYojJVYQ==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", + "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==", "dev": true, "bin": { "yaml": "bin.mjs" diff --git a/package.json b/package.json index e7104c6..4cc73b7 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,10 @@ "name": "@digital-alchemy/terminal", "repository": "https://github.com/Digital-Alchemy-TS/terminal", "homepage": "https://docs.digital-alchemy.app/Terminal", - "version": "0.3.2", + "version": "0.3.3", "scripts": { "build": "tsc", + "test": "./scripts/test.sh", "lint": "eslint src", "prepublishOnly": "npm run build", "upgrade": "ncu -u; npm i" @@ -24,7 +25,7 @@ }, "license": "MIT", "dependencies": { - "@digital-alchemy/core": "^0.3.6", + "@digital-alchemy/core": "^0.3.8", "chalk": "^5.3.0", "chrono-node": "^2.7.5", "dayjs": "^1.11.10", @@ -35,7 +36,7 @@ "mute-stream": "^1.0.0" }, "devDependencies": { - "@cspell/eslint-plugin": "^8.6.0", + "@cspell/eslint-plugin": "^8.6.1", "@types/figlet": "^1.5.8", "@types/jest": "^29.5.12", "@types/js-yaml": "^4.0.9", @@ -43,8 +44,8 @@ "@types/mute-stream": "^0.0.4", "@types/node": "^20.11.30", "@types/uuid": "^9.0.8", - "@typescript-eslint/eslint-plugin": "7.3.1", - "@typescript-eslint/parser": "7.3.1", + "@typescript-eslint/eslint-plugin": "7.4.0", + "@typescript-eslint/parser": "7.4.0", "eslint": "8.57.0", "eslint-config-prettier": "9.1.0", "eslint-plugin-import": "^2.29.1", @@ -58,11 +59,11 @@ "eslint-plugin-unicorn": "^51.0.1", "jest": "^29.7.0", "jest-environment-node": "^29.7.0", - "npm-check-updates": "^16.14.17", + "npm-check-updates": "^16.14.18", "prettier": "^3.2.5", "ts-jest": "^29.1.2", "tsx": "^4.7.1", - "type-fest": "^4.13.1", + "type-fest": "^4.14.0", "typescript": "^5.4.3" } } diff --git a/scripts/test.sh b/scripts/test.sh new file mode 100755 index 0000000..ce574a7 --- /dev/null +++ b/scripts/test.sh @@ -0,0 +1,2 @@ +#!/bin/bash +NODE_OPTIONS="$NODE_OPTIONS --experimental-vm-modules" npx jest --pass-with-no-tests "$1" diff --git a/src/terminal.module.ts b/src/terminal.module.ts index 71851d1..ff7137d 100644 --- a/src/terminal.module.ts +++ b/src/terminal.module.ts @@ -41,6 +41,8 @@ export const LIB_TERMINAL = CreateLibrary({ }, DEFAULT_ACKNOWLEDGE_MESSAGE: { default: "Any key to continue", + description: + "Text for acknowledge component to display if nothing is provided", type: "string", }, DEFAULT_PROMPT_WIDTH: { @@ -55,10 +57,12 @@ export const LIB_TERMINAL = CreateLibrary({ }, HEADER_COLOR_PRIMARY: { default: "cyan", + description: "Color for the big header", type: "string", }, HEADER_COLOR_SECONDARY: { default: "magenta", + description: "Color for the smaller lower header", type: "string", }, HEADER_FONT_PRIMARY: { @@ -79,47 +83,58 @@ export const LIB_TERMINAL = CreateLibrary({ }, HELP_DIVIDER: { default: "blue.dim", + description: "Color for the blue horizontal divider for the help", type: "string", }, KEYMAP_TICK: { default: `{blue.dim > }`, - // default: `{blue.dim ${FontAwesomeIcons.caret_right} }`, + description: "Text to display in front of individual items in the keymap", type: "string", }, MENU_COLUMN_DIVIDER: { default: "{blue.dim |}", + description: "Left/right divider for menus", type: "string", }, MENU_ENTRY_NORMAL: { default: "white", + description: + "Color for menu entries, same column as cursor, not selected", type: "string", }, MENU_ENTRY_OTHER: { default: "gray", + description: "Color for menu entries, other column from cursor", type: "string", }, MENU_ENTRY_SELECTED: { default: "bgBlueBright.black", + description: "Color for menu entries, selected item", type: "string", }, MENU_ENTRY_TYPE: { default: "magenta.bold", + description: "Color for menu entry category types on the selected side", type: "string", }, MENU_ENTRY_TYPE_OTHER: { default: "gray.bold", + description: "Color for menu entry category types on the other side", type: "string", }, MENU_SEARCHBOX_CONTENT: { default: "bgCyan", + description: "Background color for search boxes when there is content", type: "string", }, MENU_SEARCHBOX_EMPTY: { default: "bgBlue", + description: "Background color for search boxes when there is no content", type: "string", }, MENU_SEARCHBOX_NORMAL: { default: "bgMagenta", + description: "Alternate color for menus search box colors", type: "string", }, PAGE_SIZE: { @@ -129,15 +144,17 @@ export const LIB_TERMINAL = CreateLibrary({ }, PROMPT_QUESTION: { default: `{blue ?}`, - // default: `{blue ${FontAwesomeIcons.question}}`, + description: "Text to add in front of prompt messages", type: "string", }, STRING_EDITOR_CONTENT: { default: "bgWhite", + description: "Color for string inputs when there is content", type: "string", }, STRING_EDITOR_EMPTY: { default: "bgBlue", + description: "Color for string inputs when there is no content", type: "string", }, TABLE_RENDER_ROWS: {