├── .gitignore ├── README.md ├── nodemon.json ├── package-lock.json ├── package.json ├── src ├── app.ts ├── data │ └── heroes.ts └── services │ └── hero.service.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | 3 | dist/ 4 | 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # node-ts-typescript 2 | 3 | Pasos para configurar[ Node con TypeScript aquí](https://gist.github.com/Klerith/47af527da090043f604b972b22dd4c01) -------------------------------------------------------------------------------- /nodemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "watch": ["src"], 3 | "ext": ".ts,.js", 4 | "ignore": [], 5 | "exec": "npx ts-node ./src/app.ts" 6 | } -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "03-typescript", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "03-typescript", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "@types/node": "^20.5.1", 13 | "nodemon": "^3.0.1", 14 | "rimraf": "^5.0.1", 15 | "ts-node": "^10.9.1", 16 | "typescript": "^5.1.6" 17 | } 18 | }, 19 | "node_modules/@cspotcode/source-map-support": { 20 | "version": "0.8.1", 21 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", 22 | "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", 23 | "dev": true, 24 | "dependencies": { 25 | "@jridgewell/trace-mapping": "0.3.9" 26 | }, 27 | "engines": { 28 | "node": ">=12" 29 | } 30 | }, 31 | "node_modules/@isaacs/cliui": { 32 | "version": "8.0.2", 33 | "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", 34 | "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", 35 | "dev": true, 36 | "dependencies": { 37 | "string-width": "^5.1.2", 38 | "string-width-cjs": "npm:string-width@^4.2.0", 39 | "strip-ansi": "^7.0.1", 40 | "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", 41 | "wrap-ansi": "^8.1.0", 42 | "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" 43 | }, 44 | "engines": { 45 | "node": ">=12" 46 | } 47 | }, 48 | "node_modules/@jridgewell/resolve-uri": { 49 | "version": "3.1.1", 50 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", 51 | "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", 52 | "dev": true, 53 | "engines": { 54 | "node": ">=6.0.0" 55 | } 56 | }, 57 | "node_modules/@jridgewell/sourcemap-codec": { 58 | "version": "1.4.15", 59 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", 60 | "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", 61 | "dev": true 62 | }, 63 | "node_modules/@jridgewell/trace-mapping": { 64 | "version": "0.3.9", 65 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", 66 | "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", 67 | "dev": true, 68 | "dependencies": { 69 | "@jridgewell/resolve-uri": "^3.0.3", 70 | "@jridgewell/sourcemap-codec": "^1.4.10" 71 | } 72 | }, 73 | "node_modules/@pkgjs/parseargs": { 74 | "version": "0.11.0", 75 | "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", 76 | "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", 77 | "dev": true, 78 | "optional": true, 79 | "engines": { 80 | "node": ">=14" 81 | } 82 | }, 83 | "node_modules/@tsconfig/node10": { 84 | "version": "1.0.9", 85 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", 86 | "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", 87 | "dev": true 88 | }, 89 | "node_modules/@tsconfig/node12": { 90 | "version": "1.0.11", 91 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", 92 | "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", 93 | "dev": true 94 | }, 95 | "node_modules/@tsconfig/node14": { 96 | "version": "1.0.3", 97 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", 98 | "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", 99 | "dev": true 100 | }, 101 | "node_modules/@tsconfig/node16": { 102 | "version": "1.0.4", 103 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", 104 | "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", 105 | "dev": true 106 | }, 107 | "node_modules/@types/node": { 108 | "version": "20.5.1", 109 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.1.tgz", 110 | "integrity": "sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg==", 111 | "dev": true 112 | }, 113 | "node_modules/abbrev": { 114 | "version": "1.1.1", 115 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", 116 | "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", 117 | "dev": true 118 | }, 119 | "node_modules/acorn": { 120 | "version": "8.10.0", 121 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", 122 | "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", 123 | "dev": true, 124 | "bin": { 125 | "acorn": "bin/acorn" 126 | }, 127 | "engines": { 128 | "node": ">=0.4.0" 129 | } 130 | }, 131 | "node_modules/acorn-walk": { 132 | "version": "8.2.0", 133 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", 134 | "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", 135 | "dev": true, 136 | "engines": { 137 | "node": ">=0.4.0" 138 | } 139 | }, 140 | "node_modules/ansi-regex": { 141 | "version": "6.0.1", 142 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", 143 | "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", 144 | "dev": true, 145 | "engines": { 146 | "node": ">=12" 147 | }, 148 | "funding": { 149 | "url": "https://github.com/chalk/ansi-regex?sponsor=1" 150 | } 151 | }, 152 | "node_modules/ansi-styles": { 153 | "version": "6.2.1", 154 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", 155 | "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", 156 | "dev": true, 157 | "engines": { 158 | "node": ">=12" 159 | }, 160 | "funding": { 161 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 162 | } 163 | }, 164 | "node_modules/anymatch": { 165 | "version": "3.1.3", 166 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", 167 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", 168 | "dev": true, 169 | "dependencies": { 170 | "normalize-path": "^3.0.0", 171 | "picomatch": "^2.0.4" 172 | }, 173 | "engines": { 174 | "node": ">= 8" 175 | } 176 | }, 177 | "node_modules/arg": { 178 | "version": "4.1.3", 179 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 180 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", 181 | "dev": true 182 | }, 183 | "node_modules/balanced-match": { 184 | "version": "1.0.2", 185 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 186 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 187 | "dev": true 188 | }, 189 | "node_modules/binary-extensions": { 190 | "version": "2.2.0", 191 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 192 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 193 | "dev": true, 194 | "engines": { 195 | "node": ">=8" 196 | } 197 | }, 198 | "node_modules/brace-expansion": { 199 | "version": "1.1.11", 200 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 201 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 202 | "dev": true, 203 | "dependencies": { 204 | "balanced-match": "^1.0.0", 205 | "concat-map": "0.0.1" 206 | } 207 | }, 208 | "node_modules/braces": { 209 | "version": "3.0.2", 210 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 211 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 212 | "dev": true, 213 | "dependencies": { 214 | "fill-range": "^7.0.1" 215 | }, 216 | "engines": { 217 | "node": ">=8" 218 | } 219 | }, 220 | "node_modules/chokidar": { 221 | "version": "3.5.3", 222 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 223 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 224 | "dev": true, 225 | "funding": [ 226 | { 227 | "type": "individual", 228 | "url": "https://paulmillr.com/funding/" 229 | } 230 | ], 231 | "dependencies": { 232 | "anymatch": "~3.1.2", 233 | "braces": "~3.0.2", 234 | "glob-parent": "~5.1.2", 235 | "is-binary-path": "~2.1.0", 236 | "is-glob": "~4.0.1", 237 | "normalize-path": "~3.0.0", 238 | "readdirp": "~3.6.0" 239 | }, 240 | "engines": { 241 | "node": ">= 8.10.0" 242 | }, 243 | "optionalDependencies": { 244 | "fsevents": "~2.3.2" 245 | } 246 | }, 247 | "node_modules/color-convert": { 248 | "version": "2.0.1", 249 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 250 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 251 | "dev": true, 252 | "dependencies": { 253 | "color-name": "~1.1.4" 254 | }, 255 | "engines": { 256 | "node": ">=7.0.0" 257 | } 258 | }, 259 | "node_modules/color-name": { 260 | "version": "1.1.4", 261 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 262 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 263 | "dev": true 264 | }, 265 | "node_modules/concat-map": { 266 | "version": "0.0.1", 267 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 268 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", 269 | "dev": true 270 | }, 271 | "node_modules/create-require": { 272 | "version": "1.1.1", 273 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", 274 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", 275 | "dev": true 276 | }, 277 | "node_modules/cross-spawn": { 278 | "version": "7.0.3", 279 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", 280 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", 281 | "dev": true, 282 | "dependencies": { 283 | "path-key": "^3.1.0", 284 | "shebang-command": "^2.0.0", 285 | "which": "^2.0.1" 286 | }, 287 | "engines": { 288 | "node": ">= 8" 289 | } 290 | }, 291 | "node_modules/debug": { 292 | "version": "3.2.7", 293 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", 294 | "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", 295 | "dev": true, 296 | "dependencies": { 297 | "ms": "^2.1.1" 298 | } 299 | }, 300 | "node_modules/diff": { 301 | "version": "4.0.2", 302 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 303 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 304 | "dev": true, 305 | "engines": { 306 | "node": ">=0.3.1" 307 | } 308 | }, 309 | "node_modules/eastasianwidth": { 310 | "version": "0.2.0", 311 | "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", 312 | "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", 313 | "dev": true 314 | }, 315 | "node_modules/emoji-regex": { 316 | "version": "9.2.2", 317 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", 318 | "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", 319 | "dev": true 320 | }, 321 | "node_modules/fill-range": { 322 | "version": "7.0.1", 323 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 324 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 325 | "dev": true, 326 | "dependencies": { 327 | "to-regex-range": "^5.0.1" 328 | }, 329 | "engines": { 330 | "node": ">=8" 331 | } 332 | }, 333 | "node_modules/foreground-child": { 334 | "version": "3.1.1", 335 | "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", 336 | "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", 337 | "dev": true, 338 | "dependencies": { 339 | "cross-spawn": "^7.0.0", 340 | "signal-exit": "^4.0.1" 341 | }, 342 | "engines": { 343 | "node": ">=14" 344 | }, 345 | "funding": { 346 | "url": "https://github.com/sponsors/isaacs" 347 | } 348 | }, 349 | "node_modules/fsevents": { 350 | "version": "2.3.2", 351 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 352 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 353 | "dev": true, 354 | "hasInstallScript": true, 355 | "optional": true, 356 | "os": [ 357 | "darwin" 358 | ], 359 | "engines": { 360 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 361 | } 362 | }, 363 | "node_modules/glob": { 364 | "version": "10.3.3", 365 | "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.3.tgz", 366 | "integrity": "sha512-92vPiMb/iqpmEgsOoIDvTjc50wf9CCCvMzsi6W0JLPeUKE8TWP1a73PgqSrqy7iAZxaSD1YdzU7QZR5LF51MJw==", 367 | "dev": true, 368 | "dependencies": { 369 | "foreground-child": "^3.1.0", 370 | "jackspeak": "^2.0.3", 371 | "minimatch": "^9.0.1", 372 | "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", 373 | "path-scurry": "^1.10.1" 374 | }, 375 | "bin": { 376 | "glob": "dist/cjs/src/bin.js" 377 | }, 378 | "engines": { 379 | "node": ">=16 || 14 >=14.17" 380 | }, 381 | "funding": { 382 | "url": "https://github.com/sponsors/isaacs" 383 | } 384 | }, 385 | "node_modules/glob-parent": { 386 | "version": "5.1.2", 387 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 388 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 389 | "dev": true, 390 | "dependencies": { 391 | "is-glob": "^4.0.1" 392 | }, 393 | "engines": { 394 | "node": ">= 6" 395 | } 396 | }, 397 | "node_modules/glob/node_modules/brace-expansion": { 398 | "version": "2.0.1", 399 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 400 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 401 | "dev": true, 402 | "dependencies": { 403 | "balanced-match": "^1.0.0" 404 | } 405 | }, 406 | "node_modules/glob/node_modules/minimatch": { 407 | "version": "9.0.3", 408 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", 409 | "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", 410 | "dev": true, 411 | "dependencies": { 412 | "brace-expansion": "^2.0.1" 413 | }, 414 | "engines": { 415 | "node": ">=16 || 14 >=14.17" 416 | }, 417 | "funding": { 418 | "url": "https://github.com/sponsors/isaacs" 419 | } 420 | }, 421 | "node_modules/has-flag": { 422 | "version": "3.0.0", 423 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 424 | "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", 425 | "dev": true, 426 | "engines": { 427 | "node": ">=4" 428 | } 429 | }, 430 | "node_modules/ignore-by-default": { 431 | "version": "1.0.1", 432 | "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", 433 | "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", 434 | "dev": true 435 | }, 436 | "node_modules/is-binary-path": { 437 | "version": "2.1.0", 438 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 439 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 440 | "dev": true, 441 | "dependencies": { 442 | "binary-extensions": "^2.0.0" 443 | }, 444 | "engines": { 445 | "node": ">=8" 446 | } 447 | }, 448 | "node_modules/is-extglob": { 449 | "version": "2.1.1", 450 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 451 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 452 | "dev": true, 453 | "engines": { 454 | "node": ">=0.10.0" 455 | } 456 | }, 457 | "node_modules/is-fullwidth-code-point": { 458 | "version": "3.0.0", 459 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 460 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 461 | "dev": true, 462 | "engines": { 463 | "node": ">=8" 464 | } 465 | }, 466 | "node_modules/is-glob": { 467 | "version": "4.0.3", 468 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 469 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 470 | "dev": true, 471 | "dependencies": { 472 | "is-extglob": "^2.1.1" 473 | }, 474 | "engines": { 475 | "node": ">=0.10.0" 476 | } 477 | }, 478 | "node_modules/is-number": { 479 | "version": "7.0.0", 480 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 481 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 482 | "dev": true, 483 | "engines": { 484 | "node": ">=0.12.0" 485 | } 486 | }, 487 | "node_modules/isexe": { 488 | "version": "2.0.0", 489 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 490 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", 491 | "dev": true 492 | }, 493 | "node_modules/jackspeak": { 494 | "version": "2.3.0", 495 | "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.0.tgz", 496 | "integrity": "sha512-uKmsITSsF4rUWQHzqaRUuyAir3fZfW3f202Ee34lz/gZCi970CPZwyQXLGNgWJvvZbvFyzeyGq0+4fcG/mBKZg==", 497 | "dev": true, 498 | "dependencies": { 499 | "@isaacs/cliui": "^8.0.2" 500 | }, 501 | "engines": { 502 | "node": ">=14" 503 | }, 504 | "funding": { 505 | "url": "https://github.com/sponsors/isaacs" 506 | }, 507 | "optionalDependencies": { 508 | "@pkgjs/parseargs": "^0.11.0" 509 | } 510 | }, 511 | "node_modules/lru-cache": { 512 | "version": "6.0.0", 513 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", 514 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", 515 | "dev": true, 516 | "dependencies": { 517 | "yallist": "^4.0.0" 518 | }, 519 | "engines": { 520 | "node": ">=10" 521 | } 522 | }, 523 | "node_modules/make-error": { 524 | "version": "1.3.6", 525 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 526 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", 527 | "dev": true 528 | }, 529 | "node_modules/minimatch": { 530 | "version": "3.1.2", 531 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 532 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 533 | "dev": true, 534 | "dependencies": { 535 | "brace-expansion": "^1.1.7" 536 | }, 537 | "engines": { 538 | "node": "*" 539 | } 540 | }, 541 | "node_modules/minipass": { 542 | "version": "7.0.3", 543 | "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.3.tgz", 544 | "integrity": "sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==", 545 | "dev": true, 546 | "engines": { 547 | "node": ">=16 || 14 >=14.17" 548 | } 549 | }, 550 | "node_modules/ms": { 551 | "version": "2.1.3", 552 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 553 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 554 | "dev": true 555 | }, 556 | "node_modules/nodemon": { 557 | "version": "3.0.1", 558 | "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz", 559 | "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==", 560 | "dev": true, 561 | "dependencies": { 562 | "chokidar": "^3.5.2", 563 | "debug": "^3.2.7", 564 | "ignore-by-default": "^1.0.1", 565 | "minimatch": "^3.1.2", 566 | "pstree.remy": "^1.1.8", 567 | "semver": "^7.5.3", 568 | "simple-update-notifier": "^2.0.0", 569 | "supports-color": "^5.5.0", 570 | "touch": "^3.1.0", 571 | "undefsafe": "^2.0.5" 572 | }, 573 | "bin": { 574 | "nodemon": "bin/nodemon.js" 575 | }, 576 | "engines": { 577 | "node": ">=10" 578 | }, 579 | "funding": { 580 | "type": "opencollective", 581 | "url": "https://opencollective.com/nodemon" 582 | } 583 | }, 584 | "node_modules/nopt": { 585 | "version": "1.0.10", 586 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", 587 | "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", 588 | "dev": true, 589 | "dependencies": { 590 | "abbrev": "1" 591 | }, 592 | "bin": { 593 | "nopt": "bin/nopt.js" 594 | }, 595 | "engines": { 596 | "node": "*" 597 | } 598 | }, 599 | "node_modules/normalize-path": { 600 | "version": "3.0.0", 601 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 602 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 603 | "dev": true, 604 | "engines": { 605 | "node": ">=0.10.0" 606 | } 607 | }, 608 | "node_modules/path-key": { 609 | "version": "3.1.1", 610 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", 611 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", 612 | "dev": true, 613 | "engines": { 614 | "node": ">=8" 615 | } 616 | }, 617 | "node_modules/path-scurry": { 618 | "version": "1.10.1", 619 | "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", 620 | "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", 621 | "dev": true, 622 | "dependencies": { 623 | "lru-cache": "^9.1.1 || ^10.0.0", 624 | "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" 625 | }, 626 | "engines": { 627 | "node": ">=16 || 14 >=14.17" 628 | }, 629 | "funding": { 630 | "url": "https://github.com/sponsors/isaacs" 631 | } 632 | }, 633 | "node_modules/path-scurry/node_modules/lru-cache": { 634 | "version": "10.0.1", 635 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", 636 | "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", 637 | "dev": true, 638 | "engines": { 639 | "node": "14 || >=16.14" 640 | } 641 | }, 642 | "node_modules/picomatch": { 643 | "version": "2.3.1", 644 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 645 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 646 | "dev": true, 647 | "engines": { 648 | "node": ">=8.6" 649 | }, 650 | "funding": { 651 | "url": "https://github.com/sponsors/jonschlinkert" 652 | } 653 | }, 654 | "node_modules/pstree.remy": { 655 | "version": "1.1.8", 656 | "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", 657 | "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", 658 | "dev": true 659 | }, 660 | "node_modules/readdirp": { 661 | "version": "3.6.0", 662 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 663 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 664 | "dev": true, 665 | "dependencies": { 666 | "picomatch": "^2.2.1" 667 | }, 668 | "engines": { 669 | "node": ">=8.10.0" 670 | } 671 | }, 672 | "node_modules/rimraf": { 673 | "version": "5.0.1", 674 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.1.tgz", 675 | "integrity": "sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==", 676 | "dev": true, 677 | "dependencies": { 678 | "glob": "^10.2.5" 679 | }, 680 | "bin": { 681 | "rimraf": "dist/cjs/src/bin.js" 682 | }, 683 | "engines": { 684 | "node": ">=14" 685 | }, 686 | "funding": { 687 | "url": "https://github.com/sponsors/isaacs" 688 | } 689 | }, 690 | "node_modules/semver": { 691 | "version": "7.5.4", 692 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", 693 | "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", 694 | "dev": true, 695 | "dependencies": { 696 | "lru-cache": "^6.0.0" 697 | }, 698 | "bin": { 699 | "semver": "bin/semver.js" 700 | }, 701 | "engines": { 702 | "node": ">=10" 703 | } 704 | }, 705 | "node_modules/shebang-command": { 706 | "version": "2.0.0", 707 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", 708 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", 709 | "dev": true, 710 | "dependencies": { 711 | "shebang-regex": "^3.0.0" 712 | }, 713 | "engines": { 714 | "node": ">=8" 715 | } 716 | }, 717 | "node_modules/shebang-regex": { 718 | "version": "3.0.0", 719 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", 720 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", 721 | "dev": true, 722 | "engines": { 723 | "node": ">=8" 724 | } 725 | }, 726 | "node_modules/signal-exit": { 727 | "version": "4.1.0", 728 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", 729 | "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", 730 | "dev": true, 731 | "engines": { 732 | "node": ">=14" 733 | }, 734 | "funding": { 735 | "url": "https://github.com/sponsors/isaacs" 736 | } 737 | }, 738 | "node_modules/simple-update-notifier": { 739 | "version": "2.0.0", 740 | "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", 741 | "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", 742 | "dev": true, 743 | "dependencies": { 744 | "semver": "^7.5.3" 745 | }, 746 | "engines": { 747 | "node": ">=10" 748 | } 749 | }, 750 | "node_modules/string-width": { 751 | "version": "5.1.2", 752 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", 753 | "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", 754 | "dev": true, 755 | "dependencies": { 756 | "eastasianwidth": "^0.2.0", 757 | "emoji-regex": "^9.2.2", 758 | "strip-ansi": "^7.0.1" 759 | }, 760 | "engines": { 761 | "node": ">=12" 762 | }, 763 | "funding": { 764 | "url": "https://github.com/sponsors/sindresorhus" 765 | } 766 | }, 767 | "node_modules/string-width-cjs": { 768 | "name": "string-width", 769 | "version": "4.2.3", 770 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 771 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 772 | "dev": true, 773 | "dependencies": { 774 | "emoji-regex": "^8.0.0", 775 | "is-fullwidth-code-point": "^3.0.0", 776 | "strip-ansi": "^6.0.1" 777 | }, 778 | "engines": { 779 | "node": ">=8" 780 | } 781 | }, 782 | "node_modules/string-width-cjs/node_modules/ansi-regex": { 783 | "version": "5.0.1", 784 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 785 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 786 | "dev": true, 787 | "engines": { 788 | "node": ">=8" 789 | } 790 | }, 791 | "node_modules/string-width-cjs/node_modules/emoji-regex": { 792 | "version": "8.0.0", 793 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 794 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 795 | "dev": true 796 | }, 797 | "node_modules/string-width-cjs/node_modules/strip-ansi": { 798 | "version": "6.0.1", 799 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 800 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 801 | "dev": true, 802 | "dependencies": { 803 | "ansi-regex": "^5.0.1" 804 | }, 805 | "engines": { 806 | "node": ">=8" 807 | } 808 | }, 809 | "node_modules/strip-ansi": { 810 | "version": "7.1.0", 811 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", 812 | "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", 813 | "dev": true, 814 | "dependencies": { 815 | "ansi-regex": "^6.0.1" 816 | }, 817 | "engines": { 818 | "node": ">=12" 819 | }, 820 | "funding": { 821 | "url": "https://github.com/chalk/strip-ansi?sponsor=1" 822 | } 823 | }, 824 | "node_modules/strip-ansi-cjs": { 825 | "name": "strip-ansi", 826 | "version": "6.0.1", 827 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 828 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 829 | "dev": true, 830 | "dependencies": { 831 | "ansi-regex": "^5.0.1" 832 | }, 833 | "engines": { 834 | "node": ">=8" 835 | } 836 | }, 837 | "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { 838 | "version": "5.0.1", 839 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 840 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 841 | "dev": true, 842 | "engines": { 843 | "node": ">=8" 844 | } 845 | }, 846 | "node_modules/supports-color": { 847 | "version": "5.5.0", 848 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 849 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 850 | "dev": true, 851 | "dependencies": { 852 | "has-flag": "^3.0.0" 853 | }, 854 | "engines": { 855 | "node": ">=4" 856 | } 857 | }, 858 | "node_modules/to-regex-range": { 859 | "version": "5.0.1", 860 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 861 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 862 | "dev": true, 863 | "dependencies": { 864 | "is-number": "^7.0.0" 865 | }, 866 | "engines": { 867 | "node": ">=8.0" 868 | } 869 | }, 870 | "node_modules/touch": { 871 | "version": "3.1.0", 872 | "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", 873 | "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", 874 | "dev": true, 875 | "dependencies": { 876 | "nopt": "~1.0.10" 877 | }, 878 | "bin": { 879 | "nodetouch": "bin/nodetouch.js" 880 | } 881 | }, 882 | "node_modules/ts-node": { 883 | "version": "10.9.1", 884 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", 885 | "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", 886 | "dev": true, 887 | "dependencies": { 888 | "@cspotcode/source-map-support": "^0.8.0", 889 | "@tsconfig/node10": "^1.0.7", 890 | "@tsconfig/node12": "^1.0.7", 891 | "@tsconfig/node14": "^1.0.0", 892 | "@tsconfig/node16": "^1.0.2", 893 | "acorn": "^8.4.1", 894 | "acorn-walk": "^8.1.1", 895 | "arg": "^4.1.0", 896 | "create-require": "^1.1.0", 897 | "diff": "^4.0.1", 898 | "make-error": "^1.1.1", 899 | "v8-compile-cache-lib": "^3.0.1", 900 | "yn": "3.1.1" 901 | }, 902 | "bin": { 903 | "ts-node": "dist/bin.js", 904 | "ts-node-cwd": "dist/bin-cwd.js", 905 | "ts-node-esm": "dist/bin-esm.js", 906 | "ts-node-script": "dist/bin-script.js", 907 | "ts-node-transpile-only": "dist/bin-transpile.js", 908 | "ts-script": "dist/bin-script-deprecated.js" 909 | }, 910 | "peerDependencies": { 911 | "@swc/core": ">=1.2.50", 912 | "@swc/wasm": ">=1.2.50", 913 | "@types/node": "*", 914 | "typescript": ">=2.7" 915 | }, 916 | "peerDependenciesMeta": { 917 | "@swc/core": { 918 | "optional": true 919 | }, 920 | "@swc/wasm": { 921 | "optional": true 922 | } 923 | } 924 | }, 925 | "node_modules/typescript": { 926 | "version": "5.1.6", 927 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", 928 | "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", 929 | "dev": true, 930 | "bin": { 931 | "tsc": "bin/tsc", 932 | "tsserver": "bin/tsserver" 933 | }, 934 | "engines": { 935 | "node": ">=14.17" 936 | } 937 | }, 938 | "node_modules/undefsafe": { 939 | "version": "2.0.5", 940 | "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", 941 | "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", 942 | "dev": true 943 | }, 944 | "node_modules/v8-compile-cache-lib": { 945 | "version": "3.0.1", 946 | "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", 947 | "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", 948 | "dev": true 949 | }, 950 | "node_modules/which": { 951 | "version": "2.0.2", 952 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 953 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 954 | "dev": true, 955 | "dependencies": { 956 | "isexe": "^2.0.0" 957 | }, 958 | "bin": { 959 | "node-which": "bin/node-which" 960 | }, 961 | "engines": { 962 | "node": ">= 8" 963 | } 964 | }, 965 | "node_modules/wrap-ansi": { 966 | "version": "8.1.0", 967 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", 968 | "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", 969 | "dev": true, 970 | "dependencies": { 971 | "ansi-styles": "^6.1.0", 972 | "string-width": "^5.0.1", 973 | "strip-ansi": "^7.0.1" 974 | }, 975 | "engines": { 976 | "node": ">=12" 977 | }, 978 | "funding": { 979 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 980 | } 981 | }, 982 | "node_modules/wrap-ansi-cjs": { 983 | "name": "wrap-ansi", 984 | "version": "7.0.0", 985 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 986 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 987 | "dev": true, 988 | "dependencies": { 989 | "ansi-styles": "^4.0.0", 990 | "string-width": "^4.1.0", 991 | "strip-ansi": "^6.0.0" 992 | }, 993 | "engines": { 994 | "node": ">=10" 995 | }, 996 | "funding": { 997 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 998 | } 999 | }, 1000 | "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { 1001 | "version": "5.0.1", 1002 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 1003 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 1004 | "dev": true, 1005 | "engines": { 1006 | "node": ">=8" 1007 | } 1008 | }, 1009 | "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { 1010 | "version": "4.3.0", 1011 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 1012 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 1013 | "dev": true, 1014 | "dependencies": { 1015 | "color-convert": "^2.0.1" 1016 | }, 1017 | "engines": { 1018 | "node": ">=8" 1019 | }, 1020 | "funding": { 1021 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 1022 | } 1023 | }, 1024 | "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { 1025 | "version": "8.0.0", 1026 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 1027 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 1028 | "dev": true 1029 | }, 1030 | "node_modules/wrap-ansi-cjs/node_modules/string-width": { 1031 | "version": "4.2.3", 1032 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 1033 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 1034 | "dev": true, 1035 | "dependencies": { 1036 | "emoji-regex": "^8.0.0", 1037 | "is-fullwidth-code-point": "^3.0.0", 1038 | "strip-ansi": "^6.0.1" 1039 | }, 1040 | "engines": { 1041 | "node": ">=8" 1042 | } 1043 | }, 1044 | "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { 1045 | "version": "6.0.1", 1046 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 1047 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 1048 | "dev": true, 1049 | "dependencies": { 1050 | "ansi-regex": "^5.0.1" 1051 | }, 1052 | "engines": { 1053 | "node": ">=8" 1054 | } 1055 | }, 1056 | "node_modules/yallist": { 1057 | "version": "4.0.0", 1058 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", 1059 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", 1060 | "dev": true 1061 | }, 1062 | "node_modules/yn": { 1063 | "version": "3.1.1", 1064 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 1065 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", 1066 | "dev": true, 1067 | "engines": { 1068 | "node": ">=6" 1069 | } 1070 | } 1071 | } 1072 | } 1073 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "03-typescript", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "dev": "nodemon", 9 | "build": "rimraf ./dist && tsc", 10 | "start": "npm run build && node dist/app.js" 11 | }, 12 | "keywords": [], 13 | "author": "", 14 | "license": "ISC", 15 | "devDependencies": { 16 | "@types/node": "^20.5.1", 17 | "nodemon": "^3.0.1", 18 | "rimraf": "^5.0.1", 19 | "ts-node": "^10.9.1", 20 | "typescript": "^5.1.6" 21 | } 22 | } -------------------------------------------------------------------------------- /src/app.ts: -------------------------------------------------------------------------------- 1 | import { findHeroById } from './services/hero.service'; 2 | 3 | 4 | 5 | const hero = findHeroById( 2 ); 6 | 7 | 8 | console.log( hero?.name ?? 'No hero found' ); // hero = undefined.name -------------------------------------------------------------------------------- /src/data/heroes.ts: -------------------------------------------------------------------------------- 1 | 2 | interface Hero { 3 | id: number; 4 | name: string; 5 | owner: string; 6 | } 7 | 8 | export const heroes: Hero[] = [ 9 | { 10 | id: 1, 11 | name: 'Ironman', 12 | owner: 'Marvel' 13 | }, 14 | { 15 | id: 2, 16 | name: 'Spiderman', 17 | owner: 'Marvel' 18 | }, 19 | { 20 | id: 3, 21 | name: 'Batman', 22 | owner: 'DC' 23 | }, 24 | ]; 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/services/hero.service.ts: -------------------------------------------------------------------------------- 1 | import { heroes } from '../data/heroes'; 2 | 3 | 4 | 5 | export const findHeroById = ( id: number ) => { 6 | return heroes.find( (hero) => hero.id === id ); 7 | } 8 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ 22 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ 26 | 27 | /* Modules */ 28 | "module": "commonjs", /* Specify what module code is generated. */ 29 | "rootDir": "src", /* Specify the root folder within your source files. */ 30 | // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ 31 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 32 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 33 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 34 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 35 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 36 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 37 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 38 | // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ 39 | // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ 40 | // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ 41 | // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ 42 | // "resolveJsonModule": true, /* Enable importing .json files. */ 43 | // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ 44 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ 45 | 46 | /* JavaScript Support */ 47 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ 48 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 49 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ 50 | 51 | /* Emit */ 52 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 53 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 54 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 55 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 56 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 57 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ 58 | "outDir": "dist/", /* Specify an output folder for all emitted files. */ 59 | // "removeComments": true, /* Disable emitting comments. */ 60 | // "noEmit": true, /* Disable emitting files from a compilation. */ 61 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 62 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ 63 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 64 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 65 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 66 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 67 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 68 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 69 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ 70 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ 71 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 72 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ 73 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 74 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 75 | 76 | /* Interop Constraints */ 77 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 78 | // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ 79 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 80 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ 81 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 82 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 83 | 84 | /* Type Checking */ 85 | "strict": true, /* Enable all strict type-checking options. */ 86 | // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ 87 | // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ 88 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 89 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ 90 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 91 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ 92 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ 93 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 94 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ 95 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ 96 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 97 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 98 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 99 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ 100 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 101 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ 102 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 103 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 104 | 105 | /* Completeness */ 106 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 107 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 108 | } 109 | } 110 | --------------------------------------------------------------------------------