From b84ffa48643e3ca77d0df3dcce26bdf028c298ab Mon Sep 17 00:00:00 2001 From: Alix von Schirp Date: Mon, 9 Dec 2024 06:35:03 +0100 Subject: [PATCH] Basics, Setup, Launcher --- .gitignore | 241 +++++++++++++++++++++++++++++++ LICENSE | 15 ++ README.md | 66 ++++++++- index.ts | 119 +++++++++++++++ package.json | 23 +++ pnpm-lock.yaml | 383 +++++++++++++++++++++++++++++++++++++++++++++++++ tsconfig.json | 23 +++ 7 files changed, 869 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 index.ts create mode 100644 package.json create mode 100644 pnpm-lock.yaml create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1dcf527 --- /dev/null +++ b/.gitignore @@ -0,0 +1,241 @@ +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Node template +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +### Windows template +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +### Advent of Code specific + +**/input*.txt +**/index.js +.idea/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ebc6c7f --- /dev/null +++ b/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2024 Alix von Schirp + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 5df3bb6..ecbb375 100644 --- a/README.md +++ b/README.md @@ -1 +1,65 @@ -# aoc2024 +# Advent of Coding 2024 + +
+ +[![Project license](https://img.shields.io/github/license/b00tload/advent-of-coding-2024.svg?style=flat-square)](LICENSE) +![GitHub last commit](https://img.shields.io/github/last-commit/b00tload/advent-of-coding-2024?style=flat-square) + + +
+ +
+Table of Contents + +- [About](#about) + - [Built With](#built-with) +- [Getting Started](#getting-started) + - [Prerequisites](#prerequisites) + - [Installation](#installation) +- [Usage](#usage) +- [License](#license) +- [Acknowledgements](#acknowledgements) + +
+ +--- + +## About + +My solutions to the Advent of Code 2024. + +### Built With + +- TypeScript +- Launcher build with inquirer.js + +## Getting Started + +### Prerequisites + +- pnpm 9 +- node 20 + +### Installation + +1. git clone +2. pnpm install +3. pnpm start + +## Usage + +- run `pnpm start` +- download your input +- Select day +- select part +- select input + +## License + +This project is licensed under the **ISC license**. + +See [LICENSE](LICENSE) for more information. + +## Acknowledgements + +Thanks to [Eric Wastl](https://was.tl/) for creating Advent of Code! \ No newline at end of file diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..798bef0 --- /dev/null +++ b/index.ts @@ -0,0 +1,119 @@ +import {search} from '@inquirer/prompts' +import fs from "node:fs"; +import * as process from "node:process"; +import * as path from "node:path"; + + +type Choice = { + value: Value; + name?: string; + description?: string; + short?: string; + disabled?: boolean | string; +}; + +async function main(day: string | undefined, part : string | undefined, input: string | undefined) { + if ((day ?? null) == null) { + day = await search({ + message: "Select a day", + source: async (input) => { + if (!input) return fs.readdirSync("./", {withFileTypes: true}) + .filter(value => value.isDirectory()) + .filter(value => { + return !value.name.match("node_modules") + }).filter(value => { + return !value.name.startsWith(".") + }).map(value => value.name) + + return fs.readdirSync("./", {withFileTypes: true}) + .filter(value => { + return (path.join(value.parentPath, value.name)).match(input) + }) + .filter(value => value.isDirectory()) + .filter(value => { + return !value.name.match("node_modules") + }).filter(value => { + return !value.name.startsWith(".") + }).map(value => value.name) + } + }) + } + + if ((part ?? null) == null) { + part = await search({ + message: "Select a Part", + source: async (input) => { + if (!input) return fs.readdirSync(`./${day}`, {withFileTypes: true}) + .filter(value => value.isDirectory()) + .filter(value => { + return !value.name.match("node_modules") + }).filter(value => { + return !value.name.startsWith(".") + }).map(value => value.name) + + return fs.readdirSync("./", {withFileTypes: true}) + .filter(value => { + return (path.join(value.parentPath, value.name)).match(input) + }) + .filter(value => value.isDirectory()) + .filter(value => { + return !value.name.startsWith(".") + }).map(value => value.name) + } + }) + } + + if ((input ?? null) == null) { + + const inputs = fs.readdirSync(`./${day}`, {withFileTypes: true}) + .filter(value => value.isFile()) + .filter(value => value.isFile()).filter(value => { + return !value.parentPath.match("node_modules") + }).filter(value => { + return !value.parentPath.startsWith(".") || value.parentPath.startsWith("./") + }).filter(value => { + return !value.name.startsWith(".") + }).map>(value => { + return { + name: value.name, + value: path.join(value.parentPath, value.name) + } + }) + + + input = await search({ + message: `Select file (Select within ./${day} or search within ./*))`, + source: async (input) => { + if (!input) return inputs; + + return fs.readdirSync("./", {recursive: true, withFileTypes: true}) + .filter(value => { + return (path.join(value.parentPath, value.name)).match(input) + }).filter(value => value.isFile()) + .filter(value => value.isFile()).filter(value => { + return !value.parentPath.match("node_modules") + }).filter(value => { + return !value.parentPath.startsWith(".") || value.parentPath.startsWith("./") + }).filter(value => { + return !value.name.startsWith(".") + }).map>(value => { + return { + name: path.join(value.parentPath, value.name), + value: path.join(value.parentPath, value.name) + } + }) + } + }) + } + + console.log(input) + + const {default: runner} = await import(`./${day}/${part}/index.js`) + runner(input) +} + +const day = process.argv[2] +const part = process.argv[3] +const input = process.argv[4] + +main(day, part, input).then() \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..51f51ca --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "advent-of-code-2024", + "version": "1.0.0", + "description": "My solutions to the 2024 advent of code.", + "main": "index.js", + "scripts": { + "build": "tsc -b", + "start:nobuild": "node index.js", + "start": "pnpm build && node index.js" + }, + "keywords": ["challenge", "typescript", "advent-of-code", "programming-puzzles", "advent-of-code-2024", "aoc-2024", "advent-of-code-2024-javascript", "advent-of-code-2024-typescript", "aoc-2024-in-typescript"], + "author": "b00tload", + "license": "ISC", + "type": "module", + "devDependencies": { + "@types/node": "^22.10.1", + "tslib": "^2.8.1", + "typescript": "^5.7.2" + }, + "dependencies": { + "@inquirer/prompts": "^7.2.0" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..33b0976 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,383 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@inquirer/prompts': + specifier: ^7.2.0 + version: 7.2.0(@types/node@22.10.1) + devDependencies: + '@types/node': + specifier: ^22.10.1 + version: 22.10.1 + tslib: + specifier: ^2.8.1 + version: 2.8.1 + typescript: + specifier: ^5.7.2 + version: 5.7.2 + +packages: + + '@inquirer/checkbox@4.0.3': + resolution: {integrity: sha512-CEt9B4e8zFOGtc/LYeQx5m8nfqQeG/4oNNv0PUvXGG0mys+wR/WbJ3B4KfSQ4Fcr3AQfpiuFOi3fVvmPfvNbxw==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + + '@inquirer/confirm@5.1.0': + resolution: {integrity: sha512-osaBbIMEqVFjTX5exoqPXs6PilWQdjaLhGtMDXMXg/yxkHXNq43GlxGyTA35lK2HpzUgDN+Cjh/2AmqCN0QJpw==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + + '@inquirer/core@10.1.1': + resolution: {integrity: sha512-rmZVXy9iZvO3ZStEe/ayuuwIJ23LSF13aPMlLMTQARX6lGUBDHGV8UB5i9MRrfy0+mZwt5/9bdy8llszSD3NQA==} + engines: {node: '>=18'} + + '@inquirer/editor@4.2.0': + resolution: {integrity: sha512-Z3LeGsD3WlItDqLxTPciZDbGtm0wrz7iJGS/uUxSiQxef33ZrBq7LhsXg30P7xrWz1kZX4iGzxxj5SKZmJ8W+w==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + + '@inquirer/expand@4.0.3': + resolution: {integrity: sha512-MDszqW4HYBpVMmAoy/FA9laLrgo899UAga0itEjsYrBthKieDZNc0e16gdn7N3cQ0DSf/6zsTBZMuDYDQU4ktg==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + + '@inquirer/figures@1.0.8': + resolution: {integrity: sha512-tKd+jsmhq21AP1LhexC0pPwsCxEhGgAkg28byjJAd+xhmIs8LUX8JbUc3vBf3PhLxWiB5EvyBE5X7JSPAqMAqg==} + engines: {node: '>=18'} + + '@inquirer/input@4.1.0': + resolution: {integrity: sha512-16B8A9hY741yGXzd8UJ9R8su/fuuyO2e+idd7oVLYjP23wKJ6ILRIIHcnXe8/6AoYgwRS2zp4PNsW/u/iZ24yg==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + + '@inquirer/number@3.0.3': + resolution: {integrity: sha512-HA/W4YV+5deKCehIutfGBzNxWH1nhvUC67O4fC9ufSijn72yrYnRmzvC61dwFvlXIG1fQaYWi+cqNE9PaB9n6Q==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + + '@inquirer/password@4.0.3': + resolution: {integrity: sha512-3qWjk6hS0iabG9xx0U1plwQLDBc/HA/hWzLFFatADpR6XfE62LqPr9GpFXBkLU0KQUaIXZ996bNG+2yUvocH8w==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + + '@inquirer/prompts@7.2.0': + resolution: {integrity: sha512-ZXYZ5oGVrb+hCzcglPeVerJ5SFwennmDOPfXq1WyeZIrPGySLbl4W6GaSsBFvu3WII36AOK5yB8RMIEEkBjf8w==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + + '@inquirer/rawlist@4.0.3': + resolution: {integrity: sha512-5MhinSzfmOiZlRoPezfbJdfVCZikZs38ja3IOoWe7H1dxL0l3Z2jAUgbBldeyhhOkELdGvPlBfQaNbeLslib1w==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + + '@inquirer/search@3.0.3': + resolution: {integrity: sha512-mQTCbdNolTGvGGVCJSI6afDwiSGTV+fMLPEIMDJgIV6L/s3+RYRpxt6t0DYnqMQmemnZ/Zq0vTIRwoHT1RgcTg==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + + '@inquirer/select@4.0.3': + resolution: {integrity: sha512-OZfKDtDE8+J54JYAFTUGZwvKNfC7W/gFCjDkcsO7HnTH/wljsZo9y/FJquOxMy++DY0+9l9o/MOZ8s5s1j5wmw==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + + '@inquirer/type@3.0.1': + resolution: {integrity: sha512-+ksJMIy92sOAiAccGpcKZUc3bYO07cADnscIxHBknEm3uNts3movSmBofc1908BNy5edKscxYeAdaX1NXkHS6A==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + + '@types/node@22.10.1': + resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} + + ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + + cli-width@4.1.0: + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} + engines: {node: '>= 12'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + + iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + mute-stream@2.0.0: + resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==} + engines: {node: ^18.17.0 || >=20.5.0} + + os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + + typescript@5.7.2: + resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} + engines: {node: '>=14.17'} + hasBin: true + + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + + yoctocolors-cjs@2.1.2: + resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} + engines: {node: '>=18'} + +snapshots: + + '@inquirer/checkbox@4.0.3(@types/node@22.10.1)': + dependencies: + '@inquirer/core': 10.1.1(@types/node@22.10.1) + '@inquirer/figures': 1.0.8 + '@inquirer/type': 3.0.1(@types/node@22.10.1) + '@types/node': 22.10.1 + ansi-escapes: 4.3.2 + yoctocolors-cjs: 2.1.2 + + '@inquirer/confirm@5.1.0(@types/node@22.10.1)': + dependencies: + '@inquirer/core': 10.1.1(@types/node@22.10.1) + '@inquirer/type': 3.0.1(@types/node@22.10.1) + '@types/node': 22.10.1 + + '@inquirer/core@10.1.1(@types/node@22.10.1)': + dependencies: + '@inquirer/figures': 1.0.8 + '@inquirer/type': 3.0.1(@types/node@22.10.1) + ansi-escapes: 4.3.2 + cli-width: 4.1.0 + mute-stream: 2.0.0 + signal-exit: 4.1.0 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + yoctocolors-cjs: 2.1.2 + transitivePeerDependencies: + - '@types/node' + + '@inquirer/editor@4.2.0(@types/node@22.10.1)': + dependencies: + '@inquirer/core': 10.1.1(@types/node@22.10.1) + '@inquirer/type': 3.0.1(@types/node@22.10.1) + '@types/node': 22.10.1 + external-editor: 3.1.0 + + '@inquirer/expand@4.0.3(@types/node@22.10.1)': + dependencies: + '@inquirer/core': 10.1.1(@types/node@22.10.1) + '@inquirer/type': 3.0.1(@types/node@22.10.1) + '@types/node': 22.10.1 + yoctocolors-cjs: 2.1.2 + + '@inquirer/figures@1.0.8': {} + + '@inquirer/input@4.1.0(@types/node@22.10.1)': + dependencies: + '@inquirer/core': 10.1.1(@types/node@22.10.1) + '@inquirer/type': 3.0.1(@types/node@22.10.1) + '@types/node': 22.10.1 + + '@inquirer/number@3.0.3(@types/node@22.10.1)': + dependencies: + '@inquirer/core': 10.1.1(@types/node@22.10.1) + '@inquirer/type': 3.0.1(@types/node@22.10.1) + '@types/node': 22.10.1 + + '@inquirer/password@4.0.3(@types/node@22.10.1)': + dependencies: + '@inquirer/core': 10.1.1(@types/node@22.10.1) + '@inquirer/type': 3.0.1(@types/node@22.10.1) + '@types/node': 22.10.1 + ansi-escapes: 4.3.2 + + '@inquirer/prompts@7.2.0(@types/node@22.10.1)': + dependencies: + '@inquirer/checkbox': 4.0.3(@types/node@22.10.1) + '@inquirer/confirm': 5.1.0(@types/node@22.10.1) + '@inquirer/editor': 4.2.0(@types/node@22.10.1) + '@inquirer/expand': 4.0.3(@types/node@22.10.1) + '@inquirer/input': 4.1.0(@types/node@22.10.1) + '@inquirer/number': 3.0.3(@types/node@22.10.1) + '@inquirer/password': 4.0.3(@types/node@22.10.1) + '@inquirer/rawlist': 4.0.3(@types/node@22.10.1) + '@inquirer/search': 3.0.3(@types/node@22.10.1) + '@inquirer/select': 4.0.3(@types/node@22.10.1) + '@types/node': 22.10.1 + + '@inquirer/rawlist@4.0.3(@types/node@22.10.1)': + dependencies: + '@inquirer/core': 10.1.1(@types/node@22.10.1) + '@inquirer/type': 3.0.1(@types/node@22.10.1) + '@types/node': 22.10.1 + yoctocolors-cjs: 2.1.2 + + '@inquirer/search@3.0.3(@types/node@22.10.1)': + dependencies: + '@inquirer/core': 10.1.1(@types/node@22.10.1) + '@inquirer/figures': 1.0.8 + '@inquirer/type': 3.0.1(@types/node@22.10.1) + '@types/node': 22.10.1 + yoctocolors-cjs: 2.1.2 + + '@inquirer/select@4.0.3(@types/node@22.10.1)': + dependencies: + '@inquirer/core': 10.1.1(@types/node@22.10.1) + '@inquirer/figures': 1.0.8 + '@inquirer/type': 3.0.1(@types/node@22.10.1) + '@types/node': 22.10.1 + ansi-escapes: 4.3.2 + yoctocolors-cjs: 2.1.2 + + '@inquirer/type@3.0.1(@types/node@22.10.1)': + dependencies: + '@types/node': 22.10.1 + + '@types/node@22.10.1': + dependencies: + undici-types: 6.20.0 + + ansi-escapes@4.3.2: + dependencies: + type-fest: 0.21.3 + + ansi-regex@5.0.1: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + chardet@0.7.0: {} + + cli-width@4.1.0: {} + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + emoji-regex@8.0.0: {} + + external-editor@3.1.0: + dependencies: + chardet: 0.7.0 + iconv-lite: 0.4.24 + tmp: 0.0.33 + + iconv-lite@0.4.24: + dependencies: + safer-buffer: 2.1.2 + + is-fullwidth-code-point@3.0.0: {} + + mute-stream@2.0.0: {} + + os-tmpdir@1.0.2: {} + + safer-buffer@2.1.2: {} + + signal-exit@4.1.0: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + tmp@0.0.33: + dependencies: + os-tmpdir: 1.0.2 + + tslib@2.8.1: {} + + type-fest@0.21.3: {} + + typescript@5.7.2: {} + + undici-types@6.20.0: {} + + wrap-ansi@6.2.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + yoctocolors-cjs@2.1.2: {} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..3557a6b --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "lib": ["ESNext", "DOM"], + "target": "es2022", + "module": "ESNext", + "moduleDetection": "force", + "jsx": "react-jsx", + "allowJs": true, + + "moduleResolution": "bundler", + "verbatimModuleSyntax": true, + "skipLibCheck": true, + + // strictness + "strict": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "checkJs": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noPropertyAccessFromIndexSignature": true + } +} \ No newline at end of file