From ade07eaf6c29a87b8e08e9c76dc911e37503693c Mon Sep 17 00:00:00 2001 From: Brad Adams Date: Sat, 7 Dec 2024 13:55:16 +0100 Subject: [PATCH 1/8] build: initial bun migration --- 2024/07/index.test.ts | 25 + 2024/07/index.ts | 50 +- bun.lockb | Bin 0 -> 23008 bytes package-lock.json | 1858 ----------------------------------------- package.json | 14 +- tsconfig.json | 27 +- utils/get-inputs.ts | 6 + utils/time-part.ts | 16 + 8 files changed, 104 insertions(+), 1892 deletions(-) create mode 100644 2024/07/index.test.ts create mode 100755 bun.lockb delete mode 100644 package-lock.json create mode 100644 utils/get-inputs.ts create mode 100644 utils/time-part.ts diff --git a/2024/07/index.test.ts b/2024/07/index.test.ts new file mode 100644 index 0000000..23c3c11 --- /dev/null +++ b/2024/07/index.test.ts @@ -0,0 +1,25 @@ +import { expect, describe, test } from "bun:test"; +import { part1, part2 } from "."; +import { getInputs } from "../../utils/get-inputs"; + +const { exampleInput, puzzleInput } = await getInputs("2024/07"); + +describe("part 1", () => { + test("example", () => { + expect(part1(exampleInput)).toBe(3749); + }); + + test("puzzle", () => { + expect(part1(puzzleInput)).toBe(3312271365652); + }); +}); + +describe("part 2", () => { + test("example", () => { + expect(part2(exampleInput)).toBe(11387); + }); + + test("puzzle", () => { + expect(part2(puzzleInput)).toBe(509463489296712); + }); +}); diff --git a/2024/07/index.ts b/2024/07/index.ts index 0622cd6..8fe7939 100644 --- a/2024/07/index.ts +++ b/2024/07/index.ts @@ -1,22 +1,24 @@ -import { getPuzzle } from "../../utils"; +import { timePart1, timePart2 } from "../../utils/time-part"; -const puzzleInput = getPuzzle(__dirname).trim(); +const parseInput = (input: string) => { + return input.split("\n").map((row) => { + const [testValue, numbers] = row.split(": "); -const equations = puzzleInput.split("\n").map((row) => { - const [testValue, numbers] = row.split(": "); + return { + testValue: parseInt(testValue), + numbers: numbers.split(" ").map((n) => parseInt(n)), + }; + }); +}; - return { - testValue: parseInt(testValue), - numbers: numbers.split(" ").map((n) => parseInt(n)), - }; -}); - -// Part 1 -(() => { - console.time("part 1"); +export const part1 = timePart1((input: string) => { let total = 0; + const equations = parseInput(input); - const compare = ({ numbers, testValue }: (typeof equations)[number]) => { + const compare = ({ + numbers, + testValue, + }: (typeof equations)[number]): boolean => { if (numbers.length === 1) { return testValue === numbers[0]; } @@ -48,16 +50,17 @@ const equations = puzzleInput.split("\n").map((row) => { } } - console.log("part 1 total ::", total); - console.timeEnd("part 1"); -})(); + return total; +}); -// Part 2 -(() => { - console.time("part 2"); +export const part2 = timePart2((input: string) => { let total = 0; + const equations = parseInput(input); - const compare = ({ numbers, testValue }: (typeof equations)[number]) => { + const compare = ({ + numbers, + testValue, + }: (typeof equations)[number]): boolean => { if (numbers.length === 1) { return testValue === numbers[0]; } @@ -89,6 +92,5 @@ const equations = puzzleInput.split("\n").map((row) => { } } - console.log("part 2 total ::", total); - console.timeEnd("part 2"); -})(); + return total; +}); diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000000000000000000000000000000000000..5182d4f39e8e0ca2dd54f6a8d879bde115210b50 GIT binary patch literal 23008 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 F{tt_LEjs`J literal 0 HcmV?d00001 diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 831bdb5..0000000 --- a/package-lock.json +++ /dev/null @@ -1,1858 +0,0 @@ -{ - "name": "advent-of-code", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "advent-of-code", - "version": "1.0.0", - "dependencies": { - "@types/inquirer": "^9.0.3", - "@types/node": "^18.11.10", - "@types/nodemon": "^1.19.2", - "inquirer": "^8.0.0", - "nodemon": "^2.0.20", - "ts-node": "^10.9.1", - "typescript": "^4.9.3" - } - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", - "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==" - }, - "node_modules/@types/inquirer": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-9.0.3.tgz", - "integrity": "sha512-CzNkWqQftcmk2jaCWdBTf9Sm7xSw4rkI1zpU/Udw3HX5//adEZUIm9STtoRP1qgWj0CWQtJ9UTvqmO2NNjhMJw==", - "dependencies": { - "@types/through": "*", - "rxjs": "^7.2.0" - } - }, - "node_modules/@types/node": { - "version": "18.11.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.10.tgz", - "integrity": "sha512-juG3RWMBOqcOuXC643OAdSA525V44cVgGV6dUDuiFtss+8Fk5x1hI93Rsld43VeJVIeqlP9I7Fn9/qaVqoEAuQ==" - }, - "node_modules/@types/nodemon": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@types/nodemon/-/nodemon-1.19.2.tgz", - "integrity": "sha512-4GWiTN3HevkxMIxEQ7OpD3MAHhlVsX2tairCMRmf8oYZxmhHw9+UpQpIdGdJrjsMT2Ty26FtJzUUcP/qM5fR8A==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/through": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.30.tgz", - "integrity": "sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "node_modules/acorn": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", - "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "engines": { - "node": ">=8" - } - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chalk/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-spinners": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz", - "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" - }, - "node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "engines": { - "node": ">=4" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==" - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/inquirer": { - "version": "8.2.5", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", - "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", - "dependencies": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.1", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.21", - "mute-stream": "0.0.8", - "ora": "^5.4.1", - "run-async": "^2.4.0", - "rxjs": "^7.5.5", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node_modules/mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" - }, - "node_modules/nodemon": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.20.tgz", - "integrity": "sha512-Km2mWHKKY5GzRg6i1j5OxOHQtuvVsgskLfigG25yTtbyfRGn/GNvIbRyOf1PSCKJ2aT/58TiuUsuOU5UToVViw==", - "dependencies": { - "chokidar": "^3.5.2", - "debug": "^3.2.7", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", - "semver": "^5.7.1", - "simple-update-notifier": "^1.0.7", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5" - }, - "bin": { - "nodemon": "bin/nodemon.js" - }, - "engines": { - "node": ">=8.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nodemon" - } - }, - "node_modules/nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "*" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" - }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/rxjs": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.6.0.tgz", - "integrity": "sha512-DDa7d8TFNUalGC9VqXvQ1euWNN7sc63TrUCuM9J998+ViviahMIjKSOU7rfcgFOF+FCD71BhDRv4hrFz+ImDLQ==", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, - "node_modules/simple-update-notifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", - "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", - "dependencies": { - "semver": "~7.0.0" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/simple-update-notifier/node_modules/semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" - }, - "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/touch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", - "dependencies": { - "nopt": "~1.0.10" - }, - "bin": { - "nodetouch": "bin/nodetouch.js" - } - }, - "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" - }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typescript": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", - "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" - }, - "node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "dependencies": { - "defaults": "^1.0.3" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "engines": { - "node": ">=6" - } - } - }, - "dependencies": { - "@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "requires": { - "@jridgewell/trace-mapping": "0.3.9" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" - }, - "@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" - }, - "@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" - }, - "@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" - }, - "@tsconfig/node16": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", - "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==" - }, - "@types/inquirer": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-9.0.3.tgz", - "integrity": "sha512-CzNkWqQftcmk2jaCWdBTf9Sm7xSw4rkI1zpU/Udw3HX5//adEZUIm9STtoRP1qgWj0CWQtJ9UTvqmO2NNjhMJw==", - "requires": { - "@types/through": "*", - "rxjs": "^7.2.0" - } - }, - "@types/node": { - "version": "18.11.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.10.tgz", - "integrity": "sha512-juG3RWMBOqcOuXC643OAdSA525V44cVgGV6dUDuiFtss+8Fk5x1hI93Rsld43VeJVIeqlP9I7Fn9/qaVqoEAuQ==" - }, - "@types/nodemon": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@types/nodemon/-/nodemon-1.19.2.tgz", - "integrity": "sha512-4GWiTN3HevkxMIxEQ7OpD3MAHhlVsX2tairCMRmf8oYZxmhHw9+UpQpIdGdJrjsMT2Ty26FtJzUUcP/qM5fR8A==", - "requires": { - "@types/node": "*" - } - }, - "@types/through": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.30.tgz", - "integrity": "sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==", - "requires": { - "@types/node": "*" - } - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "acorn": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", - "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==" - }, - "acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==" - }, - "ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "requires": { - "type-fest": "^0.21.3" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" - }, - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { - "fill-range": "^7.0.1" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "requires": { - "restore-cursor": "^3.1.0" - } - }, - "cli-spinners": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz", - "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==" - }, - "cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==" - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==" - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" - }, - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "requires": { - "ms": "^2.1.1" - } - }, - "defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "requires": { - "clone": "^1.0.2" - } - }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" - }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, - "figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "optional": true - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "requires": { - "is-glob": "^4.0.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==" - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "inquirer": { - "version": "8.2.5", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", - "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", - "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.1", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.21", - "mute-stream": "0.0.8", - "ora": "^5.4.1", - "run-async": "^2.4.0", - "rxjs": "^7.5.5", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6", - "wrap-ansi": "^7.0.0" - } - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==" - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==" - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - } - }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" - }, - "nodemon": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.20.tgz", - "integrity": "sha512-Km2mWHKKY5GzRg6i1j5OxOHQtuvVsgskLfigG25yTtbyfRGn/GNvIbRyOf1PSCKJ2aT/58TiuUsuOU5UToVViw==", - "requires": { - "chokidar": "^3.5.2", - "debug": "^3.2.7", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", - "semver": "^5.7.1", - "simple-update-notifier": "^1.0.7", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5" - } - }, - "nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", - "requires": { - "abbrev": "1" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "requires": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==" - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" - }, - "pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "requires": { - "picomatch": "^2.2.1" - } - }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, - "run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==" - }, - "rxjs": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.6.0.tgz", - "integrity": "sha512-DDa7d8TFNUalGC9VqXvQ1euWNN7sc63TrUCuM9J998+ViviahMIjKSOU7rfcgFOF+FCD71BhDRv4hrFz+ImDLQ==", - "requires": { - "tslib": "^2.1.0" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, - "simple-update-notifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", - "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", - "requires": { - "semver": "~7.0.0" - }, - "dependencies": { - "semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==" - } - } - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "requires": { - "is-number": "^7.0.0" - } - }, - "touch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", - "requires": { - "nopt": "~1.0.10" - } - }, - "ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "requires": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - } - }, - "tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" - }, - "type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" - }, - "typescript": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", - "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==" - }, - "undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" - }, - "wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "requires": { - "defaults": "^1.0.3" - } - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" - } - } -} diff --git a/package.json b/package.json index c6e9de4..3647e5b 100644 --- a/package.json +++ b/package.json @@ -3,17 +3,15 @@ "version": "1.0.0", "description": "Advent of Code Solutions", "author": "Brad Adams ", + "private": "true", "scripts": { - "add-day": "ts-node ./scripts/add-day.ts", - "watch-day": "ts-node ./scripts/watch-day.ts" + "add-day": "bun ./scripts/add-day.ts", + "watch-day": "bun ./scripts/watch-day.ts" }, - "dependencies": { + "devDependencies": { "@types/inquirer": "^9.0.3", - "@types/node": "^18.11.10", - "@types/nodemon": "^1.19.2", "inquirer": "^8.0.0", - "nodemon": "^2.0.20", - "ts-node": "^10.9.1", - "typescript": "^4.9.3" + "typescript": "^4.9.3", + "@types/bun": "^1.1.14" } } diff --git a/tsconfig.json b/tsconfig.json index 153b041..e8ea6bb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,30 @@ { "compilerOptions": { + // Enable latest features + "lib": ["ESNext"], + "target": "ESNext", + "module": "ESNext", + "moduleDetection": "force", + "jsx": "react-jsx", + "allowJs": true, + + // Bundler mode + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "noEmit": true, + + // Best practices + "strict": true, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + + // Some stricter flags + "noUnusedLocals": true, + "noUnusedParameters": true, + "noPropertyAccessFromIndexSignature": true, + "downlevelIteration": true, - "esModuleInterop": true, - "lib": ["ES2021.String"] + "esModuleInterop": true } } diff --git a/utils/get-inputs.ts b/utils/get-inputs.ts new file mode 100644 index 0000000..9dc3fbf --- /dev/null +++ b/utils/get-inputs.ts @@ -0,0 +1,6 @@ +export const getInputs = async (basePath: string) => { + const exampleInput = await Bun.file(`${basePath}/example.txt`).text(); + const puzzleInput = await Bun.file(`${basePath}/puzzle.txt`).text(); + + return { exampleInput, puzzleInput }; +}; diff --git a/utils/time-part.ts b/utils/time-part.ts new file mode 100644 index 0000000..aef3a60 --- /dev/null +++ b/utils/time-part.ts @@ -0,0 +1,16 @@ +const timePart = + (_label: string) => + any>(fn: T) => + (...args: Parameters): ReturnType => { + const label = `\x1b[42m ${_label} \x1b[0m`; + + console.time(label); + const result = fn(...args); + console.timeEnd(label); + + return result; + }; + +export const timePart1 = timePart("⏰ part 1"); + +export const timePart2 = timePart("⏰ part 2"); From 424a6d58308a6d6b330b8a7be1be6e73628a6a1e Mon Sep 17 00:00:00 2001 From: Brad Adams Date: Sat, 14 Dec 2024 21:04:07 +0100 Subject: [PATCH 2/8] refactor: migrate 08/2024 --- .gitignore | 2 +- 2024/07/example.txt | 9 +++++++++ 2024/08/example.txt | 12 ++++++++++++ 2024/08/index.test.ts | 25 +++++++++++++++++++++++++ 2024/08/index.ts | 40 ++++++++++++++++++++-------------------- utils/get-inputs.ts | 12 ++++++++++-- 6 files changed, 77 insertions(+), 23 deletions(-) create mode 100644 2024/07/example.txt create mode 100644 2024/08/example.txt create mode 100644 2024/08/index.test.ts diff --git a/.gitignore b/.gitignore index 7ca96d7..423af93 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules .DS_Store -*.txt +puzzle.txt diff --git a/2024/07/example.txt b/2024/07/example.txt new file mode 100644 index 0000000..87b8b25 --- /dev/null +++ b/2024/07/example.txt @@ -0,0 +1,9 @@ +190: 10 19 +3267: 81 40 27 +83: 17 5 +156: 15 6 +7290: 6 8 6 15 +161011: 16 10 13 +192: 17 8 14 +21037: 9 7 18 13 +292: 11 6 16 20 \ No newline at end of file diff --git a/2024/08/example.txt b/2024/08/example.txt new file mode 100644 index 0000000..de0f909 --- /dev/null +++ b/2024/08/example.txt @@ -0,0 +1,12 @@ +............ +........0... +.....0...... +.......0.... +....0....... +......A..... +............ +............ +........A... +.........A.. +............ +............ \ No newline at end of file diff --git a/2024/08/index.test.ts b/2024/08/index.test.ts new file mode 100644 index 0000000..fa26b46 --- /dev/null +++ b/2024/08/index.test.ts @@ -0,0 +1,25 @@ +import { expect, describe, test } from "bun:test"; +import { part1, part2 } from "."; +import { getInputs } from "../../utils/get-inputs"; + +const { exampleInput, puzzleInput } = await getInputs("2024/08"); + +describe("part 1", () => { + test("example", () => { + expect(part1(exampleInput)).toBe(14); + }); + + test("puzzle", () => { + expect(part1(puzzleInput)).toBe(269); + }); +}); + +describe("part 2", () => { + test("example", () => { + expect(part2(exampleInput)).toBe(34); + }); + + test("puzzle", () => { + expect(part2(puzzleInput)).toBe(949); + }); +}); diff --git a/2024/08/index.ts b/2024/08/index.ts index 88fe32c..2c683af 100644 --- a/2024/08/index.ts +++ b/2024/08/index.ts @@ -1,16 +1,18 @@ -import { getPuzzle } from "../../utils"; +import { timePart1, timePart2 } from "../../utils/time-part"; -const puzzleInput = getPuzzle(__dirname).trim(); +const parseInput = (input: string) => + input.split("\n").map((row) => row.split("")); -const map = puzzleInput.split("\n").map((row) => row.split("")); +const measureMap = (map: ReturnType) => { + const WIDTH = map[0].length; + const HEIGHT = map.length; -const WIDTH = map[0].length; -const HEIGHT = map.length; - -// Part 1 -(() => { - console.time("part 1"); + return { WIDTH, HEIGHT }; +}; +export const part1 = timePart1((input: string) => { + const map = parseInput(input); + const { HEIGHT, WIDTH } = measureMap(map); const antennas = new Map>(); for (let y = 0; y < HEIGHT; y++) { @@ -22,7 +24,7 @@ const HEIGHT = map.length; } if (antennas.has(cell)) { - antennas.get(cell).add(`${x},${y}`); + antennas.get(cell)!.add(`${x},${y}`); } else { antennas.set(cell, new Set([`${x},${y}`])); } @@ -83,13 +85,12 @@ const HEIGHT = map.length; } } - console.log("part 1 antinode count ::", antinodes.size); - console.timeEnd("part 1"); -})(); + return antinodes.size; +}); -// Part 2 -(() => { - console.time("part 2"); +export const part2 = timePart2((input: string) => { + const map = parseInput(input); + const { HEIGHT, WIDTH } = measureMap(map); const antennas = new Map>(); for (let y = 0; y < HEIGHT; y++) { @@ -101,7 +102,7 @@ const HEIGHT = map.length; } if (antennas.has(cell)) { - antennas.get(cell).add(`${x},${y}`); + antennas.get(cell)!.add(`${x},${y}`); } else { antennas.set(cell, new Set([`${x},${y}`])); } @@ -198,6 +199,5 @@ const HEIGHT = map.length; } } - console.log("part 2 antinode count ::", antinodes.size); - console.timeEnd("part 2"); -})(); + return antinodes.size; +}); diff --git a/utils/get-inputs.ts b/utils/get-inputs.ts index 9dc3fbf..7f4af95 100644 --- a/utils/get-inputs.ts +++ b/utils/get-inputs.ts @@ -1,6 +1,14 @@ export const getInputs = async (basePath: string) => { - const exampleInput = await Bun.file(`${basePath}/example.txt`).text(); - const puzzleInput = await Bun.file(`${basePath}/puzzle.txt`).text(); + let exampleInput: string = ""; + let puzzleInput: string = ""; + + try { + exampleInput = await Bun.file(`${basePath}/example.txt`).text(); + } catch {} + + try { + puzzleInput = await Bun.file(`${basePath}/puzzle.txt`).text(); + } catch {} return { exampleInput, puzzleInput }; }; From 4774d0eb5194ddef95d1eb2a0a921437696783f2 Mon Sep 17 00:00:00 2001 From: Brad Adams Date: Sat, 14 Dec 2024 21:19:35 +0100 Subject: [PATCH 3/8] refactor: migrate 09/2024 --- 2024/09/example.txt | 1 + 2024/09/index.test.ts | 25 +++++++++++++++++++++++++ 2024/09/index.ts | 26 +++++++++++--------------- 3 files changed, 37 insertions(+), 15 deletions(-) create mode 100644 2024/09/example.txt create mode 100644 2024/09/index.test.ts diff --git a/2024/09/example.txt b/2024/09/example.txt new file mode 100644 index 0000000..5ff5aae --- /dev/null +++ b/2024/09/example.txt @@ -0,0 +1 @@ +2333133121414131402 \ No newline at end of file diff --git a/2024/09/index.test.ts b/2024/09/index.test.ts new file mode 100644 index 0000000..4ecb399 --- /dev/null +++ b/2024/09/index.test.ts @@ -0,0 +1,25 @@ +import { expect, describe, test } from "bun:test"; +import { part1, part2 } from "."; +import { getInputs } from "../../utils/get-inputs"; + +const { exampleInput, puzzleInput } = await getInputs("2024/09"); + +describe("part 1", () => { + test("example", () => { + expect(part1(exampleInput)).toBe(1928); + }); + + test("puzzle", () => { + expect(part1(puzzleInput)).toBe(6258319840548); + }); +}); + +describe("part 2", () => { + test("example", () => { + expect(part2(exampleInput)).toBe(2858); + }); + + test("puzzle", () => { + expect(part2(puzzleInput)).toBe(6286182965311); + }); +}); diff --git a/2024/09/index.ts b/2024/09/index.ts index 51be9f3..bf5cb3d 100644 --- a/2024/09/index.ts +++ b/2024/09/index.ts @@ -1,11 +1,10 @@ -import { getPuzzle } from "../../utils"; +import { timePart1, timePart2 } from "../../utils/time-part"; -const puzzleInput = getPuzzle(__dirname).trim(); -const diskMap = puzzleInput.split(""); +const parseInput = (input: string) => input.split(""); // Part 1 -(() => { - console.time("part 1"); +export const part1 = timePart1((input: string) => { + const diskMap = parseInput(input); let representation = ""; for (let i = 0; i < diskMap.length; i++) { @@ -26,7 +25,7 @@ const diskMap = puzzleInput.split(""); let lastFileBlockIndex = representationArr.findLastIndex((e) => e !== "."); while (lastFileBlockIndex > firstFreeSpaceBlockIndex) { - const lastEntry = representationArr.pop(); + const lastEntry = representationArr.pop()!; if (lastEntry !== ".") { representationArr[firstFreeSpaceBlockIndex] = lastEntry; @@ -50,13 +49,11 @@ const diskMap = puzzleInput.split(""); } } - console.log("part 1 checksum ::", checksum); - console.timeEnd("part 1"); -})(); + return checksum; +}); -// Part 2 -(() => { - console.time("part 2"); +export const part2 = timePart2((input: string) => { + const diskMap = parseInput(input); let representation = ""; for (let i = 0; i < diskMap.length; i++) { @@ -145,6 +142,5 @@ const diskMap = puzzleInput.split(""); } } - console.log("part 2 checksum ::", checksum); - console.timeEnd("part 2"); -})(); + return checksum; +}); From 08991f271a810448cde4445fe9e545dc9a7d5866 Mon Sep 17 00:00:00 2001 From: Brad Adams Date: Sun, 15 Dec 2024 18:39:19 +0100 Subject: [PATCH 4/8] 15/2024 --- 2024/15/example.txt | 21 +++ 2024/15/index.test.ts | 25 ++++ 2024/15/index.ts | 331 ++++++++++++++++++++++++++++++++++++++++++ README.md | 1 + 4 files changed, 378 insertions(+) create mode 100644 2024/15/example.txt create mode 100644 2024/15/index.test.ts create mode 100644 2024/15/index.ts diff --git a/2024/15/example.txt b/2024/15/example.txt new file mode 100644 index 0000000..b2bce78 --- /dev/null +++ b/2024/15/example.txt @@ -0,0 +1,21 @@ +########## +#..O..O.O# +#......O.# +#.OO..O.O# +#..O@..O.# +#O#..O...# +#O..O..O.# +#.OO.O.OO# +#....O...# +########## + +^v>^vv^v>v<>v^v<<><>>v^v^>^<<<><^ +vvv<<^>^v^^><<>>><>^<<><^vv^^<>vvv<>><^^v>^>vv<>v<<<^<^^>>>^<>vv>v^v^<>><>>>><^^>vv>v<^^^>>v^v^<^^>v^^>v^<^v>v<>>v^v^v^^<^^vv< +<>^^^^>>>v^<>vvv^>^^^vv^^>v<^^^^v<>^>vvvv><>>v^<<^^^^^ +^><^><>>><>^^<<^^v>>><^^>v>>>^v><>^v><<<>vvvv>^<><<>^>< +^>><>^v<><^vvv<^^<><^v<<<><<<^^<^>>^<<<^>>^v^>>^v>vv>^<<^v<>><<><<>v<^vv<<<>^^v^>^^>>><<^v>>v^v><^^>>^<>vv^ +<><^^>^^^<>^vv<<^><<><<><<<^^<<<^<<>><<><^^^>^^<>^>v<> +^^>vv<^v^v^<>^^^>>>^^vvv^>vvv<>>>^<^>>>>>^<<^v>^vvv<>^<>< +v^^>>><<^^<>>^v^v^<<>^<^v^v><^<<<><<^vv>>v>v^<<^ \ No newline at end of file diff --git a/2024/15/index.test.ts b/2024/15/index.test.ts new file mode 100644 index 0000000..0b3e97c --- /dev/null +++ b/2024/15/index.test.ts @@ -0,0 +1,25 @@ +import { expect, describe, test } from "bun:test"; +import { part1, part2 } from "."; +import { getInputs } from "../../utils/get-inputs"; + +const { exampleInput, puzzleInput } = await getInputs("2024/15"); + +describe("part 1", () => { + test("example", () => { + expect(part1(exampleInput)).toBe(10092); + }); + + test("puzzle", () => { + expect(part1(puzzleInput)).toBe(1563092); + }); +}); + +describe("part 2", () => { + test("example", () => { + expect(part2(exampleInput)).toBe(9021); + }); + + test("puzzle", () => { + expect(part2(puzzleInput)).toBe(1582688); + }); +}); diff --git a/2024/15/index.ts b/2024/15/index.ts new file mode 100644 index 0000000..b4f3708 --- /dev/null +++ b/2024/15/index.ts @@ -0,0 +1,331 @@ +import { timePart1, timePart2 } from "../../utils/time-part"; + +const parseInput = (input: string) => { + const [rawMap, rawMovements] = input.split("\n\n"); + + const map = rawMap.split("\n").map((row) => row.split("")); + const movements = rawMovements.split("\n").join("").split(""); + + return { map, movements }; +}; + +type InputMap = ReturnType["map"]; +type Coordinate = { x: number; y: number }; + +const getInitialPosition = (map: InputMap) => { + const y = map.findIndex((row) => row.includes("@")); + const x = map[y].indexOf("@"); + + return { x, y }; +}; + +const movementDirections = { + "<": { x: -1, y: 0 }, + "^": { x: 0, y: -1 }, + ">": { x: 1, y: 0 }, + v: { x: 0, y: 1 }, +}; + +const move = (position: Coordinate, direction: Coordinate) => { + return { + x: position.x + direction.x, + y: position.y + direction.y, + }; +}; + +const readCell = ({ x, y }: Coordinate, map: InputMap) => { + return map[y][x]; +}; + +const findNextEmptyCell = ({ + boxCells = ["O"], + currentPosition, + direction, + map, +}: { + boxCells?: string[]; + currentPosition: Coordinate; + direction: Coordinate; + map: InputMap; +}) => { + let position = currentPosition; + let i = 0; + + while (true) { + const nextPos = move(position, direction); + const cell = readCell(nextPos, map); + + if (cell === ".") { + position = nextPos; + break; + } + + if (boxCells.includes(cell)) { + position = nextPos; + i++; + continue; + } + + if (cell === "#") { + i = 0; + position = currentPosition; + break; + } + } + + return { + movementCount: i, + emptyCellPosition: position, + }; +}; + +// const buildMapForPrint = (map: InputMap, currentPosition?: Coordinate) => { +// const innerMap = JSON.parse(JSON.stringify(map)) as ReturnType< +// typeof parseInput +// >["map"]; + +// if (currentPosition) { +// innerMap[currentPosition.y][currentPosition.x] = "@"; +// } + +// return innerMap.map((row) => row.join("")).join("\n"); +// }; + +// const printMap = (map: InputMap, currentPosition?: Coordinate) => { +// console.log(buildMapForPrint(map, currentPosition)); +// }; + +const getGPSCoordinateSum = (map: InputMap, matchingChar: string) => { + let gpsCoordSum = 0; + + for (let y = 0; y < map.length; y++) { + for (let x = 0; x < map[0].length; x++) { + const cell = readCell({ x, y }, map); + + if (cell === matchingChar) { + gpsCoordSum += 100 * y + x; + } + } + } + + return gpsCoordSum; +}; + +export const part1 = timePart1((input: string) => { + const { map, movements } = parseInput(input); + let currentPosition = getInitialPosition(map); + map[currentPosition.y][currentPosition.x] = "."; + + for (const movement of movements) { + const direction = + movementDirections[movement as keyof typeof movementDirections]; + + const nextPosition = { + x: currentPosition.x + direction.x, + y: currentPosition.y + direction.y, + }; + + const cell = readCell(nextPosition, map); + + if (cell === "#") { + continue; + } + + if (cell === ".") { + currentPosition = nextPosition; + continue; + } + + if (cell === "O") { + const nextEmptyCell = findNextEmptyCell({ + currentPosition, + direction, + map, + }); + + if (nextEmptyCell.movementCount === 0) { + continue; + } + + currentPosition = nextPosition; + map[currentPosition.y][currentPosition.x] = "."; + + for (let j = 1; j <= nextEmptyCell.movementCount; j++) { + const blockPushPos = { + x: currentPosition.x + direction.x * j, + y: currentPosition.y + direction.y * j, + }; + + map[blockPushPos.y][blockPushPos.x] = "O"; + } + } + } + + return getGPSCoordinateSum(map, "O"); +}); + +const expandMap = (input: string) => { + const [map, movements] = input.split("\n\n"); + + const expandedMap = map + .replaceAll("#", "##") + .replaceAll("O", "[]") + .replaceAll(".", "..") + .replaceAll("@", "@."); + + return `${expandedMap}\n\n${movements}`; +}; + +const positionToKey = (position: Coordinate) => `${position.x},${position.y}`; + +const moveBoxesVertically = ({ + // debug, + direction, + map, + initialPosition, +}: { + // debug?: boolean; + direction: Coordinate; + map: InputMap; + initialPosition: Coordinate; +}) => { + const visited = new Set(); + let toMove: Coordinate[] = []; + const queue = [initialPosition]; + + while (queue.length) { + const position = queue.pop()!; + + const key = positionToKey(position); + + if (visited.has(key)) { + continue; + } + + const cell = readCell(position, map); + + // We hit a wall + if (cell === "#") { + toMove = []; + break; + } + + // We're on a "]" char + if (cell === "[") { + toMove.push(position); + queue.push({ ...position, x: position.x + 1 }); + queue.push(move(position, direction)); + } + + // We're on a "[" char + if (cell === "]") { + toMove.push(position); + queue.push({ ...position, x: position.x - 1 }); + queue.push(move(position, direction)); + } + + visited.add(key); + } + + const sortedToMove = toMove.toSorted((a, b) => { + if (direction.y === 1) { + return b.y - a.y || b.x - a.x; + } + + return a.y - b.y || a.x - b.x; + }); + + for (const pos of sortedToMove) { + const withMove = move(pos, direction); + const cell = readCell(pos, map); + + map[withMove.y][withMove.x] = cell; + map[pos.y][pos.x] = "."; + } + + return { hasMoved: toMove.length }; +}; + +export const part2 = timePart2((input: string) => { + const inputWithExpandedMap = expandMap(input); + const { map, movements } = parseInput(inputWithExpandedMap); + + let currentPosition = getInitialPosition(map); + map[currentPosition.y][currentPosition.x] = "."; + + let i = 0; + + for (const movement of movements) { + i++; + + const direction = + movementDirections[movement as keyof typeof movementDirections]; + + const nextPosition = { + x: currentPosition.x + direction.x, + y: currentPosition.y + direction.y, + }; + + const cell = readCell(nextPosition, map); + + if (cell === "#") { + continue; + } + + if (cell === ".") { + currentPosition = nextPosition; + continue; + } + + if (cell === "[" || cell === "]") { + if (movement === "<" || movement === ">") { + const nextEmptyCell = findNextEmptyCell({ + boxCells: ["[", "]"], + currentPosition, + direction, + map, + }); + + if (nextEmptyCell.movementCount === 0) { + continue; + } + + currentPosition = nextPosition; + map[currentPosition.y][currentPosition.x] = "."; + + for (let j = 1; j <= nextEmptyCell.movementCount; j++) { + const blockPushPos = { + x: currentPosition.x + direction.x * j, + y: currentPosition.y + direction.y * j, + }; + + map[blockPushPos.y][blockPushPos.x] = + j % 2 === 0 + ? movement === "<" + ? "[" + : "]" + : movement === ">" + ? "[" + : "]"; + } + } + + if (movement === "^" || movement === "v") { + const withMove = move(currentPosition, direction); + const { hasMoved } = moveBoxesVertically({ + direction, + map, + initialPosition: withMove, + }); + + if (hasMoved) { + currentPosition = withMove; + } + + continue; + } + } + } + + return getGPSCoordinateSum(map, "["); +}); diff --git a/README.md b/README.md index 71f0f9d..cd65f5f 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ | Day | Part 1 | Part 2 | | :----------------------------------------: | :----: | :----: | +| [15](https://adventofcode.com/2024/day/15) | ✅ | ✅ | | [14](https://adventofcode.com/2024/day/14) | ✅ | ✅ | | [13](https://adventofcode.com/2024/day/13) | ✅ | ✅ | | [12](https://adventofcode.com/2024/day/12) | ✅ | ✅ | From d03d5c2e1e31064b7a963994dc6e4af4875489d2 Mon Sep 17 00:00:00 2001 From: Brad Adams Date: Mon, 16 Dec 2024 21:24:11 +0100 Subject: [PATCH 5/8] 16/2024 --- 2024/16/example.txt | 17 ++++ 2024/16/index.test.ts | 25 +++++ 2024/16/index.ts | 218 ++++++++++++++++++++++++++++++++++++++++++ README.md | 1 + 4 files changed, 261 insertions(+) create mode 100644 2024/16/example.txt create mode 100644 2024/16/index.test.ts create mode 100644 2024/16/index.ts diff --git a/2024/16/example.txt b/2024/16/example.txt new file mode 100644 index 0000000..54f4cd7 --- /dev/null +++ b/2024/16/example.txt @@ -0,0 +1,17 @@ +################# +#...#...#...#..E# +#.#.#.#.#.#.#.#.# +#.#.#.#...#...#.# +#.#.#.#.###.#.#.# +#...#.#.#.....#.# +#.#.#.#.#.#####.# +#.#...#.#.#.....# +#.#.#####.#.###.# +#.#.#.......#...# +#.#.###.#####.### +#.#.#...#.....#.# +#.#.#.#####.###.# +#.#.#.........#.# +#.#.#.#########.# +#S#.............# +################# \ No newline at end of file diff --git a/2024/16/index.test.ts b/2024/16/index.test.ts new file mode 100644 index 0000000..e9dcb66 --- /dev/null +++ b/2024/16/index.test.ts @@ -0,0 +1,25 @@ +import { expect, describe, test } from "bun:test"; +import { part1, part2 } from "."; +import { getInputs } from "../../utils/get-inputs"; + +const { exampleInput, puzzleInput } = await getInputs("2024/16"); + +describe("part 1", () => { + test("example", () => { + expect(part1(exampleInput)).toBe(11048); + }); + + test("puzzle", () => { + expect(part1(puzzleInput)).toBe(92432); + }); +}); + +describe("part 2", () => { + test("example", () => { + expect(part2(exampleInput)).toBe(64); + }); + + test("puzzle", () => { + expect(part2(puzzleInput)).toBe(458); + }); +}); diff --git a/2024/16/index.ts b/2024/16/index.ts new file mode 100644 index 0000000..0c1df4d --- /dev/null +++ b/2024/16/index.ts @@ -0,0 +1,218 @@ +import { timePart1, timePart2 } from "../../utils/time-part"; + +const parseInput = (input: string) => { + return input.split("\n").map((row) => row.split("")); +}; + +type InputMap = ReturnType; + +const findCell = (char: string, map: InputMap) => { + const y = map.findIndex((row) => row.includes(char)); + const x = map[y].indexOf(char); + + return { x, y }; +}; + +const getStartingPosition = (map: InputMap) => findCell("S", map); +const getEndPosition = (map: InputMap) => findCell("E", map); + +const DIRECTIONS = ["N", "E", "S", "W"] as const; +type Direction = (typeof DIRECTIONS)[number]; + +type Coordinate = { x: number; y: number }; + +const positionToKey = (position: Coordinate, direction?: Direction) => { + const positionKey = `${position.x},${position.y}`; + + if (direction) { + return `${positionKey}:${direction}`; + } + + return positionKey; +}; + +const rotate = ( + direction: Direction, + { clockwise } = { clockwise: true } +): Direction => { + if (direction === "N" && !clockwise) { + return "W"; + } + + return DIRECTIONS[ + (DIRECTIONS.indexOf(direction) + (clockwise ? 1 : -1)) % DIRECTIONS.length + ]; +}; + +const MOVEMENTS = { + N: { x: 0, y: -1 }, + E: { x: 1, y: 0 }, + S: { x: 0, y: 1 }, + W: { x: -1, y: 0 }, +} satisfies Record; + +const move = (position: Coordinate, direction: Direction) => { + const movement = MOVEMENTS[direction]; + + return { x: position.x + movement.x, y: position.y + movement.y }; +}; + +const readCell = ({ x, y }: Coordinate, map: InputMap) => map[y]?.[x]; + +type QueueEntry = { + direction: Direction; + position: Coordinate; + score: number; + visited: Coordinate[]; +}; + +const getBestScore = (map: InputMap) => { + const start = getStartingPosition(map); + const end = getEndPosition(map); + + const queue: QueueEntry[] = [ + { + direction: "E", + position: start, + score: 0, + visited: [start], + }, + ]; + + const globalVisited = new Set(); + let bestScore: number | null = null; + + while (queue.length) { + queue.sort((a, b) => a.score - b.score); + + const route = queue.shift()!; + const baseKey = positionToKey(route.position, route.direction); + + if (globalVisited.has(baseKey)) { + continue; + } + globalVisited.add(baseKey); + + if (route.position.x === end.x && route.position.y === end.y) { + if (typeof bestScore !== "number" || route.score < bestScore) { + bestScore = route.score; + } + + continue; + } + + const movedForward = move(route.position, route.direction); + const cell = readCell(movedForward, map); + + if (cell !== "#") { + queue.push({ + ...route, + position: movedForward, + score: route.score + 1, + visited: [...route.visited, movedForward], + }); + } + + queue.push({ + ...route, + direction: rotate(route.direction), + score: route.score + 1000, + visited: [...route.visited], + }); + + queue.push({ + ...route, + direction: rotate(route.direction, { clockwise: false }), + score: route.score + 1000, + visited: [...route.visited], + }); + } + + return bestScore ?? 0; +}; + +export const part1 = timePart1((input: string) => { + const map = parseInput(input); + const bestScore = getBestScore(map); + + return bestScore; +}); + +export const part2 = timePart2((input: string) => { + const map = parseInput(input); + const bestScore = getBestScore(map); + const startingPosition = getStartingPosition(map); + const endPosition = getEndPosition(map); + + const queue: QueueEntry[] = [ + { + visited: [startingPosition], + position: startingPosition, + direction: "E", + score: 0, + }, + ]; + + const globalVisited = new Map(); + const pathsToEnd: QueueEntry["visited"][] = []; + + while (queue.length) { + const route = queue.shift()!; + const baseKey = positionToKey(route.position, route.direction); + + if ( + route.score > bestScore || + (globalVisited.has(baseKey) && globalVisited.get(baseKey)! < route.score) + ) { + continue; + } + + globalVisited.set(baseKey, route.score); + + if ( + route.position.x === endPosition.x && + route.position.y === endPosition.y && + route.score === bestScore + ) { + pathsToEnd.push(route.visited); + continue; + } + + const movedForward = move(route.position, route.direction); + const cell = readCell(movedForward, map); + + if (cell !== "#") { + queue.push({ + ...route, + position: movedForward, + score: route.score + 1, + visited: [...route.visited, movedForward], + }); + } + + queue.push({ + ...route, + direction: rotate(route.direction), + score: route.score + 1000, + visited: [...route.visited], + }); + + queue.push({ + ...route, + direction: rotate(route.direction, { clockwise: false }), + score: route.score + 1000, + visited: [...route.visited], + }); + } + + const bestSeats = new Set(); + + for (const pathToGoal of pathsToEnd) { + for (const position of pathToGoal) { + const key = positionToKey(position); + bestSeats.add(key); + } + } + + return bestSeats.size; +}); diff --git a/README.md b/README.md index cd65f5f..99f0e92 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ | Day | Part 1 | Part 2 | | :----------------------------------------: | :----: | :----: | +| [16](https://adventofcode.com/2024/day/16) | ✅ | ✅ | | [15](https://adventofcode.com/2024/day/15) | ✅ | ✅ | | [14](https://adventofcode.com/2024/day/14) | ✅ | ✅ | | [13](https://adventofcode.com/2024/day/13) | ✅ | ✅ | From 9576ed2250845acf19e332e7c4d6be03d479f079 Mon Sep 17 00:00:00 2001 From: Brad Adams Date: Tue, 17 Dec 2024 20:40:05 +0100 Subject: [PATCH 6/8] 17/2024 --- 2024/17/example.txt | 5 ++ 2024/17/index.test.ts | 33 +++++++++++ 2024/17/index.ts | 127 ++++++++++++++++++++++++++++++++++++++++++ README.md | 1 + 4 files changed, 166 insertions(+) create mode 100644 2024/17/example.txt create mode 100644 2024/17/index.test.ts create mode 100644 2024/17/index.ts diff --git a/2024/17/example.txt b/2024/17/example.txt new file mode 100644 index 0000000..36fbf8d --- /dev/null +++ b/2024/17/example.txt @@ -0,0 +1,5 @@ +Register A: 729 +Register B: 0 +Register C: 0 + +Program: 0,1,5,4,3,0 \ No newline at end of file diff --git a/2024/17/index.test.ts b/2024/17/index.test.ts new file mode 100644 index 0000000..37df3b4 --- /dev/null +++ b/2024/17/index.test.ts @@ -0,0 +1,33 @@ +import { expect, describe, test } from "bun:test"; +import { part1, part2 } from "."; +import { getInputs } from "../../utils/get-inputs"; + +const { exampleInput, puzzleInput } = await getInputs("2024/17"); + +describe("part 1", () => { + test("example", () => { + expect(part1(exampleInput)).toBe("4,6,3,5,6,3,5,2,1,0"); + }); + + test("puzzle", () => { + expect(part1(puzzleInput)).toBe("7,1,3,4,1,2,6,7,1"); + }); +}); + +const exampleInputForPart2 = ` +Register A: 2024 +Register B: 0 +Register C: 0 + +Program: 0,3,5,4,3,0 +`.trim(); + +describe("part 2", () => { + test("example", () => { + expect(part2(exampleInputForPart2)).toBe("117440"); + }); + + test("puzzle", () => { + expect(part2(puzzleInput)).toBe("109019476330651"); + }); +}); diff --git a/2024/17/index.ts b/2024/17/index.ts new file mode 100644 index 0000000..08334d8 --- /dev/null +++ b/2024/17/index.ts @@ -0,0 +1,127 @@ +import { timePart1, timePart2 } from "../../utils/time-part"; + +const parseInput = (input: string) => { + const [registers, program] = input.split("\n\n"); + + const [a, b, c] = registers + .split("\n") + .map((register) => BigInt(register.split(": ")[1])); + + return { + registers: { a, b, c }, + program: program.split(": ")[1].split(",").map(BigInt), + }; +}; + +const modulo = (a: bigint, b: bigint) => ((a % b) + b) % b; + +const getComboOperand = ( + literalOperand: bigint, + registers: ReturnType["registers"] +) => { + if (literalOperand === 4n) return registers.a; + if (literalOperand === 5n) return registers.b; + if (literalOperand === 6n) return registers.c; + + return literalOperand; +}; + +const runProgram = ({ program, registers }: ReturnType) => { + let output: bigint[] = []; + + let i = 0; + while (true) { + if (i >= program.length) { + break; + } + + const opcode = program[i]; + const operandIndex = i + 1; + + if (operandIndex >= program.length) { + break; + } + + const literalOperand = program[operandIndex]; + const comboOperand = getComboOperand(literalOperand, registers); + + // adv + if (opcode === 0n) { + registers.a = registers.a / 2n ** comboOperand; + } + + // bxl + if (opcode === 1n) { + registers.b = registers.b ^ literalOperand; + } + + // bst + if (opcode === 2n) { + registers.b = modulo(comboOperand, 8n); + } + + // jnz + if (opcode === 3n && registers.a !== 0n) { + i = Number(literalOperand); + continue; + } + + // bxc + if (opcode === 4n) { + registers.b = registers.b ^ registers.c; + } + + // out + if (opcode === 5n) { + output.push(modulo(comboOperand, 8n)); + } + + // bdv + if (opcode === 6n) { + registers.b = registers.a / 2n ** comboOperand; + } + + // cdv + if (opcode === 7n) { + registers.c = registers.a / 2n ** comboOperand; + } + + // Skip operand + i += 2; + } + + return output.join(","); +}; + +export const part1 = timePart1((input: string) => { + const { program, registers } = parseInput(input); + + return runProgram({ program, registers }); +}); + +export const part2 = timePart2((input: string) => { + const { program, registers } = parseInput(input); + + const programStr = program.join(","); + let a = 0n; + + while (true) { + const output = runProgram({ program, registers: { ...registers, a } }); + + if (output === programStr) { + break; + } + + // Once we _start_ to find a match + if (programStr.indexOf(output) + output.length === programStr.length) { + // Just increment in instances of 8-times the value of the `A` register + a = 8n * a; + + continue; + } + + a++; + } + + return a.toString(); +}); diff --git a/README.md b/README.md index 99f0e92..55df9c9 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ | Day | Part 1 | Part 2 | | :----------------------------------------: | :----: | :----: | +| [17](https://adventofcode.com/2024/day/17) | ✅ | ✅ | | [16](https://adventofcode.com/2024/day/16) | ✅ | ✅ | | [15](https://adventofcode.com/2024/day/15) | ✅ | ✅ | | [14](https://adventofcode.com/2024/day/14) | ✅ | ✅ | From 2539d844f378abce28d78515e201021135abf37a Mon Sep 17 00:00:00 2001 From: Brad Adams Date: Wed, 18 Dec 2024 16:47:02 +0100 Subject: [PATCH 7/8] 18/2024 --- 2024/18/example.txt | 25 +++++ 2024/18/index.test.ts | 24 +++++ 2024/18/index.ts | 223 ++++++++++++++++++++++++++++++++++++++++++ README.md | 1 + 4 files changed, 273 insertions(+) create mode 100644 2024/18/example.txt create mode 100644 2024/18/index.test.ts create mode 100644 2024/18/index.ts diff --git a/2024/18/example.txt b/2024/18/example.txt new file mode 100644 index 0000000..0371b23 --- /dev/null +++ b/2024/18/example.txt @@ -0,0 +1,25 @@ +5,4 +4,2 +4,5 +3,0 +2,1 +6,3 +2,4 +1,5 +0,6 +3,3 +2,6 +5,1 +1,2 +5,5 +2,5 +6,5 +1,4 +0,4 +6,4 +1,1 +6,1 +1,0 +0,5 +1,6 +2,0 \ No newline at end of file diff --git a/2024/18/index.test.ts b/2024/18/index.test.ts new file mode 100644 index 0000000..f82d959 --- /dev/null +++ b/2024/18/index.test.ts @@ -0,0 +1,24 @@ +import { expect, describe, test } from "bun:test"; +import { part1, part2 } from "."; +import { getInputs } from "../../utils/get-inputs"; + +const { exampleInput, puzzleInput } = await getInputs("2024/18"); + +describe("part 1", () => { + test("example", () => { + expect(part1(exampleInput, 6, 12)).toBe(22); + }); + + test("puzzle", () => { + expect(part1(puzzleInput, 70, 1024)).toBe(364); + }); +}); + +describe("part 2", () => { + test("example", () => { + expect(part2(exampleInput, 6, 12)).toBe("6,1"); + }); + test("puzzle", () => { + expect(part2(puzzleInput, 70, 1024)).toBe("52,28"); + }); +}); diff --git a/2024/18/index.ts b/2024/18/index.ts new file mode 100644 index 0000000..7e36b8a --- /dev/null +++ b/2024/18/index.ts @@ -0,0 +1,223 @@ +import { timePart1, timePart2 } from "../../utils/time-part"; + +type Coordinate = { x: number; y: number }; + +const parseInput = (input: string) => { + const coords = input.split("\n").map((coord) => { + const [x, y] = coord.split(",").map(Number); + + return { x, y } satisfies Coordinate; + }); + + return coords; +}; + +const createGrid = (size: number) => + [...Array(size).keys()].map(() => [...Array(size).keys()].map(() => ".")); + +type Grid = ReturnType; + +const populateGrid = (grid: Grid, obstacles: Coordinate[]) => { + const newGrid = JSON.parse(JSON.stringify(grid)) as typeof grid; + + for (let i = 0; i < obstacles.length; i++) { + const coord = obstacles[i]; + newGrid[coord.y][coord.x] = "#"; + } + + return newGrid; +}; + +const printGrid = (grid: Grid) => { + console.log(grid.map((row) => row.join("")).join("\n")); +}; + +const DIRECTIONS = { + UP: { x: 0, y: -1 }, + RIGHT: { x: 1, y: 0 }, + DOWN: { x: 0, y: 1 }, + LEFT: { x: -1, y: 0 }, +}; + +type Direction = keyof typeof DIRECTIONS; + +const move = ({ x, y }: Coordinate, dirKey: Direction) => { + const direction = DIRECTIONS[dirKey]; + + return { x: x + direction.x, y: y + direction.y }; +}; + +const coordToKey = ({ x, y }: Coordinate) => `${x},${y}`; + +class BinaryMinHeap { + private heap: Array<{ + position: Coordinate; + count: number; + visited: Coordinate[]; + }>; + + constructor() { + this.heap = []; + } + + getParentIndex(index: number) { + return Math.floor((index - 1) / 2); + } + + getLeftChildIndex(index: number) { + return 2 * index + 1; + } + + getRightChildIndex(index: number) { + return 2 * index + 2; + } + + swap(index1: number, index2: number) { + [this.heap[index1], this.heap[index2]] = [ + this.heap[index2], + this.heap[index1], + ]; + } + + // Insert a new element into the heap + insert(element: (typeof this.heap)[number]) { + this.heap.push(element); + this.bubbleUp(); + } + + bubbleUp() { + let index = this.heap.length - 1; + + while ( + index > 0 && + this.heap[index].count < this.heap[this.getParentIndex(index)].count + ) { + this.swap(index, this.getParentIndex(index)); + index = this.getParentIndex(index); + } + } + + // Remove and return the smallest element + extractMin() { + if (this.heap.length === 1) return this.heap.pop()!; + + const min = this.heap[0]; + this.heap[0] = this.heap.pop()!; + this.bubbleDown(); + return min; + } + + bubbleDown() { + let index = 0; + + while (this.getLeftChildIndex(index) < this.heap.length) { + let smallerChildIndex = this.getLeftChildIndex(index); + + if ( + this.getRightChildIndex(index) < this.heap.length && + this.heap[this.getRightChildIndex(index)].count < + this.heap[this.getLeftChildIndex(index)].count + ) { + smallerChildIndex = this.getRightChildIndex(index); + } + + if (this.heap[index].count <= this.heap[smallerChildIndex].count) { + break; + } + + this.swap(index, smallerChildIndex); + index = smallerChildIndex; + } + } + + isEmpty() { + return this.heap.length === 0; + } +} + +const getLowestStepCount = ({ + grid, + gridSize, +}: { + grid: Grid; + gridSize: number; +}) => { + const start = { x: 0, y: 0 }; + const end = { x: gridSize, y: gridSize }; + const visited = new Map(); + let lowestStepCount = Number.MAX_SAFE_INTEGER; + + const queue = new BinaryMinHeap(); + queue.insert({ position: start, count: 0, visited: [start] }); + + while (!queue.isEmpty()) { + const entry = queue.extractMin()!; + const key = coordToKey(entry.position); + + if (visited.has(key) && visited.get(key)! <= entry.count) { + continue; + } + + visited.set(key, entry.count); + + if (entry.position.x === end.x && entry.position.y === end.y) { + if (entry.count < lowestStepCount) { + lowestStepCount = entry.count; + } + + continue; + } + + for (const direction of Object.keys(DIRECTIONS) as Direction[]) { + const newPosition = move(entry.position, direction); + const nextCount = entry.count + 1; + + if ( + newPosition.x >= 0 && + newPosition.x <= gridSize && + newPosition.y >= 0 && + newPosition.y <= gridSize && + grid[newPosition.y][newPosition.x] !== "#" && + nextCount < lowestStepCount + ) { + queue.insert({ + position: newPosition, + count: entry.count + 1, + visited: [...entry.visited, newPosition], + }); + } + } + } + + return lowestStepCount; +}; + +export const part1 = timePart1( + (input: string, gridSize: number, byteCount: number) => { + const coords = parseInput(input); + const grid = populateGrid( + createGrid(gridSize + 1), + coords.slice(0, byteCount) + ); + + return getLowestStepCount({ grid, gridSize }); + } +); + +export const part2 = timePart2( + (input: string, gridSize: number, byteCount: number) => { + const coords = parseInput(input); + const baseGrid = createGrid(gridSize + 1); + + // @todo: optimize + for (let i = byteCount + 1; i < coords.length; i++) { + const grid = populateGrid(baseGrid, coords.slice(0, i + 1)); + + const lowestStepCount = getLowestStepCount({ grid, gridSize }); + + if (lowestStepCount === Number.MAX_SAFE_INTEGER) { + return coordToKey(coords[i]); + } + } + } +); diff --git a/README.md b/README.md index 55df9c9..d0e4de5 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ | Day | Part 1 | Part 2 | | :----------------------------------------: | :----: | :----: | +| [18](https://adventofcode.com/2024/day/18) | ✅ | ✅ | | [17](https://adventofcode.com/2024/day/17) | ✅ | ✅ | | [16](https://adventofcode.com/2024/day/16) | ✅ | ✅ | | [15](https://adventofcode.com/2024/day/15) | ✅ | ✅ | From 13bd615ed1a7c9c58e1204f836d0fd98866ed8af Mon Sep 17 00:00:00 2001 From: Brad Adams Date: Thu, 19 Dec 2024 11:22:03 +0100 Subject: [PATCH 8/8] 19/2024 --- 2024/19/example.txt | 10 ++++++ 2024/19/index.test.ts | 25 ++++++++++++++ 2024/19/index.ts | 78 +++++++++++++++++++++++++++++++++++++++++++ README.md | 1 + 4 files changed, 114 insertions(+) create mode 100644 2024/19/example.txt create mode 100644 2024/19/index.test.ts create mode 100644 2024/19/index.ts diff --git a/2024/19/example.txt b/2024/19/example.txt new file mode 100644 index 0000000..ad43a74 --- /dev/null +++ b/2024/19/example.txt @@ -0,0 +1,10 @@ +r, wr, b, g, bwu, rb, gb, br + +brwrr +bggr +gbbr +rrbgbr +ubwu +bwurrg +brgr +bbrgwb \ No newline at end of file diff --git a/2024/19/index.test.ts b/2024/19/index.test.ts new file mode 100644 index 0000000..5074e26 --- /dev/null +++ b/2024/19/index.test.ts @@ -0,0 +1,25 @@ +import { expect, describe, test } from "bun:test"; +import { part1, part2 } from "."; +import { getInputs } from "../../utils/get-inputs"; + +const { exampleInput, puzzleInput } = await getInputs("2024/19"); + +describe("part 1", () => { + test("example", () => { + expect(part1(exampleInput)).toBe(6); + }); + + test("puzzle", () => { + expect(part1(puzzleInput)).toBe(358); + }); +}); + +describe("part 2", () => { + test("example", () => { + expect(part2(exampleInput)).toBe(16); + }); + + test("puzzle", () => { + expect(part2(puzzleInput)).toBe(600639829400603); + }); +}); diff --git a/2024/19/index.ts b/2024/19/index.ts new file mode 100644 index 0000000..c46037e --- /dev/null +++ b/2024/19/index.ts @@ -0,0 +1,78 @@ +import { timePart1, timePart2 } from "../../utils/time-part"; + +const parseInput = (input: string) => { + const [availableTowels, designs] = input.split("\n\n"); + + return { + availableTowels: availableTowels.split(", "), + designs: designs.split("\n"), + }; +}; + +export const part1 = timePart1((input: string) => { + const { availableTowels, designs } = parseInput(input); + let possibleDesigns = 0; + + for (const design of designs) { + let queue: Array<{ remaining: string }> = []; + + for (const towel of availableTowels) { + if (design.indexOf(towel) === 0) { + queue.push({ remaining: design.substring(towel.length) }); + } + } + + while (queue.length) { + queue.sort((a, b) => a.remaining.length - b.remaining.length); + const entry = queue.shift()!; + + for (const towel of availableTowels) { + if (entry.remaining.indexOf(towel) === 0) { + if (entry.remaining.length === towel.length) { + possibleDesigns++; + queue = []; + break; + } + + queue.push({ remaining: entry.remaining.substring(towel.length) }); + } + } + } + } + + return possibleDesigns; +}); + +export const part2 = timePart2((input: string) => { + const { availableTowels, designs } = parseInput(input); + let possibleDesigns = 0; + const canBeCompleted = new Map(); + + const countTowelVariants = (remaining: string) => { + if (canBeCompleted.has(remaining)) { + return canBeCompleted.get(remaining)!; + } + + let variants = 0; + + for (const towel of availableTowels) { + if (remaining.indexOf(towel) === 0) { + if (remaining.length === towel.length) { + variants++; + continue; + } + + variants += countTowelVariants(remaining.substring(towel.length)); + } + } + + canBeCompleted.set(remaining, variants); + return variants; + }; + + for (const design of designs) { + possibleDesigns += countTowelVariants(design); + } + + return possibleDesigns; +}); diff --git a/README.md b/README.md index d0e4de5..cbbc57c 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ | Day | Part 1 | Part 2 | | :----------------------------------------: | :----: | :----: | +| [19](https://adventofcode.com/2024/day/19) | ✅ | ✅ | | [18](https://adventofcode.com/2024/day/18) | ✅ | ✅ | | [17](https://adventofcode.com/2024/day/17) | ✅ | ✅ | | [16](https://adventofcode.com/2024/day/16) | ✅ | ✅ |