From bdac914d90ef7d4340064c0cb914b1246f1347d4 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Thu, 1 Sep 2022 09:13:46 +1000 Subject: [PATCH 01/54] chore: update web and api to latest development commits --- doubtfire-api | 2 +- doubtfire-web | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doubtfire-api b/doubtfire-api index 8aae38453..508a05644 160000 --- a/doubtfire-api +++ b/doubtfire-api @@ -1 +1 @@ -Subproject commit 8aae3845369cbf4567164fa6634e883663c449fa +Subproject commit 508a05644c887b9374a848cabe57e2a3b213c3d1 diff --git a/doubtfire-web b/doubtfire-web index 4eab6935b..2b8ac8ad7 160000 --- a/doubtfire-web +++ b/doubtfire-web @@ -1 +1 @@ -Subproject commit 4eab6935b08b6d1e6c9868a6472e4ac5276bbe45 +Subproject commit 2b8ac8ad7fd2d3de27d02b494ea98d19730e1037 From 67c3715cdb56913b7bd8ace50204b0bf2aceebf5 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Thu, 1 Sep 2022 13:48:43 +1000 Subject: [PATCH 02/54] chore: update submodules to latest versions --- doubtfire-api | 2 +- doubtfire-overseer | 2 +- doubtfire-web | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doubtfire-api b/doubtfire-api index 508a05644..366a021b3 160000 --- a/doubtfire-api +++ b/doubtfire-api @@ -1 +1 @@ -Subproject commit 508a05644c887b9374a848cabe57e2a3b213c3d1 +Subproject commit 366a021b3fbe1f655a4331606f95dcb6c046a612 diff --git a/doubtfire-overseer b/doubtfire-overseer index ca3496c06..018cb3a7f 160000 --- a/doubtfire-overseer +++ b/doubtfire-overseer @@ -1 +1 @@ -Subproject commit ca3496c064894c9f1618ae96dde35ecf11baf718 +Subproject commit 018cb3a7f517ed9589791152646e85579b69818d diff --git a/doubtfire-web b/doubtfire-web index 2b8ac8ad7..149f30558 160000 --- a/doubtfire-web +++ b/doubtfire-web @@ -1 +1 @@ -Subproject commit 2b8ac8ad7fd2d3de27d02b494ea98d19730e1037 +Subproject commit 149f30558efeaccc5b6202cdafe5ae2e78330086 From 1664e2af7e2c3f918a5a9e4a4f05547f75480c6a Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Sat, 10 Sep 2022 11:59:24 +1000 Subject: [PATCH 03/54] chore: update submodules --- doubtfire-api | 2 +- doubtfire-web | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doubtfire-api b/doubtfire-api index 366a021b3..815439d84 160000 --- a/doubtfire-api +++ b/doubtfire-api @@ -1 +1 @@ -Subproject commit 366a021b3fbe1f655a4331606f95dcb6c046a612 +Subproject commit 815439d8410211ad29037494ed3c29ea48f8f593 diff --git a/doubtfire-web b/doubtfire-web index 149f30558..c48ae4dfa 160000 --- a/doubtfire-web +++ b/doubtfire-web @@ -1 +1 @@ -Subproject commit 149f30558efeaccc5b6202cdafe5ae2e78330086 +Subproject commit c48ae4dfa3d6389b9c1512f3410ea120798e63a4 From c4ea8fcea6400af5bb209432eb58298ce5ced66f Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Wed, 7 Dec 2022 12:39:18 +1100 Subject: [PATCH 04/54] build: add build folders to compose Provide the option to build containers via `docker compose build` for cases where the configuraiton is being changed. --- development/docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/development/docker-compose.yml b/development/docker-compose.yml index 77d2704bd..07d895d07 100644 --- a/development/docker-compose.yml +++ b/development/docker-compose.yml @@ -3,6 +3,7 @@ services: doubtfire-api: container_name: doubtfire-api image: lmsdoubtfire/doubtfire-api:development-dev + build: ../doubtfire-api ports: - "3000:3000" volumes: @@ -73,6 +74,7 @@ services: doubtfire-web: container_name: doubtfire-web image: lmsdoubtfire/doubtfire-web:development-dev + build: ../doubtfire-web command: /bin/bash -c 'npm install; npm start' ports: - "4200:4200" From 33b40f2845a3590ae94569a5971bce00eec6b387 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Thu, 8 Dec 2022 12:35:04 +1100 Subject: [PATCH 05/54] build: version dev container builds Ensure that dev containers can be versioned. Provide instructions on the process. --- base/base-development-dockerfiles.md | 12 ------ base/build.sh | 41 -------------------- base/publish.sh | 39 ------------------- development/build.sh | 53 ++++++++++++++++++++++++++ development/development-dockerfiles.md | 41 ++++++++++++++++++++ development/docker-compose.full.yml | 28 +++++++------- development/docker-compose.yml | 26 ++++++------- development/publish.sh | 48 +++++++++++++++++++++++ development/version.sh | 8 ++++ 9 files changed, 178 insertions(+), 118 deletions(-) delete mode 100644 base/base-development-dockerfiles.md delete mode 100755 base/build.sh delete mode 100755 base/publish.sh create mode 100755 development/build.sh create mode 100644 development/development-dockerfiles.md create mode 100755 development/publish.sh create mode 100644 development/version.sh diff --git a/base/base-development-dockerfiles.md b/base/base-development-dockerfiles.md deleted file mode 100644 index 21a384d1c..000000000 --- a/base/base-development-dockerfiles.md +++ /dev/null @@ -1,12 +0,0 @@ -# Base development docker images - -This folder contains dockerfiles used to create and deploy images to docker hub for the development containers. - -1. `./build.sh` - - - this will create doubtfire-api:VERSION-dev and doubtfire-web:VERSION-dev images where VERSION is based on the branch name - - test locally to ensure things work as you expect - -2. `./publish.sh` - - - things should now be available for others to use diff --git a/base/build.sh b/base/build.sh deleted file mode 100755 index 3f966f5fc..000000000 --- a/base/build.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -CURRENT_BRANCH=$(git branch --show-current) - -echo "You are on branch: ${CURRENT_BRANCH}" -echo -echo "This will produce docker images with the following names" -echo " - lmsdoubtfire/doubtfire-api:${CURRENT_BRANCH}-dev" -echo " - lmsdoubtfire/doubtfire-web:${CURRENT_BRANCH}-dev" -# echo " - lmsdoubtfire/doubtfire-overseer:${CURRENT_BRANCH}-dev" -echo - -read -p "Enter to continue..." - -function build_image { - NAME=$1 - - echo "Setting up build for $NAME" - echo - - cd ../${NAME} - - docker image rm "${NAME}:${CURRENT_BRANCH}-dev" - docker image rm "lmsdoubtfire/${NAME}:${CURRENT_BRANCH}-dev" - - docker build -t "${NAME}:${CURRENT_BRANCH}-dev" . - if [ $? -ne 0 ]; then - echo "Ensure that everything builds"; - exit 1 - fi - - docker tag "${NAME}:${CURRENT_BRANCH}-dev" "lmsdoubtfire/${NAME}:${CURRENT_BRANCH}-dev" - if [ $? -ne 0 ]; then - echo "Tag failed..."; - exit 1 - fi -} - -build_image "doubtfire-api" -build_image "doubtfire-web" -# build_image "doubtfire-overseer" \ No newline at end of file diff --git a/base/publish.sh b/base/publish.sh deleted file mode 100755 index 4024ca5b8..000000000 --- a/base/publish.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -CURRENT_BRANCH=$(git branch --show-current) - -echo "You are on branch: ${CURRENT_BRANCH}" -echo -echo "This will push the following images to docker hub" -echo " - lmsdoubtfire/doubtfire-api:${CURRENT_BRANCH}-dev" -echo " - lmsdoubtfire/doubtfire-web:${CURRENT_BRANCH}-dev" -echo - -read -p "Enter to continue..." - -echo "Login to docker hub" -echo - -docker login - -docker buildx create --name mybuilder --use - -function push_image { - NAME=$1 - - echo "Setting up build for $NAME" - echo - - cd ../${NAME} - - docker buildx build --platform linux/amd64,linux/arm64 -t "lmsdoubtfire/${NAME}:${CURRENT_BRANCH}-dev" --push . - if [ $? -ne 0 ]; then - echo "Ensure that everything builds"; - exit 1 - fi -} - - -push_image "doubtfire-api" -push_image "doubtfire-web" -# push_image "doubtfire-overseer" diff --git a/development/build.sh b/development/build.sh new file mode 100755 index 000000000..10c1fc13a --- /dev/null +++ b/development/build.sh @@ -0,0 +1,53 @@ +#!/bin/sh +my_dir="$(dirname "$0")" +source "${my_dir}/version.sh" + +CURRENT_BRANCH=$(git branch --show-current) + +echo "This script will create new development container images for Doubtfire" +echo +echo "When there are changes to the configuration or dependencies of a container, the version should be incremented." +echo "Update this in ${my_dir}/version.sh as well as in the docker-compose.yml file in the development folder." +echo +echo "Run publish.sh when you are ready to push the new images to docker hub." +echo +echo "You are on branch: ${CURRENT_BRANCH}" +echo "You are building api version: ${CURRENT_API_VERSION}" +echo "You are building web version: ${CURRENT_WEB_VERSION}" +echo +echo "This will produce docker images with the following names" +echo " - lmsdoubtfire/doubtfire-api:${CURRENT_API_VERSION}-dev" +echo " - lmsdoubtfire/doubtfire-web:${CURRENT_WEB_VERSION}-dev" +# echo " - lmsdoubtfire/doubtfire-overseer:${CURRENT_BRANCH}-dev" +echo + +read -p "Enter to continue..." + +function build_image { + NAME=$1 + VERSION=$2 + + echo "Setting up build for $NAME" + echo + + cd ../${NAME} + + docker image rm "${NAME}:${VERSION}-dev" 2>/dev/null + docker image rm "lmsdoubtfire/${NAME}:${VERSION}-dev" 2>/dev/null + + docker build -t "${NAME}:${VERSION}-dev" . + if [ $? -ne 0 ]; then + echo "Ensure that everything builds"; + exit 1 + fi + + docker tag "${NAME}:${VERSION}-dev" "lmsdoubtfire/${NAME}:${VERSION}-dev" + if [ $? -ne 0 ]; then + echo "Tag failed..."; + exit 1 + fi +} + +build_image "doubtfire-api" "${CURRENT_API_VERSION}" +build_image "doubtfire-web" "${CURRENT_WEB_VERSION}" +# build_image "doubtfire-overseer" \ No newline at end of file diff --git a/development/development-dockerfiles.md b/development/development-dockerfiles.md new file mode 100644 index 000000000..48f4990da --- /dev/null +++ b/development/development-dockerfiles.md @@ -0,0 +1,41 @@ +# Development docker images + +This folder contains docker compose files, and scripts to build the associated container images from the api and web projects. + +## Running in development + +Use docker compose to run the api and web projects in development mode. See details in [CONTRIBUTING.md](../CONTRIBUTING.md) + +## Building new container images + +When you adjust the configuration of the api or web container, you will need to rebuild the container images to ensure the changes are available to yourself and others. + +1. Make changes to the configuration as required. This can include: + + - adding new gems to the api + - changing the Dockerfiles + + - [../doubtfire-api/Dockerfile](../doubtfire-api/Dockerfile) + - [../doubtfire-web/Dockerfile](../doubtfire-web/Dockerfile) + - Make sure to also reflect changes in: + - [../doubtfire-api/deployApi.Dockerfile](../doubtfire-api/deployApi.Dockerfile) + - [../doubtfire-api/deployAppSvr.Dockerfile](../doubtfire-api/deployAppSvr.Dockerfile) + - [../doubtfire-web/Dockerfile.dev](../doubtfire-web/deploy.Dockerfile) + +1. Adjust versions to ensure existing images are not overwritten + + - [`version.sh`](version.sh) contains the version number used to tag images. Update the api or web version number as appropriate. + - Docker compose files uses the tag to indicate which images to use for the web and api containers. Update the tag to match the version number in the following files: + + - [`docker-compose.yml`](docker-compose.yml) + - [`docker-compose.full.yml`](docker-compose.full.yml) + - [`../doubtfire-web/docker-compose.yml`](../doubtfire-web/docker-compose.yml) + +1. Run `./build.sh` and test locally + + - this will create doubtfire-api:VERSION-dev and doubtfire-web:VERSION-dev images where VERSION is specified in `version.sh` + - test locally to ensure things work as you expect + +1. Run `./publish.sh` to publish the images to docker hub + + - things should now be available for others to use diff --git a/development/docker-compose.full.yml b/development/docker-compose.full.yml index c4c3727ad..0b8d3bfc7 100644 --- a/development/docker-compose.full.yml +++ b/development/docker-compose.full.yml @@ -1,8 +1,20 @@ version: '3' services: + dev-db: + container_name: doubtfire-dev-db + image: mariadb + environment: + MYSQL_ROOT_PASSWORD: db-root-password + MYSQL_DATABASE: doubtfire-dev + MYSQL_USER: dfire + MYSQL_PASSWORD: pwd + volumes: + - ../data/database:/var/lib/mysql + doubtfire-api: container_name: doubtfire-api - image: lmsdoubtfire/doubtfire-api:development-dev + image: lmsdoubtfire/doubtfire-api:7.0-dev + build: ../doubtfire-api ports: - "3000:3000" volumes: @@ -15,20 +27,10 @@ services: - api.env - overseer.env - dev-db: - container_name: doubtfire-dev-db - image: mariadb - environment: - MYSQL_ROOT_PASSWORD: db-root-password - MYSQL_DATABASE: doubtfire-dev - MYSQL_USER: dfire - MYSQL_PASSWORD: pwd - volumes: - - ../data/database:/var/lib/mysql - doubtfire-web: container_name: doubtfire-web - image: lmsdoubtfire/doubtfire-web:development-dev + image: lmsdoubtfire/doubtfire-web:7.0-dev + build: ../doubtfire-web command: /bin/bash -c 'npm install; npm start' ports: - "4200:4200" diff --git a/development/docker-compose.yml b/development/docker-compose.yml index 07d895d07..d708b4723 100644 --- a/development/docker-compose.yml +++ b/development/docker-compose.yml @@ -1,8 +1,19 @@ version: '3' services: + dev-db: + container_name: doubtfire-dev-db + image: mariadb + environment: + MYSQL_ROOT_PASSWORD: db-root-password + MYSQL_DATABASE: doubtfire-dev + MYSQL_USER: dfire + MYSQL_PASSWORD: pwd + volumes: + - ../data/database:/var/lib/mysql + doubtfire-api: container_name: doubtfire-api - image: lmsdoubtfire/doubtfire-api:development-dev + image: lmsdoubtfire/doubtfire-api:7.0-dev build: ../doubtfire-api ports: - "3000:3000" @@ -60,20 +71,9 @@ services: # RABBITMQ_USERNAME: secure_credentials # RABBITMQ_PASSWORD: secure_credentials - dev-db: - container_name: doubtfire-dev-db - image: mariadb - environment: - MYSQL_ROOT_PASSWORD: db-root-password - MYSQL_DATABASE: doubtfire-dev - MYSQL_USER: dfire - MYSQL_PASSWORD: pwd - volumes: - - ../data/database:/var/lib/mysql - doubtfire-web: container_name: doubtfire-web - image: lmsdoubtfire/doubtfire-web:development-dev + image: lmsdoubtfire/doubtfire-web:7.0-dev build: ../doubtfire-web command: /bin/bash -c 'npm install; npm start' ports: diff --git a/development/publish.sh b/development/publish.sh new file mode 100755 index 000000000..56cc49ae5 --- /dev/null +++ b/development/publish.sh @@ -0,0 +1,48 @@ +#!/bin/sh +my_dir="$(dirname "$0")" +source "${my_dir}/version.sh" + +CURRENT_BRANCH=$(git branch --show-current) + +echo "This script will push new development container images to docker hub for Doubtfire" +echo +echo "Run build.sh to create these images first." +echo +echo "You are building api version: ${CURRENT_API_VERSION}" +echo "You are building web version: ${CURRENT_WEB_VERSION}" +echo +echo "This will publish docker images with the following names" +echo " - lmsdoubtfire/doubtfire-api:${CURRENT_API_VERSION}-dev" +echo " - lmsdoubtfire/doubtfire-web:${CURRENT_WEB_VERSION}-dev" +# echo " - lmsdoubtfire/doubtfire-overseer:${CURRENT_BRANCH}-dev" +echo + +read -p "Enter to continue..." + +echo "Login to docker hub" +echo + +docker login + +docker buildx create --name mybuilder --use + +function push_image { + NAME=$1 + VERSION=$2 + + echo "Setting up build for $NAME" + echo + + cd ../${NAME} + + docker buildx build --platform linux/amd64,linux/arm64 -t "lmsdoubtfire/${NAME}:${VERSION}-dev" --push . + if [ $? -ne 0 ]; then + echo "Ensure that everything builds"; + exit 1 + fi +} + + +push_image "doubtfire-api" "${CURRENT_API_VERSION}" +push_image "doubtfire-web" "${CURRENT_WEB_VERSION}" +# push_image "doubtfire-overseer" diff --git a/development/version.sh b/development/version.sh new file mode 100644 index 000000000..9e04c7537 --- /dev/null +++ b/development/version.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# The current version is used to create the base name for development containers. +# When the configuration of a container changes, the version should be incremented. +# Breaking changes should increment the major version. +# Non-breaking changes should increment the minor version. +export CURRENT_API_VERSION=7.0 +export CURRENT_WEB_VERSION=7.0 From 81fabdb685aca99068bd6a62314ddc4c1af19c2f Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Thu, 8 Dec 2022 12:54:17 +1100 Subject: [PATCH 06/54] chore: update submodule versions --- doubtfire-api | 2 +- doubtfire-overseer | 2 +- doubtfire-web | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doubtfire-api b/doubtfire-api index 815439d84..644eb5074 160000 --- a/doubtfire-api +++ b/doubtfire-api @@ -1 +1 @@ -Subproject commit 815439d8410211ad29037494ed3c29ea48f8f593 +Subproject commit 644eb50742397d2582c9999df1c3c7ed67ffeb9b diff --git a/doubtfire-overseer b/doubtfire-overseer index 018cb3a7f..49fa51a2c 160000 --- a/doubtfire-overseer +++ b/doubtfire-overseer @@ -1 +1 @@ -Subproject commit 018cb3a7f517ed9589791152646e85579b69818d +Subproject commit 49fa51a2ce52dffcc2265c9e3577378e4fbced42 diff --git a/doubtfire-web b/doubtfire-web index c48ae4dfa..6e776c914 160000 --- a/doubtfire-web +++ b/doubtfire-web @@ -1 +1 @@ -Subproject commit c48ae4dfa3d6389b9c1512f3410ea120798e63a4 +Subproject commit 6e776c91445427e77cc697c09013d926bd847cd9 From c88999d442820ec33aaa6844e46f1e9ccc56eaf2 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Thu, 29 Dec 2022 21:54:10 +0000 Subject: [PATCH 07/54] chore(config): update husky version and git ignore --- .gitignore | 4 +- package-lock.json | 1880 ++++++++++++++++++++++++++++++++++----------- package.json | 9 +- 3 files changed, 1429 insertions(+), 464 deletions(-) diff --git a/.gitignore b/.gitignore index 8d39e68a8..25f4b9fc1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ - +/tmp/ /data/ /node_modules/ @@ -34,4 +34,4 @@ Network Trash Folder Temporary Items .apdisk -# End of https://www.toptal.com/developers/gitignore/api/macos \ No newline at end of file +# End of https://www.toptal.com/developers/gitignore/api/macos diff --git a/package-lock.json b/package-lock.json index f3ff9bc7b..95468626b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,40 +1,51 @@ { - "name": "doubtfire-deploy", + "name": "doubtfire", + "version": "6.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { + "name": "doubtfire", + "version": "6.0.0", "devDependencies": { - "@commitlint/cli": "^12.1.4", - "@commitlint/config-conventional": "^12.1.4", - "husky": "^6.0.0" - }, - "version": "6.0.0" + "@commitlint/cli": "^17.0", + "@commitlint/config-conventional": "^17.0", + "husky": "^8.0.0" + } }, "node_modules/@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", "dev": true, "dependencies": { - "@babel/highlight": "^7.12.13" + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", - "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==", - "dev": true + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, "node_modules/@babel/highlight": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", - "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.14.0", + "@babel/helper-validator-identifier": "^7.18.6", "chalk": "^2.0.0", "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/highlight/node_modules/ansi-styles": { @@ -75,13 +86,13 @@ "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, "engines": { "node": ">=4" @@ -100,232 +111,328 @@ } }, "node_modules/@commitlint/cli": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-12.1.4.tgz", - "integrity": "sha512-ZR1WjXLvqEffYyBPT0XdnSxtt3Ty1TMoujEtseW5o3vPnkA1UNashAMjQVg/oELqfaiAMnDw8SERPMN0e/0kLg==", - "dev": true, - "dependencies": { - "@commitlint/format": "^12.1.4", - "@commitlint/lint": "^12.1.4", - "@commitlint/load": "^12.1.4", - "@commitlint/read": "^12.1.4", - "@commitlint/types": "^12.1.4", - "lodash": "^4.17.19", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-17.3.0.tgz", + "integrity": "sha512-/H0md7TsKflKzVPz226VfXzVafJFO1f9+r2KcFvmBu08V0T56lZU1s8WL7/xlxqLMqBTVaBf7Ixtc4bskdEEZg==", + "dev": true, + "dependencies": { + "@commitlint/format": "^17.0.0", + "@commitlint/lint": "^17.3.0", + "@commitlint/load": "^17.3.0", + "@commitlint/read": "^17.2.0", + "@commitlint/types": "^17.0.0", + "execa": "^5.0.0", + "lodash.isfunction": "^3.0.9", "resolve-from": "5.0.0", "resolve-global": "1.0.0", - "yargs": "^16.2.0" + "yargs": "^17.0.0" }, "bin": { "commitlint": "cli.js" }, "engines": { - "node": ">=v10" + "node": ">=v14" } }, "node_modules/@commitlint/config-conventional": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-12.1.4.tgz", - "integrity": "sha512-ZIdzmdy4o4WyqywMEpprRCrehjCSQrHkaRTVZV411GyLigFQHlEBSJITAihLAWe88Qy/8SyoIe5uKvAsV5vRqQ==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-17.3.0.tgz", + "integrity": "sha512-hgI+fN5xF8nhS9uG/V06xyT0nlcyvHHMkq0kwRSr96vl5BFlRGaL2C0/YY4kQagfU087tmj01bJkG9Ek98Wllw==", "dev": true, "dependencies": { - "conventional-changelog-conventionalcommits": "^4.3.1" + "conventional-changelog-conventionalcommits": "^5.0.0" }, "engines": { - "node": ">=v10" + "node": ">=v14" + } + }, + "node_modules/@commitlint/config-validator": { + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-17.1.0.tgz", + "integrity": "sha512-Q1rRRSU09ngrTgeTXHq6ePJs2KrI+axPTgkNYDWSJIuS1Op4w3J30vUfSXjwn5YEJHklK3fSqWNHmBhmTR7Vdg==", + "dev": true, + "dependencies": { + "@commitlint/types": "^17.0.0", + "ajv": "^8.11.0" + }, + "engines": { + "node": ">=v14" } }, "node_modules/@commitlint/ensure": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-12.1.4.tgz", - "integrity": "sha512-MxHIBuAG9M4xl33qUfIeMSasbv3ktK0W+iygldBxZOL4QSYC2Gn66pZAQMnV9o3V+sVFHoAK2XUKqBAYrgbEqw==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-17.3.0.tgz", + "integrity": "sha512-kWbrQHDoW5veIUQx30gXoLOCjWvwC6OOEofhPCLl5ytRPBDAQObMbxTha1Bt2aSyNE/IrJ0s0xkdZ1Gi3wJwQg==", "dev": true, "dependencies": { - "@commitlint/types": "^12.1.4", - "lodash": "^4.17.19" + "@commitlint/types": "^17.0.0", + "lodash.camelcase": "^4.3.0", + "lodash.kebabcase": "^4.1.1", + "lodash.snakecase": "^4.1.1", + "lodash.startcase": "^4.4.0", + "lodash.upperfirst": "^4.3.1" }, "engines": { - "node": ">=v10" + "node": ">=v14" } }, "node_modules/@commitlint/execute-rule": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-12.1.4.tgz", - "integrity": "sha512-h2S1j8SXyNeABb27q2Ok2vD1WfxJiXvOttKuRA9Or7LN6OQoC/KtT3844CIhhWNteNMu/wE0gkTqGxDVAnJiHg==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-17.0.0.tgz", + "integrity": "sha512-nVjL/w/zuqjCqSJm8UfpNaw66V9WzuJtQvEnCrK4jDw6qKTmZB+1JQ8m6BQVZbNBcwfYdDNKnhIhqI0Rk7lgpQ==", "dev": true, "engines": { - "node": ">=v10" + "node": ">=v14" } }, "node_modules/@commitlint/format": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-12.1.4.tgz", - "integrity": "sha512-h28ucMaoRjVvvgS6Bdf85fa/+ZZ/iu1aeWGCpURnQV7/rrVjkhNSjZwGlCOUd5kDV1EnZ5XdI7L18SUpRjs26g==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-17.0.0.tgz", + "integrity": "sha512-MZzJv7rBp/r6ZQJDEodoZvdRM0vXu1PfQvMTNWFb8jFraxnISMTnPBWMMjr2G/puoMashwaNM//fl7j8gGV5lA==", "dev": true, "dependencies": { - "@commitlint/types": "^12.1.4", - "chalk": "^4.0.0" + "@commitlint/types": "^17.0.0", + "chalk": "^4.1.0" }, "engines": { - "node": ">=v10" + "node": ">=v14" } }, "node_modules/@commitlint/is-ignored": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-12.1.4.tgz", - "integrity": "sha512-uTu2jQU2SKvtIRVLOzMQo3KxDtO+iJ1p0olmncwrqy4AfPLgwoyCP2CiULq5M7xpR3+dE3hBlZXbZTQbD7ycIw==", + "version": "17.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-17.2.0.tgz", + "integrity": "sha512-rgUPUQraHxoMLxiE8GK430HA7/R2vXyLcOT4fQooNrZq9ERutNrP6dw3gdKLkq22Nede3+gEHQYUzL4Wu75ndg==", "dev": true, "dependencies": { - "@commitlint/types": "^12.1.4", - "semver": "7.3.5" + "@commitlint/types": "^17.0.0", + "semver": "7.3.7" }, "engines": { - "node": ">=v10" + "node": ">=v14" } }, "node_modules/@commitlint/lint": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-12.1.4.tgz", - "integrity": "sha512-1kZ8YDp4to47oIPFELUFGLiLumtPNKJigPFDuHt2+f3Q3IKdQ0uk53n3CPl4uoyso/Og/EZvb1mXjFR/Yce4cA==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-17.3.0.tgz", + "integrity": "sha512-VilOTPg0i9A7CCWM49E9bl5jytfTvfTxf9iwbWAWNjxJ/A5mhPKbm3sHuAdwJ87tDk1k4j8vomYfH23iaY+1Rw==", "dev": true, "dependencies": { - "@commitlint/is-ignored": "^12.1.4", - "@commitlint/parse": "^12.1.4", - "@commitlint/rules": "^12.1.4", - "@commitlint/types": "^12.1.4" + "@commitlint/is-ignored": "^17.2.0", + "@commitlint/parse": "^17.2.0", + "@commitlint/rules": "^17.3.0", + "@commitlint/types": "^17.0.0" }, "engines": { - "node": ">=v10" + "node": ">=v14" } }, "node_modules/@commitlint/load": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-12.1.4.tgz", - "integrity": "sha512-Keszi0IOjRzKfxT+qES/n+KZyLrxy79RQz8wWgssCboYjKEp+wC+fLCgbiMCYjI5k31CIzIOq/16J7Ycr0C0EA==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-17.3.0.tgz", + "integrity": "sha512-u/pV6rCAJrCUN+HylBHLzZ4qj1Ew3+eN9GBPhNi9otGxtOfA8b+8nJSxaNbcC23Ins/kcpjGf9zPSVW7628Umw==", "dev": true, "dependencies": { - "@commitlint/execute-rule": "^12.1.4", - "@commitlint/resolve-extends": "^12.1.4", - "@commitlint/types": "^12.1.4", - "chalk": "^4.0.0", + "@commitlint/config-validator": "^17.1.0", + "@commitlint/execute-rule": "^17.0.0", + "@commitlint/resolve-extends": "^17.3.0", + "@commitlint/types": "^17.0.0", + "@types/node": "^14.0.0", + "chalk": "^4.1.0", "cosmiconfig": "^7.0.0", - "lodash": "^4.17.19", - "resolve-from": "^5.0.0" + "cosmiconfig-typescript-loader": "^4.0.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2", + "lodash.uniq": "^4.5.0", + "resolve-from": "^5.0.0", + "ts-node": "^10.8.1", + "typescript": "^4.6.4" }, "engines": { - "node": ">=v10" + "node": ">=v14" } }, "node_modules/@commitlint/message": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-12.1.4.tgz", - "integrity": "sha512-6QhalEKsKQ/Y16/cTk5NH4iByz26fqws2ub+AinHPtM7Io0jy4e3rym9iE+TkEqiqWZlUigZnTwbPvRJeSUBaA==", + "version": "17.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-17.2.0.tgz", + "integrity": "sha512-/4l2KFKxBOuoEn1YAuuNNlAU05Zt7sNsC9H0mPdPm3chOrT4rcX0pOqrQcLtdMrMkJz0gC7b3SF80q2+LtdL9Q==", "dev": true, "engines": { - "node": ">=v10" + "node": ">=v14" } }, "node_modules/@commitlint/parse": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-12.1.4.tgz", - "integrity": "sha512-yqKSAsK2V4X/HaLb/yYdrzs6oD/G48Ilt0EJ2Mp6RJeWYxG14w/Out6JrneWnr/cpzemyN5hExOg6+TB19H/Lw==", + "version": "17.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-17.2.0.tgz", + "integrity": "sha512-vLzLznK9Y21zQ6F9hf8D6kcIJRb2haAK5T/Vt1uW2CbHYOIfNsR/hJs0XnF/J9ctM20Tfsqv4zBitbYvVw7F6Q==", "dev": true, "dependencies": { - "@commitlint/types": "^12.1.4", + "@commitlint/types": "^17.0.0", "conventional-changelog-angular": "^5.0.11", - "conventional-commits-parser": "^3.0.0" + "conventional-commits-parser": "^3.2.2" }, "engines": { - "node": ">=v10" + "node": ">=v14" } }, "node_modules/@commitlint/read": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-12.1.4.tgz", - "integrity": "sha512-TnPQSJgD8Aod5Xeo9W4SaYKRZmIahukjcCWJ2s5zb3ZYSmj6C85YD9cR5vlRyrZjj78ItLUV/X4FMWWVIS38Jg==", + "version": "17.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-17.2.0.tgz", + "integrity": "sha512-bbblBhrHkjxra3ptJNm0abxu7yeAaxumQ8ZtD6GIVqzURCETCP7Dm0tlVvGRDyXBuqX6lIJxh3W7oyKqllDsHQ==", "dev": true, "dependencies": { - "@commitlint/top-level": "^12.1.4", - "@commitlint/types": "^12.1.4", - "fs-extra": "^9.0.0", - "git-raw-commits": "^2.0.0" + "@commitlint/top-level": "^17.0.0", + "@commitlint/types": "^17.0.0", + "fs-extra": "^10.0.0", + "git-raw-commits": "^2.0.0", + "minimist": "^1.2.6" }, "engines": { - "node": ">=v10" + "node": ">=v14" } }, "node_modules/@commitlint/resolve-extends": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-12.1.4.tgz", - "integrity": "sha512-R9CoUtsXLd6KSCfsZly04grsH6JVnWFmVtWgWs1KdDpdV+G3TSs37tColMFqglpkx3dsWu8dsPD56+D9YnJfqg==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-17.3.0.tgz", + "integrity": "sha512-Lf3JufJlc5yVEtJWC8o4IAZaB8FQAUaVlhlAHRACd0TTFizV2Lk2VH70et23KgvbQNf7kQzHs/2B4QZalBv6Cg==", "dev": true, "dependencies": { + "@commitlint/config-validator": "^17.1.0", + "@commitlint/types": "^17.0.0", "import-fresh": "^3.0.0", - "lodash": "^4.17.19", + "lodash.mergewith": "^4.6.2", "resolve-from": "^5.0.0", "resolve-global": "^1.0.0" }, "engines": { - "node": ">=v10" + "node": ">=v14" } }, "node_modules/@commitlint/rules": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-12.1.4.tgz", - "integrity": "sha512-W8m6ZSjg7RuIsIfzQiFHa48X5mcPXeKT9yjBxVmjHvYfS2FDBf1VxCQ7vO0JTVIdV4ohjZ0eKg/wxxUuZHJAZg==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-17.3.0.tgz", + "integrity": "sha512-s2UhDjC5yP2utx3WWqsnZRzjgzAX8BMwr1nltC0u0p8T/nzpkx4TojEfhlsOUj1t7efxzZRjUAV0NxNwdJyk+g==", "dev": true, "dependencies": { - "@commitlint/ensure": "^12.1.4", - "@commitlint/message": "^12.1.4", - "@commitlint/to-lines": "^12.1.4", - "@commitlint/types": "^12.1.4" + "@commitlint/ensure": "^17.3.0", + "@commitlint/message": "^17.2.0", + "@commitlint/to-lines": "^17.0.0", + "@commitlint/types": "^17.0.0", + "execa": "^5.0.0" }, "engines": { - "node": ">=v10" + "node": ">=v14" } }, "node_modules/@commitlint/to-lines": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-12.1.4.tgz", - "integrity": "sha512-TParumvbi8bdx3EdLXz2MaX+e15ZgoCqNUgqHsRLwyqLUTRbqCVkzrfadG1UcMQk8/d5aMbb327ZKG3Q4BRorw==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-17.0.0.tgz", + "integrity": "sha512-nEi4YEz04Rf2upFbpnEorG8iymyH7o9jYIVFBG1QdzebbIFET3ir+8kQvCZuBE5pKCtViE4XBUsRZz139uFrRQ==", "dev": true, "engines": { - "node": ">=v10" + "node": ">=v14" } }, "node_modules/@commitlint/top-level": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-12.1.4.tgz", - "integrity": "sha512-d4lTJrOT/dXlpY+NIt4CUl77ciEzYeNVc0VFgUQ6VA+b1rqYD2/VWFjBlWVOrklxtSDeKyuEhs36RGrppEFAvg==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-17.0.0.tgz", + "integrity": "sha512-dZrEP1PBJvodNWYPOYiLWf6XZergdksKQaT6i1KSROLdjf5Ai0brLOv5/P+CPxBeoj3vBxK4Ax8H1Pg9t7sHIQ==", "dev": true, "dependencies": { "find-up": "^5.0.0" }, "engines": { - "node": ">=v10" + "node": ">=v14" } }, "node_modules/@commitlint/types": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-12.1.4.tgz", - "integrity": "sha512-KRIjdnWNUx6ywz+SJvjmNCbQKcKP6KArhjZhY2l+CWKxak0d77SOjggkMwFTiSgLODOwmuLTbarR2ZfWPiPMlw==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-17.0.0.tgz", + "integrity": "sha512-hBAw6U+SkAT5h47zDMeOu3HSiD0SODw4Aq7rRNh1ceUmL7GyLKYhPbUvlRWqZ65XjBLPHZhFyQlRaPNz8qvUyQ==", "dev": true, "dependencies": { - "chalk": "^4.0.0" + "chalk": "^4.1.0" }, "engines": { - "node": ">=v10" + "node": ">=v14" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "dev": true + }, "node_modules/@types/minimist": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz", - "integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", + "dev": true + }, + "node_modules/@types/node": { + "version": "14.18.36", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.36.tgz", + "integrity": "sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ==", "dev": true }, "node_modules/@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, "node_modules/@types/parse-json": { @@ -334,10 +441,47 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, + "node_modules/acorn": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.2.tgz", + "integrity": "sha512-E4bfmKAhGiSTvMfL1Myyycaub+cUEU2/IvpylXkUu7CHBkBj1f/ikdzbD7YQ6FKUbixDxeYvB/xY4fvyroDlQg==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { "node": ">=8" @@ -358,30 +502,27 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "node_modules/array-ify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", - "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=", + "integrity": "sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==", "dev": true }, "node_modules/arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -418,9 +559,9 @@ } }, "node_modules/chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { "ansi-styles": "^4.1.0", @@ -434,14 +575,17 @@ } }, "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "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.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/color-convert": { @@ -473,9 +617,9 @@ } }, "node_modules/conventional-changelog-angular": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz", - "integrity": "sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw==", + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz", + "integrity": "sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==", "dev": true, "dependencies": { "compare-func": "^2.0.0", @@ -486,9 +630,9 @@ } }, "node_modules/conventional-changelog-conventionalcommits": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.0.tgz", - "integrity": "sha512-sj9tj3z5cnHaSJCYObA9nISf7eq/YjscLPoq6nmew4SiOjxqL2KRpK20fjnjVbpNDjJ2HR3MoVcWKXwbVvzS0A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-5.0.0.tgz", + "integrity": "sha512-lCDbA+ZqVFQGUj7h9QBKoIpLhl8iihkO0nCTyRNzuXtcd7ubODpYB04IFy31JloiJgG0Uovu8ot8oxRzn7Nwtw==", "dev": true, "dependencies": { "compare-func": "^2.0.0", @@ -500,9 +644,9 @@ } }, "node_modules/conventional-commits-parser": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.1.tgz", - "integrity": "sha512-OG9kQtmMZBJD/32NEw5IhN5+HnBqVjy03eC+I71I0oQRFA5rOgA4OtPOYG7mz1GkCfCNxn3gKIX8EiHJYuf1cA==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz", + "integrity": "sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==", "dev": true, "dependencies": { "is-text-path": "^1.0.1", @@ -510,8 +654,7 @@ "lodash": "^4.17.15", "meow": "^8.0.0", "split2": "^3.0.0", - "through2": "^4.0.0", - "trim-off-newlines": "^1.0.0" + "through2": "^4.0.0" }, "bin": { "conventional-commits-parser": "cli.js" @@ -521,9 +664,9 @@ } }, "node_modules/cosmiconfig": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", - "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", + "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", "dev": true, "dependencies": { "@types/parse-json": "^4.0.0", @@ -536,6 +679,42 @@ "node": ">=10" } }, + "node_modules/cosmiconfig-typescript-loader": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.3.0.tgz", + "integrity": "sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q==", + "dev": true, + "engines": { + "node": ">=12", + "npm": ">=6" + }, + "peerDependencies": { + "@types/node": "*", + "cosmiconfig": ">=7", + "ts-node": ">=10", + "typescript": ">=3" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/dargs": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", @@ -548,16 +727,16 @@ "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", "dev": true, "dependencies": { "decamelize": "^1.1.0", @@ -565,17 +744,29 @@ }, "engines": { "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/decamelize-keys/node_modules/map-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", "dev": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/dot-prop": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", @@ -615,12 +806,41 @@ "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": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, "engines": { "node": ">=0.8.0" } }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -638,18 +858,17 @@ } }, "node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, "dependencies": { - "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/function-bind": { @@ -667,10 +886,22 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/git-raw-commits": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.10.tgz", - "integrity": "sha512-sHhX5lsbG9SOO6yXdlwgEMQ/ljIn7qMpAbJZCGfXX2fq5T8M5SrDnpYk9/4HswTildcIqatsWa91vty6VhWSaQ==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.11.tgz", + "integrity": "sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==", "dev": true, "dependencies": { "dargs": "^7.0.0", @@ -689,7 +920,7 @@ "node_modules/global-dirs": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "integrity": "sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==", "dev": true, "dependencies": { "ini": "^1.3.4" @@ -699,9 +930,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, "node_modules/hard-rejection": { @@ -735,9 +966,9 @@ } }, "node_modules/hosted-git-info": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", - "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -746,14 +977,26 @@ "node": ">=10" } }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, "node_modules/husky": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/husky/-/husky-6.0.0.tgz", - "integrity": "sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.2.tgz", + "integrity": "sha512-Tkv80jtvbnkK3mYWxPZePGFpQ/tT3HNSs/sasF9P2YfkMezDl3ON37YN6jUUI4eTg5LcyVynlb6r4eyvOmspvg==", "dev": true, "bin": { "husky": "lib/bin.js" }, + "engines": { + "node": ">=14" + }, "funding": { "url": "https://github.com/sponsors/typicode" } @@ -807,13 +1050,13 @@ "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, "node_modules/is-core-module": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", - "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -843,16 +1086,28 @@ "node_modules/is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", "dev": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-text-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", - "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", + "integrity": "sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==", "dev": true, "dependencies": { "text-extensions": "^1.0.0" @@ -861,6 +1116,12 @@ "node": ">=0.10.0" } }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -873,6 +1134,12 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -888,7 +1155,7 @@ "node_modules/jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", "dev": true, "engines": [ "node >= 0.2.0" @@ -920,9 +1187,9 @@ } }, "node_modules/lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, "node_modules/locate-path": { @@ -946,6 +1213,66 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true + }, + "node_modules/lodash.isfunction": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", + "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", + "dev": true + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true + }, + "node_modules/lodash.kebabcase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "integrity": "sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.mergewith": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", + "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", + "dev": true + }, + "node_modules/lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", + "dev": true + }, + "node_modules/lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", + "dev": true + }, + "node_modules/lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", + "dev": true + }, + "node_modules/lodash.upperfirst": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", + "integrity": "sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==", + "dev": true + }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -958,10 +1285,16 @@ "node": ">=10" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, "node_modules/map-obj": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", - "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", "dev": true, "engines": { "node": ">=8" @@ -995,6 +1328,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -1004,6 +1352,15 @@ "node": ">=4" } }, + "node_modules/minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/minimist-options": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", @@ -1019,13 +1376,13 @@ } }, "node_modules/normalize-package-data": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.2.tgz", - "integrity": "sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", "dev": true, "dependencies": { "hosted-git-info": "^4.0.1", - "resolve": "^1.20.0", + "is-core-module": "^2.5.0", "semver": "^7.3.4", "validate-npm-package-license": "^3.0.1" }, @@ -1033,6 +1390,33 @@ "node": ">=10" } }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -1111,6 +1495,15 @@ "node": ">=8" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -1126,10 +1519,19 @@ "node": ">=8" } }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", "dev": true, "engines": { "node": ">=0.6.0", @@ -1304,20 +1706,33 @@ "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1365,9 +1780,9 @@ ] }, "node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -1379,6 +1794,33 @@ "node": ">=10" } }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -1406,9 +1848,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", - "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==", + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", + "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", "dev": true }, "node_modules/split2": { @@ -1430,31 +1872,40 @@ } }, "node_modules/string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" + "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8" } }, "node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/strip-indent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", @@ -1479,6 +1930,18 @@ "node": ">=8" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/text-extensions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", @@ -1491,7 +1954,7 @@ "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, "node_modules/through2": { @@ -1512,13 +1975,47 @@ "node": ">=8" } }, - "node_modules/trim-off-newlines": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", - "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } } }, "node_modules/type-fest": { @@ -1533,6 +2030,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typescript": { + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -1542,10 +2052,25 @@ "node": ">= 10.0.0" } }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true }, "node_modules/validate-npm-package-license": { @@ -1558,6 +2083,21 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -1600,32 +2140,50 @@ } }, "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "version": "17.6.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", + "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", "dev": true, "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-parser": { - "version": "20.2.7", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", - "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, "engines": { "node": ">=10" } }, + "node_modules/yargs/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/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -1641,27 +2199,27 @@ }, "dependencies": { "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", "dev": true, "requires": { - "@babel/highlight": "^7.12.13" + "@babel/highlight": "^7.18.6" } }, "@babel/helper-validator-identifier": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", - "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", "dev": true }, "@babel/highlight": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", - "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.0", + "@babel/helper-validator-identifier": "^7.18.6", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -1698,13 +2256,13 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true }, "supports-color": { @@ -1719,181 +2277,268 @@ } }, "@commitlint/cli": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-12.1.4.tgz", - "integrity": "sha512-ZR1WjXLvqEffYyBPT0XdnSxtt3Ty1TMoujEtseW5o3vPnkA1UNashAMjQVg/oELqfaiAMnDw8SERPMN0e/0kLg==", - "dev": true, - "requires": { - "@commitlint/format": "^12.1.4", - "@commitlint/lint": "^12.1.4", - "@commitlint/load": "^12.1.4", - "@commitlint/read": "^12.1.4", - "@commitlint/types": "^12.1.4", - "lodash": "^4.17.19", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-17.3.0.tgz", + "integrity": "sha512-/H0md7TsKflKzVPz226VfXzVafJFO1f9+r2KcFvmBu08V0T56lZU1s8WL7/xlxqLMqBTVaBf7Ixtc4bskdEEZg==", + "dev": true, + "requires": { + "@commitlint/format": "^17.0.0", + "@commitlint/lint": "^17.3.0", + "@commitlint/load": "^17.3.0", + "@commitlint/read": "^17.2.0", + "@commitlint/types": "^17.0.0", + "execa": "^5.0.0", + "lodash.isfunction": "^3.0.9", "resolve-from": "5.0.0", "resolve-global": "1.0.0", - "yargs": "^16.2.0" + "yargs": "^17.0.0" } }, "@commitlint/config-conventional": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-12.1.4.tgz", - "integrity": "sha512-ZIdzmdy4o4WyqywMEpprRCrehjCSQrHkaRTVZV411GyLigFQHlEBSJITAihLAWe88Qy/8SyoIe5uKvAsV5vRqQ==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-17.3.0.tgz", + "integrity": "sha512-hgI+fN5xF8nhS9uG/V06xyT0nlcyvHHMkq0kwRSr96vl5BFlRGaL2C0/YY4kQagfU087tmj01bJkG9Ek98Wllw==", "dev": true, "requires": { - "conventional-changelog-conventionalcommits": "^4.3.1" + "conventional-changelog-conventionalcommits": "^5.0.0" + } + }, + "@commitlint/config-validator": { + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-17.1.0.tgz", + "integrity": "sha512-Q1rRRSU09ngrTgeTXHq6ePJs2KrI+axPTgkNYDWSJIuS1Op4w3J30vUfSXjwn5YEJHklK3fSqWNHmBhmTR7Vdg==", + "dev": true, + "requires": { + "@commitlint/types": "^17.0.0", + "ajv": "^8.11.0" } }, "@commitlint/ensure": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-12.1.4.tgz", - "integrity": "sha512-MxHIBuAG9M4xl33qUfIeMSasbv3ktK0W+iygldBxZOL4QSYC2Gn66pZAQMnV9o3V+sVFHoAK2XUKqBAYrgbEqw==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-17.3.0.tgz", + "integrity": "sha512-kWbrQHDoW5veIUQx30gXoLOCjWvwC6OOEofhPCLl5ytRPBDAQObMbxTha1Bt2aSyNE/IrJ0s0xkdZ1Gi3wJwQg==", "dev": true, "requires": { - "@commitlint/types": "^12.1.4", - "lodash": "^4.17.19" + "@commitlint/types": "^17.0.0", + "lodash.camelcase": "^4.3.0", + "lodash.kebabcase": "^4.1.1", + "lodash.snakecase": "^4.1.1", + "lodash.startcase": "^4.4.0", + "lodash.upperfirst": "^4.3.1" } }, "@commitlint/execute-rule": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-12.1.4.tgz", - "integrity": "sha512-h2S1j8SXyNeABb27q2Ok2vD1WfxJiXvOttKuRA9Or7LN6OQoC/KtT3844CIhhWNteNMu/wE0gkTqGxDVAnJiHg==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-17.0.0.tgz", + "integrity": "sha512-nVjL/w/zuqjCqSJm8UfpNaw66V9WzuJtQvEnCrK4jDw6qKTmZB+1JQ8m6BQVZbNBcwfYdDNKnhIhqI0Rk7lgpQ==", "dev": true }, "@commitlint/format": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-12.1.4.tgz", - "integrity": "sha512-h28ucMaoRjVvvgS6Bdf85fa/+ZZ/iu1aeWGCpURnQV7/rrVjkhNSjZwGlCOUd5kDV1EnZ5XdI7L18SUpRjs26g==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-17.0.0.tgz", + "integrity": "sha512-MZzJv7rBp/r6ZQJDEodoZvdRM0vXu1PfQvMTNWFb8jFraxnISMTnPBWMMjr2G/puoMashwaNM//fl7j8gGV5lA==", "dev": true, "requires": { - "@commitlint/types": "^12.1.4", - "chalk": "^4.0.0" + "@commitlint/types": "^17.0.0", + "chalk": "^4.1.0" } }, "@commitlint/is-ignored": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-12.1.4.tgz", - "integrity": "sha512-uTu2jQU2SKvtIRVLOzMQo3KxDtO+iJ1p0olmncwrqy4AfPLgwoyCP2CiULq5M7xpR3+dE3hBlZXbZTQbD7ycIw==", + "version": "17.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-17.2.0.tgz", + "integrity": "sha512-rgUPUQraHxoMLxiE8GK430HA7/R2vXyLcOT4fQooNrZq9ERutNrP6dw3gdKLkq22Nede3+gEHQYUzL4Wu75ndg==", "dev": true, "requires": { - "@commitlint/types": "^12.1.4", - "semver": "7.3.5" + "@commitlint/types": "^17.0.0", + "semver": "7.3.7" } }, "@commitlint/lint": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-12.1.4.tgz", - "integrity": "sha512-1kZ8YDp4to47oIPFELUFGLiLumtPNKJigPFDuHt2+f3Q3IKdQ0uk53n3CPl4uoyso/Og/EZvb1mXjFR/Yce4cA==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-17.3.0.tgz", + "integrity": "sha512-VilOTPg0i9A7CCWM49E9bl5jytfTvfTxf9iwbWAWNjxJ/A5mhPKbm3sHuAdwJ87tDk1k4j8vomYfH23iaY+1Rw==", "dev": true, "requires": { - "@commitlint/is-ignored": "^12.1.4", - "@commitlint/parse": "^12.1.4", - "@commitlint/rules": "^12.1.4", - "@commitlint/types": "^12.1.4" + "@commitlint/is-ignored": "^17.2.0", + "@commitlint/parse": "^17.2.0", + "@commitlint/rules": "^17.3.0", + "@commitlint/types": "^17.0.0" } }, "@commitlint/load": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-12.1.4.tgz", - "integrity": "sha512-Keszi0IOjRzKfxT+qES/n+KZyLrxy79RQz8wWgssCboYjKEp+wC+fLCgbiMCYjI5k31CIzIOq/16J7Ycr0C0EA==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-17.3.0.tgz", + "integrity": "sha512-u/pV6rCAJrCUN+HylBHLzZ4qj1Ew3+eN9GBPhNi9otGxtOfA8b+8nJSxaNbcC23Ins/kcpjGf9zPSVW7628Umw==", "dev": true, "requires": { - "@commitlint/execute-rule": "^12.1.4", - "@commitlint/resolve-extends": "^12.1.4", - "@commitlint/types": "^12.1.4", - "chalk": "^4.0.0", + "@commitlint/config-validator": "^17.1.0", + "@commitlint/execute-rule": "^17.0.0", + "@commitlint/resolve-extends": "^17.3.0", + "@commitlint/types": "^17.0.0", + "@types/node": "^14.0.0", + "chalk": "^4.1.0", "cosmiconfig": "^7.0.0", - "lodash": "^4.17.19", - "resolve-from": "^5.0.0" + "cosmiconfig-typescript-loader": "^4.0.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2", + "lodash.uniq": "^4.5.0", + "resolve-from": "^5.0.0", + "ts-node": "^10.8.1", + "typescript": "^4.6.4" } }, "@commitlint/message": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-12.1.4.tgz", - "integrity": "sha512-6QhalEKsKQ/Y16/cTk5NH4iByz26fqws2ub+AinHPtM7Io0jy4e3rym9iE+TkEqiqWZlUigZnTwbPvRJeSUBaA==", + "version": "17.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-17.2.0.tgz", + "integrity": "sha512-/4l2KFKxBOuoEn1YAuuNNlAU05Zt7sNsC9H0mPdPm3chOrT4rcX0pOqrQcLtdMrMkJz0gC7b3SF80q2+LtdL9Q==", "dev": true }, "@commitlint/parse": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-12.1.4.tgz", - "integrity": "sha512-yqKSAsK2V4X/HaLb/yYdrzs6oD/G48Ilt0EJ2Mp6RJeWYxG14w/Out6JrneWnr/cpzemyN5hExOg6+TB19H/Lw==", + "version": "17.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-17.2.0.tgz", + "integrity": "sha512-vLzLznK9Y21zQ6F9hf8D6kcIJRb2haAK5T/Vt1uW2CbHYOIfNsR/hJs0XnF/J9ctM20Tfsqv4zBitbYvVw7F6Q==", "dev": true, "requires": { - "@commitlint/types": "^12.1.4", + "@commitlint/types": "^17.0.0", "conventional-changelog-angular": "^5.0.11", - "conventional-commits-parser": "^3.0.0" + "conventional-commits-parser": "^3.2.2" } }, "@commitlint/read": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-12.1.4.tgz", - "integrity": "sha512-TnPQSJgD8Aod5Xeo9W4SaYKRZmIahukjcCWJ2s5zb3ZYSmj6C85YD9cR5vlRyrZjj78ItLUV/X4FMWWVIS38Jg==", + "version": "17.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-17.2.0.tgz", + "integrity": "sha512-bbblBhrHkjxra3ptJNm0abxu7yeAaxumQ8ZtD6GIVqzURCETCP7Dm0tlVvGRDyXBuqX6lIJxh3W7oyKqllDsHQ==", "dev": true, "requires": { - "@commitlint/top-level": "^12.1.4", - "@commitlint/types": "^12.1.4", - "fs-extra": "^9.0.0", - "git-raw-commits": "^2.0.0" + "@commitlint/top-level": "^17.0.0", + "@commitlint/types": "^17.0.0", + "fs-extra": "^10.0.0", + "git-raw-commits": "^2.0.0", + "minimist": "^1.2.6" } }, "@commitlint/resolve-extends": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-12.1.4.tgz", - "integrity": "sha512-R9CoUtsXLd6KSCfsZly04grsH6JVnWFmVtWgWs1KdDpdV+G3TSs37tColMFqglpkx3dsWu8dsPD56+D9YnJfqg==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-17.3.0.tgz", + "integrity": "sha512-Lf3JufJlc5yVEtJWC8o4IAZaB8FQAUaVlhlAHRACd0TTFizV2Lk2VH70et23KgvbQNf7kQzHs/2B4QZalBv6Cg==", "dev": true, "requires": { + "@commitlint/config-validator": "^17.1.0", + "@commitlint/types": "^17.0.0", "import-fresh": "^3.0.0", - "lodash": "^4.17.19", + "lodash.mergewith": "^4.6.2", "resolve-from": "^5.0.0", "resolve-global": "^1.0.0" } }, "@commitlint/rules": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-12.1.4.tgz", - "integrity": "sha512-W8m6ZSjg7RuIsIfzQiFHa48X5mcPXeKT9yjBxVmjHvYfS2FDBf1VxCQ7vO0JTVIdV4ohjZ0eKg/wxxUuZHJAZg==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-17.3.0.tgz", + "integrity": "sha512-s2UhDjC5yP2utx3WWqsnZRzjgzAX8BMwr1nltC0u0p8T/nzpkx4TojEfhlsOUj1t7efxzZRjUAV0NxNwdJyk+g==", "dev": true, "requires": { - "@commitlint/ensure": "^12.1.4", - "@commitlint/message": "^12.1.4", - "@commitlint/to-lines": "^12.1.4", - "@commitlint/types": "^12.1.4" + "@commitlint/ensure": "^17.3.0", + "@commitlint/message": "^17.2.0", + "@commitlint/to-lines": "^17.0.0", + "@commitlint/types": "^17.0.0", + "execa": "^5.0.0" } }, "@commitlint/to-lines": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-12.1.4.tgz", - "integrity": "sha512-TParumvbi8bdx3EdLXz2MaX+e15ZgoCqNUgqHsRLwyqLUTRbqCVkzrfadG1UcMQk8/d5aMbb327ZKG3Q4BRorw==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-17.0.0.tgz", + "integrity": "sha512-nEi4YEz04Rf2upFbpnEorG8iymyH7o9jYIVFBG1QdzebbIFET3ir+8kQvCZuBE5pKCtViE4XBUsRZz139uFrRQ==", "dev": true }, "@commitlint/top-level": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-12.1.4.tgz", - "integrity": "sha512-d4lTJrOT/dXlpY+NIt4CUl77ciEzYeNVc0VFgUQ6VA+b1rqYD2/VWFjBlWVOrklxtSDeKyuEhs36RGrppEFAvg==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-17.0.0.tgz", + "integrity": "sha512-dZrEP1PBJvodNWYPOYiLWf6XZergdksKQaT6i1KSROLdjf5Ai0brLOv5/P+CPxBeoj3vBxK4Ax8H1Pg9t7sHIQ==", "dev": true, "requires": { "find-up": "^5.0.0" } }, "@commitlint/types": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-12.1.4.tgz", - "integrity": "sha512-KRIjdnWNUx6ywz+SJvjmNCbQKcKP6KArhjZhY2l+CWKxak0d77SOjggkMwFTiSgLODOwmuLTbarR2ZfWPiPMlw==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-17.0.0.tgz", + "integrity": "sha512-hBAw6U+SkAT5h47zDMeOu3HSiD0SODw4Aq7rRNh1ceUmL7GyLKYhPbUvlRWqZ65XjBLPHZhFyQlRaPNz8qvUyQ==", + "dev": true, + "requires": { + "chalk": "^4.1.0" + } + }, + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, "requires": { - "chalk": "^4.0.0" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true + }, + "@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "dev": true + }, "@types/minimist": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz", - "integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", + "dev": true + }, + "@types/node": { + "version": "14.18.36", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.36.tgz", + "integrity": "sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ==", "dev": true }, "@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, "@types/parse-json": { @@ -1902,10 +2547,34 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, + "acorn": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", + "dev": true + }, + "acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true + }, + "ajv": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.2.tgz", + "integrity": "sha512-E4bfmKAhGiSTvMfL1Myyycaub+cUEU2/IvpylXkUu7CHBkBj1f/ikdzbD7YQ6FKUbixDxeYvB/xY4fvyroDlQg==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { @@ -1917,22 +2586,22 @@ "color-convert": "^2.0.1" } }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "array-ify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", - "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=", + "integrity": "sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==", "dev": true }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", "dev": true }, "callsites": { @@ -1959,9 +2628,9 @@ } }, "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -1969,13 +2638,13 @@ } }, "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "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.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, @@ -2005,9 +2674,9 @@ } }, "conventional-changelog-angular": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz", - "integrity": "sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw==", + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz", + "integrity": "sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==", "dev": true, "requires": { "compare-func": "^2.0.0", @@ -2015,9 +2684,9 @@ } }, "conventional-changelog-conventionalcommits": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.0.tgz", - "integrity": "sha512-sj9tj3z5cnHaSJCYObA9nISf7eq/YjscLPoq6nmew4SiOjxqL2KRpK20fjnjVbpNDjJ2HR3MoVcWKXwbVvzS0A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-5.0.0.tgz", + "integrity": "sha512-lCDbA+ZqVFQGUj7h9QBKoIpLhl8iihkO0nCTyRNzuXtcd7ubODpYB04IFy31JloiJgG0Uovu8ot8oxRzn7Nwtw==", "dev": true, "requires": { "compare-func": "^2.0.0", @@ -2026,9 +2695,9 @@ } }, "conventional-commits-parser": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.1.tgz", - "integrity": "sha512-OG9kQtmMZBJD/32NEw5IhN5+HnBqVjy03eC+I71I0oQRFA5rOgA4OtPOYG7mz1GkCfCNxn3gKIX8EiHJYuf1cA==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz", + "integrity": "sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==", "dev": true, "requires": { "is-text-path": "^1.0.1", @@ -2036,14 +2705,13 @@ "lodash": "^4.17.15", "meow": "^8.0.0", "split2": "^3.0.0", - "through2": "^4.0.0", - "trim-off-newlines": "^1.0.0" + "through2": "^4.0.0" } }, "cosmiconfig": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", - "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", + "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", "dev": true, "requires": { "@types/parse-json": "^4.0.0", @@ -2053,6 +2721,30 @@ "yaml": "^1.10.0" } }, + "cosmiconfig-typescript-loader": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.3.0.tgz", + "integrity": "sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q==", + "dev": true, + "requires": {} + }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, "dargs": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", @@ -2062,13 +2754,13 @@ "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "dev": true }, "decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", "dev": true, "requires": { "decamelize": "^1.1.0", @@ -2078,11 +2770,17 @@ "map-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", "dev": true } } }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, "dot-prop": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", @@ -2116,7 +2814,30 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "find-up": { @@ -2130,12 +2851,11 @@ } }, "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, "requires": { - "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" @@ -2153,10 +2873,16 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, "git-raw-commits": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.10.tgz", - "integrity": "sha512-sHhX5lsbG9SOO6yXdlwgEMQ/ljIn7qMpAbJZCGfXX2fq5T8M5SrDnpYk9/4HswTildcIqatsWa91vty6VhWSaQ==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.11.tgz", + "integrity": "sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==", "dev": true, "requires": { "dargs": "^7.0.0", @@ -2169,16 +2895,16 @@ "global-dirs": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "integrity": "sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==", "dev": true, "requires": { "ini": "^1.3.4" } }, "graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, "hard-rejection": { @@ -2203,18 +2929,24 @@ "dev": true }, "hosted-git-info": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", - "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", "dev": true, "requires": { "lru-cache": "^6.0.0" } }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, "husky": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/husky/-/husky-6.0.0.tgz", - "integrity": "sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.2.tgz", + "integrity": "sha512-Tkv80jtvbnkK3mYWxPZePGFpQ/tT3HNSs/sasF9P2YfkMezDl3ON37YN6jUUI4eTg5LcyVynlb6r4eyvOmspvg==", "dev": true }, "import-fresh": { @@ -2256,13 +2988,13 @@ "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, "is-core-module": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", - "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", "dev": true, "requires": { "has": "^1.0.3" @@ -2283,18 +3015,30 @@ "is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true }, "is-text-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", - "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", + "integrity": "sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==", "dev": true, "requires": { "text-extensions": "^1.0.0" } }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -2307,6 +3051,12 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -2320,7 +3070,7 @@ "jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", "dev": true }, "JSONStream": { @@ -2340,9 +3090,9 @@ "dev": true }, "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, "locate-path": { @@ -2360,6 +3110,66 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true + }, + "lodash.isfunction": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", + "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true + }, + "lodash.kebabcase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "integrity": "sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lodash.mergewith": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", + "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", + "dev": true + }, + "lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", + "dev": true + }, + "lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", + "dev": true + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", + "dev": true + }, + "lodash.upperfirst": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", + "integrity": "sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==", + "dev": true + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -2369,10 +3179,16 @@ "yallist": "^4.0.0" } }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, "map-obj": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", - "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", "dev": true }, "meow": { @@ -2394,12 +3210,30 @@ "yargs-parser": "^20.2.3" } }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, "min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true }, + "minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "dev": true + }, "minimist-options": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", @@ -2412,17 +3246,35 @@ } }, "normalize-package-data": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.2.tgz", - "integrity": "sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", "dev": true, "requires": { "hosted-git-info": "^4.0.1", - "resolve": "^1.20.0", + "is-core-module": "^2.5.0", "semver": "^7.3.4", "validate-npm-package-license": "^3.0.1" } }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, "p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -2474,6 +3326,12 @@ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, "path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -2486,10 +3344,16 @@ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", "dev": true }, "quick-lru": { @@ -2622,17 +3486,24 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, "resolve-from": { @@ -2657,14 +3528,35 @@ "dev": true }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", "dev": true, "requires": { "lru-cache": "^6.0.0" } }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -2692,9 +3584,9 @@ } }, "spdx-license-ids": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", - "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==", + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", + "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", "dev": true }, "split2": { @@ -2716,25 +3608,31 @@ } }, "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" + "strip-ansi": "^6.0.1" } }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" } }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, "strip-indent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", @@ -2753,6 +3651,12 @@ "has-flag": "^4.0.0" } }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, "text-extensions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", @@ -2762,7 +3666,7 @@ "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, "through2": { @@ -2780,11 +3684,26 @@ "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", "dev": true }, - "trim-off-newlines": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", - "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", - "dev": true + "ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "requires": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + } }, "type-fest": { "version": "0.18.1", @@ -2792,16 +3711,37 @@ "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", "dev": true }, + "typescript": { + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", + "dev": true + }, "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true }, "validate-npm-package-license": { @@ -2814,6 +3754,15 @@ "spdx-expression-parse": "^3.0.0" } }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -2844,24 +3793,38 @@ "dev": true }, "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "version": "17.6.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", + "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", "dev": true, "requires": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.1.1" + }, + "dependencies": { + "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 + } } }, "yargs-parser": { - "version": "20.2.7", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", - "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true }, "yocto-queue": { @@ -2870,6 +3833,5 @@ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true } - }, - "version": "6.0.0" + } } diff --git a/package.json b/package.json index e08457565..4040d5702 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,11 @@ "name": "doubtfire", "version": "6.0.0", "devDependencies": { - "@commitlint/cli": "^12.1.4", - "@commitlint/config-conventional": "^12.1.4", - "husky": "^6.0.0" + "@commitlint/cli": "^17.0", + "@commitlint/config-conventional": "^17.0", + "husky": "^8.0.0" + }, + "scripts": { + "prepare": "husky install" } } From 5a86a3a65933cf333c648318ce2c9fc714683857 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Mon, 2 Jan 2023 20:26:17 +1100 Subject: [PATCH 08/54] build: create dev container Add a dev-container capable of building, testing, and running all required components for the basic application. --- .devcontainer/.p10k.zsh | 1641 +++++++++++++++++++++++++++ .devcontainer/.zshrc | 115 ++ .devcontainer/devcontainer.env | 64 ++ .devcontainer/devcontainer.json | 77 ++ .devcontainer/launch_db.sh | 400 +++++++ dev.Dockerfile | 107 ++ development/api.env | 52 +- development/build.sh | 23 +- development/docker-compose.full.yml | 1 + development/docker-compose.yml | 25 + development/version.sh | 1 + 11 files changed, 2484 insertions(+), 22 deletions(-) create mode 100644 .devcontainer/.p10k.zsh create mode 100644 .devcontainer/.zshrc create mode 100644 .devcontainer/devcontainer.env create mode 100644 .devcontainer/devcontainer.json create mode 100755 .devcontainer/launch_db.sh create mode 100644 dev.Dockerfile diff --git a/.devcontainer/.p10k.zsh b/.devcontainer/.p10k.zsh new file mode 100644 index 000000000..9afcd32ec --- /dev/null +++ b/.devcontainer/.p10k.zsh @@ -0,0 +1,1641 @@ +# Generated by Powerlevel10k configuration wizard on 2022-12-30 at 19:42 AEDT. +# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 16727. +# Wizard options: powerline, unicode, lean, 1 line, compact, fluent, +# instant_prompt=verbose. +# Type `p10k configure` to generate another config. +# +# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate +# your own config based on it. +# +# Tip: Looking for a nice color? Here's a one-liner to print colormap. +# +# for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done + +# Temporarily change options. +'builtin' 'local' '-a' 'p10k_config_opts' +[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') +[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') +[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') +'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' + +() { + emulate -L zsh -o extended_glob + + # Unset all configuration options. This allows you to apply configuration changes without + # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. + unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' + + # Zsh >= 5.1 is required. + [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return + + # The list of segments shown on the left. Fill it with the most important segments. + typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( + # os_icon # os identifier + dir # current directory + vcs # git status + prompt_char # prompt symbol + ) + + # The list of segments shown on the right. Fill it with less important segments. + # Right prompt on the last prompt line (where you are typing your commands) gets + # automatically hidden when the input line reaches it. Right prompt above the + # last prompt line gets hidden if it would overlap with left prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=() + # status # exit code of the last command + # command_execution_time # duration of the last command + # background_jobs # presence of background jobs + # direnv # direnv status (https://direnv.net/) + # asdf # asdf version manager (https://github.com/asdf-vm/asdf) + # virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) + # anaconda # conda environment (https://conda.io/) + # pyenv # python environment (https://github.com/pyenv/pyenv) + # goenv # go environment (https://github.com/syndbg/goenv) + # nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv) + # nvm # node.js version from nvm (https://github.com/nvm-sh/nvm) + # nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) + # # node_version # node.js version + # # go_version # go version (https://golang.org) + # # rust_version # rustc version (https://www.rust-lang.org) + # # dotnet_version # .NET version (https://dotnet.microsoft.com) + # # php_version # php version (https://www.php.net/) + # # laravel_version # laravel php framework version (https://laravel.com/) + # # java_version # java version (https://www.java.com/) + # # package # name@version from package.json (https://docs.npmjs.com/files/package.json) + # rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv) + # rvm # ruby version from rvm (https://rvm.io) + # fvm # flutter version management (https://github.com/leoafarias/fvm) + # luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv) + # jenv # java version from jenv (https://github.com/jenv/jenv) + # plenv # perl version from plenv (https://github.com/tokuhirom/plenv) + # perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew) + # phpenv # php version from phpenv (https://github.com/phpenv/phpenv) + # scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv) + # haskell_stack # haskell version from stack (https://haskellstack.org/) + # kubecontext # current kubernetes context (https://kubernetes.io/) + # terraform # terraform workspace (https://www.terraform.io) + # # terraform_version # terraform version (https://www.terraform.io) + # aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) + # aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) + # azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) + # gcloud # google cloud cli account and project (https://cloud.google.com/) + # google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) + # toolbox # toolbox name (https://github.com/containers/toolbox) + # context # user@hostname + # nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) + # ranger # ranger shell (https://github.com/ranger/ranger) + # nnn # nnn shell (https://github.com/jarun/nnn) + # lf # lf shell (https://github.com/gokcehan/lf) + # xplr # xplr shell (https://github.com/sayanarijit/xplr) + # vim_shell # vim shell indicator (:sh) + # midnight_commander # midnight commander shell (https://midnight-commander.org/) + # nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) + # # vpn_ip # virtual private network indicator + # # load # CPU load + # # disk_usage # disk usage + # # ram # free RAM + # # swap # used swap + # todo # todo items (https://github.com/todotxt/todo.txt-cli) + # timewarrior # timewarrior tracking status (https://timewarrior.net/) + # taskwarrior # taskwarrior task count (https://taskwarrior.org/) + # # cpu_arch # CPU architecture + # # time # current time + # # ip # ip address and bandwidth usage for a specified network interface + # # public_ip # public IP address + # # proxy # system-wide http/https/ftp proxy + # # battery # internal battery + # # wifi # wifi speed + # # example # example user-defined segment (see prompt_example function below) + # ) + + # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. + typeset -g POWERLEVEL9K_MODE=powerline + # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid + # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. + typeset -g POWERLEVEL9K_ICON_PADDING=none + + # Basic style options that define the overall look of your prompt. You probably don't want to + # change them. + typeset -g POWERLEVEL9K_BACKGROUND= # transparent background + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol + + # When set to true, icons appear before content on both sides of the prompt. When set + # to false, icons go after content. If empty or not set, icons go before content in the left + # prompt and after content in the right prompt. + # + # You can also override it for a specific segment: + # + # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false + # + # Or for a specific segment in specific state: + # + # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false + typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true + + # Add an empty line before each prompt. + typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=false + + # Connect left prompt lines with these symbols. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX= + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX= + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX= + # Connect right prompt lines with these symbols. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX= + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX= + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX= + + # The left end of left prompt. + typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= + # The right end of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL= + + # Ruler, a.k.a. the horizontal line before each prompt. If you set it to true, you'll + # probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and + # POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below. + typeset -g POWERLEVEL9K_SHOW_RULER=false + typeset -g POWERLEVEL9K_RULER_CHAR='─' # reasonable alternative: '·' + typeset -g POWERLEVEL9K_RULER_FOREGROUND=242 + + # Filler between left and right prompt on the first prompt line. You can set it to '·' or '─' + # to make it easier to see the alignment between left and right prompt and to separate prompt + # from command output. It serves the same purpose as ruler (see above) without increasing + # the number of prompt lines. You'll probably want to set POWERLEVEL9K_SHOW_RULER=false + # if using this. You might also like POWERLEVEL9K_PROMPT_ADD_NEWLINE=false for more compact + # prompt. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' + if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then + # The color of the filler. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242 + # Add a space between the end of left prompt and the filler. + typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=' ' + # Add a space between the filler and the start of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' ' + # Start filler from the edge of the screen if there are no left segments on the first line. + typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' + # End filler on the edge of the screen if there are no right segments on the first line. + typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' + fi + + #################################[ os_icon: os identifier ]################################## + # OS identifier color. + typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND= + # Custom icon. + # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' + + ################################[ prompt_char: prompt symbol ]################################ + # Green prompt symbol if the last command succeeded. + typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 + # Red prompt symbol if the last command failed. + typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 + # Default prompt symbol. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' + # Prompt symbol in command vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' + # Prompt symbol in visual vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' + # Prompt symbol in overwrite vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' + typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true + # No line terminator if prompt_char is the last segment. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='' + # No line introducer if prompt_char is the first segment. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= + + ##################################[ dir: current directory ]################################## + # Default current directory color. + typeset -g POWERLEVEL9K_DIR_FOREGROUND=31 + # If directory is too long, shorten some of its segments to the shortest possible unique + # prefix. The shortened directory can be tab-completed to the original. + typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique + # Replace removed segment suffixes with this symbol. + typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= + # Color of the shortened directory segments. + typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103 + # Color of the anchor directory segments. Anchor segments are never shortened. The first + # segment is always an anchor. + typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39 + # Display anchor directory segments in bold. + typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true + # Don't shorten directories that contain any of these files. They are anchors. + local anchor_files=( + .bzr + .citc + .git + .hg + .node-version + .python-version + .go-version + .ruby-version + .lua-version + .java-version + .perl-version + .php-version + .tool-version + .shorten_folder_marker + .svn + .terraform + CVS + Cargo.toml + composer.json + go.mod + package.json + stack.yaml + ) + typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" + # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains + # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is + # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first) + # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers + # and other directories don't. + # + # Optionally, "first" and "last" can be followed by ":" where is an integer. + # This moves the truncation point to the right (positive offset) or to the left (negative offset) + # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0" + # respectively. + typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false + # Don't shorten this many last directory segments. They are anchors. + typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 + # Shorten directory if it's longer than this even if there is space for it. The value can + # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, + # directory will be shortened only when prompt doesn't fit or when other parameters demand it + # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). + # If set to `0`, directory will always be shortened to its minimum length. + typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 + # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this + # many columns for typing commands. + typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 + # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least + # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. + typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 + # If set to true, embed a hyperlink into the directory. Useful for quickly + # opening a directory in the file manager simply by clicking the link. + # Can also be handy when the directory is shortened, as it allows you to see + # the full directory that was used in previous commands. + typeset -g POWERLEVEL9K_DIR_HYPERLINK=false + + # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON + # and POWERLEVEL9K_DIR_CLASSES below. + typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 + + # The default icon shown next to non-writable and non-existent directories when + # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3. + typeset -g POWERLEVEL9K_LOCK_ICON='∅' + + # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different + # directories. It must be an array with 3 * N elements. Each triplet consists of: + # + # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with + # extended_glob option enabled. + # 2. Directory class for the purpose of styling. + # 3. An empty string. + # + # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. + # + # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories + # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_DIR_CLASSES=( + # '~/work(|/*)' WORK '' + # '~(|/*)' HOME '' + # '*' DEFAULT '') + # + # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one + # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or + # WORK_NON_EXISTENT. + # + # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an + # option to define custom colors and icons for different directory classes. + # + # # Styling for WORK. + # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39 + # + # # Styling for WORK_NOT_WRITABLE. + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39 + # + # # Styling for WORK_NON_EXISTENT. + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39 + # + # If a styling parameter isn't explicitly defined for some class, it falls back to the classless + # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls + # back to POWERLEVEL9K_DIR_FOREGROUND. + # + typeset -g POWERLEVEL9K_DIR_CLASSES=() + + # Custom prefix. + # typeset -g POWERLEVEL9K_DIR_PREFIX='%fin ' + + #####################################[ vcs: git status ]###################################### + # Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon. + typeset -g POWERLEVEL9K_VCS_BRANCH_ICON= + + # Untracked files icon. It's really a question mark, your font isn't broken. + # Change the value of this parameter to show a different icon. + typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' + + # Formatter for Git status. + # + # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42. + # + # You can edit the function to customize how Git status looks. + # + # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: + # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. + function my_git_formatter() { + emulate -L zsh + + if [[ -n $P9K_CONTENT ]]; then + # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from + # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. + typeset -g my_git_format=$P9K_CONTENT + return + fi + + if (( $1 )); then + # Styling for up-to-date Git status. + local meta='%f' # default foreground + local clean='%76F' # green foreground + local modified='%178F' # yellow foreground + local untracked='%39F' # blue foreground + local conflicted='%196F' # red foreground + else + # Styling for incomplete and stale Git status. + local meta='%244F' # grey foreground + local clean='%244F' # grey foreground + local modified='%244F' # grey foreground + local untracked='%244F' # grey foreground + local conflicted='%244F' # grey foreground + fi + + local res + + if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then + local branch=${(V)VCS_STATUS_LOCAL_BRANCH} + # If local branch name is at most 32 characters long, show it in full. + # Otherwise show the first 12 … the last 12. + # Tip: To always show local branch name in full without truncation, delete the next line. + (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line + res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}" + fi + + if [[ -n $VCS_STATUS_TAG + # Show tag only if not on a branch. + # Tip: To always show tag, delete the next line. + && -z $VCS_STATUS_LOCAL_BRANCH # <-- this line + ]]; then + local tag=${(V)VCS_STATUS_TAG} + # If tag name is at most 32 characters long, show it in full. + # Otherwise show the first 12 … the last 12. + # Tip: To always show tag name in full without truncation, delete the next line. + (( $#tag > 32 )) && tag[13,-13]="…" # <-- this line + res+="${meta}#${clean}${tag//\%/%%}" + fi + + # Display the current Git commit if there is no branch and no tag. + # Tip: To always display the current Git commit, delete the next line. + [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line + res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" + + # Show tracking branch name if it differs from local branch. + if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then + res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" + fi + + # Display "wip" if the latest commit's summary contains "wip" or "WIP". + if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then + res+=" ${modified}wip" + fi + + # # ⇣42 if behind the remote. + # (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" + # # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. + # (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " + # (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" + # # ⇠42 if behind the push remote. + # (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" + # (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " + # # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. + # (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" + # # *42 if have stashes. + # (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" + # # 'merge' if the repo is in an unusual state. + # [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" + # # ~42 if have merge conflicts. + # (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" + # # +42 if have staged changes. + # (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" + # # !42 if have unstaged changes. + # (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" + # # ?42 if have untracked files. It's really a question mark, your font isn't broken. + # # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. + # # Remove the next line if you don't want to see untracked files at all. + # (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" + # # "─" if the number of unstaged files is unknown. This can happen due to + # # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower + # # than the number of files in the Git index, or due to bash.showDirtyState being set to false + # # in the repository config. The number of staged and untracked files may also be unknown + # # in this case. + # (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" + + typeset -g my_git_format=$res + } + functions -M my_git_formatter 2>/dev/null + + # Don't count the number of unstaged, untracked and conflicted files in Git repositories with + # more than this many files in the index. Negative value means infinity. + # + # If you are working in Git repositories with tens of millions of files and seeing performance + # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output + # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's + # config: `git config bash.showDirtyState false`. + typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 + + # Don't show Git status in prompt for repositories whose workdir matches this pattern. + # For example, if set to '~', the Git repository at $HOME/.git will be ignored. + # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'. + typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' + + # Disable the default Git status formatting. + typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true + # Install our own Git status formatter. + typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}' + typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}' + # Enable counters for staged, unstaged, etc. + typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 + + # Icon color. + typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76 + typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244 + # Custom icon. + typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION= + # Custom prefix. + typeset -g POWERLEVEL9K_VCS_PREFIX='%fon ' + + # Show status of repositories of these types. You can add svn and/or hg if you are + # using them. If you do, your prompt may become slow even when your current directory + # isn't in an svn or hg repository. + typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) + + # These settings are used for repositories other than Git or when gitstatusd fails and + # Powerlevel10k has to fall back to using vcs_info. + typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76 + typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76 + typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178 + + ##########################[ status: exit code of the last command ]########################### + # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and + # style them independently from the regular OK and ERROR state. + typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true + + # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as + # it will signify success by turning green. + typeset -g POWERLEVEL9K_STATUS_OK=false + typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70 + typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' + + # Status when some part of a pipe command fails but the overall exit status is zero. It may look + # like this: 1|0. + typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70 + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' + + # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as + # it will signify error by turning red. + typeset -g POWERLEVEL9K_STATUS_ERROR=false + typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160 + typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' + + # Status when the last command was terminated by a signal. + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160 + # Use terse signal names: "INT" instead of "SIGINT(2)". + typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' + + # Status when some part of a pipe command fails and the overall exit status is also non-zero. + # It may look like this: 1|0. + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160 + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' + + ###################[ command_execution_time: duration of the last command ]################### + # Show duration of the last command if takes at least this many seconds. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 + # Show this many fractional digits. Zero means round to seconds. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 + # Execution time color. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101 + # Duration format: 1d 2h 3m 4s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' + # Custom icon. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION= + # Custom prefix. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook ' + + #######################[ background_jobs: presence of background jobs ]####################### + # Don't show the number of background jobs. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false + # Background jobs color. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70 + # Custom icon. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='≡' + + #######################[ direnv: direnv status (https://direnv.net/) ]######################## + # Direnv color. + typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]############### + # Default asdf color. Only used to display tools for which there is no color override (see below). + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND. + typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66 + + # There are four parameters that can be used to hide asdf tools. Each parameter describes + # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at + # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to + # hide a tool, it gets shown. + # + # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and + # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands: + # + # asdf local python 3.8.1 + # asdf global python 3.8.1 + # + # After running both commands the current python version is 3.8.1 and its source is "local" as + # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false, + # it'll hide python version in this case because 3.8.1 is the same as the global version. + # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't + # contain "local". + + # Hide tool versions that don't come from one of these sources. + # + # Available sources: + # + # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable" + # - local `asdf current` says "set by /some/not/home/directory/file" + # - global `asdf current` says "set by /home/username/file" + # + # Note: If this parameter is set to (shell local global), it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES. + typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) + + # If set to false, hide tool versions that are the same as global. + # + # Note: The name of this parameter doesn't reflect its meaning at all. + # Note: If this parameter is set to true, it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW. + typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false + + # If set to false, hide tool versions that are equal to "system". + # + # Note: If this parameter is set to true, it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM. + typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=false + + # If set to non-empty value, hide tools unless there is a file matching the specified file pattern + # in the current directory, or its parent directory, or its grandparent directory, and so on. + # + # Note: If this parameter is set to empty value, it won't hide tools. + # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB. + # + # Example: Hide nodejs version when there is no package.json and no *.js files in the current + # directory, in `..`, in `../..` and so on. + # + # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json' + typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= + + # Ruby version from asdf. + typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168 + # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Python version from asdf. + typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Go version from asdf. + typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Node.js version from asdf. + typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70 + # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Rust version from asdf. + typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' + + # .NET Core version from asdf. + typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134 + # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_DOTNET_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Flutter version from asdf. + typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38 + # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Lua version from asdf. + typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32 + # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Java version from asdf. + typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32 + # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Perl version from asdf. + typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67 + # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Erlang version from asdf. + typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125 + # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Elixir version from asdf. + typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129 + # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Postgres version from asdf. + typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31 + # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' + + # PHP version from asdf. + typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99 + # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Haskell version from asdf. + typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=172 + # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Julia version from asdf. + typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=70 + # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar' + + ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### + # NordVPN connection indicator color. + typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39 + # Hide NordVPN connection indicator when not connected. + typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= + typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= + # Custom icon. + typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='nord' + + #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## + # Ranger shell color. + typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178 + # Custom icon. + typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='▲' + + ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### + # Nnn shell color. + typeset -g POWERLEVEL9K_NNN_FOREGROUND=72 + # Custom icon. + # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################[ lf: lf shell (https://github.com/gokcehan/lf) ]####################### + # lf shell color. + typeset -g POWERLEVEL9K_LF_FOREGROUND=72 + # Custom icon. + # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]################## + # xplr shell color. + typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72 + # Custom icon. + # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########################[ vim_shell: vim shell indicator (:sh) ]########################### + # Vim shell indicator color. + typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 + # Custom icon. + # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### + # Midnight Commander shell color. + typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## + # Nix shell color. + typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74 + + # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. + # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################################[ disk_usage: disk usage ]################################## + # Colors for different levels of disk usage. + typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35 + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160 + # Thresholds for different levels of disk usage (percentage points). + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 + # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent. + typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false + # Custom icon. + # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################################[ ram: free RAM ]####################################### + # RAM color. + typeset -g POWERLEVEL9K_RAM_FOREGROUND=66 + # Custom icon. + # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################################[ swap: used swap ]###################################### + # Swap color. + typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96 + # Custom icon. + # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################################[ load: CPU load ]###################################### + # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. + typeset -g POWERLEVEL9K_LOAD_WHICH=5 + # Load color when load is under 50%. + typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66 + # Load color when load is between 50% and 70%. + typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178 + # Load color when load is over 70%. + typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166 + # Custom icon. + # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ + # Todo color. + typeset -g POWERLEVEL9K_TODO_FOREGROUND=110 + # Hide todo when the total number of tasks is zero. + typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true + # Hide todo when the number of tasks after filtering is zero. + typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false + + # Todo format. The following parameters are available within the expansion. + # + # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. + # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. + # + # These variables correspond to the last line of the output of `todo.sh -p ls`: + # + # TODO: 24 of 42 tasks shown + # + # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. + # + # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' + + # Custom icon. + # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############ + # Timewarrior color. + typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110 + # If the tracked task is longer than 24 characters, truncate and append "…". + # Tip: To always display tasks without truncation, delete the following parameter. + # Tip: To hide task names and display just the icon when time tracking is enabled, set the + # value of the following parameter to "". + typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' + + # Custom icon. + # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]############## + # Taskwarrior color. + typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74 + + # Taskwarrior segment format. The following parameters are available within the expansion. + # + # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`. + # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`. + # + # Zero values are represented as empty parameters. + # + # The default format: + # + # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT' + # + # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT' + + # Custom icon. + # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################################[ cpu_arch: CPU architecture ]################################ + # CPU architecture color. + typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172 + + # Hide the segment when on a specific CPU architecture. + # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION= + # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################################[ context: user@hostname ]################################## + # Context color when running with privileges. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178 + # Context color in SSH without privileges. + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180 + # Default context color (no privileges, no SSH). + typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180 + + # Context format when running with privileges: bold user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m' + # Context format when in SSH without privileges: user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' + # Default context format (no privileges, no SSH): user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' + + # Don't show context unless running with privileges or in SSH. + # Tip: Remove the next line to always show context. + typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith ' + + ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### + # Python virtual environment color. + typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37 + # Don't show Python version next to the virtual environment name. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false + # If set to "false", won't show virtualenv if pyenv is already shown. + # If set to "if-different", won't show virtualenv if it's the same as pyenv. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false + # Separate environment name from Python version only with a space. + typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################[ anaconda: conda environment (https://conda.io/) ]###################### + # Anaconda environment color. + typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37 + + # Anaconda segment format. The following parameters are available within the expansion. + # + # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment. + # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment. + # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below). + # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version). + # + # CONDA_PROMPT_MODIFIER can be configured with the following command: + # + # conda config --set env_prompt '({default_env}) ' + # + # The last argument is a Python format string that can use the following variables: + # + # - prefix The same as CONDA_PREFIX. + # - default_env The same as CONDA_DEFAULT_ENV. + # - name The last segment of CONDA_PREFIX. + # - stacked_env Comma-separated list of names in the environment stack. The first element is + # always the same as default_env. + # + # Note: '({default_env}) ' is the default value of env_prompt. + # + # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER + # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former + # is empty. + typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' + + # Custom icon. + # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ + # Pyenv color. + typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37 + # Hide python version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) + # If set to false, hide python version if it's the same as global: + # $(pyenv version-name) == $(pyenv global). + typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide python version if it's equal to "system". + typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=false + + # Pyenv segment format. The following parameters are available within the expansion. + # + # - P9K_CONTENT Current pyenv environment (pyenv version-name). + # - P9K_PYENV_PYTHON_VERSION Current python version (python --version). + # + # The default format has the following logic: + # + # 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or + # starts with "$P9K_PYENV_PYTHON_VERSION/". + # 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION". + typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}' + + # Custom icon. + # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ + # Goenv color. + typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37 + # Hide go version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) + # If set to false, hide go version if it's the same as global: + # $(goenv version-name) == $(goenv global). + typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide go version if it's equal to "system". + typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=false + # Custom icon. + # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## + # Nodenv color. + typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70 + # Hide node version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) + # If set to false, hide node version if it's the same as global: + # $(nodenv version-name) == $(nodenv global). + typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide node version if it's equal to "system". + typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=false + # Custom icon. + # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### + # Nvm color. + typeset -g POWERLEVEL9K_NVM_FOREGROUND=70 + # Custom icon. + # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ + # Nodeenv color. + typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70 + # Don't show Node version next to the environment name. + typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false + # Separate environment name from Node version only with a space. + typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############################[ node_version: node.js version ]############################### + # Node version color. + typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70 + # Show node version only when in a directory tree containing package.json. + typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ go_version: go version (https://golang.org) ]######################## + # Go version color. + typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37 + # Show go version only when in a go project subdirectory. + typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## + # Rust version color. + typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37 + # Show rust version only when in a rust project subdirectory. + typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ + # .NET version color. + typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134 + # Show .NET version only when in a .NET project subdirectory. + typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################[ php_version: php version (https://www.php.net/) ]###################### + # PHP version color. + typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99 + # Show PHP version only when in a PHP project subdirectory. + typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]########### + # Laravel version color. + typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161 + # Custom icon. + # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ####################[ java_version: java version (https://www.java.com/) ]#################### + # Java version color. + typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32 + # Show java version only when in a java project subdirectory. + typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true + # Show brief version. + typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false + # Custom icon. + # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]#### + # Package color. + typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117 + # Package format. The following parameters are available within the expansion. + # + # - P9K_PACKAGE_NAME The value of `name` field in package.json. + # - P9K_PACKAGE_VERSION The value of `version` field in package.json. + # + # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' + # Custom icon. + # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## + # Rbenv color. + typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168 + # Hide ruby version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) + # If set to false, hide ruby version if it's the same as global: + # $(rbenv version-name) == $(rbenv global). + typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide ruby version if it's equal to "system". + typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=false + # Custom icon. + # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## + # Rvm color. + typeset -g POWERLEVEL9K_RVM_FOREGROUND=168 + # Don't show @gemset at the end. + typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false + # Don't show ruby- at the front. + typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false + # Custom icon. + # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ + # Fvm color. + typeset -g POWERLEVEL9K_FVM_FOREGROUND=38 + # Custom icon. + # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### + # Lua color. + typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32 + # Hide lua version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) + # If set to false, hide lua version if it's the same as global: + # $(luaenv version-name) == $(luaenv global). + typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide lua version if it's equal to "system". + typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=false + # Custom icon. + # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ + # Java color. + typeset -g POWERLEVEL9K_JENV_FOREGROUND=32 + # Hide java version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) + # If set to false, hide java version if it's the same as global: + # $(jenv version-name) == $(jenv global). + typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide java version if it's equal to "system". + typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=false + # Custom icon. + # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ + # Perl color. + typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67 + # Hide perl version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) + # If set to false, hide perl version if it's the same as global: + # $(plenv version-name) == $(plenv global). + typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide perl version if it's equal to "system". + typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=false + # Custom icon. + # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############ + # Perlbrew color. + typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67 + # Show perlbrew version only when in a perl project subdirectory. + typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true + # Don't show "perl-" at the front. + typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false + # Custom icon. + # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############ + # PHP color. + typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99 + # Hide php version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) + # If set to false, hide php version if it's the same as global: + # $(phpenv version-name) == $(phpenv global). + typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide php version if it's equal to "system". + typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=false + # Custom icon. + # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]####### + # Scala color. + typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160 + # Hide scala version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) + # If set to false, hide scala version if it's the same as global: + # $(scalaenv version-name) == $(scalaenv global). + typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide scala version if it's equal to "system". + typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=false + # Custom icon. + # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### + # Haskell color. + typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172 + # Hide haskell version if it doesn't come from one of these sources. + # + # shell: version is set by STACK_YAML + # local: version is set by stack.yaml up the directory tree + # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml) + typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) + # If set to false, hide haskell version if it's the same as in the implicit global project. + typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true + # Custom icon. + # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# + # Show kubecontext only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show kubecontext. + typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold' + + # Kubernetes context classes for the purpose of using different colors, icons and expansions with + # different contexts. + # + # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current kubernetes context gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current kubernetes context is "deathray-testing/default", its class is TEST + # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134 + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='○' + + # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext + # segment. Parameter expansions are very flexible and fast, too. See reference: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. + # + # Within the expansion the following parameters are always available: + # + # - P9K_CONTENT The content that would've been displayed if there was no content + # expansion defined. + # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the + # output of `kubectl config get-contexts`. + # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the + # output of `kubectl config get-contexts`. + # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE + # in the output of `kubectl config get-contexts`. If there is no + # namespace, the parameter is set to "default". + # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the + # output of `kubectl config get-contexts`. + # + # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), + # the following extra parameters are available: + # + # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. + # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. + # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. + # + # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, + # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": + # + # - P9K_KUBECONTEXT_CLOUD_NAME=gke + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account + # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a + # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 + # + # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": + # + # - P9K_KUBECONTEXT_CLOUD_NAME=eks + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 + # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 + # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= + # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' + # Append the current context's namespace if it's not "default". + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' + + # Custom prefix. + typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat ' + + ################[ terraform: terraform workspace (https://www.terraform.io) ]################# + # Don't show terraform workspace if it's literally "default". + typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false + # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current terraform workspace gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' OTHER) + # + # If your current terraform workspace is "project_test", its class is TEST because "project_test" + # doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' OTHER) + typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38 + # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ terraform_version: terraform version (https://www.terraform.io) ]############## + # Terraform version color. + typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=38 + # Custom icon. + # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# + # Show aws only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show aws. + typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' + + # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current AWS profile gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_AWS_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current AWS profile is "company_test", its class is TEST + # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_AWS_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208 + # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # AWS segment format. The following parameters are available within the expansion. + # + # - P9K_AWS_PROFILE The name of the current AWS profile. + # - P9K_AWS_REGION The region associated with the current AWS profile. + typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}' + + #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# + # AWS Elastic Beanstalk environment color. + typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70 + # Custom icon. + typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='eb' + + ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## + # Show azure only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show azure. + typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' + # Azure account name color. + typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32 + # Custom icon. + typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='az' + + ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### + # Show gcloud only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show gcloud. + typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil' + # Google cloud color. + typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32 + + # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or + # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative + # enough. You can use the following parameters in the expansions. Each of them corresponds to the + # output of `gcloud` tool. + # + # Parameter | Source + # -------------------------|-------------------------------------------------------------------- + # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)' + # P9K_GCLOUD_ACCOUNT | gcloud config get-value account + # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project + # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)' + # + # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'. + # + # Obtaining project name requires sending a request to Google servers. This can take a long time + # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud + # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets + # set and gcloud prompt segment transitions to state COMPLETE. + # + # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL + # and COMPLETE. You can also hide gcloud in state PARTIAL by setting + # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and + # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty. + typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' + typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' + + # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name + # this often. Negative value disables periodic polling. In this mode project name is retrieved + # only when the current configuration, account or project id changes. + typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60 + + # Custom icon. + # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# + # Show google_app_cred only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show google_app_cred. + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' + + # Google application credentials classes for the purpose of using different colors, icons and + # expansions with different credentials. + # + # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first + # element in each pair defines a pattern against which the current kubernetes context gets + # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion + # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION + # parameters, you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. + # The first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( + # '*:*prod*:*' PROD + # '*:*test*:*' TEST + # '*' DEFAULT) + # + # If your current Google application credentials is "service_account deathray-testing x@y.com", + # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( + # '*:*prod*:*' PROD # These values are examples that are unlikely + # '*:*test*:*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32 + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by + # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. + # + # You can use the following parameters in the expansion. Each of them corresponds to one of the + # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. + # + # Parameter | JSON key file field + # ---------------------------------+--------------- + # P9K_GOOGLE_APP_CRED_TYPE | type + # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id + # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email + # + # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'. + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' + + ##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]############### + # Toolbox color. + typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=178 + # Don't display the name of the toolbox if it matches fedora-toolbox-*. + typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}' + # Custom icon. + # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%fin ' + + ###############################[ public_ip: public IP address ]############################### + # Public IP color. + typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94 + # Custom icon. + # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ########################[ vpn_ip: virtual private network indicator ]######################### + # VPN IP color. + typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81 + # When on VPN, show just an icon without the IP address. + # Tip: To display the private IP address when on VPN, remove the next line. + typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= + # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN + # to see the name of the interface. + typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*' + # If set to true, show one segment per matching network interface. If set to false, show only + # one segment corresponding to the first matching network interface. + # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION. + typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false + # Custom icon. + # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ ip: ip address and bandwidth usage for a specified network interface ]########### + # IP color. + typeset -g POWERLEVEL9K_IP_FOREGROUND=38 + # The following parameters are accessible within the expansion: + # + # Parameter | Meaning + # ----------------------+------------------------------------------- + # P9K_IP_IP | IP address + # P9K_IP_INTERFACE | network interface + # P9K_IP_RX_BYTES | total number of bytes received + # P9K_IP_TX_BYTES | total number of bytes sent + # P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt + # P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt + # P9K_IP_RX_RATE | receive rate (since last prompt) + # P9K_IP_TX_RATE | send rate (since last prompt) + typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP${P9K_IP_RX_RATE:+ %70F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %215F⇡$P9K_IP_TX_RATE}' + # Show information for the first network interface whose name matches this regular expression. + # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. + typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*' + # Custom icon. + # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #########################[ proxy: system-wide http/https/ftp proxy ]########################## + # Proxy color. + typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68 + # Custom icon. + # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################################[ battery: internal battery ]################################# + # Show battery in red when it's below this level and not connected to power supply. + typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 + typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160 + # Show battery in green when it's charging or fully charged. + typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70 + # Show battery in yellow when it's discharging. + typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178 + # Battery pictograms going from low to high level of charge. + typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{232}▁' '%K{232}▂' '%K{232}▃' '%K{232}▄' '%K{232}▅' '%K{232}▆' '%K{232}▇' '%K{232}█') + # Don't show the remaining time to charge/discharge. + typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false + + #####################################[ wifi: wifi speed ]##################################### + # WiFi color. + typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68 + # Custom icon. + # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS). + # + # # Wifi colors and icons for different signal strength levels (low to high). + # typeset -g my_wifi_fg=(68 68 68 68 68) # <-- change these values + # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values + # + # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' + # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' + # + # The following parameters are accessible within the expansions: + # + # Parameter | Meaning + # ----------------------+--------------- + # P9K_WIFI_SSID | service set identifier, a.k.a. network name + # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown + # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second + # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 + # P9K_WIFI_NOISE | noise in dBm, from -120 to 0 + # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) + + ####################################[ time: current time ]#################################### + # Current time color. + typeset -g POWERLEVEL9K_TIME_FOREGROUND=66 + # Format for the current time: 09:51:02. See `man 3 strftime`. + typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' + # If set to true, time will update when you hit enter. This way prompts for the past + # commands will contain the start times of their commands as opposed to the default + # behavior where they contain the end times of their preceding commands. + typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false + # Custom icon. + typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION= + # Custom prefix. + typeset -g POWERLEVEL9K_TIME_PREFIX='%fat ' + + # Example of a user-defined prompt segment. Function prompt_example will be called on every + # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or + # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user. + # + # Type `p10k help segment` for documentation and a more sophisticated example. + function prompt_example() { + p10k segment -f 208 -i '⭐' -t 'hello, %n' + } + + # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job + # is to generate the prompt segment for display in instant prompt. See + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # + # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function + # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k + # will replay these calls without actually calling instant_prompt_*. It is imperative that + # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this + # rule is not observed, the content of instant prompt will be incorrect. + # + # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If + # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. + function instant_prompt_example() { + # Since prompt_example always makes the same `p10k segment` calls, we can call it from + # instant_prompt_example. This will give us the same `example` prompt segment in the instant + # and regular prompts. + prompt_example + } + + # User-defined prompt segments can be customized the same way as built-in segments. + # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208 + # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt + # when accepting a command line. Supported values: + # + # - off: Don't change prompt when accepting a command line. + # - always: Trim down prompt when accepting a command line. + # - same-dir: Trim down prompt when accepting a command line unless this is the first command + # typed after changing current working directory. + typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off + + # Instant prompt mode. + # + # - off: Disable instant prompt. Choose this if you've tried instant prompt and found + # it incompatible with your zsh configuration files. + # - quiet: Enable instant prompt and don't print warnings when detecting console output + # during zsh initialization. Choose this if you've read and understood + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # - verbose: Enable instant prompt and print a warning when detecting console output during + # zsh initialization. Choose this if you've never tried instant prompt, haven't + # seen the warning, or if you are unsure what this all means. + typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose + + # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. + # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload + # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you + # really need it. + typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # If p10k is already loaded, reload configuration. + # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. + (( ! $+functions[p10k] )) || p10k reload +} + +# Tell `p10k configure` which file it should overwrite. +typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} + +(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} +'builtin' 'unset' 'p10k_config_opts' diff --git a/.devcontainer/.zshrc b/.devcontainer/.zshrc new file mode 100644 index 000000000..4409d75e6 --- /dev/null +++ b/.devcontainer/.zshrc @@ -0,0 +1,115 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + +# If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:/usr/local/bin:$PATH + +# Path to your oh-my-zsh installation. +export ZSH="$HOME/.oh-my-zsh" + +# Set name of the theme to load --- if set to "random", it will +# load a random theme each time oh-my-zsh is loaded, in which case, +# to know which specific one was loaded, run: echo $RANDOM_THEME +# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes +ZSH_THEME="powerlevel10k/powerlevel10k" + +# Set list of themes to pick from when loading at random +# Setting this variable when ZSH_THEME=random will cause zsh to load +# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/ +# If set to an empty array, this variable will have no effect. +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment the following line to disable bi-weekly auto-update checks. +# DISABLE_AUTO_UPDATE="true" + +# Uncomment the following line to automatically update without prompting. +# DISABLE_UPDATE_PROMPT="true" + +# Uncomment the following line to change how often to auto-update (in days). +# export UPDATE_ZSH_DAYS=13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS=true + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +# HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? +# Standard plugins can be found in ~/.oh-my-zsh/plugins/* +# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=( + git + zsh-syntax-highlighting + zsh-autosuggestions +) + +source $ZSH/oh-my-zsh.sh + +# User configuration + +# export MANPATH="/usr/local/man:$MANPATH" + +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + +POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true diff --git a/.devcontainer/devcontainer.env b/.devcontainer/devcontainer.env new file mode 100644 index 000000000..d1cc528a3 --- /dev/null +++ b/.devcontainer/devcontainer.env @@ -0,0 +1,64 @@ +# +# Rails environment +# +RAILS_ENV=development + +TZ=Australia/Melbourne + +# Student work location (in container) +DF_STUDENT_WORK_DIR=/student-work + +# Overseer - disabled! +OVERSEER_ENABLED=0 + +# Overseer - enabled! +# OVERSEER_ENABLED=1 +# RABBITMQ_HOSTNAME=doubtfire-mq +# RABBITMQ_USERNAME=secure_credentials +# RABBITMQ_PASSWORD=secure_credentials + +# Institution settings +DF_INSTITUTION_HOST=http://localhost:3000 +DF_INSTITUTION_PRODUCT_NAME=OnTrack + +# Database and auth related secrets +DF_SECRET_KEY_BASE=test-secret-key-test-secret-key! +DF_SECRET_KEY_ATTR=test-secret-key-test-secret-key! +DF_SECRET_KEY_DEVISE=test-secret-key-test-secret-key! + +# Authentication settings +DF_AUTH_METHOD=database + +# AAF settings - for testing on local host +DF_AAF_ISSUER_URL=https://rapid.test.aaf.edu.au +DF_AAF_AUDIENCE_URL=http://localhost:3000 +DF_AAF_CALLBACK_URL=http://localhost:3000/api/auth/jwt +DF_AAF_IDENTITY_PROVIDER_URL=https://signon-uat.deakin.edu.au/idp/shibboleth +DF_AAF_UNIQUE_URL=https://rapid.test.aaf.edu.au/jwt/authnrequest/research/Ag4EJJhjf0zXHqlKvKZEbg +DF_AAF_AUTH_SIGNOUT_URL=https://sync-uat.deakin.edu.au/auth/logout +DF_SECRET_KEY_AAF=v4~LMFLzzwRGZdju\5QBa@FiHIN9 + +# Database settings +DF_DEV_DB_ADAPTER=mysql2 +DF_DEV_DB_HOST=localhost +DF_DEV_DB_DATABASE=doubtfire-dev +DF_DEV_DB_USERNAME=dfire +DF_DEV_DB_PASSWORD=pwd + +# Database settings - for test env +DF_TEST_DB_ADAPTER=mysql2 +DF_TEST_DB_HOST=localhost +DF_TEST_DB_DATABASE=doubtfire-dev +DF_TEST_DB_USERNAME=dfire +DF_TEST_DB_PASSWORD=pwd + +# Database settings - for test env +DF_PRODUCTION_DB_ADAPTER=mysql2 +DF_PRODUCTION_DB_HOST=localhost +DF_PRODUCTION_DB_DATABASE=doubtfire-dev +DF_PRODUCTION_DB_USERNAME=dfire +DF_PRODUCTION_DB_PASSWORD=pwd + +# Mail settings +DF_MAIL_DELIVERY_METHOD=test + diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..c9755b86e --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,77 @@ +//devcontainer.json +{ + "name": "Formatif Development Container", + "image": "formatif-devcontainer:7.0-dev", + "runArgs": ["--env-file",".devcontainer/devcontainer.env"], + + // "dockerFile": "../dev.Dockerfile", + // "dockerComposeFile": "../development/docker-compose.yml", + // "service": "formatif-dev-container", + // "shutdownAction": "stopCompose", + // "workspaceFolder": "/workspace", + + "customizations": { + "vscode": { + "settings": { + "terminal.integrated.defaultProfile.linux": "zsh" + }, + + "extensions": [ + "dbaeumer.vscode-eslint", + "EditorConfig.EditorConfig", + "ms-vsliveshare.vsliveshare", + "ms-vsliveshare.vsliveshare-audio", + "ms-vsliveshare.vsliveshare-pack", + "rebornix.ruby", + "misogi.ruby-rubocop", + "castwide.solargraph", + "wingrunr21.vscode-ruby", + "vscode-icons-team.vscode-icons", + "cschlosser.doxdocgen", + "eamodio.gitlens", + "GitHub.vscode-pull-request-github", + "GitHub.copilot", + "Angular.ng-template", + "johnpapa.Angular2", + "ms-azuretools.vscode-docker" + ] + } + }, + + "mounts": [ + { + "source": "${localWorkspaceFolder}/data/database", + "target": "/var/lib/mysql", + "type": "bind" + }, + { + "source": "${localWorkspaceFolder}/data/tmp", + "target": "/workspace/tmp", + "type": "bind" + }, + { + "source": "${localWorkspaceFolder}/data/student-work", + "target": "/student-work", + "type": "bind" + }, + { + "source": "ws_node_modules", + "target": "/workspace/node_modules", + "type": "volume" + }, + { + "source": "web_node_modules", + "target": "/workspace/doubtfire-web/node_modules", + "type": "volume" + } + ], + + "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind", + "workspaceFolder": "/workspace", + + "forwardPorts": [3000,4200,9876], + + "postCreateCommand": "cp .devcontainer/.zshrc $HOME && cp .devcontainer/.p10k.zsh $HOME && echo 'Granting access to student work' && sudo find /student-work/* -exec chmod 777 {} \\;", + + "postStartCommand": "sudo ./.devcontainer/launch_db.sh mysqld" +} diff --git a/.devcontainer/launch_db.sh b/.devcontainer/launch_db.sh new file mode 100755 index 000000000..f201dffd0 --- /dev/null +++ b/.devcontainer/launch_db.sh @@ -0,0 +1,400 @@ +#!/bin/bash +set -eo pipefail +shopt -s nullglob + +# logging functions +mysql_log() { + local type="$1"; shift + printf '%s [%s] [Entrypoint]: %s\n' "$(date --rfc-3339=seconds)" "$type" "$*" +} +mysql_note() { + mysql_log Note "$@" +} +mysql_warn() { + mysql_log Warn "$@" >&2 +} +mysql_error() { + mysql_log ERROR "$@" >&2 + exit 1 +} + +# usage: file_env VAR [DEFAULT] +# ie: file_env 'XYZ_DB_PASSWORD' 'example' +# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of +# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) +file_env() { + local var="$1" + local fileVar="${var}_FILE" + local def="${2:-}" + if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then + mysql_error "Both $var and $fileVar are set (but are exclusive)" + fi + local val="$def" + if [ "${!var:-}" ]; then + val="${!var}" + elif [ "${!fileVar:-}" ]; then + val="$(< "${!fileVar}")" + fi + export "$var"="$val" + unset "$fileVar" +} + +# set MARIADB_xyz from MYSQL_xyz when MARIADB_xyz is unset +# and make them the same value (so user scripts can use either) +_mariadb_file_env() { + local var="$1"; shift + local maria="MARIADB_${var#MYSQL_}" + file_env "$var" "$@" + file_env "$maria" "${!var}" + if [ "${!maria:-}" ]; then + export "$var"="${!maria}" + fi +} + +# check to see if this file is being run or sourced from another script +_is_sourced() { + # https://unix.stackexchange.com/a/215279 + [ "${#FUNCNAME[@]}" -ge 2 ] \ + && [ "${FUNCNAME[0]}" = '_is_sourced' ] \ + && [ "${FUNCNAME[1]}" = 'source' ] +} + +# usage: docker_process_init_files [file [file [...]]] +# ie: docker_process_init_files /always-initdb.d/* +# process initializer files, based on file extensions +docker_process_init_files() { + # mysql here for backwards compatibility "${mysql[@]}" + mysql=( docker_process_sql ) + + echo + local f + for f; do + case "$f" in + *.sh) + # https://github.com/docker-library/postgres/issues/450#issuecomment-393167936 + # https://github.com/docker-library/postgres/pull/452 + if [ -x "$f" ]; then + mysql_note "$0: running $f" + "$f" + else + mysql_note "$0: sourcing $f" + . "$f" + fi + ;; + *.sql) mysql_note "$0: running $f"; docker_process_sql < "$f"; echo ;; + *.sql.gz) mysql_note "$0: running $f"; gunzip -c "$f" | docker_process_sql; echo ;; + *.sql.xz) mysql_note "$0: running $f"; xzcat "$f" | docker_process_sql; echo ;; + *.sql.zst) mysql_note "$0: running $f"; zstd -dc "$f" | docker_process_sql; echo ;; + *) mysql_warn "$0: ignoring $f" ;; + esac + echo + done +} + +# arguments necessary to run "mysqld --verbose --help" successfully (used for testing configuration validity and for extracting default/configured values) +_verboseHelpArgs=( + --verbose --help + --log-bin-index="$(mktemp -u)" # https://github.com/docker-library/mysql/issues/136 +) + +mysql_check_config() { + local toRun=( "$@" "${_verboseHelpArgs[@]}" ) errors + if ! errors="$("${toRun[@]}" 2>&1 >/dev/null)"; then + mysql_error $'mysqld failed while attempting to check config\n\tcommand was: '"${toRun[*]}"$'\n\t'"$errors" + fi +} + +# Fetch value from server config +# We use mysqld --verbose --help instead of my_print_defaults because the +# latter only show values present in config files, and not server defaults +mysql_get_config() { + local conf="$1"; shift + "$@" "${_verboseHelpArgs[@]}" 2>/dev/null \ + | awk -v conf="$conf" '$1 == conf && /^[^ \t]/ { sub(/^[^ \t]+[ \t]+/, ""); print; exit }' + # match "datadir /some/path with/spaces in/it here" but not "--xyz=abc\n datadir (xyz)" +} + +# Do a temporary startup of the MariaDB server, for init purposes +docker_temp_server_start() { + "$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF & + mysql_note "Waiting for server startup" + # only use the root password if the database has already been initializaed + # so that it won't try to fill in a password file when it hasn't been set yet + extraArgs=() + if [ -z "$DATABASE_ALREADY_EXISTS" ]; then + extraArgs+=( '--dont-use-mysql-root-password' ) + fi + local i + for i in {30..0}; do + if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &> /dev/null; then + break + fi + sleep 1 + done + if [ "$i" = 0 ]; then + mysql_error "Unable to start server." + fi +} + +# Stop the server. When using a local socket file mysqladmin will block until +# the shutdown is complete. +docker_temp_server_stop() { + if ! MYSQL_PWD=$MARIADB_ROOT_PASSWORD mysqladmin shutdown -uroot --socket="${SOCKET}"; then + mysql_error "Unable to shut down server." + fi +} + +# Verify that the minimally required password settings are set for new databases. +docker_verify_minimum_env() { + if [ -z "$MARIADB_ROOT_PASSWORD" -a -z "$MARIADB_ALLOW_EMPTY_ROOT_PASSWORD" -a -z "$MARIADB_RANDOM_ROOT_PASSWORD" ]; then + mysql_error $'Database is uninitialized and password option is not specified\n\tYou need to specify one of MARIADB_ROOT_PASSWORD, MARIADB_ALLOW_EMPTY_ROOT_PASSWORD and MARIADB_RANDOM_ROOT_PASSWORD' + fi +} + +# creates folders for the database +# also ensures permission for user mysql of run as root +docker_create_db_directories() { + local user; user="$(id -u)" + + # TODO other directories that are used by default? like /var/lib/mysql-files + # see https://github.com/docker-library/mysql/issues/562 + mkdir -p "$DATADIR" + + if [ "$user" = "0" ]; then + # this will cause less disk access than `chown -R` + find "$DATADIR" \! -user mysql -exec chown mysql '{}' + + # See https://github.com/MariaDB/mariadb-docker/issues/363 + find "${SOCKET%/*}" -maxdepth 0 \! -user mysql -exec chown mysql '{}' \; + fi +} + +# initializes the database directory +docker_init_database_dir() { + mysql_note "Initializing database files" + installArgs=( --datadir="$DATADIR" --rpm --auth-root-authentication-method=normal ) + if { mysql_install_db --help || :; } | grep -q -- '--skip-test-db'; then + # 10.3+ + installArgs+=( --skip-test-db ) + fi + # "Other options are passed to mysqld." (so we pass all "mysqld" arguments directly here) + mysql_install_db "${installArgs[@]}" "${@:2}" --default-time-zone=SYSTEM --enforce-storage-engine= + mysql_note "Database files initialized" +} + +# Loads various settings that are used elsewhere in the script +# This should be called after mysql_check_config, but before any other functions +docker_setup_env() { + # Get config + declare -g DATADIR SOCKET + DATADIR="$(mysql_get_config 'datadir' "$@")" + SOCKET="$(mysql_get_config 'socket' "$@")" + + + # Initialize values that might be stored in a file + _mariadb_file_env 'MYSQL_ROOT_HOST' '%' + _mariadb_file_env 'MYSQL_DATABASE' + _mariadb_file_env 'MYSQL_USER' + _mariadb_file_env 'MYSQL_PASSWORD' + _mariadb_file_env 'MYSQL_ROOT_PASSWORD' + + # set MARIADB_ from MYSQL_ when it is unset and then make them the same value + : "${MARIADB_ALLOW_EMPTY_ROOT_PASSWORD:=${MYSQL_ALLOW_EMPTY_PASSWORD:-}}" + export MYSQL_ALLOW_EMPTY_PASSWORD="$MARIADB_ALLOW_EMPTY_ROOT_PASSWORD" MARIADB_ALLOW_EMPTY_ROOT_PASSWORD + : "${MARIADB_RANDOM_ROOT_PASSWORD:=${MYSQL_RANDOM_ROOT_PASSWORD:-}}" + export MYSQL_RANDOM_ROOT_PASSWORD="$MARIADB_RANDOM_ROOT_PASSWORD" MARIADB_RANDOM_ROOT_PASSWORD + : "${MARIADB_INITDB_SKIP_TZINFO:=${MYSQL_INITDB_SKIP_TZINFO:-}}" + export MYSQL_INITDB_SKIP_TZINFO="$MARIADB_INITDB_SKIP_TZINFO" MARIADB_INITDB_SKIP_TZINFO + + declare -g DATABASE_ALREADY_EXISTS + if [ -d "$DATADIR/mysql" ]; then + DATABASE_ALREADY_EXISTS='true' + fi +} + +# Execute the client, use via docker_process_sql to handle root password +docker_exec_client() { + # args sent in can override this db, since they will be later in the command + if [ -n "$MYSQL_DATABASE" ]; then + set -- --database="$MYSQL_DATABASE" "$@" + fi + mysql --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" "$@" +} + +# Execute sql script, passed via stdin +# usage: docker_process_sql [--dont-use-mysql-root-password] [mysql-cli-args] +# ie: docker_process_sql --database=mydb <<<'INSERT ...' +# ie: docker_process_sql --dont-use-mysql-root-password --database=mydb /dev/null + + docker_init_database_dir "$@" + + mysql_note "Starting temporary server" + docker_temp_server_start "$@" + mysql_note "Temporary server started." + + docker_setup_db + docker_process_init_files /docker-entrypoint-initdb.d/* + + mysql_note "Stopping temporary server" + docker_temp_server_stop + mysql_note "Temporary server stopped" + + echo + mysql_note "MariaDB init process done. Ready for start up." + echo + fi + fi + exec "$@" +} + +# If we are sourced from elsewhere, don't perform any further actions +if ! _is_sourced; then + _main "$@" +fi diff --git a/dev.Dockerfile b/dev.Dockerfile new file mode 100644 index 000000000..19666173d --- /dev/null +++ b/dev.Dockerfile @@ -0,0 +1,107 @@ +FROM mcr.microsoft.com/devcontainers/ruby:3.1-bullseye + +# DEBIAN_FRONTEND=noninteractive is required to install tzdata in non interactive way +ENV DEBIAN_FRONTEND noninteractive +ENV USER='vscode' +ENV NODE_VERSION 18.12.1 +ENV NODE_ENV docker +ENV NPM_CONFIG_PREFIX="/home/${USER}/.npm-global" + +COPY --chown="${USER}":"${USER}" doubtfire-api/.ci-setup/ /workspace/doubtfire-api/.ci-setup/ + +RUN apt-get update \ + && apt-get install -y \ + ffmpeg \ + ghostscript \ + imagemagick \ + libmagic-dev \ + libmagickwand-dev \ + libmariadb-dev \ + python3-pygments \ + tzdata \ + wget \ + libc6-dev \ + mariadb-server \ + gosu \ + && ARCH= && dpkgArch="$(dpkg --print-architecture)" \ + && case "${dpkgArch##*-}" in \ + amd64) ARCH='x64';; \ + ppc64el) ARCH='ppc64le';; \ + s390x) ARCH='s390x';; \ + arm64) ARCH='arm64';; \ + armhf) ARCH='armv7l';; \ + i386) ARCH='x86';; \ + *) echo "unsupported architecture"; exit 1 ;; \ + esac \ + # gpg keys listed at https://github.com/nodejs/node#release-keys + && set -ex \ + && for key in \ + 4ED778F539E3634C779C87C6D7062848A1AB005C \ + 141F07595B7B3FFE74309A937405533BE57C7D57 \ + 74F12602B6F1C4E913FAA37AD3A89613643B6201 \ + 61FC681DFB92A079F1685E77973F295594EC4689 \ + 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \ + C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ + 890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 \ + C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \ + 108F52B48DB57BB0CC439B2997B01419BD92F80A \ + ; do \ + gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \ + done \ + && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \ + && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ + && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \ + && grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \ + && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \ + && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ + && ln -s /usr/local/bin/node /usr/local/bin/nodejs \ + # smoke tests + && node --version \ + && npm --version \ + && gem install bundler -v '~> 2.3.18' \ + && /workspace/doubtfire-api/.ci-setup/texlive-install.sh \ + && rm -rf /workspace/doubtfire-api/.ci-setup/texlive-install.sh \ + && rm -rf /install-tl-* \ + && mkdir /run/mysqld + +USER "${USER}" + +WORKDIR /workspace + +COPY --chown="${USER}":"${USER}" package.json /workspace +RUN mkdir -p "${NPM_CONFIG_PREFIX}/lib" \ + && npm install -g npm@9.2.0 \ + && npm --global config set user "${USER}" \ + && npm install -g husky --save-dev + +RUN npm install + +# Install oh-my-zsh, powerlevel10k theme, and plugins +RUN git clone https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k \ + && git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting \ + && git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions + +ENV RAILS_ENV development +ENV PATH /tmp/texlive/bin/x86_64-linux:/tmp/texlive/bin/aarch64-linux:$PATH + +WORKDIR /workspace/doubtfire-web +COPY --chown="${USER}":"${USER}" doubtfire-web/package.json /workspace/doubtfire-web + +# Install web ui packages +RUN npm install + +# Setup the folder where we will deploy the code +WORKDIR /workspace/doubtfire-api + +COPY --chown="${USER}":"${USER}" doubtfire-api/Gemfile /workspace/doubtfire-api/Gemfile +COPY --chown="${USER}":"${USER}" doubtfire-api/Gemfile.lock /workspace/doubtfire-api/Gemfile.lock + +RUN bundle install \ + && npx husky install + +WORKDIR /workspace + +RUN sudo ln -s /workspace/doubtfire-api /doubtfire + +EXPOSE 9876 diff --git a/development/api.env b/development/api.env index 27e6f4ad8..72c33f9c5 100644 --- a/development/api.env +++ b/development/api.env @@ -5,27 +5,26 @@ RAILS_ENV=development TZ=Australia/Melbourne -# Database settings -DF_DEV_DB_ADAPTER=mysql2 -DF_DEV_DB_HOST=doubtfire-dev-db -DF_DEV_DB_DATABASE=doubtfire-dev -DF_DEV_DB_USERNAME=dfire -DF_DEV_DB_PASSWORD=pwd - -# Database and auth related secrets -DF_SECRET_KEY_BASE=test-secret-key-test-secret-key! -DF_SECRET_KEY_ATTR=test-secret-key-test-secret-key! -DF_SECRET_KEY_DEVISE=test-secret-key-test-secret-key! - # Student work location (in container) DF_STUDENT_WORK_DIR=/student-work +# Overseer - disabled! +OVERSEER_ENABLED: 0 + +# Overseer - enabled! +# OVERSEER_ENABLED: 1 +# RABBITMQ_HOSTNAME: doubtfire-mq +# RABBITMQ_USERNAME: secure_credentials +# RABBITMQ_PASSWORD: secure_credentials + # Institution settings DF_INSTITUTION_HOST=http://localhost:3000 DF_INSTITUTION_PRODUCT_NAME=OnTrack -# Mail settings -DF_MAIL_DELIVERY_METHOD=test +# Database and auth related secrets +DF_SECRET_KEY_BASE=test-secret-key-test-secret-key! +DF_SECRET_KEY_ATTR=test-secret-key-test-secret-key! +DF_SECRET_KEY_DEVISE=test-secret-key-test-secret-key! # Authentication settings DF_AUTH_METHOD=database @@ -38,3 +37,28 @@ DF_AAF_IDENTITY_PROVIDER_URL=https://signon-uat.deakin.edu.au/idp/shibboleth DF_AAF_UNIQUE_URL=https://rapid.test.aaf.edu.au/jwt/authnrequest/research/Ag4EJJhjf0zXHqlKvKZEbg DF_AAF_AUTH_SIGNOUT_URL=https://sync-uat.deakin.edu.au/auth/logout DF_SECRET_KEY_AAF=v4~LMFLzzwRGZdju\5QBa@FiHIN9 + +# Database settings +DF_DEV_DB_ADAPTER=mysql2 +DF_DEV_DB_HOST=localhost +DF_DEV_DB_DATABASE=doubtfire-dev +DF_DEV_DB_USERNAME=dfire +DF_DEV_DB_PASSWORD=pwd + +# Database settings - for test env +DF_TEST_DB_ADAPTER=mysql2 +DF_TEST_DB_HOST=localhost +DF_TEST_DB_DATABASE=doubtfire-dev +DF_TEST_DB_USERNAME=dfire +DF_TEST_DB_PASSWORD=pwd + +# Database settings - for test env +DF_PRODUCTION_DB_ADAPTER=mysql2 +DF_PRODUCTION_DB_HOST=localhost +DF_PRODUCTION_DB_DATABASE=doubtfire-dev +DF_PRODUCTION_DB_USERNAME=dfire +DF_PRODUCTION_DB_PASSWORD=pwd + +# Mail settings +DF_MAIL_DELIVERY_METHOD=test + diff --git a/development/build.sh b/development/build.sh index 10c1fc13a..d200fc156 100755 --- a/development/build.sh +++ b/development/build.sh @@ -11,13 +11,15 @@ echo "Update this in ${my_dir}/version.sh as well as in the docker-compose.yml f echo echo "Run publish.sh when you are ready to push the new images to docker hub." echo -echo "You are on branch: ${CURRENT_BRANCH}" -echo "You are building api version: ${CURRENT_API_VERSION}" -echo "You are building web version: ${CURRENT_WEB_VERSION}" +echo " You are on branch: ${CURRENT_BRANCH}" +echo " api version: ${CURRENT_API_VERSION}" +echo " web version: ${CURRENT_WEB_VERSION}" +echo " dev container version: ${CURRENT_WEB_VERSION}" echo echo "This will produce docker images with the following names" echo " - lmsdoubtfire/doubtfire-api:${CURRENT_API_VERSION}-dev" echo " - lmsdoubtfire/doubtfire-web:${CURRENT_WEB_VERSION}-dev" +echo " - lmsdoubtfire/formatif-devcontainer:${CURRENT_DEV_VERSION}-dev" # echo " - lmsdoubtfire/doubtfire-overseer:${CURRENT_BRANCH}-dev" echo @@ -26,16 +28,18 @@ read -p "Enter to continue..." function build_image { NAME=$1 VERSION=$2 + FOLDER=$3 + DOCKERFILE=$4 echo "Setting up build for $NAME" echo - cd ../${NAME} + cd ${FOLDER} docker image rm "${NAME}:${VERSION}-dev" 2>/dev/null docker image rm "lmsdoubtfire/${NAME}:${VERSION}-dev" 2>/dev/null - docker build -t "${NAME}:${VERSION}-dev" . + docker build -f "${DOCKERFILE}" -t "${NAME}:${VERSION}-dev" . if [ $? -ne 0 ]; then echo "Ensure that everything builds"; exit 1 @@ -48,6 +52,9 @@ function build_image { fi } -build_image "doubtfire-api" "${CURRENT_API_VERSION}" -build_image "doubtfire-web" "${CURRENT_WEB_VERSION}" -# build_image "doubtfire-overseer" \ No newline at end of file + +# build_image "doubtfire-api" "${CURRENT_API_VERSION}" "../doubtfire-api" "Dockerfile" +# build_image "doubtfire-web" "${CURRENT_WEB_VERSION}" "../doubtfire-web" "Dockerfile" +# # build_image "doubtfire-overseer" + +build_image "formatif-devcontainer" "${CURRENT_DEV_VERSION}" "../" "dev.Dockerfile" diff --git a/development/docker-compose.full.yml b/development/docker-compose.full.yml index 0b8d3bfc7..a4102507b 100644 --- a/development/docker-compose.full.yml +++ b/development/docker-compose.full.yml @@ -41,6 +41,7 @@ services: overseer-receive: image: lmsdoubtfire/doubtfire-api:development-dev + build: ../doubtfire-api env_file: - api.env - overseer.env diff --git a/development/docker-compose.yml b/development/docker-compose.yml index d708b4723..e9d0e229c 100644 --- a/development/docker-compose.yml +++ b/development/docker-compose.yml @@ -1,5 +1,26 @@ version: '3' services: + formatif-dev-container: + container_name: formatif-dev-container + build: + context: ../ + dockerfile: dev.Dockerfile + volumes: + # Mounts the project folder to '/workspace'. While this file is in .devcontainer, + # mounts are relative to the first file in the list, which is a level up. + - ..:/workspace:cached + - ../data/tmp:/workspace/tmp + - ../data/student-work:/student-work + - ws_node_modules:/workspace/node_modules + - web_node_modules:/workspace/doubtfire-web/node_modules + - ../data/database:/var/lib/mysql + ports: + - "9876:9876" + # Overrides default command so things don't shut down after the process ends. + command: /bin/sh -c "while sleep 5000; do :; done" + env_file: + - api.env + dev-db: container_name: doubtfire-dev-db image: mariadb @@ -82,3 +103,7 @@ services: - doubtfire-api volumes: - ../doubtfire-web:/doubtfire-web + +volumes: + ws_node_modules: + web_node_modules: diff --git a/development/version.sh b/development/version.sh index 9e04c7537..e800386a7 100644 --- a/development/version.sh +++ b/development/version.sh @@ -6,3 +6,4 @@ # Non-breaking changes should increment the minor version. export CURRENT_API_VERSION=7.0 export CURRENT_WEB_VERSION=7.0 +export CURRENT_DEV_VERSION=7.0 From 632839840652ab77ffe6a00d258261de5cc2890f Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Sun, 8 Jan 2023 09:04:07 +1100 Subject: [PATCH 09/54] build: add redis support and update gem config - provide redis in the dev container - update bundler to 2.4 - move gems from root user to vscode user --- .devcontainer/devcontainer.json | 11 +++++++++-- .devcontainer/docker-entrypoint.sh | 11 +++++++++++ dev.Dockerfile | 18 ++++++++++++++++-- 3 files changed, 36 insertions(+), 4 deletions(-) create mode 100755 .devcontainer/docker-entrypoint.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c9755b86e..b629e4211 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -63,6 +63,11 @@ "source": "web_node_modules", "target": "/workspace/doubtfire-web/node_modules", "type": "volume" + }, + { + "source": "api_bundle", + "target": "/home/vscode/.gems", + "type": "volume" } ], @@ -71,7 +76,9 @@ "forwardPorts": [3000,4200,9876], - "postCreateCommand": "cp .devcontainer/.zshrc $HOME && cp .devcontainer/.p10k.zsh $HOME && echo 'Granting access to student work' && sudo find /student-work/* -exec chmod 777 {} \\;", + "postCreateCommand": "cp .devcontainer/.zshrc $HOME && cp .devcontainer/.p10k.zsh $HOME && echo 'Granting access to student work' && sudo find /student-work/* -exec chmod 777 {} \\; &", - "postStartCommand": "sudo ./.devcontainer/launch_db.sh mysqld" + // "postStartCommand": "sudo ./.devcontainer/launch_db.sh mysqld & sudo ./.devcontainer/launch_redis.sh" + "postStartCommand": "git config --global --add safe.directory /workspace/doubtfire-api && git config --global --add safe.directory /workspace/doubtfire-web && git config --global --add safe.directory /workspace", + "overrideCommand": false } diff --git a/.devcontainer/docker-entrypoint.sh b/.devcontainer/docker-entrypoint.sh new file mode 100755 index 000000000..4d47a3610 --- /dev/null +++ b/.devcontainer/docker-entrypoint.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +echo "Starting Formatif development container..." + +# Start the redis server +redis-server & + +# Start mysql +sudo /workspace/.devcontainer/launch_db.sh mysqld & + +exec "$@" diff --git a/dev.Dockerfile b/dev.Dockerfile index 19666173d..ce0444060 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -6,11 +6,15 @@ ENV USER='vscode' ENV NODE_VERSION 18.12.1 ENV NODE_ENV docker ENV NPM_CONFIG_PREFIX="/home/${USER}/.npm-global" +ENV BUNDLE_PATH=/home/${USER}/.gems COPY --chown="${USER}":"${USER}" doubtfire-api/.ci-setup/ /workspace/doubtfire-api/.ci-setup/ -RUN apt-get update \ +RUN curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg \ + && echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list \ + && apt-get update \ && apt-get install -y \ + lsb-release \ ffmpeg \ ghostscript \ imagemagick \ @@ -23,6 +27,8 @@ RUN apt-get update \ libc6-dev \ mariadb-server \ gosu \ + redis \ + && apt-get clean \ && ARCH= && dpkgArch="$(dpkg --print-architecture)" \ && case "${dpkgArch##*-}" in \ amd64) ARCH='x64';; \ @@ -59,7 +65,7 @@ RUN apt-get update \ # smoke tests && node --version \ && npm --version \ - && gem install bundler -v '~> 2.3.18' \ + && gem install bundler -v '~> 2.4.3' \ && /workspace/doubtfire-api/.ci-setup/texlive-install.sh \ && rm -rf /workspace/doubtfire-api/.ci-setup/texlive-install.sh \ && rm -rf /install-tl-* \ @@ -105,3 +111,11 @@ WORKDIR /workspace RUN sudo ln -s /workspace/doubtfire-api /doubtfire EXPOSE 9876 + +ENV PATH=/home/$USER/.gems/ruby/3.1.0/bin:$PATH +ENV GEM_PATH=/home/$USER/.gems/ruby/3.1.0:$GEM_PATH + +COPY .devcontainer/docker-entrypoint.sh / +RUN sudo chmod +x /docker-entrypoint.sh +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "sleep", "infinity" ] From 57992670cfb63ceeef2e171ef17fa610056efbb8 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Tue, 24 Jan 2023 17:50:08 +1100 Subject: [PATCH 10/54] feat: build and populate database in dev container When the database is missing, the dev container will create the database, populate it with students, and simulate sign off. --- .devcontainer/devcontainer.env | 6 ++++++ .devcontainer/docker-entrypoint.sh | 7 +++++-- .devcontainer/launch_db.sh | 2 ++ .devcontainer/setup_formatif_db.sh | 16 ++++++++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100755 .devcontainer/setup_formatif_db.sh diff --git a/.devcontainer/devcontainer.env b/.devcontainer/devcontainer.env index d1cc528a3..044a31ea2 100644 --- a/.devcontainer/devcontainer.env +++ b/.devcontainer/devcontainer.env @@ -62,3 +62,9 @@ DF_PRODUCTION_DB_PASSWORD=pwd # Mail settings DF_MAIL_DELIVERY_METHOD=test +# MariaDB Details +MYSQL_ROOT_PASSWORD=db-root-password +MYSQL_DATABASE=doubtfire-dev +MYSQL_USER=dfire +MYSQL_PASSWORD=pwd + diff --git a/.devcontainer/docker-entrypoint.sh b/.devcontainer/docker-entrypoint.sh index 4d47a3610..2233fee2a 100755 --- a/.devcontainer/docker-entrypoint.sh +++ b/.devcontainer/docker-entrypoint.sh @@ -2,10 +2,13 @@ echo "Starting Formatif development container..." +# Start mysql +sudo -E /workspace/.devcontainer/launch_db.sh mysqld & + # Start the redis server redis-server & -# Start mysql -sudo /workspace/.devcontainer/launch_db.sh mysqld & +# Wait for mysql to start then setup the database if needed +/workspace/.devcontainer/setup_formatif_db.sh & exec "$@" diff --git a/.devcontainer/launch_db.sh b/.devcontainer/launch_db.sh index f201dffd0..bbcb9a356 100755 --- a/.devcontainer/launch_db.sh +++ b/.devcontainer/launch_db.sh @@ -370,6 +370,8 @@ _main() { if [ -z "$DATABASE_ALREADY_EXISTS" ]; then docker_verify_minimum_env + mkdir /docker-entrypoint-initdb.d/ + # check dir permissions to reduce likelihood of half-initialized database ls /docker-entrypoint-initdb.d/ > /dev/null diff --git a/.devcontainer/setup_formatif_db.sh b/.devcontainer/setup_formatif_db.sh new file mode 100755 index 000000000..926dc7d5c --- /dev/null +++ b/.devcontainer/setup_formatif_db.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Wait for mysql to start +delay 5 + +if [[ "`mysql --user=root --password="${MYSQL_ROOT_PASSWORD}" -qfsBNe "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema='${MYSQL_DATABASE}';" 2>&1`" -gt 0 ]]; +then + echo "Database already exists" +else + echo "Creating and populating database" + cd /workspace/doubtfire-api + bundle exec rake db:populate + + echo "Simulating sign off" + bundle exec rake db:simulate_signoff +fi From aa59183e783f5dad66badef9aeaf4ac0473fc852 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Sat, 28 Jan 2023 09:15:53 +1100 Subject: [PATCH 11/54] chore: setup data structure --- .gitignore | 4 +++- data/.gitkeep | 0 data/database/.gitkeep | 0 data/overseer-instances/.gitkeep | 0 data/overseer-instances/1/.gitkeep | 0 data/student-work/.gitkeep | 0 data/tmp/.gitkeep | 0 7 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 data/.gitkeep create mode 100644 data/database/.gitkeep create mode 100644 data/overseer-instances/.gitkeep create mode 100644 data/overseer-instances/1/.gitkeep create mode 100644 data/student-work/.gitkeep create mode 100644 data/tmp/.gitkeep diff --git a/.gitignore b/.gitignore index 25f4b9fc1..5c46ce646 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ /tmp/ -/data/ +/data/** +!/data/**/ +!/data/**/.gitkeep /node_modules/ # Created by https://www.toptal.com/developers/gitignore/api/macos diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/data/database/.gitkeep b/data/database/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/data/overseer-instances/.gitkeep b/data/overseer-instances/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/data/overseer-instances/1/.gitkeep b/data/overseer-instances/1/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/data/student-work/.gitkeep b/data/student-work/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/data/tmp/.gitkeep b/data/tmp/.gitkeep new file mode 100644 index 000000000..e69de29bb From ddb0ed5817fd3aa30936ba132cc7c017ce1a98c3 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Sat, 28 Jan 2023 20:38:19 +1100 Subject: [PATCH 12/54] build: enhance devcontainer - ensure database launches - create database when not present - retain zsh history for the project - add docker compose for testing devcontainer - add build script to create devcontainer image - add husky to root project --- .devcontainer/.zshrc | 3 + .devcontainer/build.sh | 55 +++ .devcontainer/devcontainer.env | 1 - .devcontainer/devcontainer.json | 11 +- .devcontainer/docker-compose.yml | 29 ++ .devcontainer/docker-entrypoint.sh | 7 +- .devcontainer/launch_db.sh | 592 +++++++++++++++-------------- .devcontainer/post_create.sh | 11 + .devcontainer/post_start.sh | 7 + .devcontainer/setup_formatif_db.sh | 62 ++- dev.Dockerfile | 14 +- development/build.sh | 10 +- development/docker-compose.yml | 21 - doubtfire-api | 2 +- doubtfire-web | 2 +- package-lock.json | 24 +- package.json | 4 +- 17 files changed, 492 insertions(+), 363 deletions(-) create mode 100755 .devcontainer/build.sh create mode 100644 .devcontainer/docker-compose.yml create mode 100755 .devcontainer/post_create.sh create mode 100755 .devcontainer/post_start.sh diff --git a/.devcontainer/.zshrc b/.devcontainer/.zshrc index 4409d75e6..c1ef0d3c9 100644 --- a/.devcontainer/.zshrc +++ b/.devcontainer/.zshrc @@ -79,6 +79,7 @@ plugins=( git zsh-syntax-highlighting zsh-autosuggestions + z ) source $ZSH/oh-my-zsh.sh @@ -109,6 +110,8 @@ source $ZSH/oh-my-zsh.sh # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" +export HISTFILE=/workspace/tmp/.zsh_history + # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh diff --git a/.devcontainer/build.sh b/.devcontainer/build.sh new file mode 100755 index 000000000..f820cb73d --- /dev/null +++ b/.devcontainer/build.sh @@ -0,0 +1,55 @@ +#!/bin/sh +my_dir="$(dirname "$0")" +source "${my_dir}/../development/version.sh" + +CURRENT_BRANCH=$(git branch --show-current) + +echo "This script will create new development container images for Doubtfire" +echo +echo "When there are changes to the configuration or dependencies of a container, the version should be incremented." +echo "Update this in ${my_dir}/version.sh as well as in the docker-compose.yml file in the development folder." +echo +echo "Run publish.sh when you are ready to push the new images to docker hub." +echo +echo " You are on branch: ${CURRENT_BRANCH}" +echo " dev container version: ${CURRENT_WEB_VERSION}" +echo +echo "This will produce docker images with the following names" +echo " - lmsdoubtfire/formatif-devcontainer:${CURRENT_DEV_VERSION}-dev" +echo + +read -p "Enter to continue..." + +function build_image { + NAME=$1 + VERSION=$2 + FOLDER=$3 + DOCKERFILE=$4 + + echo "Setting up build for $NAME" + echo + + cd ${FOLDER} + + docker image rm "${NAME}:${VERSION}-dev" 2>/dev/null + docker image rm "lmsdoubtfire/${NAME}:${VERSION}-dev" 2>/dev/null + + docker build -f "${DOCKERFILE}" -t "${NAME}:${VERSION}-dev" . + if [ $? -ne 0 ]; then + echo "Ensure that everything builds"; + exit 1 + fi + + docker tag "${NAME}:${VERSION}-dev" "lmsdoubtfire/${NAME}:${VERSION}-dev" + if [ $? -ne 0 ]; then + echo "Tag failed..."; + exit 1 + fi +} + +build_image "formatif-devcontainer" "${CURRENT_DEV_VERSION}" "../" "dev.Dockerfile" + +echo +echo "Test using:" +echo "docker compose run --rm formatif-dev-container /bin/zsh" +echo diff --git a/.devcontainer/devcontainer.env b/.devcontainer/devcontainer.env index 044a31ea2..104ee7734 100644 --- a/.devcontainer/devcontainer.env +++ b/.devcontainer/devcontainer.env @@ -67,4 +67,3 @@ MYSQL_ROOT_PASSWORD=db-root-password MYSQL_DATABASE=doubtfire-dev MYSQL_USER=dfire MYSQL_PASSWORD=pwd - diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b629e4211..a845522dc 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -33,7 +33,9 @@ "GitHub.copilot", "Angular.ng-template", "johnpapa.Angular2", - "ms-azuretools.vscode-docker" + "ms-azuretools.vscode-docker", + "esbenp.prettier-vscode", + "foxundermoon.shell-format" ] } }, @@ -76,9 +78,8 @@ "forwardPorts": [3000,4200,9876], - "postCreateCommand": "cp .devcontainer/.zshrc $HOME && cp .devcontainer/.p10k.zsh $HOME && echo 'Granting access to student work' && sudo find /student-work/* -exec chmod 777 {} \\; &", + "postCreateCommand": "/workspace/.devcontainer/post_create.sh", + "postStartCommand": "/workspace/.devcontainer/post_start.sh", - // "postStartCommand": "sudo ./.devcontainer/launch_db.sh mysqld & sudo ./.devcontainer/launch_redis.sh" - "postStartCommand": "git config --global --add safe.directory /workspace/doubtfire-api && git config --global --add safe.directory /workspace/doubtfire-web && git config --global --add safe.directory /workspace", - "overrideCommand": false + "overrideCommand": true } diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 000000000..5bfa36d79 --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,29 @@ +version: '3' +services: + formatif-dev-container: + container_name: formatif-dev-container + image: formatif-devcontainer:7.0-dev + build: + context: ../ + dockerfile: dev.Dockerfile + volumes: + # Mounts the project folder to '/workspace'. While this file is in .devcontainer, + # mounts are relative to the first file in the list, which is a level up. + - ..:/workspace:cached + - ../data/tmp:/workspace/tmp + - ../data/student-work:/student-work + - ws_node_modules:/workspace/node_modules + - web_node_modules:/workspace/doubtfire-web/node_modules + - ../data/database:/var/lib/mysql + ports: + - "9876:9876" + - "4200:4200" + - "3000:3000" + # Overrides default command so things don't shut down after the process ends. + command: /bin/sh -c "while sleep 5000; do :; done" + env_file: + - devcontainer.env + +volumes: + ws_node_modules: + web_node_modules: diff --git a/.devcontainer/docker-entrypoint.sh b/.devcontainer/docker-entrypoint.sh index 2233fee2a..94ff73982 100755 --- a/.devcontainer/docker-entrypoint.sh +++ b/.devcontainer/docker-entrypoint.sh @@ -3,12 +3,13 @@ echo "Starting Formatif development container..." # Start mysql -sudo -E /workspace/.devcontainer/launch_db.sh mysqld & +sudo -E /workspace/.devcontainer/launch_db.sh mysqld # Start the redis server -redis-server & +mkdir -p /workspace/tmp/sidekiq-redis +redis-server --dir /workspace/tmp/sidekiq-redis >>/workspace/tmp/redis.log 2>>/workspace/tmp/redis.log & # Wait for mysql to start then setup the database if needed -/workspace/.devcontainer/setup_formatif_db.sh & +/workspace/.devcontainer/setup_formatif_db.sh exec "$@" diff --git a/.devcontainer/launch_db.sh b/.devcontainer/launch_db.sh index bbcb9a356..9bb957fd4 100755 --- a/.devcontainer/launch_db.sh +++ b/.devcontainer/launch_db.sh @@ -4,18 +4,19 @@ shopt -s nullglob # logging functions mysql_log() { - local type="$1"; shift - printf '%s [%s] [Entrypoint]: %s\n' "$(date --rfc-3339=seconds)" "$type" "$*" + local type="$1" + shift + printf '%s [%s] [Entrypoint]: %s\n' "$(date --rfc-3339=seconds)" "$type" "$*" } mysql_note() { - mysql_log Note "$@" + mysql_log Note "$@" } mysql_warn() { - mysql_log Warn "$@" >&2 + mysql_log Warn "$@" >&2 } mysql_error() { - mysql_log ERROR "$@" >&2 - exit 1 + mysql_log ERROR "$@" >&2 + exit 1 } # usage: file_env VAR [DEFAULT] @@ -23,201 +24,219 @@ mysql_error() { # (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of # "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) file_env() { - local var="$1" - local fileVar="${var}_FILE" - local def="${2:-}" - if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then - mysql_error "Both $var and $fileVar are set (but are exclusive)" - fi - local val="$def" - if [ "${!var:-}" ]; then - val="${!var}" - elif [ "${!fileVar:-}" ]; then - val="$(< "${!fileVar}")" - fi - export "$var"="$val" - unset "$fileVar" + local var="$1" + local fileVar="${var}_FILE" + local def="${2:-}" + if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then + mysql_error "Both $var and $fileVar are set (but are exclusive)" + fi + local val="$def" + if [ "${!var:-}" ]; then + val="${!var}" + elif [ "${!fileVar:-}" ]; then + val="$(<"${!fileVar}")" + fi + export "$var"="$val" + unset "$fileVar" } # set MARIADB_xyz from MYSQL_xyz when MARIADB_xyz is unset # and make them the same value (so user scripts can use either) _mariadb_file_env() { - local var="$1"; shift - local maria="MARIADB_${var#MYSQL_}" - file_env "$var" "$@" - file_env "$maria" "${!var}" - if [ "${!maria:-}" ]; then - export "$var"="${!maria}" - fi + local var="$1" + shift + local maria="MARIADB_${var#MYSQL_}" + file_env "$var" "$@" + file_env "$maria" "${!var}" + if [ "${!maria:-}" ]; then + export "$var"="${!maria}" + fi } # check to see if this file is being run or sourced from another script _is_sourced() { - # https://unix.stackexchange.com/a/215279 - [ "${#FUNCNAME[@]}" -ge 2 ] \ - && [ "${FUNCNAME[0]}" = '_is_sourced' ] \ - && [ "${FUNCNAME[1]}" = 'source' ] + # https://unix.stackexchange.com/a/215279 + [ "${#FUNCNAME[@]}" -ge 2 ] && + [ "${FUNCNAME[0]}" = '_is_sourced' ] && + [ "${FUNCNAME[1]}" = 'source' ] } # usage: docker_process_init_files [file [file [...]]] # ie: docker_process_init_files /always-initdb.d/* # process initializer files, based on file extensions docker_process_init_files() { - # mysql here for backwards compatibility "${mysql[@]}" - mysql=( docker_process_sql ) - - echo - local f - for f; do - case "$f" in - *.sh) - # https://github.com/docker-library/postgres/issues/450#issuecomment-393167936 - # https://github.com/docker-library/postgres/pull/452 - if [ -x "$f" ]; then - mysql_note "$0: running $f" - "$f" - else - mysql_note "$0: sourcing $f" - . "$f" - fi - ;; - *.sql) mysql_note "$0: running $f"; docker_process_sql < "$f"; echo ;; - *.sql.gz) mysql_note "$0: running $f"; gunzip -c "$f" | docker_process_sql; echo ;; - *.sql.xz) mysql_note "$0: running $f"; xzcat "$f" | docker_process_sql; echo ;; - *.sql.zst) mysql_note "$0: running $f"; zstd -dc "$f" | docker_process_sql; echo ;; - *) mysql_warn "$0: ignoring $f" ;; - esac - echo - done + # mysql here for backwards compatibility "${mysql[@]}" + mysql=(docker_process_sql) + + echo + local f + for f; do + case "$f" in + *.sh) + # https://github.com/docker-library/postgres/issues/450#issuecomment-393167936 + # https://github.com/docker-library/postgres/pull/452 + if [ -x "$f" ]; then + mysql_note "$0: running $f" + "$f" + else + mysql_note "$0: sourcing $f" + . "$f" + fi + ;; + *.sql) + mysql_note "$0: running $f" + docker_process_sql <"$f" + echo + ;; + *.sql.gz) + mysql_note "$0: running $f" + gunzip -c "$f" | docker_process_sql + echo + ;; + *.sql.xz) + mysql_note "$0: running $f" + xzcat "$f" | docker_process_sql + echo + ;; + *.sql.zst) + mysql_note "$0: running $f" + zstd -dc "$f" | docker_process_sql + echo + ;; + *) mysql_warn "$0: ignoring $f" ;; + esac + echo + done } # arguments necessary to run "mysqld --verbose --help" successfully (used for testing configuration validity and for extracting default/configured values) _verboseHelpArgs=( - --verbose --help - --log-bin-index="$(mktemp -u)" # https://github.com/docker-library/mysql/issues/136 + --verbose --help + --log-bin-index="$(mktemp -u)" # https://github.com/docker-library/mysql/issues/136 ) mysql_check_config() { - local toRun=( "$@" "${_verboseHelpArgs[@]}" ) errors - if ! errors="$("${toRun[@]}" 2>&1 >/dev/null)"; then - mysql_error $'mysqld failed while attempting to check config\n\tcommand was: '"${toRun[*]}"$'\n\t'"$errors" - fi + local toRun=("$@" "${_verboseHelpArgs[@]}") errors + if ! errors="$("${toRun[@]}" 2>&1 >/dev/null)"; then + mysql_error $'mysqld failed while attempting to check config\n\tcommand was: '"${toRun[*]}"$'\n\t'"$errors" + fi } # Fetch value from server config # We use mysqld --verbose --help instead of my_print_defaults because the # latter only show values present in config files, and not server defaults mysql_get_config() { - local conf="$1"; shift - "$@" "${_verboseHelpArgs[@]}" 2>/dev/null \ - | awk -v conf="$conf" '$1 == conf && /^[^ \t]/ { sub(/^[^ \t]+[ \t]+/, ""); print; exit }' - # match "datadir /some/path with/spaces in/it here" but not "--xyz=abc\n datadir (xyz)" + local conf="$1" + shift + "$@" "${_verboseHelpArgs[@]}" 2>/dev/null | + awk -v conf="$conf" '$1 == conf && /^[^ \t]/ { sub(/^[^ \t]+[ \t]+/, ""); print; exit }' + # match "datadir /some/path with/spaces in/it here" but not "--xyz=abc\n datadir (xyz)" } # Do a temporary startup of the MariaDB server, for init purposes docker_temp_server_start() { - "$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF & - mysql_note "Waiting for server startup" - # only use the root password if the database has already been initializaed - # so that it won't try to fill in a password file when it hasn't been set yet - extraArgs=() - if [ -z "$DATABASE_ALREADY_EXISTS" ]; then - extraArgs+=( '--dont-use-mysql-root-password' ) - fi - local i - for i in {30..0}; do - if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &> /dev/null; then - break - fi - sleep 1 - done - if [ "$i" = 0 ]; then - mysql_error "Unable to start server." - fi + "$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF & + mysql_note "Waiting for server startup" + # only use the root password if the database has already been initializaed + # so that it won't try to fill in a password file when it hasn't been set yet + extraArgs=() + if [ -z "$DATABASE_ALREADY_EXISTS" ]; then + extraArgs+=('--dont-use-mysql-root-password') + fi + local i + for i in {30..0}; do + if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &>/dev/null; then + break + fi + sleep 1 + done + if [ "$i" = 0 ]; then + mysql_error "Unable to start server." + fi } # Stop the server. When using a local socket file mysqladmin will block until # the shutdown is complete. docker_temp_server_stop() { - if ! MYSQL_PWD=$MARIADB_ROOT_PASSWORD mysqladmin shutdown -uroot --socket="${SOCKET}"; then - mysql_error "Unable to shut down server." - fi + if ! MYSQL_PWD=$MARIADB_ROOT_PASSWORD mysqladmin shutdown -uroot --socket="${SOCKET}"; then + mysql_error "Unable to shut down server." + fi } # Verify that the minimally required password settings are set for new databases. docker_verify_minimum_env() { - if [ -z "$MARIADB_ROOT_PASSWORD" -a -z "$MARIADB_ALLOW_EMPTY_ROOT_PASSWORD" -a -z "$MARIADB_RANDOM_ROOT_PASSWORD" ]; then - mysql_error $'Database is uninitialized and password option is not specified\n\tYou need to specify one of MARIADB_ROOT_PASSWORD, MARIADB_ALLOW_EMPTY_ROOT_PASSWORD and MARIADB_RANDOM_ROOT_PASSWORD' - fi + if [ -z "$MARIADB_ROOT_PASSWORD" -a -z "$MARIADB_ALLOW_EMPTY_ROOT_PASSWORD" -a -z "$MARIADB_RANDOM_ROOT_PASSWORD" ]; then + mysql_error $'Database is uninitialized and password option is not specified\n\tYou need to specify one of MARIADB_ROOT_PASSWORD, MARIADB_ALLOW_EMPTY_ROOT_PASSWORD and MARIADB_RANDOM_ROOT_PASSWORD' + fi } # creates folders for the database # also ensures permission for user mysql of run as root docker_create_db_directories() { - local user; user="$(id -u)" - - # TODO other directories that are used by default? like /var/lib/mysql-files - # see https://github.com/docker-library/mysql/issues/562 - mkdir -p "$DATADIR" - - if [ "$user" = "0" ]; then - # this will cause less disk access than `chown -R` - find "$DATADIR" \! -user mysql -exec chown mysql '{}' + - # See https://github.com/MariaDB/mariadb-docker/issues/363 - find "${SOCKET%/*}" -maxdepth 0 \! -user mysql -exec chown mysql '{}' \; - fi + local user + user="$(id -u)" + + # TODO other directories that are used by default? like /var/lib/mysql-files + # see https://github.com/docker-library/mysql/issues/562 + mkdir -p "$DATADIR" + + if [ "$user" = "0" ]; then + # this will cause less disk access than `chown -R` + find "$DATADIR" \! -user mysql -exec chown mysql '{}' + + # See https://github.com/MariaDB/mariadb-docker/issues/363 + find "${SOCKET%/*}" -maxdepth 0 \! -user mysql -exec chown mysql '{}' \; + fi } # initializes the database directory docker_init_database_dir() { - mysql_note "Initializing database files" - installArgs=( --datadir="$DATADIR" --rpm --auth-root-authentication-method=normal ) - if { mysql_install_db --help || :; } | grep -q -- '--skip-test-db'; then - # 10.3+ - installArgs+=( --skip-test-db ) - fi - # "Other options are passed to mysqld." (so we pass all "mysqld" arguments directly here) - mysql_install_db "${installArgs[@]}" "${@:2}" --default-time-zone=SYSTEM --enforce-storage-engine= - mysql_note "Database files initialized" + mysql_note "Initializing database files" + installArgs=(--datadir="$DATADIR" --rpm --auth-root-authentication-method=normal) + if { mysql_install_db --help || :; } | grep -q -- '--skip-test-db'; then + # 10.3+ + installArgs+=(--skip-test-db) + fi + # "Other options are passed to mysqld." (so we pass all "mysqld" arguments directly here) + mysql_install_db "${installArgs[@]}" "${@:2}" --default-time-zone=SYSTEM --enforce-storage-engine= + mysql_note "Database files initialized" } # Loads various settings that are used elsewhere in the script # This should be called after mysql_check_config, but before any other functions docker_setup_env() { - # Get config - declare -g DATADIR SOCKET - DATADIR="$(mysql_get_config 'datadir' "$@")" - SOCKET="$(mysql_get_config 'socket' "$@")" - - - # Initialize values that might be stored in a file - _mariadb_file_env 'MYSQL_ROOT_HOST' '%' - _mariadb_file_env 'MYSQL_DATABASE' - _mariadb_file_env 'MYSQL_USER' - _mariadb_file_env 'MYSQL_PASSWORD' - _mariadb_file_env 'MYSQL_ROOT_PASSWORD' - - # set MARIADB_ from MYSQL_ when it is unset and then make them the same value - : "${MARIADB_ALLOW_EMPTY_ROOT_PASSWORD:=${MYSQL_ALLOW_EMPTY_PASSWORD:-}}" - export MYSQL_ALLOW_EMPTY_PASSWORD="$MARIADB_ALLOW_EMPTY_ROOT_PASSWORD" MARIADB_ALLOW_EMPTY_ROOT_PASSWORD - : "${MARIADB_RANDOM_ROOT_PASSWORD:=${MYSQL_RANDOM_ROOT_PASSWORD:-}}" - export MYSQL_RANDOM_ROOT_PASSWORD="$MARIADB_RANDOM_ROOT_PASSWORD" MARIADB_RANDOM_ROOT_PASSWORD - : "${MARIADB_INITDB_SKIP_TZINFO:=${MYSQL_INITDB_SKIP_TZINFO:-}}" - export MYSQL_INITDB_SKIP_TZINFO="$MARIADB_INITDB_SKIP_TZINFO" MARIADB_INITDB_SKIP_TZINFO - - declare -g DATABASE_ALREADY_EXISTS - if [ -d "$DATADIR/mysql" ]; then - DATABASE_ALREADY_EXISTS='true' - fi + # Get config + declare -g DATADIR SOCKET + DATADIR="$(mysql_get_config 'datadir' "$@")" + SOCKET="$(mysql_get_config 'socket' "$@")" + + # Initialize values that might be stored in a file + _mariadb_file_env 'MYSQL_ROOT_HOST' '%' + _mariadb_file_env 'MYSQL_DATABASE' + _mariadb_file_env 'MYSQL_USER' + _mariadb_file_env 'MYSQL_PASSWORD' + _mariadb_file_env 'MYSQL_ROOT_PASSWORD' + + # set MARIADB_ from MYSQL_ when it is unset and then make them the same value + : "${MARIADB_ALLOW_EMPTY_ROOT_PASSWORD:=${MYSQL_ALLOW_EMPTY_PASSWORD:-}}" + export MYSQL_ALLOW_EMPTY_PASSWORD="$MARIADB_ALLOW_EMPTY_ROOT_PASSWORD" MARIADB_ALLOW_EMPTY_ROOT_PASSWORD + : "${MARIADB_RANDOM_ROOT_PASSWORD:=${MYSQL_RANDOM_ROOT_PASSWORD:-}}" + export MYSQL_RANDOM_ROOT_PASSWORD="$MARIADB_RANDOM_ROOT_PASSWORD" MARIADB_RANDOM_ROOT_PASSWORD + : "${MARIADB_INITDB_SKIP_TZINFO:=${MYSQL_INITDB_SKIP_TZINFO:-}}" + export MYSQL_INITDB_SKIP_TZINFO="$MARIADB_INITDB_SKIP_TZINFO" MARIADB_INITDB_SKIP_TZINFO + + declare -g DATABASE_ALREADY_EXISTS + if [ -d "$DATADIR/mysql" ]; then + DATABASE_ALREADY_EXISTS='true' + fi } # Execute the client, use via docker_process_sql to handle root password docker_exec_client() { - # args sent in can override this db, since they will be later in the command - if [ -n "$MYSQL_DATABASE" ]; then - set -- --database="$MYSQL_DATABASE" "$@" - fi - mysql --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" "$@" + # args sent in can override this db, since they will be later in the command + if [ -n "$MYSQL_DATABASE" ]; then + set -- --database="$MYSQL_DATABASE" "$@" + fi + mysql --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" "$@" } # Execute sql script, passed via stdin @@ -225,178 +244,179 @@ docker_exec_client() { # ie: docker_process_sql --database=mydb <<<'INSERT ...' # ie: docker_process_sql --dont-use-mysql-root-password --database=mydb /dev/null - - docker_init_database_dir "$@" - - mysql_note "Starting temporary server" - docker_temp_server_start "$@" - mysql_note "Temporary server started." - - docker_setup_db - docker_process_init_files /docker-entrypoint-initdb.d/* - - mysql_note "Stopping temporary server" - docker_temp_server_stop - mysql_note "Temporary server stopped" - - echo - mysql_note "MariaDB init process done. Ready for start up." - echo - fi - fi - exec "$@" + # if command starts with an option, prepend mysqld + if [ "${1:0:1}" = '-' ]; then + set -- mysqld "$@" + fi + + # skip setup if they aren't running mysqld or want an option that stops mysqld + if [ "$1" = 'mariadbd' ] || [ "$1" = 'mysqld' ] && ! _mysql_want_help "$@"; then + mysql_note "Entrypoint script for MariaDB Server ${MARIADB_VERSION} started." + + mysql_check_config "$@" + # Load various environment variables + docker_setup_env "$@" + docker_create_db_directories + + # If container is started as root user, restart as dedicated mysql user + if [ "$(id -u)" = "0" ]; then + mysql_note "Switching to dedicated user 'mysql'" + exec gosu mysql "$BASH_SOURCE" "$@" + fi + + # there's no database, so it needs to be initialized + if [ -z "$DATABASE_ALREADY_EXISTS" ]; then + echo "Creating new database" + docker_verify_minimum_env + + # mkdir /docker-entrypoint-initdb.d/ + + # check dir permissions to reduce likelihood of half-initialized database + # ls /docker-entrypoint-initdb.d/ > /dev/null + + docker_init_database_dir "$@" + + mysql_note "Starting temporary server" + docker_temp_server_start "$@" + mysql_note "Temporary server started." + + docker_setup_db + # docker_process_init_files /docker-entrypoint-initdb.d/* + + mysql_note "Stopping temporary server" + docker_temp_server_stop + mysql_note "Temporary server stopped" + + echo + mysql_note "MariaDB init process done. Ready for start up." + echo + fi + fi + exec "$@" >>/workspace/tmp/database.log 2>>/workspace/tmp/database.log & } # If we are sourced from elsewhere, don't perform any further actions if ! _is_sourced; then - _main "$@" + _main "$@" fi diff --git a/.devcontainer/post_create.sh b/.devcontainer/post_create.sh new file mode 100755 index 000000000..f9717aa0d --- /dev/null +++ b/.devcontainer/post_create.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +echo 'Setting up zshrc and p10k' +cp .devcontainer/.zshrc $HOME +cp .devcontainer/.p10k.zsh $HOME + +echo 'Granting access to student work' +sudo find /student-work/* -exec chmod a+rw {} \; & + +echo 'Starting Services' +/workspace/.devcontainer/docker-entrypoint.sh echo "Done" diff --git a/.devcontainer/post_start.sh b/.devcontainer/post_start.sh new file mode 100755 index 000000000..5f0bf70ce --- /dev/null +++ b/.devcontainer/post_start.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +echo 'Setting up git safe directories' +git config --global --add safe.directory /workspace/doubtfire-api +git config --global --add safe.directory /workspace/doubtfire-web +git config --global --add safe.directory /workspace + diff --git a/.devcontainer/setup_formatif_db.sh b/.devcontainer/setup_formatif_db.sh index 926dc7d5c..affc0df0f 100755 --- a/.devcontainer/setup_formatif_db.sh +++ b/.devcontainer/setup_formatif_db.sh @@ -1,16 +1,64 @@ #!/bin/bash # Wait for mysql to start -delay 5 +check_process() { + [ "$1" = "" ] && return 0 + [ $(pgrep -n $1) ] && return 1 || return 0 +} -if [[ "`mysql --user=root --password="${MYSQL_ROOT_PASSWORD}" -qfsBNe "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema='${MYSQL_DATABASE}';" 2>&1`" -gt 0 ]]; -then +check_process "mysqld" +CHECK_RET=$? +if [ $CHECK_RET -eq 0 ]; then # none exist + echo 'Waiting for mysqld to start' + sleep 5 +fi + +check_process "mysqld" +CHECK_RET=$? +if [ $CHECK_RET -eq 0 ]; then # none exist + echo 'Failed to find mysqld - please make sure the database is running' + exit 1 +fi + +NEXT_WAIT_TIME=0 +# Loop until mysqld is ready... +while true; do + RESP=`mysql --user=root --password="${MYSQL_ROOT_PASSWORD}" -qfsBNe "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema='${MYSQL_DATABASE}';" 2>>/dev/null` + + if [ $? -ne 0 ]; then + # Check mysqld is still running... + check_process "mysqld" + CHECK_RET=$? + if [ $CHECK_RET -eq 0 ]; then # none exist + echo "Mysqld has stopped... unable to check and create database" + exit 1 + fi + + if [ $NEXT_WAIT_TIME -ge 10 ]; then + echo "Unable to connect to mysql after $NEXT_WAIT_TIME retries" + exit 1 + fi + + sleep $(( NEXT_WAIT_TIME++ )) + else + break + fi +done + +if [[ $RESP -gt 0 ]]; then echo "Database already exists" else - echo "Creating and populating database" + echo "Creating and populating database in the background - do not shutdown!" cd /workspace/doubtfire-api - bundle exec rake db:populate - echo "Simulating sign off" - bundle exec rake db:simulate_signoff + ( + bundle exec rake db:populate >>/workspace/tmp/database_populate.log 2>>/workspace/tmp/database_populate.log + + echo "Database created - you can open another terminal while this completes if you want.." + + echo "Simulating sign off in the background" + bundle exec rake db:simulate_signoff >>/workspace/tmp/database_populate.log 2>>/workspace/tmp/database_populate.log + + echo "Database populate complete..." + ) & fi diff --git a/dev.Dockerfile b/dev.Dockerfile index ce0444060..b8b187121 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -89,8 +89,10 @@ RUN git clone https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/t && git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions ENV RAILS_ENV development -ENV PATH /tmp/texlive/bin/x86_64-linux:/tmp/texlive/bin/aarch64-linux:$PATH +ENV PATH /home/$USER/.gems/ruby/3.1.0/bin:$PATH:/tmp/texlive/bin/x86_64-linux:/tmp/texlive/bin/aarch64-linux:$PATH +ENV GEM_PATH /home/$USER/.gems/ruby/3.1.0:$GEM_PATH +# Install the web ui WORKDIR /workspace/doubtfire-web COPY --chown="${USER}":"${USER}" doubtfire-web/package.json /workspace/doubtfire-web @@ -112,10 +114,10 @@ RUN sudo ln -s /workspace/doubtfire-api /doubtfire EXPOSE 9876 -ENV PATH=/home/$USER/.gems/ruby/3.1.0/bin:$PATH -ENV GEM_PATH=/home/$USER/.gems/ruby/3.1.0:$GEM_PATH +COPY --chown="${USER}":"${USER}" .devcontainer /workspace/.devcontainer -COPY .devcontainer/docker-entrypoint.sh / -RUN sudo chmod +x /docker-entrypoint.sh -ENTRYPOINT [ "/docker-entrypoint.sh" ] +ENV HISTFILE /workspace/tmp/.zsh_history + +RUN sudo chmod +x /workspace/.devcontainer/*.sh +ENTRYPOINT [ "/workspace/.devcontainer/docker-entrypoint.sh" ] CMD [ "sleep", "infinity" ] diff --git a/development/build.sh b/development/build.sh index d200fc156..e6f169ffd 100755 --- a/development/build.sh +++ b/development/build.sh @@ -14,12 +14,10 @@ echo echo " You are on branch: ${CURRENT_BRANCH}" echo " api version: ${CURRENT_API_VERSION}" echo " web version: ${CURRENT_WEB_VERSION}" -echo " dev container version: ${CURRENT_WEB_VERSION}" echo echo "This will produce docker images with the following names" echo " - lmsdoubtfire/doubtfire-api:${CURRENT_API_VERSION}-dev" echo " - lmsdoubtfire/doubtfire-web:${CURRENT_WEB_VERSION}-dev" -echo " - lmsdoubtfire/formatif-devcontainer:${CURRENT_DEV_VERSION}-dev" # echo " - lmsdoubtfire/doubtfire-overseer:${CURRENT_BRANCH}-dev" echo @@ -53,8 +51,6 @@ function build_image { } -# build_image "doubtfire-api" "${CURRENT_API_VERSION}" "../doubtfire-api" "Dockerfile" -# build_image "doubtfire-web" "${CURRENT_WEB_VERSION}" "../doubtfire-web" "Dockerfile" -# # build_image "doubtfire-overseer" - -build_image "formatif-devcontainer" "${CURRENT_DEV_VERSION}" "../" "dev.Dockerfile" +build_image "doubtfire-api" "${CURRENT_API_VERSION}" "../doubtfire-api" "Dockerfile" +build_image "doubtfire-web" "${CURRENT_WEB_VERSION}" "../doubtfire-web" "Dockerfile" +# build_image "doubtfire-overseer" diff --git a/development/docker-compose.yml b/development/docker-compose.yml index e9d0e229c..dfe2c0095 100644 --- a/development/docker-compose.yml +++ b/development/docker-compose.yml @@ -1,26 +1,5 @@ version: '3' services: - formatif-dev-container: - container_name: formatif-dev-container - build: - context: ../ - dockerfile: dev.Dockerfile - volumes: - # Mounts the project folder to '/workspace'. While this file is in .devcontainer, - # mounts are relative to the first file in the list, which is a level up. - - ..:/workspace:cached - - ../data/tmp:/workspace/tmp - - ../data/student-work:/student-work - - ws_node_modules:/workspace/node_modules - - web_node_modules:/workspace/doubtfire-web/node_modules - - ../data/database:/var/lib/mysql - ports: - - "9876:9876" - # Overrides default command so things don't shut down after the process ends. - command: /bin/sh -c "while sleep 5000; do :; done" - env_file: - - api.env - dev-db: container_name: doubtfire-dev-db image: mariadb diff --git a/doubtfire-api b/doubtfire-api index 644eb5074..d8c064271 160000 --- a/doubtfire-api +++ b/doubtfire-api @@ -1 +1 @@ -Subproject commit 644eb50742397d2582c9999df1c3c7ed67ffeb9b +Subproject commit d8c0642716ecce177289c44f4d1139bc9165c722 diff --git a/doubtfire-web b/doubtfire-web index 6e776c914..66676becc 160000 --- a/doubtfire-web +++ b/doubtfire-web @@ -1 +1 @@ -Subproject commit 6e776c91445427e77cc697c09013d926bd847cd9 +Subproject commit 66676beccd7bfcad55df54d770fa8d80f04ba2b9 diff --git a/package-lock.json b/package-lock.json index 95468626b..4a0227fa2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,7 @@ "version": "6.0.0", "devDependencies": { "@commitlint/cli": "^17.0", - "@commitlint/config-conventional": "^17.0", - "husky": "^8.0.0" + "@commitlint/config-conventional": "^17.0" } }, "node_modules/@babel/code-frame": { @@ -986,21 +985,6 @@ "node": ">=10.17.0" } }, - "node_modules/husky": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.2.tgz", - "integrity": "sha512-Tkv80jtvbnkK3mYWxPZePGFpQ/tT3HNSs/sasF9P2YfkMezDl3ON37YN6jUUI4eTg5LcyVynlb6r4eyvOmspvg==", - "dev": true, - "bin": { - "husky": "lib/bin.js" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/typicode" - } - }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -2943,12 +2927,6 @@ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true }, - "husky": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.2.tgz", - "integrity": "sha512-Tkv80jtvbnkK3mYWxPZePGFpQ/tT3HNSs/sasF9P2YfkMezDl3ON37YN6jUUI4eTg5LcyVynlb6r4eyvOmspvg==", - "dev": true - }, "import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", diff --git a/package.json b/package.json index 4040d5702..d88491e4a 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,9 @@ "devDependencies": { "@commitlint/cli": "^17.0", "@commitlint/config-conventional": "^17.0", - "husky": "^8.0.0" + "husky": "^7.0.4" }, "scripts": { - "prepare": "husky install" + "prepare": "npx husky install" } } From 22b3b88dc80560f46b6b68b17a1abac0bf370ef7 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Tue, 31 Jan 2023 13:39:04 +1100 Subject: [PATCH 13/54] chore: move database creation to inline Ensure that database is created and user can see details. --- .devcontainer/setup_formatif_db.sh | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.devcontainer/setup_formatif_db.sh b/.devcontainer/setup_formatif_db.sh index affc0df0f..793730b76 100755 --- a/.devcontainer/setup_formatif_db.sh +++ b/.devcontainer/setup_formatif_db.sh @@ -26,21 +26,29 @@ while true; do RESP=`mysql --user=root --password="${MYSQL_ROOT_PASSWORD}" -qfsBNe "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema='${MYSQL_DATABASE}';" 2>>/dev/null` if [ $? -ne 0 ]; then + if [ $NEXT_WAIT_TIME -eq 0 ]; then + echo -n "Waiting for access to mysql..." + fi + # Check mysqld is still running... check_process "mysqld" CHECK_RET=$? if [ $CHECK_RET -eq 0 ]; then # none exist + echo "x" echo "Mysqld has stopped... unable to check and create database" exit 1 fi if [ $NEXT_WAIT_TIME -ge 10 ]; then + echo "x" echo "Unable to connect to mysql after $NEXT_WAIT_TIME retries" exit 1 fi + echo -n "." sleep $(( NEXT_WAIT_TIME++ )) else + echo "!" break fi done @@ -48,17 +56,15 @@ done if [[ $RESP -gt 0 ]]; then echo "Database already exists" else - echo "Creating and populating database in the background - do not shutdown!" + echo "Creating and populating database - do not shutdown!" cd /workspace/doubtfire-api - ( - bundle exec rake db:populate >>/workspace/tmp/database_populate.log 2>>/workspace/tmp/database_populate.log - - echo "Database created - you can open another terminal while this completes if you want.." + bundle exec rake db:populate + echo "Database created - you can open another terminal while this completes if you want.." - echo "Simulating sign off in the background" + echo "Simulating sign off in the background" + ( bundle exec rake db:simulate_signoff >>/workspace/tmp/database_populate.log 2>>/workspace/tmp/database_populate.log - - echo "Database populate complete..." - ) & + rm /workspace/tmp/database_populate.log + )& fi From f27d67ccfa3ac46fe16fdec56dd36102f653c1f9 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Tue, 31 Jan 2023 13:39:40 +1100 Subject: [PATCH 14/54] chore: persist irb history --- .devcontainer/.irbrc | 1 + .devcontainer/post_create.sh | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 .devcontainer/.irbrc diff --git a/.devcontainer/.irbrc b/.devcontainer/.irbrc new file mode 100644 index 000000000..6f6e5440b --- /dev/null +++ b/.devcontainer/.irbrc @@ -0,0 +1 @@ +IRB.conf[:HISTORY_FILE] = '/workspace/tmp/.irb-history' diff --git a/.devcontainer/post_create.sh b/.devcontainer/post_create.sh index f9717aa0d..052a823a3 100755 --- a/.devcontainer/post_create.sh +++ b/.devcontainer/post_create.sh @@ -1,10 +1,11 @@ #!/bin/bash -echo 'Setting up zshrc and p10k' -cp .devcontainer/.zshrc $HOME -cp .devcontainer/.p10k.zsh $HOME +echo 'Setting up zshrc, p10k, and irb history' +ln -sf /workspace/.devcontainer/.zshrc $HOME +ln -s /workspace/.devcontainer/.p10k.zsh $HOME +ln -s /workspace/.devcontainer/.irbrc $HOME -echo 'Granting access to student work' +echo 'Granting access to student work in the background' sudo find /student-work/* -exec chmod a+rw {} \; & echo 'Starting Services' From 243eb87b77409c2602bd400cdd39541c382d1edd Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Wed, 1 Feb 2023 21:07:39 +1100 Subject: [PATCH 15/54] chore: ensure database started in devcontainer --- .devcontainer/post_start.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.devcontainer/post_start.sh b/.devcontainer/post_start.sh index 5f0bf70ce..a3957f124 100755 --- a/.devcontainer/post_start.sh +++ b/.devcontainer/post_start.sh @@ -5,3 +5,10 @@ git config --global --add safe.directory /workspace/doubtfire-api git config --global --add safe.directory /workspace/doubtfire-web git config --global --add safe.directory /workspace +git config --global submodule.recurse false + +if [[ $(pgrep -n mysqld) -ne 0 && $(pgrep -n redis-server) -ne 0 ]]; then + echo 'Database and Redis are running' +else + /workspace/.devcontainer/post_create.sh +fi From 34151f68ee50b80f910823144dfe939e2d5436a7 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Mon, 6 Feb 2023 17:03:31 +1100 Subject: [PATCH 16/54] chore: remove deprecated liveshare audio extension --- .devcontainer/devcontainer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a845522dc..a1f03ff5d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -20,7 +20,6 @@ "dbaeumer.vscode-eslint", "EditorConfig.EditorConfig", "ms-vsliveshare.vsliveshare", - "ms-vsliveshare.vsliveshare-audio", "ms-vsliveshare.vsliveshare-pack", "rebornix.ruby", "misogi.ruby-rubocop", From d8211f3f84e3720ec3edf48ceffb1e7cf6b1060e Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Thu, 23 Feb 2023 21:54:37 +1100 Subject: [PATCH 17/54] chore: update submodule versions --- doubtfire-api | 2 +- doubtfire-web | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doubtfire-api b/doubtfire-api index d8c064271..41e907d2a 160000 --- a/doubtfire-api +++ b/doubtfire-api @@ -1 +1 @@ -Subproject commit d8c0642716ecce177289c44f4d1139bc9165c722 +Subproject commit 41e907d2aea0f66c73a21415f770a74244e2bcc0 diff --git a/doubtfire-web b/doubtfire-web index 66676becc..ca367e31c 160000 --- a/doubtfire-web +++ b/doubtfire-web @@ -1 +1 @@ -Subproject commit 66676beccd7bfcad55df54d770fa8d80f04ba2b9 +Subproject commit ca367e31c57c76cb9ec2ad295a7b5402607bda08 From b4a110dc187f3d9d7f2bc64a2d49b3eb0d5e5e63 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Thu, 23 Feb 2023 22:17:19 +1100 Subject: [PATCH 18/54] build: update dev container image and scripts --- .devcontainer/build.sh | 2 +- .devcontainer/devcontainer.json | 2 +- .devcontainer/publish.sh | 45 +++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) create mode 100755 .devcontainer/publish.sh diff --git a/.devcontainer/build.sh b/.devcontainer/build.sh index f820cb73d..b89450503 100755 --- a/.devcontainer/build.sh +++ b/.devcontainer/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash my_dir="$(dirname "$0")" source "${my_dir}/../development/version.sh" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a1f03ff5d..7bd8ed3fb 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,7 @@ //devcontainer.json { "name": "Formatif Development Container", - "image": "formatif-devcontainer:7.0-dev", + "image": "lmsdoubtfire/formatif-devcontainer:7.0-dev", "runArgs": ["--env-file",".devcontainer/devcontainer.env"], // "dockerFile": "../dev.Dockerfile", diff --git a/.devcontainer/publish.sh b/.devcontainer/publish.sh new file mode 100755 index 000000000..9f16521b1 --- /dev/null +++ b/.devcontainer/publish.sh @@ -0,0 +1,45 @@ +#!/bin/bash +my_dir="$(dirname "$0")" +source "${my_dir}/../development/version.sh" + +CURRENT_BRANCH=$(git branch --show-current) + +echo "This script will push new development container images to docker hub for Doubtfire" +echo +echo "Run build.sh to create these images first." +echo +echo "You are building api version: ${CURRENT_API_VERSION}" +echo "You are building web version: ${CURRENT_WEB_VERSION}" +echo +echo "This will publish docker images with the following names" +echo " - lmsdoubtfire/formatif-devcontainer:${CURRENT_DEV_VERSION}-dev" +echo + +read -p "Enter to continue..." + +echo "Login to docker hub" +echo + +docker login + +docker buildx create --name mybuilder --use + +function push_image { + NAME=$1 + VERSION=$2 + FOLDER=$3 + DOCKERFILE=$4 + + echo "Setting up build for $NAME" + echo + + cd ${FOLDER} + + docker buildx build --platform linux/amd64,linux/arm64 -t "lmsdoubtfire/${NAME}:${VERSION}-dev" --push . + if [ $? -ne 0 ]; then + echo "Ensure that everything builds"; + exit 1 + fi +} + +push_image "formatif-devcontainer" "${CURRENT_DEV_VERSION}" "../" "dev.Dockerfile" From 8775813c59884e65353d820a4ad0b92fe18a057b Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Thu, 23 Feb 2023 22:30:32 +1100 Subject: [PATCH 19/54] chore: update scripts to release in dev container --- .devcontainer/build.sh | 2 +- .devcontainer/publish.sh | 4 ++-- dev.Dockerfile | 3 ++- release.sh | 13 +++---------- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.devcontainer/build.sh b/.devcontainer/build.sh index b89450503..5c453929d 100755 --- a/.devcontainer/build.sh +++ b/.devcontainer/build.sh @@ -29,7 +29,7 @@ function build_image { echo "Setting up build for $NAME" echo - cd ${FOLDER} + cd "${FOLDER}" docker image rm "${NAME}:${VERSION}-dev" 2>/dev/null docker image rm "lmsdoubtfire/${NAME}:${VERSION}-dev" 2>/dev/null diff --git a/.devcontainer/publish.sh b/.devcontainer/publish.sh index 9f16521b1..33cedf877 100755 --- a/.devcontainer/publish.sh +++ b/.devcontainer/publish.sh @@ -33,9 +33,9 @@ function push_image { echo "Setting up build for $NAME" echo - cd ${FOLDER} + cd "${FOLDER}" - docker buildx build --platform linux/amd64,linux/arm64 -t "lmsdoubtfire/${NAME}:${VERSION}-dev" --push . + docker buildx build --platform linux/amd64,linux/arm64 -f "${DOCKERFILE}" -t "lmsdoubtfire/${NAME}:${VERSION}-dev" --push . if [ $? -ne 0 ]; then echo "Ensure that everything builds"; exit 1 diff --git a/dev.Dockerfile b/dev.Dockerfile index b8b187121..3d0c1c9f5 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -79,7 +79,8 @@ COPY --chown="${USER}":"${USER}" package.json /workspace RUN mkdir -p "${NPM_CONFIG_PREFIX}/lib" \ && npm install -g npm@9.2.0 \ && npm --global config set user "${USER}" \ - && npm install -g husky --save-dev + && npm install -g husky --save-dev \ + && npm i -g standard-version RUN npm install diff --git a/release.sh b/release.sh index e65c4bb25..c1b45d71f 100755 --- a/release.sh +++ b/release.sh @@ -1,12 +1,5 @@ #!/bin/sh -# Check for standard-version -if ! command -v standard-version &> /dev/null -then - echo "standard-version could not be found, install it via npm i -g standard-version" - exit -fi - APP_PATH=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+1] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }'` APP_PATH=`cd "$APP_PATH"; pwd` @@ -88,7 +81,7 @@ function prepare_release { done fi - RELEASE_VERSION=$(standard-version $RELEASE_AS --dry-run | grep "tagging release " | sed 's/^.* release //') + RELEASE_VERSION=$(npx standard-version $RELEASE_AS --dry-run | grep "tagging release " | sed 's/^.* release //') CURRENT_BRANCH=$(git branch --show-current) TRUNC_RELEASE=${RELEASE_VERSION#v} @@ -98,7 +91,7 @@ function prepare_release { read -p "Fix then press enter to continue (or break to quit)" CURRENT_BRANCH=$(git branch --show-current) - RELEASE_VERSION=$(standard-version --dry-run -r $RELEASE_AS | grep "tagging release " | sed 's/^.* release //') + RELEASE_VERSION=$(npx standard-version --dry-run -r $RELEASE_AS | grep "tagging release " | sed 's/^.* release //') TRUNC_RELEASE=${RELEASE_VERSION#v} done @@ -123,7 +116,7 @@ function do_release { cd "${PROJECT_PATH}" - standard-version $RELEASE_AS + npx standard-version $RELEASE_AS } prepare_release 'doubtfire-web' "${APP_PATH}/doubtfire-web" WEB_VERSION From d1d5f7c9d5321f239dee969fb39343c9068843fa Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Thu, 23 Feb 2023 22:53:52 +1100 Subject: [PATCH 20/54] chore: update release notes for 7.0.0 --- doubtfire-api | 2 +- doubtfire-web | 2 +- releases/v7.0.0/.apiversion | 1 + releases/v7.0.0/.webversion | 1 + releases/v7.0.0/API_CHANGELOG.md | 1 + releases/v7.0.0/README.md | 7 +++++++ releases/v7.0.0/WEB_CHANGELOG.md | 1 + 7 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 releases/v7.0.0/.apiversion create mode 100644 releases/v7.0.0/.webversion create mode 100644 releases/v7.0.0/API_CHANGELOG.md create mode 100644 releases/v7.0.0/README.md create mode 100644 releases/v7.0.0/WEB_CHANGELOG.md diff --git a/doubtfire-api b/doubtfire-api index 41e907d2a..65fe3fa0e 160000 --- a/doubtfire-api +++ b/doubtfire-api @@ -1 +1 @@ -Subproject commit 41e907d2aea0f66c73a21415f770a74244e2bcc0 +Subproject commit 65fe3fa0ec13df4f02b86e72602409d3f464b790 diff --git a/doubtfire-web b/doubtfire-web index ca367e31c..659331c08 160000 --- a/doubtfire-web +++ b/doubtfire-web @@ -1 +1 @@ -Subproject commit ca367e31c57c76cb9ec2ad295a7b5402607bda08 +Subproject commit 659331c083873faa3b3495173c8199d83966f664 diff --git a/releases/v7.0.0/.apiversion b/releases/v7.0.0/.apiversion new file mode 100644 index 000000000..d18077c21 --- /dev/null +++ b/releases/v7.0.0/.apiversion @@ -0,0 +1 @@ +v7.0.0 diff --git a/releases/v7.0.0/.webversion b/releases/v7.0.0/.webversion new file mode 100644 index 000000000..d18077c21 --- /dev/null +++ b/releases/v7.0.0/.webversion @@ -0,0 +1 @@ +v7.0.0 diff --git a/releases/v7.0.0/API_CHANGELOG.md b/releases/v7.0.0/API_CHANGELOG.md new file mode 100644 index 000000000..37cd95066 --- /dev/null +++ b/releases/v7.0.0/API_CHANGELOG.md @@ -0,0 +1 @@ +https://github.com/doubtfire-lms/doubtfire-api/blob/v7.0.0/CHANGELOG.md diff --git a/releases/v7.0.0/README.md b/releases/v7.0.0/README.md new file mode 100644 index 000000000..02d64194b --- /dev/null +++ b/releases/v7.0.0/README.md @@ -0,0 +1,7 @@ +# Version 7.0.0 + +This updates the api and web to use the new entity framework. All client-server interactions are updated as a result of this. + +## Migration steps + +There are no special steps for migration. Once migrated, all users will need to update client libraries in order to use the new api. diff --git a/releases/v7.0.0/WEB_CHANGELOG.md b/releases/v7.0.0/WEB_CHANGELOG.md new file mode 100644 index 000000000..36dd3bda5 --- /dev/null +++ b/releases/v7.0.0/WEB_CHANGELOG.md @@ -0,0 +1 @@ +https://github.com/doubtfire-lms/doubtfire-web/blob/v7.0.0/CHANGELOG.md From 0376d550eb30a4038edb3e76f4589a74f439210b Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Thu, 23 Feb 2023 22:54:07 +1100 Subject: [PATCH 21/54] chore(release): 7.0.0 --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15a8b764b..a033031ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [7.0.0](https://github.com/macite/doubtfire-deploy/compare/v6.0.0...v7.0.0) (2023-02-23) + + +### Features + +* build and populate database in dev container ([5799267](https://github.com/macite/doubtfire-deploy/commit/57992670cfb63ceeef2e171ef17fa610056efbb8)) + ## [6.0.0](https://github.com/macite/doubtfire-deploy/compare/v5.0.6...v6.0.0) (2022-02-02) diff --git a/package-lock.json b/package-lock.json index 4a0227fa2..9e4b13a11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "doubtfire", - "version": "6.0.0", + "version": "7.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "doubtfire", - "version": "6.0.0", + "version": "7.0.0", "devDependencies": { "@commitlint/cli": "^17.0", "@commitlint/config-conventional": "^17.0" diff --git a/package.json b/package.json index d88491e4a..e786deb45 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "doubtfire", - "version": "6.0.0", + "version": "7.0.0", "devDependencies": { "@commitlint/cli": "^17.0", "@commitlint/config-conventional": "^17.0", From 50f3e9a4237241032b5d4bfb0a879ba51b0d3f32 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Mon, 27 Feb 2023 22:27:29 +1100 Subject: [PATCH 22/54] chore: update bundler version in dev container --- dev.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev.Dockerfile b/dev.Dockerfile index 3d0c1c9f5..a72418f37 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -65,7 +65,7 @@ RUN curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/ # smoke tests && node --version \ && npm --version \ - && gem install bundler -v '~> 2.4.3' \ + && gem install bundler -v '~> 2.4.5' \ && /workspace/doubtfire-api/.ci-setup/texlive-install.sh \ && rm -rf /workspace/doubtfire-api/.ci-setup/texlive-install.sh \ && rm -rf /install-tl-* \ From 93d554f2bab22e811351471be496e2fc87ddfd7a Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Wed, 1 Mar 2023 00:08:31 +1100 Subject: [PATCH 23/54] chore: incorporate jupyter notebook support --- dev.Dockerfile | 1 + doubtfire-api | 2 +- doubtfire-web | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dev.Dockerfile b/dev.Dockerfile index a72418f37..bced3a76f 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -28,6 +28,7 @@ RUN curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/ mariadb-server \ gosu \ redis \ + inkscape \ && apt-get clean \ && ARCH= && dpkgArch="$(dpkg --print-architecture)" \ && case "${dpkgArch##*-}" in \ diff --git a/doubtfire-api b/doubtfire-api index 65fe3fa0e..0634272c4 160000 --- a/doubtfire-api +++ b/doubtfire-api @@ -1 +1 @@ -Subproject commit 65fe3fa0ec13df4f02b86e72602409d3f464b790 +Subproject commit 0634272c4b9d62e4d015e9ac1d5228527db2f738 diff --git a/doubtfire-web b/doubtfire-web index 659331c08..7b2e5f6bf 160000 --- a/doubtfire-web +++ b/doubtfire-web @@ -1 +1 @@ -Subproject commit 659331c083873faa3b3495173c8199d83966f664 +Subproject commit 7b2e5f6bf840f3963e4bad5dcee4655f2fdb5248 From 42860a9fadc4909fb53b09ca0226069883253ac7 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Fri, 3 Mar 2023 16:21:18 +1100 Subject: [PATCH 24/54] fix: ensure change remotes runs in bash --- change_remotes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/change_remotes.sh b/change_remotes.sh index a71fc58e2..9666014b9 100755 --- a/change_remotes.sh +++ b/change_remotes.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash APP_PATH=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+1] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }'` APP_PATH=`cd "$APP_PATH"; pwd` From 9d8c6a181fcac695e759e6ea3550646331116502 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Fri, 3 Mar 2023 17:15:15 +1100 Subject: [PATCH 25/54] chore: update api and web versions --- doubtfire-api | 2 +- doubtfire-web | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doubtfire-api b/doubtfire-api index 0634272c4..1cdefb683 160000 --- a/doubtfire-api +++ b/doubtfire-api @@ -1 +1 @@ -Subproject commit 0634272c4b9d62e4d015e9ac1d5228527db2f738 +Subproject commit 1cdefb683cb342df79e13bb8377eccec664dc265 diff --git a/doubtfire-web b/doubtfire-web index 7b2e5f6bf..ee8bc3ca0 160000 --- a/doubtfire-web +++ b/doubtfire-web @@ -1 +1 @@ -Subproject commit 7b2e5f6bf840f3963e4bad5dcee4655f2fdb5248 +Subproject commit ee8bc3ca07c5cbd8dcab70d7133285d0da66b3ff From ac4bea84db12483c82bd3c731b137f5fe226e62e Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Fri, 3 Mar 2023 17:18:16 +1100 Subject: [PATCH 26/54] chore: update web submodule --- doubtfire-web | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doubtfire-web b/doubtfire-web index ee8bc3ca0..6a4af3931 160000 --- a/doubtfire-web +++ b/doubtfire-web @@ -1 +1 @@ -Subproject commit ee8bc3ca07c5cbd8dcab70d7133285d0da66b3ff +Subproject commit 6a4af393196bc69650b4200bb845b31c90a61554 From 9dae756b0c9369ce6a387ef6c88f36be5275d33f Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Fri, 3 Mar 2023 22:00:41 +1100 Subject: [PATCH 27/54] fix: ensure release is functioning --- release.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/release.sh b/release.sh index c1b45d71f..cd5c13d03 100755 --- a/release.sh +++ b/release.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash APP_PATH=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+1] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }'` APP_PATH=`cd "$APP_PATH"; pwd` @@ -87,7 +87,7 @@ function prepare_release { TRUNC_RELEASE=${RELEASE_VERSION#v} while [ ${CURRENT_BRANCH%.x} != ${TRUNC_RELEASE%.*} ]; do - echo "$PROJECT does not match release branch naming: $CURRENT_BRANCH != $RELEASE_VERSION" + echo "$PROJECT does not match release branch naming: ${CURRENT_BRANCH%.x} != ${TRUNC_RELEASE%.*}" read -p "Fix then press enter to continue (or break to quit)" CURRENT_BRANCH=$(git branch --show-current) @@ -121,7 +121,7 @@ function do_release { prepare_release 'doubtfire-web' "${APP_PATH}/doubtfire-web" WEB_VERSION prepare_release 'doubtfire-api' "${APP_PATH}/doubtfire-api" API_VERSION -prepare_release 'doubtfire-overseer' "${APP_PATH}/doubtfire-overseer" OVERSEER_VERSION +# prepare_release 'doubtfire-overseer' "${APP_PATH}/doubtfire-overseer" OVERSEER_VERSION prepare_release 'doubtfire-deploy' "${APP_PATH}" DEPLOY_VERSION echo "All projects are now ready. Proceed to create tagged commits?" @@ -140,7 +140,7 @@ done do_release 'doubtfire-web' "${APP_PATH}/doubtfire-web" do_release 'doubtfire-api' "${APP_PATH}/doubtfire-api" -do_release 'doubtfire-overseer' "${APP_PATH}/doubtfire-overseer" +# do_release 'doubtfire-overseer' "${APP_PATH}/doubtfire-overseer" echo echo "### Step 3: Prepare deploy for release" @@ -150,11 +150,11 @@ cd "${APP_PATH}/releases" mkdir -p $DEPLOY_VERSION echo "$API_VERSION" > "${DEPLOY_VERSION}/.apiversion" echo "$WEB_VERSION" > "${DEPLOY_VERSION}/.webversion" -echo "$OVERSEER_VERSION" > "${DEPLOY_VERSION}/.overseer" +# echo "$OVERSEER_VERSION" > "${DEPLOY_VERSION}/.overseer" cp -r ./release-template/. ./${DEPLOY_VERSION} echo "https://github.com/doubtfire-lms/doubtfire-web/blob/${WEB_VERSION}/CHANGELOG.md" > ${DEPLOY_VERSION}/WEB_CHANGELOG.md echo "https://github.com/doubtfire-lms/doubtfire-api/blob/${API_VERSION}/CHANGELOG.md" > ${DEPLOY_VERSION}/API_CHANGELOG.md -echo "https://github.com/doubtfire-lms/doubtfire-overseer/blob/${OVERSEER_VERSION}/CHANGELOG.md" > ${DEPLOY_VERSION}/OVERSEER_CHANGELOG.md +# echo "https://github.com/doubtfire-lms/doubtfire-overseer/blob/${OVERSEER_VERSION}/CHANGELOG.md" > ${DEPLOY_VERSION}/OVERSEER_CHANGELOG.md echo echo "Please update release notes and commit before continuing..." @@ -194,7 +194,7 @@ select answer in "Skip" "Push"; do push_release 'doubtfire-web' "${APP_PATH}/doubtfire-web" $REMOTE push_release 'doubtfire-api' "${APP_PATH}/doubtfire-api" $REMOTE - push_release 'doubtfire-overseer' "${APP_PATH}/doubtfire-overseer" $REMOTE + # push_release 'doubtfire-overseer' "${APP_PATH}/doubtfire-overseer" $REMOTE push_release 'doubtfire-deploy' "${APP_PATH}" $REMOTE break; From b563b94adc37333817b426012e58d7ab04765984 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Fri, 17 Mar 2023 12:27:05 +1100 Subject: [PATCH 28/54] build: update node version --- dev.Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev.Dockerfile b/dev.Dockerfile index bced3a76f..f2bd5a573 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -3,7 +3,7 @@ FROM mcr.microsoft.com/devcontainers/ruby:3.1-bullseye # DEBIAN_FRONTEND=noninteractive is required to install tzdata in non interactive way ENV DEBIAN_FRONTEND noninteractive ENV USER='vscode' -ENV NODE_VERSION 18.12.1 +ENV NODE_VERSION 18.15.0 ENV NODE_ENV docker ENV NPM_CONFIG_PREFIX="/home/${USER}/.npm-global" ENV BUNDLE_PATH=/home/${USER}/.gems @@ -46,6 +46,7 @@ RUN curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/ 4ED778F539E3634C779C87C6D7062848A1AB005C \ 141F07595B7B3FFE74309A937405533BE57C7D57 \ 74F12602B6F1C4E913FAA37AD3A89613643B6201 \ + DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 \ 61FC681DFB92A079F1685E77973F295594EC4689 \ 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \ C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ @@ -78,8 +79,7 @@ WORKDIR /workspace COPY --chown="${USER}":"${USER}" package.json /workspace RUN mkdir -p "${NPM_CONFIG_PREFIX}/lib" \ - && npm install -g npm@9.2.0 \ - && npm --global config set user "${USER}" \ + && npm install -g npm@9.6.1 \ && npm install -g husky --save-dev \ && npm i -g standard-version From 30bee5fbab00164f61f69aa79c3fb420d2850dc5 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Tue, 21 Mar 2023 20:20:57 +1100 Subject: [PATCH 29/54] build: update dev container to include docker --- dev.Dockerfile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/dev.Dockerfile b/dev.Dockerfile index f2bd5a573..61dbc0d28 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -2,6 +2,14 @@ FROM mcr.microsoft.com/devcontainers/ruby:3.1-bullseye # DEBIAN_FRONTEND=noninteractive is required to install tzdata in non interactive way ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get update \ + && apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common \ + && curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \ + && add-apt-repository "deb [arch=amd64,arm64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" \ + && curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg \ + && echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list + ENV USER='vscode' ENV NODE_VERSION 18.15.0 ENV NODE_ENV docker @@ -10,9 +18,7 @@ ENV BUNDLE_PATH=/home/${USER}/.gems COPY --chown="${USER}":"${USER}" doubtfire-api/.ci-setup/ /workspace/doubtfire-api/.ci-setup/ -RUN curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg \ - && echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list \ - && apt-get update \ +RUN apt-get update \ && apt-get install -y \ lsb-release \ ffmpeg \ @@ -29,6 +35,9 @@ RUN curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/ gosu \ redis \ inkscape \ + docker-ce \ + docker-ce-cli \ + containerd.io \ && apt-get clean \ && ARCH= && dpkgArch="$(dpkg --print-architecture)" \ && case "${dpkgArch##*-}" in \ From 6cada840104e7ad6762dd7a949064cddc0bb5606 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Mon, 27 Mar 2023 20:13:25 +1100 Subject: [PATCH 30/54] chore: update version for development image --- .devcontainer/devcontainer.json | 2 +- development/version.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7bd8ed3fb..c9bbea1a1 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,7 @@ //devcontainer.json { "name": "Formatif Development Container", - "image": "lmsdoubtfire/formatif-devcontainer:7.0-dev", + "image": "lmsdoubtfire/formatif-devcontainer:8.0-dev", "runArgs": ["--env-file",".devcontainer/devcontainer.env"], // "dockerFile": "../dev.Dockerfile", diff --git a/development/version.sh b/development/version.sh index e800386a7..13ef873bc 100644 --- a/development/version.sh +++ b/development/version.sh @@ -4,6 +4,6 @@ # When the configuration of a container changes, the version should be incremented. # Breaking changes should increment the major version. # Non-breaking changes should increment the minor version. -export CURRENT_API_VERSION=7.0 -export CURRENT_WEB_VERSION=7.0 -export CURRENT_DEV_VERSION=7.0 +export CURRENT_API_VERSION=8.0 +export CURRENT_WEB_VERSION=8.0 +export CURRENT_DEV_VERSION=8.0 From bab4a0b4b371e84b4d994b7cca6c23f4f276941f Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Mon, 27 Mar 2023 20:34:23 +1100 Subject: [PATCH 31/54] chore: remove sudo from docker file install commands --- dev.Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev.Dockerfile b/dev.Dockerfile index 61dbc0d28..a04168d67 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -7,8 +7,8 @@ RUN apt-get update \ && apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common \ && curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \ && add-apt-repository "deb [arch=amd64,arm64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" \ - && curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg \ - && echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list + && curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg \ + && echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/redis.list ENV USER='vscode' ENV NODE_VERSION 18.15.0 From 13bd3834e2270b2112b687958f192c32cb831154 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Mon, 27 Mar 2023 20:36:31 +1100 Subject: [PATCH 32/54] chore: update submodules --- doubtfire-api | 2 +- doubtfire-web | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doubtfire-api b/doubtfire-api index 1cdefb683..bbdb0357c 160000 --- a/doubtfire-api +++ b/doubtfire-api @@ -1 +1 @@ -Subproject commit 1cdefb683cb342df79e13bb8377eccec664dc265 +Subproject commit bbdb0357cfb3969b5a324a140a370aba9e95d83d diff --git a/doubtfire-web b/doubtfire-web index 6a4af3931..95ebbf0e5 160000 --- a/doubtfire-web +++ b/doubtfire-web @@ -1 +1 @@ -Subproject commit 6a4af393196bc69650b4200bb845b31c90a61554 +Subproject commit 95ebbf0e58b5ada8f070d4c42f62a50d7a34ed11 From 2372a863a5bd17876581d545de577f630d09e75a Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Mon, 27 Mar 2023 20:53:15 +1100 Subject: [PATCH 33/54] chore: add legacy deps for now --- dev.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev.Dockerfile b/dev.Dockerfile index a04168d67..e15ed23df 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -92,7 +92,7 @@ RUN mkdir -p "${NPM_CONFIG_PREFIX}/lib" \ && npm install -g husky --save-dev \ && npm i -g standard-version -RUN npm install +RUN npm install --legacy-peer-deps # Install oh-my-zsh, powerlevel10k theme, and plugins RUN git clone https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k \ From 0b99cc6af7e78dc8f0d05acc22c70c6cc13bb1ff Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Mon, 27 Mar 2023 21:08:15 +1100 Subject: [PATCH 34/54] chore: install legacy packages for web --- dev.Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev.Dockerfile b/dev.Dockerfile index e15ed23df..a404e69c7 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -92,7 +92,7 @@ RUN mkdir -p "${NPM_CONFIG_PREFIX}/lib" \ && npm install -g husky --save-dev \ && npm i -g standard-version -RUN npm install --legacy-peer-deps +RUN npm install # Install oh-my-zsh, powerlevel10k theme, and plugins RUN git clone https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k \ @@ -108,7 +108,7 @@ WORKDIR /workspace/doubtfire-web COPY --chown="${USER}":"${USER}" doubtfire-web/package.json /workspace/doubtfire-web # Install web ui packages -RUN npm install +RUN npm install --legacy-peer-deps # Setup the folder where we will deploy the code WORKDIR /workspace/doubtfire-api From 640e9238a4049d972a9368872ef928388b9e8ce3 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Wed, 29 Mar 2023 19:40:46 +1100 Subject: [PATCH 35/54] chore: update image version for development compose --- development/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/development/docker-compose.yml b/development/docker-compose.yml index dfe2c0095..9c15d2c09 100644 --- a/development/docker-compose.yml +++ b/development/docker-compose.yml @@ -13,7 +13,7 @@ services: doubtfire-api: container_name: doubtfire-api - image: lmsdoubtfire/doubtfire-api:7.0-dev + image: lmsdoubtfire/doubtfire-api:8.0-dev build: ../doubtfire-api ports: - "3000:3000" @@ -73,7 +73,7 @@ services: doubtfire-web: container_name: doubtfire-web - image: lmsdoubtfire/doubtfire-web:7.0-dev + image: lmsdoubtfire/doubtfire-web:8.0-dev build: ../doubtfire-web command: /bin/bash -c 'npm install; npm start' ports: From fb6331420f15b8fb2d71c768ffc0c8bfc7104ea0 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Thu, 30 Mar 2023 09:44:06 +1100 Subject: [PATCH 36/54] chore: update web and remove legacy npm install --- dev.Dockerfile | 2 +- doubtfire-web | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev.Dockerfile b/dev.Dockerfile index a404e69c7..a04168d67 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -108,7 +108,7 @@ WORKDIR /workspace/doubtfire-web COPY --chown="${USER}":"${USER}" doubtfire-web/package.json /workspace/doubtfire-web # Install web ui packages -RUN npm install --legacy-peer-deps +RUN npm install # Setup the folder where we will deploy the code WORKDIR /workspace/doubtfire-api diff --git a/doubtfire-web b/doubtfire-web index 95ebbf0e5..979a8b975 160000 --- a/doubtfire-web +++ b/doubtfire-web @@ -1 +1 @@ -Subproject commit 95ebbf0e58b5ada8f070d4c42f62a50d7a34ed11 +Subproject commit 979a8b9752645ecaf6a12528ba6ca2764007a0d4 From 77f82985a1e2a329ada884e5b5bc5251612c9ee3 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Thu, 30 Mar 2023 11:13:21 +1100 Subject: [PATCH 37/54] chore: utilise docker volume for node modules in development --- development/docker-compose.yml | 2 +- doubtfire-web | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/development/docker-compose.yml b/development/docker-compose.yml index 9c15d2c09..9ac0649c5 100644 --- a/development/docker-compose.yml +++ b/development/docker-compose.yml @@ -82,7 +82,7 @@ services: - doubtfire-api volumes: - ../doubtfire-web:/doubtfire-web + - web_node_modules:/doubtfire-web/node_modules volumes: - ws_node_modules: web_node_modules: diff --git a/doubtfire-web b/doubtfire-web index 979a8b975..3f857b85a 160000 --- a/doubtfire-web +++ b/doubtfire-web @@ -1 +1 @@ -Subproject commit 979a8b9752645ecaf6a12528ba6ca2764007a0d4 +Subproject commit 3f857b85adb6cd3448a30f80724ba4a9bdedae86 From 81360617901860ca26e141ebbcdc594bfeec5fd8 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Thu, 30 Mar 2023 11:43:22 +1100 Subject: [PATCH 38/54] chore: launch db as vscode user --- .devcontainer/launch_db.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.devcontainer/launch_db.sh b/.devcontainer/launch_db.sh index 9bb957fd4..b99e06b17 100755 --- a/.devcontainer/launch_db.sh +++ b/.devcontainer/launch_db.sh @@ -171,7 +171,7 @@ docker_verify_minimum_env() { } # creates folders for the database -# also ensures permission for user mysql of run as root +# also ensures permission for user mysql of run as root -- changing to vscode for devcontainer docker_create_db_directories() { local user user="$(id -u)" @@ -182,9 +182,11 @@ docker_create_db_directories() { if [ "$user" = "0" ]; then # this will cause less disk access than `chown -R` - find "$DATADIR" \! -user mysql -exec chown mysql '{}' + + find "$DATADIR" \! -user vscode -exec chown vscode '{}' + + find /var/lib/mysql \! -user vscode -exec chown vscode '{}' + + find /run/mysqld \! -user vscode -exec chown vscode '{}' + # See https://github.com/MariaDB/mariadb-docker/issues/363 - find "${SOCKET%/*}" -maxdepth 0 \! -user mysql -exec chown mysql '{}' \; + find "${SOCKET%/*}" -maxdepth 0 \! -user vscode -exec chown vscode '{}' \; fi } @@ -381,8 +383,8 @@ _main() { # If container is started as root user, restart as dedicated mysql user if [ "$(id -u)" = "0" ]; then - mysql_note "Switching to dedicated user 'mysql'" - exec gosu mysql "$BASH_SOURCE" "$@" + mysql_note "Switching to dedicated user 'vscode'" + exec gosu vscode "$BASH_SOURCE" "$@" fi # there's no database, so it needs to be initialized @@ -413,7 +415,7 @@ _main() { echo fi fi - exec "$@" >>/workspace/tmp/database.log 2>>/workspace/tmp/database.log & + exec "$@" >/workspace/tmp/database.log 2>>/workspace/tmp/database.log & } # If we are sourced from elsewhere, don't perform any further actions From 3a014cc5a03af2f4239fe4737ce97d7e4a21663a Mon Sep 17 00:00:00 2001 From: jakerenzella Date: Sat, 13 May 2023 14:28:42 +1000 Subject: [PATCH 39/54] build: add tailwind ext to devcontainer --- .devcontainer/devcontainer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c9bbea1a1..fc8c7aa12 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -31,10 +31,10 @@ "GitHub.vscode-pull-request-github", "GitHub.copilot", "Angular.ng-template", - "johnpapa.Angular2", "ms-azuretools.vscode-docker", "esbenp.prettier-vscode", - "foxundermoon.shell-format" + "foxundermoon.shell-format", + "bradlc.vscode-tailwindcss" ] } }, From 64349b440b1b2bbdeefdfec997319c71920ec3a4 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Tue, 30 May 2023 22:24:58 +1000 Subject: [PATCH 40/54] chore: add qpdf to dev container --- dev.Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/dev.Dockerfile b/dev.Dockerfile index a404e69c7..f66434ffd 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -23,6 +23,7 @@ RUN apt-get update \ lsb-release \ ffmpeg \ ghostscript \ + qpdf \ imagemagick \ libmagic-dev \ libmagickwand-dev \ From 4166f8fa92412e33e6b541bac2cc5edbcf25c465 Mon Sep 17 00:00:00 2001 From: jakerenzella Date: Thu, 22 Jun 2023 13:57:41 +1000 Subject: [PATCH 41/54] Launch frontend + backend when opened --- .devcontainer/devcontainer.json | 4 +-- .vscode/settings.json | 5 ++++ .vscode/tasks.json | 46 +++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index fc8c7aa12..77d708958 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,7 +2,7 @@ { "name": "Formatif Development Container", "image": "lmsdoubtfire/formatif-devcontainer:8.0-dev", - "runArgs": ["--env-file",".devcontainer/devcontainer.env"], + "runArgs": ["--env-file", ".devcontainer/devcontainer.env"], // "dockerFile": "../dev.Dockerfile", // "dockerComposeFile": "../development/docker-compose.yml", @@ -75,7 +75,7 @@ "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind", "workspaceFolder": "/workspace", - "forwardPorts": [3000,4200,9876], + "forwardPorts": [3000, 4200, 9876], "postCreateCommand": "/workspace/.devcontainer/post_create.sh", "postStartCommand": "/workspace/.devcontainer/post_start.sh", diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..945a091b6 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "githubPullRequests.ignoredPullRequestBranches": [ + "development" + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000..361184a28 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,46 @@ +// See https://go.microsoft.com/fwlink/?LinkId=733558 +// for the documentation about the tasks.json format +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Serve web frontend", + "type": "shell", + "command": "npm start", + "group": "build", + "presentation": { + "group": "buildGroup", + "reveal": "always", + "panel": "new", + "echo": false + }, + "options": { + "cwd": "${workspaceFolder}/doubtfire-web/" + } + }, + { + "label": "Serve Rails API", + "type": "shell", + "command": "rails s", + "group": "build", + "presentation": { + "group": "buildGroup", + "reveal": "always", + "panel": "new", + "echo": false + }, + "options": { + "cwd": "${workspaceFolder}/doubtfire-api/" + } + }, + { + "label": "Serve", + "dependsOn": ["Serve web frontend", "Serve Rails API"], + "group": "build", + "runOptions": { + "runOn": "folderOpen" // This starts both tasks when the container is started + }, + "dependsOrder": "parallel" // no dependencies between tasks + } + ] +} From 8979d610306c13bb77aa6c8a6555e21273d699b4 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Fri, 7 Jul 2023 15:21:15 +1000 Subject: [PATCH 42/54] fix: move devcontainer resources to volumes This should fix issues with this working on Windows. --- .devcontainer/devcontainer.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 77d708958..d6088088c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -41,19 +41,19 @@ "mounts": [ { - "source": "${localWorkspaceFolder}/data/database", + "source": "formatif-dev-database", "target": "/var/lib/mysql", - "type": "bind" + "type": "volume" }, { - "source": "${localWorkspaceFolder}/data/tmp", + "source": "formatif-dev-tmp", "target": "/workspace/tmp", - "type": "bind" + "type": "volume" }, { - "source": "${localWorkspaceFolder}/data/student-work", + "source": "formatif-dev-student-work", "target": "/student-work", - "type": "bind" + "type": "volume" }, { "source": "ws_node_modules", From 7a1a1bd7c1f6f52c8d330d924f0a38bcad3ca8bb Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Fri, 7 Jul 2023 15:21:40 +1000 Subject: [PATCH 43/54] fix: ensure database is setup with vscode user on create --- .devcontainer/launch_db.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/launch_db.sh b/.devcontainer/launch_db.sh index b99e06b17..f1bae52b7 100755 --- a/.devcontainer/launch_db.sh +++ b/.devcontainer/launch_db.sh @@ -199,7 +199,7 @@ docker_init_database_dir() { installArgs+=(--skip-test-db) fi # "Other options are passed to mysqld." (so we pass all "mysqld" arguments directly here) - mysql_install_db "${installArgs[@]}" "${@:2}" --default-time-zone=SYSTEM --enforce-storage-engine= + mysql_install_db "${installArgs[@]}" "${@:2}" --default-time-zone=SYSTEM --user=vscode --enforce-storage-engine= mysql_note "Database files initialized" } From 1bfc6b2f8e4e65d01d6ec852555a5f647048d0af Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Fri, 7 Jul 2023 15:25:14 +1000 Subject: [PATCH 44/54] fix: ensure volumes are writable by vscode --- .devcontainer/post_create.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.devcontainer/post_create.sh b/.devcontainer/post_create.sh index 052a823a3..c22a71ee3 100755 --- a/.devcontainer/post_create.sh +++ b/.devcontainer/post_create.sh @@ -5,8 +5,16 @@ ln -sf /workspace/.devcontainer/.zshrc $HOME ln -s /workspace/.devcontainer/.p10k.zsh $HOME ln -s /workspace/.devcontainer/.irbrc $HOME + +sudo chmod a+rw /var/lib/mysql +sudo chmod a+rw /workspace/tmp + echo 'Granting access to student work in the background' sudo find /student-work/* -exec chmod a+rw {} \; & +sudo chmod a+rw /workspace/node_modules +sudo chmod a+rw /workspace/doubtfire-web/node_modules +sudo chmod a+rw /home/vscode/.gems + echo 'Starting Services' /workspace/.devcontainer/docker-entrypoint.sh echo "Done" From 19be8d9e76d27a56d673280414c290b2b52191da Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Mon, 10 Jul 2023 16:21:19 +1000 Subject: [PATCH 45/54] fix: update to 8.1 for devcontainer - clear out database in image - setup student-work and workspace tmp --- .devcontainer/devcontainer.json | 2 +- .devcontainer/docker-compose.yml | 13 +++++++++---- .devcontainer/docker-entrypoint.sh | 2 +- .devcontainer/post_create.sh | 11 +++++------ .devcontainer/setup_formatif_db.sh | 1 + dev.Dockerfile | 6 ++++++ development/version.sh | 2 +- 7 files changed, 24 insertions(+), 13 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d6088088c..b8b69dc49 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,7 @@ //devcontainer.json { "name": "Formatif Development Container", - "image": "lmsdoubtfire/formatif-devcontainer:8.0-dev", + "image": "lmsdoubtfire/formatif-devcontainer:8.1-dev", "runArgs": ["--env-file", ".devcontainer/devcontainer.env"], // "dockerFile": "../dev.Dockerfile", diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 5bfa36d79..8b004301d 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: formatif-dev-container: container_name: formatif-dev-container - image: formatif-devcontainer:7.0-dev + image: formatif-devcontainer:8.1-dev build: context: ../ dockerfile: dev.Dockerfile @@ -10,11 +10,12 @@ services: # Mounts the project folder to '/workspace'. While this file is in .devcontainer, # mounts are relative to the first file in the list, which is a level up. - ..:/workspace:cached - - ../data/tmp:/workspace/tmp - - ../data/student-work:/student-work + - formatif_tmp_compose:/workspace/tmp + - formatif_student-work_compose:/student-work - ws_node_modules:/workspace/node_modules - web_node_modules:/workspace/doubtfire-web/node_modules - - ../data/database:/var/lib/mysql + - formatif_db_compose:/var/lib/mysql + - formatif_gems_compose:/home/vscode/.gems ports: - "9876:9876" - "4200:4200" @@ -27,3 +28,7 @@ services: volumes: ws_node_modules: web_node_modules: + formatif_tmp_compose: + formatif_student-work_compose: + formatif_db_compose: + formatif_gems_compose: diff --git a/.devcontainer/docker-entrypoint.sh b/.devcontainer/docker-entrypoint.sh index 94ff73982..892c12160 100755 --- a/.devcontainer/docker-entrypoint.sh +++ b/.devcontainer/docker-entrypoint.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env zsh echo "Starting Formatif development container..." diff --git a/.devcontainer/post_create.sh b/.devcontainer/post_create.sh index c22a71ee3..380c41354 100755 --- a/.devcontainer/post_create.sh +++ b/.devcontainer/post_create.sh @@ -6,15 +6,14 @@ ln -s /workspace/.devcontainer/.p10k.zsh $HOME ln -s /workspace/.devcontainer/.irbrc $HOME -sudo chmod a+rw /var/lib/mysql +sudo chown vscode:vscode /var/lib/mysql +# sudo chmod a+rw /var/lib/mysql sudo chmod a+rw /workspace/tmp - -echo 'Granting access to student work in the background' -sudo find /student-work/* -exec chmod a+rw {} \; & - sudo chmod a+rw /workspace/node_modules +#sudo chmod a+rw /student-work +sudo chown vscode:vscode /student-work sudo chmod a+rw /workspace/doubtfire-web/node_modules sudo chmod a+rw /home/vscode/.gems echo 'Starting Services' -/workspace/.devcontainer/docker-entrypoint.sh echo "Done" +sudo -E /workspace/.devcontainer/docker-entrypoint.sh echo "Done" diff --git a/.devcontainer/setup_formatif_db.sh b/.devcontainer/setup_formatif_db.sh index 793730b76..0e03f7ec0 100755 --- a/.devcontainer/setup_formatif_db.sh +++ b/.devcontainer/setup_formatif_db.sh @@ -59,6 +59,7 @@ else echo "Creating and populating database - do not shutdown!" cd /workspace/doubtfire-api + bundle install bundle exec rake db:populate echo "Database created - you can open another terminal while this completes if you want.." diff --git a/dev.Dockerfile b/dev.Dockerfile index a04168d67..2a31fb2f1 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -130,5 +130,11 @@ COPY --chown="${USER}":"${USER}" .devcontainer /workspace/.devcontainer ENV HISTFILE /workspace/tmp/.zsh_history RUN sudo chmod +x /workspace/.devcontainer/*.sh +RUN sudo rm -rf /var/lib/mysql/* && \ + sudo chown vscode:vscode /var/lib/mysql && \ + mkdir /workspace/tmp && \ + sudo mkdir /student-work && \ + sudo chown vscode:vscode /student-work + ENTRYPOINT [ "/workspace/.devcontainer/docker-entrypoint.sh" ] CMD [ "sleep", "infinity" ] diff --git a/development/version.sh b/development/version.sh index 13ef873bc..9033ea088 100644 --- a/development/version.sh +++ b/development/version.sh @@ -6,4 +6,4 @@ # Non-breaking changes should increment the minor version. export CURRENT_API_VERSION=8.0 export CURRENT_WEB_VERSION=8.0 -export CURRENT_DEV_VERSION=8.0 +export CURRENT_DEV_VERSION=8.1 From 685ec787396eae4a0457beb11ec7c5e226cd560d Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Tue, 11 Jul 2023 09:40:52 +1000 Subject: [PATCH 46/54] fix: ensure components installed in tasks - add bundle install for api - add npm install for web This ensures that these are updated to match the bundle and package. --- .vscode/tasks.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 361184a28..5170d2e71 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -6,7 +6,7 @@ { "label": "Serve web frontend", "type": "shell", - "command": "npm start", + "command": "npm install && npm start", "group": "build", "presentation": { "group": "buildGroup", @@ -21,7 +21,7 @@ { "label": "Serve Rails API", "type": "shell", - "command": "rails s", + "command": "bundle install && rails s", "group": "build", "presentation": { "group": "buildGroup", From 21abe7e33469c5a91fdac655b191d3c98d05773a Mon Sep 17 00:00:00 2001 From: maddernd <87599686+maddernd@users.noreply.github.com> Date: Tue, 11 Jul 2023 11:32:08 +1000 Subject: [PATCH 47/54] docs: contributing-dev-containers Added update to explain launch via Dev Container Daniel Maddern --- CONTRIBUTING.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6a08c2a07..b704a576a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,9 +41,43 @@ There are several docker compose setups to aid in speeding up the development. - The **docker-compose.yml** file contains the most likely setup with development setups for both the api and web projets. This should be used when working on both the api and the web front end. You can run this using **run-api-web.sh**. - The **docker-compose.full.yml** contains a setup with all of the containers needed to run Doubtfire with overseer. This requires access to the overseer repository. You can run this using **run-full.sh** +### Working with Dev Containers + +This is the primary method for setting up your development enviroment: + +Pre requisittes: Vscode, Docker +OS: Windows/Linux/Mac OS + +1. Fork [doubtfire-deploy](https://github.com/doubtfire-lms/doubtfire-deploy), [doubtfire-api](https://github.com/doubtfire-lms/doubtfire-api), and [doubtfire-web](https://github.com/doubtfire-lms/doubtfire-web) + + To push your contributions, you will need a fork of each repository. Contributions can then be made by making pull requests back into the main repositories. + +2. Clone your [doubtfire-deploy](https://github.com/doubtfire-lms/doubtfire-deploy). Make sure to fetch submodules to get the subprojects. + + `git clone --recurse-submodules https://github.com/YOUR_USERNAME/doubtfire-deploy` + +3. Open a Terminal that supports `sh` scripts (on Windows, you will need WSL, Msys2, or Cygwin). Run the following command to set your fork as the remote. + + `./change_remotes.sh` + +4. In Visual studio press F1: Find Dev Containers: Open folder in Container (This will reopen the repo you cloned in a container) + +5. The container will automaticlly setup the DB, Frontend, Backend and your development enviroment ready for use. + +6. Open a web browser and navigate to: + + - [http://localhost:3000/api/docs/](http://localhost:3000/api/docs/) to interact with the API using [Swagger](https://swagger.io). + - [http://localhost:4200](http://localhost:4200) to use the web application. + + The database will include a number of default users, each with password being "password". + - Admin user: **aadmin** + - Convenor user: **aconvenor** + - Tutor user: **atutor** + - Students: **student_1** + ### Working with Docker Compose -To get started: +Alternative setup using Docker-Compose: 1. Fork [doubtfire-deploy](https://github.com/doubtfire-lms/doubtfire-deploy), [doubtfire-api](https://github.com/doubtfire-lms/doubtfire-api), and [doubtfire-web](https://github.com/doubtfire-lms/doubtfire-web) From f38c0c682e78b7eacbacaec1259c91402c50a002 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Fri, 14 Jul 2023 10:43:29 +1000 Subject: [PATCH 48/54] fix: permissions and simulate of signoff - ensure student work is always vscode - ensure simnulate happens... and doesn't end --- .devcontainer/docker-entrypoint.sh | 2 +- .devcontainer/post_create.sh | 2 +- .devcontainer/setup_formatif_db.sh | 11 ++++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.devcontainer/docker-entrypoint.sh b/.devcontainer/docker-entrypoint.sh index 892c12160..821e26802 100755 --- a/.devcontainer/docker-entrypoint.sh +++ b/.devcontainer/docker-entrypoint.sh @@ -7,7 +7,7 @@ sudo -E /workspace/.devcontainer/launch_db.sh mysqld # Start the redis server mkdir -p /workspace/tmp/sidekiq-redis -redis-server --dir /workspace/tmp/sidekiq-redis >>/workspace/tmp/redis.log 2>>/workspace/tmp/redis.log & +sudo redis-server --dir /workspace/tmp/sidekiq-redis >>/workspace/tmp/redis.log 2>>/workspace/tmp/redis.log & # Wait for mysql to start then setup the database if needed /workspace/.devcontainer/setup_formatif_db.sh diff --git a/.devcontainer/post_create.sh b/.devcontainer/post_create.sh index 380c41354..791af6ce1 100755 --- a/.devcontainer/post_create.sh +++ b/.devcontainer/post_create.sh @@ -16,4 +16,4 @@ sudo chmod a+rw /workspace/doubtfire-web/node_modules sudo chmod a+rw /home/vscode/.gems echo 'Starting Services' -sudo -E /workspace/.devcontainer/docker-entrypoint.sh echo "Done" +/workspace/.devcontainer/docker-entrypoint.sh echo "Done" diff --git a/.devcontainer/setup_formatif_db.sh b/.devcontainer/setup_formatif_db.sh index 0e03f7ec0..fc1165d14 100755 --- a/.devcontainer/setup_formatif_db.sh +++ b/.devcontainer/setup_formatif_db.sh @@ -63,9 +63,10 @@ else bundle exec rake db:populate echo "Database created - you can open another terminal while this completes if you want.." - echo "Simulating sign off in the background" - ( - bundle exec rake db:simulate_signoff >>/workspace/tmp/database_populate.log 2>>/workspace/tmp/database_populate.log - rm /workspace/tmp/database_populate.log - )& + echo "Simulating sign off in the background - this may take a while.... but you can get started working - we are all setup" + + bundle exec rake db:simulate_signoff >>/workspace/tmp/database_populate.log 2>>/workspace/tmp/database_populate.log + rm /workspace/tmp/database_populate.log + + echo "Simulation of signoff complete" fi From ab4d11ff2ecfacfa36adb6eb292241fb19f749de Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Fri, 14 Jul 2023 12:58:52 +1000 Subject: [PATCH 49/54] fix: global npm install angular and fix path --- dev.Dockerfile | 8 ++++---- doubtfire-api | 2 +- doubtfire-web | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dev.Dockerfile b/dev.Dockerfile index 2a31fb2f1..cd5441eed 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -22,7 +22,7 @@ RUN apt-get update \ && apt-get install -y \ lsb-release \ ffmpeg \ - ghostscript \ + ghostscript qpdf \ imagemagick \ libmagic-dev \ libmagickwand-dev \ @@ -90,6 +90,7 @@ COPY --chown="${USER}":"${USER}" package.json /workspace RUN mkdir -p "${NPM_CONFIG_PREFIX}/lib" \ && npm install -g npm@9.6.1 \ && npm install -g husky --save-dev \ + && npm install -g @angular/cli \ && npm i -g standard-version RUN npm install @@ -100,7 +101,7 @@ RUN git clone https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/t && git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions ENV RAILS_ENV development -ENV PATH /home/$USER/.gems/ruby/3.1.0/bin:$PATH:/tmp/texlive/bin/x86_64-linux:/tmp/texlive/bin/aarch64-linux:$PATH +ENV PATH /home/$USER/.gems/ruby/3.1.0/bin:$PATH:/tmp/texlive/bin/x86_64-linux:/tmp/texlive/bin/aarch64-linux:$PATH:/home/$USER/.npm-global/bin ENV GEM_PATH /home/$USER/.gems/ruby/3.1.0:$GEM_PATH # Install the web ui @@ -116,8 +117,7 @@ WORKDIR /workspace/doubtfire-api COPY --chown="${USER}":"${USER}" doubtfire-api/Gemfile /workspace/doubtfire-api/Gemfile COPY --chown="${USER}":"${USER}" doubtfire-api/Gemfile.lock /workspace/doubtfire-api/Gemfile.lock -RUN bundle install \ - && npx husky install +RUN bundle install WORKDIR /workspace diff --git a/doubtfire-api b/doubtfire-api index bbdb0357c..3bd910797 160000 --- a/doubtfire-api +++ b/doubtfire-api @@ -1 +1 @@ -Subproject commit bbdb0357cfb3969b5a324a140a370aba9e95d83d +Subproject commit 3bd91079764ad153f299e2519e7ddbba9377fc8e diff --git a/doubtfire-web b/doubtfire-web index 3f857b85a..514cfc08e 160000 --- a/doubtfire-web +++ b/doubtfire-web @@ -1 +1 @@ -Subproject commit 3f857b85adb6cd3448a30f80724ba4a9bdedae86 +Subproject commit 514cfc08e0382d85381c61633f07695159d67e0d From 43712a2289d6d034bca684d0e14d69fd3dff3540 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Fri, 14 Jul 2023 13:01:49 +1000 Subject: [PATCH 50/54] chore: update dev container to new image --- .devcontainer/devcontainer.json | 2 +- .devcontainer/docker-compose.yml | 2 +- development/version.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b8b69dc49..978aa4455 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,7 @@ //devcontainer.json { "name": "Formatif Development Container", - "image": "lmsdoubtfire/formatif-devcontainer:8.1-dev", + "image": "lmsdoubtfire/formatif-devcontainer:8.2-dev", "runArgs": ["--env-file", ".devcontainer/devcontainer.env"], // "dockerFile": "../dev.Dockerfile", diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 8b004301d..fd3fb36f2 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: formatif-dev-container: container_name: formatif-dev-container - image: formatif-devcontainer:8.1-dev + image: formatif-devcontainer:8.2-dev build: context: ../ dockerfile: dev.Dockerfile diff --git a/development/version.sh b/development/version.sh index 9033ea088..c4bcbcae7 100644 --- a/development/version.sh +++ b/development/version.sh @@ -6,4 +6,4 @@ # Non-breaking changes should increment the minor version. export CURRENT_API_VERSION=8.0 export CURRENT_WEB_VERSION=8.0 -export CURRENT_DEV_VERSION=8.1 +export CURRENT_DEV_VERSION=8.2 From ae8104ee35bd44c3cd8b6e1f92e659575d36e67e Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Mon, 4 Sep 2023 13:37:25 +1000 Subject: [PATCH 51/54] docs: document new ldap bind features --- DEPLOYING.md | 3 +++ production/.env.production | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/DEPLOYING.md b/DEPLOYING.md index af25d6575..930547a2c 100644 --- a/DEPLOYING.md +++ b/DEPLOYING.md @@ -70,6 +70,9 @@ The setups to configure these components include: - DF_LDAP_ATTRIBUTE - DF_LDAP_BASE - DF_LDAP_SSL + - DF_LDAP_USE_ADMIN_TO_BIND + - DF_LDAP_ADMIN_USER + - DF_LDAP_ADMIN_PWD - **DF_ENCRYPTION_*** - is used in encrypting data in the database. Generate these from within the *apiserver* container using `rails db:encryption:init`. See [Active Record Encryption](https://guides.rubyonrails.org/active_record_encryption.html). - Setup email settings, see [Action Mailer](https://guides.rubyonrails.org/action_mailer_basics.html). - Set **DF_MAIL_PERFORM_DELIVERIES** to `yes` (lowercase) to enable mail sending diff --git a/production/.env.production b/production/.env.production index 250008bb2..9670101ce 100644 --- a/production/.env.production +++ b/production/.env.production @@ -81,6 +81,10 @@ DF_LDAP_PORT= DF_LDAP_ATTRIBUTE= DF_LDAP_BASE= DF_LDAP_SSL=false +DF_LDAP_USE_ADMIN_TO_BIND=false +DF_LDAP_ADMIN_USER= +DF_LDAP_ADMIN_PWD= + # # Overseer - requires additional configuration From 3a940e37e5abd7aa27c1401c97ccf1bc3a72fdc7 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Fri, 22 Mar 2024 16:21:49 +1100 Subject: [PATCH 52/54] feat: progress redis integration into development compose --- .devcontainer/build.sh | 2 +- .devcontainer/devcontainer.json | 2 +- .devcontainer/docker-compose.yml | 2 +- dev.Dockerfile | 4 ++-- development/docker-compose.yml | 13 +++++++++++++ development/version.sh | 6 +++--- doubtfire-api | 2 +- doubtfire-web | 2 +- production/docker-compose.yml | 1 + 9 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.devcontainer/build.sh b/.devcontainer/build.sh index 5c453929d..e21c7208f 100755 --- a/.devcontainer/build.sh +++ b/.devcontainer/build.sh @@ -12,7 +12,7 @@ echo echo "Run publish.sh when you are ready to push the new images to docker hub." echo echo " You are on branch: ${CURRENT_BRANCH}" -echo " dev container version: ${CURRENT_WEB_VERSION}" +echo " dev container version: ${CURRENT_DEV_VERSION}" echo echo "This will produce docker images with the following names" echo " - lmsdoubtfire/formatif-devcontainer:${CURRENT_DEV_VERSION}-dev" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 978aa4455..7dba47230 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,7 @@ //devcontainer.json { "name": "Formatif Development Container", - "image": "lmsdoubtfire/formatif-devcontainer:8.2-dev", + "image": "lmsdoubtfire/formatif-devcontainer:8.3-dev", "runArgs": ["--env-file", ".devcontainer/devcontainer.env"], // "dockerFile": "../dev.Dockerfile", diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index fd3fb36f2..e6a972c34 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: formatif-dev-container: container_name: formatif-dev-container - image: formatif-devcontainer:8.2-dev + image: formatif-devcontainer:8.3-dev build: context: ../ dockerfile: dev.Dockerfile diff --git a/dev.Dockerfile b/dev.Dockerfile index 5db5aa8b7..c375c6410 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -94,7 +94,7 @@ RUN mkdir -p "${NPM_CONFIG_PREFIX}/lib" \ && npm install -g @angular/cli \ && npm i -g standard-version -RUN npm install +RUN npm install -f # Install oh-my-zsh, powerlevel10k theme, and plugins RUN git clone https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k \ @@ -110,7 +110,7 @@ WORKDIR /workspace/doubtfire-web COPY --chown="${USER}":"${USER}" doubtfire-web/package.json /workspace/doubtfire-web # Install web ui packages -RUN npm install +RUN npm install -f # Setup the folder where we will deploy the code WORKDIR /workspace/doubtfire-api diff --git a/development/docker-compose.yml b/development/docker-compose.yml index 9ac0649c5..95d6dc372 100644 --- a/development/docker-compose.yml +++ b/development/docker-compose.yml @@ -11,6 +11,12 @@ services: volumes: - ../data/database:/var/lib/mysql + redis-sidekiq: + container_name: doubtfire-redis-sidekiq + image: redis:7.0 + volumes: + - redis_sidekiq_data:/data + doubtfire-api: container_name: doubtfire-api image: lmsdoubtfire/doubtfire-api:8.0-dev @@ -71,6 +77,12 @@ services: # RABBITMQ_USERNAME: secure_credentials # RABBITMQ_PASSWORD: secure_credentials + # Turn It In + TII_ENABLED: false + + # Redis + DF_REDIS_SIDEKIQ_URL: redis://doubtfire-redis-sidekiq:6379/0 + doubtfire-web: container_name: doubtfire-web image: lmsdoubtfire/doubtfire-web:8.0-dev @@ -86,3 +98,4 @@ services: volumes: web_node_modules: + redis_sidekiq_data: diff --git a/development/version.sh b/development/version.sh index c4bcbcae7..573e68f61 100644 --- a/development/version.sh +++ b/development/version.sh @@ -4,6 +4,6 @@ # When the configuration of a container changes, the version should be incremented. # Breaking changes should increment the major version. # Non-breaking changes should increment the minor version. -export CURRENT_API_VERSION=8.0 -export CURRENT_WEB_VERSION=8.0 -export CURRENT_DEV_VERSION=8.2 +export CURRENT_API_VERSION=8.3 +export CURRENT_WEB_VERSION=8.3 +export CURRENT_DEV_VERSION=8.3 diff --git a/doubtfire-api b/doubtfire-api index 3bd910797..c37f5ba0e 160000 --- a/doubtfire-api +++ b/doubtfire-api @@ -1 +1 @@ -Subproject commit 3bd91079764ad153f299e2519e7ddbba9377fc8e +Subproject commit c37f5ba0e78fbbb6fb1f7423f8b1bbabb557f761 diff --git a/doubtfire-web b/doubtfire-web index 514cfc08e..b881c4c9e 160000 --- a/doubtfire-web +++ b/doubtfire-web @@ -1 +1 @@ -Subproject commit 514cfc08e0382d85381c61633f07695159d67e0d +Subproject commit b881c4c9e842b850dad938ffce2d3daf6acece41 diff --git a/production/docker-compose.yml b/production/docker-compose.yml index 0d37fec9b..f2a305683 100644 --- a/production/docker-compose.yml +++ b/production/docker-compose.yml @@ -2,6 +2,7 @@ version: '3.8' networks: backnet: + internal: true frontnet: services: From 90efa0a73f86765f723c0be2c25bf26b0df0856d Mon Sep 17 00:00:00 2001 From: ublefo <90136978+ublefo@users.noreply.github.com> Date: Tue, 26 Mar 2024 22:26:48 +1100 Subject: [PATCH 53/54] fix: force npm install in the vscode task --- .vscode/tasks.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 5170d2e71..b579cfe16 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -6,7 +6,7 @@ { "label": "Serve web frontend", "type": "shell", - "command": "npm install && npm start", + "command": "npm install -f && npm start", "group": "build", "presentation": { "group": "buildGroup", From ae0b1b263609f92b89769d13a992b94955472504 Mon Sep 17 00:00:00 2001 From: sylvia0929 <529807748@qq.com> Date: Wed, 31 Jul 2024 20:16:08 +1000 Subject: [PATCH 54/54] Fix vulnerabilities and update dependencies --- development/doubtfire-web | 1 + doubtfire-api | 2 +- doubtfire-web | 2 +- package-lock.json | 387 +++++++++++++++++++++++++++++++++++--- package.json | 5 + 5 files changed, 366 insertions(+), 31 deletions(-) create mode 160000 development/doubtfire-web diff --git a/development/doubtfire-web b/development/doubtfire-web new file mode 160000 index 000000000..04b85ed82 --- /dev/null +++ b/development/doubtfire-web @@ -0,0 +1 @@ +Subproject commit 04b85ed8219693f2981f24931fc7eabc2b6dd23f diff --git a/doubtfire-api b/doubtfire-api index c37f5ba0e..293b6924e 160000 --- a/doubtfire-api +++ b/doubtfire-api @@ -1 +1 @@ -Subproject commit c37f5ba0e78fbbb6fb1f7423f8b1bbabb557f761 +Subproject commit 293b6924e9758725b521edc1d667f3abe76efe82 diff --git a/doubtfire-web b/doubtfire-web index b881c4c9e..15ebfa4f3 160000 --- a/doubtfire-web +++ b/doubtfire-web @@ -1 +1 @@ -Subproject commit b881c4c9e842b850dad938ffce2d3daf6acece41 +Subproject commit 15ebfa4f3bd943f4ca6b1a0601cbcc06023d1dd2 diff --git a/package-lock.json b/package-lock.json index 9e4b13a11..987e1fbca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,9 +7,15 @@ "": { "name": "doubtfire", "version": "7.0.0", + "dependencies": { + "angular-xeditable": "^0.10.2", + "codemirror": "^6.0.1", + "nvd3": "^1.8.6" + }, "devDependencies": { "@commitlint/cli": "^17.0", - "@commitlint/config-conventional": "^17.0" + "@commitlint/config-conventional": "^17.0", + "husky": "^7.0.4" } }, "node_modules/@babel/code-frame": { @@ -109,6 +115,82 @@ "node": ">=4" } }, + "node_modules/@codemirror/autocomplete": { + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.17.0.tgz", + "integrity": "sha512-fdfj6e6ZxZf8yrkMHUSJJir7OJkHkZKaOZGzLWIYp2PZ3jd+d+UjG8zVPqJF6d3bKxkhvXTPan/UZ1t7Bqm0gA==", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0" + }, + "peerDependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@codemirror/commands": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.6.0.tgz", + "integrity": "sha512-qnY+b7j1UNcTS31Eenuc/5YJB6gQOzkUoNmJQc0rznwqSRpeaWWpjkWy2C/MPTcePpsKJEM26hXrOXl1+nceXg==", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.4.0", + "@codemirror/view": "^6.27.0", + "@lezer/common": "^1.1.0" + } + }, + "node_modules/@codemirror/language": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.10.2.tgz", + "integrity": "sha512-kgbTYTo0Au6dCSc/TFy7fK3fpJmgHDv1sG1KNQKJXVi+xBTEeBPY/M30YXiU6mMXeH+YIDLsbrT4ZwNRdtF+SA==", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.23.0", + "@lezer/common": "^1.1.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0", + "style-mod": "^4.0.0" + } + }, + "node_modules/@codemirror/lint": { + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.8.1.tgz", + "integrity": "sha512-IZ0Y7S4/bpaunwggW2jYqwLuHj0QtESf5xcROewY6+lDNwZ/NzvR4t+vpYgg9m7V8UXLPYqG+lu3DF470E5Oxg==", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/search": { + "version": "6.5.6", + "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.5.6.tgz", + "integrity": "sha512-rpMgcsh7o0GuCDUXKPvww+muLA1pDJaFrpq/CCHtpQJYz8xopu4D1hPcKRoDD0YlF8gZaqTNIRa4VRBWyhyy7Q==", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/state": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.4.1.tgz", + "integrity": "sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A==" + }, + "node_modules/@codemirror/view": { + "version": "6.29.1", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.29.1.tgz", + "integrity": "sha512-7r+DlO/QFwPqKp73uq5mmrS4TuLPUVotbNOKYzN3OLP5ScrOVXcm4g13/48b6ZXGhdmzMinzFYqH0vo+qihIkQ==", + "dependencies": { + "@codemirror/state": "^6.4.0", + "style-mod": "^4.1.0", + "w3c-keyname": "^2.2.4" + } + }, "node_modules/@commitlint/cli": { "version": "17.3.0", "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-17.3.0.tgz", @@ -198,13 +280,13 @@ } }, "node_modules/@commitlint/is-ignored": { - "version": "17.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-17.2.0.tgz", - "integrity": "sha512-rgUPUQraHxoMLxiE8GK430HA7/R2vXyLcOT4fQooNrZq9ERutNrP6dw3gdKLkq22Nede3+gEHQYUzL4Wu75ndg==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-17.8.1.tgz", + "integrity": "sha512-UshMi4Ltb4ZlNn4F7WtSEugFDZmctzFpmbqvpyxD3la510J+PLcnyhf9chs7EryaRFJMdAKwsEKfNK0jL/QM4g==", "dev": true, "dependencies": { - "@commitlint/types": "^17.0.0", - "semver": "7.3.7" + "@commitlint/types": "^17.8.1", + "semver": "7.5.4" }, "engines": { "node": ">=v14" @@ -344,9 +426,9 @@ } }, "node_modules/@commitlint/types": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-17.0.0.tgz", - "integrity": "sha512-hBAw6U+SkAT5h47zDMeOu3HSiD0SODw4Aq7rRNh1ceUmL7GyLKYhPbUvlRWqZ65XjBLPHZhFyQlRaPNz8qvUyQ==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-17.8.1.tgz", + "integrity": "sha512-PXDQXkAmiMEG162Bqdh9ChML/GJZo6vU+7F03ALKDK8zYc6SuAr47LjG7hGYRqUOz+WK0dU7bQ0xzuqFMdxzeQ==", "dev": true, "dependencies": { "chalk": "^4.1.0" @@ -392,6 +474,27 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@lezer/common": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.2.1.tgz", + "integrity": "sha512-yemX0ZD2xS/73llMZIK6KplkjIjf2EvAHcinDi/TfJ9hS25G0388+ClHt6/3but0oOxinTcQHJLDXh6w1crzFQ==" + }, + "node_modules/@lezer/highlight": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.0.tgz", + "integrity": "sha512-WrS5Mw51sGrpqjlh3d4/fOwpEV2Hd3YOkp9DBt4k8XZQcoTHZFB7sx030A6OcahF4J1nDQAa3jXlTVVYH50IFA==", + "dependencies": { + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@lezer/lr": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.2.tgz", + "integrity": "sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==", + "dependencies": { + "@lezer/common": "^1.0.0" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -477,6 +580,23 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/angular": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/angular/-/angular-1.8.3.tgz", + "integrity": "sha512-5qjkWIQQVsHj4Sb5TcEs4WZWpFeVFHXwxEBHUhrny41D8UrBAd6T/6nPPAsLngJCReIOqi95W3mxdveveutpZw==", + "deprecated": "For the actively supported Angular, see https://www.npmjs.com/package/@angular/core. AngularJS support has officially ended. For extended AngularJS support options, see https://goo.gle/angularjs-path-forward." + }, + "node_modules/angular-xeditable": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/angular-xeditable/-/angular-xeditable-0.10.2.tgz", + "integrity": "sha512-X0pxMaWSYf0jIvW290PZYTw+IxyMMs6hel5mW5/nzYswpHvzApJZeFtlV9CbNI95Ejf/i2iCer2DOtMZKi7jfg==", + "dependencies": { + "angular": "~1.x" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -587,6 +707,20 @@ "node": ">=12" } }, + "node_modules/codemirror": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.1.tgz", + "integrity": "sha512-J8j+nZ+CdWmIeFIGXEFbFPtpiYacFMDR8GlHK3IyHQJMCaVRfGx9NT+Hxivv1ckLWPvNdZqndbr/7lVhrf/Svg==", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/commands": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/search": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -700,6 +834,11 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "node_modules/crelt": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", + "integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==" + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -714,6 +853,12 @@ "node": ">= 8" } }, + "node_modules/d3": { + "version": "3.5.17", + "resolved": "https://registry.npmjs.org/d3/-/d3-3.5.17.tgz", + "integrity": "sha512-yFk/2idb8OHPKkbAL8QaOaqENNoMhIaSHZerk3oQsECwkObkCpJyjYwCe+OHiq6UEdhe1m8ZGARRRO3ljFjlKg==", + "peer": true + }, "node_modules/dargs": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", @@ -985,6 +1130,21 @@ "node": ">=10.17.0" } }, + "node_modules/husky": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz", + "integrity": "sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==", + "dev": true, + "bin": { + "husky": "lib/bin.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -1386,6 +1546,14 @@ "node": ">=8" } }, + "node_modules/nvd3": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/nvd3/-/nvd3-1.8.6.tgz", + "integrity": "sha512-YGQ9hAQHuQCF0JmYkT2GhNMHb5pA+vDfQj6C2GdpQPzdRPj/srPG3mh/3fZzUFt+at1NusLk/RqICUWkxm4viQ==", + "peerDependencies": { + "d3": "^3.4.4" + } + }, "node_modules/onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", @@ -1643,9 +1811,9 @@ } }, "node_modules/read-pkg/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -1764,9 +1932,9 @@ ] }, "node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -1902,6 +2070,11 @@ "node": ">=8" } }, + "node_modules/style-mod": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.2.tgz", + "integrity": "sha512-wnD1HyVqpJUI2+eKZ+eo1UwghftP6yuFheBqqe+bWCotBjC2K1YnteJILRMs3SM4V/0dLEW1SC27MWP5y+mwmw==" + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2067,6 +2240,11 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/w3c-keyname": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", + "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==" + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -2260,6 +2438,76 @@ } } }, + "@codemirror/autocomplete": { + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.17.0.tgz", + "integrity": "sha512-fdfj6e6ZxZf8yrkMHUSJJir7OJkHkZKaOZGzLWIYp2PZ3jd+d+UjG8zVPqJF6d3bKxkhvXTPan/UZ1t7Bqm0gA==", + "requires": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0" + } + }, + "@codemirror/commands": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.6.0.tgz", + "integrity": "sha512-qnY+b7j1UNcTS31Eenuc/5YJB6gQOzkUoNmJQc0rznwqSRpeaWWpjkWy2C/MPTcePpsKJEM26hXrOXl1+nceXg==", + "requires": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.4.0", + "@codemirror/view": "^6.27.0", + "@lezer/common": "^1.1.0" + } + }, + "@codemirror/language": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.10.2.tgz", + "integrity": "sha512-kgbTYTo0Au6dCSc/TFy7fK3fpJmgHDv1sG1KNQKJXVi+xBTEeBPY/M30YXiU6mMXeH+YIDLsbrT4ZwNRdtF+SA==", + "requires": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.23.0", + "@lezer/common": "^1.1.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0", + "style-mod": "^4.0.0" + } + }, + "@codemirror/lint": { + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.8.1.tgz", + "integrity": "sha512-IZ0Y7S4/bpaunwggW2jYqwLuHj0QtESf5xcROewY6+lDNwZ/NzvR4t+vpYgg9m7V8UXLPYqG+lu3DF470E5Oxg==", + "requires": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "crelt": "^1.0.5" + } + }, + "@codemirror/search": { + "version": "6.5.6", + "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.5.6.tgz", + "integrity": "sha512-rpMgcsh7o0GuCDUXKPvww+muLA1pDJaFrpq/CCHtpQJYz8xopu4D1hPcKRoDD0YlF8gZaqTNIRa4VRBWyhyy7Q==", + "requires": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "crelt": "^1.0.5" + } + }, + "@codemirror/state": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.4.1.tgz", + "integrity": "sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A==" + }, + "@codemirror/view": { + "version": "6.29.1", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.29.1.tgz", + "integrity": "sha512-7r+DlO/QFwPqKp73uq5mmrS4TuLPUVotbNOKYzN3OLP5ScrOVXcm4g13/48b6ZXGhdmzMinzFYqH0vo+qihIkQ==", + "requires": { + "@codemirror/state": "^6.4.0", + "style-mod": "^4.1.0", + "w3c-keyname": "^2.2.4" + } + }, "@commitlint/cli": { "version": "17.3.0", "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-17.3.0.tgz", @@ -2328,13 +2576,13 @@ } }, "@commitlint/is-ignored": { - "version": "17.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-17.2.0.tgz", - "integrity": "sha512-rgUPUQraHxoMLxiE8GK430HA7/R2vXyLcOT4fQooNrZq9ERutNrP6dw3gdKLkq22Nede3+gEHQYUzL4Wu75ndg==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-17.8.1.tgz", + "integrity": "sha512-UshMi4Ltb4ZlNn4F7WtSEugFDZmctzFpmbqvpyxD3la510J+PLcnyhf9chs7EryaRFJMdAKwsEKfNK0jL/QM4g==", "dev": true, "requires": { - "@commitlint/types": "^17.0.0", - "semver": "7.3.7" + "@commitlint/types": "^17.8.1", + "semver": "7.5.4" } }, "@commitlint/lint": { @@ -2444,9 +2692,9 @@ } }, "@commitlint/types": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-17.0.0.tgz", - "integrity": "sha512-hBAw6U+SkAT5h47zDMeOu3HSiD0SODw4Aq7rRNh1ceUmL7GyLKYhPbUvlRWqZ65XjBLPHZhFyQlRaPNz8qvUyQ==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-17.8.1.tgz", + "integrity": "sha512-PXDQXkAmiMEG162Bqdh9ChML/GJZo6vU+7F03ALKDK8zYc6SuAr47LjG7hGYRqUOz+WK0dU7bQ0xzuqFMdxzeQ==", "dev": true, "requires": { "chalk": "^4.1.0" @@ -2483,6 +2731,27 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "@lezer/common": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.2.1.tgz", + "integrity": "sha512-yemX0ZD2xS/73llMZIK6KplkjIjf2EvAHcinDi/TfJ9hS25G0388+ClHt6/3but0oOxinTcQHJLDXh6w1crzFQ==" + }, + "@lezer/highlight": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.0.tgz", + "integrity": "sha512-WrS5Mw51sGrpqjlh3d4/fOwpEV2Hd3YOkp9DBt4k8XZQcoTHZFB7sx030A6OcahF4J1nDQAa3jXlTVVYH50IFA==", + "requires": { + "@lezer/common": "^1.0.0" + } + }, + "@lezer/lr": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.2.tgz", + "integrity": "sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==", + "requires": { + "@lezer/common": "^1.0.0" + } + }, "@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -2555,6 +2824,19 @@ "uri-js": "^4.2.2" } }, + "angular": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/angular/-/angular-1.8.3.tgz", + "integrity": "sha512-5qjkWIQQVsHj4Sb5TcEs4WZWpFeVFHXwxEBHUhrny41D8UrBAd6T/6nPPAsLngJCReIOqi95W3mxdveveutpZw==" + }, + "angular-xeditable": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/angular-xeditable/-/angular-xeditable-0.10.2.tgz", + "integrity": "sha512-X0pxMaWSYf0jIvW290PZYTw+IxyMMs6hel5mW5/nzYswpHvzApJZeFtlV9CbNI95Ejf/i2iCer2DOtMZKi7jfg==", + "requires": { + "angular": "~1.x" + } + }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -2632,6 +2914,20 @@ "wrap-ansi": "^7.0.0" } }, + "codemirror": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.1.tgz", + "integrity": "sha512-J8j+nZ+CdWmIeFIGXEFbFPtpiYacFMDR8GlHK3IyHQJMCaVRfGx9NT+Hxivv1ckLWPvNdZqndbr/7lVhrf/Svg==", + "requires": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/commands": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/search": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" + } + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -2718,6 +3014,11 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "crelt": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", + "integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==" + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -2729,6 +3030,12 @@ "which": "^2.0.1" } }, + "d3": { + "version": "3.5.17", + "resolved": "https://registry.npmjs.org/d3/-/d3-3.5.17.tgz", + "integrity": "sha512-yFk/2idb8OHPKkbAL8QaOaqENNoMhIaSHZerk3oQsECwkObkCpJyjYwCe+OHiq6UEdhe1m8ZGARRRO3ljFjlKg==", + "peer": true + }, "dargs": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", @@ -2927,6 +3234,12 @@ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true }, + "husky": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz", + "integrity": "sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==", + "dev": true + }, "import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -3244,6 +3557,12 @@ "path-key": "^3.0.0" } }, + "nvd3": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/nvd3/-/nvd3-1.8.6.tgz", + "integrity": "sha512-YGQ9hAQHuQCF0JmYkT2GhNMHb5pA+vDfQj6C2GdpQPzdRPj/srPG3mh/3fZzUFt+at1NusLk/RqICUWkxm4viQ==", + "requires": {} + }, "onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", @@ -3371,9 +3690,9 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true }, "type-fest": { @@ -3506,9 +3825,9 @@ "dev": true }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -3620,6 +3939,11 @@ "min-indent": "^1.0.0" } }, + "style-mod": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.2.tgz", + "integrity": "sha512-wnD1HyVqpJUI2+eKZ+eo1UwghftP6yuFheBqqe+bWCotBjC2K1YnteJILRMs3SM4V/0dLEW1SC27MWP5y+mwmw==" + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -3732,6 +4056,11 @@ "spdx-expression-parse": "^3.0.0" } }, + "w3c-keyname": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", + "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==" + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index e786deb45..08ed01661 100644 --- a/package.json +++ b/package.json @@ -8,5 +8,10 @@ }, "scripts": { "prepare": "npx husky install" + }, + "dependencies": { + "angular-xeditable": "^0.10.2", + "codemirror": "^6.0.1", + "nvd3": "^1.8.6" } }