├── .github └── workflows │ └── monitor.yml ├── .gitignore ├── .prettierrc ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── assets └── logo.png ├── config.yaml ├── package-lock.json ├── package.json ├── src ├── core │ ├── config.ts │ ├── index.ts │ ├── ping.ts │ └── summary.ts ├── index.ts ├── template │ └── summary.md └── utils.ts ├── summary.md └── tsconfig.json /.github/workflows/monitor.yml: -------------------------------------------------------------------------------- 1 | name: Monitor 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: "*/5 * * * *" 7 | 8 | env: 9 | GIT_CONFIG_NAME: "[bot] web-status-monitor" 10 | GIT_CONFIG_EMAIL: "action@github.com" 11 | GIT_COMMIT_MESSAGE: "[actions] 🗒️ Updated Summary" 12 | 13 | jobs: 14 | build: 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | - uses: actions/setup-node@v3 20 | with: 21 | node-version: "18.x" 22 | cache: "npm" 23 | 24 | - name: 🚧 Preparing run 25 | run: npm ci 26 | 27 | - name: 🛸 Pinging sites 28 | run: npm start 29 | 30 | - name: 🚀 Push changes 31 | uses: zyrouge/gh-push-action@v1.0.6 32 | with: 33 | local-username: ${{ env.GIT_CONFIG_NAME }} 34 | local-email: ${{ env.GIT_CONFIG_EMAIL }} 35 | commit-message: ${{ env.GIT_COMMIT_MESSAGE }} 36 | github-token: ${{ secrets.GITHUB_TOKEN }} 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 4, 3 | "useTabs": false 4 | } 5 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true 3 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 ZYROUGE 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 |

🛸 Web Status Monitor

3 |

Ping websites at regular intervals using just GitHub Actions!

