{"id":25256727,"url":"https://github.com/weaponsforge/adventofcode","last_synced_at":"2026-02-16T11:32:33.571Z","repository":{"id":267984777,"uuid":"902255390","full_name":"weaponsforge/adventofcode","owner":"weaponsforge","description":"Solutions for Advent of Code event puzzles using TypeScript/JavaScript","archived":false,"fork":false,"pushed_at":"2025-12-27T02:15:00.000Z","size":832,"stargazers_count":2,"open_issues_count":14,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-12-28T15:47:54.377Z","etag":null,"topics":["advent-of-code","adventofcode","aoc"],"latest_commit_sha":null,"homepage":"https://adventofcode.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weaponsforge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-12T08:03:21.000Z","updated_at":"2025-12-27T00:42:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"a23e6157-ffe3-46d6-8dc3-bf2d59bfa1cc","html_url":"https://github.com/weaponsforge/adventofcode","commit_stats":null,"previous_names":["weaponsforge/adventofcode"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/weaponsforge/adventofcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fadventofcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fadventofcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fadventofcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fadventofcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weaponsforge","download_url":"https://codeload.github.com/weaponsforge/adventofcode/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fadventofcode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29506768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["advent-of-code","adventofcode","aoc"],"created_at":"2025-02-12T06:21:14.424Z","updated_at":"2026-02-16T11:32:33.564Z","avatar_url":"https://github.com/weaponsforge.png","language":"TypeScript","readme":"## ✨ adventofcode\n\nThis repository contains solutions and a local development environment for the [Advent of Code](https://adventofcode.com/) event puzzles using **TypeScript/JavaScript**.\n\n- The code repository structure follows a way that discusses and walks through the solution steps for the AoC quizzes rather than focusing on AoC's competitive programming.\n- The quizzes were solved for fun (unlocking the 2024 AoC Chrismas symbol 🎄) and brain exercise purposes. Therefore, no GPT or AI completion was used for solving, as advised on the AoC website.\n- These codes may get occasional optimization updates or solutions using other languages from time to time.\n\n### 🎄 Advent of Code Quiz Information\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb style=\"font-size: 24px;\"\u003e2024\u003c/b\u003e\u003c/summary\u003e\n\n- Day 1: Historian Hysteria [[link]](/src/2024/2024-12-01/README.md)\n- Day 2: Red-Nosed Reports [[link]](/src/2024/2024-12-02/README.md)\n- Day 3: Mull It Over [[link]](/src/2024/2024-12-03/README.md)\n- Day 4: Ceres Search [[link]](/src/2024/2024-12-04/README.md)\n- Day 5: Print Queue [[link]](/src/2024/2024-12-05/README.md)\n- Day 6: Guard Gallivant [[link]](/src/2024/2024-12-06/README.md)\n- Day 7: Bridge Repair [[link]](/src/2024/2024-12-07/README.md)\n- Day 8: Resonant Collinearity [[link]](/src/2024/2024-12-08/README.md)\n- Day 9: Disk Fragmenter [[link]](/src/2024/2024-12-09/README.md)\n- Day 10: Hoof It [[link]](/src/2024/2024-12-10/README.md)\n- Day 11: Plutonian Pebbles [[link]](/src/2024/2024-12-11/README.md)\n- Day 12: Garden Groups [[link]](/src/2024/2024-12-12/README.md)\n- Day 13: Claw Contraption [[link]](/src/2024/2024-12-13/README.md)\n- Day 14: Restroom Redoubt [[link]](/src/2024/2024-12-14/README.md)\n- Day 15: Warehouse Woes [[link]](/src/2024/2024-12-15/README.md)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb style=\"font-size: 24px;\"\u003e2025\u003c/b\u003e\u003c/summary\u003e\n\n- Day 1: Secret Entrance [[link]](/src/2025/2025-12-01/README.md)\n- Day 2: Gift Shop [[link]](/src/2025/2025-12-02/README.md)\n- Day 3: Lobby [[link]](/src/2025/2025-12-03/README.md)\n- Day 4: Printing Department [[link]](/src/2025/2025-12-04/README.md)\n- Day 5: Cafeteria [[link]](/src/2025/2025-12-05/README.md)\n- Day 6: Trash Compactor [[link]](/src/2025/2025-12-06/README.md)\n- Day 7: Laboratories [[link]](/src/2025/2025-12-07/README.md)\n- Day 8: Playground [[link]](/src/2025/2025-12-08/README.md)\n\n\u003c/details\u003e\n\n### Table of Contents\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand the table of contents\u003c/summary\u003e\n\n- [Advent of Code Quiz Information](#-advent-of-code-quiz-information)\n- [Project Folder Structure](#-project-folder-structure)\n- [Requirements](#-requirements)\n- [Installation](#%EF%B8%8F-installation)\n- [Usage](#-usage)\n- [Alternate Usage](#-alternate-usage)\n- [Available Scripts](#-available-scripts)\n- [Docker Scripts](#-docker-scripts)\n\n\u003c/details\u003e\n\n## 📚 Project Folder Structure\n\nIt follows the directory structure:\n\n\u003e [!NOTE]\n\u003e 📂 dist\u003cbr\u003e\n\u003e 📂 src\u003cbr\u003e\n\u003e └─ 📂 aoc\u003cbr\u003e\n\u003e └─ 📂 sample\u003cbr\u003e\n\u003e └─ 📂 2024\u003cbr\u003e\n\u003e └─── 📂 2024-12-01\u003cbr\u003e\n\u003e └───── 📂 lib\u003cbr\u003e\n\u003e └───── 📄 input.txt\u003cbr\u003e\n\u003e └───── 📄 main.ts\u003cbr\u003e\n\u003e └───── 📄 sample.test.ts\u003cbr\u003e\n\u003e └───── 📄 README.md\u003cbr\u003e\n\u003e └─── 📂 2024-12-02\u003cbr\u003e\n\u003e └─── 📂 ...\u003cbr\u003e\n\u003e └─ 📂 2025\u003cbr\u003e\n\u003e └─ 📂 ...\u003cbr\u003e\n\u003e └─ 📄 index.ts\u003cbr\u003e\n\u003e └─ 📄 ...\u003cbr\u003e\n\u003e 📄 README.md\n\n#### Quiz Folders\n\nEach Advent of Code (AoC) event quiz has its folder under **`\"/src/\u003cYEAR\u003e/\u003cYYYY-MM-DD\u003e\"`** containing:\n- **/lib**: Folder containing main quiz solution logic\n- **input.txt**: Random quiz input\n   \u003e _**INFO:** The sample quiz inputs were slightly altered from the original AoC input text and quiz samples as advised on their website_\n- **main.ts**: Main program entry point containing quiz answer(s) using random input\n- **sample.test.ts**: Minimal sample input with expected correct answers\n- **README.md**: Reference and other notes about the AoC quiz question\n\n#### Other Items\n\n- **/src/aoc**: 🗃️ Folder containing generic utility and common AoC helper functions\n- **/src/dist**: Folder containing the JavaScript files compiled from TypeScript (not committed to the repository)\n- **/src/sample**: Miscellaneous random examples\n- **/src/index.ts**: Exports all solutions to AoC quiz answer functions\n\n### 📋 Requirements\n\n- NodeJS recommended version: v24.11.0\n   - node: 24.11.0\n   - npm: 11.6.1\n\n- Docker (optional)\n\n## 🛠️ Installation\n\n1. Clone the repository.\n   ```\n   git clone https://github.com/weaponsforge/adventofcode.git\n   ```\n\n2. Install dependencies.\n   ```\n   npm install\n   ```\n\n## 🚀 Usage\n\nUsing Node\n\n1. (Optional) Replace the values of specific `input.txt` in the `\"/src/\u003cYEAR\u003e/\u003cYYYY-MM-DD\u003e\"` directories with actual AoC input.\n2. Run a non-test TypeScript file inside the **/src** directory from the project's _**\"root directory\"**_. For example:\n   ```\n   npx vite-node src/sample/sample.ts\n   ```\n\n   ```\n   npx vite-node src/2024/2024-12-01/main.ts\n   ```\n3. Run compiled JavaScript code from the TypeScript files. For example:\n   ```\n   npm run transpile\n   node dist/sample/sample.js\n   ```\n4. See the [Available Scripts](#-available-scripts) section for more information.\n\n## ⚡ Alternate Usage\n\nUsing Docker\n\n- **Build the image**\n   ```\n   docker compose build\n   ```\n\n- **Transpile the TypeScript files to JavaScript** (PowerShell)\n   ```\n   docker run -it -v ${pwd}:/opt/app -v /opt/app/node_modules --rm weaponsforge/adventofcode:dev npm run transpile\n   ```\n\n- **Run tests** (PowerShell)\n   ```\n   docker run -it -v ${pwd}:/opt/app -v /opt/app/node_modules --rm weaponsforge/adventofcode:dev npm test\n   ```\n\n- **Watch TS file updates: Use available scripts** - e.g., `npm run watch`, `npm run docker:watch:win`\n   ```\n   docker run -it -v ${pwd}:/opt/app -v /opt/app/node_modules --rm weaponsforge/adventofcode:dev \u003cAVAILABLE_SCRIPT\u003e\n   ```\n\n- **Run a script and debug it with the VSCode Debugger**\n   - Prepare a function for debugging with VSCode in Docker. Wrap it in the `AOCRunScript()` function.\n   - Assign the path to a TypeScript file from the previous step to the package.json file's `\"docker:debug\"` script, replacing `src/sample/sample.ts`.\n      - `\"docker:debug\": \"export IS_DOCKER=true \u0026\u0026 node --inspect=0.0.0.0:9229 ./node_modules/.bin/vite-node src/path/to/script.ts\"`\n   - Run the script with VSCode debugging (PowerShell):\n      ```\n      docker run -it -v ${pwd}:/opt/app -v /opt/app/node_modules -p 9229:9229 --rm weaponsforge/adventofcode:dev npm run docker:debug\n      ```\n   \u003e **INFO:** This process requires attaching a debugger with the VSCode launch config defined in Issue [#53](https://github.com/weaponsforge/adventofcode/issues/53)\n\n   \u003cdetails\u003e\n   \u003csummary\u003eVSCode Launch Configuration\u003c/summary\u003e\n\n   ```json\n   {\n     \"version\": \"0.2.0\",\n     \"configurations\": [\n       {\n         \"type\": \"node\",\n         \"request\": \"attach\",\n         \"name\": \"Attach to Docker\",\n         \"address\": \"localhost\",\n         \"port\": 9229,\n         \"restart\": true,\n         \"skipFiles\": [\"\u003cnode_internals\u003e/**\"],\n         \"localRoot\": \"${workspaceFolder}\",\n         \"remoteRoot\": \"/opt/app\"\n       }\n     ]\n   }\n   ```\n\n   \u003c/details\u003e\n\n## 📜 Available Scripts\n\nThese scripts, compatible with running in Node and Docker, run various TypeScript scripts and tests.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand the list of available scripts\u003c/summary\u003e\n\n### `npm run dev`\n\nRuns `vitest` in watch mode, watching file changes and errors to files linked with `*.test.ts` files.\n\n### `npm run watch`\n\nWatches file changes in `.ts` files using the `tsc --watch` option.\n\n### `npm run dev:debug`\n\nRuns the sample TS script.\n\n### `npm run transpile`\n\nBuilds JavaScript, `.d.ts` declaration files, and map files from the TypeScript source files.\n\n### `npm run transpile:noemit`\n\nRuns type-checking without generating the JavaScript or declaration files from the TypeScript files.\n\n### `npm run lint`\n\nLints TypeScript source codes.\n\n### `npm run lint:fix`\n\nFixes lint errors in TypeScript files.\n\n### `npm test`\n\nRuns test scripts defined in `*.test.ts` files.\n\n\u003c/details\u003e\n\n## 📦 Docker Scripts\n\nThese scripts allow optional Docker-related processes, such as enabling file watching in Docker containers running in Windows WSL2 and others.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand the list of available scripts\u003c/summary\u003e\n\n\u003cbr\u003e\n\n**Docker run command (PowerShell)**\n\n`docker run -it -v ${pwd}:/opt/app -v /opt/app/node_modules --rm weaponsforge/adventofcode:dev \u003cAVAILABLE_SCRIPT\u003e`\n\n### `npm run docker:debug`\n\n- Runs the `\"/src/sample/sample.ts\"` script in containers with debugging enabled in VSCode.\n- Replace the `\"/src/sample/sample.ts\"` file path in the package.json file's `\"docker:debug\"` script with a target TypeScript file for debugging.\n- Map port **9229** to enable debugging VSCode while running in Docker (PowerShell).\u003cbr\u003e\n   - `docker run -it -v ${pwd}:/opt/app -v /opt/app/node_modules -p 9229:9229 --rm weaponsforge/adventofcode:dev npm run docker:debug`\n- Launch the VSCode debugger using the following configuration:\n\n   ```json\n   {\n     \"version\": \"0.2.0\",\n     \"configurations\": [\n       {\n         \"type\": \"node\",\n         \"request\": \"attach\",\n         \"name\": \"Attach to Docker\",\n         \"address\": \"localhost\",\n         \"port\": 9229,\n         \"restart\": true,\n         \"skipFiles\": [\"\u003cnode_internals\u003e/**\"],\n         \"localRoot\": \"${workspaceFolder}\",\n         \"remoteRoot\": \"/opt/app\"\n       }\n     ]\n   }\n   ```\n\n### `npm run docker:watch:win`\n\nWatches file changes in `.ts` files using the `tsc --watch` option with `dynamicPriorityPolling` in Docker containers running in Windows WSL2.\n\n\u003e **NOTE:** Requires running `docker compose up`\n\n### `npm run docker:dev:win`\n\n- Sets and exports the environment variables: `CHOKIDAR_USEPOLLING=1` and `CHOKIDAR_INTERVAL=1000`\n- Runs `vitest` in watch mode inside Docker containers running in Windows WSL2, watching file changes and errors to files linked with `*.test.ts` files.\n\n\u003e **NOTE:** Requires running `docker compose up`\n\n\u003c/details\u003e\n\u003cbr\u003e\n\n@weaponsforge\u003cbr\u003e\n20241213\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaponsforge%2Fadventofcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweaponsforge%2Fadventofcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaponsforge%2Fadventofcode/lists"}