4 | 5 | - [View Summary](./summary.md) 6 | - [Edit Config](./config.yaml) 7 | 8 | ## 🤔 How does it work? 9 | 10 | A scheduled GitHub action runs every 5 minutes that pings all the urls after which the [summary](summary.md) is rendered. It's that simple! 11 | 12 | ## 🚀 Setting up 13 | 14 | - Create repo from this template 15 | - Add urls in `config.yml` 16 | - Done! 17 | 18 | ## ❔ Documentation 19 | 20 | ### Configuration 21 | 22 | `config.defaults` 23 | 24 | - Type: `object` 25 | - Required: `false` 26 | 27 | `config.defaults.method` 28 | 29 | - Type: `get | delete | head | options | post | put | patch` 30 | - Required: `false` 31 | 32 | `config.defaults.headers` 33 | 34 | - Type: `Record` 35 | - Required: `false` 36 | 37 | `config.entities` 38 | 39 | - Type: `object[]` 40 | - Required: `true` 41 | 42 | `config.entities[].url` 43 | 44 | - Type: `string` 45 | - Required: `true` 46 | 47 | `config.entities[].method` 48 | 49 | - Type: `get | delete | head | options | post | put | patch` 50 | - Required: `false` 51 | 52 | `config.entities[].headers` 53 | 54 | - Type: `Record` 55 | - Required: `false` 56 | 57 | ## 📃 License 58 | 59 | [License - MIT](./LICENSE) 60 | -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyrouge/web-status-monitor/5d885afa630f4774833ebb93b2e2d272fc9b46d4/assets/logo.png -------------------------------------------------------------------------------- /config.yaml: -------------------------------------------------------------------------------- 1 | # Refer https://github.com/zyrouge/web-status-monitor#configuration for documentation 2 | entities: 3 | - url: "https://google.com" 4 | method: "get" 5 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-status-monitor", 3 | "version": "0.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "web-status-monitor", 9 | "version": "0.0.0", 10 | "license": "MIT", 11 | "dependencies": { 12 | "axios": "^0.27.2", 13 | "chalk": "^4.1.0", 14 | "fs-extra": "^10.1.0", 15 | "solid-schema": "^1.1.1", 16 | "yaml": "^2.1.1" 17 | }, 18 | "devDependencies": { 19 | "@types/fs-extra": "^9.0.7", 20 | "ts-node": "^10.9.1", 21 | "typescript": "^4.1.5" 22 | } 23 | }, 24 | "node_modules/@cspotcode/source-map-support": { 25 | "version": "0.8.1", 26 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", 27 | "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", 28 | "dev": true, 29 | "dependencies": { 30 | "@jridgewell/trace-mapping": "0.3.9" 31 | }, 32 | "engines": { 33 | "node": ">=12" 34 | } 35 | }, 36 | "node_modules/@jridgewell/resolve-uri": { 37 | "version": "3.1.0", 38 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", 39 | "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", 40 | "dev": true, 41 | "engines": { 42 | "node": ">=6.0.0" 43 | } 44 | }, 45 | "node_modules/@jridgewell/sourcemap-codec": { 46 | "version": "1.4.14", 47 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", 48 | "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", 49 | "dev": true 50 | }, 51 | "node_modules/@jridgewell/trace-mapping": { 52 | "version": "0.3.9", 53 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", 54 | "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", 55 | "dev": true, 56 | "dependencies": { 57 | "@jridgewell/resolve-uri": "^3.0.3", 58 | "@jridgewell/sourcemap-codec": "^1.4.10" 59 | } 60 | }, 61 | "node_modules/@tsconfig/node10": { 62 | "version": "1.0.9", 63 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", 64 | "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", 65 | "dev": true 66 | }, 67 | "node_modules/@tsconfig/node12": { 68 | "version": "1.0.11", 69 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", 70 | "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", 71 | "dev": true 72 | }, 73 | "node_modules/@tsconfig/node14": { 74 | "version": "1.0.3", 75 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", 76 | "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", 77 | "dev": true 78 | }, 79 | "node_modules/@tsconfig/node16": { 80 | "version": "1.0.3", 81 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", 82 | "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", 83 | "dev": true 84 | }, 85 | "node_modules/@types/fs-extra": { 86 | "version": "9.0.13", 87 | "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz", 88 | "integrity": "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==", 89 | "dev": true, 90 | "dependencies": { 91 | "@types/node": "*" 92 | } 93 | }, 94 | "node_modules/@types/node": { 95 | "version": "18.7.8", 96 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.8.tgz", 97 | "integrity": "sha512-/YP55EMK2341JkODUb8DM9O0x1SIz2aBvyF33Uf1c76St3VpsMXEIW0nxuKkq/5cxnbz0RD9cfwNZHEAZQD3ag==", 98 | "dev": true 99 | }, 100 | "node_modules/acorn": { 101 | "version": "8.8.0", 102 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", 103 | "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", 104 | "dev": true, 105 | "bin": { 106 | "acorn": "bin/acorn" 107 | }, 108 | "engines": { 109 | "node": ">=0.4.0" 110 | } 111 | }, 112 | "node_modules/acorn-walk": { 113 | "version": "8.2.0", 114 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", 115 | "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", 116 | "dev": true, 117 | "engines": { 118 | "node": ">=0.4.0" 119 | } 120 | }, 121 | "node_modules/ansi-styles": { 122 | "version": "4.3.0", 123 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 124 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 125 | "dependencies": { 126 | "color-convert": "^2.0.1" 127 | }, 128 | "engines": { 129 | "node": ">=8" 130 | }, 131 | "funding": { 132 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 133 | } 134 | }, 135 | "node_modules/arg": { 136 | "version": "4.1.3", 137 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 138 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", 139 | "dev": true 140 | }, 141 | "node_modules/asynckit": { 142 | "version": "0.4.0", 143 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 144 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 145 | }, 146 | "node_modules/axios": { 147 | "version": "0.27.2", 148 | "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", 149 | "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", 150 | "dependencies": { 151 | "follow-redirects": "^1.14.9", 152 | "form-data": "^4.0.0" 153 | } 154 | }, 155 | "node_modules/chalk": { 156 | "version": "4.1.2", 157 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 158 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 159 | "dependencies": { 160 | "ansi-styles": "^4.1.0", 161 | "supports-color": "^7.1.0" 162 | }, 163 | "engines": { 164 | "node": ">=10" 165 | }, 166 | "funding": { 167 | "url": "https://github.com/chalk/chalk?sponsor=1" 168 | } 169 | }, 170 | "node_modules/color-convert": { 171 | "version": "2.0.1", 172 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 173 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 174 | "dependencies": { 175 | "color-name": "~1.1.4" 176 | }, 177 | "engines": { 178 | "node": ">=7.0.0" 179 | } 180 | }, 181 | "node_modules/color-name": { 182 | "version": "1.1.4", 183 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 184 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" 185 | }, 186 | "node_modules/combined-stream": { 187 | "version": "1.0.8", 188 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 189 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 190 | "dependencies": { 191 | "delayed-stream": "~1.0.0" 192 | }, 193 | "engines": { 194 | "node": ">= 0.8" 195 | } 196 | }, 197 | "node_modules/create-require": { 198 | "version": "1.1.1", 199 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", 200 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", 201 | "dev": true 202 | }, 203 | "node_modules/delayed-stream": { 204 | "version": "1.0.0", 205 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 206 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 207 | "engines": { 208 | "node": ">=0.4.0" 209 | } 210 | }, 211 | "node_modules/diff": { 212 | "version": "4.0.2", 213 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 214 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 215 | "dev": true, 216 | "engines": { 217 | "node": ">=0.3.1" 218 | } 219 | }, 220 | "node_modules/follow-redirects": { 221 | "version": "1.15.1", 222 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", 223 | "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", 224 | "funding": [ 225 | { 226 | "type": "individual", 227 | "url": "https://github.com/sponsors/RubenVerborgh" 228 | } 229 | ], 230 | "engines": { 231 | "node": ">=4.0" 232 | }, 233 | "peerDependenciesMeta": { 234 | "debug": { 235 | "optional": true 236 | } 237 | } 238 | }, 239 | "node_modules/form-data": { 240 | "version": "4.0.0", 241 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 242 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 243 | "dependencies": { 244 | "asynckit": "^0.4.0", 245 | "combined-stream": "^1.0.8", 246 | "mime-types": "^2.1.12" 247 | }, 248 | "engines": { 249 | "node": ">= 6" 250 | } 251 | }, 252 | "node_modules/fs-extra": { 253 | "version": "10.1.0", 254 | "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", 255 | "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", 256 | "dependencies": { 257 | "graceful-fs": "^4.2.0", 258 | "jsonfile": "^6.0.1", 259 | "universalify": "^2.0.0" 260 | }, 261 | "engines": { 262 | "node": ">=12" 263 | } 264 | }, 265 | "node_modules/graceful-fs": { 266 | "version": "4.2.10", 267 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", 268 | "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" 269 | }, 270 | "node_modules/has-flag": { 271 | "version": "4.0.0", 272 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 273 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 274 | "engines": { 275 | "node": ">=8" 276 | } 277 | }, 278 | "node_modules/jsonfile": { 279 | "version": "6.1.0", 280 | "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", 281 | "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", 282 | "dependencies": { 283 | "universalify": "^2.0.0" 284 | }, 285 | "optionalDependencies": { 286 | "graceful-fs": "^4.1.6" 287 | } 288 | }, 289 | "node_modules/make-error": { 290 | "version": "1.3.6", 291 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 292 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", 293 | "dev": true 294 | }, 295 | "node_modules/mime-db": { 296 | "version": "1.52.0", 297 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 298 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 299 | "engines": { 300 | "node": ">= 0.6" 301 | } 302 | }, 303 | "node_modules/mime-types": { 304 | "version": "2.1.35", 305 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 306 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 307 | "dependencies": { 308 | "mime-db": "1.52.0" 309 | }, 310 | "engines": { 311 | "node": ">= 0.6" 312 | } 313 | }, 314 | "node_modules/solid-schema": { 315 | "version": "1.1.1", 316 | "resolved": "https://registry.npmjs.org/solid-schema/-/solid-schema-1.1.1.tgz", 317 | "integrity": "sha512-fyyyFiFz8nfLnorhmWDeLtbWcbNK9WNyT1s4vTDTDgT5Uvul0wIMJ98+BiPHLly47X4wnzUqA5G4WKpjUZ+nRw==" 318 | }, 319 | "node_modules/supports-color": { 320 | "version": "7.2.0", 321 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 322 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 323 | "dependencies": { 324 | "has-flag": "^4.0.0" 325 | }, 326 | "engines": { 327 | "node": ">=8" 328 | } 329 | }, 330 | "node_modules/ts-node": { 331 | "version": "10.9.1", 332 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", 333 | "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", 334 | "dev": true, 335 | "dependencies": { 336 | "@cspotcode/source-map-support": "^0.8.0", 337 | "@tsconfig/node10": "^1.0.7", 338 | "@tsconfig/node12": "^1.0.7", 339 | "@tsconfig/node14": "^1.0.0", 340 | "@tsconfig/node16": "^1.0.2", 341 | "acorn": "^8.4.1", 342 | "acorn-walk": "^8.1.1", 343 | "arg": "^4.1.0", 344 | "create-require": "^1.1.0", 345 | "diff": "^4.0.1", 346 | "make-error": "^1.1.1", 347 | "v8-compile-cache-lib": "^3.0.1", 348 | "yn": "3.1.1" 349 | }, 350 | "bin": { 351 | "ts-node": "dist/bin.js", 352 | "ts-node-cwd": "dist/bin-cwd.js", 353 | "ts-node-esm": "dist/bin-esm.js", 354 | "ts-node-script": "dist/bin-script.js", 355 | "ts-node-transpile-only": "dist/bin-transpile.js", 356 | "ts-script": "dist/bin-script-deprecated.js" 357 | }, 358 | "peerDependencies": { 359 | "@swc/core": ">=1.2.50", 360 | "@swc/wasm": ">=1.2.50", 361 | "@types/node": "*", 362 | "typescript": ">=2.7" 363 | }, 364 | "peerDependenciesMeta": { 365 | "@swc/core": { 366 | "optional": true 367 | }, 368 | "@swc/wasm": { 369 | "optional": true 370 | } 371 | } 372 | }, 373 | "node_modules/typescript": { 374 | "version": "4.7.4", 375 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", 376 | "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", 377 | "dev": true, 378 | "bin": { 379 | "tsc": "bin/tsc", 380 | "tsserver": "bin/tsserver" 381 | }, 382 | "engines": { 383 | "node": ">=4.2.0" 384 | } 385 | }, 386 | "node_modules/universalify": { 387 | "version": "2.0.0", 388 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", 389 | "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", 390 | "engines": { 391 | "node": ">= 10.0.0" 392 | } 393 | }, 394 | "node_modules/v8-compile-cache-lib": { 395 | "version": "3.0.1", 396 | "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", 397 | "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", 398 | "dev": true 399 | }, 400 | "node_modules/yaml": { 401 | "version": "2.1.1", 402 | "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.1.tgz", 403 | "integrity": "sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==", 404 | "engines": { 405 | "node": ">= 14" 406 | } 407 | }, 408 | "node_modules/yn": { 409 | "version": "3.1.1", 410 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 411 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", 412 | "dev": true, 413 | "engines": { 414 | "node": ">=6" 415 | } 416 | } 417 | }, 418 | "dependencies": { 419 | "@cspotcode/source-map-support": { 420 | "version": "0.8.1", 421 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", 422 | "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", 423 | "dev": true, 424 | "requires": { 425 | "@jridgewell/trace-mapping": "0.3.9" 426 | } 427 | }, 428 | "@jridgewell/resolve-uri": { 429 | "version": "3.1.0", 430 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", 431 | "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", 432 | "dev": true 433 | }, 434 | "@jridgewell/sourcemap-codec": { 435 | "version": "1.4.14", 436 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", 437 | "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", 438 | "dev": true 439 | }, 440 | "@jridgewell/trace-mapping": { 441 | "version": "0.3.9", 442 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", 443 | "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", 444 | "dev": true, 445 | "requires": { 446 | "@jridgewell/resolve-uri": "^3.0.3", 447 | "@jridgewell/sourcemap-codec": "^1.4.10" 448 | } 449 | }, 450 | "@tsconfig/node10": { 451 | "version": "1.0.9", 452 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", 453 | "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", 454 | "dev": true 455 | }, 456 | "@tsconfig/node12": { 457 | "version": "1.0.11", 458 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", 459 | "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", 460 | "dev": true 461 | }, 462 | "@tsconfig/node14": { 463 | "version": "1.0.3", 464 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", 465 | "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", 466 | "dev": true 467 | }, 468 | "@tsconfig/node16": { 469 | "version": "1.0.3", 470 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", 471 | "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", 472 | "dev": true 473 | }, 474 | "@types/fs-extra": { 475 | "version": "9.0.13", 476 | "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz", 477 | "integrity": "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==", 478 | "dev": true, 479 | "requires": { 480 | "@types/node": "*" 481 | } 482 | }, 483 | "@types/node": { 484 | "version": "18.7.8", 485 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.8.tgz", 486 | "integrity": "sha512-/YP55EMK2341JkODUb8DM9O0x1SIz2aBvyF33Uf1c76St3VpsMXEIW0nxuKkq/5cxnbz0RD9cfwNZHEAZQD3ag==", 487 | "dev": true 488 | }, 489 | "acorn": { 490 | "version": "8.8.0", 491 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", 492 | "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", 493 | "dev": true 494 | }, 495 | "acorn-walk": { 496 | "version": "8.2.0", 497 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", 498 | "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", 499 | "dev": true 500 | }, 501 | "ansi-styles": { 502 | "version": "4.3.0", 503 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 504 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 505 | "requires": { 506 | "color-convert": "^2.0.1" 507 | } 508 | }, 509 | "arg": { 510 | "version": "4.1.3", 511 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 512 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", 513 | "dev": true 514 | }, 515 | "asynckit": { 516 | "version": "0.4.0", 517 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 518 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 519 | }, 520 | "axios": { 521 | "version": "0.27.2", 522 | "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", 523 | "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", 524 | "requires": { 525 | "follow-redirects": "^1.14.9", 526 | "form-data": "^4.0.0" 527 | } 528 | }, 529 | "chalk": { 530 | "version": "4.1.2", 531 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 532 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 533 | "requires": { 534 | "ansi-styles": "^4.1.0", 535 | "supports-color": "^7.1.0" 536 | } 537 | }, 538 | "color-convert": { 539 | "version": "2.0.1", 540 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 541 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 542 | "requires": { 543 | "color-name": "~1.1.4" 544 | } 545 | }, 546 | "color-name": { 547 | "version": "1.1.4", 548 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 549 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" 550 | }, 551 | "combined-stream": { 552 | "version": "1.0.8", 553 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 554 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 555 | "requires": { 556 | "delayed-stream": "~1.0.0" 557 | } 558 | }, 559 | "create-require": { 560 | "version": "1.1.1", 561 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", 562 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", 563 | "dev": true 564 | }, 565 | "delayed-stream": { 566 | "version": "1.0.0", 567 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 568 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" 569 | }, 570 | "diff": { 571 | "version": "4.0.2", 572 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 573 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 574 | "dev": true 575 | }, 576 | "follow-redirects": { 577 | "version": "1.15.1", 578 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", 579 | "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==" 580 | }, 581 | "form-data": { 582 | "version": "4.0.0", 583 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 584 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 585 | "requires": { 586 | "asynckit": "^0.4.0", 587 | "combined-stream": "^1.0.8", 588 | "mime-types": "^2.1.12" 589 | } 590 | }, 591 | "fs-extra": { 592 | "version": "10.1.0", 593 | "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", 594 | "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", 595 | "requires": { 596 | "graceful-fs": "^4.2.0", 597 | "jsonfile": "^6.0.1", 598 | "universalify": "^2.0.0" 599 | } 600 | }, 601 | "graceful-fs": { 602 | "version": "4.2.10", 603 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", 604 | "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" 605 | }, 606 | "has-flag": { 607 | "version": "4.0.0", 608 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 609 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" 610 | }, 611 | "jsonfile": { 612 | "version": "6.1.0", 613 | "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", 614 | "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", 615 | "requires": { 616 | "graceful-fs": "^4.1.6", 617 | "universalify": "^2.0.0" 618 | } 619 | }, 620 | "make-error": { 621 | "version": "1.3.6", 622 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 623 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", 624 | "dev": true 625 | }, 626 | "mime-db": { 627 | "version": "1.52.0", 628 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 629 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" 630 | }, 631 | "mime-types": { 632 | "version": "2.1.35", 633 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 634 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 635 | "requires": { 636 | "mime-db": "1.52.0" 637 | } 638 | }, 639 | "solid-schema": { 640 | "version": "1.1.1", 641 | "resolved": "https://registry.npmjs.org/solid-schema/-/solid-schema-1.1.1.tgz", 642 | "integrity": "sha512-fyyyFiFz8nfLnorhmWDeLtbWcbNK9WNyT1s4vTDTDgT5Uvul0wIMJ98+BiPHLly47X4wnzUqA5G4WKpjUZ+nRw==" 643 | }, 644 | "supports-color": { 645 | "version": "7.2.0", 646 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 647 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 648 | "requires": { 649 | "has-flag": "^4.0.0" 650 | } 651 | }, 652 | "ts-node": { 653 | "version": "10.9.1", 654 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", 655 | "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", 656 | "dev": true, 657 | "requires": { 658 | "@cspotcode/source-map-support": "^0.8.0", 659 | "@tsconfig/node10": "^1.0.7", 660 | "@tsconfig/node12": "^1.0.7", 661 | "@tsconfig/node14": "^1.0.0", 662 | "@tsconfig/node16": "^1.0.2", 663 | "acorn": "^8.4.1", 664 | "acorn-walk": "^8.1.1", 665 | "arg": "^4.1.0", 666 | "create-require": "^1.1.0", 667 | "diff": "^4.0.1", 668 | "make-error": "^1.1.1", 669 | "v8-compile-cache-lib": "^3.0.1", 670 | "yn": "3.1.1" 671 | } 672 | }, 673 | "typescript": { 674 | "version": "4.7.4", 675 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", 676 | "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", 677 | "dev": true 678 | }, 679 | "universalify": { 680 | "version": "2.0.0", 681 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", 682 | "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" 683 | }, 684 | "v8-compile-cache-lib": { 685 | "version": "3.0.1", 686 | "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", 687 | "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", 688 | "dev": true 689 | }, 690 | "yaml": { 691 | "version": "2.1.1", 692 | "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.1.tgz", 693 | "integrity": "sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==" 694 | }, 695 | "yn": { 696 | "version": "3.1.1", 697 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 698 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", 699 | "dev": true 700 | } 701 | } 702 | } 703 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-status-monitor", 3 | "private": true, 4 | "version": "0.0.0", 5 | "description": "Ping websites at regular intervals using just GitHub Actions!", 6 | "scripts": { 7 | "start": "ts-node src/index.ts" 8 | }, 9 | "repository": "https://github.com/zyrouge/web-status-monitor.git", 10 | "keywords": [], 11 | "author": "ZYROUGE", 12 | "license": "MIT", 13 | "dependencies": { 14 | "axios": "^0.27.2", 15 | "chalk": "^4.1.0", 16 | "fs-extra": "^10.1.0", 17 | "solid-schema": "^1.1.1", 18 | "yaml": "^2.1.1" 19 | }, 20 | "devDependencies": { 21 | "@types/fs-extra": "^9.0.7", 22 | "ts-node": "^10.9.1", 23 | "typescript": "^4.1.5" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/core/config.ts: -------------------------------------------------------------------------------- 1 | import { readFile } from "fs-extra"; 2 | import { FieldType, fields } from "solid-schema"; 3 | import yaml from "yaml"; 4 | import { Paths } from "../utils"; 5 | 6 | export const ConfigEntityMethodSchema = fields.or( 7 | fields.constant("get" as const), 8 | fields.constant("delete" as const), 9 | fields.constant("head" as const), 10 | fields.constant("options" as const), 11 | fields.constant("post" as const), 12 | fields.constant("put" as const), 13 | fields.constant("patch" as const) 14 | ); 15 | 16 | export type IConfigEntityMethod = FieldType; 17 | 18 | export const ConfigDefaultEntitySchema = fields.object({ 19 | method: fields.nullable(ConfigEntityMethodSchema), 20 | headers: fields.nullable(fields.record(fields.string(), fields.string())), 21 | }); 22 | 23 | export type IConfigDefaultEntity = FieldType; 24 | 25 | export const ConfigEntitySchema = fields.object({ 26 | url: fields.string(), 27 | ...ConfigDefaultEntitySchema.model, 28 | }); 29 | 30 | export type IConfigEntity = FieldType; 31 | 32 | export const ConfigSchema = fields.object({ 33 | defaults: fields.nullable(ConfigEntitySchema), 34 | entities: fields.array(ConfigEntitySchema), 35 | }); 36 | 37 | export type IConfig = FieldType; 38 | 39 | export const getConfig = async () => { 40 | try { 41 | const content = await readFile(Paths.configYaml); 42 | return ConfigSchema.create(yaml.parse(content.toString())); 43 | } catch (err) { 44 | throw new Error( 45 | `Could not parse config from ${Paths.configYaml} (${err})` 46 | ); 47 | } 48 | }; 49 | 50 | export const ConfigEntityDefaults = { 51 | method: "get" as IConfigEntityMethod, 52 | headers: { 53 | "User-Agent": "[bot] github.com/zyrouge/web-status-monitor", 54 | }, 55 | }; 56 | 57 | ConfigEntityDefaults.method; 58 | -------------------------------------------------------------------------------- /src/core/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./config"; 2 | export * from "./summary"; 3 | -------------------------------------------------------------------------------- /src/core/ping.ts: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | import { IConfigEntity, ConfigEntityDefaults } from "./config"; 3 | import { SummarySchema } from "./summary"; 4 | 5 | export const ping = async ( 6 | entity: IConfigEntity, 7 | defaults?: IConfigEntity | null 8 | ) => { 9 | const start = Date.now(); 10 | let up = false; 11 | const url = entity.url; 12 | const method = 13 | entity.method ?? defaults?.method ?? ConfigEntityDefaults.method; 14 | const headers = { 15 | ...ConfigEntityDefaults.headers, 16 | ...defaults?.headers, 17 | ...entity.headers, 18 | }; 19 | try { 20 | await axios({ 21 | url, 22 | method, 23 | headers, 24 | }); 25 | up = true; 26 | } catch (err) {} 27 | const tookMs = Date.now() - start; 28 | return SummarySchema.create({ 29 | url, 30 | method, 31 | tookMs, 32 | up, 33 | }); 34 | }; 35 | -------------------------------------------------------------------------------- /src/core/summary.ts: -------------------------------------------------------------------------------- 1 | import { readFile, writeFile } from "fs-extra"; 2 | import { FieldType, fields } from "solid-schema"; 3 | import { Paths } from "../utils"; 4 | 5 | export const SummarySchema = fields.object({ 6 | url: fields.string(), 7 | method: fields.string(), 8 | tookMs: fields.number(), 9 | up: fields.boolean(), 10 | }); 11 | 12 | export type ISummary = FieldType; 13 | 14 | export const generateSummary = async (results: ISummary[]) => { 15 | try { 16 | const template = (await readFile(Paths.templateSummaryMd)).toString(); 17 | const variables: Record = { 18 | lastUpdated: new Date().toLocaleString(), 19 | state: results 20 | .map( 21 | (x) => 22 | `- \`${x.method.toUpperCase()}\` [${x.url}](${ 23 | x.url 24 | }) - **${x.up ? "Up" : "Down"}** (${x.tookMs}ms)` 25 | ) 26 | .join("\n"), 27 | }; 28 | await writeFile( 29 | Paths.summaryMd, 30 | template.replaceAll(/{{\s*(\w+)\s*}}/g, (_, key) => variables[key]) 31 | ); 32 | } catch (err) { 33 | throw new Error( 34 | `Could not parse template from ${Paths.templateSummaryMd}, (${err})` 35 | ); 36 | } 37 | }; 38 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import chalk from "chalk"; 2 | import { generateSummary, getConfig, ISummary } from "./core"; 3 | import { ping } from "./core/ping"; 4 | import { Logger, Paths } from "./utils"; 5 | 6 | const start = async () => { 7 | try { 8 | const config = await getConfig(); 9 | const summary: ISummary[] = []; 10 | for (const x of config.entities) { 11 | const result = await ping(x, config.defaults); 12 | Logger.log( 13 | `Site ${ 14 | result.up 15 | ? chalk.greenBright("up") 16 | : chalk.redBright("down") 17 | }: ${chalk.cyanBright( 18 | `${result.url} (${result.method.toUpperCase()})` 19 | )} in ${chalk.cyanBright(`${result.tookMs}ms`)}!` 20 | ); 21 | summary.push(result); 22 | } 23 | Logger.log( 24 | `Finished pinging ${chalk.cyanBright(config.entities.length)} urls!` 25 | ); 26 | await generateSummary(summary); 27 | Logger.log( 28 | `Generated summary at ${chalk.cyanBright(Paths.summaryMd)}!` 29 | ); 30 | } catch (err: any) { 31 | Logger.error(`Something went wrong! (${chalk.redBright(err)})`); 32 | process.exit(1); 33 | } 34 | }; 35 | 36 | start(); 37 | -------------------------------------------------------------------------------- /src/template/summary.md: -------------------------------------------------------------------------------- 1 | # 📖 Summary 2 | Last updated: **{{ lastUpdated }}** 3 | 4 | {{ state }} 5 | -------------------------------------------------------------------------------- /src/utils.ts: -------------------------------------------------------------------------------- 1 | import chalk from "chalk"; 2 | import path from "path"; 3 | 4 | export class Logger { 5 | static log(text: string) { 6 | console.log(`${chalk.cyanBright("[~]")} ${text}`); 7 | } 8 | 9 | static warn(text: string) { 10 | console.log(`${chalk.yellowBright("[!]")} ${text}`); 11 | } 12 | 13 | static error(text: string) { 14 | console.log(`${chalk.redBright("[x]")} ${text}`); 15 | } 16 | } 17 | 18 | export class Paths { 19 | static rootDir = process.cwd(); 20 | static configYaml = path.join(Paths.rootDir, "config.yaml"); 21 | static summaryMd = path.join(Paths.rootDir, "summary.md"); 22 | static templateSummaryMd = path.join(__dirname, "template/summary.md"); 23 | } 24 | -------------------------------------------------------------------------------- /summary.md: -------------------------------------------------------------------------------- 1 | # 📖 Summary 2 | Last updated: **9/13/2023, 3:58:37 PM** 3 | 4 | - `GET` [https://google.com](https://google.com) - **Up** (215ms) 5 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig.json to read more about this file */ 4 | 5 | /* Basic Options */ 6 | // "incremental": true, /* Enable incremental compilation */ 7 | "target": "ESNext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ 8 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ 9 | // "lib": [], /* Specify library files to be included in the compilation. */ 10 | // "allowJs": true, /* Allow javascript files to be compiled. */ 11 | // "checkJs": true, /* Report errors in .js files. */ 12 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ 13 | // "declaration": true, /* Generates corresponding '.d.ts' file. */ 14 | // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ 15 | // "sourceMap": true, /* Generates corresponding '.map' file. */ 16 | // "outFile": "./", /* Concatenate and emit output to single file. */ 17 | // "outDir": "./", /* Redirect output structure to the directory. */ 18 | "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 19 | // "composite": true, /* Enable project compilation */ 20 | // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ 21 | // "removeComments": true, /* Do not emit comments to output. */ 22 | "noEmit": true, /* Do not emit outputs. */ 23 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */ 24 | "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 25 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ 26 | 27 | /* Strict Type-Checking Options */ 28 | "strict": true, /* Enable all strict type-checking options. */ 29 | "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ 30 | "strictNullChecks": true, /* Enable strict null checks. */ 31 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ 32 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ 33 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ 34 | "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ 35 | "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ 36 | 37 | /* Additional Checks */ 38 | "noUnusedLocals": true, /* Report errors on unused locals. */ 39 | "noUnusedParameters": true, /* Report errors on unused parameters. */ 40 | "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 41 | "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 42 | 43 | /* Module Resolution Options */ 44 | // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ 45 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ 46 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 47 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 48 | // "typeRoots": [], /* List of folders to include type definitions from. */ 49 | // "types": [], /* Type declaration files to be included in compilation. */ 50 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 51 | "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 52 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 53 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 54 | 55 | /* Source Map Options */ 56 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 57 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 58 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 59 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 60 | 61 | /* Experimental Options */ 62 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 63 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 64 | 65 | /* Advanced Options */ 66 | "skipLibCheck": true, /* Skip type checking of declaration files. */ 67 | "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ 68 | } 69 | } 70 | --------------------------------------------------------------------------------