diff --git a/.changeset/fine-fans-type.md b/.changeset/fine-fans-type.md new file mode 100644 index 00000000..f61ef9e0 --- /dev/null +++ b/.changeset/fine-fans-type.md @@ -0,0 +1,5 @@ +--- +'@ryanatkn/fuz_gitops': minor +--- + +rework some interfaces diff --git a/CLAUDE.md b/CLAUDE.md index 056b5646..6391b4d2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -74,11 +74,14 @@ conflicts on git commits and changeset files. ```ts // gitops.config.ts export default { - repos: ["https://github.com/owner/repo", { - repo_url: "...", - repo_dir: "...", - branch: "main", - }], + repos: [ + 'https://github.com/owner/repo', + { + repo_url: '...', + repo_dir: '...', + branch: 'main', + }, + ], }; ``` @@ -321,15 +324,15 @@ utilities) while preventing runtime dependency issues. ```ts interface Repo extends Pkg { - check_runs: GithubCheckRunsItem | null; - pull_requests: Array | null; + check_runs: GithubCheckRunsItem | null; + pull_requests: Array | null; } interface LocalRepo { - repo_name: string; - repo_dir: string; - repo_url: string; - pkg: Pkg; + repo_name: string; + repo_dir: string; + repo_url: string; + pkg: Pkg; } ``` diff --git a/README.md b/README.md index ac99c4b4..d0cee86c 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,25 @@ npm i -D @ryanatkn/fuz_gitops in either `process.env`, a project-local `.env`, or the parent directory at `../.env` (currently optional to read public repos, but it's recommended regardless, and you'll need to select options to support private repos) -- re-export the `gro gitops_sync` task by creating `$lib/gitops_sync.task.ts` with - the contents `export * from '@ryanatkn/fuz_gitops/gitops_sync.task.js';` +- re-export the gitops tasks by creating files in `$lib/`: + + ```ts + // gitops_sync.task.ts + export * from '@ryanatkn/fuz_gitops/gitops_sync.task.js'; + + // gitops_analyze.task.ts + export * from '@ryanatkn/fuz_gitops/gitops_analyze.task.js'; + + // gitops_plan.task.ts + export * from '@ryanatkn/fuz_gitops/gitops_plan.task.js'; + + // gitops_publish.task.ts + export * from '@ryanatkn/fuz_gitops/gitops_publish.task.js'; + + // gitops_validate.task.ts + export * from '@ryanatkn/fuz_gitops/gitops_validate.task.js'; + ``` + - run `gro gitops_sync` to sync repos and update the local data ## Architecture diff --git a/gitops.config.ts b/gitops.config.ts index 813b92fb..8a8be1c5 100644 --- a/gitops.config.ts +++ b/gitops.config.ts @@ -3,21 +3,42 @@ import type {CreateGitopsConfig} from './src/lib/gitops_config.js'; const config: CreateGitopsConfig = () => { return { repos: [ - // 'https://github.com/ryanatkn/zzz', + // { + // repo_url: 'https://github.com/ryanatkn/zzz', + // branch: 'upgrade-deps', + // }, 'https://github.com/ryanatkn/moss', 'https://github.com/ryanatkn/fuz', 'https://github.com/ryanatkn/gro', 'https://github.com/ryanatkn/belt', - 'https://github.com/ryanatkn/fuz_template', - 'https://github.com/ryanatkn/fuz_blog', - 'https://github.com/ryanatkn/fuz_mastodon', - 'https://github.com/ryanatkn/fuz_code', + // { + // repo_url: 'https://github.com/ryanatkn/fuz_template', + // branch: 'upgrade-deps', + // }, + // { + // repo_url: 'https://github.com/ryanatkn/fuz_blog', + // branch: 'upgrade-deps', + // }, + // { + // repo_url: 'https://github.com/ryanatkn/fuz_mastodon', + // branch: 'upgrade-deps', + // }, + // { + // repo_url: 'https://github.com/ryanatkn/fuz_code', + // branch: 'upgrade-deps', + // }, { repo_url: 'https://github.com/ryanatkn/fuz_gitops', - branch: 'migration-scripts', + branch: 'upgrade-deps', }, - 'https://github.com/ryanatkn/webdevladder.net', - // 'https://github.com/ryanatkn/ryanatkn.com', + // { + // repo_url: 'https://github.com/ryanatkn/webdevladder.net', + // branch: 'upgrade-deps', + // }, + // { + // repo_url: 'https://github.com/ryanatkn/ryanatkn.com', + // branch: 'upgrade-deps', + // }, ], }; }; diff --git a/package-lock.json b/package-lock.json index 02f30200..51309843 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,11 +10,11 @@ "license": "MIT", "devDependencies": { "@changesets/changelog-git": "^0.2.1", - "@ryanatkn/belt": "^0.39.0", + "@ryanatkn/belt": "^0.40.0", "@ryanatkn/eslint-config": "^0.9.0", - "@ryanatkn/fuz": "^0.162.0", + "@ryanatkn/fuz": "^0.165.0", "@ryanatkn/fuz_code": "^0.36.0", - "@ryanatkn/gro": "^0.177.1", + "@ryanatkn/gro": "^0.179.0", "@ryanatkn/moss": "^0.39.0", "@sveltejs/adapter-static": "^3.0.10", "@sveltejs/kit": "^2.49.0", @@ -25,12 +25,12 @@ "eslint-plugin-svelte": "^3.13.0", "prettier": "^3.6.2", "prettier-plugin-svelte": "^3.4.0", - "svelte": "^5.44.0", + "svelte": "^5.44.1", "svelte-check": "^4.3.4", "tslib": "^2.8.1", "typescript": "^5.9.3", "typescript-eslint": "^8.48.0", - "vitest": "^4.0.13" + "vitest": "^4.0.14" }, "engines": { "node": ">=22.15" @@ -39,10 +39,10 @@ "url": "https://www.ryanatkn.com/funding" }, "peerDependencies": { - "@ryanatkn/belt": ">=0.38.2", - "@ryanatkn/fuz": ">=0.161.2", - "@ryanatkn/gro": ">=0.175.0", - "@ryanatkn/moss": ">=0.38.0", + "@ryanatkn/belt": ">=0.40.0", + "@ryanatkn/fuz": ">=0.165.0", + "@ryanatkn/gro": ">=0.179.0", + "@ryanatkn/moss": ">=0.39.0", "@sveltejs/kit": "^2", "svelte": "^5", "zod": "^4.1.13" @@ -840,9 +840,9 @@ } }, "node_modules/@oxc-parser/binding-android-arm64": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-android-arm64/-/binding-android-arm64-0.98.0.tgz", - "integrity": "sha512-/4S2BATZLxH94smwxLSvQsnzYjtyh/0mekgMnK/efCaU+92VNYir4+HOs/dvspYsWUooxPvj+AkwRUsLk9IuSg==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-android-arm64/-/binding-android-arm64-0.99.0.tgz", + "integrity": "sha512-V4jhmKXgQQdRnm73F+r3ZY4pUEsijQeSraFeaCGng7abSNJGs76X6l82wHnmjLGFAeY00LWtjcELs7ZmbJ9+lA==", "cpu": [ "arm64" ], @@ -857,9 +857,9 @@ } }, "node_modules/@oxc-parser/binding-darwin-arm64": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-darwin-arm64/-/binding-darwin-arm64-0.98.0.tgz", - "integrity": "sha512-joNn+2n+TrDJ79GlwR32LK1gctKIxvSJm93teROFiYEde0Dhq9IZpnxiX9ctw4R2zwmSTf1yistTXIR84UGGDQ==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-darwin-arm64/-/binding-darwin-arm64-0.99.0.tgz", + "integrity": "sha512-Rp41nf9zD5FyLZciS9l1GfK8PhYqrD5kEGxyTOA2esTLeAy37rZxetG2E3xteEolAkeb2WDkVrlxPtibeAncMg==", "cpu": [ "arm64" ], @@ -874,9 +874,9 @@ } }, "node_modules/@oxc-parser/binding-darwin-x64": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-darwin-x64/-/binding-darwin-x64-0.98.0.tgz", - "integrity": "sha512-FUVDRGkMpx41bJI+seN57vmkwOp2uSATrU7e3mEjyP6lWTCvJWmD20/fxaXRY/Kh0xHvy1KBn4jPyKoK1ya/cg==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-darwin-x64/-/binding-darwin-x64-0.99.0.tgz", + "integrity": "sha512-WVonp40fPPxo5Gs0POTI57iEFv485TvNKOHMwZRhigwZRhZY2accEAkYIhei9eswF4HN5B44Wybkz7Gd1Qr/5Q==", "cpu": [ "x64" ], @@ -891,9 +891,9 @@ } }, "node_modules/@oxc-parser/binding-freebsd-x64": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-freebsd-x64/-/binding-freebsd-x64-0.98.0.tgz", - "integrity": "sha512-2ysH/IYALz2mDCnqu0xmJ/s0u2f+LZtDOaTkLhwTSQrLOqK4Pr3n4n564Jd1pxNabr07pAMUvBjQNzvWrKfmOg==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-freebsd-x64/-/binding-freebsd-x64-0.99.0.tgz", + "integrity": "sha512-H30bjOOttPmG54gAqu6+HzbLEzuNOYO2jZYrIq4At+NtLJwvNhXz28Hf5iEAFZIH/4hMpLkM4VN7uc+5UlNW3Q==", "cpu": [ "x64" ], @@ -908,9 +908,9 @@ } }, "node_modules/@oxc-parser/binding-linux-arm-gnueabihf": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.98.0.tgz", - "integrity": "sha512-7wwkjeCGzGP9gzmJcHyUDT67MP5szMvjlJs3VvWzGaPiQPaMnWzRpuLkycPlslT5/ch8j+rZm2vByPIKz6cIuw==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.99.0.tgz", + "integrity": "sha512-0Z/Th0SYqzSRDPs6tk5lQdW0i73UCupnim3dgq2oW0//UdLonV/5wIZCArfKGC7w9y4h8TxgXpgtIyD1kKzzlQ==", "cpu": [ "arm" ], @@ -925,9 +925,9 @@ } }, "node_modules/@oxc-parser/binding-linux-arm-musleabihf": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.98.0.tgz", - "integrity": "sha512-p93J3cNgVCiCcshXiaq+A+bws8AH0h5LmoEKtt1rJHkZH3uY3dEuuh/3T7arMd+mStVsBM8h+PQ2V/0MyI0rUw==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.99.0.tgz", + "integrity": "sha512-xo0wqNd5bpbzQVNpAIFbHk1xa+SaS/FGBABCd942SRTnrpxl6GeDj/s1BFaGcTl8MlwlKVMwOcyKrw/2Kdfquw==", "cpu": [ "arm" ], @@ -942,9 +942,9 @@ } }, "node_modules/@oxc-parser/binding-linux-arm64-gnu": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.98.0.tgz", - "integrity": "sha512-wiIHSaNbAj7F8Ac5BERGJq2dSy+abNrZILY7s8PNK2VdwWXhfBSeRV+wUt3tC9zdsrvmRaLAUiM9IaRHEwKWsw==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.99.0.tgz", + "integrity": "sha512-u26I6LKoLTPTd4Fcpr0aoAtjnGf5/ulMllo+QUiBhupgbVCAlaj4RyXH/mvcjcsl2bVBv9E/gYJZz2JjxQWXBA==", "cpu": [ "arm64" ], @@ -959,9 +959,9 @@ } }, "node_modules/@oxc-parser/binding-linux-arm64-musl": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.98.0.tgz", - "integrity": "sha512-Z/PBmbYZ+uBxqiKr3FGvg45rUr52FZQed26gJZZWFLt7a7l3AbfAL9bxUG5a+HiDC9+sDZrezJbjSRmTlPPg7Q==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.99.0.tgz", + "integrity": "sha512-qhftDo2D37SqCEl3ZTa367NqWSZNb1Ddp34CTmShLKFrnKdNiUn55RdokLnHtf1AL5ssaQlYDwBECX7XiBWOhw==", "cpu": [ "arm64" ], @@ -976,9 +976,9 @@ } }, "node_modules/@oxc-parser/binding-linux-riscv64-gnu": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.98.0.tgz", - "integrity": "sha512-H4i91pTgQlCWmbVTye2YH0mgSw3YYf5vyJtCzk18IHtSRaYJ6QokyIkXAMStQv5iMBg6CibEKTv3/1vlemW5/g==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.99.0.tgz", + "integrity": "sha512-zxn/xkf519f12FKkpL5XwJipsylfSSnm36h6c1zBDTz4fbIDMGyIhHfWfwM7uUmHo9Aqw1pLxFpY39Etv398+Q==", "cpu": [ "riscv64" ], @@ -993,9 +993,9 @@ } }, "node_modules/@oxc-parser/binding-linux-s390x-gnu": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.98.0.tgz", - "integrity": "sha512-yNS5u0/K4Zyi7f43mvqMogXe9GedllLWGEwW6btp/sQce7GnGbMV6oDRiDs0C6UlnJMbctEU6qM4LsNkEobCSg==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.99.0.tgz", + "integrity": "sha512-Y1eSDKDS5E4IVC7Oxw+NbYAKRmJPMJTIjW+9xOWwteDHkFqpocKe0USxog+Q1uhzalD9M0p9eXWEWdGQCMDBMQ==", "cpu": [ "s390x" ], @@ -1010,9 +1010,9 @@ } }, "node_modules/@oxc-parser/binding-linux-x64-gnu": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.98.0.tgz", - "integrity": "sha512-gmljgOLJvPljYk4pDxglK9Zg/dYrdnwIINYnNyMmEMl9/5Xn7MoJIR9QN52Vh+Fyq09ftDH89R3R2ef57MRKKw==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.99.0.tgz", + "integrity": "sha512-YVJMfk5cFWB8i2/nIrbk6n15bFkMHqWnMIWkVx7r2KwpTxHyFMfu2IpeVKo1ITDSmt5nBrGdLHD36QRlu2nDLg==", "cpu": [ "x64" ], @@ -1027,9 +1027,9 @@ } }, "node_modules/@oxc-parser/binding-linux-x64-musl": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-x64-musl/-/binding-linux-x64-musl-0.98.0.tgz", - "integrity": "sha512-zcD9b22Mb1/JsU3nCMGboiFZPFLtqNzViaQoPlN6ceDNejt4SsRDlChmLs/u6PluYn1V1SrvAThx1Skq2esD/A==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-x64-musl/-/binding-linux-x64-musl-0.99.0.tgz", + "integrity": "sha512-2+SDPrie5f90A1b9EirtVggOgsqtsYU5raZwkDYKyS1uvJzjqHCDhG/f4TwQxHmIc5YkczdQfwvN91lwmjsKYQ==", "cpu": [ "x64" ], @@ -1044,9 +1044,9 @@ } }, "node_modules/@oxc-parser/binding-wasm32-wasi": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-wasm32-wasi/-/binding-wasm32-wasi-0.98.0.tgz", - "integrity": "sha512-vp2OlfPGYMudNlDLL5+UJPPRn/RUI2VMFhKBnpC+nuAOz69IOf70ajwDATw+9jc8vVftuDzn06u+XTWJZGkGvQ==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-wasm32-wasi/-/binding-wasm32-wasi-0.99.0.tgz", + "integrity": "sha512-DKA4j0QerUWSMADziLM5sAyM7V53Fj95CV9SjP77bPfEfT7MnvFKnneaRMqPK1cpzjAGiQF52OBUIKyk0dwOQA==", "cpu": [ "wasm32" ], @@ -1061,9 +1061,9 @@ } }, "node_modules/@oxc-parser/binding-win32-arm64-msvc": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.98.0.tgz", - "integrity": "sha512-2SJI5E46/lBknEsTtxzFvlyUWAWBs6hSYbj46uIBfNpnLbF/lqo3ekuk1w5evEJjZdgYk7ayDSaRE1bm+7XUaw==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.99.0.tgz", + "integrity": "sha512-EaB3AvsxqdNUhh9FOoAxRZ2L4PCRwDlDb//QXItwyOJrX7XS+uGK9B1KEUV4FZ/7rDhHsWieLt5e07wl2Ti5AQ==", "cpu": [ "arm64" ], @@ -1078,9 +1078,9 @@ } }, "node_modules/@oxc-parser/binding-win32-x64-msvc": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.98.0.tgz", - "integrity": "sha512-o5PfFt85u0nx2VLiKr2e+8j7kN4WaQR5sUTMZv2X0SOXfsLmmvr7DldQTeV/uWWLi0kFw0qpekKLBheHK1V2tA==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.99.0.tgz", + "integrity": "sha512-sJN1Q8h7ggFOyDn0zsHaXbP/MklAVUvhrbq0LA46Qum686P3SZQHjbATqJn9yaVEvaSKXCshgl0vQ1gWkGgpcQ==", "cpu": [ "x64" ], @@ -1095,9 +1095,9 @@ } }, "node_modules/@oxc-project/types": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.98.0.tgz", - "integrity": "sha512-Vzmd6FsqVuz5HQVcRC/hrx7Ujo3WEVeQP7C2UNP5uy1hUY4SQvMB+93jxkI1KRHz9a/6cni3glPOtvteN+zpsw==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.99.0.tgz", + "integrity": "sha512-LLDEhXB7g1m5J+woRSgfKsFPS3LhR9xRhTeIoEBm5WrkwMxn6eZ0Ld0c0K5eHB57ChZX6I3uSmmLjZ8pcjlRcw==", "dev": true, "license": "MIT", "funding": { @@ -1420,9 +1420,9 @@ ] }, "node_modules/@ryanatkn/belt": { - "version": "0.39.0", - "resolved": "https://registry.npmjs.org/@ryanatkn/belt/-/belt-0.39.0.tgz", - "integrity": "sha512-R3D7cdS0hYUMtpYxaLSWQkw3UXaT+vbuPI8YzYBb8WbRLxg6IYrTHwdKWLWMRol1wmOgZt3ZxCP2DZirjZgYAQ==", + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@ryanatkn/belt/-/belt-0.40.0.tgz", + "integrity": "sha512-mjQGGI4z7fSYFSdEUhDcJrS71NsS36EDSKVfrLbl4z8wHMlEbWMtKqsZA57SSkbyXDi7L2d3k/G/UDhjav3X5Q==", "dev": true, "license": "MIT", "engines": { @@ -1470,9 +1470,9 @@ } }, "node_modules/@ryanatkn/fuz": { - "version": "0.162.0", - "resolved": "https://registry.npmjs.org/@ryanatkn/fuz/-/fuz-0.162.0.tgz", - "integrity": "sha512-BlN9Qz/e2tMnF5iA6kG6oSA3BRIZwcCpjYUWJc7OAox1vNm52ZXD1xObfYkGcF+opvZicmQggSVfTmVak6fECQ==", + "version": "0.165.0", + "resolved": "https://registry.npmjs.org/@ryanatkn/fuz/-/fuz-0.165.0.tgz", + "integrity": "sha512-Q9l2nMW7z0sBomCFTqePKZ4lsPG2E6xklHTnpkJUGZ2+ZFvSbHcQ+g+fVW5US9ELSU9A7D+SrK+1Qay6fORhfQ==", "dev": true, "license": "MIT", "engines": { @@ -1530,22 +1530,22 @@ } }, "node_modules/@ryanatkn/gro": { - "version": "0.177.1", - "resolved": "https://registry.npmjs.org/@ryanatkn/gro/-/gro-0.177.1.tgz", - "integrity": "sha512-UhpML7KB9b+G89XUN5jlP+SaLmSLO4XdNLoInB8hoEcWh6tZN8T0SFsbwRm1950k5HF5Fmkw1OkbIScgR4BONQ==", + "version": "0.179.0", + "resolved": "https://registry.npmjs.org/@ryanatkn/gro/-/gro-0.179.0.tgz", + "integrity": "sha512-V4WiJEmdetM0I47z7kbSdR3nKZiPF+WvP3+bX7q/KTr4/tmtrRjPRIjNJuQK+1qyneuO+L2Id7dN4BEI7TYT4A==", "dev": true, "license": "MIT", "dependencies": { - "chokidar": "^4.0.3", + "chokidar": "^5.0.0", "dotenv": "^17.2.3", "esm-env": "^1.2.2", "mri": "^1.2.0", - "oxc-parser": "^0.98.0", + "oxc-parser": "^0.99.0", "prettier": "^3.6.2", "prettier-plugin-svelte": "^3.4.0", "ts-blank-space": "^0.6.2", "tslib": "^2.8.1", - "zod": "^4.1.12" + "zod": "^4.1.13" }, "bin": { "gro": "dist/gro.js" @@ -1560,7 +1560,7 @@ "vitest": "^3 || ^4" }, "peerDependencies": { - "@ryanatkn/belt": ">=0.39.0", + "@ryanatkn/belt": ">=0.40.0", "@sveltejs/kit": "^2", "esbuild": "^0.27.0", "svelte": "^5", @@ -1678,6 +1678,36 @@ "svelte": "^3.44.0 || ^4.0.0 || ^5.0.0-next.1" } }, + "node_modules/@sveltejs/package/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@sveltejs/package/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@sveltejs/vite-plugin-svelte": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-6.2.1.tgz", @@ -2035,16 +2065,16 @@ } }, "node_modules/@vitest/expect": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.13.tgz", - "integrity": "sha512-zYtcnNIBm6yS7Gpr7nFTmq8ncowlMdOJkWLqYvhr/zweY6tFbDkDi8BPPOeHxEtK1rSI69H7Fd4+1sqvEGli6w==", + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.14.tgz", + "integrity": "sha512-RHk63V3zvRiYOWAV0rGEBRO820ce17hz7cI2kDmEdfQsBjT2luEKB5tCOc91u1oSQoUOZkSv3ZyzkdkSLD7lKw==", "dev": true, "license": "MIT", "dependencies": { "@standard-schema/spec": "^1.0.0", "@types/chai": "^5.2.2", - "@vitest/spy": "4.0.13", - "@vitest/utils": "4.0.13", + "@vitest/spy": "4.0.14", + "@vitest/utils": "4.0.14", "chai": "^6.2.1", "tinyrainbow": "^3.0.3" }, @@ -2053,13 +2083,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.13.tgz", - "integrity": "sha512-eNCwzrI5djoauklwP1fuslHBjrbR8rqIVbvNlAnkq1OTa6XT+lX68mrtPirNM9TnR69XUPt4puBCx2Wexseylg==", + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.14.tgz", + "integrity": "sha512-RzS5NujlCzeRPF1MK7MXLiEFpkIXeMdQ+rN3Kk3tDI9j0mtbr7Nmuq67tpkOJQpgyClbOltCXMjLZicJHsH5Cg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "4.0.13", + "@vitest/spy": "4.0.14", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, @@ -2080,9 +2110,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.13.tgz", - "integrity": "sha512-ooqfze8URWbI2ozOeLDMh8YZxWDpGXoeY3VOgcDnsUxN0jPyPWSUvjPQWqDGCBks+opWlN1E4oP1UYl3C/2EQA==", + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.14.tgz", + "integrity": "sha512-SOYPgujB6TITcJxgd3wmsLl+wZv+fy3av2PpiPpsWPZ6J1ySUYfScfpIt2Yv56ShJXR2MOA6q2KjKHN4EpdyRQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2093,13 +2123,13 @@ } }, "node_modules/@vitest/runner": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.13.tgz", - "integrity": "sha512-9IKlAru58wcVaWy7hz6qWPb2QzJTKt+IOVKjAx5vb5rzEFPTL6H4/R9BMvjZ2ppkxKgTrFONEJFtzvnyEpiT+A==", + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.14.tgz", + "integrity": "sha512-BsAIk3FAqxICqREbX8SetIteT8PiaUL/tgJjmhxJhCsigmzzH8xeadtp7LRnTpCVzvf0ib9BgAfKJHuhNllKLw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "4.0.13", + "@vitest/utils": "4.0.14", "pathe": "^2.0.3" }, "funding": { @@ -2107,13 +2137,13 @@ } }, "node_modules/@vitest/snapshot": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.13.tgz", - "integrity": "sha512-hb7Usvyika1huG6G6l191qu1urNPsq1iFc2hmdzQY3F5/rTgqQnwwplyf8zoYHkpt7H6rw5UfIw6i/3qf9oSxQ==", + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.14.tgz", + "integrity": "sha512-aQVBfT1PMzDSA16Y3Fp45a0q8nKexx6N5Amw3MX55BeTeZpoC08fGqEZqVmPcqN0ueZsuUQ9rriPMhZ3Mu19Ag==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.0.13", + "@vitest/pretty-format": "4.0.14", "magic-string": "^0.30.21", "pathe": "^2.0.3" }, @@ -2122,9 +2152,9 @@ } }, "node_modules/@vitest/spy": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.13.tgz", - "integrity": "sha512-hSu+m4se0lDV5yVIcNWqjuncrmBgwaXa2utFLIrBkQCQkt+pSwyZTPFQAZiiF/63j8jYa8uAeUZ3RSfcdWaYWw==", + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.14.tgz", + "integrity": "sha512-JmAZT1UtZooO0tpY3GRyiC/8W7dCs05UOq9rfsUUgEZEdq+DuHLmWhPsrTt0TiW7WYeL/hXpaE07AZ2RCk44hg==", "dev": true, "license": "MIT", "funding": { @@ -2132,13 +2162,13 @@ } }, "node_modules/@vitest/utils": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.13.tgz", - "integrity": "sha512-ydozWyQ4LZuu8rLp47xFUWis5VOKMdHjXCWhs1LuJsTNKww+pTHQNK4e0assIB9K80TxFyskENL6vCu3j34EYA==", + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.14.tgz", + "integrity": "sha512-hLqXZKAWNg8pI+SQXyXxWCTOpA3MvsqcbVeNgSi8x/CSN2wi26dSzn1wrOhmCmFjEvN9p8/kLFRHa6PI8jHazw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.0.13", + "@vitest/pretty-format": "4.0.14", "tinyrainbow": "^3.0.3" }, "funding": { @@ -2294,16 +2324,16 @@ } }, "node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", "dev": true, "license": "MIT", "dependencies": { - "readdirp": "^4.0.1" + "readdirp": "^5.0.0" }, "engines": { - "node": ">= 14.16.0" + "node": ">= 20.19.0" }, "funding": { "url": "https://paulmillr.com/funding/" @@ -2672,9 +2702,9 @@ } }, "node_modules/esrap": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/esrap/-/esrap-2.1.3.tgz", - "integrity": "sha512-T/Dhhv/QH+yYmiaLz9SA3PW+YyenlnRKDNdtlYJrSOBmNsH4nvPux+mTwx7p+wAedlJrGoZtXNI0a0MjQ2QkVg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/esrap/-/esrap-2.2.0.tgz", + "integrity": "sha512-WBmtxe7R9C5mvL4n2le8nMUe4mD5V9oiK2vJpQ9I3y20ENPUomPcphBXE8D1x/Bm84oN1V+lOfgXxtqmxTp3Xg==", "dev": true, "license": "MIT", "dependencies": { @@ -3150,6 +3180,17 @@ "dev": true, "license": "MIT" }, + "node_modules/obug": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.1.tgz", + "integrity": "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT" + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -3169,13 +3210,13 @@ } }, "node_modules/oxc-parser": { - "version": "0.98.0", - "resolved": "https://registry.npmjs.org/oxc-parser/-/oxc-parser-0.98.0.tgz", - "integrity": "sha512-gt99VUKRlZ6ZB3VBgqMJD858E8V5UpBQWX7cVI9XaYzuS8e3nN63uRlwPfkFoE4JN+MGxJ/WSRhBUhxUv23A/Q==", + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/oxc-parser/-/oxc-parser-0.99.0.tgz", + "integrity": "sha512-MpS1lbd2vR0NZn1v0drpgu7RUFu3x9Rd0kxExObZc2+F+DIrV0BOMval/RO3BYGwssIOerII6iS8EbbpCCZQpQ==", "dev": true, "license": "MIT", "dependencies": { - "@oxc-project/types": "^0.98.0" + "@oxc-project/types": "^0.99.0" }, "engines": { "node": "^20.19.0 || >=22.12.0" @@ -3184,21 +3225,21 @@ "url": "https://github.com/sponsors/Boshen" }, "optionalDependencies": { - "@oxc-parser/binding-android-arm64": "0.98.0", - "@oxc-parser/binding-darwin-arm64": "0.98.0", - "@oxc-parser/binding-darwin-x64": "0.98.0", - "@oxc-parser/binding-freebsd-x64": "0.98.0", - "@oxc-parser/binding-linux-arm-gnueabihf": "0.98.0", - "@oxc-parser/binding-linux-arm-musleabihf": "0.98.0", - "@oxc-parser/binding-linux-arm64-gnu": "0.98.0", - "@oxc-parser/binding-linux-arm64-musl": "0.98.0", - "@oxc-parser/binding-linux-riscv64-gnu": "0.98.0", - "@oxc-parser/binding-linux-s390x-gnu": "0.98.0", - "@oxc-parser/binding-linux-x64-gnu": "0.98.0", - "@oxc-parser/binding-linux-x64-musl": "0.98.0", - "@oxc-parser/binding-wasm32-wasi": "0.98.0", - "@oxc-parser/binding-win32-arm64-msvc": "0.98.0", - "@oxc-parser/binding-win32-x64-msvc": "0.98.0" + "@oxc-parser/binding-android-arm64": "0.99.0", + "@oxc-parser/binding-darwin-arm64": "0.99.0", + "@oxc-parser/binding-darwin-x64": "0.99.0", + "@oxc-parser/binding-freebsd-x64": "0.99.0", + "@oxc-parser/binding-linux-arm-gnueabihf": "0.99.0", + "@oxc-parser/binding-linux-arm-musleabihf": "0.99.0", + "@oxc-parser/binding-linux-arm64-gnu": "0.99.0", + "@oxc-parser/binding-linux-arm64-musl": "0.99.0", + "@oxc-parser/binding-linux-riscv64-gnu": "0.99.0", + "@oxc-parser/binding-linux-s390x-gnu": "0.99.0", + "@oxc-parser/binding-linux-x64-gnu": "0.99.0", + "@oxc-parser/binding-linux-x64-musl": "0.99.0", + "@oxc-parser/binding-wasm32-wasi": "0.99.0", + "@oxc-parser/binding-win32-arm64-msvc": "0.99.0", + "@oxc-parser/binding-win32-x64-msvc": "0.99.0" } }, "node_modules/p-limit": { @@ -3478,13 +3519,13 @@ } }, "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz", + "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==", "dev": true, "license": "MIT", "engines": { - "node": ">= 14.18.0" + "node": ">= 20.19.0" }, "funding": { "type": "individual", @@ -3679,9 +3720,9 @@ } }, "node_modules/svelte": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.44.0.tgz", - "integrity": "sha512-R7387No2zEGw4CtYtI2rgsui6BqjFARzoZFGLiLN5OPla0Pq4Ra2WwcP/zBomP3MYalhSNvF1fzDMuU0P0zPJw==", + "version": "5.44.1", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.44.1.tgz", + "integrity": "sha512-8VnkRXpa6tJ9IqiwKvzZBNnBy9tZg0N63duDz0EJqiozsmBEAZfHiZzWWWAneIN+cAWkK1JkafW1xIbC4YrdBA==", "dev": true, "license": "MIT", "dependencies": { @@ -3729,6 +3770,36 @@ "typescript": ">=5.0.0" } }, + "node_modules/svelte-check/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/svelte-check/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/svelte-eslint-parser": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-1.4.0.tgz", @@ -4513,23 +4584,23 @@ } }, "node_modules/vitest": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.13.tgz", - "integrity": "sha512-QSD4I0fN6uZQfftryIXuqvqgBxTvJ3ZNkF6RWECd82YGAYAfhcppBLFXzXJHQAAhVFyYEuFTrq6h0hQqjB7jIQ==", + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.14.tgz", + "integrity": "sha512-d9B2J9Cm9dN9+6nxMnnNJKJCtcyKfnHj15N6YNJfaFHRLua/d3sRKU9RuKmO9mB0XdFtUizlxfz/VPbd3OxGhw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "4.0.13", - "@vitest/mocker": "4.0.13", - "@vitest/pretty-format": "4.0.13", - "@vitest/runner": "4.0.13", - "@vitest/snapshot": "4.0.13", - "@vitest/spy": "4.0.13", - "@vitest/utils": "4.0.13", - "debug": "^4.4.3", + "@vitest/expect": "4.0.14", + "@vitest/mocker": "4.0.14", + "@vitest/pretty-format": "4.0.14", + "@vitest/runner": "4.0.14", + "@vitest/snapshot": "4.0.14", + "@vitest/spy": "4.0.14", + "@vitest/utils": "4.0.14", "es-module-lexer": "^1.7.0", "expect-type": "^1.2.2", "magic-string": "^0.30.21", + "obug": "^2.1.1", "pathe": "^2.0.3", "picomatch": "^4.0.3", "std-env": "^3.10.0", @@ -4552,12 +4623,11 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", - "@types/debug": "^4.1.12", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.0.13", - "@vitest/browser-preview": "4.0.13", - "@vitest/browser-webdriverio": "4.0.13", - "@vitest/ui": "4.0.13", + "@vitest/browser-playwright": "4.0.14", + "@vitest/browser-preview": "4.0.14", + "@vitest/browser-webdriverio": "4.0.14", + "@vitest/ui": "4.0.14", "happy-dom": "*", "jsdom": "*" }, @@ -4568,9 +4638,6 @@ "@opentelemetry/api": { "optional": true }, - "@types/debug": { - "optional": true - }, "@types/node": { "optional": true }, diff --git a/package.json b/package.json index 35b78628..a6774a0c 100644 --- a/package.json +++ b/package.json @@ -30,21 +30,21 @@ "node": ">=22.15" }, "peerDependencies": { - "@ryanatkn/belt": ">=0.38.2", - "@ryanatkn/fuz": ">=0.161.2", - "@ryanatkn/gro": ">=0.175.0", - "@ryanatkn/moss": ">=0.38.0", + "@ryanatkn/belt": ">=0.40.0", + "@ryanatkn/fuz": ">=0.165.0", + "@ryanatkn/gro": ">=0.179.0", + "@ryanatkn/moss": ">=0.39.0", "@sveltejs/kit": "^2", "svelte": "^5", "zod": "^4.1.13" }, "devDependencies": { "@changesets/changelog-git": "^0.2.1", - "@ryanatkn/belt": "^0.39.0", + "@ryanatkn/belt": "^0.40.0", "@ryanatkn/eslint-config": "^0.9.0", - "@ryanatkn/fuz": "^0.162.0", + "@ryanatkn/fuz": "^0.165.0", "@ryanatkn/fuz_code": "^0.36.0", - "@ryanatkn/gro": "^0.177.1", + "@ryanatkn/gro": "^0.179.0", "@ryanatkn/moss": "^0.39.0", "@sveltejs/adapter-static": "^3.0.10", "@sveltejs/kit": "^2.49.0", @@ -55,12 +55,12 @@ "eslint-plugin-svelte": "^3.13.0", "prettier": "^3.6.2", "prettier-plugin-svelte": "^3.4.0", - "svelte": "^5.44.0", + "svelte": "^5.44.1", "svelte-check": "^4.3.4", "tslib": "^2.8.1", "typescript": "^5.9.3", "typescript-eslint": "^8.48.0", - "vitest": "^4.0.13" + "vitest": "^4.0.14" }, "prettier": { "plugins": [ diff --git a/src/fixtures/repos/basic_publishing/repo_a b/src/fixtures/repos/basic_publishing/repo_a deleted file mode 160000 index 8f164320..00000000 --- a/src/fixtures/repos/basic_publishing/repo_a +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8f1643204ce13d3a1d48b1a9e3662c856d710fe6 diff --git a/src/fixtures/repos/basic_publishing/repo_b b/src/fixtures/repos/basic_publishing/repo_b deleted file mode 160000 index 9d73044d..00000000 --- a/src/fixtures/repos/basic_publishing/repo_b +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9d73044d8b3f24f313d0199641a66a4f2aae1050 diff --git a/src/fixtures/repos/basic_publishing/repo_c b/src/fixtures/repos/basic_publishing/repo_c deleted file mode 160000 index c9c7475d..00000000 --- a/src/fixtures/repos/basic_publishing/repo_c +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c9c7475d56644735791285261ba1cb71d024322e diff --git a/src/fixtures/repos/basic_publishing/repo_d b/src/fixtures/repos/basic_publishing/repo_d deleted file mode 160000 index e3b9e051..00000000 --- a/src/fixtures/repos/basic_publishing/repo_d +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e3b9e0512147226ac5a09b50280b8883cbc001ee diff --git a/src/fixtures/repos/basic_publishing/repo_e b/src/fixtures/repos/basic_publishing/repo_e deleted file mode 160000 index 41bced63..00000000 --- a/src/fixtures/repos/basic_publishing/repo_e +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 41bced6382abeaa2f2b233dc6cb2ccc080c6c724 diff --git a/src/fixtures/repos/circular_dev_deps/consumer b/src/fixtures/repos/circular_dev_deps/consumer deleted file mode 160000 index fa482d78..00000000 --- a/src/fixtures/repos/circular_dev_deps/consumer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fa482d78948938913e16b1fea12b482800f6564f diff --git a/src/fixtures/repos/circular_dev_deps/tool_a b/src/fixtures/repos/circular_dev_deps/tool_a deleted file mode 160000 index 8dff8a26..00000000 --- a/src/fixtures/repos/circular_dev_deps/tool_a +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8dff8a2635423426e7c0fb492538a7cb5b1be288 diff --git a/src/fixtures/repos/circular_dev_deps/tool_b b/src/fixtures/repos/circular_dev_deps/tool_b deleted file mode 160000 index 3bafcb88..00000000 --- a/src/fixtures/repos/circular_dev_deps/tool_b +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3bafcb881f0dabbd58b5d5b79beeed8c47117d41 diff --git a/src/fixtures/repos/circular_prod_deps_error/pkg_a b/src/fixtures/repos/circular_prod_deps_error/pkg_a deleted file mode 160000 index 62197880..00000000 --- a/src/fixtures/repos/circular_prod_deps_error/pkg_a +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 62197880d5c273c2fbb3ddeef8fcc206f0069e24 diff --git a/src/fixtures/repos/circular_prod_deps_error/pkg_b b/src/fixtures/repos/circular_prod_deps_error/pkg_b deleted file mode 160000 index 6f65a80d..00000000 --- a/src/fixtures/repos/circular_prod_deps_error/pkg_b +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6f65a80d9d10dccd37b6aa6ef049ddcb0d05406b diff --git a/src/fixtures/repos/deep_cascade/branch b/src/fixtures/repos/deep_cascade/branch deleted file mode 160000 index 6d94c2e2..00000000 --- a/src/fixtures/repos/deep_cascade/branch +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6d94c2e2d967e6cf3b7ea0c3bafbd7fb7975b499 diff --git a/src/fixtures/repos/deep_cascade/leaf b/src/fixtures/repos/deep_cascade/leaf deleted file mode 160000 index 84fb63c6..00000000 --- a/src/fixtures/repos/deep_cascade/leaf +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 84fb63c663bc205a95afce8b5481bc3c058a0f86 diff --git a/src/fixtures/repos/deep_cascade/root b/src/fixtures/repos/deep_cascade/root deleted file mode 160000 index d9f45304..00000000 --- a/src/fixtures/repos/deep_cascade/root +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d9f45304b043fae1597a359a272020983c829459 diff --git a/src/fixtures/repos/deep_cascade/trunk b/src/fixtures/repos/deep_cascade/trunk deleted file mode 160000 index 132c128d..00000000 --- a/src/fixtures/repos/deep_cascade/trunk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 132c128d958d08a98a8780859e9bb9f32686b15a diff --git a/src/fixtures/repos/isolated_packages/util_a b/src/fixtures/repos/isolated_packages/util_a deleted file mode 160000 index 42f3cde0..00000000 --- a/src/fixtures/repos/isolated_packages/util_a +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 42f3cde061bf0b70e37e4b70d2c81596ea93f3d5 diff --git a/src/fixtures/repos/isolated_packages/util_b b/src/fixtures/repos/isolated_packages/util_b deleted file mode 160000 index 77079e39..00000000 --- a/src/fixtures/repos/isolated_packages/util_b +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 77079e392dc7ebaf7398ec1dccc98cfaecf56a01 diff --git a/src/fixtures/repos/isolated_packages/util_c b/src/fixtures/repos/isolated_packages/util_c deleted file mode 160000 index 4bf5333c..00000000 --- a/src/fixtures/repos/isolated_packages/util_c +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4bf5333c1000d62ebdce9292ccaaea02ebceffb2 diff --git a/src/fixtures/repos/isolated_packages/util_d b/src/fixtures/repos/isolated_packages/util_d deleted file mode 160000 index 0c3bb145..00000000 --- a/src/fixtures/repos/isolated_packages/util_d +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0c3bb1453cee60b2d53551936e9eafc5ef3bba00 diff --git a/src/fixtures/repos/major_bumps/app_using_stable b/src/fixtures/repos/major_bumps/app_using_stable deleted file mode 160000 index 92e97790..00000000 --- a/src/fixtures/repos/major_bumps/app_using_stable +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 92e977901aa284f3d9400513a2e0b1c6e29d3481 diff --git a/src/fixtures/repos/major_bumps/app_using_unstable b/src/fixtures/repos/major_bumps/app_using_unstable deleted file mode 160000 index 4fdf11b1..00000000 --- a/src/fixtures/repos/major_bumps/app_using_unstable +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4fdf11b15b1291cbcc9759ec49db7cd35127e83c diff --git a/src/fixtures/repos/major_bumps/complex_app b/src/fixtures/repos/major_bumps/complex_app deleted file mode 160000 index 9218e217..00000000 --- a/src/fixtures/repos/major_bumps/complex_app +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9218e217af01391ae8878354fdc8be77cf65efbb diff --git a/src/fixtures/repos/major_bumps/stable b/src/fixtures/repos/major_bumps/stable deleted file mode 160000 index e2e6eff9..00000000 --- a/src/fixtures/repos/major_bumps/stable +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e2e6eff910f22c734df3cd0f6b48e2a9b70e61ff diff --git a/src/fixtures/repos/major_bumps/unstable b/src/fixtures/repos/major_bumps/unstable deleted file mode 160000 index a5380412..00000000 --- a/src/fixtures/repos/major_bumps/unstable +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a5380412e32e1f644c5e19cb5bb10606edf80b3b diff --git a/src/fixtures/repos/multiple_dep_types/adapter b/src/fixtures/repos/multiple_dep_types/adapter deleted file mode 160000 index 533d2932..00000000 --- a/src/fixtures/repos/multiple_dep_types/adapter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 533d2932f5a603b145f260635ad52e54bb024e36 diff --git a/src/fixtures/repos/multiple_dep_types/core b/src/fixtures/repos/multiple_dep_types/core deleted file mode 160000 index c836238e..00000000 --- a/src/fixtures/repos/multiple_dep_types/core +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c836238e929c06a06f885d04acb82bb3d82b6de1 diff --git a/src/fixtures/repos/multiple_dep_types/plugin b/src/fixtures/repos/multiple_dep_types/plugin deleted file mode 160000 index 408f2df3..00000000 --- a/src/fixtures/repos/multiple_dep_types/plugin +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 408f2df3548087d2d8a466d0c27bf13f44468436 diff --git a/src/fixtures/repos/peer_deps_only/adapter b/src/fixtures/repos/peer_deps_only/adapter deleted file mode 160000 index 5f779b83..00000000 --- a/src/fixtures/repos/peer_deps_only/adapter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5f779b8308560694e714b18a4f5a5a1fb4477264 diff --git a/src/fixtures/repos/peer_deps_only/core b/src/fixtures/repos/peer_deps_only/core deleted file mode 160000 index f74d7c1c..00000000 --- a/src/fixtures/repos/peer_deps_only/core +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f74d7c1c074a266dab4e39a0560b3f880f5bab52 diff --git a/src/fixtures/repos/peer_deps_only/plugin_a b/src/fixtures/repos/peer_deps_only/plugin_a deleted file mode 160000 index 7eeb06a3..00000000 --- a/src/fixtures/repos/peer_deps_only/plugin_a +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7eeb06a3bfdb13eab881dd239496e4e018716afe diff --git a/src/fixtures/repos/peer_deps_only/plugin_b b/src/fixtures/repos/peer_deps_only/plugin_b deleted file mode 160000 index 5e6716a9..00000000 --- a/src/fixtures/repos/peer_deps_only/plugin_b +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5e6716a96a5b626c000b07f1f69fd57d4b15885e diff --git a/src/fixtures/repos/peer_deps_only/utils b/src/fixtures/repos/peer_deps_only/utils deleted file mode 160000 index bc9e652a..00000000 --- a/src/fixtures/repos/peer_deps_only/utils +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bc9e652a7fc15ea3600c238cf740d9ebfdeaa5a8 diff --git a/src/fixtures/repos/private_packages/consumer b/src/fixtures/repos/private_packages/consumer deleted file mode 160000 index 2e9e31a9..00000000 --- a/src/fixtures/repos/private_packages/consumer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2e9e31a93fb5614f7e4baf0f7536aca0e93efed2 diff --git a/src/fixtures/repos/private_packages/private_tool b/src/fixtures/repos/private_packages/private_tool deleted file mode 160000 index a698e5e9..00000000 --- a/src/fixtures/repos/private_packages/private_tool +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a698e5e9d5c9b6cf90fd4b4cb1c47cac4e9dd6e4 diff --git a/src/fixtures/repos/private_packages/public_lib b/src/fixtures/repos/private_packages/public_lib deleted file mode 160000 index da8048c6..00000000 --- a/src/fixtures/repos/private_packages/public_lib +++ /dev/null @@ -1 +0,0 @@ -Subproject commit da8048c6fe2c445fb8ce160855a14c42fecf0dfd diff --git a/src/fixtures/repos/three_way_dev_cycle/app b/src/fixtures/repos/three_way_dev_cycle/app deleted file mode 160000 index 107e38ec..00000000 --- a/src/fixtures/repos/three_way_dev_cycle/app +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 107e38ecbeaeb866ccc5d1a077e9d4e50e3a0cea diff --git a/src/fixtures/repos/three_way_dev_cycle/tool_x b/src/fixtures/repos/three_way_dev_cycle/tool_x deleted file mode 160000 index d7da3d11..00000000 --- a/src/fixtures/repos/three_way_dev_cycle/tool_x +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d7da3d1185b65597b49feed4dc29209ce5022572 diff --git a/src/fixtures/repos/three_way_dev_cycle/tool_y b/src/fixtures/repos/three_way_dev_cycle/tool_y deleted file mode 160000 index 90bd8336..00000000 --- a/src/fixtures/repos/three_way_dev_cycle/tool_y +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 90bd833693d4b5b7e20565611b388ea6787e62f1 diff --git a/src/fixtures/repos/three_way_dev_cycle/tool_z b/src/fixtures/repos/three_way_dev_cycle/tool_z deleted file mode 160000 index 3070ff2e..00000000 --- a/src/fixtures/repos/three_way_dev_cycle/tool_z +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3070ff2e8dafe965171ffe842067b3eb1cf140dc diff --git a/src/lib/ModulesDetail.svelte b/src/lib/ModulesDetail.svelte index a4a43cb7..96c2fff7 100644 --- a/src/lib/ModulesDetail.svelte +++ b/src/lib/ModulesDetail.svelte @@ -1,5 +1,4 @@ - modules {repo.pkg.package_json.glyph} {repo.pkg.package_json.name} + modules {repo.package_json.glyph} {repo.package_json.name}
- +
{#snippet nav_footer()} {/snippet} diff --git a/src/lib/PageFooter.svelte b/src/lib/PageFooter.svelte index 198f196d..0ba45044 100644 --- a/src/lib/PageFooter.svelte +++ b/src/lib/PageFooter.svelte @@ -1,16 +1,15 @@
- +
diff --git a/src/lib/PageHeader.svelte b/src/lib/PageHeader.svelte index a8417c04..df8f03f6 100644 --- a/src/lib/PageHeader.svelte +++ b/src/lib/PageHeader.svelte @@ -1,18 +1,18 @@
@@ -20,7 +20,7 @@ {#if nav} {@render nav()} {:else} - + {/if}
diff --git a/src/lib/PullRequestsDetail.svelte b/src/lib/PullRequestsDetail.svelte index 7d8fd22b..d934e32b 100644 --- a/src/lib/PullRequestsDetail.svelte +++ b/src/lib/PullRequestsDetail.svelte @@ -22,15 +22,15 @@ {#each pull_requests as pull_request (pull_request.pull_request.number)} {pull_request.repo.pkg - .repo_name}{#if pull_request.repo.pkg.package_json.glyph} {pull_request.repo - .pkg.package_json.glyph}{/if}{pull_request.repo + .repo_name}{#if pull_request.repo.package_json.glyph} {pull_request.repo + .package_json.glyph}{/if} #{pull_request.pull_request.number} diff --git a/src/lib/PullRequestsPage.svelte b/src/lib/PullRequestsPage.svelte index 9a07e092..b093e485 100644 --- a/src/lib/PullRequestsPage.svelte +++ b/src/lib/PullRequestsPage.svelte @@ -18,12 +18,12 @@ - pull requests {repo.pkg.package_json.glyph} {repo.pkg.package_json.name} + pull requests {repo.package_json.glyph} {repo.package_json.name}
- +
diff --git a/src/lib/ReposTable.svelte b/src/lib/ReposTable.svelte index a8fe383f..c990645b 100644 --- a/src/lib/ReposTable.svelte +++ b/src/lib/ReposTable.svelte @@ -19,14 +19,14 @@ // TODO hacky, handle regular deps too const lookup_dep_version = (repo: Repo, dep: string): string | undefined => { - for (const key in repo.pkg.package_json.dependencies) { + for (const key in repo.package_json.dependencies) { if (key === dep) { - return repo.pkg.package_json.dependencies[key]; + return repo.package_json.dependencies[key]; } } - for (const key in repo.pkg.package_json.devDependencies) { + for (const key in repo.package_json.devDependencies) { if (key === dep) { - return repo.pkg.package_json.devDependencies[key]; + return repo.package_json.devDependencies[key]; } } return undefined; @@ -35,9 +35,9 @@ const latest_version_by_dep = $derived( new Map( deps.map((dep) => { - const repo = repos.find((repo) => repo.pkg.package_json.name === dep); - if (!repo?.pkg.package_json) return [dep, null]; - return [dep, repo.pkg.package_json.version]; + const repo = repos.find((repo) => repo.package_json.name === dep); + if (!repo?.package_json) return [dep, null]; + return [dep, repo.package_json.version]; }), ), ); @@ -46,8 +46,8 @@ version == null ? '' : version.replace(/^(\^|>=)\s*/, ''); const lookup_pull_requests = (repos: Array | null, repo: Repo) => { - const found = repos?.find((p) => p.pkg.repo_url === repo.pkg.repo_url); - if (!found?.pkg.package_json) return null; + const found = repos?.find((p) => p.repo_url === repo.repo_url); + if (!found?.package_json) return null; const {pull_requests} = found; return pull_requests; }; @@ -68,13 +68,13 @@ - {#each repos as repo (repo.pkg.name)} - {@const {package_json, homepage_url} = repo.pkg} + {#each repos as repo (repo.name)} + {@const {package_json, homepage_url} = repo} @@ -84,8 +84,8 @@ {repo.pkg.logo_alt} {#if package_json} - {repo.pkg.repo_name} + {repo.repo_name} {@const check_runs = repo.check_runs} {@const check_runs_completed = check_runs?.status === 'completed'} {@const check_runs_success = check_runs?.conclusion === 'success'} {#if check_runs && (!check_runs_completed || !check_runs_success)} {format_url(repo.pkg.repo_url)}{format_url(repo.repo_url)} {/if} - {#if repo.pkg.npm_url} + {#if repo.npm_url}
{repo.pkg.name}{repo.name}
{/if} @@ -131,7 +131,7 @@ {#if package_json.version !== '0.0.1'} {format_version(package_json.version)}{format_version(package_json.version)} {/if} @@ -148,14 +148,14 @@ {/each} - {#if repo.pkg.repo_url} + {#if repo.repo_url} {@const pull_requests = lookup_pull_requests(repos, repo)}
{#if pull_requests} {#each pull_requests as pull (pull)} #{pull.number} diff --git a/src/lib/ReposTree.svelte b/src/lib/ReposTree.svelte index fbf50473..fdc9d547 100644 --- a/src/lib/ReposTree.svelte +++ b/src/lib/ReposTree.svelte @@ -1,6 +1,6 @@ - table {repo.pkg.package_json.glyph} {repo.pkg.package_json.name} + table {repo.package_json.glyph} {repo.package_json.name}
- +
diff --git a/src/lib/TreeItemPage.svelte b/src/lib/TreeItemPage.svelte index bf962f63..7391c2d8 100644 --- a/src/lib/TreeItemPage.svelte +++ b/src/lib/TreeItemPage.svelte @@ -17,16 +17,16 @@ // TODO ideally there would be one `ReposTree` mounted by the layout with transitions - const route_repo = $derived(repos.find((p) => p.pkg.repo_name === slug)); + const route_repo = $derived(repos.find((p) => p.repo_name === slug)); - {slug} - tree {repo.pkg.package_json.glyph} {repo.pkg.package_json.name} + {slug} - tree {repo.package_json.glyph} {repo.package_json.name}
- +
{#if !route_repo} @@ -37,7 +37,7 @@ {#snippet nav()}
- {repo.pkg.package_json.glyph} + {repo.package_json.glyph}
{/snippet}
diff --git a/src/lib/TreePage.svelte b/src/lib/TreePage.svelte index 4773df07..50232528 100644 --- a/src/lib/TreePage.svelte +++ b/src/lib/TreePage.svelte @@ -17,18 +17,18 @@ - tree {repo.pkg.package_json.glyph} {repo.pkg.name} + tree {repo.package_json.glyph} {repo.name}
- +
{#snippet nav()}
- {repo.pkg.package_json.glyph} + {repo.package_json.glyph}
{/snippet}
diff --git a/src/lib/changeset_generator.ts b/src/lib/changeset_generator.ts index adf09ec1..bc6879df 100644 --- a/src/lib/changeset_generator.ts +++ b/src/lib/changeset_generator.ts @@ -47,7 +47,7 @@ export const create_changeset_for_dependency_updates = async ( const required_bump = calculate_required_bump(repo, updates); // Generate changeset content - const content = generate_changeset_content(repo.pkg.name, updates, required_bump); + const content = generate_changeset_content(repo.library.name, updates, required_bump); // Write the changeset file await writeFile(filepath, content, 'utf8'); @@ -61,7 +61,7 @@ const calculate_required_bump = ( repo: LocalRepo, updates: Array, ): 'major' | 'minor' | 'patch' => { - const current_version = repo.pkg.package_json.version || '0.0.0'; + const current_version = repo.library.package_json.version || '0.0.0'; const [major] = current_version.split('.').map(Number); const is_pre_1_0 = major === 0; diff --git a/src/lib/changeset_reader.ts b/src/lib/changeset_reader.ts index 6c33c03f..1826aadf 100644 --- a/src/lib/changeset_reader.ts +++ b/src/lib/changeset_reader.ts @@ -199,15 +199,17 @@ export const predict_next_version = async ( return null; } - const bump_type = determine_bump_from_changesets(changesets, repo.pkg.name); + const bump_type = determine_bump_from_changesets(changesets, repo.library.name); if (!bump_type) { return null; } - const current_version = repo.pkg.package_json.version || '0.0.0'; + const current_version = repo.library.package_json.version || '0.0.0'; const next_version = calculate_next_version(current_version, bump_type); - log?.debug(` Predicted ${repo.pkg.name}: ${current_version} → ${next_version} (${bump_type})`); + log?.debug( + ` Predicted ${repo.library.name}: ${current_version} → ${next_version} (${bump_type})`, + ); return { version: next_version, diff --git a/src/lib/dependency_graph.ts b/src/lib/dependency_graph.ts index e0b38341..10ca2f0b 100644 --- a/src/lib/dependency_graph.ts +++ b/src/lib/dependency_graph.ts @@ -54,21 +54,22 @@ export class DependencyGraph { public init_from_repos(repos: Array): void { // First pass: create nodes for (const repo of repos) { - const {pkg} = repo; + const {library} = repo; const node: DependencyNode = { - name: pkg.name, - version: pkg.package_json.version || '0.0.0', + name: library.name, + version: library.package_json.version || '0.0.0', repo, dependencies: new Map(), dependents: new Set(), - publishable: !!pkg.package_json.private === false, // eslint-disable-line @typescript-eslint/no-unnecessary-boolean-literal-compare + publishable: !!library.package_json.private === false, // eslint-disable-line @typescript-eslint/no-unnecessary-boolean-literal-compare }; // Extract dependencies - const deps = pkg.package_json.dependencies || (EMPTY_OBJECT as Record); - const dev_deps = pkg.package_json.devDependencies || (EMPTY_OBJECT as Record); + const deps = library.package_json.dependencies || (EMPTY_OBJECT as Record); + const dev_deps = + library.package_json.devDependencies || (EMPTY_OBJECT as Record); const peer_deps = - pkg.package_json.peerDependencies || (EMPTY_OBJECT as Record); + library.package_json.peerDependencies || (EMPTY_OBJECT as Record); // Add dependencies, prioritizing prod/peer over dev // (if a package appears in multiple dep types, use the stronger constraint) @@ -85,8 +86,8 @@ export class DependencyGraph { } } - this.nodes.set(pkg.name, node); - this.edges.set(pkg.name, new Set()); + this.nodes.set(library.name, node); + this.edges.set(library.name, new Set()); } // Second pass: build edges (dependents) diff --git a/src/lib/dependency_updater.ts b/src/lib/dependency_updater.ts index 1aacee63..68198a42 100644 --- a/src/lib/dependency_updater.ts +++ b/src/lib/dependency_updater.ts @@ -209,11 +209,11 @@ export const update_all_repos = async ( try { await update_package_json(repo, updates, strategy, undefined, log, git_ops, fs_ops); // eslint-disable-line no-await-in-loop updated_count++; - log?.info(` Updated ${updates.size} dependencies in ${repo.pkg.name}`); + log?.info(` Updated ${updates.size} dependencies in ${repo.library.name}`); } catch (error) { const err = error instanceof Error ? error : new Error(String(error)); - failed.push({repo: repo.pkg.name, error: err}); - log?.error(` Failed to update ${repo.pkg.name}: ${err.message}`); + failed.push({repo: repo.library.name, error: err}); + log?.error(` Failed to update ${repo.library.name}: ${err.message}`); } } diff --git a/src/lib/fetch_repo_data.ts b/src/lib/fetch_repo_data.ts index d2e5a12c..da5ed906 100644 --- a/src/lib/fetch_repo_data.ts +++ b/src/lib/fetch_repo_data.ts @@ -30,11 +30,13 @@ export const fetch_repo_data = async ( github_api_version?: string, ): Promise> => { const repos: Array = []; - for (const {repo_url, repo_config, pkg} of resolved_repos) { + for (const {library, library_json, repo_config} of resolved_repos) { + const repo_url = library.repo_url; + // CI status await wait(delay); const check_runs = await fetch_github_check_runs( - pkg, + library, cache, log, token, @@ -46,7 +48,7 @@ export const fetch_repo_data = async ( // pull requests await wait(delay); const pull_requests = await fetch_github_pull_requests( - pkg, + library, cache, log, token, @@ -55,8 +57,7 @@ export const fetch_repo_data = async ( if (!pull_requests) log?.error('failed to fetch issues: ' + repo_url); repos.push({ - package_json: pkg.package_json, - src_json: pkg.src_json, + library_json, check_runs, pull_requests, }); diff --git a/src/lib/github.ts b/src/lib/github.ts index 1dee0363..1620fc5a 100644 --- a/src/lib/github.ts +++ b/src/lib/github.ts @@ -1,8 +1,15 @@ import type {Logger} from '@ryanatkn/belt/log.js'; -import type {Pkg} from '@ryanatkn/fuz/pkg.svelte.js'; import {z} from 'zod'; import {fetch_value, type FetchValueCache} from '@ryanatkn/belt/fetch.js'; +/** + * Minimal interface for GitHub API calls - works with both Pkg and Repo. + */ +export interface GithubRepoInfo { + owner_name: string | null; + repo_name: string; +} + /** * @see https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests */ @@ -22,15 +29,15 @@ export type GithubPullRequests = z.infer; * @see https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests */ export const fetch_github_pull_requests = async ( - pkg: Pkg, + repo_info: GithubRepoInfo, cache?: FetchValueCache, log?: Logger, token?: string, api_version?: string, ): Promise => { - if (!pkg.owner_name) throw Error('owner_name is required'); + if (!repo_info.owner_name) throw Error('owner_name is required'); const headers = api_version ? new Headers({'x-github-api-version': api_version}) : undefined; - const url = `https://api.github.com/repos/${pkg.owner_name}/${pkg.repo_name}/pulls`; + const url = `https://api.github.com/repos/${repo_info.owner_name}/${repo_info.repo_name}/pulls`; const fetched = await fetch_value(url, { request: {headers}, parse: GithubPullRequests.parse, @@ -70,16 +77,16 @@ export type GithubCheckRuns = z.infer; * @see https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#list-check-runs-for-a-git-reference */ export const fetch_github_check_runs = async ( - pkg: Pkg, + repo_info: GithubRepoInfo, cache?: FetchValueCache, log?: Logger, token?: string, api_version?: string, ref = 'main', ): Promise => { - if (!pkg.owner_name) throw Error('owner_name is required'); + if (!repo_info.owner_name) throw Error('owner_name is required'); const headers = api_version ? new Headers({'x-github-api-version': api_version}) : undefined; - const url = `https://api.github.com/repos/${pkg.owner_name}/${pkg.repo_name}/commits/${ref}/check-runs`; + const url = `https://api.github.com/repos/${repo_info.owner_name}/${repo_info.repo_name}/commits/${ref}/check-runs`; const fetched = await fetch_value(url, { request: {headers}, parse: (v) => reduce_check_runs(GithubCheckRuns.parse(v).check_runs), diff --git a/src/lib/github_helpers.ts b/src/lib/github_helpers.ts index 15eeaec4..b18adc2d 100644 --- a/src/lib/github_helpers.ts +++ b/src/lib/github_helpers.ts @@ -19,7 +19,7 @@ export const to_pull_requests = ( if (!repo.pull_requests) return null; // TODO hacky, figure out the data structure return repo.pull_requests.map((pull_request) => - repo.pkg.package_json.homepage && + repo.package_json.homepage && (!filter_pull_request || filter_pull_request(pull_request, repo)) ? {repo, pull_request} : null, diff --git a/src/lib/gitops_sync.task.ts b/src/lib/gitops_sync.task.ts index 968b07a0..5febf2fd 100644 --- a/src/lib/gitops_sync.task.ts +++ b/src/lib/gitops_sync.task.ts @@ -5,7 +5,6 @@ import {format_file} from '@ryanatkn/gro/format_file.js'; import {basename, resolve} from 'node:path'; import {print_path} from '@ryanatkn/gro/paths.js'; import {load_from_env} from '@ryanatkn/gro/env.js'; -import {json_embed} from '@ryanatkn/belt/json.js'; import {load_package_json} from '@ryanatkn/gro/package_json.js'; import {existsSync} from 'node:fs'; @@ -78,16 +77,16 @@ export const task: Task = { log.info('generating ' + outfile); - // JSON is faster to parse than JS so we optimize it by embedding the data as a string. // TODO the `basename` is used here because we don't have an `origin_id` like with gen, // and this file gets re-exported, // and we don't want the file to change based on where it's being generated, // because for example linking to a local package would change the contents const contents = ` - // generated by ${basename(import.meta.filename)} + // generated by ${basename(import.meta.filename)} !! do not edit directly or risk lost data + import type {RepoJson} from '${repo_specifier}'; - export const repos_json: Array = ${json_embed(repos_json, (s) => JSON.stringify(s, null, '\t'))}; + export const repos_json: Array = ${JSON.stringify(repos_json, null, '\t')}; `; // TODO think about possibly using the `gen` functionality in this task, not sure what the API design could look like const formatted = await format_file(contents, {filepath: outfile}); diff --git a/src/lib/gitops_task_helpers.ts b/src/lib/gitops_task_helpers.ts index 598f34b2..b3d2a23d 100644 --- a/src/lib/gitops_task_helpers.ts +++ b/src/lib/gitops_task_helpers.ts @@ -21,7 +21,7 @@ import {print_path} from '@ryanatkn/gro/paths.js'; import type {Logger} from '@ryanatkn/belt/log.js'; import {load_gitops_config, type GitopsConfig} from './gitops_config.js'; -import {load_local_repos, resolve_local_repos, type LocalRepo} from './local_repo.js'; +import {local_repos_load, local_repos_ensure, type LocalRepo} from './local_repo.js'; import {resolve_gitops_config} from './resolved_gitops_config.js'; import {DEFAULT_REPOS_DIR} from './paths.js'; import type {GitOperations, NpmOperations} from './operations.js'; @@ -79,7 +79,7 @@ export const get_gitops_ready = async ( ); const resolved_config = resolve_gitops_config(gitops_config, repos_dir); - const resolved_local_repos = await resolve_local_repos({ + const local_repo_paths = await local_repos_ensure({ resolved_config, repos_dir, gitops_config, @@ -88,7 +88,7 @@ export const get_gitops_ready = async ( npm_ops, }); - const local_repos = await load_local_repos({resolved_local_repos, log, git_ops, npm_ops}); + const local_repos = await local_repos_load({local_repo_paths, log, git_ops, npm_ops}); return {config_path, repos_dir, gitops_config, local_repos}; }; diff --git a/src/lib/local_repo.ts b/src/lib/local_repo.ts index 36d978d1..9b4819a0 100644 --- a/src/lib/local_repo.ts +++ b/src/lib/local_repo.ts @@ -1,7 +1,6 @@ import {strip_end} from '@ryanatkn/belt/string.js'; -import {load_package_json} from '@ryanatkn/gro/package_json.js'; -import {Pkg} from '@ryanatkn/fuz/pkg.svelte.js'; -import type {SrcJson} from '@ryanatkn/belt/src_json.js'; +import type {LibraryJson} from '@ryanatkn/belt/library_json.js'; +import {Library} from '@ryanatkn/fuz/library.svelte.js'; import {existsSync} from 'node:fs'; import {join} from 'node:path'; import {TaskError} from '@ryanatkn/gro'; @@ -13,26 +12,39 @@ import {default_git_operations, default_npm_operations} from './operations_defau import type {GitopsConfig, GitopsRepoConfig} from './gitops_config.js'; import type {ResolvedGitopsConfig} from './resolved_gitops_config.js'; -export interface LocalRepo extends ResolvedLocalRepo { - pkg: Pkg; +/** + * Fully loaded local repo with Library and extracted dependency data. + * Does not extend LocalRepoPath - Library is source of truth for name/repo_url/etc. + */ +export interface LocalRepo { + library: Library; + library_json: LibraryJson; + repo_dir: string; + repo_git_ssh_url: string; + repo_config: GitopsRepoConfig; dependencies?: Map; dev_dependencies?: Map; peer_dependencies?: Map; } -export type MaybeLocalRepo = ResolvedLocalRepo | UnresolvedLocalRepo; - -export interface ResolvedLocalRepo { - type: 'resolved_local_repo'; - repo_name: string; +/** + * A repo that has been located on the filesystem (path exists). + * Used before loading - just filesystem/git concerns. + */ +export interface LocalRepoPath { + type: 'local_repo_path'; + repo_name: string; // from URL parsing (for display/logging before Library loaded) repo_dir: string; repo_url: string; repo_git_ssh_url: string; repo_config: GitopsRepoConfig; } -export interface UnresolvedLocalRepo { - type: 'unresolved_local_repo'; +/** + * A repo that is missing from the filesystem (needs cloning). + */ +export interface LocalRepoMissing { + type: 'local_repo_missing'; repo_name: string; repo_url: string; repo_git_ssh_url: string; @@ -48,44 +60,47 @@ export interface UnresolvedLocalRepo { * 3. Pulls latest changes from remote (skipped for local-only repos) * 4. Validates workspace is clean after pull * 5. Auto-installs dependencies if package.json changed - * 6. Parses package.json and extracts Pkg metadata + * 6. Imports library_json from src/routes/library.ts + * 7. Creates Library and extracts dependency maps * * This ensures repos are always in sync with their configured branch * before being used by gitops commands. * - * @throws {TaskError} if workspace dirty, branch switch fails, or install fails + * @throws {TaskError} if workspace dirty, branch switch fails, install fails, or library.ts missing */ -export const load_local_repo = async ({ - resolved_local_repo, +export const local_repo_load = async ({ + local_repo_path, log: _log, git_ops = default_git_operations, npm_ops = default_npm_operations, }: { - resolved_local_repo: ResolvedLocalRepo; + local_repo_path: LocalRepoPath; log?: Logger; git_ops?: GitOperations; npm_ops?: NpmOperations; }): Promise => { - const {repo_config, repo_dir} = resolved_local_repo; + const {repo_config, repo_dir, repo_name, repo_git_ssh_url} = local_repo_path; // Record commit hash before any changes const commit_before_result = await git_ops.current_commit_hash({cwd: repo_dir}); if (!commit_before_result.ok) { - throw new TaskError(`Failed to get commit hash: ${commit_before_result.message}`); + throw new TaskError( + `Failed to get commit hash in ${repo_dir}: ${commit_before_result.message}`, + ); } const commit_before = commit_before_result.value; // Switch to target branch if needed const branch_result = await git_ops.current_branch_name({cwd: repo_dir}); if (!branch_result.ok) { - throw new TaskError(`Failed to get current branch: ${branch_result.message}`); + throw new TaskError(`Failed to get current branch in ${repo_dir}: ${branch_result.message}`); } const switched_branches = branch_result.value !== repo_config.branch; if (switched_branches) { const clean_result = await git_ops.check_clean_workspace({cwd: repo_dir}); if (!clean_result.ok) { - throw new TaskError(`Failed to check workspace: ${clean_result.message}`); + throw new TaskError(`Failed to check workspace in ${repo_dir}: ${clean_result.message}`); } if (!clean_result.value) { @@ -96,37 +111,41 @@ export const load_local_repo = async ({ const checkout_result = await git_ops.checkout({branch: repo_config.branch, cwd: repo_dir}); if (!checkout_result.ok) { - throw new TaskError(`Failed to checkout branch: ${checkout_result.message}`); + throw new TaskError( + `Failed to checkout branch "${repo_config.branch}" in ${repo_dir}: ${checkout_result.message}`, + ); } } // Only pull if remote exists (skip for local-only repos, test fixtures) const origin_result = await git_ops.has_remote({remote: 'origin', cwd: repo_dir}); if (!origin_result.ok) { - throw new TaskError(`Failed to check for remote: ${origin_result.message}`); + throw new TaskError(`Failed to check for remote in ${repo_dir}: ${origin_result.message}`); } if (origin_result.value) { const pull_result = await git_ops.pull({cwd: repo_dir}); if (!pull_result.ok) { - throw new TaskError(`Failed to pull: ${pull_result.message}`); + throw new TaskError(`Failed to pull in ${repo_dir}: ${pull_result.message}`); } } // Check clean workspace after pull to ensure we're in a good state const clean_after_result = await git_ops.check_clean_workspace({cwd: repo_dir}); if (!clean_after_result.ok) { - throw new TaskError(`Failed to check workspace: ${clean_after_result.message}`); + throw new TaskError(`Failed to check workspace in ${repo_dir}: ${clean_after_result.message}`); } if (!clean_after_result.value) { - throw new TaskError(`Workspace is unclean after pulling branch "${repo_config.branch}"`); + throw new TaskError( + `Workspace ${repo_dir} is unclean after pulling branch "${repo_config.branch}"`, + ); } // Record commit hash after pull const commit_after_result = await git_ops.current_commit_hash({cwd: repo_dir}); if (!commit_after_result.ok) { - throw new TaskError(`Failed to get commit hash: ${commit_after_result.message}`); + throw new TaskError(`Failed to get commit hash in ${repo_dir}: ${commit_after_result.message}`); } const commit_after = commit_after_result.value; @@ -143,7 +162,9 @@ export const load_local_repo = async ({ }); if (!changed_result.ok) { - throw new TaskError(`Failed to check if package.json changed: ${changed_result.message}`); + throw new TaskError( + `Failed to check if package.json changed in ${repo_dir}: ${changed_result.message}`, + ); } if (changed_result.value) { @@ -156,20 +177,41 @@ export const load_local_repo = async ({ } } - const package_json = load_package_json(repo_dir); - // Minimal src_json - gitops doesn't need module metadata for core functionality - const src_json: SrcJson = { - name: package_json.name, - version: package_json.version, - modules: [], - }; + // Validate and load library.ts + const library_path = join(repo_dir, 'src/routes/library.ts'); + if (!existsSync(library_path)) { + throw new TaskError( + `Repo "${repo_name}" is missing src/routes/library.ts\n` + + `This file is required for fuz_gitops. To fix:\n` + + ` 1. Create src/routes/library.gen.ts with:\n` + + ` import {library_gen} from '@ryanatkn/fuz/library_gen.js';\n` + + ` export const gen = library_gen();\n` + + ` 2. Run: cd ${repo_dir} && gro gen`, + ); + } + + const library_module = await import(library_path); + const {library_json} = library_module as {library_json: LibraryJson | undefined}; + if (!library_json) { + throw new TaskError( + `Repo "${repo_name}" has invalid src/routes/library.ts - missing library_json export\n` + + `The file must export a library_json object. To fix:\n` + + ` 1. Ensure src/routes/library.gen.ts uses library_gen from @ryanatkn/fuz\n` + + ` 2. Run: cd ${repo_dir} && gro gen`, + ); + } + const library = new Library(library_json); const local_repo: LocalRepo = { - ...resolved_local_repo, - pkg: new Pkg(package_json, src_json), + library, + library_json, + repo_dir, + repo_git_ssh_url, + repo_config, }; - // Extract dependencies + // Extract dependencies from package_json + const {package_json} = library; if (package_json.dependencies) { local_repo.dependencies = new Map(Object.entries(package_json.dependencies)); } @@ -183,7 +225,7 @@ export const load_local_repo = async ({ return local_repo; }; -export const resolve_local_repos = async ({ +export const local_repos_ensure = async ({ resolved_config, repos_dir, gitops_config, @@ -197,20 +239,20 @@ export const resolve_local_repos = async ({ download: boolean; log?: Logger; npm_ops?: NpmOperations; -}): Promise> => { - let resolved_local_repos: Array | null = null; +}): Promise> => { + let local_repo_paths: Array | null = null; - if (!resolved_config.unresolved_local_repos) { - resolved_local_repos = resolved_config.resolved_local_repos; + if (!resolved_config.local_repos_missing) { + local_repo_paths = resolved_config.local_repo_paths; } else { if (download) { const downloaded = await download_repos({ repos_dir, - unresolved_local_repos: resolved_config.unresolved_local_repos, + local_repos_missing: resolved_config.local_repos_missing, log, npm_ops, }); - resolved_local_repos = (resolved_config.resolved_local_repos ?? []) + local_repo_paths = (resolved_config.local_repo_paths ?? []) .concat(downloaded) .sort( (a, b) => @@ -220,44 +262,44 @@ export const resolve_local_repos = async ({ } else { log?.error( `Failed to resolve local repos in ${repos_dir} - do you need to pass \`--download\` or configure the directory?`, // TODO leaking task impl details - resolved_config.unresolved_local_repos.map((r) => r.repo_url), + resolved_config.local_repos_missing.map((r) => r.repo_url), ); throw new TaskError('Failed to resolve local configs'); } } - if (!resolved_local_repos) { + if (!local_repo_paths) { throw new TaskError('No repos are configured in `gitops_config.ts`'); } - return resolved_local_repos; + return local_repo_paths; }; -export const load_local_repos = async ({ - resolved_local_repos, +export const local_repos_load = async ({ + local_repo_paths, log, git_ops = default_git_operations, npm_ops = default_npm_operations, }: { - resolved_local_repos: Array; + local_repo_paths: Array; log?: Logger; git_ops?: GitOperations; npm_ops?: NpmOperations; }): Promise> => { const loaded: Array = []; - for (const resolved_local_repo of resolved_local_repos) { - loaded.push(await load_local_repo({resolved_local_repo, log, git_ops, npm_ops})); // eslint-disable-line no-await-in-loop + for (const local_repo_path of local_repo_paths) { + loaded.push(await local_repo_load({local_repo_path, log, git_ops, npm_ops})); // eslint-disable-line no-await-in-loop } return loaded; }; -export const resolve_local_repo = ({ +export const local_repo_locate = ({ repo_config, repos_dir, }: { repo_config: GitopsRepoConfig; repos_dir: string; -}): MaybeLocalRepo => { +}): LocalRepoPath | LocalRepoMissing => { const {repo_url} = repo_config; const repo_name = strip_end(repo_url, '/').split('/').at(-1); if (!repo_name) throw Error('Invalid `repo_config.repo_url` ' + repo_url); @@ -266,11 +308,11 @@ export const resolve_local_repo = ({ const repo_dir = repo_config.repo_dir ?? join(repos_dir, repo_name); if (!existsSync(repo_dir)) { - return {type: 'unresolved_local_repo', repo_name, repo_url, repo_git_ssh_url, repo_config}; + return {type: 'local_repo_missing', repo_name, repo_url, repo_git_ssh_url, repo_config}; } return { - type: 'resolved_local_repo', + type: 'local_repo_path', repo_name, repo_dir, repo_url, @@ -286,21 +328,21 @@ const to_repo_git_ssh_url = (repo_url: string): string => { const download_repos = async ({ repos_dir, - unresolved_local_repos, + local_repos_missing, log, npm_ops = default_npm_operations, }: { repos_dir: string; - unresolved_local_repos: Array; + local_repos_missing: Array; log?: Logger; npm_ops?: NpmOperations; -}): Promise> => { - const resolved: Array = []; - for (const {repo_config, repo_git_ssh_url} of unresolved_local_repos) { +}): Promise> => { + const resolved: Array = []; + for (const {repo_config, repo_git_ssh_url} of local_repos_missing) { log?.info(`cloning repo ${repo_git_ssh_url} to ${repos_dir}`); await spawn('git', ['clone', repo_git_ssh_url], {cwd: repos_dir}); // eslint-disable-line no-await-in-loop - const local_repo = resolve_local_repo({repo_config, repos_dir}); - if (local_repo.type === 'unresolved_local_repo') { + const local_repo = local_repo_locate({repo_config, repos_dir}); + if (local_repo.type === 'local_repo_missing') { throw new TaskError(`Failed to clone repo ${repo_git_ssh_url} to ${repos_dir}`); } // Always install dependencies after cloning diff --git a/src/lib/multi_repo_publisher.ts b/src/lib/multi_repo_publisher.ts index 15e57385..8ae8d1ea 100644 --- a/src/lib/multi_repo_publisher.ts +++ b/src/lib/multi_repo_publisher.ts @@ -103,7 +103,7 @@ export const publish_repos = async ( // Phase 1: Publish each package and immediately update dependents for (let i = 0; i < order.length; i++) { const pkg_name = order[i]!; - const repo = repos.find((r) => r.pkg.name === pkg_name); + const repo = repos.find((r) => r.library.name === pkg_name); if (!repo) continue; // Skip if already published in a previous iteration @@ -190,9 +190,11 @@ export const publish_repos = async ( // Apply updates if any if (updates.size > 0) { - log?.info(` Updating ${dependent_repo.pkg.name}'s dependency on ${pkg_name}`); - changed_repos.add(dependent_repo.pkg.name); // Mark as changed for deployment - changed_in_iteration.add(dependent_repo.pkg.name); // Track for batch install + log?.info( + ` Updating ${dependent_repo.library.name}'s dependency on ${pkg_name}`, + ); + changed_repos.add(dependent_repo.library.name); // Mark as changed for deployment + changed_in_iteration.add(dependent_repo.library.name); // Track for batch install await update_package_json( dependent_repo, updates, @@ -219,7 +221,7 @@ export const publish_repos = async ( log?.info(st('cyan', '\n📦 Installing dependencies for updated repos...\n')); for (const pkg_name of changed_in_iteration) { - const repo = repos.find((r) => r.pkg.name === pkg_name); + const repo = repos.find((r) => r.library.name === pkg_name); if (!repo) continue; try { @@ -280,9 +282,9 @@ export const publish_repos = async ( } if (dev_updates.size > 0) { - log?.info(` Updating ${dev_updates.size} dev dependencies in ${repo.pkg.name}`); - changed_repos.add(repo.pkg.name); // Mark as changed for deployment - dev_updated_repos.add(repo.pkg.name); // Track for batch install + log?.info(` Updating ${dev_updates.size} dev dependencies in ${repo.library.name}`); + changed_repos.add(repo.library.name); // Mark as changed for deployment + dev_updated_repos.add(repo.library.name); // Track for batch install await update_package_json( repo, dev_updates, @@ -300,7 +302,7 @@ export const publish_repos = async ( log?.info(st('cyan', '\n📦 Installing dev dependencies for updated repos...\n')); for (const pkg_name of dev_updated_repos) { - const repo = repos.find((r) => r.pkg.name === pkg_name); + const repo = repos.find((r) => r.library.name === pkg_name); if (!repo) continue; try { @@ -319,7 +321,7 @@ export const publish_repos = async ( // Phase 3: Deploy repos with changes (optional) // Deploys only repos that were: published, had prod/peer deps updated, or had dev deps updated if (options.deploy && !dry_run) { - const repos_to_deploy = repos.filter((r) => changed_repos.has(r.pkg.name)); + const repos_to_deploy = repos.filter((r) => changed_repos.has(r.library.name)); log?.info( st( 'cyan', @@ -329,7 +331,7 @@ export const publish_repos = async ( for (const repo of repos_to_deploy) { try { - log?.info(` Deploying ${repo.pkg.name}...`); + log?.info(` Deploying ${repo.library.name}...`); const deploy_result = await ops.process.spawn({ cmd: 'gro', args: ['deploy', '--no-build'], @@ -337,12 +339,12 @@ export const publish_repos = async ( }); if (deploy_result.ok) { - log?.info(st('green', ` ✅ Deployed ${repo.pkg.name}`)); + log?.info(st('green', ` ✅ Deployed ${repo.library.name}`)); } else { - log?.warn(st('yellow', ` ⚠️ Failed to deploy ${repo.pkg.name}`)); + log?.warn(st('yellow', ` ⚠️ Failed to deploy ${repo.library.name}`)); } } catch (error) { - log?.error(st('red', ` ❌ Error deploying ${repo.pkg.name}: ${error}`)); + log?.error(st('red', ` ❌ Error deploying ${repo.library.name}: ${error}`)); } } } @@ -388,7 +390,7 @@ const publish_single_repo = async ( ): Promise => { const {dry_run, log} = options; - const old_version = repo.pkg.package_json.version || '0.0.0'; + const old_version = repo.library.package_json.version || '0.0.0'; if (dry_run) { // In dry run, predict version from changesets @@ -396,7 +398,7 @@ const publish_single_repo = async ( if (!prediction) { // No changesets found, skip this repo - throw new Error(`No changesets found for ${repo.pkg.name}`); + throw new Error(`No changesets found for ${repo.library.name}`); } if (!prediction.ok) { @@ -408,7 +410,7 @@ const publish_single_repo = async ( const breaking = is_breaking_change(old_version, bump_type); return { - name: repo.pkg.name, + name: repo.library.name, old_version, new_version, bump_type, @@ -426,7 +428,7 @@ const publish_single_repo = async ( }); if (!publish_result.ok) { - throw new Error(`Failed to publish ${repo.pkg.name}: ${publish_result.message}`); + throw new Error(`Failed to publish ${repo.library.name}: ${publish_result.message}`); } // Read the new version from package.json after gro publish @@ -454,7 +456,7 @@ const publish_single_repo = async ( const commit = commit_result.value; return { - name: repo.pkg.name, + name: repo.library.name, old_version, new_version, bump_type, diff --git a/src/lib/npm_install_helpers.ts b/src/lib/npm_install_helpers.ts index cd122036..fbd48053 100644 --- a/src/lib/npm_install_helpers.ts +++ b/src/lib/npm_install_helpers.ts @@ -58,7 +58,7 @@ export const install_with_cache_healing = async ( if (!is_etarget_error(message, stderr)) { // Different error - fail immediately without cache healing throw new Error( - `Failed to install dependencies in ${repo.pkg.name}: ${install_result.message}${stderr ? `\n${stderr}` : ''}`, + `Failed to install dependencies in ${repo.library.name}: ${install_result.message}${stderr ? `\n${stderr}` : ''}`, ); } @@ -77,7 +77,7 @@ export const install_with_cache_healing = async ( if (!retry_result.ok) { throw new Error( - `Failed to install dependencies after cache clean in ${repo.pkg.name}: ${retry_result.message}${retry_result.stderr ? `\n${retry_result.stderr}` : ''}`, + `Failed to install dependencies after cache clean in ${repo.library.name}: ${retry_result.message}${retry_result.stderr ? `\n${retry_result.stderr}` : ''}`, ); } diff --git a/src/lib/operations_defaults.ts b/src/lib/operations_defaults.ts index cccbe973..0e2264ac 100644 --- a/src/lib/operations_defaults.ts +++ b/src/lib/operations_defaults.ts @@ -392,7 +392,7 @@ export const default_build_operations: BuildOperations = { build_package: async (options) => { const {repo, log} = options; try { - log?.info(` Building ${repo.pkg.name}...`); + log?.info(` Building ${repo.library.name}...`); const spawned = await spawn_out('gro', ['build'], {cwd: repo.repo_dir}); if (spawned.result.ok) { return {ok: true}; diff --git a/src/lib/preflight_checks.ts b/src/lib/preflight_checks.ts index 3287fc9d..89194f21 100644 --- a/src/lib/preflight_checks.ts +++ b/src/lib/preflight_checks.ts @@ -93,7 +93,7 @@ export const run_preflight_checks = async ({ for (const repo of repos) { const clean_result = await git_ops.check_clean_workspace({cwd: repo.repo_dir}); // eslint-disable-line no-await-in-loop if (!clean_result.ok) { - errors.push(`${repo.pkg.name} failed workspace check: ${clean_result.message}`); + errors.push(`${repo.library.name} failed workspace check: ${clean_result.message}`); continue; } @@ -106,11 +106,11 @@ export const run_preflight_checks = async ({ if (unexpected_files.length > 0) { errors.push( - `${repo.pkg.name} has uncommitted changes in: ${unexpected_files.slice(0, 3).join(', ')}${unexpected_files.length > 3 ? ` and ${unexpected_files.length - 3} more` : ''}`, + `${repo.library.name} has uncommitted changes in: ${unexpected_files.slice(0, 3).join(', ')}${unexpected_files.length > 3 ? ` and ${unexpected_files.length - 3} more` : ''}`, ); } } else { - errors.push(`${repo.pkg.name} has uncommitted changes`); + errors.push(`${repo.library.name} has uncommitted changes`); } } } @@ -120,13 +120,13 @@ export const run_preflight_checks = async ({ for (const repo of repos) { const branch_result = await git_ops.current_branch_name({cwd: repo.repo_dir}); // eslint-disable-line no-await-in-loop if (!branch_result.ok) { - errors.push(`${repo.pkg.name} failed branch check: ${branch_result.message}`); + errors.push(`${repo.library.name} failed branch check: ${branch_result.message}`); continue; } if (branch_result.value !== required_branch) { errors.push( - `${repo.pkg.name} is on branch '${branch_result.value}', expected '${required_branch}'`, + `${repo.library.name} is on branch '${branch_result.value}', expected '${required_branch}'`, ); } } @@ -137,15 +137,15 @@ export const run_preflight_checks = async ({ for (const repo of repos) { const has_result = await changeset_ops.has_changesets({repo}); // eslint-disable-line no-await-in-loop if (!has_result.ok) { - errors.push(`${repo.pkg.name} failed changeset check: ${has_result.message}`); + errors.push(`${repo.library.name} failed changeset check: ${has_result.message}`); continue; } if (has_result.value) { - repos_with_changesets.add(repo.pkg.name); + repos_with_changesets.add(repo.library.name); } else { - repos_without_changesets.add(repo.pkg.name); - warnings.push(`${repo.pkg.name} has no changesets`); + repos_without_changesets.add(repo.library.name); + warnings.push(`${repo.library.name} has no changesets`); } } @@ -157,18 +157,20 @@ export const run_preflight_checks = async ({ // 4. Validate builds for packages with changesets if (!skip_build_validation && repos_with_changesets.size > 0) { log?.info(st('cyan', ` Validating builds for ${repos_with_changesets.size} package(s)...`)); - const repos_to_build = repos.filter((repo) => repos_with_changesets.has(repo.pkg.name)); + const repos_to_build = repos.filter((repo) => repos_with_changesets.has(repo.library.name)); for (let i = 0; i < repos_to_build.length; i++) { const repo = repos_to_build[i]!; - log?.info(st('dim', ` [${i + 1}/${repos_to_build.length}] Building ${repo.pkg.name}...`)); + log?.info( + st('dim', ` [${i + 1}/${repos_to_build.length}] Building ${repo.library.name}...`), + ); const build_result = await build_ops.build_package({repo, log}); // eslint-disable-line no-await-in-loop if (!build_result.ok) { errors.push( - `${repo.pkg.name} failed to build: ${build_result.output || build_result.message || 'unknown error'}`, + `${repo.library.name} failed to build: ${build_result.output || build_result.message || 'unknown error'}`, ); } else { - log?.info(st('dim', ` ✓ ${repo.pkg.name} built successfully`)); + log?.info(st('dim', ` ✓ ${repo.library.name} built successfully`)); } } diff --git a/src/lib/publishing_plan.ts b/src/lib/publishing_plan.ts index b15c1172..092f2bc5 100644 --- a/src/lib/publishing_plan.ts +++ b/src/lib/publishing_plan.ts @@ -64,7 +64,7 @@ const calculate_dependency_updates = ( const new_version = predicted_versions.get(dep_name); if (new_version && needs_update(current_version, new_version)) { dependency_updates.push({ - dependent_package: repo.pkg.name, + dependent_package: repo.library.name, updated_dependency: dep_name, new_version, type: 'dependencies', @@ -73,8 +73,8 @@ const calculate_dependency_updates = ( if (breaking_packages.has(dep_name)) { const cascades = breaking_cascades.get(dep_name) || []; - if (!cascades.includes(repo.pkg.name)) { - cascades.push(repo.pkg.name); + if (!cascades.includes(repo.library.name)) { + cascades.push(repo.library.name); } breaking_cascades.set(dep_name, cascades); } @@ -88,7 +88,7 @@ const calculate_dependency_updates = ( const new_version = predicted_versions.get(dep_name); if (new_version && needs_update(current_version, new_version)) { dependency_updates.push({ - dependent_package: repo.pkg.name, + dependent_package: repo.library.name, updated_dependency: dep_name, new_version, type: 'peerDependencies', @@ -97,8 +97,8 @@ const calculate_dependency_updates = ( if (breaking_packages.has(dep_name)) { const cascades = breaking_cascades.get(dep_name) || []; - if (!cascades.includes(repo.pkg.name)) { - cascades.push(repo.pkg.name); + if (!cascades.includes(repo.library.name)) { + cascades.push(repo.library.name); } breaking_cascades.set(dep_name, cascades); } @@ -112,7 +112,7 @@ const calculate_dependency_updates = ( const new_version = predicted_versions.get(dep_name); if (new_version && needs_update(current_version, new_version)) { dependency_updates.push({ - dependent_package: repo.pkg.name, + dependent_package: repo.library.name, updated_dependency: dep_name, new_version, type: 'devDependencies', @@ -134,7 +134,7 @@ const get_required_bump_for_dependencies = ( // Check if this repo has any prod/peer dependency updates const relevant_updates = dependency_updates.filter( (update) => - update.dependent_package === repo.pkg.name && + update.dependent_package === repo.library.name && (update.type === 'dependencies' || update.type === 'peerDependencies'), ); @@ -147,7 +147,7 @@ const get_required_bump_for_dependencies = ( breaking_packages.has(update.updated_dependency), ); - const current_version = repo.pkg.package_json.version || '0.0.0'; + const current_version = repo.library.package_json.version || '0.0.0'; const [major] = current_version.split('.').map(Number); const is_pre_1_0 = major === 0; @@ -230,7 +230,7 @@ export const generate_publishing_plan = async ( const version_changes: Array = []; for (const pkg_name of publishing_order) { - const repo = repos.find((r) => r.pkg.name === pkg_name); + const repo = repos.find((r) => r.library.name === pkg_name); if (!repo) continue; // Check for changesets @@ -256,7 +256,7 @@ export const generate_publishing_plan = async ( } { - const old_version = repo.pkg.package_json.version || '0.0.0'; + const old_version = repo.library.package_json.version || '0.0.0'; const is_breaking = is_breaking_change(old_version, prediction.bump_type); predicted_versions.set(pkg_name, prediction.version); @@ -296,7 +296,7 @@ export const generate_publishing_plan = async ( // Process packages to check for bump escalation and auto-generated changesets for (const repo of repos) { - const pkg_name = repo.pkg.name; + const pkg_name = repo.library.name; // Get required bump from dependencies const required_bump = get_required_bump_for_dependencies( @@ -312,7 +312,7 @@ export const generate_publishing_plan = async ( // Package has changesets - check if it needs bump escalation if (required_bump && compare_bump_types(required_bump, existing_entry.bump_type) > 0) { // Dependencies require a larger bump than existing changesets provide - const old_version = repo.pkg.package_json.version || '0.0.0'; + const old_version = repo.library.package_json.version || '0.0.0'; const new_version = calculate_next_version(old_version, required_bump); // Only mark as changed if version actually changed @@ -336,7 +336,7 @@ export const generate_publishing_plan = async ( } } else if (required_bump) { // No existing changesets but needs changeset for dependency updates - const old_version = repo.pkg.package_json.version || '0.0.0'; + const old_version = repo.library.package_json.version || '0.0.0'; const new_version = calculate_next_version(old_version, required_bump); // Check if this is a new version (not already in version_changes) @@ -379,7 +379,7 @@ export const generate_publishing_plan = async ( ); for (const repo of repos) { - const pkg_name = repo.pkg.name; + const pkg_name = repo.library.name; const required_bump = get_required_bump_for_dependencies( repo, pending_updates, @@ -418,11 +418,11 @@ export const generate_publishing_plan = async ( // Identify packages with no changes for (const repo of repos) { - const has_version_change = version_changes.some((vc) => vc.package_name === repo.pkg.name); + const has_version_change = version_changes.some((vc) => vc.package_name === repo.library.name); if (!has_version_change) { const has_result = await ops.has_changesets({repo}); // eslint-disable-line no-await-in-loop if (has_result.ok && !has_result.value) { - info.push(repo.pkg.name); + info.push(repo.library.name); } } } diff --git a/src/lib/repo.svelte.ts b/src/lib/repo.svelte.ts index 1b3a13a2..bcac87b2 100644 --- a/src/lib/repo.svelte.ts +++ b/src/lib/repo.svelte.ts @@ -1,7 +1,10 @@ import {create_context} from '@ryanatkn/fuz/context_helpers.js'; -import {Pkg} from '@ryanatkn/fuz/pkg.svelte.js'; +import type {LibraryJson} from '@ryanatkn/belt/library_json.js'; import type {PackageJson} from '@ryanatkn/belt/package_json.js'; -import type {SrcJson} from '@ryanatkn/belt/src_json.js'; +import type {SourceJson} from '@ryanatkn/belt/source_json.js'; +import type {Url} from '@ryanatkn/belt/url.js'; +import {Library} from '@ryanatkn/fuz/library.svelte.js'; +import type {Module} from '@ryanatkn/fuz/module.svelte.js'; import {GithubCheckRunsItem, type GithubPullRequest} from './github.js'; @@ -9,22 +12,68 @@ import {GithubCheckRunsItem, type GithubPullRequest} from './github.js'; * Serialized repo data as stored in repos.ts (JSON). */ export interface RepoJson { - package_json: PackageJson; - src_json: SrcJson; + library_json: LibraryJson; check_runs: GithubCheckRunsItem | null; pull_requests: Array | null; } /** - * Runtime repo with Pkg instance. + * Runtime repo with Library composition for package metadata. + * + * Wraps a Library instance and adds GitHub-specific data (CI status, PRs). + * Convenience getters delegate to `this.library.*` for common properties. */ export class Repo { - pkg: Pkg; + readonly library: Library; check_runs: GithubCheckRunsItem | null; pull_requests: Array | null; + // Convenience getters delegating to library + get name(): string { + return this.library.name; + } + get repo_name(): string { + return this.library.repo_name; + } + get repo_url(): Url { + return this.library.repo_url; + } + get owner_name(): string | null { + return this.library.owner_name; + } + get homepage_url(): Url | null { + return this.library.homepage_url; + } + get logo_url(): Url | null { + return this.library.logo_url; + } + get logo_alt(): string { + return this.library.logo_alt; + } + get published(): boolean { + return this.library.published; + } + get npm_url(): Url | null { + return this.library.npm_url; + } + get changelog_url(): Url | null { + return this.library.changelog_url; + } + get package_json(): PackageJson { + return this.library.package_json; + } + get source_json(): SourceJson { + return this.library.source_json; + } + get modules(): Array { + return this.library.modules; + } + get org_url(): string | null { + return this.library.org_url; + } + constructor(repo_json: RepoJson) { - this.pkg = new Pkg(repo_json.package_json, repo_json.src_json); + this.library = new Library(repo_json.library_json); this.check_runs = repo_json.check_runs; this.pull_requests = repo_json.pull_requests; } @@ -39,7 +88,7 @@ export const repos_context = create_context(); export const repos_parse = (repos: Array, homepage_url: string): Repos => { // We expect to find this because it's sourced from the local package.json - const repo = repos.find((d) => d.pkg.homepage_url === homepage_url); + const repo = repos.find((d) => d.homepage_url === homepage_url); if (!repo) throw Error(`Cannot find repo with homepage_url: ${homepage_url}`); return {repo, repos}; diff --git a/src/lib/resolved_gitops_config.ts b/src/lib/resolved_gitops_config.ts index d7736996..a5dc891f 100644 --- a/src/lib/resolved_gitops_config.ts +++ b/src/lib/resolved_gitops_config.ts @@ -1,15 +1,10 @@ import type {GitopsConfig} from './gitops_config.js'; -import { - resolve_local_repo, - type MaybeLocalRepo, - type ResolvedLocalRepo, - type UnresolvedLocalRepo, -} from './local_repo.js'; +import {local_repo_locate, type LocalRepoPath, type LocalRepoMissing} from './local_repo.js'; export interface ResolvedGitopsConfig { - local_repos: Array | null; - resolved_local_repos: Array | null; - unresolved_local_repos: Array | null; + local_repos: Array | null; + local_repo_paths: Array | null; + local_repos_missing: Array | null; } export const resolve_gitops_config = ( @@ -17,16 +12,16 @@ export const resolve_gitops_config = ( repos_dir: string, ): ResolvedGitopsConfig => { const local_repos = gitops_config.repos.map((r) => - resolve_local_repo({repo_config: r, repos_dir}), + local_repo_locate({repo_config: r, repos_dir}), ); - const resolved_local_repos = local_repos.filter((r) => r.type === 'resolved_local_repo'); - const unresolved_local_repos = local_repos.filter((r) => r.type === 'unresolved_local_repo'); + const local_repo_paths = local_repos.filter((r) => r.type === 'local_repo_path'); + const local_repos_missing = local_repos.filter((r) => r.type === 'local_repo_missing'); const config: ResolvedGitopsConfig = { local_repos: local_repos.length ? local_repos : null, - resolved_local_repos: resolved_local_repos.length ? resolved_local_repos : null, - unresolved_local_repos: unresolved_local_repos.length ? unresolved_local_repos : null, + local_repo_paths: local_repo_paths.length ? local_repo_paths : null, + local_repos_missing: local_repos_missing.length ? local_repos_missing : null, }; return config; }; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 3c2d0214..c8ab7c64 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -11,13 +11,13 @@ ContextmenuState, contextmenu_attachment, } from '@ryanatkn/fuz/contextmenu_state.svelte.js'; - import {Pkg, pkg_context} from '@ryanatkn/fuz/pkg.svelte.js'; + import {Library, library_context} from '@ryanatkn/fuz/library.svelte.js'; import type {Snippet} from 'svelte'; import Settings from '$routes/Settings.svelte'; import {repos_json} from '$routes/repos.js'; import {Repo, type RepoJson, repos_parse, repos_context} from '$lib/repo.svelte.js'; - import {package_json, src_json} from '$routes/package.js'; + import {library_json} from '$routes/library.js'; interface Props { children: Snippet; @@ -32,7 +32,7 @@ 'https://gitops.fuz.dev/', ); repos_context.set(repos); - pkg_context.set(new Pkg(package_json, src_json)); + library_context.set(new Library(library_json)); let show_settings = $state(false); diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index a4fcc596..8975a391 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -2,15 +2,15 @@ import DocsFooter from '@ryanatkn/fuz/DocsFooter.svelte'; import Card from '@ryanatkn/fuz/Card.svelte'; import {resolve} from '$app/paths'; - import {pkg_context} from '@ryanatkn/fuz/pkg.svelte.js'; + import {library_context} from '@ryanatkn/fuz/library.svelte.js'; import MainHeader from '$routes/MainHeader.svelte'; - const pkg = pkg_context.get(); + const library = library_context.get(); - {pkg.package_json.name} + {library.package_json.name}
@@ -20,7 +20,9 @@
  • - docs{#snippet icon()}{pkg.package_json.glyph}{/snippet} + docs{#snippet icon()}{library.package_json.glyph}{/snippet}
  • tree @@ -37,7 +39,7 @@
  • - + {#snippet logo_header()}about{/snippet} {#snippet logo_footer()}fuz.dev{/snippet} diff --git a/src/routes/about/+page.svelte b/src/routes/about/+page.svelte index da358e61..dc2ac45f 100644 --- a/src/routes/about/+page.svelte +++ b/src/routes/about/+page.svelte @@ -1,26 +1,26 @@ - about {pkg.package_json.glyph} {pkg.package_json.name} + about {library.package_json.glyph} {library.package_json.name}
    - +
    - +
    diff --git a/src/routes/docs/+layout.svelte b/src/routes/docs/+layout.svelte index becd20d3..b30d8b86 100644 --- a/src/routes/docs/+layout.svelte +++ b/src/routes/docs/+layout.svelte @@ -1,7 +1,7 @@ - + {@render children()} diff --git a/src/routes/docs/+page.svelte b/src/routes/docs/+page.svelte index dfbcd5bf..d948ab15 100644 --- a/src/routes/docs/+page.svelte +++ b/src/routes/docs/+page.svelte @@ -1,13 +1,13 @@ - + diff --git a/src/routes/docs/library/+page.svelte b/src/routes/docs/library/+page.svelte new file mode 100644 index 00000000..cdc53d03 --- /dev/null +++ b/src/routes/docs/library/+page.svelte @@ -0,0 +1,16 @@ + + + +
    + +
    +
    diff --git a/src/routes/docs/package/+page.svelte b/src/routes/docs/package/+page.svelte deleted file mode 100644 index 42490892..00000000 --- a/src/routes/docs/package/+page.svelte +++ /dev/null @@ -1,16 +0,0 @@ - - - -
    - -
    -
    diff --git a/src/routes/docs/tomes.ts b/src/routes/docs/tomes.ts index faed3928..836a69c4 100644 --- a/src/routes/docs/tomes.ts +++ b/src/routes/docs/tomes.ts @@ -1,6 +1,6 @@ import type {Tome} from '@ryanatkn/fuz/tome.js'; import ApiPage from '$routes/docs/api/+page.svelte'; -import PackagePage from '$routes/docs/package/+page.svelte'; +import LibraryPage from '$routes/docs/library/+page.svelte'; export const tomes: Array = [ { @@ -9,14 +9,14 @@ export const tomes: Array = [ Component: ApiPage, related_tomes: [], related_modules: [], - related_identifiers: [], + related_declarations: [], }, { - name: 'package', + name: 'library', category: 'reference', - Component: PackagePage, + Component: LibraryPage, related_tomes: [], related_modules: [], - related_identifiers: [], + related_declarations: [], }, ]; diff --git a/src/routes/library.gen.ts b/src/routes/library.gen.ts new file mode 100644 index 00000000..bebc5cb2 --- /dev/null +++ b/src/routes/library.gen.ts @@ -0,0 +1,3 @@ +import {library_gen} from '@ryanatkn/fuz/library_gen.js'; + +export const gen = library_gen(); diff --git a/src/routes/library.ts b/src/routes/library.ts new file mode 100644 index 00000000..ba7039d3 --- /dev/null +++ b/src/routes/library.ts @@ -0,0 +1,4612 @@ +// generated by library.gen.ts !! do not edit directly or risk lost data + +import type {LibraryJson} from '@ryanatkn/belt/library_json.js'; + +export const library_json: LibraryJson = { + package_json: { + name: '@ryanatkn/fuz_gitops', + version: '0.54.0', + description: 'a tool for managing many repos', + glyph: '🪄', + logo: 'logo.svg', + logo_alt: 'a friendly blue spider facing you', + public: true, + license: 'MIT', + homepage: 'https://gitops.fuz.dev/', + repository: 'https://github.com/ryanatkn/fuz_gitops', + author: { + name: 'Ryan Atkinson', + email: 'mail@ryanatkn.com', + url: 'https://www.ryanatkn.com/', + }, + bugs: 'https://github.com/ryanatkn/fuz_gitops/issues', + funding: 'https://www.ryanatkn.com/funding', + scripts: { + start: 'gro dev', + dev: 'gro dev', + build: 'gro build', + check: 'gro check', + test: 'gro test', + preview: 'vite preview', + deploy: 'gro deploy', + }, + type: 'module', + engines: { + node: '>=22.15', + }, + peerDependencies: { + '@ryanatkn/belt': '>=0.40.0', + '@ryanatkn/fuz': '>=0.165.0', + '@ryanatkn/gro': '>=0.179.0', + '@ryanatkn/moss': '>=0.39.0', + '@sveltejs/kit': '^2', + svelte: '^5', + zod: '^4.1.13', + }, + devDependencies: { + '@changesets/changelog-git': '^0.2.1', + '@ryanatkn/belt': '^0.40.0', + '@ryanatkn/eslint-config': '^0.9.0', + '@ryanatkn/fuz': '^0.165.0', + '@ryanatkn/fuz_code': '^0.36.0', + '@ryanatkn/gro': '^0.179.0', + '@ryanatkn/moss': '^0.39.0', + '@sveltejs/adapter-static': '^3.0.10', + '@sveltejs/kit': '^2.49.0', + '@sveltejs/package': '^2.5.6', + '@sveltejs/vite-plugin-svelte': '^6.2.1', + '@types/node': '^24.10.1', + eslint: '^9.39.1', + 'eslint-plugin-svelte': '^3.13.0', + prettier: '^3.6.2', + 'prettier-plugin-svelte': '^3.4.0', + svelte: '^5.44.1', + 'svelte-check': '^4.3.4', + tslib: '^2.8.1', + typescript: '^5.9.3', + 'typescript-eslint': '^8.48.0', + vitest: '^4.0.14', + }, + prettier: { + plugins: ['prettier-plugin-svelte'], + useTabs: true, + printWidth: 100, + singleQuote: true, + bracketSpacing: false, + overrides: [ + { + files: 'package.json', + options: { + useTabs: false, + }, + }, + ], + }, + sideEffects: ['**/*.css'], + files: ['dist', 'src/lib/**/*.ts', '!src/lib/**/*.test.*', '!dist/**/*.test.*'], + exports: { + './package.json': './package.json', + './*.js': { + types: './dist/*.d.ts', + default: './dist/*.js', + }, + './*.ts': { + types: './dist/*.d.ts', + default: './dist/*.js', + }, + './*.svelte': { + types: './dist/*.svelte.d.ts', + svelte: './dist/*.svelte', + default: './dist/*.svelte', + }, + }, + }, + source_json: { + name: '@ryanatkn/fuz_gitops', + version: '0.54.0', + modules: [ + { + path: 'changeset_generator.ts', + declarations: [ + { + name: 'DependencyVersionChange', + kind: 'type', + source_line: 16, + type_signature: 'DependencyVersionChange', + properties: [ + { + name: 'package_name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'from_version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'to_version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'bump_type', + kind: 'variable', + type_signature: "'major' | 'minor' | 'patch'", + }, + { + name: 'breaking', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'create_changeset_for_dependency_updates', + kind: 'function', + doc_comment: + 'Creates a changeset file for dependency updates.\nReturns the path to the created changeset file.', + source_line: 28, + type_signature: + '(repo: LocalRepo, updates: DependencyVersionChange[], log?: Logger | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'repo', + type: 'LocalRepo', + optional: false, + }, + { + name: 'updates', + type: 'DependencyVersionChange[]', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'generate_changeset_content', + kind: 'function', + doc_comment: + 'Generates markdown changeset content for dependency updates.\n\nCreates properly formatted changeset with YAML frontmatter, summary,\nand categorized list of breaking vs regular updates. Output format\nmatches changesets CLI for consistency.', + source_line: 94, + type_signature: + '(package_name: string, updates: DependencyVersionChange[], bump_type: "major" | "minor" | "patch"): string', + return_type: 'string', + return_description: 'markdown content ready to write to .changeset/*.md file', + parameters: [ + { + name: 'package_name', + type: 'string', + optional: false, + description: 'package receiving the dependency updates', + }, + { + name: 'updates', + type: 'DependencyVersionChange[]', + optional: false, + description: 'list of dependency changes with version info', + }, + { + name: 'bump_type', + type: '"major" | "minor" | "patch"', + optional: false, + description: 'required bump type (calculated from breaking changes)', + }, + ], + }, + { + name: 'create_dependency_updates', + kind: 'function', + source_line: 138, + type_signature: + '(dependencies: Map, published_versions: Map): DependencyVersionChange[]', + return_type: 'DependencyVersionChange[]', + parameters: [ + { + name: 'dependencies', + type: 'Map', + optional: false, + }, + { + name: 'published_versions', + type: 'Map', + optional: false, + }, + ], + }, + ], + module_comment: + 'Auto-generation of changesets for dependency updates during publishing.\n\nCreates changesets when packages need to republish due to updated dependencies.\nFor parsing existing changesets, see `changeset_reader.ts`.', + dependencies: ['version_utils.ts'], + dependents: ['dependency_updater.ts'], + }, + { + path: 'changeset_reader.ts', + declarations: [ + { + name: 'ChangesetInfo', + kind: 'type', + source_line: 17, + type_signature: 'ChangesetInfo', + properties: [ + { + name: 'filename', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'packages', + kind: 'variable', + type_signature: 'Array<{name: string; bump_type: BumpType}>', + }, + { + name: 'summary', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'parse_changeset_content', + kind: 'function', + doc_comment: + 'Parses changeset content string from markdown format.\n\nPure function for testability - no file I/O, just string parsing.\nExtracts package names, bump types, and summary from YAML frontmatter format.\nReturns null if format is invalid or no packages found.\n\nExpected format:\n---\n"package-name": patch\n"@scope/package": minor\n---\n\nSummary of changes', + source_line: 42, + type_signature: '(content: string, filename?: string): ChangesetInfo | null', + return_type: 'ChangesetInfo | null', + return_description: 'parsed changeset info or null if invalid format', + parameters: [ + { + name: 'content', + type: 'string', + optional: false, + description: 'changeset markdown with YAML frontmatter', + }, + { + name: 'filename', + type: 'string', + optional: false, + description: 'optional filename for error reporting context', + default_value: "'changeset.md'", + }, + ], + }, + { + name: 'parse_changeset_file', + kind: 'function', + source_line: 82, + type_signature: + '(filepath: string, log?: Logger | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'filepath', + type: 'string', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'read_changesets', + kind: 'function', + source_line: 103, + type_signature: '(repo: LocalRepo, log?: Logger | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'repo', + type: 'LocalRepo', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'determine_bump_from_changesets', + kind: 'function', + doc_comment: + 'Determines the bump type for a package from its changesets.\n\nWhen multiple changesets exist for the same package, returns the highest\nbump type (major > minor > patch) to ensure the most significant change\nis reflected in the version bump.', + source_line: 139, + type_signature: '(changesets: ChangesetInfo[], package_name: string): BumpType | null', + return_type: 'BumpType | null', + return_description: 'the highest bump type, or null if package has no changesets', + parameters: [ + { + name: 'changesets', + type: 'ChangesetInfo[]', + optional: false, + }, + { + name: 'package_name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'has_changesets', + kind: 'function', + doc_comment: + "Checks if a repo has any changeset files (excluding README.md).\n\nUsed by preflight checks and publishing workflow to determine which packages\nneed to be published. Returns false if .changeset directory doesn't exist\nor contains only README.md.", + source_line: 167, + type_signature: '(repo: LocalRepo): Promise', + return_type: 'Promise', + return_description: 'true if repo has unpublished changesets', + parameters: [ + { + name: 'repo', + type: 'LocalRepo', + optional: false, + }, + ], + }, + { + name: 'predict_next_version', + kind: 'function', + doc_comment: + 'Predicts the next version by analyzing all changesets in a repo.\n\nReads all changesets, determines the highest bump type for the package,\nand calculates the next version. Returns null if no changesets found.\n\nCritical for dry-run mode accuracy - allows simulating publishes without\nactually running `gro publish` which consumes changesets.', + source_line: 193, + type_signature: + '(repo: LocalRepo, log?: Logger | undefined): Promise<{ version: string; bump_type: BumpType; } | null>', + return_type: 'Promise<{ version: string; bump_type: BumpType; } | null>', + return_description: 'predicted version and bump type, or null if no changesets', + parameters: [ + { + name: 'repo', + type: 'LocalRepo', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + ], + module_comment: + 'Changeset parsing and version prediction from `.changeset/*.md` files.\n\nReads changesets to determine which packages need publishing and their version bumps.\nFor auto-generating changesets during publishing, see `changeset_generator.ts`.', + dependencies: ['version_utils.ts'], + dependents: ['operations_defaults.ts'], + }, + { + path: 'constants.ts', + declarations: [ + { + name: 'MAX_ITERATIONS', + kind: 'variable', + doc_comment: + 'Maximum number of iterations for fixed-point iteration during publishing.\nUsed in both plan generation and actual publishing to resolve transitive dependency cascades.\n\nIn practice, most repos converge in 2-3 iterations.\nDeep dependency chains may require more iterations.', + source_line: 8, + type_signature: '10', + }, + ], + dependents: ['multi_repo_publisher.ts', 'publishing_plan.ts'], + }, + { + path: 'dependency_graph.ts', + declarations: [ + { + name: 'DEPENDENCY_TYPE', + kind: 'variable', + source_line: 11, + type_signature: + '{ readonly PROD: "prod"; readonly PEER: "peer"; readonly DEV: "dev"; }', + }, + { + name: 'DependencyType', + kind: 'type', + source_line: 17, + type_signature: 'DependencyType', + }, + { + name: 'DependencySpec', + kind: 'type', + source_line: 19, + type_signature: 'DependencySpec', + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: 'DependencyType', + }, + { + name: 'version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'resolved', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'DependencyGraphJson', + kind: 'type', + source_line: 25, + type_signature: 'DependencyGraphJson', + properties: [ + { + name: 'nodes', + kind: 'variable', + type_signature: + 'Array<{\n\t\tname: string;\n\t\tversion: string;\n\t\tdependencies: Array<{name: string; spec: DependencySpec}>;\n\t\tdependents: Array;\n\t\tpublishable: boolean;\n\t}>', + }, + { + name: 'edges', + kind: 'variable', + type_signature: 'Array<{from: string; to: string}>', + }, + ], + }, + { + name: 'DependencyNode', + kind: 'type', + source_line: 36, + type_signature: 'DependencyNode', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo', + kind: 'variable', + type_signature: 'LocalRepo', + }, + { + name: 'dependencies', + kind: 'variable', + type_signature: 'Map', + }, + { + name: 'dependents', + kind: 'variable', + type_signature: 'Set', + }, + { + name: 'publishable', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'DependencyGraph', + kind: 'class', + source_line: 45, + members: [ + { + name: 'nodes', + kind: 'variable', + type_signature: 'Map', + }, + { + name: 'edges', + kind: 'variable', + type_signature: 'Map>', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: '(): DependencyGraph', + parameters: [], + }, + { + name: 'init_from_repos', + kind: 'function', + modifiers: ['public'], + type_signature: '(repos: LocalRepo[]): void', + return_type: 'void', + parameters: [ + { + name: 'repos', + type: 'LocalRepo[]', + optional: false, + }, + ], + }, + { + name: 'get_node', + kind: 'function', + type_signature: '(name: string): DependencyNode | undefined', + return_type: 'DependencyNode | undefined', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'get_dependents', + kind: 'function', + type_signature: '(name: string): Set', + return_type: 'Set', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'get_dependencies', + kind: 'function', + type_signature: '(name: string): Map', + return_type: 'Map', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'topological_sort', + kind: 'function', + doc_comment: + "Computes topological sort order for dependency graph.\n\nUses Kahn's algorithm with alphabetical ordering within tiers for\ndeterministic results. Throws if cycles detected.", + type_signature: '(exclude_dev?: boolean): string[]', + return_type: 'string[]', + return_description: + 'array of package names in dependency order (dependencies before dependents)', + parameters: [ + { + name: 'exclude_dev', + type: 'boolean', + optional: false, + description: + 'if true, excludes dev dependencies to break cycles.\nPublishing uses exclude_dev=true to handle circular dev deps.', + default_value: 'false', + }, + ], + throws: [ + { + type: 'if', + description: 'circular dependencies detected in included dependency types', + }, + ], + }, + { + name: 'detect_cycles', + kind: 'function', + type_signature: '(): string[][]', + return_type: 'string[][]', + parameters: [], + }, + { + name: 'detect_cycles_by_type', + kind: 'function', + doc_comment: + 'Detects circular dependencies, categorized by severity.\n\nProduction/peer cycles prevent publishing (impossible to order packages).\nDev cycles are normal (test utils, shared configs) and safely ignored.\n\nUses DFS traversal with recursion stack to identify back edges.\nDeduplicates cycles using sorted cycle keys.', + type_signature: '(): { production_cycles: string[][]; dev_cycles: string[][]; }', + return_type: '{ production_cycles: string[][]; dev_cycles: string[][]; }', + return_description: 'object with production_cycles (errors) and dev_cycles (info)', + parameters: [], + }, + { + name: 'toJSON', + kind: 'function', + type_signature: '(): DependencyGraphJson', + return_type: 'DependencyGraphJson', + parameters: [], + }, + ], + }, + { + name: 'DependencyGraphBuilder', + kind: 'class', + doc_comment: 'Builder for creating and analyzing dependency graphs.', + source_line: 369, + members: [ + { + name: 'build_from_repos', + kind: 'function', + doc_comment: + 'Constructs dependency graph from local repos.\n\nTwo-pass algorithm: first creates nodes, then builds edges (dependents).\nPrioritizes prod/peer deps over dev deps when same package appears in\nmultiple dependency types (stronger constraint wins).', + type_signature: '(repos: LocalRepo[]): DependencyGraph', + return_type: 'DependencyGraph', + return_description: 'fully initialized dependency graph with all nodes and edges', + parameters: [ + { + name: 'repos', + type: 'LocalRepo[]', + optional: false, + }, + ], + }, + { + name: 'compute_publishing_order', + kind: 'function', + doc_comment: + 'Computes publishing order using topological sort with dev deps excluded.\n\nExcludes dev dependencies to break circular dev dependency cycles while\npreserving production/peer dependency ordering. This allows patterns like\nshared test utilities that depend on each other for development.', + type_signature: '(graph: DependencyGraph): string[]', + return_type: 'string[]', + return_description: + 'package names in safe publishing order (dependencies before dependents)', + parameters: [ + { + name: 'graph', + type: 'DependencyGraph', + optional: false, + }, + ], + throws: [ + { + type: 'if', + description: + 'production/peer cycles detected (cannot be resolved by exclusion)', + }, + ], + }, + { + name: 'analyze', + kind: 'function', + type_signature: + '(graph: DependencyGraph): { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + return_type: + '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + parameters: [ + { + name: 'graph', + type: 'DependencyGraph', + optional: false, + }, + ], + }, + ], + }, + ], + module_comment: + 'Dependency graph data structure and algorithms for multi-repo publishing.\n\nProvides `DependencyGraph` class with topological sort and cycle detection.\nFor validation workflow and publishing order computation, see `graph_validation.ts`.', + dependents: ['gitops_analyze.task.ts', 'gitops_validate.task.ts', 'graph_validation.ts'], + }, + { + path: 'dependency_updater.ts', + declarations: [ + { + name: 'VersionStrategy', + kind: 'type', + source_line: 14, + type_signature: 'VersionStrategy', + }, + { + name: 'update_package_json', + kind: 'function', + doc_comment: + 'Updates package.json dependencies and creates changeset if needed.\n\nWorkflow:\n1. Updates all dependency types (dependencies, devDependencies, peerDependencies)\n2. Writes updated package.json with tabs formatting\n3. Creates auto-changeset if published_versions provided (for transitive updates)\n4. Commits both package.json and changeset with standard message\n\nUses version strategy to determine prefix (exact, caret, tilde) while preserving\nexisting prefixes when possible.', + throws: [ + { + type: 'if', + description: 'file operations or git operations fail', + }, + ], + source_line: 32, + type_signature: + '(repo: LocalRepo, updates: Map, strategy?: VersionStrategy, published_versions?: Map | undefined, log?: Logger | undefined, git_ops?: GitOperations, fs_ops?: FsOperations): Promise<...>', + return_type: 'Promise', + parameters: [ + { + name: 'repo', + type: 'LocalRepo', + optional: false, + }, + { + name: 'updates', + type: 'Map', + optional: false, + }, + { + name: 'strategy', + type: 'VersionStrategy', + optional: false, + description: 'how to format version ranges (default: caret)', + default_value: "'caret'", + }, + { + name: 'published_versions', + type: 'Map | undefined', + optional: true, + description: 'if provided, generates auto-changesets for updates', + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'git_ops', + type: 'GitOperations', + optional: false, + default_value: 'default_git_operations', + }, + { + name: 'fs_ops', + type: 'FsOperations', + optional: false, + default_value: 'default_fs_operations', + }, + ], + }, + { + name: 'update_all_repos', + kind: 'function', + source_line: 165, + type_signature: + '(repos: LocalRepo[], published: Map, strategy?: VersionStrategy, log?: Logger | undefined, git_ops?: GitOperations, fs_ops?: FsOperations): Promise<...>', + return_type: 'Promise<{ updated: number; failed: { repo: string; error: Error; }[]; }>', + parameters: [ + { + name: 'repos', + type: 'LocalRepo[]', + optional: false, + }, + { + name: 'published', + type: 'Map', + optional: false, + }, + { + name: 'strategy', + type: 'VersionStrategy', + optional: false, + default_value: "'caret'", + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'git_ops', + type: 'GitOperations', + optional: false, + default_value: 'default_git_operations', + }, + { + name: 'fs_ops', + type: 'FsOperations', + optional: false, + default_value: 'default_fs_operations', + }, + ], + }, + { + name: 'find_updates_needed', + kind: 'function', + source_line: 223, + type_signature: + '(repo: LocalRepo, published: Map): Map', + return_type: + 'Map', + parameters: [ + { + name: 'repo', + type: 'LocalRepo', + optional: false, + }, + { + name: 'published', + type: 'Map', + optional: false, + }, + ], + }, + ], + dependencies: ['changeset_generator.ts', 'operations_defaults.ts', 'version_utils.ts'], + dependents: ['multi_repo_publisher.ts'], + }, + { + path: 'fetch_repo_data.ts', + declarations: [ + { + name: 'fetch_repo_data', + kind: 'function', + doc_comment: + 'Fetches GitHub metadata (CI status, PRs) for all repos.\n\nFetches sequentially with delay between requests to respect GitHub API rate limits.\nUses `await_in_loop` intentionally to avoid parallel requests overwhelming the API.\n\nError handling: Logs fetch failures but continues processing remaining repos.\nRepos with failed fetches will have `null` for check_runs or pull_requests.', + source_line: 24, + type_signature: + '(resolved_repos: LocalRepo[], token?: string | undefined, cache?: Map | undefined, log?: Logger | undefined, delay?: number, github_api_version?: string | undefined): Promise<...>', + return_type: 'Promise', + return_description: 'array of Repo objects with GitHub metadata attached', + parameters: [ + { + name: 'resolved_repos', + type: 'LocalRepo[]', + optional: false, + }, + { + name: 'token', + type: 'string | undefined', + optional: true, + }, + { + name: 'cache', + type: 'Map | undefined', + optional: true, + description: "optional cache from belt's fetch.js for response memoization", + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'delay', + type: 'number', + optional: false, + description: 'milliseconds between API requests (default: 33ms)', + default_value: '33', + }, + { + name: 'github_api_version', + type: 'string | undefined', + optional: true, + }, + ], + }, + ], + dependencies: ['github.ts'], + dependents: ['gitops_sync.task.ts'], + }, + { + path: 'fs_fetch_value_cache.ts', + declarations: [ + { + name: 'FetchCache', + kind: 'type', + source_line: 10, + type_signature: 'FetchCache', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'data', + kind: 'variable', + type_signature: 'FetchValueCache', + }, + { + name: 'save', + kind: 'variable', + type_signature: '() => Promise', + doc_comment: '', + }, + ], + }, + { + name: 'create_fs_fetch_value_cache', + kind: 'function', + doc_comment: + "Creates file-system backed cache for belt's fetch.js API responses.\n\nCache invalidation strategy: If cache file can't be read or parsed, entire\ncache is cleared (delete file) and starts fresh. This handles format changes.\n\nUses `structuredClone` to track changes - only writes to disk if data modified.\nFormatted with Prettier before writing for version control friendliness.", + source_line: 32, + type_signature: '(name: string, dir?: string): Promise', + return_type: 'Promise', + return_description: 'cache object with Map-based data and save() method', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + description: 'cache filename (without .json extension)', + }, + { + name: 'dir', + type: 'string', + optional: false, + description: 'cache directory (defaults to `.gro/build/fetch/`)', + default_value: "join(paths.build, 'fetch')", + }, + ], + }, + ], + dependents: ['gitops_sync.task.ts'], + }, + { + path: 'git_operations.ts', + declarations: [ + { + name: 'git_add', + kind: 'function', + doc_comment: 'Adds files to git staging area and throws if anything goes wrong.', + source_line: 16, + type_signature: + '(files: string | string[], options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'files', + type: 'string | string[]', + optional: false, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_commit', + kind: 'function', + doc_comment: 'Commits staged changes with a message and throws if anything goes wrong.', + source_line: 30, + type_signature: '(message: string, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'message', + type: 'string', + optional: false, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_add_and_commit', + kind: 'function', + doc_comment: + 'Adds files and commits in one operation and throws if anything goes wrong.', + source_line: 40, + type_signature: + '(files: string | string[], message: string, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'files', + type: 'string | string[]', + optional: false, + }, + { + name: 'message', + type: 'string', + optional: false, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_tag', + kind: 'function', + doc_comment: 'Creates a git tag and throws if anything goes wrong.', + source_line: 52, + type_signature: + '(tag_name: string, message?: string | undefined, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'tag_name', + type: 'string', + optional: false, + }, + { + name: 'message', + type: 'string | undefined', + optional: true, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_push_tag', + kind: 'function', + doc_comment: 'Pushes a tag to origin and throws if anything goes wrong.', + source_line: 68, + type_signature: + '(tag_name: string, origin?: GitOrigin, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'tag_name', + type: 'string', + optional: false, + }, + { + name: 'origin', + type: 'GitOrigin', + optional: false, + default_value: "'origin' as GitOrigin", + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_has_changes', + kind: 'function', + source_line: 79, + type_signature: '(options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_get_changed_files', + kind: 'function', + doc_comment: 'Returns list of changed files compared to HEAD.', + source_line: 87, + type_signature: '(options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_has_file_changed', + kind: 'function', + source_line: 97, + type_signature: + '(from_commit: string, to_commit: string, file_path: string, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'from_commit', + type: 'string', + optional: false, + }, + { + name: 'to_commit', + type: 'string', + optional: false, + }, + { + name: 'file_path', + type: 'string', + optional: false, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_stash', + kind: 'function', + doc_comment: 'Stashes current changes and throws if anything goes wrong.', + source_line: 114, + type_signature: + '(message?: string | undefined, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'message', + type: 'string | undefined', + optional: true, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_stash_pop', + kind: 'function', + doc_comment: 'Applies stashed changes and throws if anything goes wrong.', + source_line: 126, + type_signature: '(options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_switch_branch', + kind: 'function', + doc_comment: + 'Switches to a branch with safety checks and throws if workspace is not clean.', + source_line: 136, + type_signature: + '(branch: GitBranch, pull?: boolean, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'branch', + type: 'GitBranch', + optional: false, + }, + { + name: 'pull', + type: 'boolean', + optional: false, + default_value: 'true', + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_current_branch_name_required', + kind: 'function', + doc_comment: "Wrapper for gro's git_current_branch_name that throws if null.", + source_line: 165, + type_signature: '(options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_current_commit_hash_required', + kind: 'function', + doc_comment: "Wrapper for gro's git_current_commit_hash that throws if null.", + source_line: 176, + type_signature: + '(branch?: string | undefined, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'branch', + type: 'string | undefined', + optional: true, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_check_clean_workspace_as_boolean', + kind: 'function', + doc_comment: "Wrapper for gro's git_check_clean_workspace that returns a boolean.", + source_line: 190, + type_signature: '(options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_has_remote', + kind: 'function', + source_line: 197, + type_signature: + '(remote?: string, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'remote', + type: 'string', + optional: false, + default_value: "'origin'", + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + ], + dependents: ['operations_defaults.ts'], + }, + { + path: 'github_helpers.ts', + declarations: [ + { + name: 'FilterPullRequest', + kind: 'type', + source_line: 6, + type_signature: 'FilterPullRequest', + }, + { + name: 'PullRequestMeta', + kind: 'type', + source_line: 8, + type_signature: 'PullRequestMeta', + properties: [ + { + name: 'repo', + kind: 'variable', + type_signature: 'Repo', + }, + { + name: 'pull_request', + kind: 'variable', + type_signature: 'GithubPullRequest', + }, + ], + }, + { + name: 'to_pull_requests', + kind: 'function', + source_line: 13, + type_signature: + '(repos: Repo[], filter_pull_request?: FilterPullRequest | undefined): PullRequestMeta[]', + return_type: 'PullRequestMeta[]', + parameters: [ + { + name: 'repos', + type: 'Repo[]', + optional: false, + }, + { + name: 'filter_pull_request', + type: 'FilterPullRequest | undefined', + optional: true, + }, + ], + }, + { + name: 'to_pull_url', + kind: 'function', + source_line: 30, + type_signature: + '(repo_url: string, pull: { number: number; title: string; user: { login: string; }; draft: boolean; }): string', + return_type: 'string', + parameters: [ + { + name: 'repo_url', + type: 'string', + optional: false, + }, + { + name: 'pull', + type: '{ number: number; title: string; user: { login: string; }; draft: boolean; }', + optional: false, + }, + ], + }, + ], + dependents: ['PullRequestsDetail.svelte', 'ReposTable.svelte'], + }, + { + path: 'github.ts', + declarations: [ + { + name: 'GithubRepoInfo', + kind: 'type', + doc_comment: 'Minimal interface for GitHub API calls - works with both Pkg and Repo.', + source_line: 8, + type_signature: 'GithubRepoInfo', + properties: [ + { + name: 'owner_name', + kind: 'variable', + type_signature: 'string | null', + }, + { + name: 'repo_name', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'GithubPullRequest', + kind: 'type', + doc_comment: '', + see_also: [ + 'https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests', + ], + source_line: 16, + type_signature: + 'ZodObject<{ number: ZodNumber; title: ZodString; user: ZodObject<{ login: ZodString; }, $strip>; draft: ZodBoolean; }, $strip>', + }, + { + name: 'GithubPullRequests', + kind: 'type', + source_line: 25, + type_signature: + 'ZodArray; draft: ZodBoolean; }, $strip>>', + }, + { + name: 'fetch_github_pull_requests', + kind: 'function', + doc_comment: '', + see_also: [ + 'https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests', + ], + source_line: 31, + type_signature: + '(repo_info: GithubRepoInfo, cache?: Map | undefined, log?: Logger | undefined, token?: string | undefined, api_version?: string | undefined): Promise<...>', + return_type: + 'Promise<{ number: number; title: string; user: { login: string; }; draft: boolean; }[] | null>', + parameters: [ + { + name: 'repo_info', + type: 'GithubRepoInfo', + optional: false, + }, + { + name: 'cache', + type: 'Map | undefined', + optional: true, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'token', + type: 'string | undefined', + optional: true, + }, + { + name: 'api_version', + type: 'string | undefined', + optional: true, + }, + ], + }, + { + name: 'GithubCheckRunsItem', + kind: 'type', + doc_comment: '', + see_also: [ + 'https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#list-check-runs-for-a-git-reference', + ], + source_line: 63, + type_signature: + 'ZodObject<{ status: ZodEnum<{ queued: "queued"; in_progress: "in_progress"; completed: "completed"; }>; conclusion: ZodNullable>; }, $strip>', + }, + { + name: 'GithubCheckRuns', + kind: 'type', + source_line: 70, + type_signature: + 'ZodObject<{ total_count: ZodNumber; check_runs: ZodArray; conclusion: ZodNullable>; }, $strip>>; }, $strip>', + }, + { + name: 'fetch_github_check_runs', + kind: 'function', + doc_comment: '', + see_also: [ + 'https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#list-check-runs-for-a-git-reference', + ], + source_line: 79, + type_signature: + '(repo_info: GithubRepoInfo, cache?: Map | undefined, log?: Logger | undefined, token?: string | undefined, api_version?: string | undefined, ref?: string): Promise<...>', + return_type: + 'Promise<{ status: "queued" | "in_progress" | "completed"; conclusion: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | null; } | null>', + parameters: [ + { + name: 'repo_info', + type: 'GithubRepoInfo', + optional: false, + }, + { + name: 'cache', + type: 'Map | undefined', + optional: true, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'token', + type: 'string | undefined', + optional: true, + }, + { + name: 'api_version', + type: 'string | undefined', + optional: true, + }, + { + name: 'ref', + type: 'string', + optional: false, + default_value: "'main'", + }, + ], + }, + ], + dependents: ['fetch_repo_data.ts', 'repo.svelte.ts'], + }, + { + path: 'gitops_analyze.task.ts', + declarations: [], + dependencies: [ + 'dependency_graph.ts', + 'gitops_task_helpers.ts', + 'graph_validation.ts', + 'log_helpers.ts', + 'output_helpers.ts', + ], + }, + { + path: 'gitops_config.ts', + declarations: [ + { + name: 'GitopsConfig', + kind: 'type', + source_line: 19, + type_signature: 'GitopsConfig', + properties: [ + { + name: 'repos', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'repos_dir', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'CreateGitopsConfig', + kind: 'type', + source_line: 24, + type_signature: 'CreateGitopsConfig', + }, + { + name: 'RawGitopsConfig', + kind: 'type', + source_line: 28, + type_signature: 'RawGitopsConfig', + properties: [ + { + name: 'repos', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'repos_dir', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'GitopsRepoConfig', + kind: 'type', + source_line: 33, + type_signature: 'GitopsRepoConfig', + properties: [ + { + name: 'repo_url', + kind: 'variable', + type_signature: 'Url', + doc_comment: 'The HTTPS URL to the repo. Does not include a `.git` suffix.', + }, + { + name: 'repo_dir', + kind: 'variable', + type_signature: 'string | null', + doc_comment: + "Relative or absolute path to the repo's local directory.\nIf `null`, the directory is inferred from the URL and cwd.", + }, + { + name: 'branch', + kind: 'variable', + type_signature: 'GitBranch', + doc_comment: 'The branch name to use when fetching the repo. Defaults to `main`.', + }, + ], + }, + { + name: 'RawGitopsRepoConfig', + kind: 'type', + source_line: 54, + type_signature: 'RawGitopsRepoConfig', + properties: [ + { + name: 'repo_url', + kind: 'variable', + type_signature: 'Url', + }, + { + name: 'repo_dir', + kind: 'variable', + type_signature: 'string | null', + }, + { + name: 'branch', + kind: 'variable', + type_signature: 'GitBranch', + }, + ], + }, + { + name: 'create_empty_gitops_config', + kind: 'function', + source_line: 60, + type_signature: '(): GitopsConfig', + return_type: 'GitopsConfig', + parameters: [], + }, + { + name: 'normalize_gitops_config', + kind: 'function', + doc_comment: + 'Transforms a `RawGitopsConfig` to the more strict `GitopsConfig`.\nThis allows users to provide a more relaxed config.', + source_line: 69, + type_signature: '(raw_config: RawGitopsConfig): GitopsConfig', + return_type: 'GitopsConfig', + parameters: [ + { + name: 'raw_config', + type: 'RawGitopsConfig', + optional: false, + }, + ], + }, + { + name: 'GitopsConfigModule', + kind: 'type', + source_line: 92, + type_signature: 'GitopsConfigModule', + properties: [ + { + name: 'default', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'RawGitopsConfig | CreateGitopsConfig', + }, + ], + }, + { + name: 'load_gitops_config', + kind: 'function', + source_line: 96, + type_signature: '(config_path: string): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'config_path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'validate_gitops_config_module', + kind: 'function', + source_line: 111, + type_signature: + '(config_module: any, config_path: string): asserts config_module is GitopsConfigModule', + return_type: 'void', + parameters: [ + { + name: 'config_module', + type: 'any', + optional: false, + }, + { + name: 'config_path', + type: 'string', + optional: false, + }, + ], + }, + ], + module_comment: + 'Configuration types and normalization for gitops multi-repo management.\n\nTwo-phase configuration system:\n- `RawGitopsConfig` - User-friendly format with optional fields and flexible types\n- `GitopsConfig` - Internal format with required fields and strict types\n\nThis allows users to provide minimal configs (e.g., just URLs as strings) while\nthe system works with normalized configs internally for type safety.', + dependencies: ['paths.ts'], + dependents: ['gitops_task_helpers.ts', 'repo_ops.ts'], + }, + { + path: 'gitops_plan.task.ts', + declarations: [], + dependencies: ['gitops_task_helpers.ts', 'output_helpers.ts', 'publishing_plan.ts'], + }, + { + path: 'gitops_publish.task.ts', + declarations: [], + dependencies: [ + 'gitops_task_helpers.ts', + 'multi_repo_publisher.ts', + 'output_helpers.ts', + 'publishing_plan.ts', + ], + }, + { + path: 'gitops_sync.task.ts', + declarations: [], + dependencies: ['fetch_repo_data.ts', 'fs_fetch_value_cache.ts', 'gitops_task_helpers.ts'], + }, + { + path: 'gitops_task_helpers.ts', + declarations: [ + { + name: 'GetGitopsReadyOptions', + kind: 'type', + source_line: 29, + type_signature: 'GetGitopsReadyOptions', + properties: [ + { + name: 'path', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'dir', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'download', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'log', + kind: 'variable', + type_signature: 'Logger', + }, + { + name: 'git_ops', + kind: 'variable', + type_signature: 'GitOperations', + }, + { + name: 'npm_ops', + kind: 'variable', + type_signature: 'NpmOperations', + }, + ], + }, + { + name: 'get_gitops_ready', + kind: 'function', + doc_comment: + 'Central initialization function for all gitops tasks.\n\nInitialization sequence:\n1. Loads and normalizes config from `gitops.config.ts`\n2. Resolves local repo paths (creates missing with `--download`)\n3. Switches branches and pulls latest changes\n4. Auto-installs deps if package.json changed during pull\n\nPriority for path resolution:\n- `dir` argument (explicit override)\n- Config `repos_dir` setting\n- `DEFAULT_REPOS_DIR` constant', + throws: [ + { + type: 'if', + description: 'config loading or repo resolution fails', + }, + ], + source_line: 57, + type_signature: + '(options: GetGitopsReadyOptions): Promise<{ config_path: string; repos_dir: string; gitops_config: GitopsConfig; local_repos: LocalRepo[]; }>', + return_type: + 'Promise<{ config_path: string; repos_dir: string; gitops_config: GitopsConfig; local_repos: LocalRepo[]; }>', + return_description: 'initialized config and fully loaded repos ready for operations', + parameters: [ + { + name: 'options', + type: 'GetGitopsReadyOptions', + optional: false, + }, + ], + }, + { + name: 'ResolveGitopsPathsOptions', + kind: 'type', + source_line: 96, + type_signature: 'ResolveGitopsPathsOptions', + properties: [ + { + name: 'path', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'dir', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'config_repos_dir', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'resolve_gitops_paths', + kind: 'function', + source_line: 102, + type_signature: + '(options: ResolveGitopsPathsOptions): { config_path: string; repos_dir: string; }', + return_type: '{ config_path: string; repos_dir: string; }', + parameters: [ + { + name: 'options', + type: 'ResolveGitopsPathsOptions', + optional: false, + }, + ], + }, + { + name: 'import_gitops_config', + kind: 'function', + source_line: 120, + type_signature: '(config_path: string): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'config_path', + type: 'string', + optional: false, + }, + ], + }, + ], + module_comment: + 'Shared initialization logic for all gitops tasks.\n\nProvides `get_gitops_ready()` which orchestrates:\n- Config loading and normalization\n- Repo resolution (local path discovery)\n- Branch switching and syncing\n- Dependency installation\n\nUsed by: `gitops_sync.task.ts`, `gitops_analyze.task.ts`, `gitops_plan.task.ts`,\n`gitops_publish.task.ts`, and `gitops_validate.task.ts`.\n\nAccepts `git_ops` and `npm_ops` parameters to support testing via operations pattern\n(see `operations.ts` for dependency injection details).', + dependencies: [ + 'gitops_config.ts', + 'local_repo.ts', + 'paths.ts', + 'resolved_gitops_config.ts', + ], + dependents: [ + 'gitops_analyze.task.ts', + 'gitops_plan.task.ts', + 'gitops_publish.task.ts', + 'gitops_sync.task.ts', + 'gitops_validate.task.ts', + ], + }, + { + path: 'gitops_validate.task.ts', + declarations: [], + dependencies: [ + 'dependency_graph.ts', + 'gitops_task_helpers.ts', + 'graph_validation.ts', + 'log_helpers.ts', + 'multi_repo_publisher.ts', + 'publishing_plan.ts', + ], + }, + { + path: 'graph_validation.ts', + declarations: [ + { + name: 'GraphValidationResult', + kind: 'type', + source_line: 21, + type_signature: 'GraphValidationResult', + properties: [ + { + name: 'graph', + kind: 'variable', + type_signature: 'DependencyGraph', + }, + { + name: 'publishing_order', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'production_cycles', + kind: 'variable', + type_signature: 'Array>', + }, + { + name: 'dev_cycles', + kind: 'variable', + type_signature: 'Array>', + }, + { + name: 'sort_error', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'validate_dependency_graph', + kind: 'function', + doc_comment: + 'Shared utility for building dependency graph, detecting cycles, and computing publishing order.\nThis centralizes logic that was duplicated across multi_repo_publisher, publishing_plan, and gitops_analyze.', + throws: [ + { + type: 'if', + description: 'production cycles detected and throw_on_prod_cycles is true', + }, + ], + source_line: 39, + type_signature: + '(repos: LocalRepo[], log?: Logger | undefined, options?: { throw_on_prod_cycles?: boolean | undefined; log_cycles?: boolean | undefined; log_order?: boolean | undefined; }): GraphValidationResult', + return_type: 'GraphValidationResult', + return_description: + 'graph validation result with graph, publishing order, and detected cycles', + parameters: [ + { + name: 'repos', + type: 'LocalRepo[]', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'options', + type: '{ throw_on_prod_cycles?: boolean | undefined; log_cycles?: boolean | undefined; log_order?: boolean | undefined; }', + optional: false, + default_value: '{}', + }, + ], + }, + ], + module_comment: + 'Shared dependency graph validation logic used across multiple workflows.\n\nConsolidates graph building, cycle detection, and publishing order computation\nthat was duplicated in three places: `multi_repo_publisher.ts`, `publishing_plan.ts`,\nand `gitops_analyze.task.ts`.\n\nOptions pattern supports different behaviors: analyze can tolerate cycles for\nreporting, while publish must throw on production cycles.\n\nSee also: `dependency_graph.ts` for core graph data structure and algorithms.', + dependencies: ['dependency_graph.ts'], + dependents: [ + 'gitops_analyze.task.ts', + 'gitops_validate.task.ts', + 'multi_repo_publisher.ts', + 'publishing_plan.ts', + ], + }, + { + path: 'local_repo.ts', + declarations: [ + { + name: 'LocalRepo', + kind: 'type', + doc_comment: + 'Fully loaded local repo with Library and extracted dependency data.\nDoes not extend LocalRepoPath - Library is source of truth for name/repo_url/etc.', + source_line: 19, + type_signature: 'LocalRepo', + properties: [ + { + name: 'library', + kind: 'variable', + type_signature: 'Library', + }, + { + name: 'library_json', + kind: 'variable', + type_signature: 'LibraryJson', + }, + { + name: 'repo_dir', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_git_ssh_url', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_config', + kind: 'variable', + type_signature: 'GitopsRepoConfig', + }, + { + name: 'dependencies', + kind: 'variable', + type_signature: 'Map', + }, + { + name: 'dev_dependencies', + kind: 'variable', + type_signature: 'Map', + }, + { + name: 'peer_dependencies', + kind: 'variable', + type_signature: 'Map', + }, + ], + }, + { + name: 'LocalRepoPath', + kind: 'type', + doc_comment: + 'A repo that has been located on the filesystem (path exists).\nUsed before loading - just filesystem/git concerns.', + source_line: 34, + type_signature: 'LocalRepoPath', + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'local_repo_path'", + }, + { + name: 'repo_name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_dir', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_url', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_git_ssh_url', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_config', + kind: 'variable', + type_signature: 'GitopsRepoConfig', + }, + ], + }, + { + name: 'LocalRepoMissing', + kind: 'type', + doc_comment: 'A repo that is missing from the filesystem (needs cloning).', + source_line: 46, + type_signature: 'LocalRepoMissing', + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'local_repo_missing'", + }, + { + name: 'repo_name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_url', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_git_ssh_url', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_config', + kind: 'variable', + type_signature: 'GitopsRepoConfig', + }, + ], + }, + { + name: 'local_repo_load', + kind: 'function', + doc_comment: + 'Loads repo data with automatic syncing and dependency management.\n\nWorkflow:\n1. Records current commit hash (for detecting changes)\n2. Switches to target branch if needed (requires clean workspace)\n3. Pulls latest changes from remote (skipped for local-only repos)\n4. Validates workspace is clean after pull\n5. Auto-installs dependencies if package.json changed\n6. Imports library_json from src/routes/library.ts\n7. Creates Library and extracts dependency maps\n\nThis ensures repos are always in sync with their configured branch\nbefore being used by gitops commands.', + throws: [ + { + type: 'if', + description: + 'workspace dirty, branch switch fails, install fails, or library.ts missing', + }, + ], + source_line: 71, + type_signature: + '({ local_repo_path, log: _log, git_ops, npm_ops, }: { local_repo_path: LocalRepoPath; log?: Logger | undefined; git_ops?: GitOperations | undefined; npm_ops?: NpmOperations | undefined; }): Promise<...>', + return_type: 'Promise', + parameters: [ + { + name: '__0', + type: '{ local_repo_path: LocalRepoPath; log?: Logger | undefined; git_ops?: GitOperations | undefined; npm_ops?: NpmOperations | undefined; }', + optional: false, + }, + ], + }, + { + name: 'local_repos_ensure', + kind: 'function', + source_line: 228, + type_signature: + '({ resolved_config, repos_dir, gitops_config, download, log, npm_ops, }: { resolved_config: ResolvedGitopsConfig; repos_dir: string; gitops_config: GitopsConfig; download: boolean; log?: Logger | undefined; npm_ops?: NpmOperations | undefined; }): Promise<...>', + return_type: 'Promise', + parameters: [ + { + name: '__0', + type: '{ resolved_config: ResolvedGitopsConfig; repos_dir: string; gitops_config: GitopsConfig; download: boolean; log?: Logger | undefined; npm_ops?: NpmOperations | undefined; }', + optional: false, + }, + ], + }, + { + name: 'local_repos_load', + kind: 'function', + source_line: 278, + type_signature: + '({ local_repo_paths, log, git_ops, npm_ops, }: { local_repo_paths: LocalRepoPath[]; log?: Logger | undefined; git_ops?: GitOperations | undefined; npm_ops?: NpmOperations | undefined; }): Promise<...>', + return_type: 'Promise', + parameters: [ + { + name: '__0', + type: '{ local_repo_paths: LocalRepoPath[]; log?: Logger | undefined; git_ops?: GitOperations | undefined; npm_ops?: NpmOperations | undefined; }', + optional: false, + }, + ], + }, + { + name: 'local_repo_locate', + kind: 'function', + source_line: 296, + type_signature: + '({ repo_config, repos_dir, }: { repo_config: GitopsRepoConfig; repos_dir: string; }): LocalRepoPath | LocalRepoMissing', + return_type: 'LocalRepoPath | LocalRepoMissing', + parameters: [ + { + name: '__0', + type: '{ repo_config: GitopsRepoConfig; repos_dir: string; }', + optional: false, + }, + ], + }, + ], + dependencies: ['operations_defaults.ts'], + dependents: ['gitops_task_helpers.ts', 'resolved_gitops_config.ts'], + }, + { + path: 'log_helpers.ts', + declarations: [ + { + name: 'format_wildcard_dependencies', + kind: 'function', + doc_comment: + 'Formats wildcard dependencies as styled strings.\nReturns array of lines for inclusion in output.', + source_line: 10, + type_signature: + '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }): string[]', + return_type: 'string[]', + parameters: [ + { + name: 'analysis', + type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + optional: false, + }, + ], + }, + { + name: 'format_dev_cycles', + kind: 'function', + doc_comment: + 'Formats dev circular dependencies as styled strings.\nReturns array of lines for inclusion in output.', + source_line: 27, + type_signature: + '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }): string[]', + return_type: 'string[]', + parameters: [ + { + name: 'analysis', + type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + optional: false, + }, + ], + }, + { + name: 'format_production_cycles', + kind: 'function', + doc_comment: + 'Formats production/peer circular dependencies as styled strings.\nReturns array of lines for inclusion in output.', + source_line: 49, + type_signature: + '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }): string[]', + return_type: 'string[]', + parameters: [ + { + name: 'analysis', + type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + optional: false, + }, + ], + }, + { + name: 'log_wildcard_dependencies', + kind: 'function', + doc_comment: + 'Logs wildcard dependencies as warnings.\nWildcard dependencies require attention and should be reviewed.', + source_line: 71, + type_signature: + '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }, log: Logger, indent?: string): void', + return_type: 'void', + parameters: [ + { + name: 'analysis', + type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'indent', + type: 'string', + optional: false, + default_value: "''", + }, + ], + }, + { + name: 'log_dev_cycles', + kind: 'function', + doc_comment: + "Logs dev circular dependencies as info.\nDev cycles are normal and non-blocking, so they're informational, not warnings.", + source_line: 86, + type_signature: + '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }, log: Logger, indent?: string): void', + return_type: 'void', + parameters: [ + { + name: 'analysis', + type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'indent', + type: 'string', + optional: false, + default_value: "''", + }, + ], + }, + { + name: 'log_production_cycles', + kind: 'function', + doc_comment: + 'Logs production/peer circular dependencies as errors.\nProduction cycles block publishing and must be resolved.', + source_line: 101, + type_signature: + '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }, log: Logger, indent?: string): void', + return_type: 'void', + parameters: [ + { + name: 'analysis', + type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'indent', + type: 'string', + optional: false, + default_value: "''", + }, + ], + }, + { + name: 'log_dependency_analysis', + kind: 'function', + doc_comment: + 'Logs all dependency analysis results (wildcards, production cycles, dev cycles).\nConvenience function that calls all three logging functions in order.', + source_line: 116, + type_signature: + '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }, log: Logger, indent?: string): void', + return_type: 'void', + parameters: [ + { + name: 'analysis', + type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'indent', + type: 'string', + optional: false, + default_value: "''", + }, + ], + }, + { + name: 'log_list', + kind: 'function', + doc_comment: + 'Logs a simple bulleted list with a header.\nCommon pattern for warnings, info messages, and other lists.', + source_line: 130, + type_signature: + '(items: string[], header: string, color: "cyan" | "yellow" | "red" | "dim", log: Logger, log_method?: "info" | "warn" | "error"): void', + return_type: 'void', + parameters: [ + { + name: 'items', + type: 'string[]', + optional: false, + }, + { + name: 'header', + type: 'string', + optional: false, + }, + { + name: 'color', + type: '"cyan" | "yellow" | "red" | "dim"', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'log_method', + type: '"info" | "warn" | "error"', + optional: false, + default_value: "'info'", + }, + ], + }, + ], + dependents: ['gitops_analyze.task.ts', 'gitops_validate.task.ts', 'publishing_plan.ts'], + }, + { + path: 'ModulesDetail.svelte', + declarations: [ + { + name: 'ModulesDetail', + kind: 'component', + props: [ + { + name: 'repos', + type: 'Array', + optional: false, + }, + { + name: 'nav_footer', + type: 'Snippet', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['ModulesNav.svelte'], + dependents: ['ModulesPage.svelte'], + }, + { + path: 'ModulesNav.svelte', + declarations: [ + { + name: 'ModulesNav', + kind: 'component', + props: [ + { + name: 'repos_modules', + type: 'Array<{\n\t\t\trepo: Repo;\n\t\t\tmodules: Array;\n\t\t}>', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependents: ['ModulesDetail.svelte'], + }, + { + path: 'ModulesPage.svelte', + declarations: [ + { + name: 'ModulesPage', + kind: 'component', + props: [ + { + name: 'repo', + type: 'Repo', + optional: false, + }, + { + name: 'repos', + type: 'Array', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['ModulesDetail.svelte', 'PageFooter.svelte', 'PageHeader.svelte'], + }, + { + path: 'multi_repo_publisher.ts', + declarations: [ + { + name: 'PublishingOptions', + kind: 'type', + source_line: 18, + type_signature: 'PublishingOptions', + properties: [ + { + name: 'dry_run', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'update_deps', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'version_strategy', + kind: 'variable', + type_signature: 'VersionStrategy', + }, + { + name: 'deploy', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'max_wait', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'skip_install', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'log', + kind: 'variable', + type_signature: 'Logger', + }, + ], + }, + { + name: 'PublishedVersion', + kind: 'type', + source_line: 28, + type_signature: 'PublishedVersion', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'old_version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'new_version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'bump_type', + kind: 'variable', + type_signature: "'major' | 'minor' | 'patch'", + }, + { + name: 'breaking', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'commit', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'tag', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'PublishingResult', + kind: 'type', + source_line: 38, + type_signature: 'PublishingResult', + properties: [ + { + name: 'ok', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'published', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'failed', + kind: 'variable', + type_signature: 'Array<{name: string; error: Error}>', + }, + { + name: 'duration', + kind: 'variable', + type_signature: 'number', + }, + ], + }, + { + name: 'publish_repos', + kind: 'function', + source_line: 45, + type_signature: + '(repos: LocalRepo[], options: PublishingOptions, ops?: GitopsOperations): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'repos', + type: 'LocalRepo[]', + optional: false, + }, + { + name: 'options', + type: 'PublishingOptions', + optional: false, + }, + { + name: 'ops', + type: 'GitopsOperations', + optional: false, + default_value: 'default_gitops_operations', + }, + ], + }, + ], + dependencies: [ + 'constants.ts', + 'dependency_updater.ts', + 'graph_validation.ts', + 'npm_install_helpers.ts', + 'operations_defaults.ts', + 'version_utils.ts', + ], + dependents: ['gitops_publish.task.ts', 'gitops_validate.task.ts'], + }, + { + path: 'npm_install_helpers.ts', + declarations: [ + { + name: 'install_with_cache_healing', + kind: 'function', + doc_comment: + 'Installs npm dependencies with cache healing on ETARGET errors.\n\n**Strategy:**\n1. First attempt: regular `npm install`\n2. On ETARGET error (stale cache): `npm cache clean --force` then retry\n3. On other errors: fail immediately\n\n**Why ETARGET errors occur:**\nAfter publishing a package and waiting for NPM registry propagation,\nnpm\'s local cache may still have stale "404" metadata. This healing\nstrategy clears the cache to force fresh metadata fetch.', + throws: [ + { + type: 'Error', + description: 'if install fails (with details about cache healing attempts)', + }, + ], + source_line: 42, + type_signature: + '(repo: LocalRepo, ops: GitopsOperations, log?: Logger | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'repo', + type: 'LocalRepo', + optional: false, + description: '- The repository to install dependencies for', + }, + { + name: 'ops', + type: 'GitopsOperations', + optional: false, + description: '- Gitops operations (for dependency injection)', + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + description: '- Optional logger', + }, + ], + }, + ], + dependents: ['multi_repo_publisher.ts'], + }, + { + path: 'npm_registry.ts', + declarations: [ + { + name: 'WaitOptions', + kind: 'type', + source_line: 6, + type_signature: 'WaitOptions', + properties: [ + { + name: 'max_attempts', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'initial_delay', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'max_delay', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'timeout', + kind: 'variable', + type_signature: 'number', + }, + ], + }, + { + name: 'PackageInfo', + kind: 'type', + source_line: 13, + type_signature: 'PackageInfo', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'version', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'check_package_available', + kind: 'function', + source_line: 18, + type_signature: + '(pkg: string, version: string, log?: Logger | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'pkg', + type: 'string', + optional: false, + }, + { + name: 'version', + type: 'string', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'wait_for_package', + kind: 'function', + doc_comment: + 'Waits for package version to propagate to NPM registry.\n\nUses exponential backoff with jitter to avoid hammering registry.\nLogs progress every 5 attempts. Respects timeout to avoid infinite waits.\n\nCritical for multi-repo publishing: ensures published packages are available\nbefore updating dependent packages.', + throws: [ + { + type: 'if', + description: 'timeout reached or max attempts exceeded', + }, + ], + source_line: 55, + type_signature: + '(pkg: string, version: string, options?: WaitOptions, log?: Logger | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'pkg', + type: 'string', + optional: false, + }, + { + name: 'version', + type: 'string', + optional: false, + }, + { + name: 'options', + type: 'WaitOptions', + optional: false, + default_value: '{}', + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'get_package_info', + kind: 'function', + doc_comment: + "Fetches package metadata from NPM registry.\n\nReturns name and latest version. Returns null if package doesn't exist\nor registry is unreachable.", + source_line: 112, + type_signature: '(pkg: string, log?: Logger | undefined): Promise', + return_type: 'Promise', + return_description: 'package info or null on error/not found', + parameters: [ + { + name: 'pkg', + type: 'string', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'package_exists', + kind: 'function', + source_line: 131, + type_signature: '(pkg: string, log?: Logger | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'pkg', + type: 'string', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + ], + dependents: ['operations_defaults.ts'], + }, + { + path: 'operations_defaults.ts', + declarations: [ + { + name: 'default_changeset_operations', + kind: 'variable', + source_line: 44, + type_signature: 'ChangesetOperations', + }, + { + name: 'default_git_operations', + kind: 'variable', + source_line: 80, + type_signature: 'GitOperations', + }, + { + name: 'default_process_operations', + kind: 'variable', + source_line: 263, + type_signature: 'ProcessOperations', + }, + { + name: 'default_npm_operations', + kind: 'variable', + source_line: 287, + type_signature: 'NpmOperations', + }, + { + name: 'default_preflight_operations', + kind: 'variable', + source_line: 363, + type_signature: 'PreflightOperations', + }, + { + name: 'default_fs_operations', + kind: 'variable', + source_line: 369, + type_signature: 'FsOperations', + }, + { + name: 'default_build_operations', + kind: 'variable', + source_line: 391, + type_signature: 'BuildOperations', + }, + { + name: 'default_gitops_operations', + kind: 'variable', + doc_comment: 'Combined default operations for all gitops functionality.', + source_line: 415, + type_signature: 'GitopsOperations', + }, + ], + module_comment: + 'Production implementations of operations interfaces.\n\nProvides real git, npm, fs, and build operations for production use.\nFor interface definitions and dependency injection pattern, see `operations.ts`.', + dependencies: [ + 'changeset_reader.ts', + 'git_operations.ts', + 'npm_registry.ts', + 'preflight_checks.ts', + ], + dependents: [ + 'dependency_updater.ts', + 'local_repo.ts', + 'multi_repo_publisher.ts', + 'preflight_checks.ts', + 'publishing_plan.ts', + ], + }, + { + path: 'operations.ts', + declarations: [ + { + name: 'ChangesetOperations', + kind: 'type', + doc_comment: + 'Changeset operations for reading and predicting versions from `.changeset/*.md` files.', + source_line: 47, + type_signature: 'ChangesetOperations', + properties: [ + { + name: 'has_changesets', + kind: 'variable', + type_signature: + '(options: {\n\t\trepo: LocalRepo;\n\t}) => Promise>', + doc_comment: + 'Checks if a repo has any changeset files.\nReturns true if changesets exist, false if none found.', + }, + { + name: 'read_changesets', + kind: 'variable', + type_signature: + '(options: {\n\t\trepo: LocalRepo;\n\t\tlog?: Logger;\n\t}) => Promise}, {message: string}>>', + doc_comment: + 'Reads all changeset files from a repo.\nReturns array of changeset info, or error if reading fails.', + }, + { + name: 'predict_next_version', + kind: 'variable', + type_signature: + '(options: {\n\t\trepo: LocalRepo;\n\t\tlog?: Logger;\n\t}) => Promise | null>', + doc_comment: + "Predicts the next version based on changesets.\nReturns null if no changesets found (expected, not an error).\nReturns error Result if changesets exist but can't be read/parsed.", + }, + ], + }, + { + name: 'GitOperations', + kind: 'type', + doc_comment: + 'Git operations for branch management, commits, tags, and workspace state.\nAll operations return `Result` instead of throwing errors.', + source_line: 80, + type_signature: 'GitOperations', + properties: [ + { + name: 'current_branch_name', + kind: 'variable', + type_signature: + '(options?: {\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Gets the current branch name.', + }, + { + name: 'current_commit_hash', + kind: 'variable', + type_signature: + '(options?: {\n\t\tbranch?: string;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Gets the current commit hash.', + }, + { + name: 'check_clean_workspace', + kind: 'variable', + type_signature: + '(options?: {\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Checks if the workspace is clean (no uncommitted changes).', + }, + { + name: 'checkout', + kind: 'variable', + type_signature: + '(options: {branch: string; cwd?: string}) => Promise>', + doc_comment: 'Checks out a branch.', + }, + { + name: 'pull', + kind: 'variable', + type_signature: + '(options?: {\n\t\torigin?: string;\n\t\tbranch?: string;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Pulls changes from remote.', + }, + { + name: 'switch_branch', + kind: 'variable', + type_signature: + '(options: {\n\t\tbranch: string;\n\t\tpull?: boolean;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Switches to a branch, optionally pulling.', + }, + { + name: 'has_remote', + kind: 'variable', + type_signature: + '(options?: {\n\t\tremote?: string;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Checks if a remote exists.', + }, + { + name: 'add', + kind: 'variable', + type_signature: + '(options: {\n\t\tfiles: string | Array;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Stages files for commit.', + }, + { + name: 'commit', + kind: 'variable', + type_signature: + '(options: {message: string; cwd?: string}) => Promise>', + doc_comment: 'Creates a commit.', + }, + { + name: 'add_and_commit', + kind: 'variable', + type_signature: + '(options: {\n\t\tfiles: string | Array;\n\t\tmessage: string;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Stages files and creates a commit.', + }, + { + name: 'has_changes', + kind: 'variable', + type_signature: + '(options?: {cwd?: string}) => Promise>', + doc_comment: 'Checks if there are any uncommitted changes.', + }, + { + name: 'get_changed_files', + kind: 'variable', + type_signature: + '(options?: {\n\t\tcwd?: string;\n\t}) => Promise}, {message: string}>>', + doc_comment: 'Gets a list of changed files.', + }, + { + name: 'tag', + kind: 'variable', + type_signature: + '(options: {\n\t\ttag_name: string;\n\t\tmessage?: string;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Creates a git tag.', + }, + { + name: 'push_tag', + kind: 'variable', + type_signature: + '(options: {\n\t\ttag_name: string;\n\t\torigin?: string;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Pushes a tag to remote.', + }, + { + name: 'stash', + kind: 'variable', + type_signature: + '(options?: {message?: string; cwd?: string}) => Promise>', + doc_comment: 'Stashes uncommitted changes.', + }, + { + name: 'stash_pop', + kind: 'variable', + type_signature: + '(options?: {cwd?: string}) => Promise>', + doc_comment: 'Pops the most recent stash.', + }, + { + name: 'has_file_changed', + kind: 'variable', + type_signature: + '(options: {\n\t\tfrom_commit: string;\n\t\tto_commit: string;\n\t\tfile_path: string;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Checks if a specific file changed between two commits.', + }, + ], + }, + { + name: 'ProcessOperations', + kind: 'type', + doc_comment: 'Process spawning operations for running shell commands.', + source_line: 210, + type_signature: 'ProcessOperations', + properties: [ + { + name: 'spawn', + kind: 'variable', + type_signature: + '(options: {\n\t\tcmd: string;\n\t\targs: Array;\n\t\tspawn_options?: SpawnOptions;\n\t}) => Promise>', + doc_comment: 'Spawns a child process and waits for completion.', + }, + ], + }, + { + name: 'BuildOperations', + kind: 'type', + doc_comment: 'Build operations for validating packages compile before publishing.', + source_line: 224, + type_signature: 'BuildOperations', + properties: [ + { + name: 'build_package', + kind: 'variable', + type_signature: + '(options: {\n\t\trepo: LocalRepo;\n\t\tlog?: Logger;\n\t}) => Promise>', + doc_comment: 'Builds a package using gro build.', + }, + ], + }, + { + name: 'NpmOperations', + kind: 'type', + doc_comment: + 'NPM registry operations for package availability checks and authentication.\nIncludes exponential backoff for waiting on package propagation.', + source_line: 238, + type_signature: 'NpmOperations', + properties: [ + { + name: 'wait_for_package', + kind: 'variable', + type_signature: + '(options: {\n\t\tpkg: string;\n\t\tversion: string;\n\t\twait_options?: WaitOptions;\n\t\tlog?: Logger;\n\t}) => Promise>', + doc_comment: + 'Waits for a package version to be available on NPM.\nUses exponential backoff with configurable timeout.', + }, + { + name: 'check_package_available', + kind: 'variable', + type_signature: + '(options: {\n\t\tpkg: string;\n\t\tversion: string;\n\t\tlog?: Logger;\n\t}) => Promise>', + doc_comment: 'Checks if a package version is available on NPM.', + }, + { + name: 'check_auth', + kind: 'variable', + type_signature: '() => Promise>', + doc_comment: 'Checks npm authentication status.', + }, + { + name: 'check_registry', + kind: 'variable', + type_signature: '() => Promise>', + doc_comment: 'Checks if npm registry is reachable.', + }, + { + name: 'install', + kind: 'variable', + type_signature: + '(options?: {\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Installs npm dependencies.', + }, + { + name: 'cache_clean', + kind: 'variable', + type_signature: '() => Promise>', + doc_comment: + 'Cleans the npm cache.\nUses `npm cache clean --force` to clear stale cache entries.', + }, + ], + }, + { + name: 'PreflightOperations', + kind: 'type', + doc_comment: + 'Preflight validation operations to ensure repos are ready for publishing.\nValidates workspace state, branches, builds, and npm authentication.', + source_line: 287, + type_signature: 'PreflightOperations', + properties: [ + { + name: 'run_preflight_checks', + kind: 'variable', + type_signature: + '(options: {\n\t\trepos: Array;\n\t\tpreflight_options: PreflightOptions;\n\t\tgit_ops?: GitOperations;\n\t\tnpm_ops?: NpmOperations;\n\t\tbuild_ops?: BuildOperations;\n\t\tchangeset_ops?: ChangesetOperations;\n\t}) => Promise', + doc_comment: 'Runs preflight validation checks before publishing.', + }, + ], + }, + { + name: 'FsOperations', + kind: 'type', + doc_comment: 'File system operations for reading and writing files.', + source_line: 304, + type_signature: 'FsOperations', + properties: [ + { + name: 'readFile', + kind: 'variable', + type_signature: + '(options: {\n\t\tpath: string;\n\t\tencoding: BufferEncoding;\n\t}) => Promise>', + doc_comment: 'Reads a file from the file system.', + }, + { + name: 'writeFile', + kind: 'variable', + type_signature: + '(options: {\n\t\tpath: string;\n\t\tcontent: string;\n\t}) => Promise>', + doc_comment: 'Writes a file to the file system.', + }, + ], + }, + { + name: 'GitopsOperations', + kind: 'type', + doc_comment: + 'Combined operations interface grouping all gitops functionality.\nThis is the main interface injected into publishing and validation workflows.', + source_line: 326, + type_signature: 'GitopsOperations', + properties: [ + { + name: 'changeset', + kind: 'variable', + type_signature: 'ChangesetOperations', + }, + { + name: 'git', + kind: 'variable', + type_signature: 'GitOperations', + }, + { + name: 'process', + kind: 'variable', + type_signature: 'ProcessOperations', + }, + { + name: 'npm', + kind: 'variable', + type_signature: 'NpmOperations', + }, + { + name: 'preflight', + kind: 'variable', + type_signature: 'PreflightOperations', + }, + { + name: 'fs', + kind: 'variable', + type_signature: 'FsOperations', + }, + { + name: 'build', + kind: 'variable', + type_signature: 'BuildOperations', + }, + ], + }, + ], + module_comment: + "Operations interfaces for dependency injection.\n\nThis is the core pattern enabling testability without mocks.\nAll side effects (git, npm, fs, process) are abstracted into interfaces.\n\n**Design principles:**\n- All operations accept a single `options` object parameter\n- All fallible operations return `Result` from `@ryanatkn/belt`\n- Never throw `Error` in operations - return `Result` with `ok: false`\n- Use `null` for expected \"not found\" cases (not errors)\n- Include `log?: Logger` in options where logging is useful\n\n**Production usage:**\n```typescript\nimport {default_gitops_operations} from './operations_defaults.js';\nconst result = await ops.git.current_branch_name({cwd: '/path'});\nif (!result.ok) {\n throw new TaskError(result.message);\n}\nconst branch = result.value;\n```\n\n**Test usage:**\n```typescript\nconst mock_ops = create_mock_operations();\nconst result = await publish_repos(repos, options, mock_ops);\n// Assert on result without any real git/npm calls\n```\n\nSee `operations_defaults.ts` for real implementations.\nSee test files (*.test.ts) for mock implementations.", + }, + { + path: 'output_helpers.ts', + declarations: [ + { + name: 'OutputFormat', + kind: 'type', + source_line: 4, + type_signature: 'OutputFormat', + }, + { + name: 'OutputOptions', + kind: 'type', + source_line: 6, + type_signature: 'OutputOptions', + properties: [ + { + name: 'format', + kind: 'variable', + type_signature: 'OutputFormat', + }, + { + name: 'outfile', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'log', + kind: 'variable', + type_signature: 'Logger', + }, + ], + }, + { + name: 'OutputFormatters', + kind: 'type', + source_line: 12, + type_signature: 'OutputFormatters', + generic_params: [ + { + name: 'T', + }, + ], + properties: [ + { + name: 'json', + kind: 'variable', + type_signature: '(data: T) => string', + }, + { + name: 'markdown', + kind: 'variable', + type_signature: '(data: T) => Array', + }, + { + name: 'stdout', + kind: 'variable', + type_signature: '(data: T, log: Logger) => void', + doc_comment: + 'This function should call log methods directly for colored/styled output.', + }, + ], + }, + { + name: 'format_and_output', + kind: 'function', + doc_comment: + 'Formats data and outputs to file or stdout based on options.\n\nSupports three formats:\n- stdout: Uses logger for colored/styled output (cannot use with --outfile)\n- json: Stringified JSON\n- markdown: Formatted markdown text', + throws: [ + { + type: 'if', + description: 'stdout format used with outfile, or if logger missing for stdout', + }, + ], + source_line: 31, + type_signature: + '(data: T, formatters: OutputFormatters, options: OutputOptions): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'data', + type: 'T', + optional: false, + }, + { + name: 'formatters', + type: 'OutputFormatters', + optional: false, + }, + { + name: 'options', + type: 'OutputOptions', + optional: false, + }, + ], + }, + ], + dependents: ['gitops_analyze.task.ts', 'gitops_plan.task.ts', 'gitops_publish.task.ts'], + }, + { + path: 'PageFooter.svelte', + declarations: [ + { + name: 'PageFooter', + kind: 'component', + source_line: 1, + }, + ], + dependents: [ + 'ModulesPage.svelte', + 'PullRequestsPage.svelte', + 'TablePage.svelte', + 'TreeItemPage.svelte', + 'TreePage.svelte', + ], + }, + { + path: 'PageHeader.svelte', + declarations: [ + { + name: 'PageHeader', + kind: 'component', + props: [ + { + name: 'repo', + type: '{package_json: PackageJson} | {url: string; package_json: null}', + optional: false, + }, + { + name: 'nav_attrs', + type: "SvelteHTMLElements['nav']", + optional: true, + }, + { + name: 'attrs', + type: "SvelteHTMLElements['header']", + optional: true, + }, + { + name: 'nav', + type: 'Snippet', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependents: [ + 'ModulesPage.svelte', + 'PullRequestsPage.svelte', + 'TablePage.svelte', + 'TreeItemPage.svelte', + 'TreePage.svelte', + ], + }, + { + path: 'paths.ts', + declarations: [ + { + name: 'GITOPS_OUTPUT_DIR', + kind: 'variable', + doc_comment: 'Base directory for all gitops-generated files.', + source_line: 4, + type_signature: '".gro/fuz_gitops"', + }, + { + name: 'DEFAULT_REPOS_DIR', + kind: 'variable', + doc_comment: + 'Default repos directory relative to gitops config file.\nResolves to the parent of the directory with the config\n(e.g., ~/dev/repo/gitops.config.ts resolves to ~/dev/).', + source_line: 11, + type_signature: '".."', + }, + ], + dependents: ['gitops_config.ts', 'gitops_task_helpers.ts', 'repo_ops.ts'], + }, + { + path: 'preflight_checks.ts', + declarations: [ + { + name: 'PreflightOptions', + kind: 'type', + source_line: 20, + type_signature: 'PreflightOptions', + properties: [ + { + name: 'skip_changesets', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'skip_build_validation', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'required_branch', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'check_remote', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'estimate_time', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'log', + kind: 'variable', + type_signature: 'Logger', + }, + ], + }, + { + name: 'PreflightResult', + kind: 'type', + source_line: 29, + type_signature: 'PreflightResult', + properties: [ + { + name: 'ok', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'warnings', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'errors', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'repos_with_changesets', + kind: 'variable', + type_signature: 'Set', + }, + { + name: 'repos_without_changesets', + kind: 'variable', + type_signature: 'Set', + }, + { + name: 'estimated_duration', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'npm_username', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'RunPreflightChecksOptions', + kind: 'type', + source_line: 39, + type_signature: 'RunPreflightChecksOptions', + properties: [ + { + name: 'repos', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'preflight_options', + kind: 'variable', + type_signature: 'PreflightOptions', + }, + { + name: 'git_ops', + kind: 'variable', + type_signature: 'GitOperations', + }, + { + name: 'npm_ops', + kind: 'variable', + type_signature: 'NpmOperations', + }, + { + name: 'build_ops', + kind: 'variable', + type_signature: 'BuildOperations', + }, + { + name: 'changeset_ops', + kind: 'variable', + type_signature: 'ChangesetOperations', + }, + ], + }, + { + name: 'run_preflight_checks', + kind: 'function', + doc_comment: + 'Validates all requirements before publishing can proceed.\n\nPerforms comprehensive pre-flight validation:\n- Clean workspaces (100% clean required - no uncommitted changes)\n- Correct branch (usually main)\n- Changesets present (unless skip_changesets=true)\n- Builds successful (fail-fast to prevent broken state)\n- Git remote reachability\n- NPM authentication with username\n- NPM registry connectivity\n\nBuild validation runs BEFORE any publishing to prevent the scenario where\nversion is bumped but build fails, leaving repo in broken state.', + source_line: 65, + type_signature: + '({ repos, preflight_options, git_ops, npm_ops, build_ops, changeset_ops, }: RunPreflightChecksOptions): Promise', + return_type: 'Promise', + return_description: + 'result with ok=false if any errors, plus warnings and detailed status', + parameters: [ + { + name: '__0', + type: 'RunPreflightChecksOptions', + optional: false, + }, + ], + }, + ], + dependencies: ['operations_defaults.ts'], + dependents: ['operations_defaults.ts'], + }, + { + path: 'publishing_plan.ts', + declarations: [ + { + name: 'VersionChange', + kind: 'type', + source_line: 18, + type_signature: 'VersionChange', + properties: [ + { + name: 'package_name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'from', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'to', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'bump_type', + kind: 'variable', + type_signature: 'BumpType', + }, + { + name: 'breaking', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'has_changesets', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'will_generate_changeset', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'needs_bump_escalation', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'existing_bump', + kind: 'variable', + type_signature: 'BumpType', + }, + { + name: 'required_bump', + kind: 'variable', + type_signature: 'BumpType', + }, + ], + }, + { + name: 'DependencyUpdate', + kind: 'type', + source_line: 31, + type_signature: 'DependencyUpdate', + properties: [ + { + name: 'dependent_package', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'updated_dependency', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'new_version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'type', + kind: 'variable', + type_signature: "'dependencies' | 'devDependencies' | 'peerDependencies'", + }, + { + name: 'causes_republish', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'PublishingPlan', + kind: 'type', + source_line: 39, + type_signature: 'PublishingPlan', + properties: [ + { + name: 'publishing_order', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'version_changes', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'dependency_updates', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'breaking_cascades', + kind: 'variable', + type_signature: 'Map>', + }, + { + name: 'warnings', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'info', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'errors', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'generate_publishing_plan', + kind: 'function', + doc_comment: + 'Generates a publishing plan showing what would happen during publishing.\nShows version changes, dependency updates, and breaking change cascades.\nUses fixed-point iteration to resolve transitive cascades.', + source_line: 170, + type_signature: + '(repos: LocalRepo[], log?: Logger | undefined, ops?: ChangesetOperations): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'repos', + type: 'LocalRepo[]', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'ops', + type: 'ChangesetOperations', + optional: false, + default_value: 'default_changeset_operations', + }, + ], + }, + { + name: 'log_publishing_plan', + kind: 'function', + source_line: 461, + type_signature: '(plan: PublishingPlan, log: Logger): void', + return_type: 'void', + parameters: [ + { + name: 'plan', + type: 'PublishingPlan', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + ], + }, + ], + dependencies: [ + 'constants.ts', + 'graph_validation.ts', + 'log_helpers.ts', + 'operations_defaults.ts', + 'version_utils.ts', + ], + dependents: ['gitops_plan.task.ts', 'gitops_publish.task.ts', 'gitops_validate.task.ts'], + }, + { + path: 'PullRequestsDetail.svelte', + declarations: [ + { + name: 'PullRequestsDetail', + kind: 'component', + props: [ + { + name: 'repos', + type: 'Array', + optional: false, + }, + { + name: 'filter_pull_request', + type: 'FilterPullRequest | undefined', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['github_helpers.ts'], + dependents: ['PullRequestsPage.svelte'], + }, + { + path: 'PullRequestsPage.svelte', + declarations: [ + { + name: 'PullRequestsPage', + kind: 'component', + props: [ + { + name: 'repo', + type: 'Repo', + optional: false, + }, + { + name: 'repos', + type: 'Array', + optional: false, + }, + { + name: 'filter_pull_request', + type: 'FilterPullRequest | undefined', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['PageFooter.svelte', 'PageHeader.svelte', 'PullRequestsDetail.svelte'], + }, + { + path: 'repo_ops.ts', + declarations: [ + { + name: 'walk_repo_files', + kind: 'function', + doc_comment: + 'Walk files in a directory, respecting common exclusions.\nYields absolute paths to files (and optionally directories).', + source_line: 155, + type_signature: + '(dir: string, options?: WalkOptions | undefined): AsyncGenerator', + return_type: 'AsyncGenerator', + parameters: [ + { + name: 'dir', + type: 'string', + optional: false, + description: 'Directory to walk', + }, + { + name: 'options', + type: 'WalkOptions | undefined', + optional: true, + description: 'Walk options for exclusions and filtering', + }, + ], + }, + { + name: 'DEFAULT_EXCLUDE_DIRS', + kind: 'variable', + doc_comment: 'Default directories to exclude from file walking', + source_line: 20, + type_signature: + 'readonly ["node_modules", ".git", ".gro", ".svelte-kit", ".deno", ".vscode", ".idea", "dist", "build", "coverage", ".cache", ".turbo"]', + }, + { + name: 'DEFAULT_EXCLUDE_EXTENSIONS', + kind: 'variable', + doc_comment: 'Default binary/non-text extensions to exclude from content processing', + source_line: 36, + type_signature: + 'readonly [".png", ".jpg", ".jpeg", ".gif", ".svg", ".ico", ".webp", ".woff", ".woff2", ".ttf", ".eot", ".mp4", ".webm", ".mp3", ".wav", ".ogg", ".zip", ".tar", ".gz", ".lock", ".pdf"]', + }, + { + name: 'WalkOptions', + kind: 'type', + source_line: 60, + type_signature: 'WalkOptions', + properties: [ + { + name: 'exclude_dirs', + kind: 'variable', + type_signature: 'Array', + doc_comment: 'Additional directories to exclude (merged with defaults)', + }, + { + name: 'exclude_extensions', + kind: 'variable', + type_signature: 'Array', + doc_comment: 'Additional extensions to exclude (merged with defaults)', + }, + { + name: 'max_file_size', + kind: 'variable', + type_signature: 'number', + doc_comment: 'Maximum file size in bytes (default: 10MB)', + }, + { + name: 'include_dirs', + kind: 'variable', + type_signature: 'boolean', + doc_comment: 'Include directories in output (default: false)', + }, + { + name: 'no_defaults', + kind: 'variable', + type_signature: 'boolean', + doc_comment: 'Use only provided exclusions, ignoring defaults', + }, + ], + }, + { + name: 'RepoPath', + kind: 'type', + source_line: 73, + type_signature: 'RepoPath', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'path', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'url', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'get_repo_paths', + kind: 'function', + doc_comment: + 'Get repo paths from gitops config without full git sync.\nLighter weight than `get_gitops_ready()` - just resolves paths.', + source_line: 86, + type_signature: '(config_path?: string | undefined): Promise', + return_type: 'Promise', + return_description: 'Array of repo info with name, path, and url', + parameters: [ + { + name: 'config_path', + type: 'string | undefined', + optional: true, + description: 'Path to gitops.config.ts (defaults to ./gitops.config.ts)', + }, + ], + }, + { + name: 'should_exclude_path', + kind: 'function', + doc_comment: 'Check if a path should be excluded based on options.', + source_line: 119, + type_signature: '(file_path: string, options?: WalkOptions | undefined): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'file_path', + type: 'string', + optional: false, + }, + { + name: 'options', + type: 'WalkOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'collect_repo_files', + kind: 'function', + doc_comment: + 'Collect all files from walk_repo_files into an array.\nConvenience function for when you need all paths upfront.', + source_line: 204, + type_signature: '(dir: string, options?: WalkOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'dir', + type: 'string', + optional: false, + }, + { + name: 'options', + type: 'WalkOptions | undefined', + optional: true, + }, + ], + }, + ], + module_comment: + 'Generic repository operations for scripts that work across repos.\n\nProvides lightweight utilities for:\n- Getting repo paths from gitops config (without full git sync)\n- Walking files in repos with sensible exclusions\n- Common exclusion patterns for node/svelte projects\n\nFor full git sync/clone functionality, use `get_gitops_ready()` from gitops_task_helpers.', + dependencies: ['gitops_config.ts', 'paths.ts'], + }, + { + path: 'repo.svelte.ts', + declarations: [ + { + name: 'RepoJson', + kind: 'type', + doc_comment: 'Serialized repo data as stored in repos.ts (JSON).', + source_line: 14, + type_signature: 'RepoJson', + properties: [ + { + name: 'library_json', + kind: 'variable', + type_signature: 'LibraryJson', + }, + { + name: 'check_runs', + kind: 'variable', + type_signature: 'GithubCheckRunsItem | null', + }, + { + name: 'pull_requests', + kind: 'variable', + type_signature: 'Array | null', + }, + ], + }, + { + name: 'Repo', + kind: 'class', + doc_comment: + 'Runtime repo with Library composition for package metadata.\n\nWraps a Library instance and adds GitHub-specific data (CI status, PRs).\nConvenience getters delegate to `this.library.*` for common properties.', + source_line: 26, + members: [ + { + name: 'library', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'Library', + }, + { + name: 'check_runs', + kind: 'variable', + type_signature: 'GithubCheckRunsItem | null', + }, + { + name: 'pull_requests', + kind: 'variable', + type_signature: 'Array | null', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: '(repo_json: RepoJson): Repo', + parameters: [ + { + name: 'repo_json', + type: 'RepoJson', + optional: false, + }, + ], + }, + ], + }, + { + name: 'Repos', + kind: 'type', + source_line: 82, + type_signature: 'Repos', + properties: [ + { + name: 'repo', + kind: 'variable', + type_signature: 'Repo', + }, + { + name: 'repos', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'repos_context', + kind: 'variable', + source_line: 87, + type_signature: + '{ get: (error_message?: string | undefined) => Repos; get_maybe: () => Repos | undefined; set: (value: Repos) => Repos; }', + }, + { + name: 'repos_parse', + kind: 'function', + source_line: 89, + type_signature: '(repos: Repo[], homepage_url: string): Repos', + return_type: 'Repos', + parameters: [ + { + name: 'repos', + type: 'Repo[]', + optional: false, + }, + { + name: 'homepage_url', + type: 'string', + optional: false, + }, + ], + }, + ], + dependencies: ['github.ts'], + }, + { + path: 'ReposTable.svelte', + declarations: [ + { + name: 'ReposTable', + kind: 'component', + props: [ + { + name: 'repos', + type: 'Array', + optional: false, + }, + { + name: 'deps', + type: 'Array', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['github_helpers.ts'], + dependents: ['TablePage.svelte'], + }, + { + path: 'ReposTree.svelte', + declarations: [ + { + name: 'ReposTree', + kind: 'component', + props: [ + { + name: 'repos', + type: 'Array', + optional: false, + }, + { + name: 'selected_repo', + type: 'Repo | undefined', + optional: true, + }, + { + name: 'nav', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['ReposTreeNav.svelte'], + dependents: ['TreeItemPage.svelte', 'TreePage.svelte'], + }, + { + path: 'ReposTreeNav.svelte', + declarations: [ + { + name: 'ReposTreeNav', + kind: 'component', + props: [ + { + name: 'repos', + type: 'Array', + optional: false, + }, + { + name: 'selected_repo', + type: 'Repo', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependents: ['ReposTree.svelte'], + }, + { + path: 'resolved_gitops_config.ts', + declarations: [ + { + name: 'ResolvedGitopsConfig', + kind: 'type', + source_line: 4, + type_signature: 'ResolvedGitopsConfig', + properties: [ + { + name: 'local_repos', + kind: 'variable', + type_signature: 'Array | null', + }, + { + name: 'local_repo_paths', + kind: 'variable', + type_signature: 'Array | null', + }, + { + name: 'local_repos_missing', + kind: 'variable', + type_signature: 'Array | null', + }, + ], + }, + { + name: 'resolve_gitops_config', + kind: 'function', + source_line: 10, + type_signature: + '(gitops_config: GitopsConfig, repos_dir: string): ResolvedGitopsConfig', + return_type: 'ResolvedGitopsConfig', + parameters: [ + { + name: 'gitops_config', + type: 'GitopsConfig', + optional: false, + }, + { + name: 'repos_dir', + type: 'string', + optional: false, + }, + ], + }, + ], + dependencies: ['local_repo.ts'], + dependents: ['gitops_task_helpers.ts'], + }, + { + path: 'semver.ts', + declarations: [ + { + name: 'BumpType', + kind: 'type', + doc_comment: 'Semantic Versioning 2.0.0 utilities', + see_also: ['https://semver.org/'], + source_line: 6, + type_signature: 'BumpType', + }, + { + name: 'Semver', + kind: 'type', + source_line: 8, + type_signature: 'Semver', + properties: [ + { + name: 'major', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'minor', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'patch', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'prerelease', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'build', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'semver_compare_versions', + kind: 'function', + doc_comment: + 'Compares two semver versions according to SemVer 2.0.0 spec.\nReturns -1 if a < b, 0 if a === b, 1 if a > b.\nBuild metadata is ignored in precedence comparison.', + source_line: 116, + type_signature: '(a: string, b: string): number', + return_type: 'number', + parameters: [ + { + name: 'a', + type: 'string', + optional: false, + }, + { + name: 'b', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'semver_bump_version', + kind: 'function', + doc_comment: + 'Bumps a version according to the specified type.\nResets lower version numbers per SemVer spec.', + source_line: 143, + type_signature: '(version: string, type: BumpType): string', + return_type: 'string', + parameters: [ + { + name: 'version', + type: 'string', + optional: false, + }, + { + name: 'type', + type: 'BumpType', + optional: false, + }, + ], + }, + ], + module_comment: 'Semantic Versioning 2.0.0 utilities\n@see https://semver.org/', + }, + { + path: 'serialization_types.ts', + declarations: [ + { + name: 'SerializedNode', + kind: 'type', + source_line: 15, + type_signature: 'SerializedNode', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'dependencies', + kind: 'variable', + type_signature: + 'Array<{\n\t\tname: string;\n\t\ttype: string;\n\t\tversion: string;\n\t}>', + }, + { + name: 'dependents', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'publishable', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'SerializedGraph', + kind: 'type', + source_line: 27, + type_signature: 'SerializedGraph', + properties: [ + { + name: 'nodes', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'edges', + kind: 'variable', + type_signature: 'Array<[string, string]>', + }, + ], + }, + { + name: 'SerializedPublishingPlan', + kind: 'type', + source_line: 32, + type_signature: 'SerializedPublishingPlan', + properties: [ + { + name: 'publishing_order', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'version_changes', + kind: 'variable', + type_signature: + 'Array<{\n\t\tpackage_name: string;\n\t\tfrom: string;\n\t\tto: string;\n\t\tbump_type: string;\n\t\tbreaking: boolean;\n\t\thas_changesets: boolean;\n\t\twill_generate_changeset?: boolean;\n\t\tneeds_bump_escalation?: boolean;\n\t\texisting_bump?: string;\n\t\trequired_bump?: string;\n\t}>', + }, + { + name: 'dependency_updates', + kind: 'variable', + type_signature: + 'Array<{\n\t\tdependent_package: string;\n\t\tupdated_dependency: string;\n\t\tnew_version: string;\n\t\ttype: string;\n\t\tcauses_republish: boolean;\n\t}>', + }, + { + name: 'breaking_cascades', + kind: 'variable', + type_signature: 'Record>', + }, + { + name: 'warnings', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'errors', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'serialize_graph', + kind: 'function', + doc_comment: 'Serializes a dependency graph to a JSON-safe format.', + source_line: 61, + type_signature: '(graph: DependencyGraph): SerializedGraph', + return_type: 'SerializedGraph', + parameters: [ + { + name: 'graph', + type: 'DependencyGraph', + optional: false, + }, + ], + }, + ], + module_comment: + 'JSON-serializable types for command output formats.\n\nGitops commands support `--format json` and `--format markdown` output modes\nin addition to styled terminal output. These types define the JSON schema for:\n- Dependency graph structures (`SerializedGraph`)\n- Publishing plan predictions (`SerializedPublishingPlan`)\n\nUsed by `gitops_analyze`, `gitops_plan`, and `gitops_publish --dry_run` when\n`--format json` or `--outfile` is specified.', + }, + { + path: 'TablePage.svelte', + declarations: [ + { + name: 'TablePage', + kind: 'component', + props: [ + { + name: 'repo', + type: 'Repo', + optional: false, + }, + { + name: 'repos', + type: 'Array', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['PageFooter.svelte', 'PageHeader.svelte', 'ReposTable.svelte'], + }, + { + path: 'TreeItemPage.svelte', + declarations: [ + { + name: 'TreeItemPage', + kind: 'component', + props: [ + { + name: 'repo', + type: 'Repo', + optional: false, + }, + { + name: 'repos', + type: 'Array', + optional: false, + }, + { + name: 'slug', + type: 'string', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['PageFooter.svelte', 'PageHeader.svelte', 'ReposTree.svelte'], + }, + { + path: 'TreePage.svelte', + declarations: [ + { + name: 'TreePage', + kind: 'component', + props: [ + { + name: 'repo', + type: 'Repo', + optional: false, + }, + { + name: 'repos', + type: 'Array', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['PageFooter.svelte', 'PageHeader.svelte', 'ReposTree.svelte'], + }, + { + path: 'version_utils.ts', + declarations: [ + { + name: 'is_wildcard', + kind: 'function', + source_line: 3, + type_signature: '(version: string): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'version', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'strip_version_prefix', + kind: 'function', + doc_comment: 'Strips version prefix (^, ~, >=, <=, etc) from a version string.', + source_line: 10, + type_signature: '(version: string): string', + return_type: 'string', + parameters: [ + { + name: 'version', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'get_version_prefix', + kind: 'function', + doc_comment: 'Gets the version prefix (^, ~, >=, <=, or empty string).', + source_line: 17, + type_signature: '(version: string): string', + return_type: 'string', + parameters: [ + { + name: 'version', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'normalize_version_for_comparison', + kind: 'function', + doc_comment: + 'Normalizes version string for comparison.\n\nStrips prefixes (^, ~, >=) to get bare version number.\nHandles wildcards as-is. Used by needs_update to compare versions.', + examples: [ + "normalize_version_for_comparison('^1.2.3') // '1.2.3'", + "normalize_version_for_comparison('>=2.0.0') // '2.0.0'", + "normalize_version_for_comparison('*') // '*'", + ], + source_line: 32, + type_signature: '(version: string): string', + return_type: 'string', + parameters: [ + { + name: 'version', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'needs_update', + kind: 'function', + source_line: 45, + type_signature: '(current: string, new_version: string): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'current', + type: 'string', + optional: false, + }, + { + name: 'new_version', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'get_update_prefix', + kind: 'function', + doc_comment: + 'Determines version prefix to use when updating dependencies.\n\nStrategy:\n- Wildcard (*): Use caret (^) as default\n- Has existing prefix: Preserve it (^, ~, >=, <=, etc)\n- No prefix: Use default_strategy\n\nThis preserves user intent while handling wildcard replacements sensibly.', + source_line: 68, + type_signature: + '(current_version: string, default_strategy?: "" | "^" | "~" | ">="): string', + return_type: 'string', + parameters: [ + { + name: 'current_version', + type: 'string', + optional: false, + }, + { + name: 'default_strategy', + type: '"" | "^" | "~" | ">="', + optional: false, + description: 'prefix to use when no existing prefix found', + default_value: "'^'", + }, + ], + }, + { + name: 'is_breaking_change', + kind: 'function', + doc_comment: + 'Determines if a bump is a breaking change based on semver rules.\nPre-1.0: minor bumps are breaking\n1.0+: major bumps are breaking', + source_line: 92, + type_signature: + '(old_version: string, bump_type: "major" | "minor" | "patch"): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'old_version', + type: 'string', + optional: false, + }, + { + name: 'bump_type', + type: '"major" | "minor" | "patch"', + optional: false, + }, + ], + }, + { + name: 'detect_bump_type', + kind: 'function', + source_line: 108, + type_signature: + '(old_version: string, new_version: string): "major" | "minor" | "patch"', + return_type: '"major" | "minor" | "patch"', + parameters: [ + { + name: 'old_version', + type: 'string', + optional: false, + }, + { + name: 'new_version', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'compare_bump_types', + kind: 'function', + doc_comment: + 'Compares bump types. Returns positive if a > b, negative if a < b, 0 if equal.', + source_line: 123, + type_signature: '(a: BumpType, b: BumpType): number', + return_type: 'number', + parameters: [ + { + name: 'a', + type: 'BumpType', + optional: false, + }, + { + name: 'b', + type: 'BumpType', + optional: false, + }, + ], + }, + { + name: 'calculate_next_version', + kind: 'function', + source_line: 132, + type_signature: '(current_version: string, bump_type: BumpType): string', + return_type: 'string', + parameters: [ + { + name: 'current_version', + type: 'string', + optional: false, + }, + { + name: 'bump_type', + type: 'BumpType', + optional: false, + }, + ], + }, + ], + dependents: [ + 'changeset_generator.ts', + 'changeset_reader.ts', + 'dependency_updater.ts', + 'multi_repo_publisher.ts', + 'publishing_plan.ts', + ], + }, + ], + }, + name: '@ryanatkn/fuz_gitops', + repo_name: 'fuz_gitops', + repo_url: 'https://github.com/ryanatkn/fuz_gitops', + owner_name: 'ryanatkn', + homepage_url: 'https://gitops.fuz.dev/', + logo_url: 'https://gitops.fuz.dev/logo.svg', + logo_alt: 'a friendly blue spider facing you', + npm_url: 'https://www.npmjs.com/package/@ryanatkn/fuz_gitops', + changelog_url: 'https://github.com/ryanatkn/fuz_gitops/blob/main/CHANGELOG.md', + published: true, +}; + +// generated by library.gen.ts !! do not edit directly or risk lost data diff --git a/src/routes/moss.css b/src/routes/moss.css index 158949f4..c7a99173 100644 --- a/src/routes/moss.css +++ b/src/routes/moss.css @@ -200,10 +200,6 @@ a.chip { .justify_content_space_between { justify-content: space-between; } -.font_size_md { - font-size: var(--font_size_md); - --font_size: var(--font_size_md); -} .font_size_xl { font-size: var(--font_size_xl); --font_size: var(--font_size_xl); diff --git a/src/routes/package.gen.ts b/src/routes/package.gen.ts deleted file mode 100644 index a54e27bd..00000000 --- a/src/routes/package.gen.ts +++ /dev/null @@ -1,3 +0,0 @@ -// this is an optional pattern that makes your `package.json` -// available as `$routes/package.ts` with automatic `const` types -export * from '@ryanatkn/fuz/package.gen.js'; diff --git a/src/routes/package.ts b/src/routes/package.ts deleted file mode 100644 index b213d4cc..00000000 --- a/src/routes/package.ts +++ /dev/null @@ -1,4556 +0,0 @@ -// Generated by package.gen.ts -// Do not edit directly - regenerated on build - -import type {PackageJson} from '@ryanatkn/belt/package_json.js'; -import type {SrcJson} from '@ryanatkn/belt/src_json.js'; - -export const package_json: PackageJson = { - name: '@ryanatkn/fuz_gitops', - version: '0.54.0', - description: 'a tool for managing many repos', - glyph: '🪄', - logo: 'logo.svg', - logo_alt: 'a friendly blue spider facing you', - public: true, - license: 'MIT', - homepage: 'https://gitops.fuz.dev/', - repository: 'https://github.com/ryanatkn/fuz_gitops', - author: { - name: 'Ryan Atkinson', - email: 'mail@ryanatkn.com', - url: 'https://www.ryanatkn.com/', - }, - bugs: 'https://github.com/ryanatkn/fuz_gitops/issues', - funding: 'https://www.ryanatkn.com/funding', - scripts: { - start: 'gro dev', - dev: 'gro dev', - build: 'gro build', - check: 'gro check', - test: 'gro test', - preview: 'vite preview', - deploy: 'gro deploy', - }, - type: 'module', - engines: { - node: '>=22.15', - }, - peerDependencies: { - '@ryanatkn/belt': '>=0.38.2', - '@ryanatkn/fuz': '>=0.161.2', - '@ryanatkn/gro': '>=0.175.0', - '@ryanatkn/moss': '>=0.38.0', - '@sveltejs/kit': '^2', - svelte: '^5', - zod: '^4.1.13', - }, - devDependencies: { - '@changesets/changelog-git': '^0.2.1', - '@ryanatkn/belt': '^0.39.0', - '@ryanatkn/eslint-config': '^0.9.0', - '@ryanatkn/fuz': '^0.162.0', - '@ryanatkn/fuz_code': '^0.36.0', - '@ryanatkn/gro': '^0.177.1', - '@ryanatkn/moss': '^0.39.0', - '@sveltejs/adapter-static': '^3.0.10', - '@sveltejs/kit': '^2.49.0', - '@sveltejs/package': '^2.5.6', - '@sveltejs/vite-plugin-svelte': '^6.2.1', - '@types/node': '^24.10.1', - eslint: '^9.39.1', - 'eslint-plugin-svelte': '^3.13.0', - prettier: '^3.6.2', - 'prettier-plugin-svelte': '^3.4.0', - svelte: '^5.44.0', - 'svelte-check': '^4.3.4', - tslib: '^2.8.1', - typescript: '^5.9.3', - 'typescript-eslint': '^8.48.0', - vitest: '^4.0.13', - }, - prettier: { - plugins: ['prettier-plugin-svelte'], - useTabs: true, - printWidth: 100, - singleQuote: true, - bracketSpacing: false, - overrides: [ - { - files: 'package.json', - options: { - useTabs: false, - }, - }, - ], - }, - sideEffects: ['**/*.css'], - files: ['dist', 'src/lib/**/*.ts', '!src/lib/**/*.test.*', '!dist/**/*.test.*'], - exports: { - './package.json': './package.json', - './*.js': { - types: './dist/*.d.ts', - default: './dist/*.js', - }, - './*.ts': { - types: './dist/*.d.ts', - default: './dist/*.js', - }, - './*.svelte': { - types: './dist/*.svelte.d.ts', - svelte: './dist/*.svelte', - default: './dist/*.svelte', - }, - }, -}; - -export const src_json: SrcJson = { - name: '@ryanatkn/fuz_gitops', - version: '0.54.0', - modules: [ - { - path: 'changeset_generator.ts', - identifiers: [ - { - name: 'DependencyVersionChange', - kind: 'type', - source_line: 16, - type_signature: 'DependencyVersionChange', - properties: [ - { - name: 'package_name', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'from_version', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'to_version', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'bump_type', - kind: 'variable', - type_signature: "'major' | 'minor' | 'patch'", - }, - { - name: 'breaking', - kind: 'variable', - type_signature: 'boolean', - }, - ], - }, - { - name: 'create_changeset_for_dependency_updates', - kind: 'function', - doc_comment: - 'Creates a changeset file for dependency updates.\nReturns the path to the created changeset file.', - source_line: 28, - type_signature: - '(repo: LocalRepo, updates: DependencyVersionChange[], log?: Logger | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'repo', - type: 'LocalRepo', - optional: false, - }, - { - name: 'updates', - type: 'DependencyVersionChange[]', - optional: false, - }, - { - name: 'log', - type: 'Logger | undefined', - optional: true, - }, - ], - }, - { - name: 'generate_changeset_content', - kind: 'function', - doc_comment: - 'Generates markdown changeset content for dependency updates.\n\nCreates properly formatted changeset with YAML frontmatter, summary,\nand categorized list of breaking vs regular updates. Output format\nmatches changesets CLI for consistency.', - source_line: 94, - type_signature: - '(package_name: string, updates: DependencyVersionChange[], bump_type: "major" | "minor" | "patch"): string', - return_type: 'string', - return_description: 'markdown content ready to write to .changeset/*.md file', - parameters: [ - { - name: 'package_name', - type: 'string', - optional: false, - description: 'package receiving the dependency updates', - }, - { - name: 'updates', - type: 'DependencyVersionChange[]', - optional: false, - description: 'list of dependency changes with version info', - }, - { - name: 'bump_type', - type: '"major" | "minor" | "patch"', - optional: false, - description: 'required bump type (calculated from breaking changes)', - }, - ], - }, - { - name: 'create_dependency_updates', - kind: 'function', - source_line: 138, - type_signature: - '(dependencies: Map, published_versions: Map): DependencyVersionChange[]', - return_type: 'DependencyVersionChange[]', - parameters: [ - { - name: 'dependencies', - type: 'Map', - optional: false, - }, - { - name: 'published_versions', - type: 'Map', - optional: false, - }, - ], - }, - ], - module_comment: - 'Auto-generation of changesets for dependency updates during publishing.\n\nCreates changesets when packages need to republish due to updated dependencies.\nFor parsing existing changesets, see `changeset_reader.ts`.', - dependencies: ['version_utils.ts'], - dependents: ['dependency_updater.ts'], - }, - { - path: 'changeset_reader.ts', - identifiers: [ - { - name: 'ChangesetInfo', - kind: 'type', - source_line: 17, - type_signature: 'ChangesetInfo', - properties: [ - { - name: 'filename', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'packages', - kind: 'variable', - type_signature: 'Array<{name: string; bump_type: BumpType}>', - }, - { - name: 'summary', - kind: 'variable', - type_signature: 'string', - }, - ], - }, - { - name: 'parse_changeset_content', - kind: 'function', - doc_comment: - 'Parses changeset content string from markdown format.\n\nPure function for testability - no file I/O, just string parsing.\nExtracts package names, bump types, and summary from YAML frontmatter format.\nReturns null if format is invalid or no packages found.\n\nExpected format:\n---\n"package-name": patch\n"@scope/package": minor\n---\n\nSummary of changes', - source_line: 42, - type_signature: '(content: string, filename?: string): ChangesetInfo | null', - return_type: 'ChangesetInfo | null', - return_description: 'parsed changeset info or null if invalid format', - parameters: [ - { - name: 'content', - type: 'string', - optional: false, - description: 'changeset markdown with YAML frontmatter', - }, - { - name: 'filename', - type: 'string', - optional: false, - description: 'optional filename for error reporting context', - default_value: "'changeset.md'", - }, - ], - }, - { - name: 'parse_changeset_file', - kind: 'function', - source_line: 82, - type_signature: - '(filepath: string, log?: Logger | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'filepath', - type: 'string', - optional: false, - }, - { - name: 'log', - type: 'Logger | undefined', - optional: true, - }, - ], - }, - { - name: 'read_changesets', - kind: 'function', - source_line: 103, - type_signature: '(repo: LocalRepo, log?: Logger | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'repo', - type: 'LocalRepo', - optional: false, - }, - { - name: 'log', - type: 'Logger | undefined', - optional: true, - }, - ], - }, - { - name: 'determine_bump_from_changesets', - kind: 'function', - doc_comment: - 'Determines the bump type for a package from its changesets.\n\nWhen multiple changesets exist for the same package, returns the highest\nbump type (major > minor > patch) to ensure the most significant change\nis reflected in the version bump.', - source_line: 139, - type_signature: '(changesets: ChangesetInfo[], package_name: string): BumpType | null', - return_type: 'BumpType | null', - return_description: 'the highest bump type, or null if package has no changesets', - parameters: [ - { - name: 'changesets', - type: 'ChangesetInfo[]', - optional: false, - }, - { - name: 'package_name', - type: 'string', - optional: false, - }, - ], - }, - { - name: 'has_changesets', - kind: 'function', - doc_comment: - "Checks if a repo has any changeset files (excluding README.md).\n\nUsed by preflight checks and publishing workflow to determine which packages\nneed to be published. Returns false if .changeset directory doesn't exist\nor contains only README.md.", - source_line: 167, - type_signature: '(repo: LocalRepo): Promise', - return_type: 'Promise', - return_description: 'true if repo has unpublished changesets', - parameters: [ - { - name: 'repo', - type: 'LocalRepo', - optional: false, - }, - ], - }, - { - name: 'predict_next_version', - kind: 'function', - doc_comment: - 'Predicts the next version by analyzing all changesets in a repo.\n\nReads all changesets, determines the highest bump type for the package,\nand calculates the next version. Returns null if no changesets found.\n\nCritical for dry-run mode accuracy - allows simulating publishes without\nactually running `gro publish` which consumes changesets.', - source_line: 193, - type_signature: - '(repo: LocalRepo, log?: Logger | undefined): Promise<{ version: string; bump_type: BumpType; } | null>', - return_type: 'Promise<{ version: string; bump_type: BumpType; } | null>', - return_description: 'predicted version and bump type, or null if no changesets', - parameters: [ - { - name: 'repo', - type: 'LocalRepo', - optional: false, - }, - { - name: 'log', - type: 'Logger | undefined', - optional: true, - }, - ], - }, - ], - module_comment: - 'Changeset parsing and version prediction from `.changeset/*.md` files.\n\nReads changesets to determine which packages need publishing and their version bumps.\nFor auto-generating changesets during publishing, see `changeset_generator.ts`.', - dependencies: ['version_utils.ts'], - dependents: ['operations_defaults.ts'], - }, - { - path: 'constants.ts', - identifiers: [ - { - name: 'MAX_ITERATIONS', - kind: 'variable', - doc_comment: - 'Maximum number of iterations for fixed-point iteration during publishing.\nUsed in both plan generation and actual publishing to resolve transitive dependency cascades.\n\nIn practice, most repos converge in 2-3 iterations.\nDeep dependency chains may require more iterations.', - source_line: 8, - type_signature: '10', - }, - ], - dependents: ['multi_repo_publisher.ts', 'publishing_plan.ts'], - }, - { - path: 'dependency_graph.ts', - identifiers: [ - { - name: 'DEPENDENCY_TYPE', - kind: 'variable', - source_line: 11, - type_signature: '{ readonly PROD: "prod"; readonly PEER: "peer"; readonly DEV: "dev"; }', - }, - { - name: 'DependencyType', - kind: 'type', - source_line: 17, - type_signature: 'DependencyType', - }, - { - name: 'DependencySpec', - kind: 'type', - source_line: 19, - type_signature: 'DependencySpec', - properties: [ - { - name: 'type', - kind: 'variable', - type_signature: 'DependencyType', - }, - { - name: 'version', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'resolved', - kind: 'variable', - type_signature: 'string', - }, - ], - }, - { - name: 'DependencyGraphJson', - kind: 'type', - source_line: 25, - type_signature: 'DependencyGraphJson', - properties: [ - { - name: 'nodes', - kind: 'variable', - type_signature: - 'Array<{\n\t\tname: string;\n\t\tversion: string;\n\t\tdependencies: Array<{name: string; spec: DependencySpec}>;\n\t\tdependents: Array;\n\t\tpublishable: boolean;\n\t}>', - }, - { - name: 'edges', - kind: 'variable', - type_signature: 'Array<{from: string; to: string}>', - }, - ], - }, - { - name: 'DependencyNode', - kind: 'type', - source_line: 36, - type_signature: 'DependencyNode', - properties: [ - { - name: 'name', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'version', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'repo', - kind: 'variable', - type_signature: 'LocalRepo', - }, - { - name: 'dependencies', - kind: 'variable', - type_signature: 'Map', - }, - { - name: 'dependents', - kind: 'variable', - type_signature: 'Set', - }, - { - name: 'publishable', - kind: 'variable', - type_signature: 'boolean', - }, - ], - }, - { - name: 'DependencyGraph', - kind: 'class', - source_line: 45, - members: [ - { - name: 'nodes', - kind: 'variable', - type_signature: 'Map', - }, - { - name: 'edges', - kind: 'variable', - type_signature: 'Map>', - }, - { - name: 'constructor', - kind: 'constructor', - type_signature: '(): DependencyGraph', - parameters: [], - }, - { - name: 'init_from_repos', - kind: 'function', - modifiers: ['public'], - type_signature: '(repos: LocalRepo[]): void', - return_type: 'void', - parameters: [ - { - name: 'repos', - type: 'LocalRepo[]', - optional: false, - }, - ], - }, - { - name: 'get_node', - kind: 'function', - type_signature: '(name: string): DependencyNode | undefined', - return_type: 'DependencyNode | undefined', - parameters: [ - { - name: 'name', - type: 'string', - optional: false, - }, - ], - }, - { - name: 'get_dependents', - kind: 'function', - type_signature: '(name: string): Set', - return_type: 'Set', - parameters: [ - { - name: 'name', - type: 'string', - optional: false, - }, - ], - }, - { - name: 'get_dependencies', - kind: 'function', - type_signature: '(name: string): Map', - return_type: 'Map', - parameters: [ - { - name: 'name', - type: 'string', - optional: false, - }, - ], - }, - { - name: 'topological_sort', - kind: 'function', - doc_comment: - "Computes topological sort order for dependency graph.\n\nUses Kahn's algorithm with alphabetical ordering within tiers for\ndeterministic results. Throws if cycles detected.", - type_signature: '(exclude_dev?: boolean): string[]', - return_type: 'string[]', - return_description: - 'array of package names in dependency order (dependencies before dependents)', - parameters: [ - { - name: 'exclude_dev', - type: 'boolean', - optional: false, - description: - 'if true, excludes dev dependencies to break cycles.\nPublishing uses exclude_dev=true to handle circular dev deps.', - default_value: 'false', - }, - ], - throws: [ - { - type: 'if', - description: 'circular dependencies detected in included dependency types', - }, - ], - }, - { - name: 'detect_cycles', - kind: 'function', - type_signature: '(): string[][]', - return_type: 'string[][]', - parameters: [], - }, - { - name: 'detect_cycles_by_type', - kind: 'function', - doc_comment: - 'Detects circular dependencies, categorized by severity.\n\nProduction/peer cycles prevent publishing (impossible to order packages).\nDev cycles are normal (test utils, shared configs) and safely ignored.\n\nUses DFS traversal with recursion stack to identify back edges.\nDeduplicates cycles using sorted cycle keys.', - type_signature: '(): { production_cycles: string[][]; dev_cycles: string[][]; }', - return_type: '{ production_cycles: string[][]; dev_cycles: string[][]; }', - return_description: 'object with production_cycles (errors) and dev_cycles (info)', - parameters: [], - }, - { - name: 'toJSON', - kind: 'function', - type_signature: '(): DependencyGraphJson', - return_type: 'DependencyGraphJson', - parameters: [], - }, - ], - }, - { - name: 'DependencyGraphBuilder', - kind: 'class', - doc_comment: 'Builder for creating and analyzing dependency graphs.', - source_line: 368, - members: [ - { - name: 'build_from_repos', - kind: 'function', - doc_comment: - 'Constructs dependency graph from local repos.\n\nTwo-pass algorithm: first creates nodes, then builds edges (dependents).\nPrioritizes prod/peer deps over dev deps when same package appears in\nmultiple dependency types (stronger constraint wins).', - type_signature: '(repos: LocalRepo[]): DependencyGraph', - return_type: 'DependencyGraph', - return_description: 'fully initialized dependency graph with all nodes and edges', - parameters: [ - { - name: 'repos', - type: 'LocalRepo[]', - optional: false, - }, - ], - }, - { - name: 'compute_publishing_order', - kind: 'function', - doc_comment: - 'Computes publishing order using topological sort with dev deps excluded.\n\nExcludes dev dependencies to break circular dev dependency cycles while\npreserving production/peer dependency ordering. This allows patterns like\nshared test utilities that depend on each other for development.', - type_signature: '(graph: DependencyGraph): string[]', - return_type: 'string[]', - return_description: - 'package names in safe publishing order (dependencies before dependents)', - parameters: [ - { - name: 'graph', - type: 'DependencyGraph', - optional: false, - }, - ], - throws: [ - { - type: 'if', - description: 'production/peer cycles detected (cannot be resolved by exclusion)', - }, - ], - }, - { - name: 'analyze', - kind: 'function', - type_signature: - '(graph: DependencyGraph): { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', - return_type: - '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', - parameters: [ - { - name: 'graph', - type: 'DependencyGraph', - optional: false, - }, - ], - }, - ], - }, - ], - module_comment: - 'Dependency graph data structure and algorithms for multi-repo publishing.\n\nProvides `DependencyGraph` class with topological sort and cycle detection.\nFor validation workflow and publishing order computation, see `graph_validation.ts`.', - dependents: ['gitops_analyze.task.ts', 'gitops_validate.task.ts', 'graph_validation.ts'], - }, - { - path: 'dependency_updater.ts', - identifiers: [ - { - name: 'VersionStrategy', - kind: 'type', - source_line: 14, - type_signature: 'VersionStrategy', - }, - { - name: 'update_package_json', - kind: 'function', - doc_comment: - 'Updates package.json dependencies and creates changeset if needed.\n\nWorkflow:\n1. Updates all dependency types (dependencies, devDependencies, peerDependencies)\n2. Writes updated package.json with tabs formatting\n3. Creates auto-changeset if published_versions provided (for transitive updates)\n4. Commits both package.json and changeset with standard message\n\nUses version strategy to determine prefix (exact, caret, tilde) while preserving\nexisting prefixes when possible.', - throws: [ - { - type: 'if', - description: 'file operations or git operations fail', - }, - ], - source_line: 32, - type_signature: - '(repo: LocalRepo, updates: Map, strategy?: VersionStrategy, published_versions?: Map | undefined, log?: Logger | undefined, git_ops?: GitOperations, fs_ops?: FsOperations): Promise<...>', - return_type: 'Promise', - parameters: [ - { - name: 'repo', - type: 'LocalRepo', - optional: false, - }, - { - name: 'updates', - type: 'Map', - optional: false, - }, - { - name: 'strategy', - type: 'VersionStrategy', - optional: false, - description: 'how to format version ranges (default: caret)', - default_value: "'caret'", - }, - { - name: 'published_versions', - type: 'Map | undefined', - optional: true, - description: 'if provided, generates auto-changesets for updates', - }, - { - name: 'log', - type: 'Logger | undefined', - optional: true, - }, - { - name: 'git_ops', - type: 'GitOperations', - optional: false, - default_value: 'default_git_operations', - }, - { - name: 'fs_ops', - type: 'FsOperations', - optional: false, - default_value: 'default_fs_operations', - }, - ], - }, - { - name: 'update_all_repos', - kind: 'function', - source_line: 165, - type_signature: - '(repos: LocalRepo[], published: Map, strategy?: VersionStrategy, log?: Logger | undefined, git_ops?: GitOperations, fs_ops?: FsOperations): Promise<...>', - return_type: 'Promise<{ updated: number; failed: { repo: string; error: Error; }[]; }>', - parameters: [ - { - name: 'repos', - type: 'LocalRepo[]', - optional: false, - }, - { - name: 'published', - type: 'Map', - optional: false, - }, - { - name: 'strategy', - type: 'VersionStrategy', - optional: false, - default_value: "'caret'", - }, - { - name: 'log', - type: 'Logger | undefined', - optional: true, - }, - { - name: 'git_ops', - type: 'GitOperations', - optional: false, - default_value: 'default_git_operations', - }, - { - name: 'fs_ops', - type: 'FsOperations', - optional: false, - default_value: 'default_fs_operations', - }, - ], - }, - { - name: 'find_updates_needed', - kind: 'function', - source_line: 223, - type_signature: - '(repo: LocalRepo, published: Map): Map', - return_type: - 'Map', - parameters: [ - { - name: 'repo', - type: 'LocalRepo', - optional: false, - }, - { - name: 'published', - type: 'Map', - optional: false, - }, - ], - }, - ], - dependencies: ['changeset_generator.ts', 'operations_defaults.ts', 'version_utils.ts'], - dependents: ['multi_repo_publisher.ts'], - }, - { - path: 'fetch_repo_data.ts', - identifiers: [ - { - name: 'fetch_repo_data', - kind: 'function', - doc_comment: - 'Fetches GitHub metadata (CI status, PRs) for all repos.\n\nFetches sequentially with delay between requests to respect GitHub API rate limits.\nUses `await_in_loop` intentionally to avoid parallel requests overwhelming the API.\n\nError handling: Logs fetch failures but continues processing remaining repos.\nRepos with failed fetches will have `null` for check_runs or pull_requests.', - source_line: 24, - type_signature: - '(resolved_repos: LocalRepo[], token?: string | undefined, cache?: Map | undefined, log?: Logger | undefined, delay?: number, github_api_version?: string | undefined): Promise<...>', - return_type: 'Promise', - return_description: 'array of Repo objects with GitHub metadata attached', - parameters: [ - { - name: 'resolved_repos', - type: 'LocalRepo[]', - optional: false, - }, - { - name: 'token', - type: 'string | undefined', - optional: true, - }, - { - name: 'cache', - type: 'Map | undefined', - optional: true, - description: "optional cache from belt's fetch.js for response memoization", - }, - { - name: 'log', - type: 'Logger | undefined', - optional: true, - }, - { - name: 'delay', - type: 'number', - optional: false, - description: 'milliseconds between API requests (default: 33ms)', - default_value: '33', - }, - { - name: 'github_api_version', - type: 'string | undefined', - optional: true, - }, - ], - }, - ], - dependencies: ['github.ts'], - dependents: ['gitops_sync.task.ts'], - }, - { - path: 'fs_fetch_value_cache.ts', - identifiers: [ - { - name: 'FetchCache', - kind: 'type', - source_line: 10, - type_signature: 'FetchCache', - properties: [ - { - name: 'name', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'data', - kind: 'variable', - type_signature: 'FetchValueCache', - }, - { - name: 'save', - kind: 'variable', - type_signature: '() => Promise', - doc_comment: '', - }, - ], - }, - { - name: 'create_fs_fetch_value_cache', - kind: 'function', - doc_comment: - "Creates file-system backed cache for belt's fetch.js API responses.\n\nCache invalidation strategy: If cache file can't be read or parsed, entire\ncache is cleared (delete file) and starts fresh. This handles format changes.\n\nUses `structuredClone` to track changes - only writes to disk if data modified.\nFormatted with Prettier before writing for version control friendliness.", - source_line: 32, - type_signature: '(name: string, dir?: string): Promise', - return_type: 'Promise', - return_description: 'cache object with Map-based data and save() method', - parameters: [ - { - name: 'name', - type: 'string', - optional: false, - description: 'cache filename (without .json extension)', - }, - { - name: 'dir', - type: 'string', - optional: false, - description: 'cache directory (defaults to `.gro/build/fetch/`)', - default_value: "join(paths.build, 'fetch')", - }, - ], - }, - ], - dependents: ['gitops_sync.task.ts'], - }, - { - path: 'git_operations.ts', - identifiers: [ - { - name: 'git_add', - kind: 'function', - doc_comment: 'Adds files to git staging area and throws if anything goes wrong.', - source_line: 16, - type_signature: - '(files: string | string[], options?: SpawnOptions | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'files', - type: 'string | string[]', - optional: false, - }, - { - name: 'options', - type: 'SpawnOptions | undefined', - optional: true, - }, - ], - }, - { - name: 'git_commit', - kind: 'function', - doc_comment: 'Commits staged changes with a message and throws if anything goes wrong.', - source_line: 30, - type_signature: '(message: string, options?: SpawnOptions | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'message', - type: 'string', - optional: false, - }, - { - name: 'options', - type: 'SpawnOptions | undefined', - optional: true, - }, - ], - }, - { - name: 'git_add_and_commit', - kind: 'function', - doc_comment: 'Adds files and commits in one operation and throws if anything goes wrong.', - source_line: 40, - type_signature: - '(files: string | string[], message: string, options?: SpawnOptions | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'files', - type: 'string | string[]', - optional: false, - }, - { - name: 'message', - type: 'string', - optional: false, - }, - { - name: 'options', - type: 'SpawnOptions | undefined', - optional: true, - }, - ], - }, - { - name: 'git_tag', - kind: 'function', - doc_comment: 'Creates a git tag and throws if anything goes wrong.', - source_line: 52, - type_signature: - '(tag_name: string, message?: string | undefined, options?: SpawnOptions | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'tag_name', - type: 'string', - optional: false, - }, - { - name: 'message', - type: 'string | undefined', - optional: true, - }, - { - name: 'options', - type: 'SpawnOptions | undefined', - optional: true, - }, - ], - }, - { - name: 'git_push_tag', - kind: 'function', - doc_comment: 'Pushes a tag to origin and throws if anything goes wrong.', - source_line: 68, - type_signature: - '(tag_name: string, origin?: GitOrigin, options?: SpawnOptions | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'tag_name', - type: 'string', - optional: false, - }, - { - name: 'origin', - type: 'GitOrigin', - optional: false, - default_value: "'origin' as GitOrigin", - }, - { - name: 'options', - type: 'SpawnOptions | undefined', - optional: true, - }, - ], - }, - { - name: 'git_has_changes', - kind: 'function', - source_line: 79, - type_signature: '(options?: SpawnOptions | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'options', - type: 'SpawnOptions | undefined', - optional: true, - }, - ], - }, - { - name: 'git_get_changed_files', - kind: 'function', - doc_comment: 'Returns list of changed files compared to HEAD.', - source_line: 87, - type_signature: '(options?: SpawnOptions | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'options', - type: 'SpawnOptions | undefined', - optional: true, - }, - ], - }, - { - name: 'git_has_file_changed', - kind: 'function', - source_line: 97, - type_signature: - '(from_commit: string, to_commit: string, file_path: string, options?: SpawnOptions | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'from_commit', - type: 'string', - optional: false, - }, - { - name: 'to_commit', - type: 'string', - optional: false, - }, - { - name: 'file_path', - type: 'string', - optional: false, - }, - { - name: 'options', - type: 'SpawnOptions | undefined', - optional: true, - }, - ], - }, - { - name: 'git_stash', - kind: 'function', - doc_comment: 'Stashes current changes and throws if anything goes wrong.', - source_line: 114, - type_signature: - '(message?: string | undefined, options?: SpawnOptions | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'message', - type: 'string | undefined', - optional: true, - }, - { - name: 'options', - type: 'SpawnOptions | undefined', - optional: true, - }, - ], - }, - { - name: 'git_stash_pop', - kind: 'function', - doc_comment: 'Applies stashed changes and throws if anything goes wrong.', - source_line: 126, - type_signature: '(options?: SpawnOptions | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'options', - type: 'SpawnOptions | undefined', - optional: true, - }, - ], - }, - { - name: 'git_switch_branch', - kind: 'function', - doc_comment: - 'Switches to a branch with safety checks and throws if workspace is not clean.', - source_line: 136, - type_signature: - '(branch: GitBranch, pull?: boolean, options?: SpawnOptions | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'branch', - type: 'GitBranch', - optional: false, - }, - { - name: 'pull', - type: 'boolean', - optional: false, - default_value: 'true', - }, - { - name: 'options', - type: 'SpawnOptions | undefined', - optional: true, - }, - ], - }, - { - name: 'git_current_branch_name_required', - kind: 'function', - doc_comment: "Wrapper for gro's git_current_branch_name that throws if null.", - source_line: 165, - type_signature: '(options?: SpawnOptions | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'options', - type: 'SpawnOptions | undefined', - optional: true, - }, - ], - }, - { - name: 'git_current_commit_hash_required', - kind: 'function', - doc_comment: "Wrapper for gro's git_current_commit_hash that throws if null.", - source_line: 176, - type_signature: - '(branch?: string | undefined, options?: SpawnOptions | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'branch', - type: 'string | undefined', - optional: true, - }, - { - name: 'options', - type: 'SpawnOptions | undefined', - optional: true, - }, - ], - }, - { - name: 'git_check_clean_workspace_as_boolean', - kind: 'function', - doc_comment: "Wrapper for gro's git_check_clean_workspace that returns a boolean.", - source_line: 190, - type_signature: '(options?: SpawnOptions | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'options', - type: 'SpawnOptions | undefined', - optional: true, - }, - ], - }, - { - name: 'git_has_remote', - kind: 'function', - source_line: 197, - type_signature: '(remote?: string, options?: SpawnOptions | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'remote', - type: 'string', - optional: false, - default_value: "'origin'", - }, - { - name: 'options', - type: 'SpawnOptions | undefined', - optional: true, - }, - ], - }, - ], - dependents: ['operations_defaults.ts'], - }, - { - path: 'github_helpers.ts', - identifiers: [ - { - name: 'FilterPullRequest', - kind: 'type', - source_line: 6, - type_signature: 'FilterPullRequest', - }, - { - name: 'PullRequestMeta', - kind: 'type', - source_line: 8, - type_signature: 'PullRequestMeta', - properties: [ - { - name: 'repo', - kind: 'variable', - type_signature: 'Repo', - }, - { - name: 'pull_request', - kind: 'variable', - type_signature: 'GithubPullRequest', - }, - ], - }, - { - name: 'to_pull_requests', - kind: 'function', - source_line: 13, - type_signature: - '(repos: Repo[], filter_pull_request?: FilterPullRequest | undefined): PullRequestMeta[]', - return_type: 'PullRequestMeta[]', - parameters: [ - { - name: 'repos', - type: 'Repo[]', - optional: false, - }, - { - name: 'filter_pull_request', - type: 'FilterPullRequest | undefined', - optional: true, - }, - ], - }, - { - name: 'to_pull_url', - kind: 'function', - source_line: 30, - type_signature: - '(repo_url: string, pull: { number: number; title: string; user: { login: string; }; draft: boolean; }): string', - return_type: 'string', - parameters: [ - { - name: 'repo_url', - type: 'string', - optional: false, - }, - { - name: 'pull', - type: '{ number: number; title: string; user: { login: string; }; draft: boolean; }', - optional: false, - }, - ], - }, - ], - dependents: ['PullRequestsDetail.svelte', 'ReposTable.svelte'], - }, - { - path: 'github.ts', - identifiers: [ - { - name: 'GithubPullRequest', - kind: 'type', - doc_comment: '', - see_also: [ - 'https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests', - ], - source_line: 9, - type_signature: - 'ZodObject<{ number: ZodNumber; title: ZodString; user: ZodObject<{ login: ZodString; }, $strip>; draft: ZodBoolean; }, $strip>', - }, - { - name: 'GithubPullRequests', - kind: 'type', - source_line: 18, - type_signature: - 'ZodArray; draft: ZodBoolean; }, $strip>>', - }, - { - name: 'fetch_github_pull_requests', - kind: 'function', - doc_comment: '', - see_also: [ - 'https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests', - ], - source_line: 24, - type_signature: - '(pkg: Pkg, cache?: Map | undefined, log?: Logger | undefined, token?: string | undefined, api_version?: string | undefined): Promise<...>', - return_type: - 'Promise<{ number: number; title: string; user: { login: string; }; draft: boolean; }[] | null>', - parameters: [ - { - name: 'pkg', - type: 'Pkg', - optional: false, - }, - { - name: 'cache', - type: 'Map | undefined', - optional: true, - }, - { - name: 'log', - type: 'Logger | undefined', - optional: true, - }, - { - name: 'token', - type: 'string | undefined', - optional: true, - }, - { - name: 'api_version', - type: 'string | undefined', - optional: true, - }, - ], - }, - { - name: 'GithubCheckRunsItem', - kind: 'type', - doc_comment: '', - see_also: [ - 'https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#list-check-runs-for-a-git-reference', - ], - source_line: 56, - type_signature: - 'ZodObject<{ status: ZodEnum<{ queued: "queued"; in_progress: "in_progress"; completed: "completed"; }>; conclusion: ZodNullable>; }, $strip>', - }, - { - name: 'GithubCheckRuns', - kind: 'type', - source_line: 63, - type_signature: - 'ZodObject<{ total_count: ZodNumber; check_runs: ZodArray; conclusion: ZodNullable>; }, $strip>>; }, $strip>', - }, - { - name: 'fetch_github_check_runs', - kind: 'function', - doc_comment: '', - see_also: [ - 'https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#list-check-runs-for-a-git-reference', - ], - source_line: 72, - type_signature: - '(pkg: Pkg, cache?: Map | undefined, log?: Logger | undefined, token?: string | undefined, api_version?: string | undefined, ref?: string): Promise<...>', - return_type: - 'Promise<{ status: "queued" | "in_progress" | "completed"; conclusion: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | null; } | null>', - parameters: [ - { - name: 'pkg', - type: 'Pkg', - optional: false, - }, - { - name: 'cache', - type: 'Map | undefined', - optional: true, - }, - { - name: 'log', - type: 'Logger | undefined', - optional: true, - }, - { - name: 'token', - type: 'string | undefined', - optional: true, - }, - { - name: 'api_version', - type: 'string | undefined', - optional: true, - }, - { - name: 'ref', - type: 'string', - optional: false, - default_value: "'main'", - }, - ], - }, - ], - dependents: ['fetch_repo_data.ts', 'repo.svelte.ts'], - }, - { - path: 'gitops_analyze.task.ts', - identifiers: [], - dependencies: [ - 'dependency_graph.ts', - 'gitops_task_helpers.ts', - 'graph_validation.ts', - 'log_helpers.ts', - 'output_helpers.ts', - ], - }, - { - path: 'gitops_config.ts', - identifiers: [ - { - name: 'GitopsConfig', - kind: 'type', - source_line: 19, - type_signature: 'GitopsConfig', - properties: [ - { - name: 'repos', - kind: 'variable', - type_signature: 'Array', - }, - { - name: 'repos_dir', - kind: 'variable', - type_signature: 'string', - }, - ], - }, - { - name: 'CreateGitopsConfig', - kind: 'type', - source_line: 24, - type_signature: 'CreateGitopsConfig', - }, - { - name: 'RawGitopsConfig', - kind: 'type', - source_line: 28, - type_signature: 'RawGitopsConfig', - properties: [ - { - name: 'repos', - kind: 'variable', - type_signature: 'Array', - }, - { - name: 'repos_dir', - kind: 'variable', - type_signature: 'string', - }, - ], - }, - { - name: 'GitopsRepoConfig', - kind: 'type', - source_line: 33, - type_signature: 'GitopsRepoConfig', - properties: [ - { - name: 'repo_url', - kind: 'variable', - type_signature: 'Url', - doc_comment: 'The HTTPS URL to the repo. Does not include a `.git` suffix.', - }, - { - name: 'repo_dir', - kind: 'variable', - type_signature: 'string | null', - doc_comment: - "Relative or absolute path to the repo's local directory.\nIf `null`, the directory is inferred from the URL and cwd.", - }, - { - name: 'branch', - kind: 'variable', - type_signature: 'GitBranch', - doc_comment: 'The branch name to use when fetching the repo. Defaults to `main`.', - }, - ], - }, - { - name: 'RawGitopsRepoConfig', - kind: 'type', - source_line: 54, - type_signature: 'RawGitopsRepoConfig', - properties: [ - { - name: 'repo_url', - kind: 'variable', - type_signature: 'Url', - }, - { - name: 'repo_dir', - kind: 'variable', - type_signature: 'string | null', - }, - { - name: 'branch', - kind: 'variable', - type_signature: 'GitBranch', - }, - ], - }, - { - name: 'create_empty_gitops_config', - kind: 'function', - source_line: 60, - type_signature: '(): GitopsConfig', - return_type: 'GitopsConfig', - parameters: [], - }, - { - name: 'normalize_gitops_config', - kind: 'function', - doc_comment: - 'Transforms a `RawGitopsConfig` to the more strict `GitopsConfig`.\nThis allows users to provide a more relaxed config.', - source_line: 69, - type_signature: '(raw_config: RawGitopsConfig): GitopsConfig', - return_type: 'GitopsConfig', - parameters: [ - { - name: 'raw_config', - type: 'RawGitopsConfig', - optional: false, - }, - ], - }, - { - name: 'GitopsConfigModule', - kind: 'type', - source_line: 92, - type_signature: 'GitopsConfigModule', - properties: [ - { - name: 'default', - kind: 'variable', - modifiers: ['readonly'], - type_signature: 'RawGitopsConfig | CreateGitopsConfig', - }, - ], - }, - { - name: 'load_gitops_config', - kind: 'function', - source_line: 96, - type_signature: '(config_path: string): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'config_path', - type: 'string', - optional: false, - }, - ], - }, - { - name: 'validate_gitops_config_module', - kind: 'function', - source_line: 111, - type_signature: - '(config_module: any, config_path: string): asserts config_module is GitopsConfigModule', - return_type: 'void', - parameters: [ - { - name: 'config_module', - type: 'any', - optional: false, - }, - { - name: 'config_path', - type: 'string', - optional: false, - }, - ], - }, - ], - module_comment: - 'Configuration types and normalization for gitops multi-repo management.\n\nTwo-phase configuration system:\n- `RawGitopsConfig` - User-friendly format with optional fields and flexible types\n- `GitopsConfig` - Internal format with required fields and strict types\n\nThis allows users to provide minimal configs (e.g., just URLs as strings) while\nthe system works with normalized configs internally for type safety.', - dependencies: ['paths.ts'], - dependents: ['gitops_task_helpers.ts', 'repo_ops.ts'], - }, - { - path: 'gitops_plan.task.ts', - identifiers: [], - dependencies: ['gitops_task_helpers.ts', 'output_helpers.ts', 'publishing_plan.ts'], - }, - { - path: 'gitops_publish.task.ts', - identifiers: [], - dependencies: [ - 'gitops_task_helpers.ts', - 'multi_repo_publisher.ts', - 'output_helpers.ts', - 'publishing_plan.ts', - ], - }, - { - path: 'gitops_sync.task.ts', - identifiers: [], - dependencies: ['fetch_repo_data.ts', 'fs_fetch_value_cache.ts', 'gitops_task_helpers.ts'], - }, - { - path: 'gitops_task_helpers.ts', - identifiers: [ - { - name: 'GetGitopsReadyOptions', - kind: 'type', - source_line: 29, - type_signature: 'GetGitopsReadyOptions', - properties: [ - { - name: 'path', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'dir', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'download', - kind: 'variable', - type_signature: 'boolean', - }, - { - name: 'log', - kind: 'variable', - type_signature: 'Logger', - }, - { - name: 'git_ops', - kind: 'variable', - type_signature: 'GitOperations', - }, - { - name: 'npm_ops', - kind: 'variable', - type_signature: 'NpmOperations', - }, - ], - }, - { - name: 'get_gitops_ready', - kind: 'function', - doc_comment: - 'Central initialization function for all gitops tasks.\n\nInitialization sequence:\n1. Loads and normalizes config from `gitops.config.ts`\n2. Resolves local repo paths (creates missing with `--download`)\n3. Switches branches and pulls latest changes\n4. Auto-installs deps if package.json changed during pull\n\nPriority for path resolution:\n- `dir` argument (explicit override)\n- Config `repos_dir` setting\n- `DEFAULT_REPOS_DIR` constant', - throws: [ - { - type: 'if', - description: 'config loading or repo resolution fails', - }, - ], - source_line: 57, - type_signature: - '(options: GetGitopsReadyOptions): Promise<{ config_path: string; repos_dir: string; gitops_config: GitopsConfig; local_repos: LocalRepo[]; }>', - return_type: - 'Promise<{ config_path: string; repos_dir: string; gitops_config: GitopsConfig; local_repos: LocalRepo[]; }>', - return_description: 'initialized config and fully loaded repos ready for operations', - parameters: [ - { - name: 'options', - type: 'GetGitopsReadyOptions', - optional: false, - }, - ], - }, - { - name: 'ResolveGitopsPathsOptions', - kind: 'type', - source_line: 96, - type_signature: 'ResolveGitopsPathsOptions', - properties: [ - { - name: 'path', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'dir', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'config_repos_dir', - kind: 'variable', - type_signature: 'string', - }, - ], - }, - { - name: 'resolve_gitops_paths', - kind: 'function', - source_line: 102, - type_signature: - '(options: ResolveGitopsPathsOptions): { config_path: string; repos_dir: string; }', - return_type: '{ config_path: string; repos_dir: string; }', - parameters: [ - { - name: 'options', - type: 'ResolveGitopsPathsOptions', - optional: false, - }, - ], - }, - { - name: 'import_gitops_config', - kind: 'function', - source_line: 120, - type_signature: '(config_path: string): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'config_path', - type: 'string', - optional: false, - }, - ], - }, - ], - module_comment: - 'Shared initialization logic for all gitops tasks.\n\nProvides `get_gitops_ready()` which orchestrates:\n- Config loading and normalization\n- Repo resolution (local path discovery)\n- Branch switching and syncing\n- Dependency installation\n\nUsed by: `gitops_sync.task.ts`, `gitops_analyze.task.ts`, `gitops_plan.task.ts`,\n`gitops_publish.task.ts`, and `gitops_validate.task.ts`.\n\nAccepts `git_ops` and `npm_ops` parameters to support testing via operations pattern\n(see `operations.ts` for dependency injection details).', - dependencies: ['gitops_config.ts', 'local_repo.ts', 'paths.ts', 'resolved_gitops_config.ts'], - dependents: [ - 'gitops_analyze.task.ts', - 'gitops_plan.task.ts', - 'gitops_publish.task.ts', - 'gitops_sync.task.ts', - 'gitops_validate.task.ts', - ], - }, - { - path: 'gitops_validate.task.ts', - identifiers: [], - dependencies: [ - 'dependency_graph.ts', - 'gitops_task_helpers.ts', - 'graph_validation.ts', - 'log_helpers.ts', - 'multi_repo_publisher.ts', - 'publishing_plan.ts', - ], - }, - { - path: 'graph_validation.ts', - identifiers: [ - { - name: 'GraphValidationResult', - kind: 'type', - source_line: 21, - type_signature: 'GraphValidationResult', - properties: [ - { - name: 'graph', - kind: 'variable', - type_signature: 'DependencyGraph', - }, - { - name: 'publishing_order', - kind: 'variable', - type_signature: 'Array', - }, - { - name: 'production_cycles', - kind: 'variable', - type_signature: 'Array>', - }, - { - name: 'dev_cycles', - kind: 'variable', - type_signature: 'Array>', - }, - { - name: 'sort_error', - kind: 'variable', - type_signature: 'string', - }, - ], - }, - { - name: 'validate_dependency_graph', - kind: 'function', - doc_comment: - 'Shared utility for building dependency graph, detecting cycles, and computing publishing order.\nThis centralizes logic that was duplicated across multi_repo_publisher, publishing_plan, and gitops_analyze.', - throws: [ - { - type: 'if', - description: 'production cycles detected and throw_on_prod_cycles is true', - }, - ], - source_line: 39, - type_signature: - '(repos: LocalRepo[], log?: Logger | undefined, options?: { throw_on_prod_cycles?: boolean | undefined; log_cycles?: boolean | undefined; log_order?: boolean | undefined; }): GraphValidationResult', - return_type: 'GraphValidationResult', - return_description: - 'graph validation result with graph, publishing order, and detected cycles', - parameters: [ - { - name: 'repos', - type: 'LocalRepo[]', - optional: false, - }, - { - name: 'log', - type: 'Logger | undefined', - optional: true, - }, - { - name: 'options', - type: '{ throw_on_prod_cycles?: boolean | undefined; log_cycles?: boolean | undefined; log_order?: boolean | undefined; }', - optional: false, - default_value: '{}', - }, - ], - }, - ], - module_comment: - 'Shared dependency graph validation logic used across multiple workflows.\n\nConsolidates graph building, cycle detection, and publishing order computation\nthat was duplicated in three places: `multi_repo_publisher.ts`, `publishing_plan.ts`,\nand `gitops_analyze.task.ts`.\n\nOptions pattern supports different behaviors: analyze can tolerate cycles for\nreporting, while publish must throw on production cycles.\n\nSee also: `dependency_graph.ts` for core graph data structure and algorithms.', - dependencies: ['dependency_graph.ts'], - dependents: [ - 'gitops_analyze.task.ts', - 'gitops_validate.task.ts', - 'multi_repo_publisher.ts', - 'publishing_plan.ts', - ], - }, - { - path: 'local_repo.ts', - identifiers: [ - { - name: 'LocalRepo', - kind: 'type', - source_line: 16, - type_signature: 'LocalRepo', - extends: ['ResolvedLocalRepo'], - properties: [ - { - name: 'pkg', - kind: 'variable', - type_signature: 'Pkg', - }, - { - name: 'dependencies', - kind: 'variable', - type_signature: 'Map', - }, - { - name: 'dev_dependencies', - kind: 'variable', - type_signature: 'Map', - }, - { - name: 'peer_dependencies', - kind: 'variable', - type_signature: 'Map', - }, - ], - }, - { - name: 'MaybeLocalRepo', - kind: 'type', - source_line: 23, - type_signature: 'MaybeLocalRepo', - }, - { - name: 'ResolvedLocalRepo', - kind: 'type', - source_line: 25, - type_signature: 'ResolvedLocalRepo', - properties: [ - { - name: 'type', - kind: 'variable', - type_signature: "'resolved_local_repo'", - }, - { - name: 'repo_name', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'repo_dir', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'repo_url', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'repo_git_ssh_url', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'repo_config', - kind: 'variable', - type_signature: 'GitopsRepoConfig', - }, - ], - }, - { - name: 'UnresolvedLocalRepo', - kind: 'type', - source_line: 34, - type_signature: 'UnresolvedLocalRepo', - properties: [ - { - name: 'type', - kind: 'variable', - type_signature: "'unresolved_local_repo'", - }, - { - name: 'repo_name', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'repo_url', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'repo_git_ssh_url', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'repo_config', - kind: 'variable', - type_signature: 'GitopsRepoConfig', - }, - ], - }, - { - name: 'load_local_repo', - kind: 'function', - doc_comment: - 'Loads repo data with automatic syncing and dependency management.\n\nWorkflow:\n1. Records current commit hash (for detecting changes)\n2. Switches to target branch if needed (requires clean workspace)\n3. Pulls latest changes from remote (skipped for local-only repos)\n4. Validates workspace is clean after pull\n5. Auto-installs dependencies if package.json changed\n6. Parses package.json and extracts Pkg metadata\n\nThis ensures repos are always in sync with their configured branch\nbefore being used by gitops commands.', - throws: [ - { - type: 'if', - description: 'workspace dirty, branch switch fails, or install fails', - }, - ], - source_line: 58, - type_signature: - '({ resolved_local_repo, log: _log, git_ops, npm_ops, }: { resolved_local_repo: ResolvedLocalRepo; log?: Logger | undefined; git_ops?: GitOperations | undefined; npm_ops?: NpmOperations | undefined; }): Promise<...>', - return_type: 'Promise', - parameters: [ - { - name: '__0', - type: '{ resolved_local_repo: ResolvedLocalRepo; log?: Logger | undefined; git_ops?: GitOperations | undefined; npm_ops?: NpmOperations | undefined; }', - optional: false, - }, - ], - }, - { - name: 'resolve_local_repos', - kind: 'function', - source_line: 186, - type_signature: - '({ resolved_config, repos_dir, gitops_config, download, log, npm_ops, }: { resolved_config: ResolvedGitopsConfig; repos_dir: string; gitops_config: GitopsConfig; download: boolean; log?: Logger | undefined; npm_ops?: NpmOperations | undefined; }): Promise<...>', - return_type: 'Promise', - parameters: [ - { - name: '__0', - type: '{ resolved_config: ResolvedGitopsConfig; repos_dir: string; gitops_config: GitopsConfig; download: boolean; log?: Logger | undefined; npm_ops?: NpmOperations | undefined; }', - optional: false, - }, - ], - }, - { - name: 'load_local_repos', - kind: 'function', - source_line: 236, - type_signature: - '({ resolved_local_repos, log, git_ops, npm_ops, }: { resolved_local_repos: ResolvedLocalRepo[]; log?: Logger | undefined; git_ops?: GitOperations | undefined; npm_ops?: NpmOperations | undefined; }): Promise<...>', - return_type: 'Promise', - parameters: [ - { - name: '__0', - type: '{ resolved_local_repos: ResolvedLocalRepo[]; log?: Logger | undefined; git_ops?: GitOperations | undefined; npm_ops?: NpmOperations | undefined; }', - optional: false, - }, - ], - }, - { - name: 'resolve_local_repo', - kind: 'function', - source_line: 254, - type_signature: - '({ repo_config, repos_dir, }: { repo_config: GitopsRepoConfig; repos_dir: string; }): MaybeLocalRepo', - return_type: 'MaybeLocalRepo', - parameters: [ - { - name: '__0', - type: '{ repo_config: GitopsRepoConfig; repos_dir: string; }', - optional: false, - }, - ], - }, - ], - dependencies: ['operations_defaults.ts'], - dependents: ['gitops_task_helpers.ts', 'resolved_gitops_config.ts'], - }, - { - path: 'log_helpers.ts', - identifiers: [ - { - name: 'format_wildcard_dependencies', - kind: 'function', - doc_comment: - 'Formats wildcard dependencies as styled strings.\nReturns array of lines for inclusion in output.', - source_line: 10, - type_signature: - '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }): string[]', - return_type: 'string[]', - parameters: [ - { - name: 'analysis', - type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', - optional: false, - }, - ], - }, - { - name: 'format_dev_cycles', - kind: 'function', - doc_comment: - 'Formats dev circular dependencies as styled strings.\nReturns array of lines for inclusion in output.', - source_line: 27, - type_signature: - '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }): string[]', - return_type: 'string[]', - parameters: [ - { - name: 'analysis', - type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', - optional: false, - }, - ], - }, - { - name: 'format_production_cycles', - kind: 'function', - doc_comment: - 'Formats production/peer circular dependencies as styled strings.\nReturns array of lines for inclusion in output.', - source_line: 49, - type_signature: - '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }): string[]', - return_type: 'string[]', - parameters: [ - { - name: 'analysis', - type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', - optional: false, - }, - ], - }, - { - name: 'log_wildcard_dependencies', - kind: 'function', - doc_comment: - 'Logs wildcard dependencies as warnings.\nWildcard dependencies require attention and should be reviewed.', - source_line: 71, - type_signature: - '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }, log: Logger, indent?: string): void', - return_type: 'void', - parameters: [ - { - name: 'analysis', - type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', - optional: false, - }, - { - name: 'log', - type: 'Logger', - optional: false, - }, - { - name: 'indent', - type: 'string', - optional: false, - default_value: "''", - }, - ], - }, - { - name: 'log_dev_cycles', - kind: 'function', - doc_comment: - "Logs dev circular dependencies as info.\nDev cycles are normal and non-blocking, so they're informational, not warnings.", - source_line: 86, - type_signature: - '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }, log: Logger, indent?: string): void', - return_type: 'void', - parameters: [ - { - name: 'analysis', - type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', - optional: false, - }, - { - name: 'log', - type: 'Logger', - optional: false, - }, - { - name: 'indent', - type: 'string', - optional: false, - default_value: "''", - }, - ], - }, - { - name: 'log_production_cycles', - kind: 'function', - doc_comment: - 'Logs production/peer circular dependencies as errors.\nProduction cycles block publishing and must be resolved.', - source_line: 101, - type_signature: - '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }, log: Logger, indent?: string): void', - return_type: 'void', - parameters: [ - { - name: 'analysis', - type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', - optional: false, - }, - { - name: 'log', - type: 'Logger', - optional: false, - }, - { - name: 'indent', - type: 'string', - optional: false, - default_value: "''", - }, - ], - }, - { - name: 'log_dependency_analysis', - kind: 'function', - doc_comment: - 'Logs all dependency analysis results (wildcards, production cycles, dev cycles).\nConvenience function that calls all three logging functions in order.', - source_line: 116, - type_signature: - '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }, log: Logger, indent?: string): void', - return_type: 'void', - parameters: [ - { - name: 'analysis', - type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', - optional: false, - }, - { - name: 'log', - type: 'Logger', - optional: false, - }, - { - name: 'indent', - type: 'string', - optional: false, - default_value: "''", - }, - ], - }, - { - name: 'log_list', - kind: 'function', - doc_comment: - 'Logs a simple bulleted list with a header.\nCommon pattern for warnings, info messages, and other lists.', - source_line: 130, - type_signature: - '(items: string[], header: string, color: "cyan" | "yellow" | "red" | "dim", log: Logger, log_method?: "info" | "warn" | "error"): void', - return_type: 'void', - parameters: [ - { - name: 'items', - type: 'string[]', - optional: false, - }, - { - name: 'header', - type: 'string', - optional: false, - }, - { - name: 'color', - type: '"cyan" | "yellow" | "red" | "dim"', - optional: false, - }, - { - name: 'log', - type: 'Logger', - optional: false, - }, - { - name: 'log_method', - type: '"info" | "warn" | "error"', - optional: false, - default_value: "'info'", - }, - ], - }, - ], - dependents: ['gitops_analyze.task.ts', 'gitops_validate.task.ts', 'publishing_plan.ts'], - }, - { - path: 'ModulesDetail.svelte', - identifiers: [ - { - name: 'ModulesDetail', - kind: 'component', - props: [ - { - name: 'repos', - type: 'Array', - optional: false, - }, - { - name: 'nav_footer', - type: 'Snippet', - optional: true, - }, - ], - source_line: 1, - }, - ], - dependencies: ['ModulesNav.svelte'], - dependents: ['ModulesPage.svelte'], - }, - { - path: 'ModulesNav.svelte', - identifiers: [ - { - name: 'ModulesNav', - kind: 'component', - props: [ - { - name: 'repos_modules', - type: 'Array<{\n\t\t\trepo: Repo;\n\t\t\tmodules: Array;\n\t\t}>', - optional: false, - }, - ], - source_line: 1, - }, - ], - dependents: ['ModulesDetail.svelte'], - }, - { - path: 'ModulesPage.svelte', - identifiers: [ - { - name: 'ModulesPage', - kind: 'component', - props: [ - { - name: 'repo', - type: 'Repo', - optional: false, - }, - { - name: 'repos', - type: 'Array', - optional: false, - }, - ], - source_line: 1, - }, - ], - dependencies: ['ModulesDetail.svelte', 'PageFooter.svelte', 'PageHeader.svelte'], - }, - { - path: 'multi_repo_publisher.ts', - identifiers: [ - { - name: 'PublishingOptions', - kind: 'type', - source_line: 18, - type_signature: 'PublishingOptions', - properties: [ - { - name: 'dry_run', - kind: 'variable', - type_signature: 'boolean', - }, - { - name: 'update_deps', - kind: 'variable', - type_signature: 'boolean', - }, - { - name: 'version_strategy', - kind: 'variable', - type_signature: 'VersionStrategy', - }, - { - name: 'deploy', - kind: 'variable', - type_signature: 'boolean', - }, - { - name: 'max_wait', - kind: 'variable', - type_signature: 'number', - }, - { - name: 'skip_install', - kind: 'variable', - type_signature: 'boolean', - }, - { - name: 'log', - kind: 'variable', - type_signature: 'Logger', - }, - ], - }, - { - name: 'PublishedVersion', - kind: 'type', - source_line: 28, - type_signature: 'PublishedVersion', - properties: [ - { - name: 'name', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'old_version', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'new_version', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'bump_type', - kind: 'variable', - type_signature: "'major' | 'minor' | 'patch'", - }, - { - name: 'breaking', - kind: 'variable', - type_signature: 'boolean', - }, - { - name: 'commit', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'tag', - kind: 'variable', - type_signature: 'string', - }, - ], - }, - { - name: 'PublishingResult', - kind: 'type', - source_line: 38, - type_signature: 'PublishingResult', - properties: [ - { - name: 'ok', - kind: 'variable', - type_signature: 'boolean', - }, - { - name: 'published', - kind: 'variable', - type_signature: 'Array', - }, - { - name: 'failed', - kind: 'variable', - type_signature: 'Array<{name: string; error: Error}>', - }, - { - name: 'duration', - kind: 'variable', - type_signature: 'number', - }, - ], - }, - { - name: 'publish_repos', - kind: 'function', - source_line: 45, - type_signature: - '(repos: LocalRepo[], options: PublishingOptions, ops?: GitopsOperations): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'repos', - type: 'LocalRepo[]', - optional: false, - }, - { - name: 'options', - type: 'PublishingOptions', - optional: false, - }, - { - name: 'ops', - type: 'GitopsOperations', - optional: false, - default_value: 'default_gitops_operations', - }, - ], - }, - ], - dependencies: [ - 'constants.ts', - 'dependency_updater.ts', - 'graph_validation.ts', - 'npm_install_helpers.ts', - 'operations_defaults.ts', - 'version_utils.ts', - ], - dependents: ['gitops_publish.task.ts', 'gitops_validate.task.ts'], - }, - { - path: 'npm_install_helpers.ts', - identifiers: [ - { - name: 'install_with_cache_healing', - kind: 'function', - doc_comment: - 'Installs npm dependencies with cache healing on ETARGET errors.\n\n**Strategy:**\n1. First attempt: regular `npm install`\n2. On ETARGET error (stale cache): `npm cache clean --force` then retry\n3. On other errors: fail immediately\n\n**Why ETARGET errors occur:**\nAfter publishing a package and waiting for NPM registry propagation,\nnpm\'s local cache may still have stale "404" metadata. This healing\nstrategy clears the cache to force fresh metadata fetch.', - throws: [ - { - type: 'Error', - description: 'if install fails (with details about cache healing attempts)', - }, - ], - source_line: 42, - type_signature: - '(repo: LocalRepo, ops: GitopsOperations, log?: Logger | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'repo', - type: 'LocalRepo', - optional: false, - description: '- The repository to install dependencies for', - }, - { - name: 'ops', - type: 'GitopsOperations', - optional: false, - description: '- Gitops operations (for dependency injection)', - }, - { - name: 'log', - type: 'Logger | undefined', - optional: true, - description: '- Optional logger', - }, - ], - }, - ], - dependents: ['multi_repo_publisher.ts'], - }, - { - path: 'npm_registry.ts', - identifiers: [ - { - name: 'WaitOptions', - kind: 'type', - source_line: 6, - type_signature: 'WaitOptions', - properties: [ - { - name: 'max_attempts', - kind: 'variable', - type_signature: 'number', - }, - { - name: 'initial_delay', - kind: 'variable', - type_signature: 'number', - }, - { - name: 'max_delay', - kind: 'variable', - type_signature: 'number', - }, - { - name: 'timeout', - kind: 'variable', - type_signature: 'number', - }, - ], - }, - { - name: 'PackageInfo', - kind: 'type', - source_line: 13, - type_signature: 'PackageInfo', - properties: [ - { - name: 'name', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'version', - kind: 'variable', - type_signature: 'string', - }, - ], - }, - { - name: 'check_package_available', - kind: 'function', - source_line: 18, - type_signature: - '(pkg: string, version: string, log?: Logger | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'pkg', - type: 'string', - optional: false, - }, - { - name: 'version', - type: 'string', - optional: false, - }, - { - name: 'log', - type: 'Logger | undefined', - optional: true, - }, - ], - }, - { - name: 'wait_for_package', - kind: 'function', - doc_comment: - 'Waits for package version to propagate to NPM registry.\n\nUses exponential backoff with jitter to avoid hammering registry.\nLogs progress every 5 attempts. Respects timeout to avoid infinite waits.\n\nCritical for multi-repo publishing: ensures published packages are available\nbefore updating dependent packages.', - throws: [ - { - type: 'if', - description: 'timeout reached or max attempts exceeded', - }, - ], - source_line: 55, - type_signature: - '(pkg: string, version: string, options?: WaitOptions, log?: Logger | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'pkg', - type: 'string', - optional: false, - }, - { - name: 'version', - type: 'string', - optional: false, - }, - { - name: 'options', - type: 'WaitOptions', - optional: false, - default_value: '{}', - }, - { - name: 'log', - type: 'Logger | undefined', - optional: true, - }, - ], - }, - { - name: 'get_package_info', - kind: 'function', - doc_comment: - "Fetches package metadata from NPM registry.\n\nReturns name and latest version. Returns null if package doesn't exist\nor registry is unreachable.", - source_line: 112, - type_signature: '(pkg: string, log?: Logger | undefined): Promise', - return_type: 'Promise', - return_description: 'package info or null on error/not found', - parameters: [ - { - name: 'pkg', - type: 'string', - optional: false, - }, - { - name: 'log', - type: 'Logger | undefined', - optional: true, - }, - ], - }, - { - name: 'package_exists', - kind: 'function', - source_line: 131, - type_signature: '(pkg: string, log?: Logger | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'pkg', - type: 'string', - optional: false, - }, - { - name: 'log', - type: 'Logger | undefined', - optional: true, - }, - ], - }, - ], - dependents: ['operations_defaults.ts'], - }, - { - path: 'operations_defaults.ts', - identifiers: [ - { - name: 'default_changeset_operations', - kind: 'variable', - source_line: 44, - type_signature: 'ChangesetOperations', - }, - { - name: 'default_git_operations', - kind: 'variable', - source_line: 80, - type_signature: 'GitOperations', - }, - { - name: 'default_process_operations', - kind: 'variable', - source_line: 263, - type_signature: 'ProcessOperations', - }, - { - name: 'default_npm_operations', - kind: 'variable', - source_line: 287, - type_signature: 'NpmOperations', - }, - { - name: 'default_preflight_operations', - kind: 'variable', - source_line: 363, - type_signature: 'PreflightOperations', - }, - { - name: 'default_fs_operations', - kind: 'variable', - source_line: 369, - type_signature: 'FsOperations', - }, - { - name: 'default_build_operations', - kind: 'variable', - source_line: 391, - type_signature: 'BuildOperations', - }, - { - name: 'default_gitops_operations', - kind: 'variable', - doc_comment: 'Combined default operations for all gitops functionality.', - source_line: 415, - type_signature: 'GitopsOperations', - }, - ], - module_comment: - 'Production implementations of operations interfaces.\n\nProvides real git, npm, fs, and build operations for production use.\nFor interface definitions and dependency injection pattern, see `operations.ts`.', - dependencies: [ - 'changeset_reader.ts', - 'git_operations.ts', - 'npm_registry.ts', - 'preflight_checks.ts', - ], - dependents: [ - 'dependency_updater.ts', - 'local_repo.ts', - 'multi_repo_publisher.ts', - 'preflight_checks.ts', - 'publishing_plan.ts', - ], - }, - { - path: 'operations.ts', - identifiers: [ - { - name: 'ChangesetOperations', - kind: 'type', - doc_comment: - 'Changeset operations for reading and predicting versions from `.changeset/*.md` files.', - source_line: 47, - type_signature: 'ChangesetOperations', - properties: [ - { - name: 'has_changesets', - kind: 'variable', - type_signature: - '(options: {\n\t\trepo: LocalRepo;\n\t}) => Promise>', - doc_comment: - 'Checks if a repo has any changeset files.\nReturns true if changesets exist, false if none found.', - }, - { - name: 'read_changesets', - kind: 'variable', - type_signature: - '(options: {\n\t\trepo: LocalRepo;\n\t\tlog?: Logger;\n\t}) => Promise}, {message: string}>>', - doc_comment: - 'Reads all changeset files from a repo.\nReturns array of changeset info, or error if reading fails.', - }, - { - name: 'predict_next_version', - kind: 'variable', - type_signature: - '(options: {\n\t\trepo: LocalRepo;\n\t\tlog?: Logger;\n\t}) => Promise | null>', - doc_comment: - "Predicts the next version based on changesets.\nReturns null if no changesets found (expected, not an error).\nReturns error Result if changesets exist but can't be read/parsed.", - }, - ], - }, - { - name: 'GitOperations', - kind: 'type', - doc_comment: - 'Git operations for branch management, commits, tags, and workspace state.\nAll operations return `Result` instead of throwing errors.', - source_line: 80, - type_signature: 'GitOperations', - properties: [ - { - name: 'current_branch_name', - kind: 'variable', - type_signature: - '(options?: {\n\t\tcwd?: string;\n\t}) => Promise>', - doc_comment: 'Gets the current branch name.', - }, - { - name: 'current_commit_hash', - kind: 'variable', - type_signature: - '(options?: {\n\t\tbranch?: string;\n\t\tcwd?: string;\n\t}) => Promise>', - doc_comment: 'Gets the current commit hash.', - }, - { - name: 'check_clean_workspace', - kind: 'variable', - type_signature: - '(options?: {\n\t\tcwd?: string;\n\t}) => Promise>', - doc_comment: 'Checks if the workspace is clean (no uncommitted changes).', - }, - { - name: 'checkout', - kind: 'variable', - type_signature: - '(options: {branch: string; cwd?: string}) => Promise>', - doc_comment: 'Checks out a branch.', - }, - { - name: 'pull', - kind: 'variable', - type_signature: - '(options?: {\n\t\torigin?: string;\n\t\tbranch?: string;\n\t\tcwd?: string;\n\t}) => Promise>', - doc_comment: 'Pulls changes from remote.', - }, - { - name: 'switch_branch', - kind: 'variable', - type_signature: - '(options: {\n\t\tbranch: string;\n\t\tpull?: boolean;\n\t\tcwd?: string;\n\t}) => Promise>', - doc_comment: 'Switches to a branch, optionally pulling.', - }, - { - name: 'has_remote', - kind: 'variable', - type_signature: - '(options?: {\n\t\tremote?: string;\n\t\tcwd?: string;\n\t}) => Promise>', - doc_comment: 'Checks if a remote exists.', - }, - { - name: 'add', - kind: 'variable', - type_signature: - '(options: {\n\t\tfiles: string | Array;\n\t\tcwd?: string;\n\t}) => Promise>', - doc_comment: 'Stages files for commit.', - }, - { - name: 'commit', - kind: 'variable', - type_signature: - '(options: {message: string; cwd?: string}) => Promise>', - doc_comment: 'Creates a commit.', - }, - { - name: 'add_and_commit', - kind: 'variable', - type_signature: - '(options: {\n\t\tfiles: string | Array;\n\t\tmessage: string;\n\t\tcwd?: string;\n\t}) => Promise>', - doc_comment: 'Stages files and creates a commit.', - }, - { - name: 'has_changes', - kind: 'variable', - type_signature: - '(options?: {cwd?: string}) => Promise>', - doc_comment: 'Checks if there are any uncommitted changes.', - }, - { - name: 'get_changed_files', - kind: 'variable', - type_signature: - '(options?: {\n\t\tcwd?: string;\n\t}) => Promise}, {message: string}>>', - doc_comment: 'Gets a list of changed files.', - }, - { - name: 'tag', - kind: 'variable', - type_signature: - '(options: {\n\t\ttag_name: string;\n\t\tmessage?: string;\n\t\tcwd?: string;\n\t}) => Promise>', - doc_comment: 'Creates a git tag.', - }, - { - name: 'push_tag', - kind: 'variable', - type_signature: - '(options: {\n\t\ttag_name: string;\n\t\torigin?: string;\n\t\tcwd?: string;\n\t}) => Promise>', - doc_comment: 'Pushes a tag to remote.', - }, - { - name: 'stash', - kind: 'variable', - type_signature: - '(options?: {message?: string; cwd?: string}) => Promise>', - doc_comment: 'Stashes uncommitted changes.', - }, - { - name: 'stash_pop', - kind: 'variable', - type_signature: - '(options?: {cwd?: string}) => Promise>', - doc_comment: 'Pops the most recent stash.', - }, - { - name: 'has_file_changed', - kind: 'variable', - type_signature: - '(options: {\n\t\tfrom_commit: string;\n\t\tto_commit: string;\n\t\tfile_path: string;\n\t\tcwd?: string;\n\t}) => Promise>', - doc_comment: 'Checks if a specific file changed between two commits.', - }, - ], - }, - { - name: 'ProcessOperations', - kind: 'type', - doc_comment: 'Process spawning operations for running shell commands.', - source_line: 210, - type_signature: 'ProcessOperations', - properties: [ - { - name: 'spawn', - kind: 'variable', - type_signature: - '(options: {\n\t\tcmd: string;\n\t\targs: Array;\n\t\tspawn_options?: SpawnOptions;\n\t}) => Promise>', - doc_comment: 'Spawns a child process and waits for completion.', - }, - ], - }, - { - name: 'BuildOperations', - kind: 'type', - doc_comment: 'Build operations for validating packages compile before publishing.', - source_line: 224, - type_signature: 'BuildOperations', - properties: [ - { - name: 'build_package', - kind: 'variable', - type_signature: - '(options: {\n\t\trepo: LocalRepo;\n\t\tlog?: Logger;\n\t}) => Promise>', - doc_comment: 'Builds a package using gro build.', - }, - ], - }, - { - name: 'NpmOperations', - kind: 'type', - doc_comment: - 'NPM registry operations for package availability checks and authentication.\nIncludes exponential backoff for waiting on package propagation.', - source_line: 238, - type_signature: 'NpmOperations', - properties: [ - { - name: 'wait_for_package', - kind: 'variable', - type_signature: - '(options: {\n\t\tpkg: string;\n\t\tversion: string;\n\t\twait_options?: WaitOptions;\n\t\tlog?: Logger;\n\t}) => Promise>', - doc_comment: - 'Waits for a package version to be available on NPM.\nUses exponential backoff with configurable timeout.', - }, - { - name: 'check_package_available', - kind: 'variable', - type_signature: - '(options: {\n\t\tpkg: string;\n\t\tversion: string;\n\t\tlog?: Logger;\n\t}) => Promise>', - doc_comment: 'Checks if a package version is available on NPM.', - }, - { - name: 'check_auth', - kind: 'variable', - type_signature: '() => Promise>', - doc_comment: 'Checks npm authentication status.', - }, - { - name: 'check_registry', - kind: 'variable', - type_signature: '() => Promise>', - doc_comment: 'Checks if npm registry is reachable.', - }, - { - name: 'install', - kind: 'variable', - type_signature: - '(options?: {\n\t\tcwd?: string;\n\t}) => Promise>', - doc_comment: 'Installs npm dependencies.', - }, - { - name: 'cache_clean', - kind: 'variable', - type_signature: '() => Promise>', - doc_comment: - 'Cleans the npm cache.\nUses `npm cache clean --force` to clear stale cache entries.', - }, - ], - }, - { - name: 'PreflightOperations', - kind: 'type', - doc_comment: - 'Preflight validation operations to ensure repos are ready for publishing.\nValidates workspace state, branches, builds, and npm authentication.', - source_line: 287, - type_signature: 'PreflightOperations', - properties: [ - { - name: 'run_preflight_checks', - kind: 'variable', - type_signature: - '(options: {\n\t\trepos: Array;\n\t\tpreflight_options: PreflightOptions;\n\t\tgit_ops?: GitOperations;\n\t\tnpm_ops?: NpmOperations;\n\t\tbuild_ops?: BuildOperations;\n\t\tchangeset_ops?: ChangesetOperations;\n\t}) => Promise', - doc_comment: 'Runs preflight validation checks before publishing.', - }, - ], - }, - { - name: 'FsOperations', - kind: 'type', - doc_comment: 'File system operations for reading and writing files.', - source_line: 304, - type_signature: 'FsOperations', - properties: [ - { - name: 'readFile', - kind: 'variable', - type_signature: - '(options: {\n\t\tpath: string;\n\t\tencoding: BufferEncoding;\n\t}) => Promise>', - doc_comment: 'Reads a file from the file system.', - }, - { - name: 'writeFile', - kind: 'variable', - type_signature: - '(options: {\n\t\tpath: string;\n\t\tcontent: string;\n\t}) => Promise>', - doc_comment: 'Writes a file to the file system.', - }, - ], - }, - { - name: 'GitopsOperations', - kind: 'type', - doc_comment: - 'Combined operations interface grouping all gitops functionality.\nThis is the main interface injected into publishing and validation workflows.', - source_line: 326, - type_signature: 'GitopsOperations', - properties: [ - { - name: 'changeset', - kind: 'variable', - type_signature: 'ChangesetOperations', - }, - { - name: 'git', - kind: 'variable', - type_signature: 'GitOperations', - }, - { - name: 'process', - kind: 'variable', - type_signature: 'ProcessOperations', - }, - { - name: 'npm', - kind: 'variable', - type_signature: 'NpmOperations', - }, - { - name: 'preflight', - kind: 'variable', - type_signature: 'PreflightOperations', - }, - { - name: 'fs', - kind: 'variable', - type_signature: 'FsOperations', - }, - { - name: 'build', - kind: 'variable', - type_signature: 'BuildOperations', - }, - ], - }, - ], - module_comment: - "Operations interfaces for dependency injection.\n\nThis is the core pattern enabling testability without mocks.\nAll side effects (git, npm, fs, process) are abstracted into interfaces.\n\n**Design principles:**\n- All operations accept a single `options` object parameter\n- All fallible operations return `Result` from `@ryanatkn/belt`\n- Never throw `Error` in operations - return `Result` with `ok: false`\n- Use `null` for expected \"not found\" cases (not errors)\n- Include `log?: Logger` in options where logging is useful\n\n**Production usage:**\n```typescript\nimport {default_gitops_operations} from './operations_defaults.js';\nconst result = await ops.git.current_branch_name({cwd: '/path'});\nif (!result.ok) {\n throw new TaskError(result.message);\n}\nconst branch = result.value;\n```\n\n**Test usage:**\n```typescript\nconst mock_ops = create_mock_operations();\nconst result = await publish_repos(repos, options, mock_ops);\n// Assert on result without any real git/npm calls\n```\n\nSee `operations_defaults.ts` for real implementations.\nSee test files (*.test.ts) for mock implementations.", - }, - { - path: 'output_helpers.ts', - identifiers: [ - { - name: 'OutputFormat', - kind: 'type', - source_line: 4, - type_signature: 'OutputFormat', - }, - { - name: 'OutputOptions', - kind: 'type', - source_line: 6, - type_signature: 'OutputOptions', - properties: [ - { - name: 'format', - kind: 'variable', - type_signature: 'OutputFormat', - }, - { - name: 'outfile', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'log', - kind: 'variable', - type_signature: 'Logger', - }, - ], - }, - { - name: 'OutputFormatters', - kind: 'type', - source_line: 12, - type_signature: 'OutputFormatters', - generic_params: [ - { - name: 'T', - }, - ], - properties: [ - { - name: 'json', - kind: 'variable', - type_signature: '(data: T) => string', - }, - { - name: 'markdown', - kind: 'variable', - type_signature: '(data: T) => Array', - }, - { - name: 'stdout', - kind: 'variable', - type_signature: '(data: T, log: Logger) => void', - doc_comment: - 'This function should call log methods directly for colored/styled output.', - }, - ], - }, - { - name: 'format_and_output', - kind: 'function', - doc_comment: - 'Formats data and outputs to file or stdout based on options.\n\nSupports three formats:\n- stdout: Uses logger for colored/styled output (cannot use with --outfile)\n- json: Stringified JSON\n- markdown: Formatted markdown text', - throws: [ - { - type: 'if', - description: 'stdout format used with outfile, or if logger missing for stdout', - }, - ], - source_line: 31, - type_signature: - '(data: T, formatters: OutputFormatters, options: OutputOptions): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'data', - type: 'T', - optional: false, - }, - { - name: 'formatters', - type: 'OutputFormatters', - optional: false, - }, - { - name: 'options', - type: 'OutputOptions', - optional: false, - }, - ], - }, - ], - dependents: ['gitops_analyze.task.ts', 'gitops_plan.task.ts', 'gitops_publish.task.ts'], - }, - { - path: 'PageFooter.svelte', - identifiers: [ - { - name: 'PageFooter', - kind: 'component', - source_line: 1, - }, - ], - dependencies: ['repo.svelte.ts'], - dependents: [ - 'ModulesPage.svelte', - 'PullRequestsPage.svelte', - 'TablePage.svelte', - 'TreeItemPage.svelte', - 'TreePage.svelte', - ], - }, - { - path: 'PageHeader.svelte', - identifiers: [ - { - name: 'PageHeader', - kind: 'component', - props: [ - { - name: 'pkg', - type: 'Pkg | {url: string; package_json: null}', - optional: false, - }, - { - name: 'nav_attrs', - type: "SvelteHTMLElements['nav']", - optional: true, - }, - { - name: 'attrs', - type: "SvelteHTMLElements['header']", - optional: true, - }, - { - name: 'nav', - type: 'Snippet', - optional: true, - }, - { - name: 'children', - type: 'Snippet', - optional: true, - }, - ], - source_line: 1, - }, - ], - dependents: [ - 'ModulesPage.svelte', - 'PullRequestsPage.svelte', - 'TablePage.svelte', - 'TreeItemPage.svelte', - 'TreePage.svelte', - ], - }, - { - path: 'paths.ts', - identifiers: [ - { - name: 'GITOPS_OUTPUT_DIR', - kind: 'variable', - doc_comment: 'Base directory for all gitops-generated files.', - source_line: 4, - type_signature: '".gro/fuz_gitops"', - }, - { - name: 'DEFAULT_REPOS_DIR', - kind: 'variable', - doc_comment: - 'Default repos directory relative to gitops config file.\nResolves to the parent of the directory with the config\n(e.g., ~/dev/repo/gitops.config.ts resolves to ~/dev/).', - source_line: 11, - type_signature: '".."', - }, - ], - dependents: ['gitops_config.ts', 'gitops_task_helpers.ts', 'repo_ops.ts'], - }, - { - path: 'preflight_checks.ts', - identifiers: [ - { - name: 'PreflightOptions', - kind: 'type', - source_line: 20, - type_signature: 'PreflightOptions', - properties: [ - { - name: 'skip_changesets', - kind: 'variable', - type_signature: 'boolean', - }, - { - name: 'skip_build_validation', - kind: 'variable', - type_signature: 'boolean', - }, - { - name: 'required_branch', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'check_remote', - kind: 'variable', - type_signature: 'boolean', - }, - { - name: 'estimate_time', - kind: 'variable', - type_signature: 'boolean', - }, - { - name: 'log', - kind: 'variable', - type_signature: 'Logger', - }, - ], - }, - { - name: 'PreflightResult', - kind: 'type', - source_line: 29, - type_signature: 'PreflightResult', - properties: [ - { - name: 'ok', - kind: 'variable', - type_signature: 'boolean', - }, - { - name: 'warnings', - kind: 'variable', - type_signature: 'Array', - }, - { - name: 'errors', - kind: 'variable', - type_signature: 'Array', - }, - { - name: 'repos_with_changesets', - kind: 'variable', - type_signature: 'Set', - }, - { - name: 'repos_without_changesets', - kind: 'variable', - type_signature: 'Set', - }, - { - name: 'estimated_duration', - kind: 'variable', - type_signature: 'number', - }, - { - name: 'npm_username', - kind: 'variable', - type_signature: 'string', - }, - ], - }, - { - name: 'RunPreflightChecksOptions', - kind: 'type', - source_line: 39, - type_signature: 'RunPreflightChecksOptions', - properties: [ - { - name: 'repos', - kind: 'variable', - type_signature: 'Array', - }, - { - name: 'preflight_options', - kind: 'variable', - type_signature: 'PreflightOptions', - }, - { - name: 'git_ops', - kind: 'variable', - type_signature: 'GitOperations', - }, - { - name: 'npm_ops', - kind: 'variable', - type_signature: 'NpmOperations', - }, - { - name: 'build_ops', - kind: 'variable', - type_signature: 'BuildOperations', - }, - { - name: 'changeset_ops', - kind: 'variable', - type_signature: 'ChangesetOperations', - }, - ], - }, - { - name: 'run_preflight_checks', - kind: 'function', - doc_comment: - 'Validates all requirements before publishing can proceed.\n\nPerforms comprehensive pre-flight validation:\n- Clean workspaces (100% clean required - no uncommitted changes)\n- Correct branch (usually main)\n- Changesets present (unless skip_changesets=true)\n- Builds successful (fail-fast to prevent broken state)\n- Git remote reachability\n- NPM authentication with username\n- NPM registry connectivity\n\nBuild validation runs BEFORE any publishing to prevent the scenario where\nversion is bumped but build fails, leaving repo in broken state.', - source_line: 65, - type_signature: - '({ repos, preflight_options, git_ops, npm_ops, build_ops, changeset_ops, }: RunPreflightChecksOptions): Promise', - return_type: 'Promise', - return_description: - 'result with ok=false if any errors, plus warnings and detailed status', - parameters: [ - { - name: '__0', - type: 'RunPreflightChecksOptions', - optional: false, - }, - ], - }, - ], - dependencies: ['operations_defaults.ts'], - dependents: ['operations_defaults.ts'], - }, - { - path: 'publishing_plan.ts', - identifiers: [ - { - name: 'VersionChange', - kind: 'type', - source_line: 18, - type_signature: 'VersionChange', - properties: [ - { - name: 'package_name', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'from', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'to', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'bump_type', - kind: 'variable', - type_signature: 'BumpType', - }, - { - name: 'breaking', - kind: 'variable', - type_signature: 'boolean', - }, - { - name: 'has_changesets', - kind: 'variable', - type_signature: 'boolean', - }, - { - name: 'will_generate_changeset', - kind: 'variable', - type_signature: 'boolean', - }, - { - name: 'needs_bump_escalation', - kind: 'variable', - type_signature: 'boolean', - }, - { - name: 'existing_bump', - kind: 'variable', - type_signature: 'BumpType', - }, - { - name: 'required_bump', - kind: 'variable', - type_signature: 'BumpType', - }, - ], - }, - { - name: 'DependencyUpdate', - kind: 'type', - source_line: 31, - type_signature: 'DependencyUpdate', - properties: [ - { - name: 'dependent_package', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'updated_dependency', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'new_version', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'type', - kind: 'variable', - type_signature: "'dependencies' | 'devDependencies' | 'peerDependencies'", - }, - { - name: 'causes_republish', - kind: 'variable', - type_signature: 'boolean', - }, - ], - }, - { - name: 'PublishingPlan', - kind: 'type', - source_line: 39, - type_signature: 'PublishingPlan', - properties: [ - { - name: 'publishing_order', - kind: 'variable', - type_signature: 'Array', - }, - { - name: 'version_changes', - kind: 'variable', - type_signature: 'Array', - }, - { - name: 'dependency_updates', - kind: 'variable', - type_signature: 'Array', - }, - { - name: 'breaking_cascades', - kind: 'variable', - type_signature: 'Map>', - }, - { - name: 'warnings', - kind: 'variable', - type_signature: 'Array', - }, - { - name: 'info', - kind: 'variable', - type_signature: 'Array', - }, - { - name: 'errors', - kind: 'variable', - type_signature: 'Array', - }, - ], - }, - { - name: 'generate_publishing_plan', - kind: 'function', - doc_comment: - 'Generates a publishing plan showing what would happen during publishing.\nShows version changes, dependency updates, and breaking change cascades.\nUses fixed-point iteration to resolve transitive cascades.', - source_line: 170, - type_signature: - '(repos: LocalRepo[], log?: Logger | undefined, ops?: ChangesetOperations): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'repos', - type: 'LocalRepo[]', - optional: false, - }, - { - name: 'log', - type: 'Logger | undefined', - optional: true, - }, - { - name: 'ops', - type: 'ChangesetOperations', - optional: false, - default_value: 'default_changeset_operations', - }, - ], - }, - { - name: 'log_publishing_plan', - kind: 'function', - source_line: 461, - type_signature: '(plan: PublishingPlan, log: Logger): void', - return_type: 'void', - parameters: [ - { - name: 'plan', - type: 'PublishingPlan', - optional: false, - }, - { - name: 'log', - type: 'Logger', - optional: false, - }, - ], - }, - ], - dependencies: [ - 'constants.ts', - 'graph_validation.ts', - 'log_helpers.ts', - 'operations_defaults.ts', - 'version_utils.ts', - ], - dependents: ['gitops_plan.task.ts', 'gitops_publish.task.ts', 'gitops_validate.task.ts'], - }, - { - path: 'PullRequestsDetail.svelte', - identifiers: [ - { - name: 'PullRequestsDetail', - kind: 'component', - props: [ - { - name: 'repos', - type: 'Array', - optional: false, - }, - { - name: 'filter_pull_request', - type: 'FilterPullRequest | undefined', - optional: true, - }, - ], - source_line: 1, - }, - ], - dependencies: ['github_helpers.ts'], - dependents: ['PullRequestsPage.svelte'], - }, - { - path: 'PullRequestsPage.svelte', - identifiers: [ - { - name: 'PullRequestsPage', - kind: 'component', - props: [ - { - name: 'repo', - type: 'Repo', - optional: false, - }, - { - name: 'repos', - type: 'Array', - optional: false, - }, - { - name: 'filter_pull_request', - type: 'FilterPullRequest | undefined', - optional: true, - }, - ], - source_line: 1, - }, - ], - dependencies: ['PageFooter.svelte', 'PageHeader.svelte', 'PullRequestsDetail.svelte'], - }, - { - path: 'repo_ops.ts', - identifiers: [ - { - name: 'walk_repo_files', - kind: 'function', - doc_comment: - 'Walk files in a directory, respecting common exclusions.\nYields absolute paths to files (and optionally directories).', - source_line: 155, - type_signature: - '(dir: string, options?: WalkOptions | undefined): AsyncGenerator', - return_type: 'AsyncGenerator', - parameters: [ - { - name: 'dir', - type: 'string', - optional: false, - description: 'Directory to walk', - }, - { - name: 'options', - type: 'WalkOptions | undefined', - optional: true, - description: 'Walk options for exclusions and filtering', - }, - ], - }, - { - name: 'DEFAULT_EXCLUDE_DIRS', - kind: 'variable', - doc_comment: 'Default directories to exclude from file walking', - source_line: 20, - type_signature: - 'readonly ["node_modules", ".git", ".gro", ".svelte-kit", ".deno", ".vscode", ".idea", "dist", "build", "coverage", ".cache", ".turbo"]', - }, - { - name: 'DEFAULT_EXCLUDE_EXTENSIONS', - kind: 'variable', - doc_comment: 'Default binary/non-text extensions to exclude from content processing', - source_line: 36, - type_signature: - 'readonly [".png", ".jpg", ".jpeg", ".gif", ".svg", ".ico", ".webp", ".woff", ".woff2", ".ttf", ".eot", ".mp4", ".webm", ".mp3", ".wav", ".ogg", ".zip", ".tar", ".gz", ".lock", ".pdf"]', - }, - { - name: 'WalkOptions', - kind: 'type', - source_line: 60, - type_signature: 'WalkOptions', - properties: [ - { - name: 'exclude_dirs', - kind: 'variable', - type_signature: 'Array', - doc_comment: 'Additional directories to exclude (merged with defaults)', - }, - { - name: 'exclude_extensions', - kind: 'variable', - type_signature: 'Array', - doc_comment: 'Additional extensions to exclude (merged with defaults)', - }, - { - name: 'max_file_size', - kind: 'variable', - type_signature: 'number', - doc_comment: 'Maximum file size in bytes (default: 10MB)', - }, - { - name: 'include_dirs', - kind: 'variable', - type_signature: 'boolean', - doc_comment: 'Include directories in output (default: false)', - }, - { - name: 'no_defaults', - kind: 'variable', - type_signature: 'boolean', - doc_comment: 'Use only provided exclusions, ignoring defaults', - }, - ], - }, - { - name: 'RepoPath', - kind: 'type', - source_line: 73, - type_signature: 'RepoPath', - properties: [ - { - name: 'name', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'path', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'url', - kind: 'variable', - type_signature: 'string', - }, - ], - }, - { - name: 'get_repo_paths', - kind: 'function', - doc_comment: - 'Get repo paths from gitops config without full git sync.\nLighter weight than `get_gitops_ready()` - just resolves paths.', - source_line: 86, - type_signature: '(config_path?: string | undefined): Promise', - return_type: 'Promise', - return_description: 'Array of repo info with name, path, and url', - parameters: [ - { - name: 'config_path', - type: 'string | undefined', - optional: true, - description: 'Path to gitops.config.ts (defaults to ./gitops.config.ts)', - }, - ], - }, - { - name: 'should_exclude_path', - kind: 'function', - doc_comment: 'Check if a path should be excluded based on options.', - source_line: 119, - type_signature: '(file_path: string, options?: WalkOptions | undefined): boolean', - return_type: 'boolean', - parameters: [ - { - name: 'file_path', - type: 'string', - optional: false, - }, - { - name: 'options', - type: 'WalkOptions | undefined', - optional: true, - }, - ], - }, - { - name: 'collect_repo_files', - kind: 'function', - doc_comment: - 'Collect all files from walk_repo_files into an array.\nConvenience function for when you need all paths upfront.', - source_line: 204, - type_signature: '(dir: string, options?: WalkOptions | undefined): Promise', - return_type: 'Promise', - parameters: [ - { - name: 'dir', - type: 'string', - optional: false, - }, - { - name: 'options', - type: 'WalkOptions | undefined', - optional: true, - }, - ], - }, - ], - module_comment: - 'Generic repository operations for scripts that work across repos.\n\nProvides lightweight utilities for:\n- Getting repo paths from gitops config (without full git sync)\n- Walking files in repos with sensible exclusions\n- Common exclusion patterns for node/svelte projects\n\nFor full git sync/clone functionality, use `get_gitops_ready()` from gitops_task_helpers.', - dependencies: ['gitops_config.ts', 'paths.ts'], - }, - { - path: 'repo.svelte.ts', - identifiers: [ - { - name: 'RepoJson', - kind: 'type', - doc_comment: 'Serialized repo data as stored in repos.ts (JSON).', - source_line: 11, - type_signature: 'RepoJson', - properties: [ - { - name: 'package_json', - kind: 'variable', - type_signature: 'PackageJson', - }, - { - name: 'src_json', - kind: 'variable', - type_signature: 'SrcJson', - }, - { - name: 'check_runs', - kind: 'variable', - type_signature: 'GithubCheckRunsItem | null', - }, - { - name: 'pull_requests', - kind: 'variable', - type_signature: 'Array | null', - }, - ], - }, - { - name: 'Repo', - kind: 'class', - doc_comment: 'Runtime repo with Pkg instance.', - source_line: 21, - members: [ - { - name: 'pkg', - kind: 'variable', - type_signature: 'Pkg', - }, - { - name: 'check_runs', - kind: 'variable', - type_signature: 'GithubCheckRunsItem | null', - }, - { - name: 'pull_requests', - kind: 'variable', - type_signature: 'Array | null', - }, - { - name: 'constructor', - kind: 'constructor', - type_signature: '(repo_json: RepoJson): Repo', - parameters: [ - { - name: 'repo_json', - type: 'RepoJson', - optional: false, - }, - ], - }, - ], - }, - { - name: 'Repos', - kind: 'type', - source_line: 33, - type_signature: 'Repos', - properties: [ - { - name: 'repo', - kind: 'variable', - type_signature: 'Repo', - }, - { - name: 'repos', - kind: 'variable', - type_signature: 'Array', - }, - ], - }, - { - name: 'repos_context', - kind: 'variable', - source_line: 38, - type_signature: - '{ get: (error_message?: string | undefined) => Repos; get_maybe: () => Repos | undefined; set: (value: Repos) => Repos; }', - }, - { - name: 'repos_parse', - kind: 'function', - source_line: 40, - type_signature: '(repos: Repo[], homepage_url: string): Repos', - return_type: 'Repos', - parameters: [ - { - name: 'repos', - type: 'Repo[]', - optional: false, - }, - { - name: 'homepage_url', - type: 'string', - optional: false, - }, - ], - }, - ], - dependencies: ['github.ts'], - dependents: ['PageFooter.svelte'], - }, - { - path: 'ReposTable.svelte', - identifiers: [ - { - name: 'ReposTable', - kind: 'component', - props: [ - { - name: 'repos', - type: 'Array', - optional: false, - }, - { - name: 'deps', - type: 'Array', - optional: true, - }, - ], - source_line: 1, - }, - ], - dependencies: ['github_helpers.ts'], - dependents: ['TablePage.svelte'], - }, - { - path: 'ReposTree.svelte', - identifiers: [ - { - name: 'ReposTree', - kind: 'component', - props: [ - { - name: 'repos', - type: 'Array', - optional: false, - }, - { - name: 'selected_repo', - type: 'Repo | undefined', - optional: true, - }, - { - name: 'nav', - type: 'Snippet', - optional: false, - }, - ], - source_line: 1, - }, - ], - dependencies: ['ReposTreeNav.svelte'], - dependents: ['TreeItemPage.svelte', 'TreePage.svelte'], - }, - { - path: 'ReposTreeNav.svelte', - identifiers: [ - { - name: 'ReposTreeNav', - kind: 'component', - props: [ - { - name: 'repos', - type: 'Array', - optional: false, - }, - { - name: 'selected_repo', - type: 'Repo', - optional: true, - }, - { - name: 'children', - type: 'Snippet', - optional: false, - }, - ], - source_line: 1, - }, - ], - dependents: ['ReposTree.svelte'], - }, - { - path: 'resolved_gitops_config.ts', - identifiers: [ - { - name: 'ResolvedGitopsConfig', - kind: 'type', - source_line: 9, - type_signature: 'ResolvedGitopsConfig', - properties: [ - { - name: 'local_repos', - kind: 'variable', - type_signature: 'Array | null', - }, - { - name: 'resolved_local_repos', - kind: 'variable', - type_signature: 'Array | null', - }, - { - name: 'unresolved_local_repos', - kind: 'variable', - type_signature: 'Array | null', - }, - ], - }, - { - name: 'resolve_gitops_config', - kind: 'function', - source_line: 15, - type_signature: '(gitops_config: GitopsConfig, repos_dir: string): ResolvedGitopsConfig', - return_type: 'ResolvedGitopsConfig', - parameters: [ - { - name: 'gitops_config', - type: 'GitopsConfig', - optional: false, - }, - { - name: 'repos_dir', - type: 'string', - optional: false, - }, - ], - }, - ], - dependencies: ['local_repo.ts'], - dependents: ['gitops_task_helpers.ts'], - }, - { - path: 'semver.ts', - identifiers: [ - { - name: 'BumpType', - kind: 'type', - doc_comment: 'Semantic Versioning 2.0.0 utilities', - see_also: ['https://semver.org/'], - source_line: 6, - type_signature: 'BumpType', - }, - { - name: 'Semver', - kind: 'type', - source_line: 8, - type_signature: 'Semver', - properties: [ - { - name: 'major', - kind: 'variable', - type_signature: 'number', - }, - { - name: 'minor', - kind: 'variable', - type_signature: 'number', - }, - { - name: 'patch', - kind: 'variable', - type_signature: 'number', - }, - { - name: 'prerelease', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'build', - kind: 'variable', - type_signature: 'string', - }, - ], - }, - { - name: 'semver_compare_versions', - kind: 'function', - doc_comment: - 'Compares two semver versions according to SemVer 2.0.0 spec.\nReturns -1 if a < b, 0 if a === b, 1 if a > b.\nBuild metadata is ignored in precedence comparison.', - source_line: 116, - type_signature: '(a: string, b: string): number', - return_type: 'number', - parameters: [ - { - name: 'a', - type: 'string', - optional: false, - }, - { - name: 'b', - type: 'string', - optional: false, - }, - ], - }, - { - name: 'semver_bump_version', - kind: 'function', - doc_comment: - 'Bumps a version according to the specified type.\nResets lower version numbers per SemVer spec.', - source_line: 143, - type_signature: '(version: string, type: BumpType): string', - return_type: 'string', - parameters: [ - { - name: 'version', - type: 'string', - optional: false, - }, - { - name: 'type', - type: 'BumpType', - optional: false, - }, - ], - }, - ], - module_comment: 'Semantic Versioning 2.0.0 utilities\n@see https://semver.org/', - }, - { - path: 'serialization_types.ts', - identifiers: [ - { - name: 'SerializedNode', - kind: 'type', - source_line: 15, - type_signature: 'SerializedNode', - properties: [ - { - name: 'name', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'version', - kind: 'variable', - type_signature: 'string', - }, - { - name: 'dependencies', - kind: 'variable', - type_signature: - 'Array<{\n\t\tname: string;\n\t\ttype: string;\n\t\tversion: string;\n\t}>', - }, - { - name: 'dependents', - kind: 'variable', - type_signature: 'Array', - }, - { - name: 'publishable', - kind: 'variable', - type_signature: 'boolean', - }, - ], - }, - { - name: 'SerializedGraph', - kind: 'type', - source_line: 27, - type_signature: 'SerializedGraph', - properties: [ - { - name: 'nodes', - kind: 'variable', - type_signature: 'Array', - }, - { - name: 'edges', - kind: 'variable', - type_signature: 'Array<[string, string]>', - }, - ], - }, - { - name: 'SerializedPublishingPlan', - kind: 'type', - source_line: 32, - type_signature: 'SerializedPublishingPlan', - properties: [ - { - name: 'publishing_order', - kind: 'variable', - type_signature: 'Array', - }, - { - name: 'version_changes', - kind: 'variable', - type_signature: - 'Array<{\n\t\tpackage_name: string;\n\t\tfrom: string;\n\t\tto: string;\n\t\tbump_type: string;\n\t\tbreaking: boolean;\n\t\thas_changesets: boolean;\n\t\twill_generate_changeset?: boolean;\n\t\tneeds_bump_escalation?: boolean;\n\t\texisting_bump?: string;\n\t\trequired_bump?: string;\n\t}>', - }, - { - name: 'dependency_updates', - kind: 'variable', - type_signature: - 'Array<{\n\t\tdependent_package: string;\n\t\tupdated_dependency: string;\n\t\tnew_version: string;\n\t\ttype: string;\n\t\tcauses_republish: boolean;\n\t}>', - }, - { - name: 'breaking_cascades', - kind: 'variable', - type_signature: 'Record>', - }, - { - name: 'warnings', - kind: 'variable', - type_signature: 'Array', - }, - { - name: 'errors', - kind: 'variable', - type_signature: 'Array', - }, - ], - }, - { - name: 'serialize_graph', - kind: 'function', - doc_comment: 'Serializes a dependency graph to a JSON-safe format.', - source_line: 61, - type_signature: '(graph: DependencyGraph): SerializedGraph', - return_type: 'SerializedGraph', - parameters: [ - { - name: 'graph', - type: 'DependencyGraph', - optional: false, - }, - ], - }, - ], - module_comment: - 'JSON-serializable types for command output formats.\n\nGitops commands support `--format json` and `--format markdown` output modes\nin addition to styled terminal output. These types define the JSON schema for:\n- Dependency graph structures (`SerializedGraph`)\n- Publishing plan predictions (`SerializedPublishingPlan`)\n\nUsed by `gitops_analyze`, `gitops_plan`, and `gitops_publish --dry_run` when\n`--format json` or `--outfile` is specified.', - }, - { - path: 'TablePage.svelte', - identifiers: [ - { - name: 'TablePage', - kind: 'component', - props: [ - { - name: 'repo', - type: 'Repo', - optional: false, - }, - { - name: 'repos', - type: 'Array', - optional: false, - }, - ], - source_line: 1, - }, - ], - dependencies: ['PageFooter.svelte', 'PageHeader.svelte', 'ReposTable.svelte'], - }, - { - path: 'TreeItemPage.svelte', - identifiers: [ - { - name: 'TreeItemPage', - kind: 'component', - props: [ - { - name: 'repo', - type: 'Repo', - optional: false, - }, - { - name: 'repos', - type: 'Array', - optional: false, - }, - { - name: 'slug', - type: 'string', - optional: false, - }, - ], - source_line: 1, - }, - ], - dependencies: ['PageFooter.svelte', 'PageHeader.svelte', 'ReposTree.svelte'], - }, - { - path: 'TreePage.svelte', - identifiers: [ - { - name: 'TreePage', - kind: 'component', - props: [ - { - name: 'repo', - type: 'Repo', - optional: false, - }, - { - name: 'repos', - type: 'Array', - optional: false, - }, - ], - source_line: 1, - }, - ], - dependencies: ['PageFooter.svelte', 'PageHeader.svelte', 'ReposTree.svelte'], - }, - { - path: 'version_utils.ts', - identifiers: [ - { - name: 'is_wildcard', - kind: 'function', - source_line: 3, - type_signature: '(version: string): boolean', - return_type: 'boolean', - parameters: [ - { - name: 'version', - type: 'string', - optional: false, - }, - ], - }, - { - name: 'strip_version_prefix', - kind: 'function', - doc_comment: 'Strips version prefix (^, ~, >=, <=, etc) from a version string.', - source_line: 10, - type_signature: '(version: string): string', - return_type: 'string', - parameters: [ - { - name: 'version', - type: 'string', - optional: false, - }, - ], - }, - { - name: 'get_version_prefix', - kind: 'function', - doc_comment: 'Gets the version prefix (^, ~, >=, <=, or empty string).', - source_line: 17, - type_signature: '(version: string): string', - return_type: 'string', - parameters: [ - { - name: 'version', - type: 'string', - optional: false, - }, - ], - }, - { - name: 'normalize_version_for_comparison', - kind: 'function', - doc_comment: - 'Normalizes version string for comparison.\n\nStrips prefixes (^, ~, >=) to get bare version number.\nHandles wildcards as-is. Used by needs_update to compare versions.', - examples: [ - "normalize_version_for_comparison('^1.2.3') // '1.2.3'", - "normalize_version_for_comparison('>=2.0.0') // '2.0.0'", - "normalize_version_for_comparison('*') // '*'", - ], - source_line: 32, - type_signature: '(version: string): string', - return_type: 'string', - parameters: [ - { - name: 'version', - type: 'string', - optional: false, - }, - ], - }, - { - name: 'needs_update', - kind: 'function', - source_line: 45, - type_signature: '(current: string, new_version: string): boolean', - return_type: 'boolean', - parameters: [ - { - name: 'current', - type: 'string', - optional: false, - }, - { - name: 'new_version', - type: 'string', - optional: false, - }, - ], - }, - { - name: 'get_update_prefix', - kind: 'function', - doc_comment: - 'Determines version prefix to use when updating dependencies.\n\nStrategy:\n- Wildcard (*): Use caret (^) as default\n- Has existing prefix: Preserve it (^, ~, >=, <=, etc)\n- No prefix: Use default_strategy\n\nThis preserves user intent while handling wildcard replacements sensibly.', - source_line: 68, - type_signature: - '(current_version: string, default_strategy?: "" | "^" | "~" | ">="): string', - return_type: 'string', - parameters: [ - { - name: 'current_version', - type: 'string', - optional: false, - }, - { - name: 'default_strategy', - type: '"" | "^" | "~" | ">="', - optional: false, - description: 'prefix to use when no existing prefix found', - default_value: "'^'", - }, - ], - }, - { - name: 'is_breaking_change', - kind: 'function', - doc_comment: - 'Determines if a bump is a breaking change based on semver rules.\nPre-1.0: minor bumps are breaking\n1.0+: major bumps are breaking', - source_line: 92, - type_signature: '(old_version: string, bump_type: "major" | "minor" | "patch"): boolean', - return_type: 'boolean', - parameters: [ - { - name: 'old_version', - type: 'string', - optional: false, - }, - { - name: 'bump_type', - type: '"major" | "minor" | "patch"', - optional: false, - }, - ], - }, - { - name: 'detect_bump_type', - kind: 'function', - source_line: 108, - type_signature: '(old_version: string, new_version: string): "major" | "minor" | "patch"', - return_type: '"major" | "minor" | "patch"', - parameters: [ - { - name: 'old_version', - type: 'string', - optional: false, - }, - { - name: 'new_version', - type: 'string', - optional: false, - }, - ], - }, - { - name: 'compare_bump_types', - kind: 'function', - doc_comment: - 'Compares bump types. Returns positive if a > b, negative if a < b, 0 if equal.', - source_line: 123, - type_signature: '(a: BumpType, b: BumpType): number', - return_type: 'number', - parameters: [ - { - name: 'a', - type: 'BumpType', - optional: false, - }, - { - name: 'b', - type: 'BumpType', - optional: false, - }, - ], - }, - { - name: 'calculate_next_version', - kind: 'function', - source_line: 132, - type_signature: '(current_version: string, bump_type: BumpType): string', - return_type: 'string', - parameters: [ - { - name: 'current_version', - type: 'string', - optional: false, - }, - { - name: 'bump_type', - type: 'BumpType', - optional: false, - }, - ], - }, - ], - dependents: [ - 'changeset_generator.ts', - 'changeset_reader.ts', - 'dependency_updater.ts', - 'multi_repo_publisher.ts', - 'publishing_plan.ts', - ], - }, - ], -}; diff --git a/src/routes/repos.ts b/src/routes/repos.ts index c1feddbd..9b99a430 100644 --- a/src/routes/repos.ts +++ b/src/routes/repos.ts @@ -1,1216 +1,26139 @@ -// generated by gitops_sync.task.ts +// generated by gitops_sync.task.ts !! do not edit directly or risk lost data + import type {RepoJson} from '$lib/repo.svelte.js'; -export const repos_json: Array = JSON.parse( - '[\ - {\ - "package_json": {\ - "name": "@ryanatkn/moss",\ - "version": "0.38.0",\ - "description": "CSS framework and design system",\ - "motto": "magical organic stylesheets",\ - "glyph": "🌿",\ - "logo": "logo.svg",\ - "logo_alt": "a fuzzy tuft of green moss",\ - "public": true,\ - "license": "MIT",\ - "homepage": "https://moss.ryanatkn.com/",\ - "repository": "https://github.com/ryanatkn/moss",\ - "author": {\ - "name": "Ryan Atkinson",\ - "email": "mail@ryanatkn.com",\ - "url": "https://www.ryanatkn.com/"\ - },\ - "bugs": "https://github.com/ryanatkn/moss/issues",\ - "funding": "https://www.ryanatkn.com/funding",\ - "scripts": {\ - "start": "gro dev",\ - "dev": "gro dev",\ - "build": "gro build",\ - "check": "gro check",\ - "test": "gro test",\ - "preview": "vite preview",\ - "deploy": "gro deploy"\ - },\ - "type": "module",\ - "engines": {\ - "node": ">=22.15"\ - },\ - "devDependencies": {\ - "@changesets/changelog-git": "^0.2.1",\ - "@ryanatkn/belt": "^0.38.0",\ - "@ryanatkn/eslint-config": "^0.9.0",\ - "@ryanatkn/fuz": "^0.157.0",\ - "@ryanatkn/fuz_code": "^0.33.0",\ - "@ryanatkn/gro": "^0.174.1",\ - "@sveltejs/adapter-static": "^3.0.9",\ - "@sveltejs/kit": "^2.49.0",\ - "@sveltejs/package": "^2.5.6",\ - "@sveltejs/vite-plugin-svelte": "^6.2.1",\ - "@types/node": "^24.3.1",\ - "eslint": "^9.35.0",\ - "eslint-plugin-svelte": "^3.12.2",\ - "prettier": "^3.6.2",\ - "prettier-plugin-svelte": "^3.4.0",\ - "svelte": "^5.43.14",\ - "svelte-check": "^4.3.4",\ - "tslib": "^2.8.1",\ - "typescript": "^5.9.3",\ - "typescript-eslint": "^8.42.0",\ - "vitest": "^4.0.13",\ - "zod": "^4.1.12"\ - },\ - "prettier": {\ - "plugins": [\ - "prettier-plugin-svelte"\ - ],\ - "useTabs": true,\ - "printWidth": 100,\ - "singleQuote": true,\ - "bracketSpacing": false,\ - "overrides": [\ - {\ - "files": "package.json",\ - "options": {\ - "useTabs": false\ - }\ - }\ - ]\ - },\ - "sideEffects": [\ - "**/*.css"\ - ],\ - "files": [\ - "dist",\ - "src/lib/**/*.ts",\ - "!src/lib/**/*.test.*",\ - "!dist/**/*.test.*"\ - ],\ - "exports": {\ - "./package.json": "./package.json",\ - "./*.js": {\ - "types": "./dist/*.d.ts",\ - "default": "./dist/*.js"\ - },\ - "./*.ts": {\ - "types": "./dist/*.d.ts",\ - "default": "./dist/*.js"\ - },\ - "./*.css": {\ - "default": "./dist/*.css"\ - }\ - }\ - },\ - "src_json": {\ - "name": "@ryanatkn/moss",\ - "version": "0.38.0",\ - "modules": []\ - },\ - "check_runs": {\ - "status": "completed",\ - "conclusion": "success"\ - },\ - "pull_requests": []\ - },\ - {\ - "package_json": {\ - "name": "@ryanatkn/fuz",\ - "version": "0.161.1",\ - "description": "Svelte UI library",\ - "motto": "friendly user zystem",\ - "glyph": "🧶",\ - "logo": "logo.svg",\ - "logo_alt": "a friendly brown spider facing you",\ - "public": true,\ - "license": "MIT",\ - "homepage": "https://www.fuz.dev/",\ - "author": {\ - "name": "Ryan Atkinson",\ - "email": "mail@ryanatkn.com",\ - "url": "https://www.ryanatkn.com/"\ - },\ - "repository": {\ - "type": "git",\ - "url": "git+https://github.com/ryanatkn/fuz.git"\ - },\ - "bugs": "https://github.com/ryanatkn/fuz/issues",\ - "funding": "https://www.ryanatkn.com/funding",\ - "scripts": {\ - "start": "gro dev",\ - "dev": "gro dev",\ - "build": "gro build",\ - "check": "gro check",\ - "test": "gro test",\ - "preview": "vite preview",\ - "deploy": "gro deploy"\ - },\ - "type": "module",\ - "engines": {\ - "node": ">=22.15"\ - },\ - "peerDependencies": {\ - "@ryanatkn/belt": ">=0.38.0",\ - "@ryanatkn/fuz_code": ">=0.34.0",\ - "@ryanatkn/gro": ">=0.174.1",\ - "@ryanatkn/moss": ">=0.38.0",\ - "@sveltejs/kit": "^2.47.3",\ - "esm-env": "^1",\ - "svelte": "^5",\ - "svelte2tsx": "^0.7.45",\ - "zod": "^4.1.12"\ - },\ - "peerDependenciesMeta": {\ - "@ryanatkn/fuz_code": {\ - "optional": true\ - },\ - "@ryanatkn/gro": {\ - "optional": true\ - },\ - "esm-env": {\ - "optional": true\ - }\ - },\ - "devDependencies": {\ - "@changesets/changelog-git": "^0.2.1",\ - "@ryanatkn/belt": "^0.38.0",\ - "@ryanatkn/eslint-config": "^0.9.0",\ - "@ryanatkn/fuz_code": "^0.34.0",\ - "@ryanatkn/gro": "^0.174.2",\ - "@ryanatkn/moss": "^0.38.0",\ - "@sveltejs/adapter-static": "^3.0.10",\ - "@sveltejs/kit": "^2.49.0",\ - "@sveltejs/package": "^2.5.6",\ - "@sveltejs/vite-plugin-svelte": "^6.2.1",\ - "@types/node": "^24.10.1",\ - "eslint": "^9.39.1",\ - "eslint-plugin-svelte": "^3.13.0",\ - "esm-env": "^1.2.2",\ - "jsdom": "^27.2.0",\ - "prettier": "^3.6.2",\ - "prettier-plugin-svelte": "^3.4.0",\ - "svelte": "^5.43.14",\ - "svelte-check": "^4.3.4",\ - "svelte2tsx": "^0.7.45",\ - "tslib": "^2.8.1",\ - "typescript": "^5.9.3",\ - "typescript-eslint": "^8.47.0",\ - "vitest": "^4.0.13",\ - "zod": "^4.1.13"\ - },\ - "prettier": {\ - "plugins": [\ - "prettier-plugin-svelte"\ - ],\ - "useTabs": true,\ - "printWidth": 100,\ - "singleQuote": true,\ - "bracketSpacing": false,\ - "overrides": [\ - {\ - "files": "package.json",\ - "options": {\ - "useTabs": false\ - }\ - }\ - ]\ - },\ - "sideEffects": [\ - "**/*.css"\ - ],\ - "files": [\ - "dist",\ - "src/lib/**/*.ts",\ - "!src/lib/**/*.test.*",\ - "!dist/**/*.test.*"\ - ],\ - "exports": {\ - "./package.json": "./package.json",\ - "./*.js": {\ - "types": "./dist/*.d.ts",\ - "default": "./dist/*.js"\ - },\ - "./*.ts": {\ - "types": "./dist/*.d.ts",\ - "default": "./dist/*.js"\ - },\ - "./*.svelte": {\ - "types": "./dist/*.svelte.d.ts",\ - "svelte": "./dist/*.svelte",\ - "default": "./dist/*.svelte"\ - }\ - }\ - },\ - "src_json": {\ - "name": "@ryanatkn/fuz",\ - "version": "0.161.1",\ - "modules": []\ - },\ - "check_runs": {\ - "status": "completed",\ - "conclusion": "success"\ - },\ - "pull_requests": [\ - {\ - "number": 71,\ - "title": "use the `dialog` element in `Dialog`",\ - "user": {\ - "login": "ryanatkn"\ - },\ - "draft": true\ - }\ - ]\ - },\ - {\ - "package_json": {\ - "name": "@ryanatkn/gro",\ - "version": "0.175.0",\ - "description": "task runner and toolkit extending SvelteKit",\ - "motto": "generate, run, optimize",\ - "glyph": "🌰",\ - "logo": "logo.svg",\ - "logo_alt": "a pixelated green oak acorn with a glint of sun",\ - "public": true,\ - "license": "MIT",\ - "homepage": "https://gro.ryanatkn.com/",\ - "author": {\ - "name": "Ryan Atkinson",\ - "email": "mail@ryanatkn.com",\ - "url": "https://www.ryanatkn.com/"\ - },\ - "repository": {\ - "type": "git",\ - "url": "git+https://github.com/ryanatkn/gro.git"\ - },\ - "bugs": "https://github.com/ryanatkn/gro/issues",\ - "funding": "https://www.ryanatkn.com/funding",\ - "scripts": {\ - "bootstrap": "rm -rf .gro dist && svelte-kit sync && svelte-package && chmod +x ./dist/gro.js && npm link -f",\ - "start": "gro dev",\ - "dev": "gro dev",\ - "build": "gro build",\ - "check": "gro check",\ - "test": "gro test",\ - "preview": "vite preview",\ - "deploy": "gro deploy"\ - },\ - "type": "module",\ - "engines": {\ - "node": ">=22.15"\ - },\ - "bin": {\ - "gro": "dist/gro.js"\ - },\ - "keywords": [\ - "web",\ - "tools",\ - "task runner",\ - "tasks",\ - "codegen",\ - "svelte",\ - "sveltekit",\ - "vite",\ - "typescript"\ - ],\ - "dependencies": {\ - "chokidar": "^4.0.3",\ - "dotenv": "^17.2.3",\ - "esm-env": "^1.2.2",\ - "mri": "^1.2.0",\ - "oxc-parser": "^0.98.0",\ - "prettier": "^3.6.2",\ - "prettier-plugin-svelte": "^3.4.0",\ - "ts-blank-space": "^0.6.2",\ - "tslib": "^2.8.1",\ - "zod": "^4.1.12"\ - },\ - "peerDependencies": {\ - "@ryanatkn/belt": ">=0.38.1",\ - "@sveltejs/kit": "^2",\ - "esbuild": "^0.27.0",\ - "svelte": "^5",\ - "typescript": "^5",\ - "vitest": "^3 || ^4"\ - },\ - "peerDependenciesMeta": {\ - "@sveltejs/kit": {\ - "optional": true\ - },\ - "vitest": {\ - "optional": true\ - }\ - },\ - "optionalDependencies": {\ - "vitest": "^3 || ^4"\ - },\ - "devDependencies": {\ - "@changesets/changelog-git": "^0.2.1",\ - "@changesets/types": "^6.1.0",\ - "@ryanatkn/belt": "^0.38.2",\ - "@ryanatkn/eslint-config": "^0.9.0",\ - "@ryanatkn/fuz": "^0.161.0",\ - "@ryanatkn/fuz_code": "^0.34.0",\ - "@ryanatkn/moss": "^0.38.0",\ - "@sveltejs/adapter-static": "^3.0.10",\ - "@sveltejs/kit": "^2.49.0",\ - "@sveltejs/package": "^2.5.6",\ - "@sveltejs/vite-plugin-svelte": "^6.2.1",\ - "@types/node": "^24.10.1",\ - "esbuild": "^0.27.0",\ - "eslint": "^9.39.1",\ - "eslint-plugin-svelte": "^3.13.0",\ - "svelte": "^5.43.14",\ - "svelte-check": "^4.3.4",\ - "typescript": "^5.9.3",\ - "typescript-eslint": "^8.47.0",\ - "vitest": "^4.0.13"\ - },\ - "prettier": {\ - "plugins": [\ - "prettier-plugin-svelte"\ - ],\ - "useTabs": true,\ - "printWidth": 100,\ - "singleQuote": true,\ - "bracketSpacing": false,\ - "overrides": [\ - {\ - "files": "package.json",\ - "options": {\ - "useTabs": false\ - }\ - }\ - ]\ - },\ - "sideEffects": [\ - "**/*.css"\ - ],\ - "files": [\ - "dist",\ - "src/lib/**/*.ts",\ - "!src/lib/**/*.test.*",\ - "!dist/**/*.test.*"\ - ],\ - "exports": {\ - "./package.json": "./package.json",\ - ".": {\ - "types": "./dist/index.d.ts",\ - "default": "./dist/index.js"\ - },\ - "./*.js": {\ - "types": "./dist/*.d.ts",\ - "default": "./dist/*.js"\ - },\ - "./*.ts": {\ - "types": "./dist/*.d.ts",\ - "default": "./dist/*.js"\ - }\ - }\ - },\ - "src_json": {\ - "name": "@ryanatkn/gro",\ - "version": "0.175.0",\ - "modules": []\ - },\ - "check_runs": {\ - "status": "completed",\ - "conclusion": "success"\ - },\ - "pull_requests": []\ - },\ - {\ - "package_json": {\ - "name": "@ryanatkn/belt",\ - "version": "0.38.2",\ - "description": "utility belt for JS",\ - "glyph": "🦕",\ - "logo": "logo.svg",\ - "logo_alt": "a green sauropod wearing a brown utility belt",\ - "motto": "ancient not extinct",\ - "public": true,\ - "license": "MIT",\ - "homepage": "https://belt.ryanatkn.com/",\ - "author": {\ - "name": "Ryan Atkinson",\ - "email": "mail@ryanatkn.com",\ - "url": "https://www.ryanatkn.com/"\ - },\ - "repository": {\ - "type": "git",\ - "url": "git+https://github.com/ryanatkn/belt.git"\ - },\ - "bugs": "https://github.com/ryanatkn/belt/issues",\ - "funding": "https://www.ryanatkn.com/funding",\ - "scripts": {\ - "start": "gro dev",\ - "dev": "gro dev",\ - "build": "gro build",\ - "check": "gro check",\ - "test": "gro test",\ - "preview": "vite preview",\ - "deploy": "gro deploy",\ - "benchmark": "gro run src/benchmarks/slugify_benchmark.ts",\ - "benchmark-deep-equal": "node --max-old-space-size=8192 --expose-gc --import @ryanatkn/gro/register.js src/lib/deep_equal.bench_comparison.ts",\ - "benchmark-deep-equal-deno": "deno run --allow-read --allow-env --v8-flags=--expose-gc src/lib/deep_equal.bench_comparison.ts"\ - },\ - "type": "module",\ - "engines": {\ - "node": ">=22.15"\ - },\ - "keywords": [\ - "js",\ - "typescript",\ - "utilities",\ - "web"\ - ],\ - "peerDependencies": {\ - "@types/node": "^24",\ - "esm-env": "^1.2.2",\ - "zod": "^4.0.14"\ - },\ - "peerDependenciesMeta": {\ - "@types/node": {\ - "optional": true\ - },\ - "esm-env": {\ - "optional": true\ - },\ - "zod": {\ - "optional": true\ - }\ - },\ - "devDependencies": {\ - "@changesets/changelog-git": "^0.2.1",\ - "@ryanatkn/eslint-config": "^0.9.0",\ - "@ryanatkn/fuz": "^0.161.1",\ - "@ryanatkn/fuz_code": "^0.34.0",\ - "@ryanatkn/gro": "^0.175.0",\ - "@ryanatkn/moss": "^0.38.0",\ - "@sveltejs/adapter-static": "^3.0.10",\ - "@sveltejs/kit": "^2.49.0",\ - "@sveltejs/package": "^2.5.6",\ - "@sveltejs/vite-plugin-svelte": "^6.2.1",\ - "@types/node": "^24.10.1",\ - "dequal": "^2.0.3",\ - "eslint": "^9.39.1",\ - "eslint-plugin-svelte": "^3.13.0",\ - "esm-env": "^1.2.2",\ - "prettier": "^3.6.2",\ - "prettier-plugin-svelte": "^3.4.0",\ - "svelte": "^5.43.14",\ - "svelte-check": "^4.3.4",\ - "tinybench": "^5.1.0",\ - "tslib": "^2.8.1",\ - "typescript": "^5.9.3",\ - "typescript-eslint": "^8.47.0",\ - "vitest": "^4.0.13",\ - "zod": "^4.1.12"\ - },\ - "prettier": {\ - "plugins": [\ - "prettier-plugin-svelte"\ - ],\ - "useTabs": true,\ - "printWidth": 100,\ - "singleQuote": true,\ - "bracketSpacing": false,\ - "overrides": [\ - {\ - "files": "package.json",\ - "options": {\ - "useTabs": false\ - }\ - }\ - ]\ - },\ - "sideEffects": [\ - "**/*.css"\ - ],\ - "files": [\ - "dist",\ - "src/lib/**/*.ts",\ - "!src/lib/**/*.test.*",\ - "!dist/**/*.test.*"\ - ],\ - "exports": {\ - "./package.json": "./package.json",\ - "./*.js": {\ - "types": "./dist/*.d.ts",\ - "default": "./dist/*.js"\ - },\ - "./*.ts": {\ - "types": "./dist/*.d.ts",\ - "default": "./dist/*.js"\ - }\ - }\ - },\ - "src_json": {\ - "name": "@ryanatkn/belt",\ - "version": "0.38.2",\ - "modules": []\ - },\ - "check_runs": {\ - "status": "completed",\ - "conclusion": "success"\ - },\ - "pull_requests": []\ - },\ - {\ - "package_json": {\ - "name": "@ryanatkn/fuz_template",\ - "version": "0.0.1",\ - "description": "a static web app and Node library template with TypeScript, Svelte, SvelteKit, Vite, esbuild, Gro, and Fuz",\ - "glyph": "❄",\ - "logo": "logo.svg",\ - "logo_alt": "a friendly pixelated spider facing you",\ - "public": true,\ - "homepage": "https://template.fuz.dev/",\ - "repository": "https://github.com/ryanatkn/fuz_template",\ - "scripts": {\ - "start": "gro dev",\ - "dev": "gro dev",\ - "build": "gro build",\ - "check": "gro check",\ - "test": "gro test",\ - "preview": "vite preview",\ - "deploy": "gro deploy"\ - },\ - "type": "module",\ - "engines": {\ - "node": ">=22.15"\ - },\ - "devDependencies": {\ - "@ryanatkn/belt": "^0.38.0",\ - "@ryanatkn/eslint-config": "^0.9.0",\ - "@ryanatkn/fuz": "^0.159.0",\ - "@ryanatkn/gro": "^0.174.2",\ - "@ryanatkn/moss": "^0.38.0",\ - "@sveltejs/adapter-static": "^3.0.10",\ - "@sveltejs/kit": "^2.49.0",\ - "@sveltejs/vite-plugin-svelte": "^6.2.1",\ - "eslint": "^9.39.1",\ - "eslint-plugin-svelte": "^3.13.0",\ - "prettier": "^3.6.2",\ - "prettier-plugin-svelte": "^3.4.0",\ - "svelte": "^5.43.14",\ - "svelte-check": "^4.3.4",\ - "tslib": "^2.8.1",\ - "typescript": "^5.9.3",\ - "typescript-eslint": "^8.47.0",\ - "vitest": "^4.0.13"\ - },\ - "prettier": {\ - "plugins": [\ - "prettier-plugin-svelte"\ - ],\ - "useTabs": true,\ - "printWidth": 100,\ - "singleQuote": true,\ - "bracketSpacing": false,\ - "overrides": [\ - {\ - "files": "package.json",\ - "options": {\ - "useTabs": false\ - }\ - }\ - ]\ - },\ - "sideEffects": [\ - "**/*.css"\ - ],\ - "files": [\ - "dist"\ - ]\ - },\ - "src_json": {\ - "name": "@ryanatkn/fuz_template",\ - "version": "0.0.1",\ - "modules": []\ - },\ - "check_runs": {\ - "status": "completed",\ - "conclusion": "success"\ - },\ - "pull_requests": []\ - },\ - {\ - "package_json": {\ - "name": "@ryanatkn/fuz_blog",\ - "version": "0.17.0",\ - "description": "blog software from scratch with SvelteKit",\ - "glyph": "🖊️",\ - "logo": "logo.svg",\ - "logo_alt": "a friendly yellow spider facing you",\ - "public": true,\ - "homepage": "https://blog.fuz.dev/",\ - "repository": "https://github.com/ryanatkn/fuz_blog",\ - "scripts": {\ - "start": "gro dev",\ - "dev": "gro dev",\ - "build": "gro build",\ - "check": "gro check",\ - "test": "gro test",\ - "preview": "vite preview",\ - "deploy": "gro deploy"\ - },\ - "type": "module",\ - "engines": {\ - "node": ">=22.15"\ - },\ - "peerDependencies": {\ - "@ryanatkn/belt": ">=0.38.2",\ - "@ryanatkn/fuz": ">=0.161.1",\ - "@ryanatkn/fuz_mastodon": ">=0.34.0",\ - "@ryanatkn/gro": ">=0.175.0",\ - "@ryanatkn/moss": ">=0.38.0",\ - "@sveltejs/kit": "^2",\ - "date-fns": "^4",\ - "svelte": "^5"\ - },\ - "devDependencies": {\ - "@changesets/changelog-git": "^0.2.1",\ - "@ryanatkn/belt": "^0.38.2",\ - "@ryanatkn/eslint-config": "^0.9.0",\ - "@ryanatkn/fuz": "^0.161.1",\ - "@ryanatkn/fuz_code": "^0.35.0",\ - "@ryanatkn/fuz_mastodon": "^0.34.0",\ - "@ryanatkn/gro": "^0.175.0",\ - "@ryanatkn/moss": "^0.38.0",\ - "@sveltejs/adapter-static": "^3.0.10",\ - "@sveltejs/kit": "^2.49.0",\ - "@sveltejs/package": "^2.5.6",\ - "@sveltejs/vite-plugin-svelte": "^6.2.1",\ - "@types/node": "^24.10.1",\ - "date-fns": "^4.1.0",\ - "eslint": "^9.39.1",\ - "eslint-plugin-svelte": "^3.13.0",\ - "prettier": "^3.6.2",\ - "prettier-plugin-svelte": "^3.4.0",\ - "svelte": "^5.43.15",\ - "svelte-check": "^4.3.4",\ - "tslib": "^2.8.1",\ - "typescript": "^5.9.3",\ - "typescript-eslint": "^8.48.0",\ - "vitest": "^4.0.13"\ - },\ - "prettier": {\ - "plugins": [\ - "prettier-plugin-svelte"\ - ],\ - "useTabs": true,\ - "printWidth": 100,\ - "singleQuote": true,\ - "bracketSpacing": false,\ - "overrides": [\ - {\ - "files": "package.json",\ - "options": {\ - "useTabs": false\ - }\ - }\ - ]\ - },\ - "sideEffects": [\ - "**/*.css"\ - ],\ - "files": [\ - "dist"\ - ],\ - "exports": {\ - "./package.json": "./package.json",\ - "./*.js": {\ - "types": "./dist/*.d.ts",\ - "default": "./dist/*.js"\ - },\ - "./*.ts": {\ - "types": "./dist/*.d.ts",\ - "default": "./dist/*.js"\ - },\ - "./*.svelte": {\ - "types": "./dist/*.svelte.d.ts",\ - "svelte": "./dist/*.svelte",\ - "default": "./dist/*.svelte"\ - }\ - }\ - },\ - "src_json": {\ - "name": "@ryanatkn/fuz_blog",\ - "version": "0.17.0",\ - "modules": []\ - },\ - "check_runs": {\ - "status": "completed",\ - "conclusion": "success"\ - },\ - "pull_requests": []\ - },\ - {\ - "package_json": {\ - "name": "@ryanatkn/fuz_mastodon",\ - "version": "0.34.0",\ - "description": "Mastodon components and helpers for Svelte, SvelteKit, and Fuz",\ - "glyph": "🦣",\ - "logo": "logo.svg",\ - "logo_alt": "a friendly purple spider facing you",\ - "public": true,\ - "license": "MIT",\ - "homepage": "https://mastodon.fuz.dev/",\ - "repository": "https://github.com/ryanatkn/fuz_mastodon",\ - "author": {\ - "name": "Ryan Atkinson",\ - "email": "mail@ryanatkn.com",\ - "url": "https://www.ryanatkn.com/"\ - },\ - "bugs": "https://github.com/ryanatkn/fuz_mastodon/issues",\ - "funding": "https://www.ryanatkn.com/funding",\ - "scripts": {\ - "start": "gro dev",\ - "dev": "gro dev",\ - "build": "gro build",\ - "check": "gro check",\ - "test": "gro test",\ - "preview": "vite preview",\ - "deploy": "gro deploy"\ - },\ - "type": "module",\ - "engines": {\ - "node": ">=22.15"\ - },\ - "peerDependencies": {\ - "@ryanatkn/belt": ">=0.38.2",\ - "@ryanatkn/fuz": ">=0.161.1",\ - "@ryanatkn/moss": ">=0.38.0",\ - "@sveltejs/kit": "^2",\ - "date-fns": "^4",\ - "esm-env": "^1",\ - "svelte": "^5"\ - },\ - "devDependencies": {\ - "@changesets/changelog-git": "^0.2.1",\ - "@ryanatkn/belt": "^0.38.2",\ - "@ryanatkn/eslint-config": "^0.9.0",\ - "@ryanatkn/fuz": "^0.161.1",\ - "@ryanatkn/fuz_code": "^0.35.0",\ - "@ryanatkn/gro": "^0.175.0",\ - "@ryanatkn/moss": "^0.38.0",\ - "@sveltejs/adapter-static": "^3.0.10",\ - "@sveltejs/kit": "^2.49.0",\ - "@sveltejs/package": "^2.5.6",\ - "@sveltejs/vite-plugin-svelte": "^6.2.1",\ - "date-fns": "^4.1.0",\ - "eslint": "^9.39.1",\ - "eslint-plugin-svelte": "^3.13.0",\ - "esm-env": "^1.2.2",\ - "prettier": "^3.6.2",\ - "prettier-plugin-svelte": "^3.4.0",\ - "svelte": "^5.43.15",\ - "svelte-check": "^4.3.4",\ - "tslib": "^2.8.1",\ - "typescript": "^5.9.3",\ - "typescript-eslint": "^8.48.0",\ - "vitest": "^4.0.13"\ - },\ - "prettier": {\ - "plugins": [\ - "prettier-plugin-svelte"\ - ],\ - "useTabs": true,\ - "printWidth": 100,\ - "singleQuote": true,\ - "bracketSpacing": false,\ - "overrides": [\ - {\ - "files": "package.json",\ - "options": {\ - "useTabs": false\ - }\ - }\ - ]\ - },\ - "sideEffects": [\ - "**/*.css"\ - ],\ - "files": [\ - "dist",\ - "src/lib/**/*.ts",\ - "!src/lib/**/*.test.*",\ - "!dist/**/*.test.*"\ - ],\ - "exports": {\ - "./package.json": "./package.json",\ - "./*.js": {\ - "types": "./dist/*.d.ts",\ - "default": "./dist/*.js"\ - },\ - "./*.ts": {\ - "types": "./dist/*.d.ts",\ - "default": "./dist/*.js"\ - },\ - "./*.svelte": {\ - "types": "./dist/*.svelte.d.ts",\ - "svelte": "./dist/*.svelte",\ - "default": "./dist/*.svelte"\ - }\ - }\ - },\ - "src_json": {\ - "name": "@ryanatkn/fuz_mastodon",\ - "version": "0.34.0",\ - "modules": []\ - },\ - "check_runs": {\ - "status": "completed",\ - "conclusion": "success"\ - },\ - "pull_requests": []\ - },\ - {\ - "package_json": {\ - "name": "@ryanatkn/fuz_code",\ - "version": "0.35.0",\ - "description": "syntax styling utilities and components for TypeScript, Svelte, and Markdown",\ - "glyph": "🎨",\ - "logo": "logo.svg",\ - "logo_alt": "a friendly pink spider facing you",\ - "public": true,\ - "license": "MIT",\ - "homepage": "https://code.fuz.dev/",\ - "repository": "https://github.com/ryanatkn/fuz_code",\ - "author": {\ - "name": "Ryan Atkinson",\ - "email": "mail@ryanatkn.com",\ - "url": "https://www.ryanatkn.com/"\ - },\ - "bugs": "https://github.com/ryanatkn/fuz_code/issues",\ - "funding": "https://www.ryanatkn.com/funding",\ - "scripts": {\ - "start": "gro dev",\ - "dev": "gro dev",\ - "build": "gro build",\ - "check": "gro check",\ - "test": "gro test",\ - "preview": "vite preview",\ - "deploy": "gro deploy",\ - "benchmark": "gro run benchmark/run_benchmarks.ts",\ - "benchmark-compare": "gro run benchmark/compare/run_compare.ts",\ - "update-generated-fixtures": "gro src/test/fixtures/update"\ - },\ - "type": "module",\ - "engines": {\ - "node": ">=22.15"\ - },\ - "peerDependencies": {\ - "@ryanatkn/moss": ">=0.38.0",\ - "svelte": "^5"\ - },\ - "peerDependenciesMeta": {\ - "@ryanatkn/moss": {\ - "optional": true\ - },\ - "svelte": {\ - "optional": true\ - }\ - },\ - "devDependencies": {\ - "@changesets/changelog-git": "^0.2.1",\ - "@ryanatkn/belt": "^0.38.2",\ - "@ryanatkn/eslint-config": "^0.9.0",\ - "@ryanatkn/fuz": "^0.161.1",\ - "@ryanatkn/gro": "^0.175.0",\ - "@ryanatkn/moss": "^0.38.0",\ - "@sveltejs/adapter-static": "^3.0.10",\ - "@sveltejs/kit": "^2.49.0",\ - "@sveltejs/package": "^2.5.6",\ - "@sveltejs/vite-plugin-svelte": "^6.2.1",\ - "@types/node": "^24.10.1",\ - "eslint": "^9.39.1",\ - "eslint-plugin-svelte": "^3.13.0",\ - "esm-env": "^1.2.2",\ - "prettier": "^3.6.2",\ - "prettier-plugin-svelte": "^3.4.0",\ - "svelte": "^5.43.14",\ - "svelte-check": "^4.3.4",\ - "tinybench": "^5.1.0",\ - "tslib": "^2.8.1",\ - "typescript": "^5.9.3",\ - "typescript-eslint": "^8.47.0",\ - "vitest": "^4.0.13"\ - },\ - "prettier": {\ - "plugins": [\ - "prettier-plugin-svelte"\ - ],\ - "useTabs": true,\ - "printWidth": 100,\ - "singleQuote": true,\ - "bracketSpacing": false,\ - "overrides": [\ - {\ - "files": "package.json",\ - "options": {\ - "useTabs": false\ - }\ - }\ - ]\ - },\ - "sideEffects": [\ - "**/*.css"\ - ],\ - "files": [\ - "dist",\ - "src/lib/**/*.ts",\ - "!src/lib/**/*.test.*",\ - "!dist/**/*.test.*"\ - ],\ - "exports": {\ - "./package.json": "./package.json",\ - "./*.js": {\ - "types": "./dist/*.d.ts",\ - "default": "./dist/*.js"\ - },\ - "./*.ts": {\ - "types": "./dist/*.d.ts",\ - "default": "./dist/*.js"\ - },\ - "./*.svelte": {\ - "types": "./dist/*.svelte.d.ts",\ - "svelte": "./dist/*.svelte",\ - "default": "./dist/*.svelte"\ - },\ - "./*.css": {\ - "default": "./dist/*.css"\ - }\ - }\ - },\ - "src_json": {\ - "name": "@ryanatkn/fuz_code",\ - "version": "0.35.0",\ - "modules": []\ - },\ - "check_runs": {\ - "status": "completed",\ - "conclusion": "success"\ - },\ - "pull_requests": []\ - },\ - {\ - "package_json": {\ - "name": "@ryanatkn/fuz_gitops",\ - "version": "0.52.0",\ - "description": "a tool for managing many repos",\ - "glyph": "🪄",\ - "logo": "logo.svg",\ - "logo_alt": "a friendly blue spider facing you",\ - "public": true,\ - "license": "MIT",\ - "homepage": "https://gitops.fuz.dev/",\ - "repository": "https://github.com/ryanatkn/fuz_gitops",\ - "author": {\ - "name": "Ryan Atkinson",\ - "email": "mail@ryanatkn.com",\ - "url": "https://www.ryanatkn.com/"\ - },\ - "bugs": "https://github.com/ryanatkn/fuz_gitops/issues",\ - "funding": "https://www.ryanatkn.com/funding",\ - "scripts": {\ - "start": "gro dev",\ - "dev": "gro dev",\ - "build": "gro build",\ - "check": "gro check",\ - "test": "gro test",\ - "preview": "vite preview",\ - "deploy": "gro deploy"\ - },\ - "type": "module",\ - "engines": {\ - "node": ">=22.15"\ - },\ - "peerDependencies": {\ - "@ryanatkn/belt": ">=0.38.2",\ - "@ryanatkn/fuz": ">=0.161.1",\ - "@ryanatkn/gro": ">=0.175.0",\ - "@ryanatkn/moss": ">=0.38.0",\ - "@sveltejs/kit": "^2",\ - "svelte": "^5",\ - "zod": "^4.1.13"\ - },\ - "devDependencies": {\ - "@changesets/changelog-git": "^0.2.1",\ - "@ryanatkn/belt": "^0.38.2",\ - "@ryanatkn/eslint-config": "^0.9.0",\ - "@ryanatkn/fuz": "^0.161.1",\ - "@ryanatkn/fuz_code": "^0.35.0",\ - "@ryanatkn/gro": "^0.175.0",\ - "@ryanatkn/moss": "^0.38.0",\ - "@sveltejs/adapter-static": "^3.0.10",\ - "@sveltejs/kit": "^2.49.0",\ - "@sveltejs/package": "^2.5.6",\ - "@sveltejs/vite-plugin-svelte": "^6.2.1",\ - "@types/node": "^24.10.1",\ - "eslint": "^9.39.1",\ - "eslint-plugin-svelte": "^3.13.0",\ - "prettier": "^3.6.2",\ - "prettier-plugin-svelte": "^3.4.0",\ - "svelte": "^5.43.15",\ - "svelte-check": "^4.3.4",\ - "tslib": "^2.8.1",\ - "typescript": "^5.9.3",\ - "typescript-eslint": "^8.48.0",\ - "vitest": "^4.0.13"\ - },\ - "prettier": {\ - "plugins": [\ - "prettier-plugin-svelte"\ - ],\ - "useTabs": true,\ - "printWidth": 100,\ - "singleQuote": true,\ - "bracketSpacing": false,\ - "overrides": [\ - {\ - "files": "package.json",\ - "options": {\ - "useTabs": false\ - }\ - }\ - ]\ - },\ - "sideEffects": [\ - "**/*.css"\ - ],\ - "files": [\ - "dist",\ - "src/lib/**/*.ts",\ - "!src/lib/**/*.test.*",\ - "!dist/**/*.test.*"\ - ],\ - "exports": {\ - "./package.json": "./package.json",\ - "./*.js": {\ - "types": "./dist/*.d.ts",\ - "default": "./dist/*.js"\ - },\ - "./*.ts": {\ - "types": "./dist/*.d.ts",\ - "default": "./dist/*.js"\ - },\ - "./*.svelte": {\ - "types": "./dist/*.svelte.d.ts",\ - "svelte": "./dist/*.svelte",\ - "default": "./dist/*.svelte"\ - }\ - }\ - },\ - "src_json": {\ - "name": "@ryanatkn/fuz_gitops",\ - "version": "0.52.0",\ - "modules": []\ - },\ - "check_runs": {\ - "status": "in_progress",\ - "conclusion": null\ - },\ - "pull_requests": [\ - {\ - "number": 37,\ - "title": "upgrade deps",\ - "user": {\ - "login": "ryanatkn"\ - },\ - "draft": false\ - }\ - ]\ - },\ - {\ - "package_json": {\ - "name": "webdevladder.net",\ - "version": "0.0.1",\ - "description": "a YouTube channel and blog for realworld webdev with TypeScript and Svelte",\ - "motto": "up ↗",\ - "glyph": "🪜",\ - "logo": "logo.svg",\ - "logo_alt": "a spider web between two rungs of a ladder",\ - "license": "MIT",\ - "public": true,\ - "homepage": "https://www.webdevladder.net/",\ - "repository": "https://github.com/ryanatkn/webdevladder.net",\ - "author": {\ - "name": "Ryan Atkinson",\ - "email": "mail@ryanatkn.com",\ - "url": "https://www.ryanatkn.com/"\ - },\ - "bugs": "https://github.com/ryanatkn/webdevladder.net/issues",\ - "funding": "https://www.ryanatkn.com/funding",\ - "scripts": {\ - "start": "gro dev",\ - "dev": "gro dev",\ - "build": "gro build",\ - "check": "gro check",\ - "test": "gro test",\ - "preview": "vite preview",\ - "deploy": "gro deploy"\ - },\ - "type": "module",\ - "engines": {\ - "node": ">=22.15"\ - },\ - "devDependencies": {\ - "@ryanatkn/belt": "^0.38.0",\ - "@ryanatkn/eslint-config": "^0.9.0",\ - "@ryanatkn/fuz": "^0.159.0",\ - "@ryanatkn/fuz_blog": "^0.16.0",\ - "@ryanatkn/fuz_code": "^0.34.0",\ - "@ryanatkn/fuz_mastodon": "^0.33.0",\ - "@ryanatkn/gro": "^0.174.2",\ - "@ryanatkn/moss": "^0.38.0",\ - "@sveltejs/adapter-static": "^3.0.10",\ - "@sveltejs/kit": "^2.49.0",\ - "@sveltejs/vite-plugin-svelte": "^6.2.1",\ - "eslint": "^9.39.1",\ - "eslint-plugin-svelte": "^3.13.0",\ - "prettier": "^3.6.2",\ - "prettier-plugin-svelte": "^3.4.0",\ - "svelte": "^5.43.14",\ - "svelte-check": "^4.3.4",\ - "tslib": "^2.8.1",\ - "typescript": "^5.9.3",\ - "typescript-eslint": "^8.47.0",\ - "vitest": "^4.0.13"\ - },\ - "prettier": {\ - "plugins": [\ - "prettier-plugin-svelte"\ - ],\ - "useTabs": true,\ - "printWidth": 100,\ - "singleQuote": true,\ - "bracketSpacing": false,\ - "overrides": [\ - {\ - "files": "package.json",\ - "options": {\ - "useTabs": false\ - }\ - }\ - ]\ - },\ - "sideEffects": [\ - "**/*.css"\ - ],\ - "files": [\ - "dist"\ - ]\ - },\ - "src_json": {\ - "name": "webdevladder.net",\ - "version": "0.0.1",\ - "modules": []\ - },\ - "check_runs": {\ - "status": "completed",\ - "conclusion": "success"\ - },\ - "pull_requests": []\ - }\ -]', -); +export const repos_json: Array = [ + { + library_json: { + package_json: { + name: '@ryanatkn/moss', + version: '0.39.0', + description: 'CSS framework and design system', + motto: 'magical organic stylesheets', + glyph: '🌿', + logo: 'logo.svg', + logo_alt: 'a fuzzy tuft of green moss', + public: true, + license: 'MIT', + homepage: 'https://moss.ryanatkn.com/', + repository: 'https://github.com/ryanatkn/moss', + author: { + name: 'Ryan Atkinson', + email: 'mail@ryanatkn.com', + url: 'https://www.ryanatkn.com/', + }, + bugs: 'https://github.com/ryanatkn/moss/issues', + funding: 'https://www.ryanatkn.com/funding', + scripts: { + start: 'gro dev', + dev: 'gro dev', + build: 'gro build', + check: 'gro check', + test: 'gro test', + preview: 'vite preview', + deploy: 'gro deploy', + }, + type: 'module', + engines: { + node: '>=22.15', + }, + devDependencies: { + '@changesets/changelog-git': '^0.2.1', + '@ryanatkn/belt': '^0.40.0', + '@ryanatkn/eslint-config': '^0.9.0', + '@ryanatkn/fuz': '^0.165.0', + '@ryanatkn/fuz_code': '^0.36.0', + '@ryanatkn/gro': '^0.179.0', + '@sveltejs/adapter-static': '^3.0.10', + '@sveltejs/kit': '^2.49.0', + '@sveltejs/package': '^2.5.6', + '@sveltejs/vite-plugin-svelte': '^6.2.1', + '@types/node': '^24.10.1', + eslint: '^9.39.1', + 'eslint-plugin-svelte': '^3.13.0', + prettier: '^3.6.2', + 'prettier-plugin-svelte': '^3.4.0', + svelte: '^5.44.0', + 'svelte-check': '^4.3.4', + tslib: '^2.8.1', + typescript: '^5.9.3', + 'typescript-eslint': '^8.48.0', + vitest: '^4.0.14', + zod: '^4.1.13', + }, + prettier: { + plugins: ['prettier-plugin-svelte'], + useTabs: true, + printWidth: 100, + singleQuote: true, + bracketSpacing: false, + overrides: [ + { + files: 'package.json', + options: { + useTabs: false, + }, + }, + ], + }, + sideEffects: ['**/*.css'], + files: ['dist', 'src/lib/**/*.ts', '!src/lib/**/*.test.*', '!dist/**/*.test.*'], + exports: { + './package.json': './package.json', + './*.js': { + types: './dist/*.d.ts', + default: './dist/*.js', + }, + './*.ts': { + types: './dist/*.d.ts', + default: './dist/*.js', + }, + './*.css': { + default: './dist/*.css', + }, + }, + }, + source_json: { + name: '@ryanatkn/moss', + version: '0.39.0', + modules: [ + { + path: 'css_class_composites.ts', + declarations: [ + { + name: 'css_class_composites', + kind: 'variable', + source_line: 3, + type_signature: 'Record', + }, + ], + dependents: ['css_classes.ts'], + }, + { + path: 'css_class_generators.ts', + declarations: [ + { + name: 'ClassTemplateResult', + kind: 'type', + source_line: 3, + type_signature: 'ClassTemplateResult', + }, + { + name: 'ClassTemplateFn', + kind: 'type', + source_line: 8, + type_signature: 'ClassTemplateFn', + generic_params: [ + { + name: 'T1', + default_type: 'string', + }, + { + name: 'T2', + default_type: 'string', + }, + { + name: 'T3', + default_type: 'string', + }, + ], + }, + { + name: 'generate_classes', + kind: 'function', + doc_comment: + 'Generates CSS class declarations from templates.\nSupports up to 3 dimensions of multiplicative combinations.', + examples: [ + "// Simple list\ngenerate_classes(\n v => ({ name: `position_${v}`, css: `position: ${v};` }),\n ['static', 'relative', 'absolute']\n)", + "// Two dimensions (multiplicative)\ngenerate_classes(\n (dir, size) => ({ name: `m${dir}_${size}`, css: `margin-${dir}: ${size};` }),\n ['top', 'bottom'],\n ['0', '1px', '2px']\n)", + ], + source_line: 37, + type_signature: + '(template: ClassTemplateFn, values: Iterable, secondary?: Iterable | undefined, tertiary?: Iterable<...> | undefined): Record<...>', + return_type: 'Record', + parameters: [ + { + name: 'template', + type: 'ClassTemplateFn', + optional: false, + description: + '- Function that generates CSS from values, can return null to skip', + }, + { + name: 'values', + type: 'Iterable', + optional: false, + description: '- Primary iterable of values', + }, + { + name: 'secondary', + type: 'Iterable | undefined', + optional: true, + description: '- Optional second dimension (makes it multiplicative)', + }, + { + name: 'tertiary', + type: 'Iterable | undefined', + optional: true, + description: '- Optional third dimension for even more combinations', + }, + ], + }, + { + name: 'CSS_GLOBALS', + kind: 'variable', + source_line: 74, + type_signature: + 'readonly ["inherit", "initial", "revert", "revert_layer", "unset"]', + }, + { + name: 'CssGlobal', + kind: 'type', + source_line: 75, + type_signature: '"inherit" | "initial" | "revert" | "revert_layer" | "unset"', + }, + { + name: 'CSS_DIRECTIONS', + kind: 'variable', + source_line: 77, + type_signature: 'readonly ["top", "right", "bottom", "left"]', + }, + { + name: 'CssDirection', + kind: 'type', + source_line: 78, + type_signature: '"top" | "right" | "bottom" | "left"', + }, + { + name: 'COLOR_INTENSITIES', + kind: 'variable', + source_line: 81, + type_signature: 'readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9"]', + }, + { + name: 'ColorIntensity', + kind: 'type', + source_line: 82, + type_signature: '"1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"', + }, + { + name: 'to_kebab', + kind: 'function', + source_line: 85, + type_signature: '(str: string): string', + return_type: 'string', + parameters: [ + { + name: 'str', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'to_variable_name', + kind: 'function', + source_line: 88, + type_signature: '(str: string): string', + return_type: 'string', + parameters: [ + { + name: 'str', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'generate_global_classes', + kind: 'function', + source_line: 91, + type_signature: '(property: string): Record', + return_type: 'Record', + parameters: [ + { + name: 'property', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'format_spacing_value', + kind: 'function', + doc_comment: + 'Format spacing values for CSS (handles 0, auto, percentages, pixels, and CSS variables).\nUsed by margin, padding, gap, inset, top/right/bottom/left, etc.', + source_line: 105, + type_signature: '(value: string): string', + return_type: 'string', + parameters: [ + { + name: 'value', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'format_dimension_value', + kind: 'function', + doc_comment: + 'Format width/height values for CSS (handles 0, auto, percentages, pixels, content values, and CSS variables).\nUsed by width and height properties.', + source_line: 117, + type_signature: '(value: string): string', + return_type: 'string', + parameters: [ + { + name: 'value', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'generate_property_classes', + kind: 'function', + doc_comment: + 'Generate classes for a single CSS property with various values.\nThis is the most common pattern, used by display, visibility, float, etc.', + source_line: 142, + type_signature: + '(property: string, values: Iterable, formatter?: ((value: string) => string) | undefined, prefix?: string): Record', + return_type: 'Record', + parameters: [ + { + name: 'property', + type: 'string', + optional: false, + description: "- The CSS property name (e.g. 'display', 'gap')", + }, + { + name: 'values', + type: 'Iterable', + optional: false, + description: '- The values to generate classes for', + }, + { + name: 'formatter', + type: '((value: string) => string) | undefined', + optional: true, + description: + '- Optional function to format values (e.g. v => `var(--space_${v})`)', + }, + { + name: 'prefix', + type: 'string', + optional: false, + description: + '- Optional class name prefix (defaults to property with dashes replaced by underscores)', + default_value: 'to_variable_name(property)', + }, + ], + }, + { + name: 'generate_directional_classes', + kind: 'function', + doc_comment: + 'Generate directional classes for properties like margin and padding.\nCreates classes for all directions: base, top, right, bottom, left, x (horizontal), y (vertical).', + source_line: 165, + type_signature: + '(property: string, values: Iterable, formatter?: ((v: string) => string) | undefined): Record', + return_type: 'Record', + parameters: [ + { + name: 'property', + type: 'string', + optional: false, + description: "- The base CSS property name (e.g. 'margin', 'padding')", + }, + { + name: 'values', + type: 'Iterable', + optional: false, + description: '- The values to generate classes for', + }, + { + name: 'formatter', + type: '((v: string) => string) | undefined', + optional: true, + description: '- Optional function to format values (defaults to identity)', + }, + ], + }, + { + name: 'generate_property_with_axes', + kind: 'function', + doc_comment: + 'Generate classes for properties with axis variants (e.g. overflow, overflow-x, overflow-y).', + source_line: 209, + type_signature: + '(property: string, values: Iterable): Record', + return_type: 'Record', + parameters: [ + { + name: 'property', + type: 'string', + optional: false, + description: "- The base CSS property name (e.g. 'overflow')", + }, + { + name: 'values', + type: 'Iterable', + optional: false, + description: '- The values to generate classes for', + }, + ], + }, + { + name: 'generate_border_radius_corners', + kind: 'function', + doc_comment: + 'Generate border radius corner classes for all four corners.\nCreates classes for top-left, top-right, bottom-left, bottom-right corners.', + source_line: 234, + type_signature: + '(values: Iterable, formatter?: ((value: string) => string) | undefined): Record', + return_type: 'Record', + parameters: [ + { + name: 'values', + type: 'Iterable', + optional: false, + description: '- The values to generate classes for', + }, + { + name: 'formatter', + type: '((value: string) => string) | undefined', + optional: true, + description: '- Optional function to format values', + }, + ], + }, + { + name: 'generate_shadow_classes', + kind: 'function', + doc_comment: + 'Generate shadow classes for various shadow types and sizes.\nCreates classes for regular, top, bottom, inset, inset-top, and inset-bottom shadows.\nEach shadow uses color-mix with alpha values for transparency.', + source_line: 263, + type_signature: + '(sizes: Iterable, alpha_mapping: Record): Record', + return_type: 'Record', + parameters: [ + { + name: 'sizes', + type: 'Iterable', + optional: false, + description: '- The shadow size variants (xs, sm, md, lg, xl)', + }, + { + name: 'alpha_mapping', + type: 'Record', + optional: false, + description: '- Mapping of sizes to alpha numbers (1-5)', + }, + ], + }, + ], + dependents: ['css_classes.ts'], + }, + { + path: 'css_class_helpers.ts', + declarations: [ + { + name: 'CssExtractor', + kind: 'type', + source_line: 5, + type_signature: 'CssExtractor', + properties: [ + { + name: 'matcher', + kind: 'variable', + type_signature: 'RegExp', + }, + { + name: 'mapper', + kind: 'variable', + type_signature: '(matched: RegExpExecArray) => Array', + }, + ], + }, + { + name: 'collect_css_classes', + kind: 'function', + doc_comment: + 'Returns a Set of CSS classes from a string of HTML/Svelte/JS/TS content.\nHandles class attributes, directives, and various forms of CSS class declarations.', + source_line: 70, + type_signature: '(contents: string, extractors?: CssExtractor[]): Set', + return_type: 'Set', + parameters: [ + { + name: 'contents', + type: 'string', + optional: false, + }, + { + name: 'extractors', + type: 'CssExtractor[]', + optional: false, + default_value: 'CSS_CLASS_EXTRACTORS', + }, + ], + }, + { + name: 'CssClasses', + kind: 'class', + source_line: 96, + members: [ + { + name: 'include_classes', + kind: 'variable', + type_signature: 'Set | null', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: '(include_classes?: Set | null): CssClasses', + parameters: [ + { + name: 'include_classes', + type: 'Set | null', + optional: false, + default_value: 'null', + }, + ], + }, + { + name: 'add', + kind: 'function', + type_signature: '(id: string, classes: Set): void', + return_type: 'void', + parameters: [ + { + name: 'id', + type: 'string', + optional: false, + }, + { + name: 'classes', + type: 'Set', + optional: false, + }, + ], + }, + { + name: 'delete', + kind: 'function', + type_signature: '(id: string): void', + return_type: 'void', + parameters: [ + { + name: 'id', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'get', + kind: 'function', + type_signature: '(): Set', + return_type: 'Set', + parameters: [], + }, + ], + }, + { + name: 'CssClassDeclaration', + kind: 'type', + source_line: 142, + type_signature: 'CssClassDeclaration', + }, + { + name: 'CssClassDeclarationBase', + kind: 'type', + source_line: 147, + type_signature: 'CssClassDeclarationBase', + properties: [ + { + name: 'comment', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'CssClassDeclarationItem', + kind: 'type', + source_line: 151, + type_signature: 'CssClassDeclarationItem', + extends: ['CssClassDeclarationBase'], + properties: [ + { + name: 'declaration', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'CssClassDeclarationGroup', + kind: 'type', + source_line: 154, + type_signature: 'CssClassDeclarationGroup', + extends: ['CssClassDeclarationBase'], + properties: [ + { + name: 'ruleset', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'CssClassDeclarationInterpreter', + kind: 'type', + source_line: 157, + type_signature: 'CssClassDeclarationInterpreter', + extends: ['CssClassDeclarationBase'], + properties: [ + { + name: 'pattern', + kind: 'variable', + type_signature: 'RegExp', + }, + { + name: 'interpret', + kind: 'variable', + type_signature: '(matched: RegExpMatchArray, log?: Logger) => string | null', + }, + ], + }, + { + name: 'generate_classes_css', + kind: 'function', + source_line: 162, + type_signature: + '(classes: Iterable, classes_by_name: Record, interpreters: CssClassDeclarationInterpreter[], log?: Logger | undefined): string', + return_type: 'string', + parameters: [ + { + name: 'classes', + type: 'Iterable', + optional: false, + }, + { + name: 'classes_by_name', + type: 'Record', + optional: false, + }, + { + name: 'interpreters', + type: 'CssClassDeclarationInterpreter[]', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + ], + dependents: ['gen_moss_css.ts'], + }, + { + path: 'css_class_interpreters.ts', + declarations: [ + { + name: 'opacity_interpreter', + kind: 'variable', + doc_comment: 'Interpreter for opacity classes (opacity_0 through opacity_100).', + source_line: 7, + type_signature: 'CssClassDeclarationInterpreter', + }, + { + name: 'font_weight_interpreter', + kind: 'variable', + doc_comment: + 'Interpreter for font-weight classes,\n`font_weight_1` through `font_weight_1000` following the CSS spec.', + source_line: 24, + type_signature: 'CssClassDeclarationInterpreter', + }, + { + name: 'border_radius_interpreter', + kind: 'variable', + doc_comment: + 'Interpreter for border-radius percentage classes,\n`border_radius_0` through `border_radius_100`.', + source_line: 40, + type_signature: 'CssClassDeclarationInterpreter', + }, + { + name: 'border_radius_corners_interpreter', + kind: 'variable', + doc_comment: + 'Interpreter for border radius corner percentage classes,\nhandles all four corners: top-left, top-right, bottom-left, bottom-right.\nExamples: `border_top_left_radius_50`, `border_bottom_right_radius_100`.', + source_line: 57, + type_signature: 'CssClassDeclarationInterpreter', + }, + { + name: 'z_index_interpreter', + kind: 'variable', + doc_comment: + 'Interpreter for z-index classes,\n`z_index_0` through `z_index_${Z_INDEX_MAX}` (max CSS z-index).', + source_line: 77, + type_signature: 'CssClassDeclarationInterpreter', + }, + { + name: 'css_class_interpreters', + kind: 'variable', + doc_comment: + 'Collection of all builtin interpreters for dynamic CSS class generation.', + source_line: 92, + type_signature: 'CssClassDeclarationInterpreter[]', + }, + ], + dependencies: ['variable_data.ts'], + dependents: ['gen_moss_css.ts'], + }, + { + path: 'css_classes.ts', + declarations: [ + { + name: 'css_classes_by_name', + kind: 'variable', + doc_comment: '', + see_also: ['``generate_classes_css``'], + source_line: 54, + type_signature: 'Record', + }, + ], + dependencies: [ + 'css_class_composites.ts', + 'css_class_generators.ts', + 'variable_data.ts', + ], + dependents: ['gen_moss_css.ts'], + }, + { + path: 'gen_moss_css.ts', + declarations: [ + { + name: 'GenMossCssOptions', + kind: 'type', + source_line: 14, + type_signature: 'GenMossCssOptions', + properties: [ + { + name: 'filter_file', + kind: 'variable', + type_signature: 'FileFilter | null', + }, + { + name: 'include_stats', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'classes_by_name', + kind: 'variable', + type_signature: 'Record', + }, + { + name: 'class_interpreters', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'gen_moss_css', + kind: 'function', + source_line: 29, + type_signature: '(options?: GenMossCssOptions): Gen', + return_type: 'Gen', + parameters: [ + { + name: 'options', + type: 'GenMossCssOptions', + optional: false, + default_value: '{}', + }, + ], + }, + ], + dependencies: ['css_class_helpers.ts', 'css_class_interpreters.ts', 'css_classes.ts'], + }, + { + path: 'theme.gen.css.ts', + declarations: [], + dependencies: ['theme.ts', 'themes.ts'], + }, + { + path: 'theme.ts', + declarations: [ + { + name: 'ColorScheme', + kind: 'type', + doc_comment: '', + see_also: ['https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme'], + source_line: 8, + type_signature: 'ColorScheme', + }, + { + name: 'color_schemes', + kind: 'variable', + source_line: 10, + type_signature: 'ColorScheme[]', + }, + { + name: 'Theme', + kind: 'type', + source_line: 12, + type_signature: 'Theme', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'variables', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'RenderThemeStyleOptions', + kind: 'type', + source_line: 17, + type_signature: 'RenderThemeStyleOptions', + properties: [ + { + name: 'comments', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'id', + kind: 'variable', + type_signature: 'string | null', + }, + { + name: 'empty_default_theme', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'specificity', + kind: 'variable', + type_signature: 'number', + doc_comment: + 'Repeats the theme selector to handle unpredictable head content insertion order.\nAccepts any integer >= 1, defaults to 2.', + }, + ], + }, + { + name: 'render_theme_style', + kind: 'function', + source_line: 28, + type_signature: '(theme: Theme, options?: RenderThemeStyleOptions): string', + return_type: 'string', + parameters: [ + { + name: 'theme', + type: 'Theme', + optional: false, + }, + { + name: 'options', + type: 'RenderThemeStyleOptions', + optional: false, + default_value: '{}', + }, + ], + }, + { + name: 'render_theme_variable', + kind: 'function', + source_line: 59, + type_signature: + '(variable: StyleVariable, dark?: boolean, comments?: boolean): string', + return_type: 'string', + parameters: [ + { + name: 'variable', + type: 'StyleVariable', + optional: false, + }, + { + name: 'dark', + type: 'boolean', + optional: false, + default_value: 'false', + }, + { + name: 'comments', + type: 'boolean', + optional: false, + default_value: 'true', + }, + ], + }, + ], + dependencies: ['themes.ts', 'variables.ts'], + dependents: ['theme.gen.css.ts'], + }, + { + path: 'themes.ts', + declarations: [ + { + name: 'DEFAULT_THEME', + kind: 'variable', + source_line: 3, + type_signature: 'Theme', + }, + { + name: 'default_themes', + kind: 'variable', + doc_comment: 'These are super basic proof-of-concept themes.', + source_line: 11, + type_signature: 'Theme[]', + }, + ], + dependents: ['theme.gen.css.ts', 'theme.ts'], + }, + { + path: 'variable_data.ts', + declarations: [ + { + name: 'SizeVariant', + kind: 'type', + source_line: 3, + type_signature: + '"xs" | "sm" | "md" | "lg" | "xl" | "xl2" | "xl3" | "xl4" | "xl5" | "xl6" | "xl7" | "xl8" | "xl9"', + }, + { + name: 'font_size_variants', + kind: 'variable', + source_line: 4, + type_signature: + 'readonly ["xs", "sm", "md", "lg", "xl", "xl2", "xl3", "xl4", "xl5", "xl6", "xl7", "xl8", "xl9"]', + }, + { + name: 'font_size_names', + kind: 'variable', + source_line: 20, + type_signature: 'string[]', + }, + { + name: 'FontFamilyVariant', + kind: 'type', + source_line: 22, + type_signature: '"font_family_sans" | "font_family_serif" | "font_family_mono"', + }, + { + name: 'font_family_variants', + kind: 'variable', + source_line: 23, + type_signature: + 'readonly ["font_family_sans", "font_family_serif", "font_family_mono"]', + }, + { + name: 'TextColorVariant', + kind: 'type', + source_line: 29, + type_signature: '0 | 5 | 4 | 9 | 3 | 1 | 2 | 6 | 7 | 8 | 10', + }, + { + name: 'text_color_variants', + kind: 'variable', + source_line: 30, + type_signature: 'readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]', + }, + { + name: 'SpaceVariant', + kind: 'type', + source_line: 32, + type_signature: + '"xs" | "sm" | "md" | "lg" | "xl" | "xl2" | "xl3" | "xl4" | "xl5" | "xl6" | "xl7" | "xl8" | "xl9" | "xs5" | "xs4" | "xs3" | "xs2" | "xl10" | "xl11" | "xl12" | "xl13" | "xl14" | "xl15"', + }, + { + name: 'space_variants', + kind: 'variable', + source_line: 33, + type_signature: + 'readonly ["xs5", "xs4", "xs3", "xs2", "xs", "sm", "md", "lg", "xl", "xl2", "xl3", "xl4", "xl5", "xl6", "xl7", "xl8", "xl9", "xl10", "xl11", "xl12", "xl13", "xl14", "xl15"]', + }, + { + name: 'DistanceVariant', + kind: 'type', + source_line: 59, + type_signature: '"xs" | "sm" | "md" | "lg" | "xl"', + }, + { + name: 'distance_variants', + kind: 'variable', + source_line: 60, + type_signature: 'readonly ["xs", "sm", "md", "lg", "xl"]', + }, + { + name: 'BorderRadiusVariant', + kind: 'type', + source_line: 62, + type_signature: '"xs" | "sm" | "md" | "lg" | "xl" | "xs3" | "xs2"', + }, + { + name: 'border_radius_variants', + kind: 'variable', + source_line: 63, + type_signature: 'readonly ["xs3", "xs2", "xs", "sm", "md", "lg", "xl"]', + }, + { + name: 'LineHeightVariant', + kind: 'type', + source_line: 65, + type_signature: '"xs" | "sm" | "md" | "lg" | "xl"', + }, + { + name: 'line_height_variants', + kind: 'variable', + source_line: 66, + type_signature: 'readonly ["xs", "sm", "md", "lg", "xl"]', + }, + { + name: 'line_height_names', + kind: 'variable', + source_line: 68, + type_signature: 'string[]', + }, + { + name: 'shadow_variant_prefixes', + kind: 'variable', + source_line: 70, + type_signature: + 'readonly ["shadow_", "shadow_top_", "shadow_bottom_", "shadow_inset_", "shadow_inset_top_", "shadow_inset_bottom_"]', + }, + { + name: 'ShadowSizeVariant', + kind: 'type', + source_line: 79, + type_signature: '"xs" | "sm" | "md" | "lg" | "xl"', + }, + { + name: 'shadow_font_size_variants', + kind: 'variable', + source_line: 80, + type_signature: 'readonly ["xs", "sm", "md", "lg", "xl"]', + }, + { + name: 'ShadowAlphaVariant', + kind: 'type', + source_line: 82, + type_signature: '5 | 4 | 3 | 1 | 2', + }, + { + name: 'shadow_alpha_variants', + kind: 'variable', + source_line: 83, + type_signature: 'readonly [1, 2, 3, 4, 5]', + }, + { + name: 'ShadowSemanticValue', + kind: 'type', + source_line: 85, + type_signature: '"highlight" | "glow" | "shroud"', + }, + { + name: 'shadow_semantic_values', + kind: 'variable', + source_line: 86, + type_signature: 'readonly ["highlight", "glow", "shroud"]', + }, + { + name: 'IconSizeVariant', + kind: 'type', + source_line: 88, + type_signature: '"xs" | "sm" | "md" | "lg" | "xl" | "xl2" | "xl3"', + }, + { + name: 'icon_size_variants', + kind: 'variable', + source_line: 89, + type_signature: 'readonly ["xs", "sm", "md", "lg", "xl", "xl2", "xl3"]', + }, + { + name: 'icon_sizes', + kind: 'variable', + source_line: 92, + type_signature: + '{ icon_size_xs: string; icon_size_sm: string; icon_size_md: string; icon_size_lg: string; icon_size_xl: string; icon_size_xl2: string; icon_size_xl3: string; }', + }, + { + name: 'ColorVariant', + kind: 'type', + source_line: 102, + type_signature: '"a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j"', + }, + { + name: 'color_variants', + kind: 'variable', + source_line: 103, + type_signature: 'readonly ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]', + }, + { + name: 'BorderWidthVariant', + kind: 'type', + source_line: 105, + type_signature: '5 | 4 | 9 | 3 | 1 | 2 | 6 | 7 | 8', + }, + { + name: 'border_width_variants', + kind: 'variable', + source_line: 106, + type_signature: 'readonly [1, 2, 3, 4, 5, 6, 7, 8, 9]', + }, + { + name: 'OutlineWidthVariant', + kind: 'type', + source_line: 108, + type_signature: '"focus" | "active"', + }, + { + name: 'outline_width_variants', + kind: 'variable', + source_line: 109, + type_signature: 'readonly ["focus", "active"]', + }, + { + name: 'AlignmentValue', + kind: 'type', + source_line: 111, + type_signature: '"center" | "start" | "end" | "baseline" | "stretch"', + }, + { + name: 'alignment_values', + kind: 'variable', + source_line: 112, + type_signature: 'readonly ["center", "start", "end", "baseline", "stretch"]', + }, + { + name: 'JustifyValue', + kind: 'type', + source_line: 114, + type_signature: + '"right" | "left" | "center" | "start" | "end" | "stretch" | "space-between" | "space-around" | "space-evenly"', + }, + { + name: 'justify_values', + kind: 'variable', + source_line: 115, + type_signature: + 'readonly ["center", "start", "end", "left", "right", "space-between", "space-around", "space-evenly", "stretch"]', + }, + { + name: 'OverflowValue', + kind: 'type', + source_line: 127, + type_signature: '"auto" | "hidden" | "scroll" | "clip" | "visible"', + }, + { + name: 'overflow_values', + kind: 'variable', + source_line: 128, + type_signature: 'readonly ["auto", "hidden", "scroll", "clip", "visible"]', + }, + { + name: 'BorderStyleValue', + kind: 'type', + source_line: 130, + type_signature: + '"hidden" | "none" | "dotted" | "dashed" | "solid" | "double" | "groove" | "ridge" | "inset" | "outset"', + }, + { + name: 'border_style_values', + kind: 'variable', + source_line: 131, + type_signature: + 'readonly ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]', + }, + { + name: 'DisplayValue', + kind: 'type', + source_line: 144, + type_signature: + '"none" | "contents" | "block" | "flow-root" | "inline" | "inline-block" | "run-in" | "list-item" | "inline list-item" | "flex" | "inline-flex" | "grid" | "inline-grid" | "ruby" | "block ruby" | "table" | "inline-table"', + }, + { + name: 'display_values', + kind: 'variable', + source_line: 145, + type_signature: + 'readonly ["none", "contents", "block", "flow-root", "inline", "inline-block", "run-in", "list-item", "inline list-item", "flex", "inline-flex", "grid", "inline-grid", "ruby", "block ruby", "table", "inline-table"]', + }, + { + name: 'TextAlignValue', + kind: 'type', + source_line: 165, + type_signature: + '"right" | "left" | "center" | "start" | "end" | "justify" | "justify-all" | "match-parent"', + }, + { + name: 'text_align_values', + kind: 'variable', + source_line: 166, + type_signature: + 'readonly ["start", "end", "left", "right", "center", "justify", "justify-all", "match-parent"]', + }, + { + name: 'VerticalAlignValue', + kind: 'type', + source_line: 177, + type_signature: + '"top" | "bottom" | "baseline" | "sub" | "super" | "text-top" | "text-bottom" | "middle"', + }, + { + name: 'vertical_align_values', + kind: 'variable', + source_line: 178, + type_signature: + 'readonly ["baseline", "sub", "super", "text-top", "text-bottom", "middle", "top", "bottom"]', + }, + { + name: 'WordBreakValue', + kind: 'type', + source_line: 189, + type_signature: '"normal" | "break-all" | "keep-all"', + }, + { + name: 'word_break_values', + kind: 'variable', + source_line: 190, + type_signature: 'readonly ["normal", "break-all", "keep-all"]', + }, + { + name: 'PositionValue', + kind: 'type', + source_line: 192, + type_signature: '"static" | "relative" | "absolute" | "fixed" | "sticky"', + }, + { + name: 'position_values', + kind: 'variable', + source_line: 193, + type_signature: 'readonly ["static", "relative", "absolute", "fixed", "sticky"]', + }, + { + name: 'VisibilityValue', + kind: 'type', + source_line: 195, + type_signature: '"hidden" | "visible" | "collapse"', + }, + { + name: 'visibility_values', + kind: 'variable', + source_line: 196, + type_signature: 'readonly ["visible", "hidden", "collapse"]', + }, + { + name: 'FloatValue', + kind: 'type', + source_line: 198, + type_signature: '"right" | "left" | "none" | "inline-start"', + }, + { + name: 'float_values', + kind: 'variable', + source_line: 199, + type_signature: 'readonly ["none", "left", "right", "inline-start"]', + }, + { + name: 'FlexWrapValue', + kind: 'type', + source_line: 201, + type_signature: '"nowrap" | "wrap" | "wrap-reverse"', + }, + { + name: 'flex_wrap_values', + kind: 'variable', + source_line: 202, + type_signature: 'readonly ["nowrap", "wrap", "wrap-reverse"]', + }, + { + name: 'FlexDirectionValue', + kind: 'type', + source_line: 204, + type_signature: '"row" | "row-reverse" | "column" | "column-reverse"', + }, + { + name: 'flex_direction_values', + kind: 'variable', + source_line: 205, + type_signature: 'readonly ["row", "row-reverse", "column", "column-reverse"]', + }, + { + name: 'OverflowWrapValue', + kind: 'type', + source_line: 207, + type_signature: '"normal" | "anywhere" | "break-word"', + }, + { + name: 'overflow_wrap_values', + kind: 'variable', + source_line: 208, + type_signature: 'readonly ["normal", "anywhere", "break-word"]', + }, + { + name: 'ScrollbarWidthValue', + kind: 'type', + source_line: 210, + type_signature: '"auto" | "none" | "thin"', + }, + { + name: 'scrollbar_width_values', + kind: 'variable', + source_line: 211, + type_signature: 'readonly ["auto", "thin", "none"]', + }, + { + name: 'ScrollbarGutterValue', + kind: 'type', + source_line: 213, + type_signature: '"auto" | "stable" | "stable both-edges"', + }, + { + name: 'scrollbar_gutter_values', + kind: 'variable', + source_line: 214, + type_signature: 'readonly ["auto", "stable", "stable both-edges"]', + }, + { + name: 'Z_INDEX_MAX', + kind: 'variable', + doc_comment: 'Maximum value for CSS z-index property (32-bit signed integer max).', + source_line: 219, + type_signature: '2147483647', + }, + ], + dependents: ['css_class_interpreters.ts', 'css_classes.ts', 'variables.ts'], + }, + { + path: 'variable.ts', + declarations: [ + { + name: 'StyleVariableName', + kind: 'type', + source_line: 5, + type_signature: 'StyleVariableName', + }, + { + name: 'StyleVariable', + kind: 'type', + source_line: 7, + type_signature: 'StyleVariable', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'StyleVariableName', + }, + { + name: 'light', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'dark', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'summary', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'STYLE_VARIABLE_NAME_MATCHER', + kind: 'variable', + source_line: 14, + type_signature: 'RegExp', + }, + { + name: 'is_style_variable_name', + kind: 'function', + source_line: 16, + type_signature: '(name: string): name is StyleVariableName', + return_type: 'boolean', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + }, + ], + }, + ], + }, + { + path: 'variables.ts', + declarations: [ + { + name: 'hue_a', + kind: 'variable', + source_line: 24, + type_signature: 'StyleVariable', + }, + { + name: 'hue_b', + kind: 'variable', + source_line: 25, + type_signature: 'StyleVariable', + }, + { + name: 'hue_c', + kind: 'variable', + source_line: 26, + type_signature: 'StyleVariable', + }, + { + name: 'hue_d', + kind: 'variable', + source_line: 27, + type_signature: 'StyleVariable', + }, + { + name: 'hue_e', + kind: 'variable', + source_line: 28, + type_signature: 'StyleVariable', + }, + { + name: 'hue_f', + kind: 'variable', + source_line: 29, + type_signature: 'StyleVariable', + }, + { + name: 'hue_g', + kind: 'variable', + source_line: 30, + type_signature: 'StyleVariable', + }, + { + name: 'hue_h', + kind: 'variable', + source_line: 31, + type_signature: 'StyleVariable', + }, + { + name: 'hue_i', + kind: 'variable', + source_line: 32, + type_signature: 'StyleVariable', + }, + { + name: 'hue_j', + kind: 'variable', + source_line: 33, + type_signature: 'StyleVariable', + }, + { + name: 'color_a_1', + kind: 'variable', + source_line: 34, + type_signature: 'StyleVariable', + }, + { + name: 'color_a_2', + kind: 'variable', + source_line: 38, + type_signature: 'StyleVariable', + }, + { + name: 'color_a_3', + kind: 'variable', + source_line: 43, + type_signature: 'StyleVariable', + }, + { + name: 'color_a_4', + kind: 'variable', + source_line: 48, + type_signature: 'StyleVariable', + }, + { + name: 'color_a_5', + kind: 'variable', + source_line: 53, + type_signature: 'StyleVariable', + }, + { + name: 'color_a_6', + kind: 'variable', + source_line: 58, + type_signature: 'StyleVariable', + }, + { + name: 'color_a_7', + kind: 'variable', + source_line: 63, + type_signature: 'StyleVariable', + }, + { + name: 'color_a_8', + kind: 'variable', + source_line: 68, + type_signature: 'StyleVariable', + }, + { + name: 'color_a_9', + kind: 'variable', + source_line: 73, + type_signature: 'StyleVariable', + }, + { + name: 'color_b_1', + kind: 'variable', + source_line: 77, + type_signature: 'StyleVariable', + }, + { + name: 'color_b_2', + kind: 'variable', + source_line: 81, + type_signature: 'StyleVariable', + }, + { + name: 'color_b_3', + kind: 'variable', + source_line: 86, + type_signature: 'StyleVariable', + }, + { + name: 'color_b_4', + kind: 'variable', + source_line: 91, + type_signature: 'StyleVariable', + }, + { + name: 'color_b_5', + kind: 'variable', + source_line: 96, + type_signature: 'StyleVariable', + }, + { + name: 'color_b_6', + kind: 'variable', + source_line: 101, + type_signature: 'StyleVariable', + }, + { + name: 'color_b_7', + kind: 'variable', + source_line: 106, + type_signature: 'StyleVariable', + }, + { + name: 'color_b_8', + kind: 'variable', + source_line: 111, + type_signature: 'StyleVariable', + }, + { + name: 'color_b_9', + kind: 'variable', + source_line: 116, + type_signature: 'StyleVariable', + }, + { + name: 'color_c_1', + kind: 'variable', + source_line: 120, + type_signature: 'StyleVariable', + }, + { + name: 'color_c_2', + kind: 'variable', + source_line: 124, + type_signature: 'StyleVariable', + }, + { + name: 'color_c_3', + kind: 'variable', + source_line: 129, + type_signature: 'StyleVariable', + }, + { + name: 'color_c_4', + kind: 'variable', + source_line: 134, + type_signature: 'StyleVariable', + }, + { + name: 'color_c_5', + kind: 'variable', + source_line: 139, + type_signature: 'StyleVariable', + }, + { + name: 'color_c_6', + kind: 'variable', + source_line: 144, + type_signature: 'StyleVariable', + }, + { + name: 'color_c_7', + kind: 'variable', + source_line: 149, + type_signature: 'StyleVariable', + }, + { + name: 'color_c_8', + kind: 'variable', + source_line: 154, + type_signature: 'StyleVariable', + }, + { + name: 'color_c_9', + kind: 'variable', + source_line: 159, + type_signature: 'StyleVariable', + }, + { + name: 'color_d_1', + kind: 'variable', + source_line: 163, + type_signature: 'StyleVariable', + }, + { + name: 'color_d_2', + kind: 'variable', + source_line: 167, + type_signature: 'StyleVariable', + }, + { + name: 'color_d_3', + kind: 'variable', + source_line: 172, + type_signature: 'StyleVariable', + }, + { + name: 'color_d_4', + kind: 'variable', + source_line: 177, + type_signature: 'StyleVariable', + }, + { + name: 'color_d_5', + kind: 'variable', + source_line: 182, + type_signature: 'StyleVariable', + }, + { + name: 'color_d_6', + kind: 'variable', + source_line: 187, + type_signature: 'StyleVariable', + }, + { + name: 'color_d_7', + kind: 'variable', + source_line: 192, + type_signature: 'StyleVariable', + }, + { + name: 'color_d_8', + kind: 'variable', + source_line: 197, + type_signature: 'StyleVariable', + }, + { + name: 'color_d_9', + kind: 'variable', + source_line: 202, + type_signature: 'StyleVariable', + }, + { + name: 'color_e_1', + kind: 'variable', + source_line: 206, + type_signature: 'StyleVariable', + }, + { + name: 'color_e_2', + kind: 'variable', + source_line: 210, + type_signature: 'StyleVariable', + }, + { + name: 'color_e_3', + kind: 'variable', + source_line: 215, + type_signature: 'StyleVariable', + }, + { + name: 'color_e_4', + kind: 'variable', + source_line: 220, + type_signature: 'StyleVariable', + }, + { + name: 'color_e_5', + kind: 'variable', + source_line: 225, + type_signature: 'StyleVariable', + }, + { + name: 'color_e_6', + kind: 'variable', + source_line: 230, + type_signature: 'StyleVariable', + }, + { + name: 'color_e_7', + kind: 'variable', + source_line: 235, + type_signature: 'StyleVariable', + }, + { + name: 'color_e_8', + kind: 'variable', + source_line: 240, + type_signature: 'StyleVariable', + }, + { + name: 'color_e_9', + kind: 'variable', + source_line: 245, + type_signature: 'StyleVariable', + }, + { + name: 'color_f_1', + kind: 'variable', + source_line: 249, + type_signature: 'StyleVariable', + }, + { + name: 'color_f_2', + kind: 'variable', + source_line: 253, + type_signature: 'StyleVariable', + }, + { + name: 'color_f_3', + kind: 'variable', + source_line: 258, + type_signature: 'StyleVariable', + }, + { + name: 'color_f_4', + kind: 'variable', + source_line: 263, + type_signature: 'StyleVariable', + }, + { + name: 'color_f_5', + kind: 'variable', + source_line: 268, + type_signature: 'StyleVariable', + }, + { + name: 'color_f_6', + kind: 'variable', + source_line: 273, + type_signature: 'StyleVariable', + }, + { + name: 'color_f_7', + kind: 'variable', + source_line: 278, + type_signature: 'StyleVariable', + }, + { + name: 'color_f_8', + kind: 'variable', + source_line: 283, + type_signature: 'StyleVariable', + }, + { + name: 'color_f_9', + kind: 'variable', + source_line: 288, + type_signature: 'StyleVariable', + }, + { + name: 'color_g_1', + kind: 'variable', + source_line: 292, + type_signature: 'StyleVariable', + }, + { + name: 'color_g_2', + kind: 'variable', + source_line: 296, + type_signature: 'StyleVariable', + }, + { + name: 'color_g_3', + kind: 'variable', + source_line: 301, + type_signature: 'StyleVariable', + }, + { + name: 'color_g_4', + kind: 'variable', + source_line: 306, + type_signature: 'StyleVariable', + }, + { + name: 'color_g_5', + kind: 'variable', + source_line: 311, + type_signature: 'StyleVariable', + }, + { + name: 'color_g_6', + kind: 'variable', + source_line: 316, + type_signature: 'StyleVariable', + }, + { + name: 'color_g_7', + kind: 'variable', + source_line: 321, + type_signature: 'StyleVariable', + }, + { + name: 'color_g_8', + kind: 'variable', + source_line: 326, + type_signature: 'StyleVariable', + }, + { + name: 'color_g_9', + kind: 'variable', + source_line: 331, + type_signature: 'StyleVariable', + }, + { + name: 'color_h_1', + kind: 'variable', + source_line: 335, + type_signature: 'StyleVariable', + }, + { + name: 'color_h_2', + kind: 'variable', + source_line: 339, + type_signature: 'StyleVariable', + }, + { + name: 'color_h_3', + kind: 'variable', + source_line: 344, + type_signature: 'StyleVariable', + }, + { + name: 'color_h_4', + kind: 'variable', + source_line: 349, + type_signature: 'StyleVariable', + }, + { + name: 'color_h_5', + kind: 'variable', + source_line: 354, + type_signature: 'StyleVariable', + }, + { + name: 'color_h_6', + kind: 'variable', + source_line: 359, + type_signature: 'StyleVariable', + }, + { + name: 'color_h_7', + kind: 'variable', + source_line: 364, + type_signature: 'StyleVariable', + }, + { + name: 'color_h_8', + kind: 'variable', + source_line: 369, + type_signature: 'StyleVariable', + }, + { + name: 'color_h_9', + kind: 'variable', + source_line: 374, + type_signature: 'StyleVariable', + }, + { + name: 'color_i_1', + kind: 'variable', + source_line: 378, + type_signature: 'StyleVariable', + }, + { + name: 'color_i_2', + kind: 'variable', + source_line: 382, + type_signature: 'StyleVariable', + }, + { + name: 'color_i_3', + kind: 'variable', + source_line: 387, + type_signature: 'StyleVariable', + }, + { + name: 'color_i_4', + kind: 'variable', + source_line: 392, + type_signature: 'StyleVariable', + }, + { + name: 'color_i_5', + kind: 'variable', + source_line: 397, + type_signature: 'StyleVariable', + }, + { + name: 'color_i_6', + kind: 'variable', + source_line: 402, + type_signature: 'StyleVariable', + }, + { + name: 'color_i_7', + kind: 'variable', + source_line: 407, + type_signature: 'StyleVariable', + }, + { + name: 'color_i_8', + kind: 'variable', + source_line: 412, + type_signature: 'StyleVariable', + }, + { + name: 'color_i_9', + kind: 'variable', + source_line: 417, + type_signature: 'StyleVariable', + }, + { + name: 'color_j_1', + kind: 'variable', + source_line: 421, + type_signature: 'StyleVariable', + }, + { + name: 'color_j_2', + kind: 'variable', + source_line: 425, + type_signature: 'StyleVariable', + }, + { + name: 'color_j_3', + kind: 'variable', + source_line: 430, + type_signature: 'StyleVariable', + }, + { + name: 'color_j_4', + kind: 'variable', + source_line: 435, + type_signature: 'StyleVariable', + }, + { + name: 'color_j_5', + kind: 'variable', + source_line: 440, + type_signature: 'StyleVariable', + }, + { + name: 'color_j_6', + kind: 'variable', + source_line: 445, + type_signature: 'StyleVariable', + }, + { + name: 'color_j_7', + kind: 'variable', + source_line: 450, + type_signature: 'StyleVariable', + }, + { + name: 'color_j_8', + kind: 'variable', + source_line: 455, + type_signature: 'StyleVariable', + }, + { + name: 'color_j_9', + kind: 'variable', + source_line: 460, + type_signature: 'StyleVariable', + }, + { + name: 'tint_hue', + kind: 'variable', + source_line: 471, + type_signature: 'StyleVariable', + }, + { + name: 'tint_saturation', + kind: 'variable', + source_line: 472, + type_signature: 'StyleVariable', + }, + { + name: 'darken_1', + kind: 'variable', + source_line: 482, + type_signature: 'StyleVariable', + }, + { + name: 'darken_2', + kind: 'variable', + source_line: 483, + type_signature: 'StyleVariable', + }, + { + name: 'darken_3', + kind: 'variable', + source_line: 484, + type_signature: 'StyleVariable', + }, + { + name: 'darken_4', + kind: 'variable', + source_line: 485, + type_signature: 'StyleVariable', + }, + { + name: 'darken_5', + kind: 'variable', + source_line: 486, + type_signature: 'StyleVariable', + }, + { + name: 'darken_6', + kind: 'variable', + source_line: 487, + type_signature: 'StyleVariable', + }, + { + name: 'darken_7', + kind: 'variable', + source_line: 488, + type_signature: 'StyleVariable', + }, + { + name: 'darken_8', + kind: 'variable', + source_line: 489, + type_signature: 'StyleVariable', + }, + { + name: 'darken_9', + kind: 'variable', + source_line: 490, + type_signature: 'StyleVariable', + }, + { + name: 'lighten_1', + kind: 'variable', + source_line: 491, + type_signature: 'StyleVariable', + }, + { + name: 'lighten_2', + kind: 'variable', + source_line: 492, + type_signature: 'StyleVariable', + }, + { + name: 'lighten_3', + kind: 'variable', + source_line: 493, + type_signature: 'StyleVariable', + }, + { + name: 'lighten_4', + kind: 'variable', + source_line: 494, + type_signature: 'StyleVariable', + }, + { + name: 'lighten_5', + kind: 'variable', + source_line: 495, + type_signature: 'StyleVariable', + }, + { + name: 'lighten_6', + kind: 'variable', + source_line: 496, + type_signature: 'StyleVariable', + }, + { + name: 'lighten_7', + kind: 'variable', + source_line: 497, + type_signature: 'StyleVariable', + }, + { + name: 'lighten_8', + kind: 'variable', + source_line: 498, + type_signature: 'StyleVariable', + }, + { + name: 'lighten_9', + kind: 'variable', + source_line: 499, + type_signature: 'StyleVariable', + }, + { + name: 'bg', + kind: 'variable', + source_line: 506, + type_signature: 'StyleVariable', + }, + { + name: 'fg', + kind: 'variable', + source_line: 511, + type_signature: 'StyleVariable', + }, + { + name: 'bg_0', + kind: 'variable', + source_line: 518, + type_signature: 'StyleVariable', + }, + { + name: 'bg_1', + kind: 'variable', + source_line: 523, + type_signature: 'StyleVariable', + }, + { + name: 'bg_2', + kind: 'variable', + source_line: 528, + type_signature: 'StyleVariable', + }, + { + name: 'bg_3', + kind: 'variable', + source_line: 533, + type_signature: 'StyleVariable', + }, + { + name: 'bg_4', + kind: 'variable', + source_line: 538, + type_signature: 'StyleVariable', + }, + { + name: 'bg_5', + kind: 'variable', + source_line: 543, + type_signature: 'StyleVariable', + }, + { + name: 'bg_6', + kind: 'variable', + source_line: 548, + type_signature: 'StyleVariable', + }, + { + name: 'bg_7', + kind: 'variable', + source_line: 553, + type_signature: 'StyleVariable', + }, + { + name: 'bg_8', + kind: 'variable', + source_line: 558, + type_signature: 'StyleVariable', + }, + { + name: 'bg_9', + kind: 'variable', + source_line: 563, + type_signature: 'StyleVariable', + }, + { + name: 'bg_10', + kind: 'variable', + source_line: 568, + type_signature: 'StyleVariable', + }, + { + name: 'fg_0', + kind: 'variable', + source_line: 573, + type_signature: 'StyleVariable', + }, + { + name: 'fg_1', + kind: 'variable', + source_line: 578, + type_signature: 'StyleVariable', + }, + { + name: 'fg_2', + kind: 'variable', + source_line: 583, + type_signature: 'StyleVariable', + }, + { + name: 'fg_3', + kind: 'variable', + source_line: 588, + type_signature: 'StyleVariable', + }, + { + name: 'fg_4', + kind: 'variable', + source_line: 593, + type_signature: 'StyleVariable', + }, + { + name: 'fg_5', + kind: 'variable', + source_line: 598, + type_signature: 'StyleVariable', + }, + { + name: 'fg_6', + kind: 'variable', + source_line: 603, + type_signature: 'StyleVariable', + }, + { + name: 'fg_7', + kind: 'variable', + source_line: 608, + type_signature: 'StyleVariable', + }, + { + name: 'fg_8', + kind: 'variable', + source_line: 613, + type_signature: 'StyleVariable', + }, + { + name: 'fg_9', + kind: 'variable', + source_line: 618, + type_signature: 'StyleVariable', + }, + { + name: 'fg_10', + kind: 'variable', + source_line: 623, + type_signature: 'StyleVariable', + }, + { + name: 'fill', + kind: 'variable', + source_line: 629, + type_signature: 'StyleVariable', + }, + { + name: 'fill_a', + kind: 'variable', + source_line: 633, + type_signature: 'StyleVariable', + }, + { + name: 'fill_b', + kind: 'variable', + source_line: 638, + type_signature: 'StyleVariable', + }, + { + name: 'fill_c', + kind: 'variable', + source_line: 643, + type_signature: 'StyleVariable', + }, + { + name: 'fill_d', + kind: 'variable', + source_line: 648, + type_signature: 'StyleVariable', + }, + { + name: 'fill_e', + kind: 'variable', + source_line: 653, + type_signature: 'StyleVariable', + }, + { + name: 'fill_f', + kind: 'variable', + source_line: 658, + type_signature: 'StyleVariable', + }, + { + name: 'fill_g', + kind: 'variable', + source_line: 663, + type_signature: 'StyleVariable', + }, + { + name: 'fill_h', + kind: 'variable', + source_line: 668, + type_signature: 'StyleVariable', + }, + { + name: 'fill_i', + kind: 'variable', + source_line: 673, + type_signature: 'StyleVariable', + }, + { + name: 'fill_j', + kind: 'variable', + source_line: 678, + type_signature: 'StyleVariable', + }, + { + name: 'text_color', + kind: 'variable', + source_line: 692, + type_signature: 'StyleVariable', + }, + { + name: 'text_color_0', + kind: 'variable', + source_line: 693, + type_signature: 'StyleVariable', + }, + { + name: 'text_color_1', + kind: 'variable', + source_line: 698, + type_signature: 'StyleVariable', + }, + { + name: 'text_color_2', + kind: 'variable', + source_line: 703, + type_signature: 'StyleVariable', + }, + { + name: 'text_color_3', + kind: 'variable', + source_line: 708, + type_signature: 'StyleVariable', + }, + { + name: 'text_color_4', + kind: 'variable', + source_line: 713, + type_signature: 'StyleVariable', + }, + { + name: 'text_color_5', + kind: 'variable', + source_line: 718, + type_signature: 'StyleVariable', + }, + { + name: 'text_color_6', + kind: 'variable', + source_line: 722, + type_signature: 'StyleVariable', + }, + { + name: 'text_color_7', + kind: 'variable', + source_line: 727, + type_signature: 'StyleVariable', + }, + { + name: 'text_color_8', + kind: 'variable', + source_line: 732, + type_signature: 'StyleVariable', + }, + { + name: 'text_color_9', + kind: 'variable', + source_line: 737, + type_signature: 'StyleVariable', + }, + { + name: 'text_color_10', + kind: 'variable', + source_line: 742, + type_signature: 'StyleVariable', + }, + { + name: 'text_color_disabled', + kind: 'variable', + source_line: 746, + type_signature: 'StyleVariable', + }, + { + name: 'text_active', + kind: 'variable', + source_line: 750, + type_signature: 'StyleVariable', + }, + { + name: 'font_family_sans', + kind: 'variable', + source_line: 757, + type_signature: 'StyleVariable', + }, + { + name: 'font_family_serif', + kind: 'variable', + source_line: 763, + type_signature: 'StyleVariable', + }, + { + name: 'font_family_mono', + kind: 'variable', + source_line: 768, + type_signature: 'StyleVariable', + }, + { + name: 'font_size_xs', + kind: 'variable', + source_line: 774, + type_signature: 'StyleVariable', + }, + { + name: 'font_size_sm', + kind: 'variable', + source_line: 775, + type_signature: 'StyleVariable', + }, + { + name: 'font_size_md', + kind: 'variable', + source_line: 776, + type_signature: 'StyleVariable', + }, + { + name: 'font_size_lg', + kind: 'variable', + source_line: 777, + type_signature: 'StyleVariable', + }, + { + name: 'font_size_xl', + kind: 'variable', + source_line: 778, + type_signature: 'StyleVariable', + }, + { + name: 'font_size_xl2', + kind: 'variable', + source_line: 779, + type_signature: 'StyleVariable', + }, + { + name: 'font_size_xl3', + kind: 'variable', + source_line: 780, + type_signature: 'StyleVariable', + }, + { + name: 'font_size_xl4', + kind: 'variable', + source_line: 781, + type_signature: 'StyleVariable', + }, + { + name: 'font_size_xl5', + kind: 'variable', + source_line: 782, + type_signature: 'StyleVariable', + }, + { + name: 'font_size_xl6', + kind: 'variable', + source_line: 783, + type_signature: 'StyleVariable', + }, + { + name: 'font_size_xl7', + kind: 'variable', + source_line: 784, + type_signature: 'StyleVariable', + }, + { + name: 'font_size_xl8', + kind: 'variable', + source_line: 785, + type_signature: 'StyleVariable', + }, + { + name: 'font_size_xl9', + kind: 'variable', + source_line: 786, + type_signature: 'StyleVariable', + }, + { + name: 'line_height_xs', + kind: 'variable', + source_line: 788, + type_signature: 'StyleVariable', + }, + { + name: 'line_height_sm', + kind: 'variable', + source_line: 789, + type_signature: 'StyleVariable', + }, + { + name: 'line_height_md', + kind: 'variable', + source_line: 790, + type_signature: 'StyleVariable', + }, + { + name: 'line_height_lg', + kind: 'variable', + source_line: 791, + type_signature: 'StyleVariable', + }, + { + name: 'line_height_xl', + kind: 'variable', + source_line: 792, + type_signature: 'StyleVariable', + }, + { + name: 'link_color', + kind: 'variable', + source_line: 795, + type_signature: 'StyleVariable', + }, + { + name: 'text_decoration', + kind: 'variable', + source_line: 800, + type_signature: 'StyleVariable', + }, + { + name: 'text_decoration_hover', + kind: 'variable', + source_line: 801, + type_signature: 'StyleVariable', + }, + { + name: 'text_decoration_selected', + kind: 'variable', + source_line: 805, + type_signature: 'StyleVariable', + }, + { + name: 'link_color_selected', + kind: 'variable', + source_line: 809, + type_signature: 'StyleVariable', + }, + { + name: 'space_xs5', + kind: 'variable', + source_line: 815, + type_signature: 'StyleVariable', + }, + { + name: 'space_xs4', + kind: 'variable', + source_line: 816, + type_signature: 'StyleVariable', + }, + { + name: 'space_xs3', + kind: 'variable', + source_line: 817, + type_signature: 'StyleVariable', + }, + { + name: 'space_xs2', + kind: 'variable', + source_line: 818, + type_signature: 'StyleVariable', + }, + { + name: 'space_xs', + kind: 'variable', + source_line: 819, + type_signature: 'StyleVariable', + }, + { + name: 'space_sm', + kind: 'variable', + source_line: 820, + type_signature: 'StyleVariable', + }, + { + name: 'space_md', + kind: 'variable', + source_line: 821, + type_signature: 'StyleVariable', + }, + { + name: 'space_lg', + kind: 'variable', + source_line: 822, + type_signature: 'StyleVariable', + }, + { + name: 'space_xl', + kind: 'variable', + source_line: 823, + type_signature: 'StyleVariable', + }, + { + name: 'space_xl2', + kind: 'variable', + source_line: 824, + type_signature: 'StyleVariable', + }, + { + name: 'space_xl3', + kind: 'variable', + source_line: 825, + type_signature: 'StyleVariable', + }, + { + name: 'space_xl4', + kind: 'variable', + source_line: 826, + type_signature: 'StyleVariable', + }, + { + name: 'space_xl5', + kind: 'variable', + source_line: 827, + type_signature: 'StyleVariable', + }, + { + name: 'space_xl6', + kind: 'variable', + source_line: 828, + type_signature: 'StyleVariable', + }, + { + name: 'space_xl7', + kind: 'variable', + source_line: 829, + type_signature: 'StyleVariable', + }, + { + name: 'space_xl8', + kind: 'variable', + source_line: 830, + type_signature: 'StyleVariable', + }, + { + name: 'space_xl9', + kind: 'variable', + source_line: 831, + type_signature: 'StyleVariable', + }, + { + name: 'space_xl10', + kind: 'variable', + source_line: 832, + type_signature: 'StyleVariable', + }, + { + name: 'space_xl11', + kind: 'variable', + source_line: 833, + type_signature: 'StyleVariable', + }, + { + name: 'space_xl12', + kind: 'variable', + source_line: 834, + type_signature: 'StyleVariable', + }, + { + name: 'space_xl13', + kind: 'variable', + source_line: 835, + type_signature: 'StyleVariable', + }, + { + name: 'space_xl14', + kind: 'variable', + source_line: 836, + type_signature: 'StyleVariable', + }, + { + name: 'space_xl15', + kind: 'variable', + source_line: 837, + type_signature: 'StyleVariable', + }, + { + name: 'distance_xs', + kind: 'variable', + source_line: 838, + type_signature: 'StyleVariable', + }, + { + name: 'distance_sm', + kind: 'variable', + source_line: 839, + type_signature: 'StyleVariable', + }, + { + name: 'distance_md', + kind: 'variable', + source_line: 840, + type_signature: 'StyleVariable', + }, + { + name: 'distance_lg', + kind: 'variable', + source_line: 841, + type_signature: 'StyleVariable', + }, + { + name: 'distance_xl', + kind: 'variable', + source_line: 842, + type_signature: 'StyleVariable', + }, + { + name: 'border_color', + kind: 'variable', + source_line: 846, + type_signature: 'StyleVariable', + }, + { + name: 'border_style', + kind: 'variable', + source_line: 852, + type_signature: 'StyleVariable', + }, + { + name: 'border_color_1', + kind: 'variable', + source_line: 857, + type_signature: 'StyleVariable', + }, + { + name: 'border_color_2', + kind: 'variable', + source_line: 862, + type_signature: 'StyleVariable', + }, + { + name: 'border_color_3', + kind: 'variable', + source_line: 867, + type_signature: 'StyleVariable', + }, + { + name: 'border_color_4', + kind: 'variable', + source_line: 872, + type_signature: 'StyleVariable', + }, + { + name: 'border_color_5', + kind: 'variable', + source_line: 877, + type_signature: 'StyleVariable', + }, + { + name: 'border_color_a', + kind: 'variable', + source_line: 883, + type_signature: 'StyleVariable', + }, + { + name: 'border_color_b', + kind: 'variable', + source_line: 887, + type_signature: 'StyleVariable', + }, + { + name: 'border_color_c', + kind: 'variable', + source_line: 891, + type_signature: 'StyleVariable', + }, + { + name: 'border_color_d', + kind: 'variable', + source_line: 895, + type_signature: 'StyleVariable', + }, + { + name: 'border_color_e', + kind: 'variable', + source_line: 899, + type_signature: 'StyleVariable', + }, + { + name: 'border_color_f', + kind: 'variable', + source_line: 903, + type_signature: 'StyleVariable', + }, + { + name: 'border_color_g', + kind: 'variable', + source_line: 907, + type_signature: 'StyleVariable', + }, + { + name: 'border_color_h', + kind: 'variable', + source_line: 911, + type_signature: 'StyleVariable', + }, + { + name: 'border_color_i', + kind: 'variable', + source_line: 915, + type_signature: 'StyleVariable', + }, + { + name: 'border_color_j', + kind: 'variable', + source_line: 919, + type_signature: 'StyleVariable', + }, + { + name: 'border_width', + kind: 'variable', + source_line: 923, + type_signature: 'StyleVariable', + }, + { + name: 'border_width_1', + kind: 'variable', + source_line: 927, + type_signature: 'StyleVariable', + }, + { + name: 'border_width_2', + kind: 'variable', + source_line: 928, + type_signature: 'StyleVariable', + }, + { + name: 'border_width_3', + kind: 'variable', + source_line: 929, + type_signature: 'StyleVariable', + }, + { + name: 'border_width_4', + kind: 'variable', + source_line: 930, + type_signature: 'StyleVariable', + }, + { + name: 'border_width_5', + kind: 'variable', + source_line: 931, + type_signature: 'StyleVariable', + }, + { + name: 'border_width_6', + kind: 'variable', + source_line: 932, + type_signature: 'StyleVariable', + }, + { + name: 'border_width_7', + kind: 'variable', + source_line: 933, + type_signature: 'StyleVariable', + }, + { + name: 'border_width_8', + kind: 'variable', + source_line: 934, + type_signature: 'StyleVariable', + }, + { + name: 'border_width_9', + kind: 'variable', + source_line: 935, + type_signature: 'StyleVariable', + }, + { + name: 'outline_width', + kind: 'variable', + source_line: 936, + type_signature: 'StyleVariable', + }, + { + name: 'outline_width_focus', + kind: 'variable', + source_line: 940, + type_signature: 'StyleVariable', + }, + { + name: 'outline_width_active', + kind: 'variable', + source_line: 945, + type_signature: 'StyleVariable', + }, + { + name: 'outline_style', + kind: 'variable', + source_line: 950, + type_signature: 'StyleVariable', + }, + { + name: 'outline_color', + kind: 'variable', + source_line: 951, + type_signature: 'StyleVariable', + }, + { + name: 'border_radius_xs3', + kind: 'variable', + source_line: 957, + type_signature: 'StyleVariable', + }, + { + name: 'border_radius_xs2', + kind: 'variable', + source_line: 958, + type_signature: 'StyleVariable', + }, + { + name: 'border_radius_xs', + kind: 'variable', + source_line: 959, + type_signature: 'StyleVariable', + }, + { + name: 'border_radius_sm', + kind: 'variable', + source_line: 960, + type_signature: 'StyleVariable', + }, + { + name: 'border_radius_md', + kind: 'variable', + source_line: 961, + type_signature: 'StyleVariable', + }, + { + name: 'border_radius_lg', + kind: 'variable', + source_line: 962, + type_signature: 'StyleVariable', + }, + { + name: 'border_radius_xl', + kind: 'variable', + source_line: 963, + type_signature: 'StyleVariable', + }, + { + name: 'button_shadow', + kind: 'variable', + source_line: 966, + type_signature: 'StyleVariable', + }, + { + name: 'button_shadow_hover', + kind: 'variable', + source_line: 972, + type_signature: 'StyleVariable', + }, + { + name: 'button_shadow_active', + kind: 'variable', + source_line: 978, + type_signature: 'StyleVariable', + }, + { + name: 'input_fill', + kind: 'variable', + source_line: 985, + type_signature: 'StyleVariable', + }, + { + name: 'input_padding_y', + kind: 'variable', + source_line: 986, + type_signature: 'StyleVariable', + }, + { + name: 'input_padding_x', + kind: 'variable', + source_line: 987, + type_signature: 'StyleVariable', + }, + { + name: 'input_width_min', + kind: 'variable', + source_line: 988, + type_signature: 'StyleVariable', + }, + { + name: 'input_height', + kind: 'variable', + source_line: 989, + type_signature: 'StyleVariable', + }, + { + name: 'input_height_sm', + kind: 'variable', + source_line: 990, + type_signature: 'StyleVariable', + }, + { + name: 'input_height_inner', + kind: 'variable', + source_line: 991, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_xs', + kind: 'variable', + source_line: 1011, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_top_xs', + kind: 'variable', + source_line: 1015, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_bottom_xs', + kind: 'variable', + source_line: 1019, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_inset_xs', + kind: 'variable', + source_line: 1023, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_inset_top_xs', + kind: 'variable', + source_line: 1027, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_inset_bottom_xs', + kind: 'variable', + source_line: 1031, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_sm', + kind: 'variable', + source_line: 1035, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_top_sm', + kind: 'variable', + source_line: 1039, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_bottom_sm', + kind: 'variable', + source_line: 1043, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_inset_sm', + kind: 'variable', + source_line: 1047, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_inset_top_sm', + kind: 'variable', + source_line: 1051, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_inset_bottom_sm', + kind: 'variable', + source_line: 1055, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_md', + kind: 'variable', + source_line: 1059, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_top_md', + kind: 'variable', + source_line: 1063, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_bottom_md', + kind: 'variable', + source_line: 1067, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_inset_md', + kind: 'variable', + source_line: 1071, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_inset_top_md', + kind: 'variable', + source_line: 1075, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_inset_bottom_md', + kind: 'variable', + source_line: 1079, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_lg', + kind: 'variable', + source_line: 1083, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_top_lg', + kind: 'variable', + source_line: 1087, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_bottom_lg', + kind: 'variable', + source_line: 1091, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_inset_lg', + kind: 'variable', + source_line: 1095, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_inset_top_lg', + kind: 'variable', + source_line: 1099, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_inset_bottom_lg', + kind: 'variable', + source_line: 1103, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_xl', + kind: 'variable', + source_line: 1107, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_top_xl', + kind: 'variable', + source_line: 1111, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_bottom_xl', + kind: 'variable', + source_line: 1115, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_inset_xl', + kind: 'variable', + source_line: 1119, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_inset_top_xl', + kind: 'variable', + source_line: 1123, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_inset_bottom_xl', + kind: 'variable', + source_line: 1127, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_color', + kind: 'variable', + source_line: 1132, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_color_highlight', + kind: 'variable', + source_line: 1137, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_color_glow', + kind: 'variable', + source_line: 1142, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_color_shroud', + kind: 'variable', + source_line: 1147, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_color_a', + kind: 'variable', + source_line: 1151, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_color_b', + kind: 'variable', + source_line: 1156, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_color_c', + kind: 'variable', + source_line: 1161, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_color_d', + kind: 'variable', + source_line: 1166, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_color_e', + kind: 'variable', + source_line: 1171, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_color_f', + kind: 'variable', + source_line: 1176, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_color_g', + kind: 'variable', + source_line: 1181, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_color_h', + kind: 'variable', + source_line: 1186, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_color_i', + kind: 'variable', + source_line: 1191, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_color_j', + kind: 'variable', + source_line: 1196, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_alpha_1', + kind: 'variable', + source_line: 1202, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_alpha_2', + kind: 'variable', + source_line: 1206, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_alpha_3', + kind: 'variable', + source_line: 1210, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_alpha_4', + kind: 'variable', + source_line: 1214, + type_signature: 'StyleVariable', + }, + { + name: 'shadow_alpha_5', + kind: 'variable', + source_line: 1218, + type_signature: 'StyleVariable', + }, + { + name: 'icon_size_xs', + kind: 'variable', + source_line: 1226, + type_signature: 'StyleVariable', + }, + { + name: 'icon_size_sm', + kind: 'variable', + source_line: 1230, + type_signature: 'StyleVariable', + }, + { + name: 'icon_size_md', + kind: 'variable', + source_line: 1234, + type_signature: 'StyleVariable', + }, + { + name: 'icon_size_lg', + kind: 'variable', + source_line: 1238, + type_signature: 'StyleVariable', + }, + { + name: 'icon_size_xl', + kind: 'variable', + source_line: 1242, + type_signature: 'StyleVariable', + }, + { + name: 'icon_size_xl2', + kind: 'variable', + source_line: 1246, + type_signature: 'StyleVariable', + }, + { + name: 'icon_size_xl3', + kind: 'variable', + source_line: 1250, + type_signature: 'StyleVariable', + }, + { + name: 'duration_1', + kind: 'variable', + source_line: 1258, + type_signature: 'StyleVariable', + }, + { + name: 'duration_2', + kind: 'variable', + source_line: 1259, + type_signature: 'StyleVariable', + }, + { + name: 'duration_3', + kind: 'variable', + source_line: 1260, + type_signature: 'StyleVariable', + }, + { + name: 'duration_4', + kind: 'variable', + source_line: 1261, + type_signature: 'StyleVariable', + }, + { + name: 'duration_5', + kind: 'variable', + source_line: 1262, + type_signature: 'StyleVariable', + }, + { + name: 'duration_6', + kind: 'variable', + source_line: 1263, + type_signature: 'StyleVariable', + }, + { + name: 'disabled_opacity', + kind: 'variable', + source_line: 1265, + type_signature: 'StyleVariable', + }, + { + name: 'default_variables', + kind: 'variable', + doc_comment: + 'These are implicitly the variables for the `base` theme.\nSee also the empty `variables` array of the `base` theme above.', + source_line: 1274, + type_signature: 'StyleVariable[]', + }, + ], + dependencies: ['variable_data.ts'], + dependents: ['theme.ts'], + }, + ], + }, + name: '@ryanatkn/moss', + repo_name: 'moss', + repo_url: 'https://github.com/ryanatkn/moss', + owner_name: 'ryanatkn', + homepage_url: 'https://moss.ryanatkn.com/', + logo_url: 'https://moss.ryanatkn.com/logo.svg', + logo_alt: 'a fuzzy tuft of green moss', + npm_url: 'https://www.npmjs.com/package/@ryanatkn/moss', + changelog_url: 'https://github.com/ryanatkn/moss/blob/main/CHANGELOG.md', + published: true, + }, + check_runs: { + status: 'completed', + conclusion: 'success', + }, + pull_requests: [], + }, + { + library_json: { + package_json: { + name: '@ryanatkn/fuz', + version: '0.165.0', + description: 'Svelte UI library', + motto: 'friendly user zystem', + glyph: '🧶', + logo: 'logo.svg', + logo_alt: 'a friendly brown spider facing you', + public: true, + license: 'MIT', + homepage: 'https://www.fuz.dev/', + author: { + name: 'Ryan Atkinson', + email: 'mail@ryanatkn.com', + url: 'https://www.ryanatkn.com/', + }, + repository: { + type: 'git', + url: 'git+https://github.com/ryanatkn/fuz.git', + }, + bugs: 'https://github.com/ryanatkn/fuz/issues', + funding: 'https://www.ryanatkn.com/funding', + scripts: { + start: 'gro dev', + dev: 'gro dev', + build: 'gro build', + check: 'gro check', + test: 'gro test', + preview: 'vite preview', + deploy: 'gro deploy', + }, + type: 'module', + engines: { + node: '>=22.15', + }, + peerDependencies: { + '@ryanatkn/belt': '>=0.40.0', + '@ryanatkn/fuz_code': '>=0.36.0', + '@ryanatkn/gro': '>=0.179.0', + '@ryanatkn/moss': '>=0.39.0', + '@sveltejs/kit': '^2.47.3', + 'esm-env': '^1', + svelte: '^5', + svelte2tsx: '^0.7.45', + zod: '^4.1.12', + }, + peerDependenciesMeta: { + '@ryanatkn/fuz_code': { + optional: true, + }, + '@ryanatkn/gro': { + optional: true, + }, + 'esm-env': { + optional: true, + }, + }, + devDependencies: { + '@changesets/changelog-git': '^0.2.1', + '@ryanatkn/belt': '^0.40.0', + '@ryanatkn/eslint-config': '^0.9.0', + '@ryanatkn/fuz_code': '^0.36.0', + '@ryanatkn/gro': '^0.179.0', + '@ryanatkn/moss': '^0.39.0', + '@sveltejs/adapter-static': '^3.0.10', + '@sveltejs/kit': '^2.49.0', + '@sveltejs/package': '^2.5.6', + '@sveltejs/vite-plugin-svelte': '^6.2.1', + '@types/node': '^24.10.1', + eslint: '^9.39.1', + 'eslint-plugin-svelte': '^3.13.0', + 'esm-env': '^1.2.2', + jsdom: '^27.2.0', + prettier: '^3.6.2', + 'prettier-plugin-svelte': '^3.4.0', + svelte: '^5.44.1', + 'svelte-check': '^4.3.4', + svelte2tsx: '^0.7.45', + tslib: '^2.8.1', + typescript: '^5.9.3', + 'typescript-eslint': '^8.48.0', + vitest: '^4.0.14', + zod: '^4.1.13', + }, + prettier: { + plugins: ['prettier-plugin-svelte'], + useTabs: true, + printWidth: 100, + singleQuote: true, + bracketSpacing: false, + overrides: [ + { + files: 'package.json', + options: { + useTabs: false, + }, + }, + ], + }, + sideEffects: ['**/*.css'], + files: ['dist', 'src/lib/**/*.ts', '!src/lib/**/*.test.*', '!dist/**/*.test.*'], + exports: { + './package.json': './package.json', + './*.js': { + types: './dist/*.d.ts', + default: './dist/*.js', + }, + './*.ts': { + types: './dist/*.d.ts', + default: './dist/*.js', + }, + './*.svelte': { + types: './dist/*.svelte.d.ts', + svelte: './dist/*.svelte', + default: './dist/*.svelte', + }, + }, + }, + source_json: { + name: '@ryanatkn/fuz', + version: '0.165.0', + modules: [ + { + path: 'Alert.svelte', + declarations: [ + { + name: 'Alert', + kind: 'component', + doc_comment: '', + see_also: ['https://www.w3.org/WAI/ARIA/apg/patterns/alert/'], + props: [ + { + name: 'status', + type: 'AlertStatus', + optional: true, + }, + { + name: 'color', + type: 'string', + optional: true, + }, + { + name: 'onclick', + type: '(() => void) | undefined', + optional: true, + }, + { + name: 'disabled', + type: 'boolean', + optional: true, + }, + { + name: 'attrs', + type: 'HTMLAttributes | undefined', + optional: true, + }, + { + name: 'icon', + type: 'string | Snippet<[icon: string]> | null | undefined', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['alert.ts'], + }, + { + path: 'alert.ts', + declarations: [ + { + name: 'AlertStatus', + kind: 'type', + source_line: 3, + type_signature: 'AlertStatus', + }, + { + name: 'AlertStatusOptions', + kind: 'type', + source_line: 5, + type_signature: 'AlertStatusOptions', + properties: [ + { + name: 'color', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'icon', + kind: 'variable', + type_signature: 'string | null', + }, + ], + }, + { + name: 'alert_status_options', + kind: 'variable', + source_line: 10, + type_signature: 'Record', + }, + ], + dependents: ['Alert.svelte'], + }, + { + path: 'api_search.svelte.ts', + declarations: [ + { + name: 'DeclarationSearchState', + kind: 'type', + source_line: 4, + type_signature: 'DeclarationSearchState', + properties: [ + { + name: 'query', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'all', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'filtered', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'create_declaration_search', + kind: 'function', + doc_comment: + 'Creates search state for the API index page (all declarations across all modules).', + source_line: 13, + type_signature: '(library: Library): DeclarationSearchState', + return_type: 'DeclarationSearchState', + parameters: [ + { + name: 'library', + type: 'Library', + optional: false, + }, + ], + }, + { + name: 'create_module_declaration_search', + kind: 'function', + doc_comment: 'Creates search state for module-specific declaration lists.', + source_line: 42, + type_signature: '(declarations: Declaration[]): DeclarationSearchState', + return_type: 'DeclarationSearchState', + parameters: [ + { + name: 'declarations', + type: 'Declaration[]', + optional: false, + }, + ], + }, + ], + dependents: ['ApiIndex.svelte', 'ApiModule.svelte'], + }, + { + path: 'ApiDeclarationList.svelte', + declarations: [ + { + name: 'ApiDeclarationList', + kind: 'component', + props: [ + { + name: 'declarations', + type: 'Array', + optional: false, + }, + { + name: 'search_query', + type: 'string', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: [ + 'DeclarationDetail.svelte', + 'TomeSection.svelte', + 'TomeSectionHeader.svelte', + ], + dependents: ['ApiIndex.svelte', 'ApiModule.svelte'], + }, + { + path: 'ApiIndex.svelte', + declarations: [ + { + name: 'ApiIndex', + kind: 'component', + props: [ + { + name: 'library', + type: 'Library', + optional: true, + description: + 'The library instance to render API docs for.\nDefaults to getting from library_context.', + }, + { + name: 'tome', + type: 'Tome', + optional: true, + description: + "The tome for the API docs page.\nDefaults to looking up the 'api' tome.", + }, + { + name: 'minimal', + type: 'boolean', + optional: true, + description: + 'Whether to show minimal content (just a link to full API docs).\nUsed when the API index is shown on a parent docs page.', + }, + ], + source_line: 1, + }, + ], + dependencies: [ + 'ApiDeclarationList.svelte', + 'DocsSearch.svelte', + 'TomeContent.svelte', + 'TomeLink.svelte', + 'TomeSection.svelte', + 'TomeSectionHeader.svelte', + 'api_search.svelte.ts', + 'library.svelte.ts', + 'tome.ts', + ], + }, + { + path: 'ApiModule.svelte', + declarations: [ + { + name: 'ApiModule', + kind: 'component', + props: [ + { + name: 'module_path', + type: 'string | Array', + optional: false, + description: + 'The module path parameter from the route (e.g., "lib/Button.svelte").', + }, + { + name: 'library', + type: 'Library', + optional: true, + description: + 'The library instance to render API docs for.\nDefaults to getting from library_context.', + }, + { + name: 'tome', + type: 'Tome', + optional: true, + description: + "The tome for the API docs page.\nDefaults to looking up the 'api' tome.", + }, + ], + source_line: 1, + }, + ], + dependencies: [ + 'ApiDeclarationList.svelte', + 'DocsSearch.svelte', + 'Mdz.svelte', + 'ModuleLink.svelte', + 'TomeContent.svelte', + 'TomeSection.svelte', + 'TomeSectionHeader.svelte', + 'api_search.svelte.ts', + 'library.svelte.ts', + 'tome.ts', + ], + }, + { + path: 'Breadcrumb.svelte', + declarations: [ + { + name: 'Breadcrumb', + kind: 'component', + props: [ + { + name: 'path', + type: 'string | undefined', + optional: true, + description: 'Prefixed with a slash and relative to the base path.', + }, + { + name: 'selected_path', + type: 'string | null | undefined', + optional: true, + description: + 'Prefixed with a slash and relative to the base path.\n`null` means none and `undefined` is detected from the current url.', + }, + { + name: 'base_path', + type: 'string', + optional: true, + description: + 'Sets a custom base path of `path` and `selected_path`.\nDefaults to `base` from `$app/paths`.', + }, + { + name: 'separator', + type: 'Snippet', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependents: ['Docs.svelte', 'DocsPrimaryNav.svelte'], + }, + { + path: 'Card.svelte', + declarations: [ + { + name: 'Card', + kind: 'component', + props: [ + { + name: 'tag', + type: 'string | undefined', + optional: true, + }, + { + name: 'href', + type: 'string | undefined', + optional: true, + }, + { + name: 'align', + type: "'left' | 'right' | 'above' | 'below'", + optional: true, + }, + { + name: 'attrs', + type: 'any', + optional: true, + }, + { + name: 'icon', + type: 'string | Snippet', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + }, + { + path: 'ColorSchemeInput.svelte', + declarations: [ + { + name: 'ColorSchemeInput', + kind: 'component', + props: [ + { + name: 'value', + type: '{color_scheme: ColorScheme}', + optional: true, + }, + { + name: 'onchange', + type: '(color_scheme: ColorScheme) => void', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['themer.svelte.ts'], + }, + { + path: 'constants.ts', + declarations: [ + { + name: 'MAIN_HEADER_MARGIN_TOP', + kind: 'variable', + source_line: 3, + type_signature: '"calc(60px + var(--space_lg))"', + }, + ], + }, + { + path: 'context_helpers.ts', + declarations: [ + { + name: 'create_context', + kind: 'function', + doc_comment: + "Wraps Svelte's `setContext` and `getContext` for better ergonomics.\nWhen no value is set in the context,\n`get` throws an error and `get_maybe` returns `undefined`.\nIf a `fallback` is provided, the `value` argument to `set` is optional\nand `get_maybe` is omitted from the type.", + source_line: 18, + type_signature: + '(fallback: () => T): { get: () => T; set: (value?: T | undefined) => T; }', + return_type: '{ get: () => T; set: (value?: T | undefined) => T; }', + parameters: [ + { + name: 'fallback', + type: '() => T', + optional: false, + }, + ], + generic_params: [ + { + name: 'T', + }, + ], + }, + ], + dependents: [ + 'TomeSection.svelte', + 'contextmenu_state.svelte.ts', + 'docs_helpers.svelte.ts', + 'library.svelte.ts', + 'mdz_components.ts', + 'themer.svelte.ts', + 'tome.ts', + ], + }, + { + path: 'contextmenu_helpers.ts', + declarations: [ + { + name: 'CONTEXTMENU_DEFAULT_OPEN_OFFSET_X', + kind: 'variable', + source_line: 6, + type_signature: '-2', + }, + { + name: 'CONTEXTMENU_DEFAULT_OPEN_OFFSET_Y', + kind: 'variable', + source_line: 7, + type_signature: '-2', + }, + { + name: 'CONTEXTMENU_DEFAULT_BYPASS_WINDOW', + kind: 'variable', + source_line: 8, + type_signature: '750', + }, + { + name: 'CONTEXTMENU_DEFAULT_BYPASS_MOVE_TOLERANCE', + kind: 'variable', + source_line: 9, + type_signature: '11', + }, + { + name: 'CONTEXTMENU_DEFAULT_LONGPRESS_DURATION', + kind: 'variable', + source_line: 10, + type_signature: '633', + }, + { + name: 'CONTEXTMENU_DEFAULT_LONGPRESS_MOVE_TOLERANCE', + kind: 'variable', + source_line: 11, + type_signature: '21', + }, + { + name: 'contextmenu_is_valid_target', + kind: 'function', + doc_comment: + 'Returns true if valid and narrows the type to HTMLElement | SVGElement.', + source_line: 16, + type_signature: + '(target: EventTarget | null, shiftKey: boolean): target is HTMLElement | SVGElement', + return_type: 'boolean', + parameters: [ + { + name: 'target', + type: 'EventTarget | null', + optional: false, + }, + { + name: 'shiftKey', + type: 'boolean', + optional: false, + }, + ], + }, + { + name: 'contextmenu_create_keyboard_handlers', + kind: 'function', + source_line: 27, + type_signature: '(contextmenu: ContextmenuState): Map void>', + return_type: 'Map void>', + parameters: [ + { + name: 'contextmenu', + type: 'ContextmenuState', + optional: false, + }, + ], + }, + { + name: 'contextmenu_create_keydown_handler', + kind: 'function', + source_line: 42, + type_signature: + '(keyboard_handlers: Map void>): (e: KeyboardEvent) => void', + return_type: '(e: KeyboardEvent) => void', + parameters: [ + { + name: 'keyboard_handlers', + type: 'Map void>', + optional: false, + }, + ], + }, + { + name: 'contextmenu_calculate_constrained_x', + kind: 'function', + source_line: 53, + type_signature: + '(menu_x: number, menu_width: number, layout_width: number): number', + return_type: 'number', + parameters: [ + { + name: 'menu_x', + type: 'number', + optional: false, + }, + { + name: 'menu_width', + type: 'number', + optional: false, + }, + { + name: 'layout_width', + type: 'number', + optional: false, + }, + ], + }, + { + name: 'contextmenu_calculate_constrained_y', + kind: 'function', + source_line: 59, + type_signature: + '(menu_y: number, menu_height: number, layout_height: number): number', + return_type: 'number', + parameters: [ + { + name: 'menu_y', + type: 'number', + optional: false, + }, + { + name: 'menu_height', + type: 'number', + optional: false, + }, + { + name: 'layout_height', + type: 'number', + optional: false, + }, + ], + }, + ], + dependents: ['ContextmenuRoot.svelte', 'ContextmenuRootForSafariCompatibility.svelte'], + }, + { + path: 'contextmenu_state.svelte.ts', + declarations: [ + { + name: 'ContextmenuParams', + kind: 'type', + source_line: 13, + type_signature: 'ContextmenuParams', + }, + { + name: 'ContextmenuActivateResult', + kind: 'type', + source_line: 20, + type_signature: 'ContextmenuActivateResult', + }, + { + name: 'ItemState', + kind: 'type', + source_line: 25, + type_signature: 'ItemState', + }, + { + name: 'EntryState', + kind: 'class', + source_line: 27, + members: [ + { + name: 'is_menu', + kind: 'variable', + modifiers: ['readonly'], + }, + { + name: 'menu', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'SubmenuState | RootMenuState', + }, + { + name: 'run', + kind: 'variable', + modifiers: ['readonly'], + type_signature: '() => ContextmenuRun', + }, + { + name: 'disabled', + kind: 'variable', + modifiers: ['readonly'], + type_signature: '() => boolean', + }, + { + name: 'selected', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'pending', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'error_message', + kind: 'variable', + type_signature: 'string | null', + }, + { + name: 'promise', + kind: 'variable', + type_signature: 'Promise | null', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: + '(menu: SubmenuState | RootMenuState, run: () => ContextmenuRun, disabled?: () => boolean): EntryState', + parameters: [ + { + name: 'menu', + type: 'SubmenuState | RootMenuState', + optional: false, + }, + { + name: 'run', + type: '() => ContextmenuRun', + optional: false, + }, + { + name: 'disabled', + type: '() => boolean', + optional: false, + default_value: '() => false', + }, + ], + }, + ], + }, + { + name: 'SubmenuState', + kind: 'class', + source_line: 50, + members: [ + { + name: 'is_menu', + kind: 'variable', + modifiers: ['readonly'], + }, + { + name: 'menu', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'SubmenuState | RootMenuState', + }, + { + name: 'depth', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'number', + }, + { + name: 'selected', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'items', + kind: 'variable', + type_signature: 'ReadonlyArray', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: + '(menu: SubmenuState | RootMenuState, depth: number): SubmenuState', + parameters: [ + { + name: 'menu', + type: 'SubmenuState | RootMenuState', + optional: false, + }, + { + name: 'depth', + type: 'number', + optional: false, + }, + ], + }, + ], + }, + { + name: 'RootMenuState', + kind: 'class', + source_line: 64, + members: [ + { + name: 'is_menu', + kind: 'variable', + modifiers: ['readonly'], + }, + { + name: 'menu', + kind: 'variable', + modifiers: ['readonly'], + }, + { + name: 'depth', + kind: 'variable', + modifiers: ['readonly'], + }, + { + name: 'items', + kind: 'variable', + type_signature: 'ReadonlyArray', + }, + ], + }, + { + name: 'ContextmenuRun', + kind: 'type', + source_line: 72, + type_signature: 'ContextmenuRun', + }, + { + name: 'ContextmenuStateOptions', + kind: 'type', + source_line: 74, + type_signature: 'ContextmenuStateOptions', + properties: [ + { + name: 'layout', + kind: 'variable', + type_signature: 'Dimensions', + }, + ], + }, + { + name: 'ContextmenuState', + kind: 'class', + doc_comment: + 'Creates a `contextmenu` store.\nSee usage with `ContextmenuRoot.svelte` and `Contextmenu.svelte`.', + see_also: [ + 'https://developer.mozilla.org/en-US/docs/Web/API/Element/contextmenu_event', + ], + source_line: 84, + members: [ + { + name: 'layout', + kind: 'variable', + type_signature: 'Dimensions', + }, + { + name: 'has_custom_layout', + kind: 'variable', + modifiers: ['readonly'], + doc_comment: + 'If an initial layout is provided, control is deferred externally.\nOtherwise the layout syncs to the page dimensions.', + type_signature: 'boolean', + }, + { + name: 'opened', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'x', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'y', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'params', + kind: 'variable', + type_signature: 'ReadonlyArray', + }, + { + name: 'error', + kind: 'variable', + type_signature: 'string | undefined', + }, + { + name: 'root_menu', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'RootMenuState', + }, + { + name: 'selections', + kind: 'variable', + type_signature: 'ReadonlyArray', + }, + { + name: 'can_collapse', + kind: 'variable', + }, + { + name: 'can_expand', + kind: 'variable', + }, + { + name: 'can_select_next', + kind: 'variable', + }, + { + name: 'can_select_previous', + kind: 'variable', + }, + { + name: 'can_activate', + kind: 'variable', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: '(options?: ContextmenuStateOptions): ContextmenuState', + parameters: [ + { + name: 'options', + type: 'ContextmenuStateOptions', + optional: false, + default_value: 'EMPTY_OBJECT', + }, + ], + }, + { + name: 'open', + kind: 'function', + type_signature: '(params: ContextmenuParams[], x: number, y: number): void', + return_type: 'void', + parameters: [ + { + name: 'params', + type: 'ContextmenuParams[]', + optional: false, + }, + { + name: 'x', + type: 'number', + optional: false, + }, + { + name: 'y', + type: 'number', + optional: false, + }, + ], + }, + { + name: 'close', + kind: 'function', + type_signature: '(): void', + return_type: 'void', + parameters: [], + }, + { + name: 'reset_items', + kind: 'function', + type_signature: '(items: readonly ItemState[]): void', + return_type: 'void', + parameters: [ + { + name: 'items', + type: 'readonly ItemState[]', + optional: false, + }, + ], + }, + { + name: 'activate', + kind: 'function', + type_signature: + '(item: ItemState): boolean | Promise', + return_type: 'boolean | Promise', + parameters: [ + { + name: 'item', + type: 'ItemState', + optional: false, + }, + ], + }, + { + name: 'activate_selected', + kind: 'function', + type_signature: '(): boolean | void | Promise', + return_type: 'boolean | void | Promise', + parameters: [], + }, + { + name: 'select', + kind: 'function', + doc_comment: 'Activates the selected entry, or if none, selects the first.', + type_signature: '(item: ItemState): void', + return_type: 'void', + parameters: [ + { + name: 'item', + type: 'ItemState', + optional: false, + }, + ], + }, + { + name: 'collapse_selected', + kind: 'function', + type_signature: '(): void', + return_type: 'void', + parameters: [], + }, + { + name: 'expand_selected', + kind: 'function', + type_signature: '(): void', + return_type: 'void', + parameters: [], + }, + { + name: 'select_next', + kind: 'function', + type_signature: '(): void', + return_type: 'void', + parameters: [], + }, + { + name: 'select_previous', + kind: 'function', + type_signature: '(): void', + return_type: 'void', + parameters: [], + }, + { + name: 'select_first', + kind: 'function', + type_signature: '(): void', + return_type: 'void', + parameters: [], + }, + { + name: 'select_last', + kind: 'function', + type_signature: '(): void', + return_type: 'void', + parameters: [], + }, + { + name: 'add_entry', + kind: 'function', + doc_comment: 'Used by `ContextmenuEntry` and custom entry components', + type_signature: + '(run: () => ContextmenuRun, disabled?: () => boolean): EntryState', + return_type: 'EntryState', + parameters: [ + { + name: 'run', + type: '() => ContextmenuRun', + optional: false, + }, + { + name: 'disabled', + type: '() => boolean', + optional: false, + default_value: '() => false', + }, + ], + }, + { + name: 'add_submenu', + kind: 'function', + doc_comment: '', + type_signature: '(): SubmenuState', + return_type: 'SubmenuState', + parameters: [], + }, + ], + }, + { + name: 'contextmenu_attachment', + kind: 'function', + doc_comment: + 'Creates an attachment that sets up contextmenu behavior on an element.', + source_line: 349, + type_signature: + '>(params: U | null | undefined): Attachment', + return_type: 'Attachment', + parameters: [ + { + name: 'params', + type: 'U | null | undefined', + optional: false, + description: 'Contextmenu parameters or nullish to disable', + }, + ], + }, + { + name: 'ContextmenuOpenOptions', + kind: 'type', + source_line: 373, + type_signature: 'ContextmenuOpenOptions', + properties: [ + { + name: 'link_enabled', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'text_enabled', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'separator_enabled', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'vibrate', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'contextmenu_open', + kind: 'function', + doc_comment: + 'Opens the contextmenu, if appropriate,\nquerying the menu items from the DOM starting at the event target.', + source_line: 390, + type_signature: + '(target: HTMLElement | SVGElement, x: number, y: number, contextmenu: ContextmenuState, options?: ContextmenuOpenOptions | undefined): boolean', + return_type: 'boolean', + return_description: 'a boolean indicating if the menu was opened or not', + parameters: [ + { + name: 'target', + type: 'HTMLElement | SVGElement', + optional: false, + description: 'the leaf element from which to open the contextmenu', + }, + { + name: 'x', + type: 'number', + optional: false, + description: + 'the page X coordinate at which to open the contextmenu, typically the mouse `pageX`', + }, + { + name: 'y', + type: 'number', + optional: false, + description: + 'the page Y coordinate at which to open the contextmenu, typically the mouse `pageY`', + }, + { + name: 'contextmenu', + type: 'ContextmenuState', + optional: false, + description: 'the contextmenu store', + }, + { + name: 'options', + type: 'ContextmenuOpenOptions | undefined', + optional: true, + description: 'optional configuration for filtering entries and haptic feedback', + }, + ], + }, + { + name: 'contextmenu_context', + kind: 'variable', + source_line: 477, + type_signature: + '{ get: (error_message?: string | undefined) => ContextmenuState; get_maybe: () => ContextmenuState | undefined; set: (value: ContextmenuState) => ContextmenuState; }', + }, + { + name: 'contextmenu_submenu_context', + kind: 'variable', + source_line: 479, + type_signature: + '{ get: (error_message?: string | undefined) => SubmenuState; get_maybe: () => SubmenuState | undefined; set: (value: SubmenuState) => SubmenuState; }', + }, + { + name: 'contextmenu_dimensions_context', + kind: 'variable', + source_line: 481, + type_signature: + '{ get: () => Dimensions; set: (value?: Dimensions | undefined) => Dimensions; }', + }, + { + name: 'contextmenu_check_global_root', + kind: 'function', + doc_comment: + 'Registers a contextmenu root and warns if multiple non-scoped roots are detected.\nOnly active in development mode. Automatically handles cleanup on unmount.', + source_line: 492, + type_signature: '(get_scoped: () => boolean): void', + return_type: 'void', + parameters: [ + { + name: 'get_scoped', + type: '() => boolean', + optional: false, + description: 'Getter function that returns the current scoped value', + }, + ], + }, + ], + dependencies: ['context_helpers.ts', 'dimensions.svelte.ts', 'library_helpers.ts'], + dependents: [ + 'Contextmenu.svelte', + 'ContextmenuEntry.svelte', + 'ContextmenuLinkEntry.svelte', + 'ContextmenuRoot.svelte', + 'ContextmenuRootForSafariCompatibility.svelte', + 'ContextmenuSubmenu.svelte', + 'DeclarationLink.svelte', + 'ModuleLink.svelte', + ], + }, + { + path: 'Contextmenu.svelte', + declarations: [ + { + name: 'Contextmenu', + kind: 'component', + source_line: 1, + }, + ], + dependencies: ['contextmenu_state.svelte.ts'], + }, + { + path: 'ContextmenuEntry.svelte', + declarations: [ + { + name: 'ContextmenuEntry', + kind: 'component', + props: [ + { + name: 'run', + type: 'ContextmenuRun', + optional: false, + }, + { + name: 'icon', + type: 'string | Snippet', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: false, + }, + { + name: 'disabled', + type: 'boolean', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['PendingAnimation.svelte', 'contextmenu_state.svelte.ts'], + dependents: ['ContextmenuTextEntry.svelte'], + }, + { + path: 'ContextmenuLinkEntry.svelte', + declarations: [ + { + name: 'ContextmenuLinkEntry', + kind: 'component', + props: [ + { + name: 'href', + type: 'string', + optional: false, + }, + { + name: 'icon', + type: 'string | Snippet', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: true, + }, + { + name: 'disabled', + type: 'boolean', + optional: true, + }, + { + name: 'external_rel', + type: 'string', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['contextmenu_state.svelte.ts'], + dependents: ['ContextmenuRoot.svelte', 'ContextmenuRootForSafariCompatibility.svelte'], + }, + { + path: 'ContextmenuRoot.svelte', + declarations: [ + { + name: 'ContextmenuRoot', + kind: 'component', + doc_comment: + "Touch event handler for tap-then-longpress bypass detection.\n\nThis allows users to access the native context menu by performing a tap\nfollowed by a longpress/rightclick within a specified time window.\nThe bypass gesture is useful for accessing browser features like text selection\nor the native context menu when the Fuz contextmenu would normally override it.\n\nNote: preventDefault is not called as we're only observing touch patterns,\nnot intercepting them. The actual bypass happens in on_window_contextmenu.", + props: [ + { + name: 'contextmenu', + type: 'ContextmenuState', + optional: true, + description: + "The `contextmenu` prop is not reactive because that's a rare corner case and\nit's easier to put the `contextmenu` directly in the context\nrather than wrapping with a store or other reactivity.\nIf you need to change the contextmenu prop for some reason, use a `{#key contextmenu}` block:\nhttps://svelte.dev/docs#template-syntax-key", + }, + { + name: 'open_offset_x', + type: 'number', + optional: true, + description: + 'The number of pixels to offset from the pointer X position when opened.\nUseful to ensure the first menu item is immediately under the pointer.', + }, + { + name: 'open_offset_y', + type: 'number', + optional: true, + description: + 'The number of pixels to offset from the pointer Y position when opened.\nUseful to ensure the first menu item is immediately under the pointer.', + }, + { + name: 'bypass_with_tap_then_longpress', + type: 'boolean', + optional: true, + description: + 'Whether to detect tap-then-longpress to bypass the Fuz contextmenu.\nThis allows access to the system contextmenu by tapping once then rightclicking/long-pressing.\nSetting to `false` disables the gesture.', + }, + { + name: 'bypass_window', + type: 'number', + optional: true, + description: + "The number of milliseconds between taps to detect a gesture that bypasses the Fuz contextmenu.\nUsed only when `bypass_with_tap_then_longpress` is true.\nIf the duration is too long, it'll detect more false positives and interrupt normal usage,\nbut too short and some people will have difficulty performing the gesture.", + }, + { + name: 'bypass_move_tolerance', + type: 'number', + optional: true, + description: + 'The number of pixels the pointer can be moved between taps to detect a tap-then-longpress.\nUsed only when `bypass_with_tap_then_longpress` is true.', + }, + { + name: 'scoped', + type: 'boolean', + optional: true, + description: + 'If `true`, wraps `children` with a div and listens to events on it instead of the window.', + }, + { + name: 'link_entry', + type: 'Snippet<[ComponentProps]> | null', + optional: true, + description: + 'Snippet for rendering link entries.\nSet to `null` to disable automatic link detection.\nDefaults to `link_entry_default` which renders `ContextmenuLinkEntry`.', + }, + { + name: 'text_entry', + type: 'Snippet<[ComponentProps]> | null', + optional: true, + description: + 'Snippet for rendering copy text entries.\nSet to `null` to disable automatic copy text detection.\nDefaults to `text_entry_default` which renders `ContextmenuTextEntry`.', + }, + { + name: 'separator_entry', + type: 'Snippet<[ComponentProps]> | null', + optional: true, + description: + 'Snippet for rendering separator entries.\nSet to `null` to disable automatic separator rendering.\nDefaults to `separator_entry_default` which renders `ContextmenuSeparator`.', + }, + { + name: 'children', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: [ + 'ContextmenuLinkEntry.svelte', + 'ContextmenuSeparator.svelte', + 'ContextmenuTextEntry.svelte', + 'contextmenu_helpers.ts', + 'contextmenu_state.svelte.ts', + ], + }, + { + path: 'ContextmenuRootForSafariCompatibility.svelte', + declarations: [ + { + name: 'ContextmenuRootForSafariCompatibility', + kind: 'component', + doc_comment: + "Blocks the next click event. Set to true when a longpress completes to prevent\niOS's synthesized click from activating the first menu item.", + props: [ + { + name: 'contextmenu', + type: 'ContextmenuState', + optional: true, + description: + "The `contextmenu` prop is not reactive because that's a rare corner case and\nit's easier to put the `contextmenu` directly in the context\nrather than wrapping with a store or other reactivity.\nIf you need to change the contextmenu prop for some reason, use a `{#key contextmenu}` block:\nhttps://svelte.dev/docs#template-syntax-key", + }, + { + name: 'longpress_move_tolerance', + type: 'number', + optional: true, + description: + 'The number of pixels the pointer can be moved without canceling `longpress`.', + }, + { + name: 'longpress_duration', + type: 'number', + optional: true, + description: + 'The number of milliseconds after a touch starts before opening the Fuz contextmenu.', + }, + { + name: 'bypass_with_tap_then_longpress', + type: 'boolean', + optional: true, + description: + 'Whether to detect tap-then-longpress to bypass the Fuz contextmenu.\nThis allows access to the system contextmenu by tapping once then long-pressing.\nSetting to `false` disables the gesture.', + }, + { + name: 'bypass_window', + type: 'number', + optional: true, + description: + "The number of milliseconds between taps to detect a gesture that bypasses the Fuz contextmenu.\nUsed only when `bypass_with_tap_then_longpress` is true.\nIf the duration is too long, it'll detect more false positives and interrupt normal usage,\nbut too short and some people will have difficulty performing the gesture.", + }, + { + name: 'bypass_move_tolerance', + type: 'number', + optional: true, + description: + 'The number of pixels the pointer can be moved between taps to detect a tap-then-longpress.\nUsed only when `bypass_with_tap_then_longpress` is true.', + }, + { + name: 'open_offset_x', + type: 'number', + optional: true, + description: + 'The number of pixels to offset from the pointer X position when opened.\nUseful to ensure the first menu item is immediately under the pointer.', + }, + { + name: 'open_offset_y', + type: 'number', + optional: true, + description: + 'The number of pixels to offset from the pointer Y position when opened.\nUseful to ensure the first menu item is immediately under the pointer.', + }, + { + name: 'scoped', + type: 'boolean', + optional: true, + description: + 'If `true`, wraps `children` with a div and listens to events on it instead of the window.', + }, + { + name: 'link_entry', + type: 'Snippet<[ComponentProps]> | null', + optional: true, + description: + 'Snippet for rendering link entries.\nSet to `null` to disable automatic link detection.\nDefaults to `link_entry_default` which renders `ContextmenuLinkEntry`.', + }, + { + name: 'text_entry', + type: 'Snippet<[ComponentProps]> | null', + optional: true, + description: + 'Snippet for rendering copy text entries.\nSet to `null` to disable automatic copy text detection.\nDefaults to `text_entry_default` which renders `ContextmenuTextEntry`.', + }, + { + name: 'separator_entry', + type: 'Snippet<[ComponentProps]> | null', + optional: true, + description: + 'Snippet for rendering separator entries.\nSet to `null` to disable automatic separator rendering.\nDefaults to `separator_entry_default` which renders `ContextmenuSeparator`.', + }, + { + name: 'children', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: [ + 'ContextmenuLinkEntry.svelte', + 'ContextmenuSeparator.svelte', + 'ContextmenuTextEntry.svelte', + 'contextmenu_helpers.ts', + 'contextmenu_state.svelte.ts', + ], + }, + { + path: 'ContextmenuSeparator.svelte', + declarations: [ + { + name: 'ContextmenuSeparator', + kind: 'component', + source_line: 1, + }, + ], + dependents: ['ContextmenuRoot.svelte', 'ContextmenuRootForSafariCompatibility.svelte'], + }, + { + path: 'ContextmenuSubmenu.svelte', + declarations: [ + { + name: 'ContextmenuSubmenu', + kind: 'component', + props: [ + { + name: 'icon', + type: 'Snippet', + optional: true, + }, + { + name: 'menu', + type: 'Snippet', + optional: false, + }, + { + name: 'children', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['contextmenu_state.svelte.ts'], + }, + { + path: 'ContextmenuTextEntry.svelte', + declarations: [ + { + name: 'ContextmenuTextEntry', + kind: 'component', + props: [ + { + name: 'run', + type: 'ContextmenuRun', + optional: false, + }, + { + name: 'content', + type: 'string', + optional: false, + }, + { + name: 'icon', + type: 'string', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['ContextmenuEntry.svelte'], + dependents: ['ContextmenuRoot.svelte', 'ContextmenuRootForSafariCompatibility.svelte'], + }, + { + path: 'CopyToClipboard.svelte', + declarations: [ + { + name: 'CopyToClipboard', + kind: 'component', + props: [ + { + name: 'text', + type: 'string | null', + optional: false, + }, + { + name: 'copied_display_duration', + type: 'number', + optional: true, + }, + { + name: 'allow_copying_empty_string', + type: 'boolean', + optional: true, + }, + { + name: 'icon_button', + type: 'boolean', + optional: true, + description: 'Defaults to `true`, ignored if `children` is provided.', + }, + { + name: 'oncopy', + type: '(text: string | null, e: MouseEvent) => void', + optional: true, + }, + { + name: 'children', + type: 'Snippet<[copied: boolean, failed: boolean]>', + optional: true, + }, + ], + source_line: 1, + }, + ], + }, + { + path: 'csp_of_ryanatkn.ts', + declarations: [ + { + name: 'csp_trusted_sources_of_ryanatkn', + kind: 'variable', + doc_comment: 'Trusted sources owned by ryanatkn.', + source_line: 6, + type_signature: 'CspSourceSpec[]', + }, + ], + }, + { + path: 'csp.ts', + declarations: [ + { + name: 'create_csp_directives', + kind: 'function', + doc_comment: + "This is designed for compatibility with SvelteKit\nand maps to the `KitConfig` `directives` option.\nThe goal is to provide an ergonomic, modern, and safe API\nfor Content Security Policy (CSP) creation\nthat's simple to write and audit, and isn't error-prone.\n\nThings like validation and rendering to a string\nare out of scope and left to SvelteKit.", + source_line: 60, + type_signature: '(options?: CreateCspDirectivesOptions): CspDirectives', + return_type: 'CspDirectives', + parameters: [ + { + name: 'options', + type: 'CreateCspDirectivesOptions', + optional: false, + default_value: '{}', + }, + ], + }, + { + name: 'CreateCspDirectivesOptions', + kind: 'type', + source_line: 5, + type_signature: 'CreateCspDirectivesOptions', + properties: [ + { + name: 'directives', + kind: 'variable', + type_signature: + '{\n\t\t[K in CspDirective]?:\n\t\t\t| CspDirectiveValue // Static value replacement\n\t\t\t| null // Removes the directive\n\t\t\t// Transform function returning one of the previous types\n\t\t\t| ((value: CspDirectiveValue) => CspDirectiveValue | null);\n\t}', + doc_comment: + 'Override or transform specific directives.\nReturning `null` or `undefined` from a transform function will remove the directive.', + }, + { + name: 'trusted_sources', + kind: 'variable', + type_signature: 'Array', + doc_comment: 'Sources to include based on their trust levels.', + }, + { + name: 'value_defaults', + kind: 'variable', + type_signature: 'Partial', + doc_comment: + 'Override default values for specific directives,\nmerging with `value_defaults_base` (or replacing if that directive is null in the base).', + }, + { + name: 'value_defaults_base', + kind: 'variable', + type_signature: 'Partial | null', + doc_comment: + 'Base values for directive defaults.\nSet to `null` or `{}` to start with no defaults.\nDefaults to `csp_directive_value_defaults`.', + }, + { + name: 'required_trust_defaults', + kind: 'variable', + type_signature: 'Partial', + doc_comment: + 'Override trust requirements for specific directives,\nmerging with `required_trust_defaults_base` (or replacing if that directive is null in the base).', + }, + { + name: 'required_trust_defaults_base', + kind: 'variable', + type_signature: 'Partial | null', + doc_comment: + 'Base values for directive trust requirements.\nSet to `null` or `{}` to start with no trust requirements.\nDefaults to `csp_directive_required_trust_defaults`.', + }, + ], + }, + { + name: 'CspDirective', + kind: 'type', + source_line: 175, + type_signature: 'keyof CspDirectives', + }, + { + name: 'parse_csp_directive', + kind: 'function', + source_line: 177, + type_signature: '(directive: unknown): keyof CspDirectives | null', + return_type: 'keyof CspDirectives | null', + parameters: [ + { + name: 'directive', + type: 'unknown', + optional: false, + }, + ], + }, + { + name: 'CspDirectiveValue', + kind: 'type', + source_line: 182, + type_signature: 'CspDirectiveValue', + generic_params: [ + { + name: 'T', + constraint: 'CspDirective', + }, + ], + }, + { + name: 'csp_trust_levels', + kind: 'variable', + source_line: 184, + type_signature: 'readonly ["low", "medium", "high"]', + }, + { + name: 'csp_trust_level_value', + kind: 'variable', + doc_comment: + 'Numeric values for CSP trust levels, `csp_trust_levels`.\nLower is less trusted.\nIncludes `undefined` in the type for safety.', + source_line: 191, + type_signature: 'Record<"low" | "medium" | "high", number | undefined>', + }, + { + name: 'CspTrustLevel', + kind: 'type', + doc_comment: + "Trust levels for CSP sources.\n\nWith the base defaults, trust levels roughly correspond to:\n\n- `low` – Passive resources only (no script execution, no styling or UI control).\n\t\tExamples: `img-src`, `font-src`.\n- `medium` – Content that may affect layout, styling, or embed external browsing contexts,\n but cannot directly run code in the page's JS execution environment or\n\t\tperform other high-risk actions. Examples: `style-src`, `frame-src`, `frame-ancestors`.\n- `high` – Sources that can execute code in the page's context or open powerful network\n channels. Examples: `script-src`, `connect-src`, `child-src`.\n- `null` – No trust. This is used for directives that don't support sources.", + source_line: 212, + type_signature: '"low" | "medium" | "high"', + }, + { + name: 'parse_csp_trust_level', + kind: 'function', + doc_comment: 'Validates and extracts a CSP trust level from an unknown value.', + source_line: 217, + type_signature: '(trust: unknown): "low" | "medium" | "high" | null', + return_type: '"low" | "medium" | "high" | null', + parameters: [ + { + name: 'trust', + type: 'unknown', + optional: false, + }, + ], + }, + { + name: 'CspSourceSpec', + kind: 'type', + source_line: 220, + type_signature: 'CspSourceSpec', + properties: [ + { + name: 'source', + kind: 'variable', + type_signature: 'CspSource', + }, + { + name: 'trust', + kind: 'variable', + type_signature: 'CspTrustLevel', + }, + { + name: 'directives', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'CspDirectiveSpec', + kind: 'type', + source_line: 226, + type_signature: 'CspDirectiveSpec', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'CspDirective', + }, + { + name: 'fallback', + kind: 'variable', + type_signature: 'Array | null', + }, + { + name: 'fallback_of', + kind: 'variable', + type_signature: 'Array | null', + }, + ], + }, + { + name: 'is_csp_trusted', + kind: 'function', + doc_comment: + "Determines if a granted trust level is sufficient to satisfy a required trust level.\n\nTrust levels have the following hierarchy:\n- 'high' sources can be used in high, medium, and low trust directives (highest privilege)\n- 'medium' sources can be used in medium and low trust directives\n- 'low' sources can only be used in low trust directives (lowest privilege)", + source_line: 240, + type_signature: + '(required_trust: "low" | "medium" | "high" | null | undefined, granted_trust: "low" | "medium" | "high" | null | undefined): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'required_trust', + type: '"low" | "medium" | "high" | null | undefined', + optional: false, + }, + { + name: 'granted_trust', + type: '"low" | "medium" | "high" | null | undefined', + optional: false, + }, + ], + }, + { + name: 'COLOR_SCHEME_SCRIPT_HASH', + kind: 'variable', + source_line: 263, + type_signature: '"sha256-QOxqn7EUzb3ydF9SALJoJGWSvywW9R0AfTDSenB83Z8="', + }, + { + name: 'csp_directive_value_defaults', + kind: 'variable', + doc_comment: + 'The base CSP directive defaults.\nPrioritizes safety but loosens around media and styles, relying on defense-in-depth.\nCustomizable via `CreateCspDirectivesOptions.defaults`.', + source_line: 270, + type_signature: + 'Record', + }, + { + name: 'csp_directive_required_trust_defaults', + kind: 'variable', + doc_comment: + "Sources that meet this trust requirement are included for it by default.\nIf null, no trusted sources are added to the directive automatically.\nDirectives that don't support sources or default to `['none']` are null.\n\nFeedback is welcome, please see the issues - https://github.com/ryanatkn/fuz/issues", + source_line: 307, + type_signature: 'Record', + }, + { + name: 'csp_directive_specs', + kind: 'variable', + doc_comment: + 'Static data descriptors for the CSP directives.\nFuz excludes deprecated directives, so those are intentionally omitted,\nbut any newer missing directives are bugs.\n\nCould be moved to `csp.ts` but is currently here to keep that module smaller.', + see_also: [ + 'https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy', + ], + source_line: 343, + type_signature: 'CspDirectiveSpec[]', + }, + { + name: 'csp_directive_spec_by_name', + kind: 'variable', + source_line: 481, + type_signature: 'Map', + }, + { + name: 'CspActionSource', + kind: 'type', + source_line: 513, + type_signature: 'CspActionSource', + }, + { + name: 'CspBaseSource', + kind: 'type', + source_line: 514, + type_signature: 'CspBaseSource', + }, + { + name: 'CspCryptoSource', + kind: 'type', + source_line: 521, + type_signature: + '`nonce-${string}` | `sha256-${string}` | `sha384-${string}` | `sha512-${string}`', + }, + { + name: 'CspFrameSource', + kind: 'type', + source_line: 522, + type_signature: 'CspFrameSource', + }, + { + name: 'CspHostNameScheme', + kind: 'type', + source_line: 523, + type_signature: 'CspHostNameScheme', + }, + { + name: 'CspHostSource', + kind: 'type', + source_line: 524, + type_signature: + '`${string}.${string}` | "localhost" | `${string}.${string}:${number}` | `${string}.${string}:*` | `localhost:${number}` | "localhost:*" | `${string}://${string}.${string}` | `${string}://${string}.${string}:${number}` | `${string}://${string}.${string}:*` | `${string}://localhost` | `${string}://localhost:${number}`...', + }, + { + name: 'CspHostProtocolSchemes', + kind: 'type', + source_line: 525, + type_signature: 'CspHostProtocolSchemes', + }, + { + name: 'CspPortScheme', + kind: 'type', + source_line: 526, + type_signature: 'CspPortScheme', + }, + { + name: 'CspSchemeSource', + kind: 'type', + source_line: 527, + type_signature: 'CspSchemeSource', + }, + { + name: 'CspSource', + kind: 'type', + source_line: 534, + type_signature: 'CspSource', + }, + { + name: 'CspSources', + kind: 'type', + source_line: 535, + type_signature: 'CspSources', + }, + { + name: 'CspDirectives', + kind: 'type', + source_line: 537, + type_signature: 'CspDirectives', + properties: [ + { + name: 'sandbox', + kind: 'variable', + type_signature: + "Array<\n\t\t| 'allow-downloads-without-user-activation'\n\t\t| 'allow-forms'\n\t\t| 'allow-modals'\n\t\t| 'allow-orientation-lock'\n\t\t| 'allow-pointer-lock'\n\t\t| 'allow-popups'\n\t\t| 'allow-popups-to-escape-sandbox'\n\t\t| 'allow-presentation'\n\t\t| 'allow-same-origin'\n\t\t| 'allow-scripts'\n\t\t| 'allow-storage-access-by-user-activation'\n\t\t| 'allow-top-navigation'\n\t\t| 'allow-top-navigation-by-user-activation'\n\t>", + }, + ], + }, + ], + }, + { + path: 'declaration_contextmenu.ts', + declarations: [ + { + name: 'create_declaration_contextmenu', + kind: 'function', + source_line: 6, + type_signature: '(declaration: Declaration): ContextmenuParams[]', + return_type: 'ContextmenuParams[]', + parameters: [ + { + name: 'declaration', + type: 'Declaration', + optional: false, + }, + ], + }, + ], + dependents: ['DeclarationLink.svelte'], + }, + { + path: 'declaration.svelte.ts', + declarations: [ + { + name: 'Declaration', + kind: 'class', + doc_comment: 'Rich runtime representation of an exported declaration.', + source_line: 13, + members: [ + { + name: 'module', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'Module', + }, + { + name: 'declaration_json', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'DeclarationJson', + }, + { + name: 'library', + kind: 'variable', + }, + { + name: 'module_path', + kind: 'variable', + doc_comment: 'Module path where this declaration is defined.', + }, + { + name: 'name', + kind: 'variable', + }, + { + name: 'kind', + kind: 'variable', + }, + { + name: 'url_github', + kind: 'variable', + doc_comment: 'GitHub source URL with line number.', + }, + { + name: 'url_api', + kind: 'variable', + doc_comment: 'API documentation URL.', + }, + { + name: 'import_statement', + kind: 'variable', + doc_comment: 'Generated TypeScript import statement.', + }, + { + name: 'url_api_full', + kind: 'variable', + doc_comment: 'Public documentation link (if homepage_url is available).', + }, + { + name: 'display_name', + kind: 'variable', + doc_comment: 'Display name with generic parameters.', + }, + { + name: 'type_signature', + kind: 'variable', + }, + { + name: 'doc_comment', + kind: 'variable', + }, + { + name: 'deprecated_message', + kind: 'variable', + }, + { + name: 'parameters', + kind: 'variable', + }, + { + name: 'props', + kind: 'variable', + }, + { + name: 'return_type', + kind: 'variable', + }, + { + name: 'return_description', + kind: 'variable', + }, + { + name: 'generic_params', + kind: 'variable', + }, + { + name: 'extends', + kind: 'variable', + }, + { + name: 'implements', + kind: 'variable', + }, + { + name: 'throws', + kind: 'variable', + }, + { + name: 'since', + kind: 'variable', + }, + { + name: 'examples', + kind: 'variable', + }, + { + name: 'see_also', + kind: 'variable', + }, + { + name: 'members', + kind: 'variable', + type_signature: 'Array | undefined', + }, + { + name: 'properties', + kind: 'variable', + type_signature: 'Array | undefined', + }, + { + name: 'has_examples', + kind: 'variable', + }, + { + name: 'is_deprecated', + kind: 'variable', + }, + { + name: 'has_documentation', + kind: 'variable', + }, + { + name: 'has_parameters', + kind: 'variable', + }, + { + name: 'has_props', + kind: 'variable', + }, + { + name: 'has_generics', + kind: 'variable', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: + '(module: Module, declaration_json: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; doc_comment?: string | undefined; ... 18 more ...; alias_of?: { ...; } | undefined; }): Declaration', + parameters: [ + { + name: 'module', + type: 'Module', + optional: false, + }, + { + name: 'declaration_json', + type: '{ [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; doc_comment?: string | undefined; type_signature?: string | undefined; ... 17 more ...; alias_of?: { ...; } | undefined; }', + optional: false, + }, + ], + }, + ], + }, + ], + dependencies: ['library_helpers.ts'], + dependents: ['library.svelte.ts', 'module.svelte.ts'], + }, + { + path: 'DeclarationDetail.svelte', + declarations: [ + { + name: 'DeclarationDetail', + kind: 'component', + props: [ + { + name: 'declaration', + type: 'Declaration', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['Details.svelte', 'Mdz.svelte', 'ModuleLink.svelte', 'TypeLink.svelte'], + dependents: ['ApiDeclarationList.svelte'], + }, + { + path: 'DeclarationLink.svelte', + declarations: [ + { + name: 'DeclarationLink', + kind: 'component', + props: [ + { + name: 'name', + type: 'string', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: [ + 'contextmenu_state.svelte.ts', + 'declaration_contextmenu.ts', + 'library.svelte.ts', + ], + dependents: [ + 'DocsLink.svelte', + 'DocsTertiaryNav.svelte', + 'LibraryDetail.svelte', + 'TypeLink.svelte', + ], + }, + { + path: 'Details.svelte', + declarations: [ + { + name: 'Details', + kind: 'component', + doc_comment: 'Like `details` but renders children lazily by default.', + props: [ + { + name: 'open', + type: 'boolean', + optional: true, + bindable: true, + }, + { + name: 'eager', + type: 'boolean', + optional: true, + description: + 'Children are lazily rendered by default,\nenabling transitions and improving performance, sometimes significantly.\nPass `true` to render children eagerly to gain\n`ctrl+f` functionality while trading away the benefits.\nConsider a `
    ` element instead of making this component eager.', + }, + { + name: 'summary', + type: 'string | Snippet', + optional: false, + }, + { + name: 'summary_attrs', + type: "SvelteHTMLElements['summary']", + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependents: ['DeclarationDetail.svelte'], + }, + { + path: 'Dialog.svelte', + declarations: [ + { + name: 'Dialog', + kind: 'component', + props: [ + { + name: 'container', + type: 'HTMLElement', + optional: true, + }, + { + name: 'layout', + type: 'DialogLayout', + optional: true, + description: '', + }, + { + name: 'index', + type: 'number', + optional: true, + description: + 'index 0 is under 1 is under 2 etc -- the topmost dialog is the last in the array', + }, + { + name: 'active', + type: 'boolean', + optional: true, + description: '', + }, + { + name: 'content_selector', + type: 'string | null', + optional: true, + description: + 'If provided, prevents clicks that would close the dialog\nfrom bubbling past any elements matching this selector.', + }, + { + name: 'onclose', + type: '() => void', + optional: true, + }, + { + name: 'children', + type: 'Snippet<[close: (e?: Event) => void]>', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['Teleport.svelte'], + dependents: ['Dialogs.svelte', 'Docs.svelte'], + }, + { + path: 'dialog.ts', + declarations: [ + { + name: 'to_dialog_params', + kind: 'function', + doc_comment: + "This helper function is needed to construct `DialogParams` with type safety.\nIt uses TypeScript's inferred generics for functions,\nwhich do not work for plain objects as of v5.0.4.\n* `ContextmenuParams` uses a similar strategy.", + source_line: 11, + type_signature: + '>(Component: T, props: ComponentProps, dialog_props?: Partial> | undefined): DialogParams', + return_type: 'DialogParams', + parameters: [ + { + name: 'Component', + type: 'T', + optional: false, + }, + { + name: 'props', + type: 'ComponentProps', + optional: false, + }, + { + name: 'dialog_props', + type: 'Partial> | undefined', + optional: true, + }, + ], + }, + { + name: 'DialogParams', + kind: 'type', + doc_comment: + 'This pattern is based on:\nhttps://github.com/ivanhofer/sveltekit-typescript-showcase/blob/main/src/01-props/09-svelte-component/Component.svelte\nThe main limitation is that the generic cannot be inferred automatically,\nso we use `to_dialog_params` to construct instances in most cases.\nDefinining `DialogParams` with no concrete `T` lacks typechecking for `props`.', + source_line: 28, + type_signature: 'DialogParams', + generic_params: [ + { + name: 'T', + constraint: 'Component', + default_type: 'Component', + }, + ], + properties: [ + { + name: 'Component', + kind: 'variable', + type_signature: 'T', + }, + { + name: 'props', + kind: 'variable', + type_signature: 'ComponentProps', + }, + { + name: 'dialog_props', + kind: 'variable', + type_signature: 'Partial> | undefined', + }, + ], + }, + { + name: 'DialogLayout', + kind: 'type', + source_line: 34, + type_signature: 'DialogLayout', + }, + { + name: 'dialog_layouts', + kind: 'variable', + source_line: 35, + type_signature: 'DialogLayout[]', + }, + ], + }, + { + path: 'Dialogs.svelte', + declarations: [ + { + name: 'Dialogs', + kind: 'component', + props: [ + { + name: 'dialogs', + type: 'Array', + optional: false, + }, + { + name: 'onclose', + type: '() => void', + optional: true, + }, + { + name: 'children', + type: 'Snippet<[dialog: DialogParams]>', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['Dialog.svelte'], + }, + { + path: 'dimensions.svelte.ts', + declarations: [ + { + name: 'Dimensions', + kind: 'class', + source_line: 1, + members: [ + { + name: 'width', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'height', + kind: 'variable', + type_signature: 'number', + }, + ], + }, + ], + dependents: ['contextmenu_state.svelte.ts'], + }, + { + path: 'docs_helpers.svelte.ts', + declarations: [ + { + name: 'docs_slugify', + kind: 'function', + doc_comment: + 'Convert a string to a URL-safe fragment identifier, preserving case for API declarations.\nOnly transforms spaces and special characters, keeping valid identifier characters intact.\nUsed for hash anchors in documentation.', + source_line: 14, + type_signature: '(str: string): string', + return_type: 'string', + return_description: 'A URL-safe fragment identifier', + parameters: [ + { + name: 'str', + type: 'string', + optional: false, + description: '- The string to convert to a fragment', + }, + ], + }, + { + name: 'DOCS_PATH_DEFAULT', + kind: 'variable', + source_line: 28, + type_signature: '"/docs"', + }, + { + name: 'DOCS_PATH', + kind: 'variable', + source_line: 29, + type_signature: + '"/docs" | "/" | "/about" | "/docs/Alert" | "/docs/Breadcrumb" | "/docs/Breadcrumb/a" | "/docs/Breadcrumb/a/b" | "/docs/Breadcrumb/a/b/c" | "/docs/Breadcrumb/a/b/c/d" | "/docs/Card" | ... 94 more ... | `/${string}/help/`', + }, + { + name: 'DOCS_API_PATH', + kind: 'variable', + source_line: 30, + type_signature: 'string', + }, + { + name: 'to_docs_path_info', + kind: 'function', + source_line: 32, + type_signature: + '(path_slug: string, pathname: string, root_path?: string): { path: string; path_is_selected: boolean; path_segment: string | undefined; }', + return_type: + '{ path: string; path_is_selected: boolean; path_segment: string | undefined; }', + parameters: [ + { + name: 'path_slug', + type: 'string', + optional: false, + }, + { + name: 'pathname', + type: 'string', + optional: false, + }, + { + name: 'root_path', + type: 'string', + optional: false, + default_value: 'DOCS_PATH_DEFAULT', + }, + ], + }, + { + name: 'docs_links_context', + kind: 'variable', + source_line: 43, + type_signature: + '{ get: (error_message?: string | undefined) => DocsLinks; get_maybe: () => DocsLinks | undefined; set: (value: DocsLinks) => DocsLinks; }', + }, + { + name: 'DocsLinkTag', + kind: 'type', + source_line: 45, + type_signature: 'DocsLinkTag', + }, + { + name: 'DocsLinkInfo', + kind: 'type', + source_line: 47, + type_signature: 'DocsLinkInfo', + properties: [ + { + name: 'id', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'text', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'fragment', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'tag', + kind: 'variable', + type_signature: 'DocsLinkTag | undefined', + }, + { + name: 'depth', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'order', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'parent_id', + kind: 'variable', + type_signature: 'string | undefined', + }, + ], + }, + { + name: 'DocsLinks', + kind: 'class', + source_line: 57, + members: [ + { + name: 'root_path', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'string', + }, + { + name: 'links', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'SvelteMap', + }, + { + name: 'docs_links', + kind: 'variable', + }, + { + name: 'fragments_onscreen', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'SvelteSet', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: '(root_path?: string): DocsLinks', + parameters: [ + { + name: 'root_path', + type: 'string', + optional: false, + default_value: 'DOCS_PATH_DEFAULT', + }, + ], + }, + { + name: 'add', + kind: 'function', + type_signature: + '(fragment: string, text: string, pathname: string, tag?: DocsLinkTag | undefined, depth?: number, parent_id?: string | undefined, explicit_id?: string | undefined): string', + return_type: 'string', + parameters: [ + { + name: 'fragment', + type: 'string', + optional: false, + }, + { + name: 'text', + type: 'string', + optional: false, + }, + { + name: 'pathname', + type: 'string', + optional: false, + }, + { + name: 'tag', + type: 'DocsLinkTag | undefined', + optional: true, + }, + { + name: 'depth', + type: 'number', + optional: false, + default_value: '1', + }, + { + name: 'parent_id', + type: 'string | undefined', + optional: true, + }, + { + name: 'explicit_id', + type: 'string | undefined', + optional: true, + }, + ], + }, + { + name: 'remove', + kind: 'function', + type_signature: '(id: string): void', + return_type: 'void', + parameters: [ + { + name: 'id', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'generate_section_id', + kind: 'function', + doc_comment: + 'Generate a unique section ID for the current page render.\nThis counter is instance-scoped, ensuring SSR/client consistency.', + type_signature: '(): string', + return_type: 'string', + parameters: [], + }, + ], + }, + ], + dependencies: ['context_helpers.ts'], + dependents: [ + 'Docs.svelte', + 'DocsPageLinks.svelte', + 'DocsTertiaryNav.svelte', + 'TomeContent.svelte', + 'TomeHeader.svelte', + 'TomeLink.svelte', + 'TomeSection.svelte', + 'TomeSectionHeader.svelte', + 'library_helpers.ts', + 'tome.ts', + ], + }, + { + path: 'Docs.svelte', + declarations: [ + { + name: 'Docs', + kind: 'component', + props: [ + { + name: 'tomes', + type: 'Array', + optional: false, + }, + { + name: 'library', + type: 'Library', + optional: false, + }, + { + name: 'breadcrumb_children', + type: 'Snippet<[is_primary_nav: boolean]>', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: [ + 'Breadcrumb.svelte', + 'Dialog.svelte', + 'DocsFooter.svelte', + 'DocsPrimaryNav.svelte', + 'DocsSecondaryNav.svelte', + 'DocsTertiaryNav.svelte', + 'docs_helpers.svelte.ts', + 'tome.ts', + ], + }, + { + path: 'DocsContent.svelte', + declarations: [ + { + name: 'DocsContent', + kind: 'component', + props: [ + { + name: 'tomes', + type: 'Array', + optional: false, + }, + { + name: 'library', + type: 'Library', + optional: false, + }, + { + name: 'repo_name', + type: 'Snippet<[repo_name: string]>', + optional: true, + }, + { + name: 'content', + type: 'Snippet', + optional: true, + }, + { + name: 'header', + type: 'Snippet', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['LibrarySummary.svelte'], + }, + { + path: 'DocsFooter.svelte', + declarations: [ + { + name: 'DocsFooter', + kind: 'component', + props: [ + { + name: 'library', + type: 'Library', + optional: false, + }, + { + name: 'root_url', + type: 'Url | null', + optional: true, + }, + { + name: 'logo', + type: 'Snippet', + optional: true, + }, + { + name: 'logo_header', + type: 'Snippet', + optional: true, + }, + { + name: 'logo_footer', + type: 'Snippet', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['Svg.svelte', 'logos.ts'], + dependents: ['Docs.svelte'], + }, + { + path: 'DocsLink.svelte', + declarations: [ + { + name: 'DocsLink', + kind: 'component', + props: [ + { + name: 'reference', + type: 'string', + optional: false, + }, + { + name: 'display_text', + type: 'string | null', + optional: true, + }, + { + name: 'children', + type: 'Snippet<[Declaration | undefined, Module | undefined]>', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['DeclarationLink.svelte', 'ModuleLink.svelte', 'library.svelte.ts'], + dependents: ['MdzNodeView.svelte'], + }, + { + path: 'DocsList.svelte', + declarations: [ + { + name: 'DocsList', + kind: 'component', + props: [ + { + name: 'expand_width', + type: 'boolean', + optional: true, + }, + { + name: 'margin', + type: 'boolean', + optional: true, + }, + { + name: 'class', + type: 'string', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependents: ['DocsMenu.svelte', 'DocsModulesList.svelte', 'DocsPageLinks.svelte'], + }, + { + path: 'DocsMenu.svelte', + declarations: [ + { + name: 'DocsMenu', + kind: 'component', + props: [ + { + name: 'tomes', + type: 'Array', + optional: false, + }, + { + name: 'children', + type: 'Snippet<[category: string]>', + optional: true, + }, + { + name: 'expand_width', + type: 'boolean', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['DocsList.svelte', 'DocsMenuHeader.svelte', 'tome.ts'], + dependents: ['DocsSecondaryNav.svelte'], + }, + { + path: 'DocsMenuHeader.svelte', + declarations: [ + { + name: 'DocsMenuHeader', + kind: 'component', + props: [ + { + name: 'children', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependents: ['DocsMenu.svelte'], + }, + { + path: 'DocsModulesList.svelte', + declarations: [ + { + name: 'DocsModulesList', + kind: 'component', + props: [ + { + name: 'expand_width', + type: 'boolean', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['DocsList.svelte', 'library.svelte.ts'], + dependents: ['DocsTertiaryNav.svelte'], + }, + { + path: 'DocsPageLinks.svelte', + declarations: [ + { + name: 'DocsPageLinks', + kind: 'component', + props: [ + { + name: 'sidebar', + type: 'boolean', + optional: true, + }, + { + name: 'expand_width', + type: 'boolean', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['DocsList.svelte', 'docs_helpers.svelte.ts'], + dependents: ['DocsTertiaryNav.svelte'], + }, + { + path: 'DocsPrimaryNav.svelte', + declarations: [ + { + name: 'DocsPrimaryNav', + kind: 'component', + props: [ + { + name: 'library', + type: 'Library', + optional: false, + }, + { + name: 'breadcrumb_children', + type: 'Snippet<[is_primary_nav: boolean]>', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['Breadcrumb.svelte'], + dependents: ['Docs.svelte'], + }, + { + path: 'DocsSearch.svelte', + declarations: [ + { + name: 'DocsSearch', + kind: 'component', + props: [ + { + name: 'placeholder', + type: 'string', + optional: true, + }, + { + name: 'total_count', + type: 'number', + optional: false, + }, + { + name: 'result_count', + type: 'number', + optional: true, + }, + { + name: 'search_query', + type: 'string', + optional: false, + bindable: true, + }, + ], + source_line: 1, + }, + ], + dependents: ['ApiIndex.svelte', 'ApiModule.svelte'], + }, + { + path: 'DocsSecondaryNav.svelte', + declarations: [ + { + name: 'DocsSecondaryNav', + kind: 'component', + props: [ + { + name: 'tomes', + type: 'Array', + optional: false, + }, + { + name: 'sidebar', + type: 'boolean', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['DocsMenu.svelte', 'tome.ts'], + dependents: ['Docs.svelte'], + }, + { + path: 'DocsTertiaryNav.svelte', + declarations: [ + { + name: 'DocsTertiaryNav', + kind: 'component', + props: [ + { + name: 'tomes', + type: 'Array', + optional: false, + }, + { + name: 'tomes_by_name', + type: 'Map', + optional: false, + }, + { + name: 'sidebar', + type: 'boolean', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: [ + 'DeclarationLink.svelte', + 'DocsModulesList.svelte', + 'DocsPageLinks.svelte', + 'ModuleLink.svelte', + 'TomeLink.svelte', + 'docs_helpers.svelte.ts', + 'library.svelte.ts', + 'tome.ts', + ], + dependents: ['Docs.svelte'], + }, + { + path: 'EcosystemLinks.svelte', + declarations: [ + { + name: 'EcosystemLinks', + kind: 'component', + props: [ + { + name: 'selected', + type: "'webdevladder.net' | 'ryanatkn.com'", + optional: true, + }, + ], + source_line: 1, + }, + ], + dependents: ['EcosystemLinksPanel.svelte'], + }, + { + path: 'EcosystemLinksPanel.svelte', + declarations: [ + { + name: 'EcosystemLinksPanel', + kind: 'component', + props: [ + { + name: 'children', + type: 'Snippet', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['EcosystemLinks.svelte', 'ProjectLinks.svelte'], + }, + { + path: 'GithubLink.svelte', + declarations: [ + { + name: 'GithubLink', + kind: 'component', + props: [ + { + name: 'path', + type: 'string', + optional: true, + description: + 'GitHub path - can be a full URL or a relative path like `owner/repo` or `owner/repo/blob/main/file.ts`', + }, + ], + source_line: 1, + }, + ], + dependencies: ['Svg.svelte', 'logos.ts'], + }, + { + path: 'Glyph.svelte', + declarations: [ + { + name: 'Glyph', + kind: 'component', + props: [ + { + name: 'glyph', + type: 'string', + optional: false, + }, + { + name: 'size', + type: 'string | undefined', + optional: true, + }, + ], + source_line: 1, + }, + ], + }, + { + path: 'Hashlink.svelte', + declarations: [ + { + name: 'Hashlink', + kind: 'component', + props: [ + { + name: 'fragment', + type: 'string', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependents: ['TomeHeader.svelte', 'TomeSectionHeader.svelte'], + }, + { + path: 'helpers.ts', + declarations: [ + { + name: 'render_value_to_string', + kind: 'function', + source_line: 1, + type_signature: '(value: unknown): string', + return_type: 'string', + parameters: [ + { + name: 'value', + type: 'unknown', + optional: false, + }, + ], + }, + ], + }, + { + path: 'HiddenPersonalLinks.svelte', + declarations: [ + { + name: 'HiddenPersonalLinks', + kind: 'component', + source_line: 1, + }, + ], + }, + { + path: 'HueInput.svelte', + declarations: [ + { + name: 'HueInput', + kind: 'component', + props: [ + { + name: 'value', + type: 'Hue', + optional: true, + bindable: true, + }, + { + name: 'oninput', + type: '(hue: Hue) => void', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: true, + }, + ], + source_line: 1, + }, + ], + }, + { + path: 'ImgOrSvg.svelte', + declarations: [ + { + name: 'ImgOrSvg', + kind: 'component', + props: [ + { + name: 'src', + type: 'string', + optional: false, + }, + { + name: 'label', + type: 'string', + optional: true, + }, + { + name: 'size', + type: 'string', + optional: true, + description: + 'Sets both the `width` and `height` of the svg. Overridden by the `width` and `height` props.', + }, + { + name: 'width', + type: 'string', + optional: true, + description: 'Sets the `width` of the svg. Overrides `size`.', + }, + { + name: 'height', + type: 'string', + optional: true, + description: 'Sets the `height` of the svg. Overrides `size`.', + }, + { + name: 'svg_attrs', + type: "SvelteHTMLElements['svg']", + optional: true, + }, + { + name: 'img_attrs', + type: "SvelteHTMLElements['img']", + optional: true, + }, + { + name: 'attrs', + type: "Pick", + optional: true, + description: 'Shared attributes for both img and svg.', + }, + ], + source_line: 1, + }, + ], + dependents: ['LibraryDetail.svelte', 'LibrarySummary.svelte'], + }, + { + path: 'intersect.svelte.ts', + declarations: [ + { + name: 'IntersectParams', + kind: 'type', + source_line: 4, + type_signature: 'IntersectParams', + properties: [ + { + name: 'onintersect', + kind: 'variable', + type_signature: 'OnIntersect', + doc_comment: + 'Called when the element enters or leaves the viewport until disconnected.', + }, + { + name: 'ondisconnect', + kind: 'variable', + type_signature: 'OnDisconnect', + doc_comment: + "Called when the attachment's observer is disconnected,\neither by the user calling disconnect or the attachment being destroyed.", + }, + { + name: 'count', + kind: 'variable', + type_signature: 'number', + doc_comment: + "A value of `1` disconnects after `el` enters and leaves the viewport one time,\nsimilar to 'once' for an event.\n`0` disables and `undefined` or a negative number like `-1` never disconnects.", + }, + { + name: 'options', + kind: 'variable', + type_signature: 'IntersectionObserverInit', + doc_comment: + 'Same as the `options` param to\n[`IntersectionObserver`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/IntersectionObserver#options)', + }, + ], + }, + { + name: 'IntersectParamsOrCallback', + kind: 'type', + source_line: 27, + type_signature: 'IntersectParamsOrCallback', + }, + { + name: 'intersect', + kind: 'function', + doc_comment: + 'Creates an attachment that observes element viewport intersection.\nUses the lazy function pattern to optimize reactivity:\ncallbacks can update without recreating the observer, preserving state.', + source_line: 35, + type_signature: + '(get_params: () => IntersectParamsOrCallback | null | undefined): Attachment', + return_type: 'Attachment', + parameters: [ + { + name: 'get_params', + type: '() => IntersectParamsOrCallback | null | undefined', + optional: false, + description: + 'Function that returns callback, params object, or nullish to disable', + }, + ], + }, + { + name: 'OnIntersect', + kind: 'type', + source_line: 134, + type_signature: 'OnIntersect', + }, + { + name: 'IntersectState', + kind: 'type', + source_line: 136, + type_signature: 'IntersectState', + properties: [ + { + name: 'intersecting', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'intersections', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'el', + kind: 'variable', + type_signature: 'HTMLElement | SVGElement', + }, + { + name: 'observer', + kind: 'variable', + type_signature: 'IntersectionObserver', + }, + { + name: 'disconnect', + kind: 'variable', + type_signature: '() => void', + }, + ], + }, + { + name: 'OnDisconnect', + kind: 'type', + source_line: 145, + type_signature: 'OnDisconnect', + }, + { + name: 'DisconnectState', + kind: 'type', + source_line: 147, + type_signature: 'DisconnectState', + properties: [ + { + name: 'intersecting', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'intersections', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'el', + kind: 'variable', + type_signature: 'HTMLElement | SVGElement', + }, + { + name: 'observer', + kind: 'variable', + type_signature: 'IntersectionObserver', + }, + ], + }, + ], + dependents: ['TomeContent.svelte', 'TomeSection.svelte'], + }, + { + path: 'library_gen_helpers.ts', + declarations: [ + { + name: 'TsFileAnalysis', + kind: 'type', + doc_comment: + 'Result of analyzing a TypeScript file.\nIncludes both the module metadata and re-export information for post-processing.', + source_line: 41, + type_signature: 'TsFileAnalysis', + properties: [ + { + name: 'module', + kind: 'variable', + type_signature: 'ModuleJson', + doc_comment: 'Module metadata for inclusion in source_json.', + }, + { + name: 're_exports', + kind: 'variable', + type_signature: 'Array', + doc_comment: 'Re-exports from this module for building also_exported_from.', + }, + ], + }, + { + name: 'library_gen_validate_no_duplicates', + kind: 'function', + doc_comment: + 'Validates that no declaration names are duplicated across modules.\nThe flat namespace is intentional - duplicates should fail fast.', + throws: [ + { + type: 'Error', + description: 'if duplicate declaration names are found', + }, + ], + source_line: 54, + type_signature: + '(source_json: { [x: string]: unknown; name: string; version: string; modules?: { [x: string]: unknown; path: string; declarations?: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; ... 19 more ...; alias_of?: { ...; } | undefined; }[] | undefined; module_comment?: string | undefined; dependencies?: string[] | undefined; dependents?: string[] | undefined; }[] | undefined; }, log: Logger): void', + return_type: 'void', + parameters: [ + { + name: 'source_json', + type: '{ [x: string]: unknown; name: string; version: string; modules?: { [x: string]: unknown; path: string; declarations?: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; ... 19 more ...; alias_of?: { ...; } | undefined; }[] | undefine...', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + ], + }, + { + name: 'library_gen_sort_modules', + kind: 'function', + doc_comment: + 'Sort modules alphabetically by path for deterministic output and cleaner diffs.', + source_line: 100, + type_signature: + '(modules: { [x: string]: unknown; path: string; declarations?: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; doc_comment?: string | undefined; ... 18 more ...; alias_of?: { ...; } | undefined; }[] | undefined; module_comment?: string | undefined; dependencies?: string[] | undefined; dependents?: string[] | undefined; }[]): { ...; }[]', + return_type: + '{ [x: string]: unknown; path: string; declarations?: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; doc_comment?: string | undefined; ... 18 more ...; alias_of?: { ...; } | undefined; }[] | undefined; module_comment?: string | un...', + parameters: [ + { + name: 'modules', + type: '{ [x: string]: unknown; path: string; declarations?: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; doc_comment?: string | undefined; ... 18 more ...; alias_of?: { ...; } | undefined; }[] | undefined; module_comment?: string | un...', + optional: false, + }, + ], + }, + { + name: 'library_gen_generate_ts', + kind: 'function', + doc_comment: + 'Generate the library.ts file content with library_json export.\nParses at generation time so runtime only needs the pre-computed result.', + source_line: 108, + type_signature: + '(package_json: { [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }, source_json: { ...; }): string', + return_type: 'string', + parameters: [ + { + name: 'package_json', + type: '{ [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }', + optional: false, + }, + { + name: 'source_json', + type: '{ [x: string]: unknown; name: string; version: string; modules?: { [x: string]: unknown; path: string; declarations?: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; ... 19 more ...; alias_of?: { ...; } | undefined; }[] | undefine...', + optional: false, + }, + ], + }, + { + name: 'library_gen_collect_source_files', + kind: 'function', + doc_comment: + 'Collect and filter source files from filer.\n\nReturns disknodes for TypeScript/JS files and Svelte components from src/lib, excluding test files.\nReturns an empty array with a warning if no source files are found.', + source_line: 136, + type_signature: '(files: Map, log: Logger): Disknode[]', + return_type: 'Disknode[]', + parameters: [ + { + name: 'files', + type: 'Map', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + ], + }, + { + name: 'library_gen_analyze_svelte_file', + kind: 'function', + doc_comment: + 'Analyze a Svelte component file and extract metadata.\n\nUses `svelte_analyze_file` for core analysis, then adds\nGro-specific dependency information from the disknode.', + source_line: 171, + type_signature: + '(disknode: Disknode, module_path: string, checker: TypeChecker): { [x: string]: unknown; path: string; declarations?: { [x: string]: unknown; name: string; kind: "function" | ... 6 more ... | "css"; ... 19 more ...; alias_of?: { ...; } | undefined; }[] | undefined; module_comment?: string | undefined; dependencies?: string[] | undefined; dependents?: string[] | undefined; }', + return_type: + '{ [x: string]: unknown; path: string; declarations?: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; doc_comment?: string | undefined; ... 18 more ...; alias_of?: { ...; } | undefined; }[] | undefined; module_comment?: string | un...', + parameters: [ + { + name: 'disknode', + type: 'Disknode', + optional: false, + }, + { + name: 'module_path', + type: 'string', + optional: false, + }, + { + name: 'checker', + type: 'TypeChecker', + optional: false, + }, + ], + }, + { + name: 'library_gen_analyze_typescript_file', + kind: 'function', + doc_comment: + 'Analyze a TypeScript file and extract all declarations.\n\nUses `ts_analyze_module_exports` for core analysis, then adds\nGro-specific dependency information from the disknode.\n\nReturns both the module metadata and re-export information for post-processing.', + source_line: 198, + type_signature: + '(disknode: Disknode, source_file: SourceFile, module_path: string, checker: TypeChecker): TsFileAnalysis', + return_type: 'TsFileAnalysis', + parameters: [ + { + name: 'disknode', + type: 'Disknode', + optional: false, + }, + { + name: 'source_file', + type: 'SourceFile', + optional: false, + }, + { + name: 'module_path', + type: 'string', + optional: false, + }, + { + name: 'checker', + type: 'TypeChecker', + optional: false, + }, + ], + }, + { + name: 'library_gen_extract_dependencies', + kind: 'function', + doc_comment: + "Extract dependencies and dependents for a module from the filer's dependency graph.\n\nFilters to only include source modules from src/lib (excludes external packages, node_modules, tests).\nReturns sorted arrays of module paths (relative to src/lib) for deterministic output.", + source_line: 237, + type_signature: + '(disknode: Disknode): { dependencies: string[]; dependents: string[]; }', + return_type: '{ dependencies: string[]; dependents: string[]; }', + parameters: [ + { + name: 'disknode', + type: 'Disknode', + optional: false, + }, + ], + }, + ], + module_comment: + 'Build-time helpers for library metadata generation.\n\nThese functions handle Gro-specific concerns like file collection and dependency\ngraph extraction. Core analysis logic has been extracted to reusable helpers:\n\n- `ts_helpers.ts` - `ts_analyze_module_exports`\n- `svelte_helpers.ts` - `svelte_analyze_file`\n- `module_helpers.ts` - path utilities and source detection\n\nDesign philosophy: Fail fast with clear errors rather than silently producing invalid\nmetadata. All validation errors halt the build immediately with actionable messages.\n\n@see library_gen.ts for the main generation task\n@see @ryanatkn/belt/source_json.js for type definitions\n@see ts_helpers.ts for reusable TypeScript analysis\n@see svelte_helpers.ts for reusable Svelte component analysis', + dependencies: ['module_helpers.ts', 'svelte_helpers.ts', 'ts_helpers.ts'], + dependents: ['library_gen.ts'], + }, + { + path: 'library_gen.ts', + declarations: [ + { + name: 'library_gen', + kind: 'function', + doc_comment: + "Creates a Gen object for generating library metadata with full TypeScript analysis.\n\nUsage in a `.gen.ts` file:\n```ts\nimport {library_gen} from '@ryanatkn/fuz/library_gen.js';\nexport const gen = library_gen();\n```", + source_line: 45, + type_signature: '(): Gen', + return_type: 'Gen', + parameters: [], + }, + ], + module_comment: + 'Library metadata generator helper.\n\nGenerates package_json and source_json with rich metadata:\n- JSDoc/TSDoc comments with full tag support\n- Full type signatures\n- Source code locations\n- Parameter information with descriptions and defaults\n- Return value documentation\n- Usage examples\n- Dependency graphs\n- Svelte component props\n\n@see @ryanatkn/belt/source_json.js for type definitions\n@see src/lib/library_gen_helpers.ts for buildtime-only helpers\n@see src/lib/tsdoc_helpers.ts for JSDoc/TSDoc parsing\n@see src/lib/ts_helpers.ts for TypeScript analysis\n@see src/lib/svelte_helpers.ts for Svelte component analysis', + dependencies: ['library_gen_helpers.ts', 'module_helpers.ts', 'ts_helpers.ts'], + }, + { + path: 'library_helpers.ts', + declarations: [ + { + name: 'url_api_declaration', + kind: 'function', + doc_comment: 'Build project-relative API documentation URL with hash anchor.', + source_line: 10, + type_signature: '(declaration_name: string): string', + return_type: 'string', + parameters: [ + { + name: 'declaration_name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'url_api_declaration_full', + kind: 'function', + doc_comment: 'Build full API documentation URL with domain and hash anchor.', + source_line: 16, + type_signature: '(homepage: string, declaration_name: string): string', + return_type: 'string', + parameters: [ + { + name: 'homepage', + type: 'string', + optional: false, + }, + { + name: 'declaration_name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'url_api_module', + kind: 'function', + doc_comment: 'Build project-relative module documentation URL.', + source_line: 22, + type_signature: '(module_path: string): string', + return_type: 'string', + parameters: [ + { + name: 'module_path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'url_github_file', + kind: 'function', + doc_comment: 'Build GitHub file URL for a repository.', + source_line: 27, + type_signature: + '(repo_url: string, file_path: string, line?: number | undefined): string', + return_type: 'string', + parameters: [ + { + name: 'repo_url', + type: 'string', + optional: false, + }, + { + name: 'file_path', + type: 'string', + optional: false, + }, + { + name: 'line', + type: 'number | undefined', + optional: true, + }, + ], + }, + { + name: 'url_github_org', + kind: 'function', + doc_comment: 'Build GitHub organization URL from repo URL and repo name.', + source_line: 36, + type_signature: '(repo_url: string, repo_name: string): string | null', + return_type: 'string | null', + parameters: [ + { + name: 'repo_url', + type: 'string', + optional: false, + }, + { + name: 'repo_name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'github_owner_parse', + kind: 'function', + doc_comment: 'Parse GitHub owner/org name from repository URL.', + source_line: 43, + type_signature: '(repo_url: string): string | null', + return_type: 'string | null', + parameters: [ + { + name: 'repo_url', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'url_npm_package', + kind: 'function', + doc_comment: 'Build npm package URL.', + source_line: 53, + type_signature: '(package_name: string): string', + return_type: 'string', + parameters: [ + { + name: 'package_name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'package_is_published', + kind: 'function', + doc_comment: 'Check if a package is published to npm.', + source_line: 59, + type_signature: + '(package_json: { [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'package_json', + type: '{ [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }', + optional: false, + }, + ], + }, + { + name: 'url_package_logo', + kind: 'function', + doc_comment: 'Build package logo URL with favicon.png fallback.', + source_line: 66, + type_signature: + '(homepage_url: string | null, logo_path?: string | undefined): string | null', + return_type: 'string | null', + parameters: [ + { + name: 'homepage_url', + type: 'string | null', + optional: false, + }, + { + name: 'logo_path', + type: 'string | undefined', + optional: true, + }, + ], + }, + { + name: 'repo_name_parse', + kind: 'function', + doc_comment: 'Extract repository name without scope from package name.', + source_line: 78, + type_signature: '(name: string): string', + return_type: 'string', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'repo_url_parse', + kind: 'function', + doc_comment: 'Parse repository URL from package.json format.', + source_line: 92, + type_signature: + '(repository: string | { [x: string]: unknown; type: string; url: string; directory?: string | undefined; } | undefined): string | null', + return_type: 'string | null', + parameters: [ + { + name: 'repository', + type: 'string | { [x: string]: unknown; type: string; url: string; directory?: string | undefined; } | undefined', + optional: false, + }, + ], + }, + { + name: 'url_well_known', + kind: 'function', + doc_comment: 'Build .well-known URL for package metadata files.', + source_line: 102, + type_signature: '(homepage_url: string, filename: string): string', + return_type: 'string', + parameters: [ + { + name: 'homepage_url', + type: 'string', + optional: false, + }, + { + name: 'filename', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'url_to_root_relative', + kind: 'function', + doc_comment: 'Convert a full URL to root-relative format by removing the origin.', + source_line: 109, + type_signature: '(url: string, origin?: string): string', + return_type: 'string', + parameters: [ + { + name: 'url', + type: 'string', + optional: false, + }, + { + name: 'origin', + type: 'string', + optional: false, + default_value: 'page.url.origin', + }, + ], + }, + ], + dependencies: ['docs_helpers.svelte.ts'], + dependents: [ + 'LibraryDetail.svelte', + 'contextmenu_state.svelte.ts', + 'declaration.svelte.ts', + 'module.svelte.ts', + ], + }, + { + path: 'library.svelte.ts', + declarations: [ + { + name: 'Library', + kind: 'class', + doc_comment: + 'Rich runtime representation of a library.\n\nWraps `LibraryJson` with computed properties and provides the root\nof the API documentation hierarchy: Library → modules → declarations', + see_also: [ + '`module.svelte.ts for Module class`', + '`declaration.svelte.ts for Declaration class`', + ], + source_line: 16, + members: [ + { + name: 'library_json', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'LibraryJson', + }, + { + name: 'package_json', + kind: 'variable', + }, + { + name: 'source_json', + kind: 'variable', + }, + { + name: 'name', + kind: 'variable', + }, + { + name: 'repo_name', + kind: 'variable', + }, + { + name: 'repo_url', + kind: 'variable', + }, + { + name: 'owner_name', + kind: 'variable', + }, + { + name: 'homepage_url', + kind: 'variable', + }, + { + name: 'logo_url', + kind: 'variable', + }, + { + name: 'logo_alt', + kind: 'variable', + }, + { + name: 'npm_url', + kind: 'variable', + }, + { + name: 'changelog_url', + kind: 'variable', + }, + { + name: 'published', + kind: 'variable', + }, + { + name: 'org_url', + kind: 'variable', + doc_comment: "Organization URL (e.g., 'https://github.com/ryanatkn').", + }, + { + name: 'modules', + kind: 'variable', + doc_comment: 'All modules as rich Module instances.', + }, + { + name: 'modules_sorted', + kind: 'variable', + doc_comment: 'All modules sorted alphabetically by path.', + }, + { + name: 'declarations', + kind: 'variable', + doc_comment: 'All declarations across all modules as a flat array.', + }, + { + name: 'declaration_map', + kind: 'variable', + doc_comment: 'Declaration lookup map by name. Provides O(1) lookup.', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: '(library_json: LibraryJson): Library', + parameters: [ + { + name: 'library_json', + type: 'LibraryJson', + optional: false, + }, + ], + }, + { + name: 'lookup_declaration', + kind: 'function', + doc_comment: 'Look up a declaration by name.', + type_signature: '(name: string): Declaration | undefined', + return_type: 'Declaration | undefined', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'has_declaration', + kind: 'function', + doc_comment: 'Check if a declaration exists.', + type_signature: '(name: string): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'lookup_module', + kind: 'function', + doc_comment: 'Look up a module by its canonical path.', + type_signature: '(path: string): Module | undefined', + return_type: 'Module | undefined', + parameters: [ + { + name: 'path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'search_declarations', + kind: 'function', + doc_comment: 'Search declarations by query string with multi-term AND logic.', + type_signature: '(query: string): Declaration[]', + return_type: 'Declaration[]', + parameters: [ + { + name: 'query', + type: 'string', + optional: false, + }, + ], + }, + ], + }, + { + name: 'library_context', + kind: 'variable', + source_line: 101, + type_signature: + '{ get: (error_message?: string | undefined) => Library; get_maybe: () => Library | undefined; set: (value: Library) => Library; }', + }, + ], + dependencies: ['context_helpers.ts', 'declaration.svelte.ts', 'module.svelte.ts'], + dependents: [ + 'ApiIndex.svelte', + 'ApiModule.svelte', + 'DeclarationLink.svelte', + 'DocsLink.svelte', + 'DocsModulesList.svelte', + 'DocsTertiaryNav.svelte', + 'ModuleLink.svelte', + 'TypeLink.svelte', + ], + }, + { + path: 'LibraryDetail.svelte', + declarations: [ + { + name: 'LibraryDetail', + kind: 'component', + props: [ + { + name: 'library', + type: 'Library', + optional: false, + }, + { + name: 'repo_name', + type: 'Snippet<[repo_name: string]>', + optional: true, + }, + { + name: 'description', + type: 'Snippet<[description: string]>', + optional: true, + }, + { + name: 'motto', + type: 'Snippet<[description: string]>', + optional: true, + }, + { + name: 'npm_url', + type: 'Snippet<[npm_url: string]>', + optional: true, + }, + { + name: 'homepage_url', + type: 'Snippet<[homepage_url: string]>', + optional: true, + }, + { + name: 'children', + type: 'Snippet<[library: Library]>', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: [ + 'DeclarationLink.svelte', + 'ImgOrSvg.svelte', + 'ModuleLink.svelte', + 'library_helpers.ts', + 'module_helpers.ts', + ], + }, + { + path: 'LibrarySummary.svelte', + declarations: [ + { + name: 'LibrarySummary', + kind: 'component', + props: [ + { + name: 'library', + type: 'Library', + optional: false, + }, + { + name: 'repo_name', + type: 'Snippet<[repo_name: string]>', + optional: true, + }, + { + name: 'logo', + type: 'Snippet<[logo_url: string, logo_alt: string]>', + optional: true, + }, + { + name: 'motto', + type: 'Snippet<[motto: string, glyph?: string]>', + optional: true, + }, + { + name: 'description', + type: 'Snippet<[description: string, glyph?: string]>', + optional: true, + }, + { + name: 'npm_url', + type: 'Snippet<[npm_url: string]>', + optional: true, + }, + { + name: 'homepage_url', + type: 'Snippet<[homepage_url: string]>', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['ImgOrSvg.svelte'], + dependents: ['DocsContent.svelte'], + }, + { + path: 'logos.ts', + declarations: [ + { + name: 'zzz_logo', + kind: 'variable', + source_line: 22, + type_signature: 'SvgData', + }, + { + name: 'gro_logo', + kind: 'variable', + source_line: 38, + type_signature: 'SvgData', + }, + { + name: 'fuz_logo', + kind: 'variable', + source_line: 72, + type_signature: 'SvgData', + }, + { + name: 'moss_logo', + kind: 'variable', + source_line: 82, + type_signature: 'SvgData', + }, + { + name: 'belt_logo', + kind: 'variable', + source_line: 89, + type_signature: 'SvgData', + }, + { + name: 'fuz_code_logo', + kind: 'variable', + source_line: 115, + type_signature: 'SvgData', + }, + { + name: 'fuz_blog_logo', + kind: 'variable', + source_line: 121, + type_signature: 'SvgData', + }, + { + name: 'fuz_mastodon_logo', + kind: 'variable', + source_line: 127, + type_signature: 'SvgData', + }, + { + name: 'fuz_gitops_logo', + kind: 'variable', + source_line: 133, + type_signature: 'SvgData', + }, + { + name: 'fuz_template_logo', + kind: 'variable', + source_line: 139, + type_signature: 'SvgData', + }, + { + name: 'webdevladder_logo', + kind: 'variable', + source_line: 149, + type_signature: 'SvgData', + }, + { + name: 'earbetter_logo', + kind: 'variable', + source_line: 165, + type_signature: 'SvgData', + }, + { + name: 'spiderspace_logo', + kind: 'variable', + source_line: 175, + type_signature: 'SvgData', + }, + { + name: 'github_logo', + kind: 'variable', + source_line: 237, + type_signature: 'SvgData', + }, + { + name: 'mdn_logo', + kind: 'variable', + source_line: 250, + type_signature: 'SvgData', + }, + { + name: 'chatgpt_logo', + kind: 'variable', + source_line: 260, + type_signature: 'SvgData', + }, + { + name: 'claude_logo', + kind: 'variable', + source_line: 269, + type_signature: 'SvgData', + }, + { + name: 'gemini_logo', + kind: 'variable', + source_line: 279, + type_signature: 'SvgData', + }, + ], + dependents: [ + 'DocsFooter.svelte', + 'GithubLink.svelte', + 'MdnLink.svelte', + 'ProjectLinks.svelte', + 'Spiders.svelte', + ], + }, + { + path: 'MdnLink.svelte', + declarations: [ + { + name: 'MdnLink', + kind: 'component', + props: [ + { + name: 'path', + type: 'string', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['Svg.svelte', 'logos.ts'], + }, + { + path: 'mdz_components.ts', + declarations: [ + { + name: 'MdzComponents', + kind: 'type', + doc_comment: + "Component registry for custom Svelte components that can be used in mdz content.\n\nFor example, registering 'Alert' allows using `...` in mdz content.\n\nThe Map values are the Svelte component constructors.", + source_line: 12, + type_signature: 'MdzComponents', + }, + { + name: 'MdzElements', + kind: 'type', + doc_comment: + "Element registry for HTML elements that can be used in mdz content.\n\nFor example, registering 'div' allows using `
    ...
    ` in mdz content.\n\nThe Map values are boolean placeholders for future configuration options.", + source_line: 21, + type_signature: 'MdzElements', + }, + { + name: 'mdz_components_context', + kind: 'variable', + doc_comment: + 'Context for providing custom mdz components.\nMust be set by the application using mdz.', + source_line: 27, + type_signature: + '{ get: (error_message?: string | undefined) => MdzComponents; get_maybe: () => MdzComponents | undefined; set: (value: MdzComponents) => MdzComponents; }', + }, + { + name: 'mdz_elements_context', + kind: 'variable', + doc_comment: + 'Context for providing allowed HTML elements.\nMust be set by the application using mdz.\nBy default, no HTML elements are allowed.', + source_line: 34, + type_signature: + '{ get: (error_message?: string | undefined) => MdzElements; get_maybe: () => MdzElements | undefined; set: (value: MdzElements) => MdzElements; }', + }, + ], + dependencies: ['context_helpers.ts'], + dependents: ['MdzNodeView.svelte'], + }, + { + path: 'Mdz.svelte', + declarations: [ + { + name: 'Mdz', + kind: 'component', + props: [ + { + name: 'content', + type: 'string', + optional: false, + }, + { + name: 'inline', + type: 'boolean', + optional: true, + }, + { + name: 'nowrap', + type: 'boolean', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['MdzNodeView.svelte', 'mdz.ts'], + dependents: ['ApiModule.svelte', 'DeclarationDetail.svelte'], + }, + { + path: 'mdz.ts', + declarations: [ + { + name: 'mdz_parse', + kind: 'function', + doc_comment: 'Parses text to an array of `MdzNode`.', + source_line: 35, + type_signature: '(text: string): MdzNode[]', + return_type: 'MdzNode[]', + parameters: [ + { + name: 'text', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'MdzNode', + kind: 'type', + source_line: 37, + type_signature: 'MdzNode', + }, + { + name: 'MdzBaseNode', + kind: 'type', + source_line: 51, + type_signature: 'MdzBaseNode', + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'start', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'end', + kind: 'variable', + type_signature: 'number', + }, + ], + }, + { + name: 'MdzTextNode', + kind: 'type', + source_line: 57, + type_signature: 'MdzTextNode', + extends: ['MdzBaseNode'], + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'Text'", + }, + { + name: 'content', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'MdzCodeNode', + kind: 'type', + source_line: 62, + type_signature: 'MdzCodeNode', + extends: ['MdzBaseNode'], + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'Code'", + }, + { + name: 'content', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'MdzCodeblockNode', + kind: 'type', + source_line: 67, + type_signature: 'MdzCodeblockNode', + extends: ['MdzBaseNode'], + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'Codeblock'", + }, + { + name: 'lang', + kind: 'variable', + type_signature: 'string | null', + }, + { + name: 'content', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'MdzBoldNode', + kind: 'type', + source_line: 73, + type_signature: 'MdzBoldNode', + extends: ['MdzBaseNode'], + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'Bold'", + }, + { + name: 'children', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'MdzItalicNode', + kind: 'type', + source_line: 78, + type_signature: 'MdzItalicNode', + extends: ['MdzBaseNode'], + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'Italic'", + }, + { + name: 'children', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'MdzStrikethroughNode', + kind: 'type', + source_line: 83, + type_signature: 'MdzStrikethroughNode', + extends: ['MdzBaseNode'], + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'Strikethrough'", + }, + { + name: 'children', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'MdzLinkNode', + kind: 'type', + source_line: 88, + type_signature: 'MdzLinkNode', + extends: ['MdzBaseNode'], + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'Link'", + }, + { + name: 'reference', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'children', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'link_type', + kind: 'variable', + type_signature: "'external' | 'internal'", + }, + ], + }, + { + name: 'MdzParagraphNode', + kind: 'type', + source_line: 95, + type_signature: 'MdzParagraphNode', + extends: ['MdzBaseNode'], + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'Paragraph'", + }, + { + name: 'children', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'MdzHrNode', + kind: 'type', + source_line: 100, + type_signature: 'MdzHrNode', + extends: ['MdzBaseNode'], + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'Hr'", + }, + ], + }, + { + name: 'MdzHeadingNode', + kind: 'type', + source_line: 104, + type_signature: 'MdzHeadingNode', + extends: ['MdzBaseNode'], + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'Heading'", + }, + { + name: 'level', + kind: 'variable', + type_signature: '1 | 2 | 3 | 4 | 5 | 6', + }, + { + name: 'children', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'MdzElementNode', + kind: 'type', + source_line: 110, + type_signature: 'MdzElementNode', + extends: ['MdzBaseNode'], + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'Element'", + }, + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'children', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'MdzComponentNode', + kind: 'type', + source_line: 116, + type_signature: 'MdzComponentNode', + extends: ['MdzBaseNode'], + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'Component'", + }, + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'children', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'MdzParser', + kind: 'class', + doc_comment: + 'Parser for mdz format.\nSingle-pass lexer/parser with text accumulation for efficiency.\nUsed by `mdz_parse`, which should be preferred for simple usage.', + source_line: 172, + members: [ + { + name: 'constructor', + kind: 'constructor', + type_signature: '(template: string): MdzParser', + parameters: [ + { + name: 'template', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'parse', + kind: 'function', + doc_comment: + 'Main parse method. Returns flat array of nodes,\nwith paragraph nodes wrapping content between double newlines.', + type_signature: '(): MdzNode[]', + return_type: 'MdzNode[]', + parameters: [], + }, + ], + }, + ], + module_comment: + 'mdz - minimal markdown dialect for Fuz documentation.\n\nParses an enhanced markdown dialect with:\n- inline formatting: `code`, **bold**, _italic_, ~strikethrough~\n- auto-detected links: external URLs (`https://...`) and internal paths (`/path`)\n- markdown links: `[text](url)` with custom display text\n- inline code in backticks (creates `Code` nodes; auto-linking to identifiers/modules\n is handled by the rendering layer via `MdzNodeView.svelte`)\n- paragraph breaks (double newline)\n- block elements: headings, horizontal rules, code blocks\n- HTML elements and Svelte components (opt-in via context)\n\nKey constraint: preserves ALL whitespace exactly as authored,\nand is rendered with white-space pre or pre-wrap.\n\n## Design philosophy\n\n- **False negatives over false positives**: Strict syntax prevents accidentally\n interpreting plain text as formatting. When in doubt, treat as plain text.\n- **One way to do things**: Single unambiguous syntax per feature. No alternatives.\n- **Explicit over implicit**: Clear delimiters and column-0 requirements avoid ambiguity.\n- **Simple over complete**: Prefer simple parsing rules over complex edge case handling.\n\n## Status\n\nThis is an early proof of concept with missing features and edge cases.', + dependents: ['Mdz.svelte'], + }, + { + path: 'MdzNodeView.svelte', + declarations: [ + { + name: 'MdzNodeView', + kind: 'component', + props: [ + { + name: 'node', + type: 'MdzNode', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['DocsLink.svelte', 'MdzNodeView.svelte', 'mdz_components.ts'], + dependents: ['Mdz.svelte', 'MdzNodeView.svelte'], + }, + { + path: 'module_contextmenu.ts', + declarations: [ + { + name: 'create_module_contextmenu', + kind: 'function', + source_line: 6, + type_signature: '(module: Module): ContextmenuParams[]', + return_type: 'ContextmenuParams[]', + parameters: [ + { + name: 'module', + type: 'Module', + optional: false, + }, + ], + }, + ], + dependents: ['ModuleLink.svelte'], + }, + { + path: 'module_helpers.ts', + declarations: [ + { + name: 'ModuleSourceOptions', + kind: 'type', + doc_comment: + 'Configuration for module source detection.\n\nAllows customizing which paths are considered source modules,\nuseful for projects with non-standard directory structures.', + source_line: 16, + type_signature: 'ModuleSourceOptions', + properties: [ + { + name: 'source_paths', + kind: 'variable', + type_signature: 'Array', + doc_comment: 'Source directory paths to include.', + }, + { + name: 'extensions', + kind: 'variable', + type_signature: 'Array', + doc_comment: 'File extensions to analyze.', + }, + { + name: 'exclude_patterns', + kind: 'variable', + type_signature: 'Array', + doc_comment: 'Patterns to exclude (matched against full path).', + }, + ], + }, + { + name: 'MODULE_SOURCE_DEFAULTS', + kind: 'variable', + doc_comment: 'Default options for module source detection.', + source_line: 28, + type_signature: 'Required', + }, + { + name: 'module_extract_path', + kind: 'function', + doc_comment: 'Extract module path relative to src/lib from absolute source ID.', + examples: [ + "module_extract_path('/home/user/project/src/lib/foo.ts') // => 'foo.ts'\nmodule_extract_path('/home/user/project/src/lib/nested/bar.svelte') // => 'nested/bar.svelte'", + ], + source_line: 41, + type_signature: '(source_id: string): string', + return_type: 'string', + parameters: [ + { + name: 'source_id', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'module_get_component_name', + kind: 'function', + doc_comment: 'Extract component name from a Svelte module path.', + examples: [ + "module_get_component_name('Alert.svelte') // => 'Alert'\nmodule_get_component_name('components/Button.svelte') // => 'Button'", + ], + source_line: 53, + type_signature: '(module_path: string): string', + return_type: 'string', + parameters: [ + { + name: 'module_path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'module_get_key', + kind: 'function', + doc_comment: 'Convert module path to module key format (with ./ prefix).', + examples: ["module_get_key('foo.ts') // => './foo.ts'"], + source_line: 62, + type_signature: '(module_path: string): string', + return_type: 'string', + parameters: [ + { + name: 'module_path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'module_is_typescript', + kind: 'function', + source_line: 64, + type_signature: '(path: string): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'module_is_svelte', + kind: 'function', + source_line: 67, + type_signature: '(path: string): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'module_is_css', + kind: 'function', + source_line: 69, + type_signature: '(path: string): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'module_is_json', + kind: 'function', + source_line: 71, + type_signature: '(path: string): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'module_is_test', + kind: 'function', + source_line: 73, + type_signature: '(path: string): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'module_matches_source', + kind: 'function', + doc_comment: + 'Check if a path matches source criteria.\n\nChecks source directory paths, file extensions, and exclusion patterns.\nUses defaults if no options provided.\n\nRejects nested repo paths by ensuring the first `/src/` leads to the source directory\n(e.g. rejects `/src/fixtures/repos/foo/src/lib/index.ts` because `/src/fixtures/` ≠ `/src/lib/`).', + source_line: 88, + type_signature: + '(path: string, options?: ModuleSourceOptions | undefined): boolean', + return_type: 'boolean', + return_description: 'True if the path matches all criteria', + parameters: [ + { + name: 'path', + type: 'string', + optional: false, + description: 'Full path to check', + }, + { + name: 'options', + type: 'ModuleSourceOptions | undefined', + optional: true, + description: 'Configuration options (uses defaults if not provided)', + }, + ], + }, + ], + module_comment: + 'Module path and metadata helpers.\n\nProvides utilities for working with source module paths, file types,\nand import relationships in the package generation system.\n\nAll functions are prefixed with `module_` for clarity.', + dependents: [ + 'LibraryDetail.svelte', + 'library_gen.ts', + 'library_gen_helpers.ts', + 'svelte_helpers.ts', + 'ts_helpers.ts', + ], + }, + { + path: 'module.svelte.ts', + declarations: [ + { + name: 'Module', + kind: 'class', + doc_comment: 'Rich runtime representation of a module with computed properties.', + source_line: 10, + members: [ + { + name: 'library', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'Library', + }, + { + name: 'module_json', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'ModuleJson', + }, + { + name: 'path', + kind: 'variable', + doc_comment: "Canonical module path (e.g., 'Alert.ts', 'helpers/foo.ts').", + }, + { + name: 'path_import', + kind: 'variable', + doc_comment: 'Import-style path with ./ prefix.', + }, + { + name: 'module_comment', + kind: 'variable', + }, + { + name: 'declarations', + kind: 'variable', + doc_comment: 'Array of Declaration instances. Filters out default exports.', + }, + { + name: 'url_api', + kind: 'variable', + doc_comment: 'API documentation URL for this module.', + }, + { + name: 'url_github', + kind: 'variable', + doc_comment: 'GitHub source URL.', + }, + { + name: 'has_declarations', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'has_module_comment', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'dependencies', + kind: 'variable', + doc_comment: 'Modules this imports (paths relative to src/lib).', + }, + { + name: 'dependents', + kind: 'variable', + doc_comment: 'Modules that import this (paths relative to src/lib).', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: + '(library: Library, module_json: { [x: string]: unknown; path: string; declarations?: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; ... 19 more ...; alias_of?: { ...; } | undefined; }[] | undefined; module_comment?: string | undefined; dependencies?: string[] | undefined; dependents?: string[] | undefined; }): Module', + parameters: [ + { + name: 'library', + type: 'Library', + optional: false, + }, + { + name: 'module_json', + type: '{ [x: string]: unknown; path: string; declarations?: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; doc_comment?: string | undefined; ... 18 more ...; alias_of?: { ...; } | undefined; }[] | undefined; module_comment?: string | un...', + optional: false, + }, + ], + }, + { + name: 'get_declaration_by_name', + kind: 'function', + doc_comment: 'Look up a declaration by name within this module.', + type_signature: '(name: string): Declaration | undefined', + return_type: 'Declaration | undefined', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + }, + ], + }, + ], + }, + ], + dependencies: ['declaration.svelte.ts', 'library_helpers.ts'], + dependents: ['library.svelte.ts'], + }, + { + path: 'ModuleLink.svelte', + declarations: [ + { + name: 'ModuleLink', + kind: 'component', + props: [ + { + name: 'module_path', + type: 'string', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: [ + 'contextmenu_state.svelte.ts', + 'library.svelte.ts', + 'module_contextmenu.ts', + ], + dependents: [ + 'ApiModule.svelte', + 'DeclarationDetail.svelte', + 'DocsLink.svelte', + 'DocsTertiaryNav.svelte', + 'LibraryDetail.svelte', + ], + }, + { + path: 'PasteFromClipboard.svelte', + declarations: [ + { + name: 'PasteFromClipboard', + kind: 'component', + props: [ + { + name: 'onclipboardtext', + type: '(text: string) => void', + optional: false, + }, + { + name: 'onerror', + type: '(error: Error) => void', + optional: true, + }, + ], + source_line: 1, + }, + ], + }, + { + path: 'PendingAnimation.svelte', + declarations: [ + { + name: 'PendingAnimation', + kind: 'component', + props: [ + { + name: 'inline', + type: 'boolean', + optional: true, + }, + { + name: 'running', + type: 'boolean', + optional: true, + }, + { + name: 'item_attrs', + type: "SvelteHTMLElements['span']", + optional: true, + }, + { + name: 'children', + type: 'Snippet<[index: number]>', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependents: ['ContextmenuEntry.svelte', 'PendingButton.svelte'], + }, + { + path: 'PendingButton.svelte', + declarations: [ + { + name: 'PendingButton', + kind: 'component', + props: [ + { + name: 'pending', + type: 'boolean', + optional: false, + }, + { + name: 'onclick', + type: '() => void', + optional: false, + }, + { + name: 'running', + type: 'boolean', + optional: true, + }, + { + name: 'title', + type: 'string', + optional: true, + }, + { + name: 'disabled', + type: 'boolean', + optional: true, + }, + { + name: 'animation', + type: 'Snippet', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['PendingAnimation.svelte'], + }, + { + path: 'ProjectLinks.svelte', + declarations: [ + { + name: 'ProjectLinks', + kind: 'component', + source_line: 1, + }, + ], + dependencies: ['Svg.svelte', 'logos.ts'], + dependents: ['EcosystemLinksPanel.svelte'], + }, + { + path: 'Redirect.svelte', + declarations: [ + { + name: 'Redirect', + kind: 'component', + props: [ + { + name: 'host', + type: 'string', + optional: true, + description: + 'The target host to redirect to. Defaults to the current `location.host`.', + }, + { + name: 'path', + type: 'string', + optional: true, + description: + 'The target path to redirect to. Defaults to the current `location.pathname`.', + }, + { + name: 'auto', + type: 'boolean', + optional: true, + description: + 'Should the redirect happen automatically without user input? Defaults to `true`.', + }, + { + name: 'children', + type: 'Snippet<[url: string]>', + optional: true, + }, + ], + source_line: 1, + }, + ], + }, + { + path: 'rune_helpers.svelte.ts', + declarations: [ + { + name: 'effect_with_count', + kind: 'function', + doc_comment: + 'Runs `fn` in an `$effect`, passing `true` as the `skip` argument for the first `count` runs.\nCalls `fn` even when skipping so callers can read any dependent signals.', + source_line: 5, + type_signature: '(fn: (count: number) => void, initial?: number): void', + return_type: 'void', + parameters: [ + { + name: 'fn', + type: '(count: number) => void', + optional: false, + }, + { + name: 'initial', + type: 'number', + optional: false, + default_value: '0', + }, + ], + }, + ], + dependents: ['Themed.svelte'], + }, + { + path: 'Spiders.svelte', + declarations: [ + { + name: 'Spiders', + kind: 'component', + props: [ + { + name: 'spiders', + type: 'Array', + optional: true, + }, + { + name: 'seed', + type: 'unknown', + optional: true, + }, + { + name: 'random', + type: 'typeof Math.random', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['Svg.svelte', 'logos.ts'], + }, + { + path: 'storage.ts', + declarations: [ + { + name: 'save_to_storage', + kind: 'function', + doc_comment: 'Utility function to save a value to `localStorage`.', + source_line: 8, + type_signature: '(key: string, value: any, is_json?: boolean): void', + return_type: 'void', + parameters: [ + { + name: 'key', + type: 'string', + optional: false, + }, + { + name: 'value', + type: 'any', + optional: false, + }, + { + name: 'is_json', + type: 'boolean', + optional: false, + default_value: 'false', + }, + ], + }, + { + name: 'load_from_storage', + kind: 'function', + doc_comment: + 'Utility function to load a value from `localStorage` with optional parsing', + source_line: 26, + type_signature: + '(key: string, is_json?: boolean, parse_fn?: ((value: unknown) => T | null) | undefined): T | null', + return_type: 'T | null', + return_description: 'The parsed value or null if not found or parsing fails', + parameters: [ + { + name: 'key', + type: 'string', + optional: false, + description: 'The localStorage key', + }, + { + name: 'is_json', + type: 'boolean', + optional: false, + description: 'Whether to parse the value as JSON', + default_value: 'false', + }, + { + name: 'parse_fn', + type: '((value: unknown) => T | null) | undefined', + optional: true, + description: 'Optional custom parsing function to transform the value', + }, + ], + }, + ], + dependents: ['themer.svelte.ts'], + }, + { + path: 'svelte_helpers.ts', + declarations: [ + { + name: 'svelte_analyze_component', + kind: 'function', + doc_comment: 'Analyze a Svelte component from its svelte2tsx transformation.', + source_line: 27, + type_signature: + '(ts_code: string, source_file: SourceFile, checker: TypeChecker, component_name: string): { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | ... 4 more ... | "css"; ... 19 more ...; alias_of?: { ...; } | undefined; }', + return_type: + '{ [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; doc_comment?: string | undefined; type_signature?: string | undefined; ... 17 more ...; alias_of?: { ...; } | undefined; }', + parameters: [ + { + name: 'ts_code', + type: 'string', + optional: false, + }, + { + name: 'source_file', + type: 'SourceFile', + optional: false, + }, + { + name: 'checker', + type: 'TypeChecker', + optional: false, + }, + { + name: 'component_name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'svelte_analyze_file', + kind: 'function', + doc_comment: + 'Analyze a Svelte component file from disk.\n\nThis is a high-level function that handles the complete workflow:\n1. Read the Svelte source from disk\n2. Transform to TypeScript via svelte2tsx\n3. Extract component metadata (props, documentation)\n\nSuitable for use in documentation generators, build tools, and analysis.', + source_line: 278, + type_signature: + '(file_path: string, module_path: string, checker: TypeChecker): { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; ... 19 more ...; alias_of?: { ...; } | undefined; }', + return_type: + '{ [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; doc_comment?: string | undefined; type_signature?: string | undefined; ... 17 more ...; alias_of?: { ...; } | undefined; }', + return_description: 'Complete declaration metadata for the component', + parameters: [ + { + name: 'file_path', + type: 'string', + optional: false, + description: 'Absolute path to the .svelte file', + }, + { + name: 'module_path', + type: 'string', + optional: false, + description: "Module path relative to src/lib (e.g., 'Alert.svelte')", + }, + { + name: 'checker', + type: 'TypeChecker', + optional: false, + description: 'TypeScript type checker for type resolution', + }, + ], + }, + ], + module_comment: + 'Svelte component analysis helpers.\n\nExtracts metadata from Svelte components using svelte2tsx transformations:\n\n- Component props with types and JSDoc\n- Component-level documentation\n- Type information\n\nWorkflow: Transform Svelte to TypeScript via svelte2tsx, parse the transformed\nTypeScript with the TS Compiler API, extract component-level JSDoc from original source.\n\nAll functions are prefixed with `svelte_` for clarity.', + dependencies: ['module_helpers.ts', 'tsdoc_helpers.ts'], + dependents: ['library_gen_helpers.ts'], + }, + { + path: 'Svg.svelte', + declarations: [ + { + name: 'Svg', + kind: 'component', + props: [ + { + name: 'data', + type: 'SvgData', + optional: false, + }, + { + name: 'fill', + type: 'string | null', + optional: true, + description: 'Overrides `data.fill`.', + }, + { + name: 'size', + type: 'string', + optional: true, + description: + 'Sets both the `width` and `height` of the svg. Overridden by the `width` and `height` props.', + }, + { + name: 'width', + type: 'string', + optional: true, + description: 'Sets the `width` of the svg. Overrides `size`.', + }, + { + name: 'height', + type: 'string', + optional: true, + description: 'Sets the `height` of the svg. Overrides `size`.', + }, + { + name: 'label', + type: 'string', + optional: true, + }, + { + name: 'inline', + type: 'boolean', + optional: true, + description: + 'Renders the SVG as an inline block with spacing appropriate for text. Defaults to `false`.', + }, + { + name: 'shrink', + type: 'boolean', + optional: true, + }, + { + name: 'attrs', + type: "SvelteHTMLElements['svg']", + optional: true, + }, + ], + source_line: 1, + }, + ], + dependents: [ + 'DocsFooter.svelte', + 'GithubLink.svelte', + 'MdnLink.svelte', + 'ProjectLinks.svelte', + 'Spiders.svelte', + ], + }, + { + path: 'Teleport.svelte', + declarations: [ + { + name: 'Teleport', + kind: 'component', + props: [ + { + name: 'to', + type: 'HTMLElement | undefined | null', + optional: true, + description: + "Defaults to `undefined` to lessen friction with SSR.\nWe may want to change this to optionally accept a string selector,\nbut that didn't seem to be the best API for the `Dialog`.", + }, + { + name: 'onmove', + type: '(el: HTMLElement, to: HTMLElement) => void', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependents: ['Dialog.svelte'], + }, + { + path: 'Themed.svelte', + declarations: [ + { + name: 'Themed', + kind: 'component', + props: [ + { + name: 'sync_color_scheme', + type: 'typeof default_sync_color_scheme', + optional: true, + }, + { + name: 'load_color_scheme', + type: 'typeof default_load_color_scheme', + optional: true, + }, + { + name: 'save_color_scheme', + type: 'typeof default_save_color_scheme', + optional: true, + }, + { + name: 'load_theme', + type: 'typeof default_load_theme', + optional: true, + }, + { + name: 'save_theme', + type: 'typeof default_save_theme', + optional: true, + }, + { + name: 'theme_fallback', + type: 'Theme | undefined', + optional: true, + }, + { + name: 'themer', + type: 'Themer', + optional: true, + description: + "A reactive class containing the selected theme and color scheme.\nDefaults to the first default theme.\nThe class reference is not reactive\nbecause it's set in context without a wrapper, use `{#key theme}` if it changes.", + }, + { + name: 'children', + type: 'Snippet<[themer: Themer, style: string | null, theme_style_html: string | null]>', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['rune_helpers.svelte.ts', 'themer.svelte.ts'], + }, + { + path: 'ThemeInput.svelte', + declarations: [ + { + name: 'ThemeInput', + kind: 'component', + props: [ + { + name: 'selected_theme', + type: '{theme: Theme}', + optional: true, + }, + { + name: 'themes', + type: 'Array', + optional: true, + }, + { + name: 'enable_editing', + type: 'boolean', + optional: true, + }, + { + name: 'select', + type: '((theme: Theme) => void | boolean) | null', + optional: true, + }, + { + name: 'onselect', + type: '(theme: Theme) => void', + optional: true, + }, + { + name: 'onedit', + type: '(theme: Theme) => void', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['themer.svelte.ts'], + }, + { + path: 'themer.svelte.ts', + declarations: [ + { + name: 'Themer', + kind: 'class', + source_line: 8, + members: [ + { + name: 'theme', + kind: 'variable', + type_signature: 'Theme', + }, + { + name: 'color_scheme', + kind: 'variable', + type_signature: 'ColorScheme', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: '(theme?: Theme, color_scheme?: ColorScheme): Themer', + parameters: [ + { + name: 'theme', + type: 'Theme', + optional: false, + default_value: 'default_themes[0]!', + }, + { + name: 'color_scheme', + type: 'ColorScheme', + optional: false, + default_value: "'auto'", + }, + ], + }, + { + name: 'toJSON', + kind: 'function', + type_signature: '(): ThemerJson', + return_type: 'ThemerJson', + parameters: [], + }, + ], + }, + { + name: 'ThemerJson', + kind: 'type', + source_line: 28, + type_signature: 'ThemerJson', + properties: [ + { + name: 'theme', + kind: 'variable', + type_signature: 'Theme', + }, + { + name: 'color_scheme', + kind: 'variable', + type_signature: 'ColorScheme', + }, + ], + }, + { + name: 'themer_context', + kind: 'variable', + source_line: 33, + type_signature: + '{ get: (error_message?: string | undefined) => Themer; get_maybe: () => Themer | undefined; set: (value: Themer) => Themer; }', + }, + { + name: 'sync_color_scheme', + kind: 'function', + source_line: 35, + type_signature: '(color_scheme: ColorScheme | null): void', + return_type: 'void', + parameters: [ + { + name: 'color_scheme', + type: 'ColorScheme | null', + optional: false, + }, + ], + }, + { + name: 'COLOR_SCHEME_STORAGE_KEY', + kind: 'variable', + source_line: 44, + type_signature: '"fuz:color-scheme"', + }, + { + name: 'THEME_STORAGE_KEY', + kind: 'variable', + source_line: 45, + type_signature: '"fuz:theme"', + }, + { + name: 'save_color_scheme', + kind: 'function', + source_line: 47, + type_signature: '(color_scheme: ColorScheme | null, key?: string): void', + return_type: 'void', + parameters: [ + { + name: 'color_scheme', + type: 'ColorScheme | null', + optional: false, + }, + { + name: 'key', + type: 'string', + optional: false, + default_value: 'COLOR_SCHEME_STORAGE_KEY', + }, + ], + }, + { + name: 'load_color_scheme', + kind: 'function', + source_line: 54, + type_signature: '(fallback?: ColorScheme, key?: string): ColorScheme', + return_type: 'ColorScheme', + parameters: [ + { + name: 'fallback', + type: 'ColorScheme', + optional: false, + default_value: "'auto'", + }, + { + name: 'key', + type: 'string', + optional: false, + default_value: 'COLOR_SCHEME_STORAGE_KEY', + }, + ], + }, + { + name: 'save_theme', + kind: 'function', + source_line: 59, + type_signature: '(theme: Theme | null, key?: string): void', + return_type: 'void', + parameters: [ + { + name: 'theme', + type: 'Theme | null', + optional: false, + }, + { + name: 'key', + type: 'string', + optional: false, + default_value: 'THEME_STORAGE_KEY', + }, + ], + }, + { + name: 'load_theme', + kind: 'function', + source_line: 63, + type_signature: '(fallback?: Theme, key?: string): Theme', + return_type: 'Theme', + parameters: [ + { + name: 'fallback', + type: 'Theme', + optional: false, + default_value: 'default_themes[0]!', + }, + { + name: 'key', + type: 'string', + optional: false, + default_value: 'THEME_STORAGE_KEY', + }, + ], + }, + ], + dependencies: ['context_helpers.ts', 'storage.ts'], + dependents: ['ColorSchemeInput.svelte', 'ThemeInput.svelte', 'Themed.svelte'], + }, + { + path: 'tome.ts', + declarations: [ + { + name: 'Tome', + kind: 'type', + source_line: 8, + type_signature: + 'ZodObject<{ name: ZodString; category: ZodString; Component: ZodCustom, Component>; related_tomes: ZodArray<...>; related_modules: ZodArray<...>; related_declarations: ZodArray<...>; }, $strip>', + }, + { + name: 'to_tome_pathname', + kind: 'function', + source_line: 19, + type_signature: + '(item: string | { name: string; category: string; Component: Component; related_tomes: string[]; related_modules: string[]; related_declarations: string[]; }, docs_path?: string, hash?: string | undefined): string', + return_type: 'string', + parameters: [ + { + name: 'item', + type: 'string | { name: string; category: string; Component: Component; related_tomes: string[]; related_modules: string[]; related_declarations: string[]; }', + optional: false, + }, + { + name: 'docs_path', + type: 'string', + optional: false, + default_value: 'DOCS_PATH_DEFAULT', + }, + { + name: 'hash', + type: 'string | undefined', + optional: true, + }, + ], + }, + { + name: 'tomes_context', + kind: 'variable', + source_line: 29, + type_signature: + '{ get: (error_message?: string | undefined) => Map; related_tomes: string[]; related_modules: string[]; related_declarations: string[]; }>; get_maybe: () => Map<...> | undefined; set: (value: Map<...>) => Map<...>; }', + }, + { + name: 'get_tome_by_name', + kind: 'function', + source_line: 31, + type_signature: + '(name: string): { name: string; category: string; Component: Component; related_tomes: string[]; related_modules: string[]; related_declarations: string[]; }', + return_type: + '{ name: string; category: string; Component: Component; related_tomes: string[]; related_modules: string[]; related_declarations: string[]; }', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'tome_context', + kind: 'variable', + source_line: 38, + type_signature: + '{ get: (error_message?: string | undefined) => { name: string; category: string; Component: Component; related_tomes: string[]; related_modules: string[]; related_declarations: string[]; }; get_maybe: () => { ...; } | undefined; set: (value: { ...; }) => { ...; }; }', + }, + ], + dependencies: ['context_helpers.ts', 'docs_helpers.svelte.ts'], + dependents: [ + 'ApiIndex.svelte', + 'ApiModule.svelte', + 'Docs.svelte', + 'DocsMenu.svelte', + 'DocsSecondaryNav.svelte', + 'DocsTertiaryNav.svelte', + 'TomeContent.svelte', + 'TomeHeader.svelte', + 'TomeLink.svelte', + ], + }, + { + path: 'TomeContent.svelte', + declarations: [ + { + name: 'TomeContent', + kind: 'component', + props: [ + { + name: 'tome', + type: 'Tome', + optional: false, + }, + { + name: 'docs_path', + type: 'string', + optional: true, + }, + { + name: 'header', + type: 'Snippet', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: [ + 'TomeHeader.svelte', + 'docs_helpers.svelte.ts', + 'intersect.svelte.ts', + 'tome.ts', + ], + dependents: ['ApiIndex.svelte', 'ApiModule.svelte'], + }, + { + path: 'TomeHeader.svelte', + declarations: [ + { + name: 'TomeHeader', + kind: 'component', + source_line: 1, + }, + ], + dependencies: ['Hashlink.svelte', 'docs_helpers.svelte.ts', 'tome.ts'], + dependents: ['TomeContent.svelte'], + }, + { + path: 'TomeLink.svelte', + declarations: [ + { + name: 'TomeLink', + kind: 'component', + props: [ + { + name: 'name', + type: 'string', + optional: false, + }, + { + name: 'docs_path', + type: 'string', + optional: true, + }, + { + name: 'hash', + type: 'string', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['docs_helpers.svelte.ts', 'tome.ts'], + dependents: ['ApiIndex.svelte', 'DocsTertiaryNav.svelte'], + }, + { + path: 'TomeSection.svelte', + declarations: [ + { + name: 'TomeSection', + kind: 'component', + props: [ + { + name: 'children', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['context_helpers.ts', 'docs_helpers.svelte.ts', 'intersect.svelte.ts'], + dependents: [ + 'ApiDeclarationList.svelte', + 'ApiIndex.svelte', + 'ApiModule.svelte', + 'TomeSectionHeader.svelte', + ], + }, + { + path: 'TomeSectionHeader.svelte', + declarations: [ + { + name: 'TomeSectionHeader', + kind: 'component', + props: [ + { + name: 'text', + type: 'string', + optional: false, + }, + { + name: 'tag', + type: 'DocsLinkTag', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['Hashlink.svelte', 'TomeSection.svelte', 'docs_helpers.svelte.ts'], + dependents: ['ApiDeclarationList.svelte', 'ApiIndex.svelte', 'ApiModule.svelte'], + }, + { + path: 'ts_helpers.ts', + declarations: [ + { + name: 'ts_infer_declaration_kind', + kind: 'function', + doc_comment: 'Infer declaration kind from symbol and node.', + source_line: 59, + type_signature: + '(symbol: Symbol, node: Node): "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"', + return_type: + '"function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"', + parameters: [ + { + name: 'symbol', + type: 'Symbol', + optional: false, + }, + { + name: 'node', + type: 'Node', + optional: false, + }, + ], + }, + { + name: 'ts_extract_function_info', + kind: 'function', + doc_comment: + 'Extract function/method information including parameters\nwith descriptions and default values.', + source_line: 89, + type_signature: + '(node: Node, symbol: Symbol, checker: TypeChecker, declaration: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; ... 19 more ...; alias_of?: { ...; } | undefined; }, tsdoc: TsdocParsedComment | undefined): void', + return_type: 'void', + parameters: [ + { + name: 'node', + type: 'Node', + optional: false, + }, + { + name: 'symbol', + type: 'Symbol', + optional: false, + }, + { + name: 'checker', + type: 'TypeChecker', + optional: false, + }, + { + name: 'declaration', + type: '{ [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; doc_comment?: string | undefined; type_signature?: string | undefined; ... 17 more ...; alias_of?: { ...; } | undefined; }', + optional: false, + }, + { + name: 'tsdoc', + type: 'TsdocParsedComment | undefined', + optional: false, + }, + ], + }, + { + name: 'ts_extract_type_info', + kind: 'function', + doc_comment: 'Extract type/interface information with rich property metadata.', + source_line: 160, + type_signature: + '(node: Node, _symbol: Symbol, checker: TypeChecker, declaration: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; ... 19 more ...; alias_of?: { ...; } | undefined; }): void', + return_type: 'void', + parameters: [ + { + name: 'node', + type: 'Node', + optional: false, + }, + { + name: '_symbol', + type: 'Symbol', + optional: false, + }, + { + name: 'checker', + type: 'TypeChecker', + optional: false, + }, + { + name: 'declaration', + type: '{ [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; doc_comment?: string | undefined; type_signature?: string | undefined; ... 17 more ...; alias_of?: { ...; } | undefined; }', + optional: false, + }, + ], + }, + { + name: 'ts_extract_class_info', + kind: 'function', + doc_comment: 'Extract class information with rich member metadata.', + source_line: 224, + type_signature: + '(node: Node, _symbol: Symbol, checker: TypeChecker, declaration: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; ... 19 more ...; alias_of?: { ...; } | undefined; }): void', + return_type: 'void', + parameters: [ + { + name: 'node', + type: 'Node', + optional: false, + }, + { + name: '_symbol', + type: 'Symbol', + optional: false, + }, + { + name: 'checker', + type: 'TypeChecker', + optional: false, + }, + { + name: 'declaration', + type: '{ [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; doc_comment?: string | undefined; type_signature?: string | undefined; ... 17 more ...; alias_of?: { ...; } | undefined; }', + optional: false, + }, + ], + }, + { + name: 'ts_extract_variable_info', + kind: 'function', + doc_comment: 'Extract variable information.', + source_line: 373, + type_signature: + '(node: Node, symbol: Symbol, checker: TypeChecker, declaration: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; ... 19 more ...; alias_of?: { ...; } | undefined; }): void', + return_type: 'void', + parameters: [ + { + name: 'node', + type: 'Node', + optional: false, + }, + { + name: 'symbol', + type: 'Symbol', + optional: false, + }, + { + name: 'checker', + type: 'TypeChecker', + optional: false, + }, + { + name: 'declaration', + type: '{ [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; doc_comment?: string | undefined; type_signature?: string | undefined; ... 17 more ...; alias_of?: { ...; } | undefined; }', + optional: false, + }, + ], + }, + { + name: 'TsDeclarationAnalysis', + kind: 'type', + doc_comment: 'Result of analyzing a single declaration.', + source_line: 390, + type_signature: 'TsDeclarationAnalysis', + properties: [ + { + name: 'declaration', + kind: 'variable', + type_signature: 'DeclarationJson', + doc_comment: 'The analyzed declaration metadata.', + }, + { + name: 'nodocs', + kind: 'variable', + type_signature: 'boolean', + doc_comment: 'Whether the declaration is marked', + }, + ], + }, + { + name: 'ts_analyze_declaration', + kind: 'function', + doc_comment: + 'Analyze a TypeScript symbol and extract rich metadata.\n\nThis is a high-level function that combines TSDoc parsing with TypeScript\ntype analysis to produce complete declaration metadata. Suitable for use\nin documentation generators, IDE integrations, and other tooling.', + source_line: 409, + type_signature: + '(symbol: Symbol, source_file: SourceFile, checker: TypeChecker): TsDeclarationAnalysis', + return_type: 'TsDeclarationAnalysis', + return_description: + 'Complete declaration metadata including docs, types, and parameters, plus nodocs flag', + parameters: [ + { + name: 'symbol', + type: 'Symbol', + optional: false, + description: 'The TypeScript symbol to analyze', + }, + { + name: 'source_file', + type: 'SourceFile', + optional: false, + description: 'The source file containing the symbol', + }, + { + name: 'checker', + type: 'TypeChecker', + optional: false, + description: 'The TypeScript type checker', + }, + ], + }, + { + name: 'ReExportInfo', + kind: 'type', + doc_comment: + 'Information about a same-name re-export.\nUsed for post-processing to build `also_exported_from` arrays.', + source_line: 457, + type_signature: 'ReExportInfo', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + doc_comment: 'Name of the re-exported declaration.', + }, + { + name: 'original_module', + kind: 'variable', + type_signature: 'string', + doc_comment: + 'Module path (relative to src/lib) where the declaration is originally declared.', + }, + ], + }, + { + name: 'ModuleExportsAnalysis', + kind: 'type', + doc_comment: "Result of analyzing a module's exports.", + source_line: 467, + type_signature: 'ModuleExportsAnalysis', + properties: [ + { + name: 'module_comment', + kind: 'variable', + type_signature: 'string', + doc_comment: 'Module-level documentation comment.', + }, + { + name: 'declarations', + kind: 'variable', + type_signature: 'Array', + doc_comment: + 'All exported declarations with their metadata (excludes same-name re-exports).', + }, + { + name: 're_exports', + kind: 'variable', + type_signature: 'Array', + doc_comment: + 'Same-name re-exports (for building also_exported_from in post-processing).', + }, + ], + }, + { + name: 'ts_analyze_module_exports', + kind: 'function', + doc_comment: + 'Analyze all exports from a TypeScript source file.\n\nExtracts the module-level comment and all exported declarations with\ncomplete metadata. Handles re-exports by:\n- Same-name re-exports: tracked in `re_exports` for `also_exported_from` building\n- Renamed re-exports: included as new declarations with `alias_of` metadata\n\nThis is a high-level function suitable for building documentation, API explorers, or analysis tools.', + source_line: 490, + type_signature: + '(source_file: SourceFile, checker: TypeChecker): ModuleExportsAnalysis', + return_type: 'ModuleExportsAnalysis', + return_description: + 'Module comment, array of analyzed declarations, and re-export information', + parameters: [ + { + name: 'source_file', + type: 'SourceFile', + optional: false, + description: 'The TypeScript source file to analyze', + }, + { + name: 'checker', + type: 'TypeChecker', + optional: false, + description: 'The TypeScript type checker', + }, + ], + }, + { + name: 'ts_extract_module_comment', + kind: 'function', + doc_comment: + 'Extract module-level comment.\n\nOnly accepts JSDoc/TSDoc comments (`/** ... *\\/`) followed by a blank line to distinguish\nthem from identifier-level comments. This prevents accidentally treating function/class\ncomments as module comments. Module comments can appear after imports.', + source_line: 571, + type_signature: '(source_file: SourceFile): string | undefined', + return_type: 'string | undefined', + parameters: [ + { + name: 'source_file', + type: 'SourceFile', + optional: false, + }, + ], + }, + { + name: 'ts_create_program', + kind: 'function', + doc_comment: 'Create TypeScript program for analysis.', + source_line: 643, + type_signature: '(log: { warn: (message: string) => void; }): Program | null', + return_type: 'Program | null', + parameters: [ + { + name: 'log', + type: '{ warn: (message: string) => void; }', + optional: false, + }, + ], + }, + ], + module_comment: + 'TypeScript compiler API helpers for extracting metadata from source code.\n\nAll functions are prefixed with `ts_` for clarity.', + dependencies: ['module_helpers.ts', 'tsdoc_helpers.ts'], + dependents: ['library_gen.ts', 'library_gen_helpers.ts'], + }, + { + path: 'tsdoc_helpers.ts', + declarations: [ + { + name: 'TsdocParsedComment', + kind: 'type', + doc_comment: 'Parsed JSDoc/TSDoc comment with structured metadata.', + source_line: 46, + type_signature: 'TsdocParsedComment', + properties: [ + { + name: 'text', + kind: 'variable', + type_signature: 'string', + doc_comment: 'Comment text (excluding comment markers)', + }, + { + name: 'params', + kind: 'variable', + type_signature: 'Map', + doc_comment: 'Parameter descriptions mapped by parameter name', + }, + { + name: 'returns', + kind: 'variable', + type_signature: 'string', + doc_comment: 'Return value description from `@returns`', + }, + { + name: 'throws', + kind: 'variable', + type_signature: 'Array<{type?: string; description: string}>', + doc_comment: 'Thrown errors from `@throws`', + }, + { + name: 'examples', + kind: 'variable', + type_signature: 'Array', + doc_comment: 'Code examples from `@example`', + }, + { + name: 'deprecated_message', + kind: 'variable', + type_signature: 'string', + doc_comment: 'Deprecation message from `@deprecated`', + }, + { + name: 'see_also', + kind: 'variable', + type_signature: 'Array', + doc_comment: 'Related references from `@see`', + }, + { + name: 'since', + kind: 'variable', + type_signature: 'string', + doc_comment: 'Version information from `@since`', + }, + { + name: 'mutates', + kind: 'variable', + type_signature: 'Array', + doc_comment: 'Mutation documentation from `@mutates` (non-standard)', + }, + { + name: 'nodocs', + kind: 'variable', + type_signature: 'boolean', + doc_comment: 'Whether to exclude from documentation. From `@nodocs` tag.', + }, + ], + }, + { + name: 'tsdoc_parse', + kind: 'function', + doc_comment: + 'Parse JSDoc comment from a TypeScript node.\n\nExtracts and parses all JSDoc tags including:\n\n- `@param` - parameter descriptions\n- `@returns` - return value description\n- `@throws` - error documentation\n- `@example` - code examples\n- `@deprecated` - deprecation warnings\n- `@see` - related references\n- `@since` - version information\n- `@mutates` - mutation documentation (non-standard)', + source_line: 133, + type_signature: + '(node: Node, source_file: SourceFile): TsdocParsedComment | undefined', + return_type: 'TsdocParsedComment | undefined', + parameters: [ + { + name: 'node', + type: 'Node', + optional: false, + description: 'The TypeScript node to extract JSDoc from', + }, + { + name: 'source_file', + type: 'SourceFile', + optional: false, + description: 'Source file (used for extracting full` @see` tag text)', + }, + ], + }, + { + name: 'tsdoc_apply_to_declaration', + kind: 'function', + doc_comment: + 'Apply parsed TSDoc metadata to a declaration.\n\nConsolidates the common pattern of assigning TSDoc fields to declarations,\nwith conditional assignment for array fields (only if non-empty).', + source_line: 237, + type_signature: + '(declaration: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; doc_comment?: string | undefined; type_signature?: string | undefined; ... 17 more ...; alias_of?: { ...; } | undefined; }, tsdoc: TsdocParsedComment | undefined): void', + return_type: 'void', + parameters: [ + { + name: 'declaration', + type: '{ [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; doc_comment?: string | undefined; type_signature?: string | undefined; ... 17 more ...; alias_of?: { ...; } | undefined; }', + optional: false, + description: 'declaration object to update', + }, + { + name: 'tsdoc', + type: 'TsdocParsedComment | undefined', + optional: false, + description: 'parsed TSDoc comment (if available)', + }, + ], + }, + ], + module_comment: + 'TSDoc/JSDoc parsing helpers using the TypeScript Compiler API.\n\nProvides `tsdoc_parse()` for extracting JSDoc/TSDoc from TypeScript nodes.\nPrimarily designed for build-time code generation but can be used at runtime.\n\n## Design\n\nPure extraction approach: extracts documentation as-is with minimal transformation,\npreserving source intent. Works around TypeScript Compiler API quirks where needed.\n\nSupports both regular TypeScript and Svelte components (via svelte2tsx output).\n\n## Tag support\n\nSupports a subset of standard TSDoc tags:\n`@param`, `@returns`, `@throws`, `@example`, `@deprecated`, `@see`, `@since`, `@nodocs`.\n\nThe `@nodocs` tag excludes exports from documentation and flat namespace validation.\nThe declaration is still exported and usable, just not documented.\n\nAlso supports `@mutates` (non-standard) for documenting mutations to parameters or external state.\nUse format: `@mutates paramName - description of mutation`.\n\nOnly `@returns` is supported (not `@return`).\n\nThe `@see` tag supports multiple formats: plain URLs (`https://...`), `{@link}` syntax, and module names.\nRelative/absolute path support in `@see` is TBD.\n\n## Behavioral notes\n\nDue to TS Compiler API limitations:\n- Preserves dash separator in `@param` descriptions: `@param x desc` → `"- desc"`\n- `@throws` tags have `{Type}` stripped by TS API; fallback regex extracts first word as error type\n- TS API strips URL protocols from `@see` tag text; we use `getText()` to preserve original format including `{@link}` syntax\n\nAll functions are prefixed with `tsdoc_` for clarity.', + dependents: ['svelte_helpers.ts', 'ts_helpers.ts'], + }, + { + path: 'TypeLink.svelte', + declarations: [ + { + name: 'TypeLink', + kind: 'component', + props: [ + { + name: 'type', + type: 'string', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['DeclarationLink.svelte', 'library.svelte.ts'], + dependents: ['DeclarationDetail.svelte'], + }, + ], + }, + name: '@ryanatkn/fuz', + repo_name: 'fuz', + repo_url: 'https://github.com/ryanatkn/fuz', + owner_name: 'ryanatkn', + homepage_url: 'https://www.fuz.dev/', + logo_url: 'https://www.fuz.dev/logo.svg', + logo_alt: 'a friendly brown spider facing you', + npm_url: 'https://www.npmjs.com/package/@ryanatkn/fuz', + changelog_url: 'https://github.com/ryanatkn/fuz/blob/main/CHANGELOG.md', + published: true, + }, + check_runs: { + status: 'completed', + conclusion: 'success', + }, + pull_requests: [ + { + number: 71, + title: 'use the `dialog` element in `Dialog`', + user: { + login: 'ryanatkn', + }, + draft: true, + }, + ], + }, + { + library_json: { + package_json: { + name: '@ryanatkn/gro', + version: '0.179.0', + description: 'task runner and toolkit extending SvelteKit', + motto: 'generate, run, optimize', + glyph: '🌰', + logo: 'logo.svg', + logo_alt: 'a pixelated green oak acorn with a glint of sun', + public: true, + license: 'MIT', + homepage: 'https://gro.ryanatkn.com/', + author: { + name: 'Ryan Atkinson', + email: 'mail@ryanatkn.com', + url: 'https://www.ryanatkn.com/', + }, + repository: { + type: 'git', + url: 'git+https://github.com/ryanatkn/gro.git', + }, + bugs: 'https://github.com/ryanatkn/gro/issues', + funding: 'https://www.ryanatkn.com/funding', + scripts: { + bootstrap: + 'rm -rf .gro dist && svelte-kit sync && svelte-package && chmod +x ./dist/gro.js && npm link -f', + start: 'gro dev', + dev: 'gro dev', + build: 'gro build', + check: 'gro check', + test: 'gro test', + preview: 'vite preview', + deploy: 'gro deploy', + }, + type: 'module', + engines: { + node: '>=22.15', + }, + bin: { + gro: 'dist/gro.js', + }, + keywords: [ + 'web', + 'tools', + 'task runner', + 'tasks', + 'codegen', + 'svelte', + 'sveltekit', + 'vite', + 'typescript', + ], + dependencies: { + chokidar: '^5.0.0', + dotenv: '^17.2.3', + 'esm-env': '^1.2.2', + mri: '^1.2.0', + 'oxc-parser': '^0.99.0', + prettier: '^3.6.2', + 'prettier-plugin-svelte': '^3.4.0', + 'ts-blank-space': '^0.6.2', + tslib: '^2.8.1', + zod: '^4.1.13', + }, + peerDependencies: { + '@ryanatkn/belt': '>=0.40.0', + '@sveltejs/kit': '^2', + esbuild: '^0.27.0', + svelte: '^5', + typescript: '^5', + vitest: '^3 || ^4', + }, + peerDependenciesMeta: { + '@sveltejs/kit': { + optional: true, + }, + vitest: { + optional: true, + }, + }, + optionalDependencies: { + vitest: '^3 || ^4', + }, + devDependencies: { + '@changesets/changelog-git': '^0.2.1', + '@changesets/types': '^6.1.0', + '@ryanatkn/belt': '^0.40.0', + '@ryanatkn/eslint-config': '^0.9.0', + '@ryanatkn/fuz': '^0.165.0', + '@ryanatkn/fuz_code': '^0.36.0', + '@ryanatkn/moss': '^0.39.0', + '@sveltejs/adapter-static': '^3.0.10', + '@sveltejs/kit': '^2.49.0', + '@sveltejs/package': '^2.5.6', + '@sveltejs/vite-plugin-svelte': '^6.2.1', + '@types/node': '^24.10.1', + esbuild: '^0.27.0', + eslint: '^9.39.1', + 'eslint-plugin-svelte': '^3.13.0', + svelte: '^5.44.1', + 'svelte-check': '^4.3.4', + typescript: '^5.9.3', + 'typescript-eslint': '^8.48.0', + vitest: '^4.0.14', + }, + prettier: { + plugins: ['prettier-plugin-svelte'], + useTabs: true, + printWidth: 100, + singleQuote: true, + bracketSpacing: false, + overrides: [ + { + files: 'package.json', + options: { + useTabs: false, + }, + }, + ], + }, + sideEffects: ['**/*.css'], + files: ['dist', 'src/lib/**/*.ts', '!src/lib/**/*.test.*', '!dist/**/*.test.*'], + exports: { + './package.json': './package.json', + '.': { + types: './dist/index.d.ts', + default: './dist/index.js', + }, + './*.js': { + types: './dist/*.d.ts', + default: './dist/*.js', + }, + './*.ts': { + types: './dist/*.d.ts', + default: './dist/*.js', + }, + }, + }, + source_json: { + name: '@ryanatkn/gro', + version: '0.179.0', + modules: [ + { + path: 'args.ts', + declarations: [ + { + name: 'Args', + kind: 'type', + doc_comment: + "These extend the CLI args for tasks.\nAnything can be assigned to a task's `args`. It's just a mutable POJO dictionary.\nDownstream tasks will see args that upstream events mutate,\nunless `invoke_task` is called with modified args.\nUpstream tasks can use listeners to respond to downstream events and values.\nIt's a beautiful mutable spaghetti mess. cant get enough\nThe raw CLI args are handled by `mri` - https://github.com/lukeed/mri", + source_line: 14, + type_signature: 'Args', + properties: [ + { + name: '_', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'help', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'ArgValue', + kind: 'type', + source_line: 20, + type_signature: 'ArgValue', + }, + { + name: 'ArgSchema', + kind: 'type', + source_line: 22, + type_signature: 'ArgSchema', + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'default', + kind: 'variable', + type_signature: 'ArgValue', + }, + { + name: 'description', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'parse_args', + kind: 'function', + doc_comment: + "Parses user input args with a Zod schema.\nSets the correct source of truth for `no-` versions of args,\nto the opposite of the unprefixed versions when not included in `unparsed_args`.\nThis is needed because CLI args don't have a normal way of setting falsy values,\nso instead the args parser `mri` will pass through the truthy versions of args\nwithout the `no-` prefix.\nWhen we declare task args schemas,\nwe need include both versions with their defaults to get correct `--help` output.\nParsing like this also ensures data consistency for both versions because `mri` only creates one.\nA simpler implementation could replace `mri`, but it handles some finicky details well.", + source_line: 40, + type_signature: + ' = Args, TInput extends Record = Args>(unparsed_args: TInput, schema: ZodType>): ZodSafeParseResult<...>', + return_type: 'ZodSafeParseResult', + parameters: [ + { + name: 'unparsed_args', + type: 'TInput', + optional: false, + }, + { + name: 'schema', + type: 'ZodType>', + optional: false, + }, + ], + }, + { + name: 'serialize_args', + kind: 'function', + doc_comment: 'Serializes parsed `Args` for CLI commands.', + source_line: 68, + type_signature: '(args: Args): string[]', + return_type: 'string[]', + parameters: [ + { + name: 'args', + type: 'Args', + optional: false, + }, + ], + }, + { + name: 'to_task_args', + kind: 'function', + doc_comment: + 'Parses `task_name` and `args` from `process.argv` using `mri`,\nignoring anything after any `--`.', + source_line: 97, + type_signature: '(argv?: string[]): { task_name: string; args: Args; }', + return_type: '{ task_name: string; args: Args; }', + parameters: [ + { + name: 'argv', + type: 'string[]', + optional: false, + default_value: 'process.argv', + }, + ], + }, + { + name: 'to_raw_rest_args', + kind: 'function', + doc_comment: + 'Gets the array of raw string args starting with the first `--`, if any.', + source_line: 108, + type_signature: '(argv?: string[]): string[]', + return_type: 'string[]', + parameters: [ + { + name: 'argv', + type: 'string[]', + optional: false, + default_value: 'process.argv', + }, + ], + }, + { + name: 'to_forwarded_args', + kind: 'function', + doc_comment: + "Parses `process.argv` for the specified `command`, so given\n`gro taskname arg1 --arg2 -- eslint eslintarg1 --eslintarg2 -- tsc --tscarg1 --tscarg2`\nthe `command` `'eslint'` returns `eslintarg1 --eslintarg2`\nand `'tsc'` returns `--tscarg1` and `--tscarg2`.", + source_line: 119, + type_signature: + '(command: string, raw_rest_args?: string[] | undefined, cache?: Record): Args', + return_type: 'Args', + parameters: [ + { + name: 'command', + type: 'string', + optional: false, + }, + { + name: 'raw_rest_args', + type: 'string[] | undefined', + optional: true, + }, + { + name: 'cache', + type: 'Record', + optional: false, + default_value: 'to_forwarded_args_by_command(raw_rest_args)', + }, + ], + }, + { + name: 'to_forwarded_args_by_command', + kind: 'function', + source_line: 125, + type_signature: '(raw_rest_args?: string[]): Record', + return_type: 'Record', + parameters: [ + { + name: 'raw_rest_args', + type: 'string[]', + optional: false, + default_value: 'to_raw_rest_args()', + }, + ], + }, + { + name: 'to_implicit_forwarded_args', + kind: 'function', + doc_comment: + 'Gets all args after the first `--` without assuming a command name.\nThis is useful for tasks that want to forward args directly to a tool\nwithout requiring users to specify the tool name explicitly.\nOptionally strips a specific command name if present for backward compatibility.', + examples: [ + "```ts\n// `gro test -- --watch` → {watch: true}\n// `gro test -- foo.test.ts` → {_: ['foo.test.ts']}\n// `gro test -- vitest --watch` with command_to_strip='vitest' → {watch: true}\nto_implicit_forwarded_args('vitest')\n```", + ], + source_line: 181, + type_signature: + '(command_to_strip?: string | undefined, raw_rest_args?: string[]): Args', + return_type: 'Args', + parameters: [ + { + name: 'command_to_strip', + type: 'string | undefined', + optional: true, + }, + { + name: 'raw_rest_args', + type: 'string[]', + optional: false, + default_value: 'to_raw_rest_args()', + }, + ], + }, + { + name: 'print_command_args', + kind: 'function', + source_line: 199, + type_signature: '(serialized_args: string[]): string', + return_type: 'string', + parameters: [ + { + name: 'serialized_args', + type: 'string[]', + optional: false, + }, + ], + }, + ], + dependents: [ + 'cli.ts', + 'format_directory.ts', + 'gro_plugin_sveltekit_app.ts', + 'invoke.ts', + 'invoke_task.ts', + 'lint.task.ts', + 'run.task.ts', + 'run_task.ts', + 'sveltekit_helpers.ts', + 'test.task.ts', + 'typecheck.task.ts', + 'upgrade.task.ts', + ], + }, + { + path: 'build_cache.ts', + declarations: [ + { + name: 'BUILD_CACHE_METADATA_FILENAME', + kind: 'variable', + source_line: 21, + type_signature: '"build.json"', + }, + { + name: 'BUILD_CACHE_VERSION', + kind: 'variable', + source_line: 22, + type_signature: '"1"', + }, + { + name: 'BuildOutputEntry', + kind: 'type', + doc_comment: + 'Metadata about a single build output file.\nIncludes cryptographic hash for validation plus filesystem stats for debugging and optimization.', + source_line: 28, + type_signature: + 'ZodObject<{ path: ZodString; hash: ZodString; size: ZodNumber; mtime: ZodNumber; ctime: ZodNumber; mode: ZodNumber; }, $strict>', + }, + { + name: 'BuildCacheMetadata', + kind: 'type', + doc_comment: + 'Metadata stored in .gro/ directory to track build cache validity.\nSchema validates structure at load time to catch corrupted cache files.', + source_line: 46, + type_signature: + 'ZodObject<{ version: ZodString; git_commit: ZodNullable; build_cache_config_hash: ZodString; timestamp: ZodString; outputs: ZodArray<...>; }, $strict>', + }, + { + name: 'compute_build_cache_key', + kind: 'function', + doc_comment: + 'Computes the cache key components for a build.\nThis determines whether a cached build can be reused.', + source_line: 67, + type_signature: + '(config: GroConfig, log: Logger, git_commit?: string | null | undefined): Promise<{ git_commit: string | null; build_cache_config_hash: string; }>', + return_type: + 'Promise<{ git_commit: string | null; build_cache_config_hash: string; }>', + parameters: [ + { + name: 'config', + type: 'GroConfig', + optional: false, + description: + 'Gro config (build_cache_config_hash is already computed during config load)', + }, + { + name: 'log', + type: 'Logger', + optional: false, + description: 'Logger', + }, + { + name: 'git_commit', + type: 'string | null | undefined', + optional: true, + description: + 'Optional pre-computed git commit hash (optimization to avoid re-reading)', + }, + ], + }, + { + name: 'load_build_cache_metadata', + kind: 'function', + doc_comment: + 'Loads build cache metadata from .gro/ directory.\nInvalid or corrupted cache files are automatically deleted.', + source_line: 92, + type_signature: + '(): { version: string; git_commit: string | null; build_cache_config_hash: string; timestamp: string; outputs: { path: string; hash: string; size: number; mtime: number; ctime: number; mode: number; }[]; } | null', + return_type: + '{ version: string; git_commit: string | null; build_cache_config_hash: string; timestamp: string; outputs: { path: string; hash: string; size: number; mtime: number; ctime: number; mode: number; }[]; } | null', + parameters: [], + }, + { + name: 'save_build_cache_metadata', + kind: 'function', + doc_comment: + "Saves build cache metadata to .gro/ directory.\nErrors are logged but don't fail the build (cache is optional).", + source_line: 134, + type_signature: + '(metadata: { version: string; git_commit: string | null; build_cache_config_hash: string; timestamp: string; outputs: { path: string; hash: string; size: number; mtime: number; ctime: number; mode: number; }[]; }, log?: Logger | undefined): void', + return_type: 'void', + parameters: [ + { + name: 'metadata', + type: '{ version: string; git_commit: string | null; build_cache_config_hash: string; timestamp: string; outputs: { path: string; hash: string; size: number; mtime: number; ctime: number; mode: number; }[]; }', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'validate_build_cache', + kind: 'function', + doc_comment: + 'Validates that a cached build is still valid by checking stats and hashing outputs.\nUses size as a fast negative check before expensive hashing.\nThis is comprehensive validation to catch manual tampering or corruption.', + source_line: 155, + type_signature: + '(metadata: { version: string; git_commit: string | null; build_cache_config_hash: string; timestamp: string; outputs: { path: string; hash: string; size: number; mtime: number; ctime: number; mode: number; }[]; }): Promise<...>', + return_type: 'Promise', + parameters: [ + { + name: 'metadata', + type: '{ version: string; git_commit: string | null; build_cache_config_hash: string; timestamp: string; outputs: { path: string; hash: string; size: number; mtime: number; ctime: number; mode: number; }[]; }', + optional: false, + }, + ], + }, + { + name: 'is_build_cache_valid', + kind: 'function', + doc_comment: + 'Main function to check if the build cache is valid.\nReturns true if the cached build can be used, false if a fresh build is needed.', + source_line: 195, + type_signature: + '(config: GroConfig, log: Logger, git_commit?: string | null | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'config', + type: 'GroConfig', + optional: false, + description: 'Gro config', + }, + { + name: 'log', + type: 'Logger', + optional: false, + description: 'Logger', + }, + { + name: 'git_commit', + type: 'string | null | undefined', + optional: true, + description: 'Optional pre-computed git commit hash (optimization)', + }, + ], + }, + { + name: 'collect_build_outputs', + kind: 'function', + doc_comment: + 'Collects information about all files in build output directories.\nReturns an array of entries with path, hash, size, mtime, ctime, and mode.\n\nFiles are hashed in parallel for performance. For very large builds (10k+ files),\nthis may take several seconds but ensures complete cache validation.', + source_line: 241, + type_signature: + '(build_dirs: string[]): Promise<{ path: string; hash: string; size: number; mtime: number; ctime: number; mode: number; }[]>', + return_type: + 'Promise<{ path: string; hash: string; size: number; mtime: number; ctime: number; mode: number; }[]>', + parameters: [ + { + name: 'build_dirs', + type: 'string[]', + optional: false, + description: + "Array of output directories to scan (e.g., ['build', 'dist', 'dist_server'])", + }, + ], + }, + { + name: 'discover_build_output_dirs', + kind: 'function', + doc_comment: + 'Discovers all build output directories in the current working directory.\nReturns an array of directory names that exist: build/, dist/, dist_*', + source_line: 308, + type_signature: '(): string[]', + return_type: 'string[]', + parameters: [], + }, + { + name: 'create_build_cache_metadata', + kind: 'function', + doc_comment: + 'Creates build cache metadata after a successful build.\nAutomatically discovers all build output directories (build/, dist/, dist_*).', + source_line: 346, + type_signature: + '(config: GroConfig, log: Logger, git_commit?: string | null | undefined, build_dirs?: string[] | undefined): Promise<{ version: string; git_commit: string | null; build_cache_config_hash: string; timestamp: string; outputs: { ...; }[]; }>', + return_type: + 'Promise<{ version: string; git_commit: string | null; build_cache_config_hash: string; timestamp: string; outputs: { path: string; hash: string; size: number; mtime: number; ctime: number; mode: number; }[]; }>', + parameters: [ + { + name: 'config', + type: 'GroConfig', + optional: false, + description: 'Gro config', + }, + { + name: 'log', + type: 'Logger', + optional: false, + description: 'Logger', + }, + { + name: 'git_commit', + type: 'string | null | undefined', + optional: true, + description: 'Optional pre-computed git commit hash (optimization)', + }, + { + name: 'build_dirs', + type: 'string[] | undefined', + optional: true, + description: + 'Optional pre-discovered build directories (optimization to avoid redundant filesystem scans)', + }, + ], + }, + ], + dependencies: ['constants.ts', 'hash.ts', 'paths.ts'], + dependents: ['build.task.ts'], + }, + { + path: 'build.task.ts', + declarations: [ + { + name: 'GIT_SHORT_HASH_LENGTH', + kind: 'variable', + doc_comment: + 'Length of git commit hash when displayed in logs (standard git convention).', + source_line: 37, + type_signature: '7', + }, + ], + dependencies: ['build_cache.ts', 'clean_fs.ts', 'paths.ts', 'plugin.ts', 'task.ts'], + }, + { + path: 'changelog.ts', + declarations: [ + { + name: 'update_changelog', + kind: 'function', + doc_comment: + "Updates a changelog produced by `@changesets/changelog-git` with better links and formatting.\nIt's similar to `@changesets/changelog-github` but doesn't require a token for light usage.\nThis may be better implemented as a standalone dependency\nas an alternative to `@changesets/changelog-git`.", + source_line: 15, + type_signature: + '(owner: string, repo: string, path?: string, token?: string | undefined, log?: Logger | undefined, cache?: Map): Promise<...>', + return_type: 'Promise', + return_description: 'boolean indicating if the changelog changed', + parameters: [ + { + name: 'owner', + type: 'string', + optional: false, + }, + { + name: 'repo', + type: 'string', + optional: false, + }, + { + name: 'path', + type: 'string', + optional: false, + default_value: "'CHANGELOG.md'", + }, + { + name: 'token', + type: 'string | undefined', + optional: true, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'cache', + type: 'Map', + optional: false, + default_value: 'new Map()', + }, + ], + }, + ], + dependencies: ['github.ts'], + dependents: ['publish.task.ts'], + }, + { + path: 'changeset_helpers.ts', + declarations: [ + { + name: 'CHANGESET_RESTRICTED_ACCESS', + kind: 'variable', + source_line: 3, + type_signature: '"restricted"', + }, + { + name: 'CHANGESET_PUBLIC_ACCESS', + kind: 'variable', + source_line: 4, + type_signature: '"public"', + }, + { + name: 'ChangesetAccess', + kind: 'type', + source_line: 6, + type_signature: 'ZodEnum<{ restricted: "restricted"; public: "public"; }>', + }, + { + name: 'CHANGESET_CLI', + kind: 'variable', + source_line: 9, + type_signature: '"changeset"', + }, + { + name: 'CHANGESET_DIR', + kind: 'variable', + source_line: 11, + type_signature: '".changeset"', + }, + { + name: 'ChangesetBump', + kind: 'type', + source_line: 13, + type_signature: 'ZodEnum<{ patch: "patch"; minor: "minor"; major: "major"; }>', + }, + ], + dependents: ['changeset.task.ts', 'publish.task.ts'], + }, + { + path: 'changeset.task.ts', + declarations: [], + dependencies: [ + 'changeset_helpers.ts', + 'cli.ts', + 'package_json.ts', + 'sveltekit_helpers.ts', + 'task.ts', + ], + }, + { + path: 'check.task.ts', + declarations: [], + dependencies: ['package_json.ts', 'task.ts'], + }, + { + path: 'child_process_logging.ts', + declarations: [ + { + name: 'map_child_process_output', + kind: 'function', + doc_comment: 'Maps child process output through a transform function.', + source_line: 7, + type_signature: + '(child_process: ChildProcess, transform: (data: string) => string): void', + return_type: 'void', + parameters: [ + { + name: 'child_process', + type: 'ChildProcess', + optional: false, + }, + { + name: 'transform', + type: '(data: string) => string', + optional: false, + }, + ], + }, + { + name: 'configure_colored_output_with_path_replacement', + kind: 'function', + doc_comment: + 'Configures process output handling with path replacements while preserving ANSI colors.', + source_line: 27, + type_signature: + '(child_process: ChildProcess, replacement?: string, cwd?: string): void', + return_type: 'void', + parameters: [ + { + name: 'child_process', + type: 'ChildProcess', + optional: false, + }, + { + name: 'replacement', + type: 'string', + optional: false, + default_value: "'.'", + }, + { + name: 'cwd', + type: 'string', + optional: false, + default_value: 'process.cwd()', + }, + ], + }, + ], + dependents: ['typecheck.task.ts'], + }, + { + path: 'clean_fs.ts', + declarations: [ + { + name: 'clean_fs', + kind: 'function', + source_line: 14, + type_signature: + '({ build, build_dev, build_dist, sveltekit, nodemodules, }: { build?: boolean | undefined; build_dev?: boolean | undefined; build_dist?: boolean | undefined; sveltekit?: boolean | undefined; nodemodules?: boolean | undefined; }, rm_options?: RmOptions): Promise<...>', + return_type: 'Promise', + parameters: [ + { + name: '__0', + type: '{ build?: boolean | undefined; build_dev?: boolean | undefined; build_dist?: boolean | undefined; sveltekit?: boolean | undefined; nodemodules?: boolean | undefined; }', + optional: false, + }, + { + name: 'rm_options', + type: 'RmOptions', + optional: false, + default_value: '{force: true, recursive: true}', + }, + ], + }, + ], + dependencies: ['constants.ts', 'paths.ts'], + dependents: ['build.task.ts', 'clean.task.ts', 'dev.task.ts'], + }, + { + path: 'clean.task.ts', + declarations: [], + dependencies: ['clean_fs.ts'], + }, + { + path: 'cli.ts', + declarations: [ + { + name: 'Cli', + kind: 'type', + source_line: 19, + type_signature: 'Cli', + }, + { + name: 'find_cli', + kind: 'function', + doc_comment: + 'Searches the filesystem for the CLI `name`, first local to the cwd and then globally.', + source_line: 27, + type_signature: + '(name: string, cwd?: string | URL, options?: SpawnOptions | undefined): Cli | null', + return_type: 'Cli | null', + return_description: '`null` if not found locally or globally', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + }, + { + name: 'cwd', + type: 'string | URL', + optional: false, + default_value: 'process.cwd()', + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'spawn_cli', + kind: 'function', + doc_comment: + "Spawns a CLI if available using Belt's `spawn`.\nIf a string is provided for `name_or_cli`, it checks first local to the cwd and then globally.", + source_line: 48, + type_signature: + '(name_or_cli: string | Cli, args?: string[], log?: Logger | undefined, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + return_description: '`undefined` if no CLI is found, or the spawn result', + parameters: [ + { + name: 'name_or_cli', + type: 'string | Cli', + optional: false, + }, + { + name: 'args', + type: 'string[]', + optional: false, + default_value: '[]', + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'spawn_cli_process', + kind: 'function', + doc_comment: + "Spawns a CLI if available using Belt's `spawn_process`.\nIf a string is provided for `name_or_cli`, it checks first local to the cwd and then globally.", + source_line: 64, + type_signature: + '(name_or_cli: string | Cli, args?: string[], log?: Logger | undefined, options?: SpawnOptions | undefined): SpawnedProcess | undefined', + return_type: 'SpawnedProcess | undefined', + return_description: '`undefined` if no CLI is found, or the spawn result', + parameters: [ + { + name: 'name_or_cli', + type: 'string | Cli', + optional: false, + }, + { + name: 'args', + type: 'string[]', + optional: false, + default_value: '[]', + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'resolve_cli', + kind: 'function', + source_line: 75, + type_signature: + '(name_or_cli: string | Cli, args: string[] | undefined, cwd: string | URL | undefined, log?: Logger | undefined, options?: SpawnOptions | undefined): Cli | undefined', + return_type: 'Cli | undefined', + parameters: [ + { + name: 'name_or_cli', + type: 'string | Cli', + optional: false, + }, + { + name: 'args', + type: 'string[]', + optional: false, + default_value: '[]', + }, + { + name: 'cwd', + type: 'string | URL | undefined', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'to_cli_name', + kind: 'function', + source_line: 96, + type_signature: '(cli: string | Cli): string', + return_type: 'string', + parameters: [ + { + name: 'cli', + type: 'string | Cli', + optional: false, + }, + ], + }, + ], + dependencies: ['args.ts', 'constants.ts'], + dependents: [ + 'changeset.task.ts', + 'format_directory.ts', + 'gro_plugin_gen.ts', + 'gro_plugin_sveltekit_app.ts', + 'lint.task.ts', + 'publish.task.ts', + 'sveltekit_helpers.ts', + 'test.task.ts', + 'typecheck.task.ts', + 'upgrade.task.ts', + ], + }, + { + path: 'commit.task.ts', + declarations: [], + }, + { + path: 'constants.ts', + declarations: [ + { + name: 'SOURCE_DIRNAME', + kind: 'variable', + source_line: 10, + type_signature: '"src"', + }, + { + name: 'GRO_DIRNAME', + kind: 'variable', + source_line: 11, + type_signature: '".gro"', + }, + { + name: 'GRO_DIST_PREFIX', + kind: 'variable', + source_line: 12, + type_signature: '"dist_"', + }, + { + name: 'SERVER_DIST_PATH', + kind: 'variable', + source_line: 13, + type_signature: '"dist_server"', + }, + { + name: 'GRO_DEV_DIRNAME', + kind: 'variable', + source_line: 14, + type_signature: 'string', + }, + { + name: 'SOURCE_DIR', + kind: 'variable', + doc_comment: '', + source_line: 16, + type_signature: 'string', + }, + { + name: 'GRO_DIR', + kind: 'variable', + doc_comment: '', + source_line: 18, + type_signature: 'string', + }, + { + name: 'GRO_DEV_DIR', + kind: 'variable', + doc_comment: '', + source_line: 20, + type_signature: 'string', + }, + { + name: 'GRO_CONFIG_FILENAME', + kind: 'variable', + source_line: 21, + type_signature: '"gro.config.ts"', + }, + { + name: 'README_FILENAME', + kind: 'variable', + source_line: 22, + type_signature: '"README.md"', + }, + { + name: 'SVELTE_CONFIG_FILENAME', + kind: 'variable', + source_line: 23, + type_signature: '"svelte.config.js"', + }, + { + name: 'VITE_CONFIG_FILENAME', + kind: 'variable', + source_line: 24, + type_signature: '"vite.config.ts"', + }, + { + name: 'NODE_MODULES_DIRNAME', + kind: 'variable', + source_line: 25, + type_signature: '"node_modules"', + }, + { + name: 'PACKAGE_JSON_FILENAME', + kind: 'variable', + source_line: 26, + type_signature: '"package.json"', + }, + { + name: 'LOCKFILE_FILENAME', + kind: 'variable', + source_line: 27, + type_signature: '"package-lock.json"', + }, + { + name: 'SVELTEKIT_DEV_DIRNAME', + kind: 'variable', + source_line: 28, + type_signature: '".svelte-kit"', + }, + { + name: 'SVELTEKIT_BUILD_DIRNAME', + kind: 'variable', + source_line: 29, + type_signature: '"build"', + }, + { + name: 'SVELTEKIT_DIST_DIRNAME', + kind: 'variable', + source_line: 30, + type_signature: '"dist"', + }, + { + name: 'SVELTEKIT_VITE_CACHE_PATH', + kind: 'variable', + source_line: 31, + type_signature: 'string', + }, + { + name: 'GITHUB_DIRNAME', + kind: 'variable', + source_line: 32, + type_signature: '".github"', + }, + { + name: 'GIT_DIRNAME', + kind: 'variable', + source_line: 33, + type_signature: '".git"', + }, + { + name: 'TSCONFIG_FILENAME', + kind: 'variable', + source_line: 34, + type_signature: '"tsconfig.json"', + }, + { + name: 'TS_MATCHER', + kind: 'variable', + source_line: 36, + type_signature: 'RegExp', + }, + { + name: 'JS_MATCHER', + kind: 'variable', + source_line: 37, + type_signature: 'RegExp', + }, + { + name: 'JSON_MATCHER', + kind: 'variable', + source_line: 38, + type_signature: 'RegExp', + }, + { + name: 'SVELTE_MATCHER', + kind: 'variable', + source_line: 39, + type_signature: 'RegExp', + }, + { + name: 'SVELTE_RUNES_MATCHER', + kind: 'variable', + source_line: 40, + type_signature: 'RegExp', + }, + { + name: 'CSS_MATCHER', + kind: 'variable', + source_line: 41, + type_signature: 'RegExp', + }, + { + name: 'SVELTE_SCRIPT_MATCHER', + kind: 'variable', + doc_comment: 'Extracts the script content from Svelte files.', + source_line: 43, + type_signature: 'RegExp', + }, + { + name: 'SVELTEKIT_ENV_MATCHER', + kind: 'variable', + source_line: 44, + type_signature: 'RegExp', + }, + { + name: 'SVELTEKIT_GLOBAL_SPECIFIER', + kind: 'variable', + source_line: 45, + type_signature: 'RegExp', + }, + { + name: 'EVERYTHING_MATCHER', + kind: 'variable', + source_line: 46, + type_signature: 'RegExp', + }, + { + name: 'JS_CLI_DEFAULT', + kind: 'variable', + source_line: 48, + type_signature: '"node"', + }, + { + name: 'PM_CLI_DEFAULT', + kind: 'variable', + source_line: 49, + type_signature: '"npm"', + }, + { + name: 'PRETTIER_CLI_DEFAULT', + kind: 'variable', + source_line: 50, + type_signature: '"prettier"', + }, + { + name: 'SVELTEKIT_CLI', + kind: 'variable', + source_line: 51, + type_signature: '"svelte-kit"', + }, + { + name: 'SVELTE_CHECK_CLI', + kind: 'variable', + source_line: 52, + type_signature: '"svelte-check"', + }, + { + name: 'SVELTE_PACKAGE_CLI', + kind: 'variable', + source_line: 53, + type_signature: '"svelte-package"', + }, + { + name: 'SVELTE_PACKAGE_DEP_NAME', + kind: 'variable', + source_line: 54, + type_signature: '"@sveltejs/package"', + }, + { + name: 'VITE_CLI', + kind: 'variable', + source_line: 55, + type_signature: '"vite"', + }, + { + name: 'VITEST_CLI', + kind: 'variable', + source_line: 56, + type_signature: '"vitest"', + }, + ], + dependents: [ + 'build_cache.ts', + 'clean_fs.ts', + 'cli.ts', + 'deploy.task.ts', + 'esbuild_plugin_svelte.ts', + 'esbuild_plugin_sveltekit_local_imports.ts', + 'esbuild_plugin_sveltekit_shim_app.ts', + 'esbuild_plugin_sveltekit_shim_env.ts', + 'filer.ts', + 'format_directory.ts', + 'gen.task.ts', + 'gro_config.ts', + 'gro_helpers.ts', + 'gro_plugin_server.ts', + 'gro_plugin_sveltekit_app.ts', + 'gro_plugin_sveltekit_library.ts', + 'loader.ts', + 'module.ts', + 'package_json.ts', + 'parse_exports.ts', + 'parse_imports.ts', + 'paths.ts', + 'reinstall.task.ts', + 'source_json.ts', + 'svelte_config.ts', + 'sveltekit_helpers.ts', + 'test.task.ts', + 'typecheck.task.ts', + 'upgrade.task.ts', + ], + }, + { + path: 'deploy.task.ts', + declarations: [], + dependencies: ['constants.ts', 'paths.ts', 'task.ts'], + }, + { + path: 'dev.task.ts', + declarations: [ + { + name: 'DevTask_Context', + kind: 'type', + source_line: 22, + type_signature: 'DevTask_Context', + }, + ], + dependencies: ['clean_fs.ts', 'plugin.ts'], + }, + { + path: 'disknode.ts', + declarations: [ + { + name: 'Disknode', + kind: 'type', + source_line: 5, + type_signature: 'Disknode', + properties: [ + { + name: 'id', + kind: 'variable', + type_signature: 'PathId', + }, + { + name: 'contents', + kind: 'variable', + type_signature: 'string | null', + doc_comment: + "`null` contents means it doesn't exist.\nWe create the file in memory to track its dependents regardless of its existence on disk.", + }, + { + name: 'external', + kind: 'variable', + type_signature: 'boolean', + doc_comment: + 'Is the source file outside of the `root_dir` or excluded by `watch_dir_options.filter`?', + }, + { + name: 'ctime', + kind: 'variable', + type_signature: 'number | null', + }, + { + name: 'mtime', + kind: 'variable', + type_signature: 'number | null', + }, + { + name: 'dependents', + kind: 'variable', + type_signature: 'Map', + }, + { + name: 'dependencies', + kind: 'variable', + type_signature: 'Map', + }, + ], + }, + ], + }, + { + path: 'env.ts', + declarations: [ + { + name: 'load_env', + kind: 'function', + source_line: 5, + type_signature: + '(dev: boolean, visibility: "public" | "private", public_prefix: string, private_prefix: string, env_dir?: string | undefined, env_files?: string[], ambient_env?: ProcessEnv): Record<...>', + return_type: 'Record', + parameters: [ + { + name: 'dev', + type: 'boolean', + optional: false, + }, + { + name: 'visibility', + type: '"public" | "private"', + optional: false, + }, + { + name: 'public_prefix', + type: 'string', + optional: false, + }, + { + name: 'private_prefix', + type: 'string', + optional: false, + }, + { + name: 'env_dir', + type: 'string | undefined', + optional: true, + }, + { + name: 'env_files', + type: 'string[]', + optional: false, + default_value: "['.env', '.env.' + (dev ? 'development' : 'production')]", + }, + { + name: 'ambient_env', + type: 'ProcessEnv', + optional: false, + default_value: 'process.env', + }, + ], + }, + { + name: 'load_from_env', + kind: 'function', + doc_comment: + 'Loads a single env value without merging it into `process.env`.\nBy default searches process.env, then a local `.env` if one exists, then `../.env` if it exists.\nEmpty strings are semantically the same as `undefined` for more ergonomic fallbacks.', + source_line: 26, + type_signature: '(key: string, paths?: string[]): string | undefined', + return_type: 'string | undefined', + parameters: [ + { + name: 'key', + type: 'string', + optional: false, + }, + { + name: 'paths', + type: 'string[]', + optional: false, + default_value: "['.env', '../.env']", + }, + ], + }, + { + name: 'merge_envs', + kind: 'function', + source_line: 43, + type_signature: + '(envs: Record[], visibility: "public" | "private", public_prefix: string, private_prefix: string): Record', + return_type: 'Record', + parameters: [ + { + name: 'envs', + type: 'Record[]', + optional: false, + }, + { + name: 'visibility', + type: '"public" | "private"', + optional: false, + }, + { + name: 'public_prefix', + type: 'string', + optional: false, + }, + { + name: 'private_prefix', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'is_private_env', + kind: 'function', + source_line: 66, + type_signature: + '(key: string, public_prefix: string, private_prefix: string): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'key', + type: 'string', + optional: false, + }, + { + name: 'public_prefix', + type: 'string', + optional: false, + }, + { + name: 'private_prefix', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'is_public_env', + kind: 'function', + source_line: 73, + type_signature: + '(key: string, public_prefix: string, private_prefix: string): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'key', + type: 'string', + optional: false, + }, + { + name: 'public_prefix', + type: 'string', + optional: false, + }, + { + name: 'private_prefix', + type: 'string', + optional: false, + }, + ], + }, + ], + dependents: ['publish.task.ts', 'sveltekit_shim_env.ts'], + }, + { + path: 'esbuild_helpers.ts', + declarations: [ + { + name: 'print_build_result', + kind: 'function', + source_line: 7, + type_signature: '(log: Logger, build_result: BuildResult): void', + return_type: 'void', + parameters: [ + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'build_result', + type: 'BuildResult', + optional: false, + }, + ], + }, + { + name: 'to_define_import_meta_env', + kind: 'function', + doc_comment: "Creates an esbuild `define` shim for Vite's `import.meta\\.env`.", + see_also: ['https://esbuild.github.io/api/#define'], + source_line: 29, + type_signature: + '(dev: boolean, base_url: "" | `/${string}` | undefined, ssr?: boolean, mode?: string): Record', + return_type: 'Record', + parameters: [ + { + name: 'dev', + type: 'boolean', + optional: false, + }, + { + name: 'base_url', + type: '"" | `/${string}` | undefined', + optional: false, + description: + "- best-effort shim from SvelteKit's `base` to Vite's `import.meta\\.env.BASE_URL`", + }, + { + name: 'ssr', + type: 'boolean', + optional: false, + default_value: 'true', + }, + { + name: 'mode', + type: 'string', + optional: false, + default_value: "dev ? 'development' : 'production'", + }, + ], + }, + { + name: 'default_ts_transform_options', + kind: 'variable', + source_line: 44, + type_signature: 'TransformOptions', + }, + ], + dependents: [ + 'esbuild_plugin_external_worker.ts', + 'esbuild_plugin_svelte.ts', + 'gro_plugin_server.ts', + ], + }, + { + path: 'esbuild_plugin_external_worker.ts', + declarations: [ + { + name: 'EsbuildPluginExternalWorkerOptions', + kind: 'type', + source_line: 16, + type_signature: 'EsbuildPluginExternalWorkerOptions', + properties: [ + { + name: 'dev', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'build_options', + kind: 'variable', + type_signature: 'esbuild.BuildOptions', + }, + { + name: 'dir', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'svelte_compile_options', + kind: 'variable', + type_signature: 'CompileOptions', + }, + { + name: 'svelte_compile_module_options', + kind: 'variable', + type_signature: 'ModuleCompileOptions', + }, + { + name: 'svelte_preprocessors', + kind: 'variable', + type_signature: 'PreprocessorGroup | Array', + }, + { + name: 'alias', + kind: 'variable', + type_signature: 'Record', + }, + { + name: 'base_url', + kind: 'variable', + type_signature: "ParsedSvelteConfig['base_url']", + }, + { + name: 'assets_url', + kind: 'variable', + type_signature: "ParsedSvelteConfig['assets_url']", + }, + { + name: 'public_prefix', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'private_prefix', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'env_dir', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'env_files', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'ambient_env', + kind: 'variable', + type_signature: 'Record', + }, + { + name: 'log', + kind: 'variable', + type_signature: 'Logger', + }, + ], + }, + { + name: 'esbuild_plugin_external_worker', + kind: 'function', + source_line: 34, + type_signature: + '({ dev, build_options, dir, svelte_compile_options, svelte_compile_module_options, svelte_preprocessors, alias, base_url, assets_url, public_prefix, private_prefix, env_dir, env_files, ambient_env, log, }: EsbuildPluginExternalWorkerOptions): Plugin', + return_type: 'Plugin', + parameters: [ + { + name: '__0', + type: 'EsbuildPluginExternalWorkerOptions', + optional: false, + }, + ], + }, + ], + dependencies: [ + 'esbuild_helpers.ts', + 'esbuild_plugin_svelte.ts', + 'esbuild_plugin_sveltekit_local_imports.ts', + 'esbuild_plugin_sveltekit_shim_alias.ts', + 'esbuild_plugin_sveltekit_shim_app.ts', + 'esbuild_plugin_sveltekit_shim_env.ts', + 'resolve_specifier.ts', + ], + dependents: ['gro_plugin_server.ts'], + }, + { + path: 'esbuild_plugin_svelte.ts', + declarations: [ + { + name: 'EsbuildPluginSvelteOptions', + kind: 'type', + source_line: 21, + type_signature: 'EsbuildPluginSvelteOptions', + properties: [ + { + name: 'dev', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'base_url', + kind: 'variable', + type_signature: "ParsedSvelteConfig['base_url']", + }, + { + name: 'dir', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'svelte_compile_options', + kind: 'variable', + type_signature: 'CompileOptions', + }, + { + name: 'svelte_compile_module_options', + kind: 'variable', + type_signature: 'ModuleCompileOptions', + }, + { + name: 'svelte_preprocessors', + kind: 'variable', + type_signature: 'PreprocessorGroup | Array', + }, + { + name: 'ts_transform_options', + kind: 'variable', + type_signature: 'esbuild.TransformOptions', + }, + { + name: 'is_ts', + kind: 'variable', + type_signature: '(filename: string) => boolean', + }, + ], + }, + { + name: 'esbuild_plugin_svelte', + kind: 'function', + source_line: 32, + type_signature: '(options: EsbuildPluginSvelteOptions): Plugin', + return_type: 'Plugin', + parameters: [ + { + name: 'options', + type: 'EsbuildPluginSvelteOptions', + optional: false, + }, + ], + }, + ], + dependencies: ['constants.ts', 'esbuild_helpers.ts', 'svelte_config.ts'], + dependents: ['esbuild_plugin_external_worker.ts', 'gro_plugin_server.ts'], + }, + { + path: 'esbuild_plugin_sveltekit_local_imports.ts', + declarations: [ + { + name: 'esbuild_plugin_sveltekit_local_imports', + kind: 'function', + doc_comment: + 'Adds support for imports to both `.ts` and `.js`,\nas well as imports without extensions that resolve to `.js` or `.ts`.\nPrefers `.ts` over any `.js`, and falls back to `.ts` if no file is found.', + source_line: 13, + type_signature: '(): Plugin', + return_type: 'Plugin', + parameters: [], + }, + ], + dependencies: ['constants.ts', 'resolve_specifier.ts'], + dependents: ['esbuild_plugin_external_worker.ts', 'gro_plugin_server.ts'], + }, + { + path: 'esbuild_plugin_sveltekit_shim_alias.ts', + declarations: [ + { + name: 'EsbuildPluginSveltekitShimAliasOptions', + kind: 'type', + source_line: 5, + type_signature: 'EsbuildPluginSveltekitShimAliasOptions', + properties: [ + { + name: 'dir', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'alias', + kind: 'variable', + type_signature: 'Record', + }, + ], + }, + { + name: 'esbuild_plugin_sveltekit_shim_alias', + kind: 'function', + source_line: 10, + type_signature: '({ dir, alias, }: EsbuildPluginSveltekitShimAliasOptions): Plugin', + return_type: 'Plugin', + parameters: [ + { + name: '__0', + type: 'EsbuildPluginSveltekitShimAliasOptions', + optional: false, + }, + ], + }, + ], + dependents: ['esbuild_plugin_external_worker.ts', 'gro_plugin_server.ts'], + }, + { + path: 'esbuild_plugin_sveltekit_shim_app.ts', + declarations: [ + { + name: 'EsbuildPluginSveltekitShimAppOptions', + kind: 'type', + source_line: 11, + type_signature: 'EsbuildPluginSveltekitShimAppOptions', + properties: [ + { + name: 'dev', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'base_url', + kind: 'variable', + type_signature: "ParsedSvelteConfig['base_url']", + }, + { + name: 'assets_url', + kind: 'variable', + type_signature: "ParsedSvelteConfig['assets_url']", + }, + ], + }, + { + name: 'esbuild_plugin_sveltekit_shim_app', + kind: 'function', + source_line: 17, + type_signature: + '({ dev, base_url, assets_url, }: EsbuildPluginSveltekitShimAppOptions): Plugin', + return_type: 'Plugin', + parameters: [ + { + name: '__0', + type: 'EsbuildPluginSveltekitShimAppOptions', + optional: false, + }, + ], + }, + ], + dependencies: ['constants.ts', 'sveltekit_shim_app.ts'], + dependents: ['esbuild_plugin_external_worker.ts', 'gro_plugin_server.ts'], + }, + { + path: 'esbuild_plugin_sveltekit_shim_env.ts', + declarations: [ + { + name: 'EsbuildPluginSveltekitShimEnvOptions', + kind: 'type', + source_line: 6, + type_signature: 'EsbuildPluginSveltekitShimEnvOptions', + properties: [ + { + name: 'dev', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'public_prefix', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'private_prefix', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'env_dir', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'env_files', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'ambient_env', + kind: 'variable', + type_signature: 'Record', + }, + ], + }, + { + name: 'esbuild_plugin_sveltekit_shim_env', + kind: 'function', + source_line: 17, + type_signature: + '({ dev, public_prefix, private_prefix, env_dir, env_files, ambient_env, }: EsbuildPluginSveltekitShimEnvOptions): Plugin', + return_type: 'Plugin', + parameters: [ + { + name: '__0', + type: 'EsbuildPluginSveltekitShimEnvOptions', + optional: false, + }, + ], + }, + ], + dependencies: ['constants.ts', 'sveltekit_shim_env.ts'], + dependents: ['esbuild_plugin_external_worker.ts', 'gro_plugin_server.ts'], + }, + { + path: 'filer.ts', + declarations: [ + { + name: 'OnFilerChange', + kind: 'type', + source_line: 29, + type_signature: 'OnFilerChange', + }, + { + name: 'FilerOptions', + kind: 'type', + source_line: 31, + type_signature: 'FilerOptions', + properties: [ + { + name: 'watch_dir', + kind: 'variable', + type_signature: 'typeof watch_dir', + }, + { + name: 'watch_dir_options', + kind: 'variable', + type_signature: "Partial>", + }, + { + name: 'package_json_cache', + kind: 'variable', + type_signature: 'Record', + }, + { + name: 'log', + kind: 'variable', + type_signature: 'Logger', + }, + ], + }, + { + name: 'Filer', + kind: 'class', + source_line: 38, + members: [ + { + name: 'root_dir', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'PathId', + }, + { + name: 'files', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'Map', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: '(options?: FilerOptions): Filer', + parameters: [ + { + name: 'options', + type: 'FilerOptions', + optional: false, + default_value: 'EMPTY_OBJECT', + }, + ], + }, + { + name: 'get_by_id', + kind: 'variable', + }, + { + name: 'get_or_create', + kind: 'variable', + }, + { + name: 'filter', + kind: 'function', + type_signature: + '(predicate: (disknode: Disknode) => boolean): Disknode[] | null', + return_type: 'Disknode[] | null', + parameters: [ + { + name: 'predicate', + type: '(disknode: Disknode) => boolean', + optional: false, + }, + ], + }, + { + name: 'init', + kind: 'function', + doc_comment: + 'Initialize the filer to populate files without watching.\nSafe to call multiple times - subsequent calls are no-ops.\nUsed by gen files to access the file graph.', + type_signature: '(): Promise', + return_type: 'Promise', + parameters: [], + }, + { + name: 'watch', + kind: 'function', + type_signature: '(listener: OnFilerChange): Promise<() => void>', + return_type: 'Promise<() => void>', + parameters: [ + { + name: 'listener', + type: 'OnFilerChange', + optional: false, + }, + ], + }, + { + name: 'close', + kind: 'function', + type_signature: '(): Promise', + return_type: 'Promise', + parameters: [], + }, + ], + }, + { + name: 'filter_dependents', + kind: 'function', + source_line: 367, + type_signature: + '(disknode: Disknode, get_by_id: (id: PathId) => Disknode | undefined, filter?: FileFilter | undefined, results?: Set, searched?: Set<...>, log?: Logger | undefined): Set<...>', + return_type: 'Set', + parameters: [ + { + name: 'disknode', + type: 'Disknode', + optional: false, + }, + { + name: 'get_by_id', + type: '(id: PathId) => Disknode | undefined', + optional: false, + }, + { + name: 'filter', + type: 'FileFilter | undefined', + optional: true, + }, + { + name: 'results', + type: 'Set', + optional: false, + default_value: 'new Set()', + }, + { + name: 'searched', + type: 'Set', + optional: false, + default_value: 'new Set()', + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + ], + dependencies: [ + 'constants.ts', + 'parse_imports.ts', + 'paths.ts', + 'resolve_specifier.ts', + 'svelte_config.ts', + 'sveltekit_helpers.ts', + 'watch_dir.ts', + ], + dependents: ['gen_helpers.ts', 'gro_plugin_gen.ts', 'invoke_task.ts'], + }, + { + path: 'format_directory.ts', + declarations: [ + { + name: 'format_directory', + kind: 'function', + doc_comment: + 'Formats a directory on the filesystem.\nIf the source directory is given, it also formats all of the root directory files.\nThis is separated from `./format_file` to avoid importing all of the `prettier` code\ninside modules that import this one. (which has a nontrivial cost)', + source_line: 34, + type_signature: + '(log: Logger, dir: string, check?: boolean, extensions?: string, root_paths?: string, prettier_cli?: string | Cli, pm_cli?: string): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'dir', + type: 'string', + optional: false, + }, + { + name: 'check', + type: 'boolean', + optional: false, + default_value: 'false', + }, + { + name: 'extensions', + type: 'string', + optional: false, + default_value: 'EXTENSIONS_DEFAULT', + }, + { + name: 'root_paths', + type: 'string', + optional: false, + default_value: 'ROOT_PATHS_DEFAULT', + }, + { + name: 'prettier_cli', + type: 'string | Cli', + optional: false, + default_value: 'PRETTIER_CLI_DEFAULT', + }, + { + name: 'pm_cli', + type: 'string', + optional: false, + default_value: 'PM_CLI_DEFAULT', + }, + ], + }, + ], + dependencies: ['args.ts', 'cli.ts', 'constants.ts', 'paths.ts'], + dependents: ['format.task.ts'], + }, + { + path: 'format_file.ts', + declarations: [ + { + name: 'format_file', + kind: 'function', + doc_comment: 'Formats a file with Prettier.', + source_line: 14, + type_signature: + '(content: string, options: Options, base_options?: Options | null | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'content', + type: 'string', + optional: false, + }, + { + name: 'options', + type: 'Options', + optional: false, + }, + { + name: 'base_options', + type: 'Options | null | undefined', + optional: false, + description: "- defaults to the the cwd's package.json `prettier` value", + default_value: 'cached_base_options', + }, + ], + }, + ], + dependencies: ['package_json.ts'], + dependents: ['gen.task.ts'], + }, + { + path: 'format.task.ts', + declarations: [], + dependencies: ['format_directory.ts', 'paths.ts', 'task.ts'], + }, + { + path: 'gen_helpers.ts', + declarations: [ + { + name: 'should_trigger_gen', + kind: 'function', + doc_comment: 'Check if a file change should trigger a gen file.', + source_line: 23, + type_signature: + '(gen_file_id: PathId, changed_file_id: PathId, config: GroConfig, filer: Filer, log: Logger, timings: Timings, invoke_task: InvokeTask): Promise<...>', + return_type: 'Promise', + parameters: [ + { + name: 'gen_file_id', + type: 'PathId', + optional: false, + }, + { + name: 'changed_file_id', + type: 'PathId', + optional: false, + }, + { + name: 'config', + type: 'GroConfig', + optional: false, + }, + { + name: 'filer', + type: 'Filer', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'timings', + type: 'Timings', + optional: false, + }, + { + name: 'invoke_task', + type: 'InvokeTask', + optional: false, + }, + ], + }, + ], + dependencies: ['filer.ts', 'gen.ts', 'modules.ts', 'paths.ts', 'svelte_config.ts'], + dependents: ['gro_plugin_gen.ts'], + }, + { + path: 'gen.task.ts', + declarations: [], + dependencies: [ + 'constants.ts', + 'format_file.ts', + 'gen.ts', + 'input_path.ts', + 'paths.ts', + 'run_gen.ts', + 'task.ts', + 'task_logging.ts', + ], + }, + { + path: 'gen.ts', + declarations: [ + { + name: 'GEN_FILE_PATTERN_TEXT', + kind: 'variable', + source_line: 25, + type_signature: '"gen"', + }, + { + name: 'GEN_FILE_PATTERN', + kind: 'variable', + source_line: 26, + type_signature: 'string', + }, + { + name: 'is_gen_path', + kind: 'function', + source_line: 28, + type_signature: '(path: string): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'GenResult', + kind: 'type', + source_line: 30, + type_signature: 'GenResult', + properties: [ + { + name: 'origin_id', + kind: 'variable', + type_signature: 'PathId', + }, + { + name: 'files', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'GenFile', + kind: 'type', + source_line: 34, + type_signature: 'GenFile', + properties: [ + { + name: 'id', + kind: 'variable', + type_signature: 'PathId', + }, + { + name: 'content', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'origin_id', + kind: 'variable', + type_signature: 'PathId', + }, + { + name: 'format', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'GenDependencies', + kind: 'type', + source_line: 41, + type_signature: 'GenDependencies', + }, + { + name: 'GenDependenciesConfig', + kind: 'type', + source_line: 43, + type_signature: 'GenDependenciesConfig', + properties: [ + { + name: 'patterns', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'files', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'GenDependenciesResolver', + kind: 'type', + source_line: 48, + type_signature: 'GenDependenciesResolver', + }, + { + name: 'Gen', + kind: 'type', + source_line: 52, + type_signature: 'Gen', + also_exported_from: ['index.ts'], + }, + { + name: 'GenFunction', + kind: 'type', + source_line: 54, + type_signature: 'GenFunction', + }, + { + name: 'GenConfig', + kind: 'type', + source_line: 57, + type_signature: 'GenConfig', + properties: [ + { + name: 'generate', + kind: 'variable', + type_signature: 'GenFunction', + }, + { + name: 'dependencies', + kind: 'variable', + type_signature: 'GenDependencies', + }, + ], + }, + { + name: 'GenContext', + kind: 'type', + source_line: 64, + type_signature: 'GenContext', + properties: [ + { + name: 'config', + kind: 'variable', + type_signature: 'GroConfig', + }, + { + name: 'svelte_config', + kind: 'variable', + type_signature: 'ParsedSvelteConfig', + }, + { + name: 'filer', + kind: 'variable', + type_signature: 'Filer', + }, + { + name: 'log', + kind: 'variable', + type_signature: 'Logger', + }, + { + name: 'timings', + kind: 'variable', + type_signature: 'Timings', + }, + { + name: 'invoke_task', + kind: 'variable', + type_signature: 'InvokeTask', + }, + { + name: 'origin_id', + kind: 'variable', + type_signature: 'PathId', + doc_comment: 'Same as `import.meta.url` but in path form.', + }, + { + name: 'origin_path', + kind: 'variable', + type_signature: 'string', + doc_comment: 'The `origin_id` relative to the root dir.', + }, + { + name: 'changed_file_id', + kind: 'variable', + type_signature: 'PathId | undefined', + doc_comment: + 'The file that triggered dependency checking.\nOnly available when resolving dependencies dynamically.\n`undefined` during actual generation.', + }, + ], + also_exported_from: ['index.ts'], + }, + { + name: 'RawGenResult', + kind: 'type', + source_line: 88, + type_signature: 'RawGenResult', + }, + { + name: 'RawGenFile', + kind: 'type', + source_line: 89, + type_signature: 'RawGenFile', + properties: [ + { + name: 'content', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'filename', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'format', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'GenResults', + kind: 'type', + source_line: 97, + type_signature: 'GenResults', + properties: [ + { + name: 'results', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'successes', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'failures', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'input_count', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'output_count', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'elapsed', + kind: 'variable', + type_signature: 'number', + }, + ], + }, + { + name: 'GenfileModuleResult', + kind: 'type', + source_line: 105, + type_signature: 'GenfileModuleResult', + }, + { + name: 'GenfileModuleResultSuccess', + kind: 'type', + source_line: 106, + type_signature: 'GenfileModuleResultSuccess', + properties: [ + { + name: 'ok', + kind: 'variable', + type_signature: 'true', + }, + { + name: 'id', + kind: 'variable', + type_signature: 'PathId', + }, + { + name: 'files', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'elapsed', + kind: 'variable', + type_signature: 'number', + }, + ], + }, + { + name: 'GenfileModuleResultFailure', + kind: 'type', + source_line: 112, + type_signature: 'GenfileModuleResultFailure', + properties: [ + { + name: 'ok', + kind: 'variable', + type_signature: 'false', + }, + { + name: 'id', + kind: 'variable', + type_signature: 'PathId', + }, + { + name: 'reason', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'error', + kind: 'variable', + type_signature: 'Error', + }, + { + name: 'elapsed', + kind: 'variable', + type_signature: 'number', + }, + ], + }, + { + name: 'to_gen_result', + kind: 'function', + source_line: 120, + type_signature: '(origin_id: PathId, raw_result: RawGenResult): GenResult', + return_type: 'GenResult', + parameters: [ + { + name: 'origin_id', + type: 'PathId', + optional: false, + }, + { + name: 'raw_result', + type: 'RawGenResult', + optional: false, + }, + ], + }, + { + name: 'to_output_file_name', + kind: 'function', + source_line: 160, + type_signature: '(filename: string): string', + return_type: 'string', + parameters: [ + { + name: 'filename', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'AnalyzedGenResult', + kind: 'type', + source_line: 199, + type_signature: 'AnalyzedGenResult', + }, + { + name: 'analyze_gen_results', + kind: 'function', + source_line: 213, + type_signature: '(gen_results: GenResults): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'gen_results', + type: 'GenResults', + optional: false, + }, + ], + }, + { + name: 'analyze_gen_result', + kind: 'function', + source_line: 220, + type_signature: '(file: GenFile): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'file', + type: 'GenFile', + optional: false, + }, + ], + }, + { + name: 'write_gen_results', + kind: 'function', + source_line: 238, + type_signature: + '(gen_results: GenResults, analyzed_gen_results: AnalyzedGenResult[], log: Logger): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'gen_results', + type: 'GenResults', + optional: false, + }, + { + name: 'analyzed_gen_results', + type: 'AnalyzedGenResult[]', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + ], + }, + { + name: 'FoundGenfiles', + kind: 'type', + source_line: 266, + type_signature: 'FoundGenfiles', + properties: [ + { + name: 'resolved_input_files', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'resolved_input_files_by_root_dir', + kind: 'variable', + type_signature: 'Map>', + }, + { + name: 'resolved_input_paths', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'FindGenfilesResult', + kind: 'type', + source_line: 272, + type_signature: 'FindGenfilesResult', + }, + { + name: 'FindGenfilesFailure', + kind: 'type', + source_line: 273, + type_signature: 'FindGenfilesFailure', + }, + { + name: 'find_genfiles', + kind: 'function', + doc_comment: + 'Finds modules from input paths. (see `src/lib/input_path.ts` for more)', + source_line: 292, + type_signature: + '(input_paths: InputPath[], root_dirs: PathId[], config: GroConfig, timings?: Timings | undefined): FindGenfilesResult', + return_type: 'FindGenfilesResult', + parameters: [ + { + name: 'input_paths', + type: 'InputPath[]', + optional: false, + }, + { + name: 'root_dirs', + type: 'PathId[]', + optional: false, + }, + { + name: 'config', + type: 'GroConfig', + optional: false, + }, + { + name: 'timings', + type: 'Timings | undefined', + optional: true, + }, + ], + }, + { + name: 'GenfileModule', + kind: 'type', + source_line: 358, + type_signature: 'GenfileModule', + properties: [ + { + name: 'gen', + kind: 'variable', + type_signature: 'Gen', + }, + ], + }, + { + name: 'GenfileModuleMeta', + kind: 'type', + source_line: 362, + type_signature: 'GenfileModuleMeta', + }, + { + name: 'LoadedGenfiles', + kind: 'type', + source_line: 364, + type_signature: 'LoadedGenfiles', + properties: [ + { + name: 'modules', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'found_genfiles', + kind: 'variable', + type_signature: 'FoundGenfiles', + }, + ], + }, + { + name: 'LoadGenfilesResult', + kind: 'type', + source_line: 369, + type_signature: 'LoadGenfilesResult', + }, + { + name: 'LoadGenfilesFailure', + kind: 'type', + source_line: 370, + type_signature: 'LoadGenfilesFailure', + }, + { + name: 'load_genfiles', + kind: 'function', + source_line: 372, + type_signature: + '(found_genfiles: FoundGenfiles, timings?: Timings | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'found_genfiles', + type: 'FoundGenfiles', + optional: false, + }, + { + name: 'timings', + type: 'Timings | undefined', + optional: true, + }, + ], + }, + { + name: 'validate_gen_module', + kind: 'function', + source_line: 391, + type_signature: '(mod: Record): mod is GenfileModule', + return_type: 'boolean', + parameters: [ + { + name: 'mod', + type: 'Record', + optional: false, + }, + ], + }, + { + name: 'normalize_gen_config', + kind: 'function', + source_line: 399, + type_signature: '(gen: Gen): GenConfig', + return_type: 'GenConfig', + parameters: [ + { + name: 'gen', + type: 'Gen', + optional: false, + }, + ], + }, + ], + dependencies: ['input_path.ts', 'modules.ts', 'paths.ts', 'search_fs.ts'], + dependents: ['gen.task.ts', 'gen_helpers.ts', 'gro_plugin_gen.ts', 'run_gen.ts'], + }, + { + path: 'github.ts', + declarations: [ + { + name: 'GITHUB_REPO_MATCHER', + kind: 'variable', + source_line: 9, + type_signature: 'RegExp', + }, + { + name: 'GithubPullRequest', + kind: 'type', + source_line: 11, + type_signature: + 'ZodObject<{ url: ZodString; id: ZodNumber; html_url: ZodString; number: ZodNumber; user: ZodObject<{ login: ZodString; }, $loose>; }, $loose>', + }, + { + name: 'github_fetch_commit_prs', + kind: 'function', + doc_comment: '', + see_also: [ + 'https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#list-pull-requests-associated-with-a-commit', + ], + source_line: 25, + type_signature: + '(owner: string, repo: string, commit_sha: string, token?: string | undefined, log?: Logger | undefined, cache?: Map | undefined, api_version?: string | undefined): Promise<...>', + return_type: + 'Promise<{ [x: string]: unknown; url: string; id: number; html_url: string; number: number; user: { [x: string]: unknown; login: string; }; }[] | null>', + parameters: [ + { + name: 'owner', + type: 'string', + optional: false, + }, + { + name: 'repo', + type: 'string', + optional: false, + }, + { + name: 'commit_sha', + type: 'string', + optional: false, + }, + { + name: 'token', + type: 'string | undefined', + optional: true, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'cache', + type: 'Map | undefined', + optional: true, + }, + { + name: 'api_version', + type: 'string | undefined', + optional: true, + }, + ], + }, + ], + dependents: ['changelog.ts', 'package_json.ts'], + }, + { + path: 'gro_config.ts', + declarations: [ + { + name: 'EMPTY_BUILD_CACHE_CONFIG_HASH', + kind: 'variable', + doc_comment: + 'SHA-256 hash of empty string, used for configs without build_cache_config.\nThis ensures consistent cache behavior when no custom config is provided.', + source_line: 27, + type_signature: + '"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"', + }, + { + name: 'GroConfig', + kind: 'type', + doc_comment: + 'The config that users can extend via `gro.config.ts`.\nThis is exposed to users in places like tasks and genfiles.', + see_also: ['https://github.com/ryanatkn/gro/blob/main/src/docs/config.md'], + source_line: 35, + type_signature: 'GroConfig', + extends: ['RawGroConfig'], + properties: [ + { + name: 'plugins', + kind: 'variable', + type_signature: 'CreateConfigPlugins', + doc_comment: '', + }, + { + name: 'map_package_json', + kind: 'variable', + type_signature: 'PackageJsonMapper | null', + doc_comment: + "Maps the project's `package.json` before writing it to the filesystem.\nThe `package_json` argument may be mutated, but the return value is what's used by the caller.\nReturning `null` is a no-op for the caller.", + }, + { + name: 'task_root_dirs', + kind: 'variable', + type_signature: 'Array', + doc_comment: + 'The root directories to search for tasks given implicit relative input paths.\nDefaults to `./src/lib`, then the cwd, then the Gro package dist.', + }, + { + name: 'search_filters', + kind: 'variable', + type_signature: 'Array', + doc_comment: + 'When searching the filsystem for tasks and genfiles,\ndirectories and files are included if they pass all of these filters.', + }, + { + name: 'js_cli', + kind: 'variable', + type_signature: 'string', + doc_comment: "The CLI to use that's compatible with `node`.", + }, + { + name: 'pm_cli', + kind: 'variable', + type_signature: 'string', + doc_comment: + "The CLI to use that's compatible with `npm install` and `npm link`. Defaults to `'npm'`.", + }, + { + name: 'svelte_config_filename', + kind: 'variable', + type_signature: 'string', + doc_comment: '', + }, + { + name: 'build_cache_config_hash', + kind: 'variable', + type_signature: 'string', + doc_comment: + "SHA-256 hash of the user's `build_cache_config` from `gro.config.ts`.\nThis is computed during config normalization and the raw value is immediately deleted.\nIf no `build_cache_config` was provided, this is the hash of an empty string.", + }, + ], + also_exported_from: ['index.ts'], + }, + { + name: 'RawGroConfig', + kind: 'type', + doc_comment: + 'The relaxed variant of `GroConfig` that users can provide via `gro.config.ts`.\nSuperset of `GroConfig`.', + see_also: ['https://github.com/ryanatkn/gro/blob/main/src/docs/config.md'], + source_line: 80, + type_signature: 'RawGroConfig', + properties: [ + { + name: 'plugins', + kind: 'variable', + type_signature: 'CreateConfigPlugins', + }, + { + name: 'map_package_json', + kind: 'variable', + type_signature: 'PackageJsonMapper | null', + }, + { + name: 'task_root_dirs', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'search_filters', + kind: 'variable', + type_signature: 'PathFilter | Array | null', + }, + { + name: 'js_cli', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'pm_cli', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'build_cache_config', + kind: 'variable', + type_signature: + '| Record\n\t\t| (() => Record | Promise>)', + doc_comment: + "Optional object defining custom build inputs for cache invalidation.\nThis value is hashed during config normalization and used to detect\nwhen builds need to be regenerated due to non-source changes.\n\nUse cases:\n- Environment variables baked into build: `{api_url: process.env.PUBLIC_API_URL}`\n- External data files: `{data: fs.readFileSync('data.json', 'utf-8')}`\n- Build feature flags: `{enable_analytics: true}`\n\nCan be a static object or an async function that returns an object.\n\nIMPORTANT: It's safe to include secrets here because they are hashed and `delete`d\nduring config normalization. The raw value is never logged or persisted.", + }, + ], + also_exported_from: ['index.ts'], + }, + { + name: 'CreateGroConfig', + kind: 'type', + source_line: 107, + type_signature: 'CreateGroConfig', + also_exported_from: ['index.ts'], + }, + { + name: 'create_empty_gro_config', + kind: 'function', + source_line: 112, + type_signature: '(): GroConfig', + return_type: 'GroConfig', + parameters: [], + }, + { + name: 'SEARCH_EXCLUDER_DEFAULT', + kind: 'variable', + doc_comment: + 'The regexp used by default to exclude directories and files\nwhen searching the filesystem for tasks and genfiles.\nCustomize via `search_filters` in the `GroConfig`.\nSee the test cases for the exact behavior.', + source_line: 133, + type_signature: 'RegExp', + }, + { + name: 'EXPORTS_EXCLUDER_DEFAULT', + kind: 'variable', + source_line: 145, + type_signature: 'RegExp', + }, + { + name: 'cook_gro_config', + kind: 'function', + doc_comment: + 'Transforms a `RawGroConfig` to the more strict `GroConfig`.\nThis allows users to provide a more relaxed config.\nHashes the `build_cache_config` and deletes the raw value for security.', + source_line: 152, + type_signature: '(raw_config: RawGroConfig): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'raw_config', + type: 'RawGroConfig', + optional: false, + }, + ], + }, + { + name: 'GroConfigModule', + kind: 'type', + source_line: 201, + type_signature: 'GroConfigModule', + properties: [ + { + name: 'default', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'RawGroConfig | CreateGroConfig', + }, + ], + }, + { + name: 'load_gro_config', + kind: 'function', + source_line: 205, + type_signature: '(dir?: string): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'dir', + type: 'string', + optional: false, + default_value: 'paths.root', + }, + ], + }, + { + name: 'validate_gro_config_module', + kind: 'function', + source_line: 228, + type_signature: + '(config_module: any, config_path: string): asserts config_module is GroConfigModule', + return_type: 'void', + parameters: [ + { + name: 'config_module', + type: 'any', + optional: false, + }, + { + name: 'config_path', + type: 'string', + optional: false, + }, + ], + }, + ], + dependencies: ['constants.ts', 'gro.config.default.ts', 'hash.ts', 'paths.ts'], + dependents: ['gro_plugin_sveltekit_app.ts', 'invoke.ts'], + }, + { + path: 'gro_helpers.ts', + declarations: [ + { + name: 'resolve_gro_module_path', + kind: 'function', + doc_comment: + "Resolves a path to an internal Gro file.\nPrefers any local installation of Gro and falls back to the current CLI context.\n\nUses heuristics to find `path`, so may fail in some rare corner cases.\nCurrently looks for `gro.js` as a sibling to the `path` arg for detection.\nIf this fails for your usecases, rename `gro.js` or open an issue/PR!\n\nUsed by the CLI and `gro run`.\n\ncase 1:\n\nWe're in a directory that has a local installation of Gro at `node_modules/.bin/gro`.\nUse this local version instead of the global.\n\ncase 2:\n\nWe're running Gro inside the Gro repo itself.\n\nIn this case, we use the build directory instead of dist.\nThere's a paradox here for using Gro inside itself -\nideally we use the dist directory because that's what's shipped,\nbut the build directory has all of the tests,\nand loading two instances of its modules causes problems\nlike `instanceof` checks failing.\nFor now we'll just run from build and see if it causes any problems.\nThere's probably a better design in here somewhere.\n\ncase 3:\n\nFall back to invoking Gro from wherever the CLI is being executed.\nWhen using the global CLI, this uses the global Gro installation.", + source_line: 48, + type_signature: '(path?: string): string', + return_type: 'string', + parameters: [ + { + name: 'path', + type: 'string', + optional: false, + default_value: "''", + }, + ], + }, + { + name: 'spawn_with_loader', + kind: 'function', + doc_comment: + 'Runs a file using the Gro loader.\n\nUses conditional exports to correctly set up `esm-env` as development by default,\nso if you want production set `NODE_ENV=production`.', + see_also: ['https://nodejs.org/api/packages.html#conditional-exports *'], + source_line: 83, + type_signature: + '(loader_path: string, invoke_path: string, argv: string[], js_cli?: string): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'loader_path', + type: 'string', + optional: false, + description: 'path to loader', + }, + { + name: 'invoke_path', + type: 'string', + optional: false, + description: 'path to file to spawn with `node`', + }, + { + name: 'argv', + type: 'string[]', + optional: false, + }, + { + name: 'js_cli', + type: 'string', + optional: false, + default_value: 'JS_CLI_DEFAULT', + }, + ], + }, + ], + dependencies: ['constants.ts'], + dependents: ['gro.ts', 'run.task.ts'], + }, + { + path: 'gro_plugin_gen.ts', + declarations: [ + { + name: 'TaskArgs', + kind: 'type', + source_line: 19, + type_signature: 'TaskArgs', + extends: ['Args'], + properties: [ + { + name: 'watch', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'GroPluginGenOptions', + kind: 'type', + source_line: 23, + type_signature: 'GroPluginGenOptions', + properties: [ + { + name: 'input_paths', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'root_dirs', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'flush_debounce_delay', + kind: 'variable', + type_signature: 'number', + }, + ], + }, + { + name: 'gro_plugin_gen', + kind: 'function', + source_line: 29, + type_signature: + '({ input_paths, root_dirs, flush_debounce_delay, }?: GroPluginGenOptions): Plugin>', + return_type: 'Plugin>', + parameters: [ + { + name: '__0', + type: 'GroPluginGenOptions', + optional: false, + default_value: 'EMPTY_OBJECT', + }, + ], + }, + ], + dependencies: ['cli.ts', 'filer.ts', 'gen.ts', 'gen_helpers.ts', 'paths.ts'], + dependents: ['gro.config.default.ts'], + }, + { + path: 'gro_plugin_server.ts', + declarations: [ + { + name: 'SERVER_SOURCE_ID', + kind: 'variable', + source_line: 26, + type_signature: 'PathId', + }, + { + name: 'has_server', + kind: 'function', + source_line: 28, + type_signature: '(path?: PathId): Promise>', + return_type: 'Promise>', + parameters: [ + { + name: 'path', + type: 'PathId', + optional: false, + default_value: 'SERVER_SOURCE_ID', + }, + ], + }, + { + name: 'GroPluginServerOptions', + kind: 'type', + source_line: 37, + type_signature: 'GroPluginServerOptions', + properties: [ + { + name: 'entry_points', + kind: 'variable', + type_signature: 'Array', + doc_comment: "same as esbuild's `entryPoints`", + }, + { + name: 'dir', + kind: 'variable', + type_signature: 'string', + doc_comment: '', + }, + { + name: 'outpaths', + kind: 'variable', + type_signature: 'CreateOutpaths', + doc_comment: + 'Returns the `Outpaths` given a `dev` param.\nDecoupling this from plugin creation allows it to be created generically,\nso the build and dev tasks can be the source of truth for `dev`.', + }, + { + name: 'env_files', + kind: 'variable', + type_signature: 'Array', + doc_comment: '', + }, + { + name: 'ambient_env', + kind: 'variable', + type_signature: 'Record', + doc_comment: '', + }, + { + name: 'svelte_config', + kind: 'variable', + type_signature: 'SvelteConfig', + doc_comment: '', + }, + { + name: 'target', + kind: 'variable', + type_signature: 'string', + doc_comment: '', + }, + { + name: 'esbuild_build_options', + kind: 'variable', + type_signature: '(base_options: esbuild.BuildOptions) => esbuild.BuildOptions', + doc_comment: 'Optionally map the esbuild options.', + }, + { + name: 'rebuild_throttle_delay', + kind: 'variable', + type_signature: 'number', + doc_comment: + 'Milliseconds to throttle rebuilds.\nShould be longer than it takes to build to avoid backpressure.', + }, + { + name: 'cli_command', + kind: 'variable', + type_signature: 'string', + doc_comment: + "The CLI command to run the server, like `'node'` or `'bun'` or `'deno'`.\nReceives the path to the server js file as its argument.", + }, + { + name: 'run', + kind: 'variable', + type_signature: 'boolean', + doc_comment: 'Whether to run the server or not after building.', + }, + ], + }, + { + name: 'Outpaths', + kind: 'type', + source_line: 92, + type_signature: 'Outpaths', + properties: [ + { + name: 'outdir', + kind: 'variable', + type_signature: 'string', + doc_comment: '', + }, + { + name: 'outbase', + kind: 'variable', + type_signature: 'string', + doc_comment: '', + }, + { + name: 'outname', + kind: 'variable', + type_signature: 'string', + doc_comment: '', + }, + ], + }, + { + name: 'CreateOutpaths', + kind: 'type', + source_line: 107, + type_signature: 'CreateOutpaths', + }, + { + name: 'gro_plugin_server', + kind: 'function', + source_line: 109, + type_signature: + '({ entry_points, dir, outpaths, env_files, ambient_env, svelte_config, target, esbuild_build_options, rebuild_throttle_delay, cli_command, run, }?: GroPluginServerOptions): Plugin>', + return_type: 'Plugin>', + parameters: [ + { + name: '__0', + type: 'GroPluginServerOptions', + optional: false, + default_value: '{}', + }, + ], + }, + ], + dependencies: [ + 'constants.ts', + 'esbuild_helpers.ts', + 'esbuild_plugin_external_worker.ts', + 'esbuild_plugin_svelte.ts', + 'esbuild_plugin_sveltekit_local_imports.ts', + 'esbuild_plugin_sveltekit_shim_alias.ts', + 'esbuild_plugin_sveltekit_shim_app.ts', + 'esbuild_plugin_sveltekit_shim_env.ts', + 'paths.ts', + 'svelte_config.ts', + ], + dependents: ['gro.config.default.ts'], + }, + { + path: 'gro_plugin_sveltekit_app.ts', + declarations: [ + { + name: 'GroPluginSveltekitAppOptions', + kind: 'type', + source_line: 15, + type_signature: 'GroPluginSveltekitAppOptions', + properties: [ + { + name: 'host_target', + kind: 'variable', + type_signature: 'HostTarget', + doc_comment: + 'Used for finalizing a SvelteKit build like adding a `.nojekyll` file for GitHub Pages.', + }, + { + name: 'well_known_package_json', + kind: 'variable', + type_signature: 'boolean | PackageJsonMapper', + doc_comment: + 'If truthy, adds `/.well-known/package.json` to the static output.\nIf a function, maps the value.', + }, + { + name: 'well_known_source_json', + kind: 'variable', + type_signature: 'boolean | SourceJsonMapper', + doc_comment: + 'If truthy, adds `/.well-known/source.json` and `/.well-known/src/` to the static output.\nIf a function, maps the value.', + }, + { + name: 'well_known_src_files', + kind: 'variable', + type_signature: 'boolean | CopyFileFilter', + doc_comment: + 'If truthy, copies `src/` to `/.well-known/src/` to the static output.\nPass a function to customize which files get copied.', + }, + { + name: 'vite_cli', + kind: 'variable', + type_signature: 'string', + doc_comment: 'The Vite CLI to use.', + }, + ], + }, + { + name: 'HostTarget', + kind: 'type', + source_line: 45, + type_signature: 'HostTarget', + }, + { + name: 'CopyFileFilter', + kind: 'type', + source_line: 47, + type_signature: 'CopyFileFilter', + }, + { + name: 'gro_plugin_sveltekit_app', + kind: 'function', + source_line: 49, + type_signature: + '({ host_target, well_known_package_json, well_known_source_json, well_known_src_files, vite_cli, }?: GroPluginSveltekitAppOptions): Plugin>', + return_type: 'Plugin>', + parameters: [ + { + name: '__0', + type: 'GroPluginSveltekitAppOptions', + optional: false, + default_value: '{}', + }, + ], + }, + ], + dependencies: [ + 'args.ts', + 'cli.ts', + 'constants.ts', + 'gro_config.ts', + 'package_json.ts', + 'source_json.ts', + 'svelte_config.ts', + 'task.ts', + ], + dependents: ['gro.config.default.ts'], + }, + { + path: 'gro_plugin_sveltekit_library.ts', + declarations: [ + { + name: 'GroPluginSveltekitLibraryOptions', + kind: 'type', + source_line: 9, + type_signature: 'GroPluginSveltekitLibraryOptions', + properties: [ + { + name: 'svelte_package_options', + kind: 'variable', + type_signature: 'SveltePackageOptions', + doc_comment: 'The options passed to the SvelteKit packaging CLI.', + }, + { + name: 'svelte_package_cli', + kind: 'variable', + type_signature: 'string', + doc_comment: + 'The SvelteKit packaging CLI to use. Defaults to `svelte-package`.', + }, + ], + }, + { + name: 'gro_plugin_sveltekit_library', + kind: 'function', + source_line: 22, + type_signature: + '({ svelte_package_options, svelte_package_cli, }?: GroPluginSveltekitLibraryOptions): Plugin>', + return_type: 'Plugin>', + parameters: [ + { + name: '__0', + type: 'GroPluginSveltekitLibraryOptions', + optional: false, + default_value: '{}', + }, + ], + }, + ], + dependencies: ['constants.ts', 'package_json.ts', 'sveltekit_helpers.ts', 'task.ts'], + dependents: ['gro.config.default.ts'], + }, + { + path: 'gro.config.default.ts', + declarations: [ + { + name: 'default', + kind: 'variable', + source_line: 44, + type_signature: 'CreateGroConfig', + }, + ], + dependencies: [ + 'gro_plugin_gen.ts', + 'gro_plugin_server.ts', + 'gro_plugin_sveltekit_app.ts', + 'gro_plugin_sveltekit_library.ts', + 'package_json.ts', + 'sveltekit_helpers.ts', + ], + dependents: ['gro_config.ts'], + }, + { + path: 'gro.ts', + declarations: [], + dependencies: ['gro_helpers.ts'], + }, + { + path: 'hash.ts', + declarations: [ + { + name: 'to_hash', + kind: 'function', + doc_comment: '', + see_also: ['https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto'], + source_line: 6, + type_signature: + '(data: BufferSource, algorithm?: "SHA-1" | "SHA-256" | "SHA-384" | "SHA-512"): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'data', + type: 'BufferSource', + optional: false, + }, + { + name: 'algorithm', + type: '"SHA-1" | "SHA-256" | "SHA-384" | "SHA-512"', + optional: false, + default_value: "'SHA-256'", + }, + ], + }, + ], + dependents: ['build_cache.ts', 'gro_config.ts'], + }, + { + path: 'index.ts', + declarations: [], + dependencies: ['plugin.ts', 'task.ts'], + }, + { + path: 'input_path.ts', + declarations: [ + { + name: 'InputPath', + kind: 'type', + source_line: 13, + type_signature: 'ZodString', + }, + { + name: 'RawInputPath', + kind: 'type', + source_line: 16, + type_signature: 'ZodString', + }, + { + name: 'to_input_path', + kind: 'function', + doc_comment: + 'Raw input paths are paths that users provide to Gro to reference files for tasks and gen.\n\nA raw input path can be to a file or directory in the following forms:\n\n- an absolute path, preserved\n- an explicit relative path, e.g. `./src/foo`, resolved to `root_path` which defaults to the cwd\n- an implicit relative path, e.g. `src/foo`, preserved\n- an implicit relative path prefixed with `gro/`, transformed to absolute in the Gro directory\n\nThus, input paths are either absolute or implicitly relative.', + source_line: 31, + type_signature: '(raw_input_path: RawInputPath, root_path?: string): InputPath', + return_type: 'InputPath', + parameters: [ + { + name: 'raw_input_path', + type: 'RawInputPath', + optional: false, + }, + { + name: 'root_path', + type: 'string', + optional: false, + default_value: 'process.cwd()', + }, + ], + }, + { + name: 'to_input_paths', + kind: 'function', + source_line: 43, + type_signature: + '(raw_input_paths: RawInputPath[], root_path?: string | undefined): InputPath[]', + return_type: 'InputPath[]', + parameters: [ + { + name: 'raw_input_paths', + type: 'RawInputPath[]', + optional: false, + }, + { + name: 'root_path', + type: 'string | undefined', + optional: true, + }, + ], + }, + { + name: 'PossiblePath', + kind: 'type', + source_line: 48, + type_signature: 'PossiblePath', + properties: [ + { + name: 'id', + kind: 'variable', + type_signature: 'PathId', + }, + { + name: 'input_path', + kind: 'variable', + type_signature: 'InputPath', + }, + { + name: 'root_dir', + kind: 'variable', + type_signature: 'PathId', + }, + ], + }, + { + name: 'get_possible_paths', + kind: 'function', + doc_comment: + 'Gets a list of possible source ids for each input path with `extensions`,\nduplicating each under `root_dirs`, without checking the filesystem.', + source_line: 58, + type_signature: + '(input_path: InputPath, root_dirs: PathId[], extensions: string[]): PossiblePath[]', + return_type: 'PossiblePath[]', + parameters: [ + { + name: 'input_path', + type: 'InputPath', + optional: false, + }, + { + name: 'root_dirs', + type: 'PathId[]', + optional: false, + }, + { + name: 'extensions', + type: 'string[]', + optional: false, + }, + ], + }, + { + name: 'ResolvedInputPath', + kind: 'type', + source_line: 102, + type_signature: 'ResolvedInputPath', + properties: [ + { + name: 'input_path', + kind: 'variable', + type_signature: 'InputPath', + }, + { + name: 'id', + kind: 'variable', + type_signature: 'PathId', + }, + { + name: 'is_directory', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'root_dir', + kind: 'variable', + type_signature: 'PathId', + }, + ], + }, + { + name: 'ResolvedInputFile', + kind: 'type', + source_line: 109, + type_signature: 'ResolvedInputFile', + properties: [ + { + name: 'id', + kind: 'variable', + type_signature: 'PathId', + }, + { + name: 'input_path', + kind: 'variable', + type_signature: 'InputPath', + }, + { + name: 'resolved_input_path', + kind: 'variable', + type_signature: 'ResolvedInputPath', + }, + ], + }, + { + name: 'ResolvedInputPaths', + kind: 'type', + source_line: 115, + type_signature: 'ResolvedInputPaths', + properties: [ + { + name: 'resolved_input_paths', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'possible_paths_by_input_path', + kind: 'variable', + type_signature: 'Map>', + }, + { + name: 'unmapped_input_paths', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'resolve_input_paths', + kind: 'function', + doc_comment: + "Gets the path data for each input path, checking the filesystem for the possibilities\nand stopping at the first existing file or falling back to the first existing directory.\nIf none is found for an input path, it's added to `unmapped_input_paths`.", + source_line: 126, + type_signature: + '(input_paths: InputPath[], root_dirs: PathId[], extensions: string[]): ResolvedInputPaths', + return_type: 'ResolvedInputPaths', + parameters: [ + { + name: 'input_paths', + type: 'InputPath[]', + optional: false, + }, + { + name: 'root_dirs', + type: 'PathId[]', + optional: false, + }, + { + name: 'extensions', + type: 'string[]', + optional: false, + }, + ], + }, + { + name: 'ResolvedInputFiles', + kind: 'type', + source_line: 179, + type_signature: 'ResolvedInputFiles', + properties: [ + { + name: 'resolved_input_files', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'resolved_input_files_by_root_dir', + kind: 'variable', + type_signature: 'Map>', + }, + { + name: 'input_directories_with_no_files', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'resolve_input_files', + kind: 'function', + doc_comment: + 'Finds all of the matching files for the given input paths.\nDe-dupes source ids.', + source_line: 189, + type_signature: + '(resolved_input_paths: ResolvedInputPath[], search?: (dir: string) => ResolvedPath[]): ResolvedInputFiles', + return_type: 'ResolvedInputFiles', + parameters: [ + { + name: 'resolved_input_paths', + type: 'ResolvedInputPath[]', + optional: false, + }, + { + name: 'search', + type: '(dir: string) => ResolvedPath[]', + optional: false, + default_value: 'search_fs', + }, + ], + }, + ], + dependencies: ['paths.ts', 'search_fs.ts', 'task.ts'], + dependents: ['gen.task.ts', 'gen.ts', 'invoke_task.ts', 'resolve.task.ts', 'task.ts'], + }, + { + path: 'invoke_task.ts', + declarations: [ + { + name: 'invoke_task', + kind: 'function', + doc_comment: + 'Invokes Gro tasks by name using the filesystem as the source.\n\nWhen a task is invoked,\nGro first searches for tasks in the current working directory.\nand falls back to searching Gro\'s directory, if the two are different.\nSee `src/lib/input_path.ts` for info about what "task_name" can refer to.\nIf it matches a directory, all of the tasks within it are logged,\nboth in the current working directory and Gro.\n\nThis code is particularly hairy because\nwe\'re accepting a wide range of user input\nand trying to do the right thing.\nPrecise error messages are especially difficult and\nthere are some subtle differences in the complex logical branches.\nThe comments describe each condition.', + source_line: 37, + type_signature: + '(task_name: RawInputPath, args: Args | undefined, config: GroConfig, initial_filer?: Filer | undefined, initial_timings?: Timings | null | undefined, parent_log?: Logger | undefined): Promise<...>', + return_type: 'Promise', + parameters: [ + { + name: 'task_name', + type: 'RawInputPath', + optional: false, + description: '- The name of the task to invoke.', + }, + { + name: 'args', + type: 'Args | undefined', + optional: false, + description: '- The CLI args to pass to the task.', + }, + { + name: 'config', + type: 'GroConfig', + optional: false, + description: '- The Gro configuration.', + }, + { + name: 'initial_filer', + type: 'Filer | undefined', + optional: true, + }, + { + name: 'initial_timings', + type: 'Timings | null | undefined', + optional: true, + description: + '- The timings to use for the top-level task, `null` for composed tasks.', + }, + { + name: 'parent_log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + ], + dependencies: [ + 'args.ts', + 'filer.ts', + 'input_path.ts', + 'package_json.ts', + 'run_task.ts', + 'task.ts', + 'task_logging.ts', + ], + dependents: ['invoke.ts'], + }, + { + path: 'invoke.ts', + declarations: [], + dependencies: ['args.ts', 'gro_config.ts', 'invoke_task.ts', 'sveltekit_helpers.ts'], + }, + { + path: 'lint.task.ts', + declarations: [], + dependencies: ['args.ts', 'cli.ts', 'task.ts'], + }, + { + path: 'loader.ts', + declarations: [], + dependencies: [ + 'constants.ts', + 'paths.ts', + 'resolve_specifier.ts', + 'svelte_config.ts', + 'sveltekit_helpers.ts', + 'sveltekit_shim_app.ts', + 'sveltekit_shim_env.ts', + ], + }, + { + path: 'module.ts', + declarations: [ + { + name: 'MODULE_PATH_SRC_PREFIX', + kind: 'variable', + source_line: 4, + type_signature: 'string', + }, + { + name: 'MODULE_PATH_LIB_PREFIX', + kind: 'variable', + source_line: 5, + type_signature: 'string', + }, + { + name: 'is_external_module', + kind: 'function', + source_line: 12, + type_signature: '(module_name: string): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'module_name', + type: 'string', + optional: false, + }, + ], + }, + ], + dependencies: ['constants.ts', 'paths.ts'], + }, + { + path: 'modules.ts', + declarations: [ + { + name: 'ModuleMeta', + kind: 'type', + source_line: 11, + type_signature: 'ModuleMeta', + generic_params: [ + { + name: 'TModule', + constraint: 'Record', + default_type: 'Record', + }, + ], + properties: [ + { + name: 'id', + kind: 'variable', + type_signature: 'PathId', + }, + { + name: 'mod', + kind: 'variable', + type_signature: 'TModule', + }, + ], + }, + { + name: 'LoadModuleResult', + kind: 'type', + source_line: 16, + type_signature: 'LoadModuleResult', + generic_params: [ + { + name: 'TModule', + }, + ], + }, + { + name: 'LoadModuleFailure', + kind: 'type', + source_line: 17, + type_signature: 'LoadModuleFailure', + }, + { + name: 'load_module', + kind: 'function', + source_line: 27, + type_signature: + '>(id: PathId, validate?: ((mod: Record) => mod is TModule) | undefined, bust_cache?: boolean | undefined): Promise>', + return_type: 'Promise>', + parameters: [ + { + name: 'id', + type: 'PathId', + optional: false, + }, + { + name: 'validate', + type: '((mod: Record) => mod is TModule) | undefined', + optional: true, + }, + { + name: 'bust_cache', + type: 'boolean | undefined', + optional: true, + }, + ], + }, + { + name: 'LoadModulesFailure', + kind: 'type', + source_line: 50, + type_signature: 'LoadModulesFailure', + generic_params: [ + { + name: 'TModuleMeta', + constraint: 'ModuleMeta', + }, + ], + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'load_module_failures'", + }, + { + name: 'load_module_failures', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'reasons', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'modules', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'LoadModulesResult', + kind: 'type', + source_line: 58, + type_signature: 'LoadModulesResult', + generic_params: [ + { + name: 'TModuleMeta', + constraint: 'ModuleMeta', + }, + ], + }, + { + name: 'load_modules', + kind: 'function', + source_line: 66, + type_signature: + ', TModuleMeta extends ModuleMeta>(resolved_input_files: ResolvedInputFile[], validate: (mod: any) => mod is TModule, map_module_meta: (resolved_input_file: ResolvedInputFile, mod: TModule) => TModuleMeta, timings?: Timings | undefined): Promise<...>', + return_type: 'Promise>', + parameters: [ + { + name: 'resolved_input_files', + type: 'ResolvedInputFile[]', + optional: false, + }, + { + name: 'validate', + type: '(mod: any) => mod is TModule', + optional: false, + }, + { + name: 'map_module_meta', + type: '(resolved_input_file: ResolvedInputFile, mod: TModule) => TModuleMeta', + optional: false, + }, + { + name: 'timings', + type: 'Timings | undefined', + optional: true, + }, + ], + }, + ], + dependencies: ['paths.ts'], + dependents: ['gen.ts', 'gen_helpers.ts', 'task.ts'], + }, + { + path: 'package_json.ts', + declarations: [ + { + name: 'PackageJsonMapper', + kind: 'type', + source_line: 23, + type_signature: 'PackageJsonMapper', + }, + { + name: 'EMPTY_PACKAGE_JSON', + kind: 'variable', + source_line: 27, + type_signature: + '{ [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }', + }, + { + name: 'load_package_json', + kind: 'function', + source_line: 29, + type_signature: + '(dir?: string, cache?: Record | undefined, parse?: boolean, log?: Logger | undefined): { ...; }', + return_type: + '{ [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }', + parameters: [ + { + name: 'dir', + type: 'string', + optional: false, + default_value: 'IS_THIS_GRO ? gro_paths.root : paths.root', + }, + { + name: 'cache', + type: 'Record | undefined', + optional: true, + }, + { + name: 'parse', + type: 'boolean', + optional: false, + default_value: 'true', + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'sync_package_json', + kind: 'function', + source_line: 54, + type_signature: + '(map_package_json: PackageJsonMapper, log: Logger, write?: boolean, dir?: string, exports_dir?: string): Promise<{ package_json: { [x: string]: unknown; name: string; version: string; ... 29 more ...; exports?: string | ... 2 more ... | undefined; } | null; changed: boolean; }>', + return_type: + 'Promise<{ package_json: { [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; ... 25 more ...; exports?: string | ... 2 more ... | undefined; } | null; changed: boolean; }>', + parameters: [ + { + name: 'map_package_json', + type: 'PackageJsonMapper', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'write', + type: 'boolean', + optional: false, + default_value: 'true', + }, + { + name: 'dir', + type: 'string', + optional: false, + default_value: 'paths.root', + }, + { + name: 'exports_dir', + type: 'string', + optional: false, + default_value: 'paths.lib', + }, + ], + }, + { + name: 'load_gro_package_json', + kind: 'function', + source_line: 88, + type_signature: + '(): { [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }', + return_type: + '{ [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }', + parameters: [], + }, + { + name: 'write_package_json', + kind: 'function', + source_line: 94, + type_signature: '(serialized_package_json: string): void', + return_type: 'void', + parameters: [ + { + name: 'serialized_package_json', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'serialize_package_json', + kind: 'function', + source_line: 98, + type_signature: + '(package_json: { [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }): string', + return_type: 'string', + parameters: [ + { + name: 'package_json', + type: '{ [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }', + optional: false, + }, + ], + }, + { + name: 'update_package_json', + kind: 'function', + doc_comment: + 'Updates package.json. Writes to the filesystem only when contents change.', + source_line: 104, + type_signature: + '(update: (package_json: { [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }) => { ...; } | ... 1 more ... | null, dir?: string, write?: boolean): Promise<...>', + return_type: + 'Promise<{ package_json: { [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; ... 25 more ...; exports?: string | ... 2 more ... | undefined; } | null; changed: boolean; }>', + parameters: [ + { + name: 'update', + type: '(package_json: { [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }) => { ...; } | ... 1 more ... ...', + optional: false, + }, + { + name: 'dir', + type: 'string', + optional: false, + default_value: 'paths.root', + }, + { + name: 'write', + type: 'boolean', + optional: false, + default_value: 'true', + }, + ], + }, + { + name: 'to_package_exports', + kind: 'function', + source_line: 125, + type_signature: '(paths: string[]): string | Record | null', + return_type: 'string | Record | null', + parameters: [ + { + name: 'paths', + type: 'string[]', + optional: false, + }, + ], + }, + { + name: 'parse_repo_url', + kind: 'function', + source_line: 180, + type_signature: + '(package_json: { [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }): { ...; } | undefined', + return_type: '{ owner: string; repo: string; } | undefined', + parameters: [ + { + name: 'package_json', + type: '{ [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }', + optional: false, + }, + ], + }, + { + name: 'has_dep', + kind: 'function', + source_line: 228, + type_signature: + '(dep_name: string, package_json?: { [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; ... 25 more ...; exports?: string | ... 2 more ... | undefined; }): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'dep_name', + type: 'string', + optional: false, + }, + { + name: 'package_json', + type: '{ [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }', + optional: false, + default_value: 'load_package_json()', + }, + ], + }, + { + name: 'PackageJsonDep', + kind: 'type', + source_line: 236, + type_signature: 'PackageJsonDep', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'version', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'extract_deps', + kind: 'function', + source_line: 241, + type_signature: + '(package_json: { [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }): PackageJsonDep[]', + return_type: 'PackageJsonDep[]', + parameters: [ + { + name: 'package_json', + type: '{ [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }', + optional: false, + }, + ], + }, + ], + dependencies: [ + 'constants.ts', + 'github.ts', + 'paths.ts', + 'search_fs.ts', + 'sveltekit_helpers.ts', + ], + dependents: [ + 'changeset.task.ts', + 'check.task.ts', + 'format_file.ts', + 'gro.config.default.ts', + 'gro_plugin_sveltekit_app.ts', + 'gro_plugin_sveltekit_library.ts', + 'invoke_task.ts', + 'publish.task.ts', + 'release.task.ts', + 'sveltekit_helpers.ts', + 'sync.task.ts', + 'test.task.ts', + 'upgrade.task.ts', + ], + }, + { + path: 'parse_exports_context.ts', + declarations: [ + { + name: 'ParseExportsContext', + kind: 'class', + doc_comment: 'A class to track export context and determine export kinds.', + source_line: 10, + members: [ + { + name: 'log', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'Logger | undefined', + }, + { + name: 'debug', + kind: 'variable', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: + '(program: Program, log?: Logger | undefined): ParseExportsContext', + parameters: [ + { + name: 'program', + type: 'Program', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'analyze_source_file', + kind: 'function', + doc_comment: 'Analyze a source file to prepare for export processing.', + type_signature: '(source_file: SourceFile): void', + return_type: 'void', + parameters: [ + { + name: 'source_file', + type: 'SourceFile', + optional: false, + }, + ], + }, + { + name: 'process_exports', + kind: 'function', + doc_comment: 'Process a list of exported symbols and identify their kinds.', + type_signature: + '(source_file: SourceFile, exports: Symbol[], declarations?: ExportDeclaration[]): ExportDeclaration[]', + return_type: 'ExportDeclaration[]', + parameters: [ + { + name: 'source_file', + type: 'SourceFile', + optional: false, + }, + { + name: 'exports', + type: 'Symbol[]', + optional: false, + }, + { + name: 'declarations', + type: 'ExportDeclaration[]', + optional: false, + default_value: '[]', + }, + ], + }, + ], + }, + ], + dependents: ['parse_exports.ts'], + }, + { + path: 'parse_exports.ts', + declarations: [ + { + name: 'Declaration', + kind: 'type', + source_line: 11, + type_signature: 'Declaration', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'kind', + kind: 'variable', + type_signature: 'DeclarationKind | null', + }, + ], + }, + { + name: 'ExportDeclaration', + kind: 'type', + source_line: 16, + type_signature: 'ExportDeclaration', + }, + { + name: 'parse_exports', + kind: 'function', + doc_comment: 'Parse exports from a file based on its file type and content.', + source_line: 21, + type_signature: + '(id: PathId, program?: Program | undefined, declarations?: ExportDeclaration[], log?: Logger | undefined): ExportDeclaration[]', + return_type: 'ExportDeclaration[]', + parameters: [ + { + name: 'id', + type: 'PathId', + optional: false, + }, + { + name: 'program', + type: 'Program | undefined', + optional: true, + }, + { + name: 'declarations', + type: 'ExportDeclaration[]', + optional: false, + default_value: '[]', + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'infer_declarations_from_file_type', + kind: 'function', + source_line: 54, + type_signature: + '(file_path: PathId, declarations?: ExportDeclaration[]): ExportDeclaration[]', + return_type: 'ExportDeclaration[]', + parameters: [ + { + name: 'file_path', + type: 'PathId', + optional: false, + }, + { + name: 'declarations', + type: 'ExportDeclaration[]', + optional: false, + default_value: '[]', + }, + ], + }, + { + name: 'process_ts_exports', + kind: 'function', + doc_comment: 'Process TypeScript exports, identifying their kinds.', + source_line: 90, + type_signature: + '(source_file: SourceFile, program: Program, exports: Symbol[], declarations?: ExportDeclaration[], log?: Logger | undefined): ExportDeclaration[]', + return_type: 'ExportDeclaration[]', + parameters: [ + { + name: 'source_file', + type: 'SourceFile', + optional: false, + }, + { + name: 'program', + type: 'Program', + optional: false, + }, + { + name: 'exports', + type: 'Symbol[]', + optional: false, + }, + { + name: 'declarations', + type: 'ExportDeclaration[]', + optional: false, + default_value: '[]', + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + ], + dependencies: ['constants.ts', 'parse_exports_context.ts'], + dependents: ['source_json.ts'], + }, + { + path: 'parse_imports.ts', + declarations: [ + { + name: 'ImportSpecifier', + kind: 'type', + source_line: 8, + type_signature: 'ImportSpecifier', + }, + { + name: 'parse_imports', + kind: 'function', + source_line: 33, + type_signature: + '(id: PathId, contents: string, ignore_types?: boolean): ImportSpecifier[]', + return_type: 'ImportSpecifier[]', + parameters: [ + { + name: 'id', + type: 'PathId', + optional: false, + }, + { + name: 'contents', + type: 'string', + optional: false, + }, + { + name: 'ignore_types', + type: 'boolean', + optional: false, + default_value: 'true', + }, + ], + }, + ], + dependencies: ['constants.ts'], + dependents: ['filer.ts'], + }, + { + path: 'paths.ts', + declarations: [ + { + name: 'LIB_DIRNAME', + kind: 'variable', + source_line: 23, + type_signature: 'string', + }, + { + name: 'LIB_PATH', + kind: 'variable', + source_line: 24, + type_signature: 'string', + }, + { + name: 'LIB_DIR', + kind: 'variable', + doc_comment: '', + source_line: 26, + type_signature: 'string', + }, + { + name: 'ROUTES_DIRNAME', + kind: 'variable', + source_line: 27, + type_signature: 'string', + }, + { + name: 'Paths', + kind: 'type', + source_line: 29, + type_signature: 'Paths', + properties: [ + { + name: 'root', + kind: 'variable', + type_signature: 'string', + doc_comment: '', + }, + { + name: 'source', + kind: 'variable', + type_signature: 'string', + doc_comment: '', + }, + { + name: 'lib', + kind: 'variable', + type_signature: 'string', + doc_comment: '', + }, + { + name: 'build', + kind: 'variable', + type_signature: 'string', + doc_comment: '', + }, + { + name: 'build_dev', + kind: 'variable', + type_signature: 'string', + doc_comment: '', + }, + { + name: 'config', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'create_paths', + kind: 'function', + source_line: 43, + type_signature: '(root_dir: string): Paths', + return_type: 'Paths', + parameters: [ + { + name: 'root_dir', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'infer_paths', + kind: 'function', + source_line: 56, + type_signature: '(id: PathId): Paths', + return_type: 'Paths', + parameters: [ + { + name: 'id', + type: 'PathId', + optional: false, + }, + ], + }, + { + name: 'is_gro_id', + kind: 'function', + source_line: 58, + type_signature: '(id: PathId): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'id', + type: 'PathId', + optional: false, + }, + ], + }, + { + name: 'to_root_path', + kind: 'function', + source_line: 62, + type_signature: '(id: PathId, p?: Paths): string', + return_type: 'string', + parameters: [ + { + name: 'id', + type: 'PathId', + optional: false, + }, + { + name: 'p', + type: 'Paths', + optional: false, + default_value: 'infer_paths(id)', + }, + ], + }, + { + name: 'path_id_to_base_path', + kind: 'function', + source_line: 66, + type_signature: '(path_id: PathId, p?: Paths): string', + return_type: 'string', + parameters: [ + { + name: 'path_id', + type: 'PathId', + optional: false, + }, + { + name: 'p', + type: 'Paths', + optional: false, + default_value: 'infer_paths(path_id)', + }, + ], + }, + { + name: 'base_path_to_path_id', + kind: 'function', + source_line: 71, + type_signature: '(base_path: string, p?: Paths): PathId', + return_type: 'PathId', + parameters: [ + { + name: 'base_path', + type: 'string', + optional: false, + }, + { + name: 'p', + type: 'Paths', + optional: false, + default_value: 'infer_paths(base_path)', + }, + ], + }, + { + name: 'print_path', + kind: 'function', + source_line: 74, + type_signature: '(path: string, p?: Paths): string', + return_type: 'string', + parameters: [ + { + name: 'path', + type: 'string', + optional: false, + }, + { + name: 'p', + type: 'Paths', + optional: false, + default_value: 'infer_paths(path)', + }, + ], + }, + { + name: 'replace_extension', + kind: 'function', + source_line: 82, + type_signature: '(path: string, new_extension: string): string', + return_type: 'string', + parameters: [ + { + name: 'path', + type: 'string', + optional: false, + }, + { + name: 'new_extension', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'paths', + kind: 'variable', + doc_comment: 'Paths for the user repo.', + source_line: 90, + type_signature: 'Paths', + }, + { + name: 'GRO_PACKAGE_DIR', + kind: 'variable', + doc_comment: '', + source_line: 93, + type_signature: '"gro/"', + }, + { + name: 'IS_THIS_GRO', + kind: 'variable', + source_line: 105, + type_signature: 'boolean', + }, + { + name: 'gro_paths', + kind: 'variable', + doc_comment: 'Paths for the Gro package being used by the user repo.', + source_line: 109, + type_signature: 'Paths', + }, + { + name: 'GRO_DIST_DIR', + kind: 'variable', + doc_comment: '', + source_line: 111, + type_signature: 'string', + }, + ], + dependencies: ['constants.ts', 'svelte_config.ts'], + dependents: [ + 'build.task.ts', + 'build_cache.ts', + 'clean_fs.ts', + 'deploy.task.ts', + 'filer.ts', + 'format.task.ts', + 'format_directory.ts', + 'gen.task.ts', + 'gen.ts', + 'gen_helpers.ts', + 'gro_config.ts', + 'gro_plugin_gen.ts', + 'gro_plugin_server.ts', + 'input_path.ts', + 'loader.ts', + 'module.ts', + 'modules.ts', + 'package_json.ts', + 'resolve_specifier.ts', + 'run_gen.ts', + 'source_json.ts', + 'task.ts', + 'task_logging.ts', + 'test.task.ts', + 'typecheck.task.ts', + ], + }, + { + path: 'plugin.ts', + declarations: [ + { + name: 'Plugin', + kind: 'type', + doc_comment: + 'Gro `Plugin`s enable custom behavior during `gro dev` and `gro build`.\nIn contrast, `Adapter`s use the results of `gro build` to produce final artifacts.', + source_line: 7, + type_signature: 'Plugin', + generic_params: [ + { + name: 'TPluginContext', + constraint: 'PluginContext', + default_type: 'PluginContext', + }, + ], + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'setup', + kind: 'variable', + type_signature: '(ctx: TPluginContext) => void | Promise', + }, + { + name: 'adapt', + kind: 'variable', + type_signature: '(ctx: TPluginContext) => void | Promise', + }, + { + name: 'teardown', + kind: 'variable', + type_signature: '(ctx: TPluginContext) => void | Promise', + }, + ], + also_exported_from: ['index.ts'], + }, + { + name: 'CreateConfigPlugins', + kind: 'type', + source_line: 14, + type_signature: 'CreateConfigPlugins', + generic_params: [ + { + name: 'TPluginContext', + constraint: 'PluginContext', + default_type: 'PluginContext', + }, + ], + }, + { + name: 'PluginContext', + kind: 'type', + source_line: 18, + type_signature: 'PluginContext', + generic_params: [ + { + name: 'TArgs', + default_type: 'object', + }, + ], + extends: ['TaskContext'], + properties: [ + { + name: 'dev', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'watch', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'Plugins', + kind: 'class', + doc_comment: 'See `Plugins.create` for a usage example.', + source_line: 24, + generic_params: [ + { + name: 'TPluginContext', + constraint: 'PluginContext', + }, + ], + members: [ + { + name: 'ctx', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'TPluginContext', + }, + { + name: 'instances', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'Array>', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: + '(ctx: TPluginContext, instances: Plugin>[]): Plugins', + parameters: [ + { + name: 'ctx', + type: 'TPluginContext', + optional: false, + }, + { + name: 'instances', + type: 'Plugin>[]', + optional: false, + }, + ], + }, + { + name: 'create', + kind: 'function', + modifiers: ['static'], + type_signature: + '(ctx: TPluginContext): Promise>', + return_type: 'Promise>', + parameters: [ + { + name: 'ctx', + type: 'TPluginContext', + optional: false, + }, + ], + }, + { + name: 'setup', + kind: 'function', + type_signature: '(): Promise', + return_type: 'Promise', + parameters: [], + }, + { + name: 'adapt', + kind: 'function', + type_signature: '(): Promise', + return_type: 'Promise', + parameters: [], + }, + { + name: 'teardown', + kind: 'function', + type_signature: '(): Promise', + return_type: 'Promise', + parameters: [], + }, + ], + }, + { + name: 'replace_plugin', + kind: 'function', + doc_comment: + 'Replaces a plugin by name in `plugins` without mutating the param.\nThrows if the plugin name cannot be found.', + source_line: 96, + type_signature: + '(plugins: Plugin>[], new_plugin: Plugin>, name?: string): Plugin>[]', + return_type: 'Plugin>[]', + return_description: + '`plugins` with `new_plugin` at the index of the plugin with `name`', + parameters: [ + { + name: 'plugins', + type: 'Plugin>[]', + optional: false, + description: + '- accepts the same types as the return value of `CreateConfigPlugins`', + }, + { + name: 'new_plugin', + type: 'Plugin>', + optional: false, + }, + { + name: 'name', + type: 'string', + optional: false, + description: '-', + default_value: 'new_plugin.name', + }, + ], + also_exported_from: ['index.ts'], + }, + ], + dependents: ['build.task.ts', 'dev.task.ts', 'index.ts'], + }, + { + path: 'publish.task.ts', + declarations: [], + dependencies: [ + 'changelog.ts', + 'changeset_helpers.ts', + 'cli.ts', + 'env.ts', + 'package_json.ts', + 'sveltekit_helpers.ts', + 'task.ts', + ], + }, + { + path: 'register.ts', + declarations: [], + }, + { + path: 'reinstall.task.ts', + declarations: [], + dependencies: ['constants.ts', 'task.ts'], + }, + { + path: 'release.task.ts', + declarations: [], + dependencies: ['package_json.ts', 'sveltekit_helpers.ts'], + }, + { + path: 'resolve_specifier.ts', + declarations: [ + { + name: 'ResolvedSpecifier', + kind: 'type', + source_line: 9, + type_signature: 'ResolvedSpecifier', + properties: [ + { + name: 'path_id', + kind: 'variable', + type_signature: 'PathId', + doc_comment: 'The resolved filesystem path for the specifier.', + }, + { + name: 'path_id_with_querystring', + kind: 'variable', + type_signature: 'string', + doc_comment: + 'Same as `path_id` but includes `?raw` and other querystrings. (currently none)', + }, + { + name: 'specifier', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'mapped_specifier', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'namespace', + kind: 'variable', + type_signature: + "undefined | 'sveltekit_local_imports_ts' | 'sveltekit_local_imports_js'", + }, + { + name: 'raw', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'resolve_specifier', + kind: 'function', + doc_comment: + 'Maps an import `specifier` relative to `dir`,\nand infer the correct extension following Vite conventions.\nIf no `.js` file is found for the specifier on the filesystem, it assumes `.ts`.', + source_line: 29, + type_signature: '(specifier: string, dir: string): ResolvedSpecifier', + return_type: 'ResolvedSpecifier', + parameters: [ + { + name: 'specifier', + type: 'string', + optional: false, + }, + { + name: 'dir', + type: 'string', + optional: false, + }, + ], + }, + ], + dependencies: ['paths.ts'], + dependents: [ + 'esbuild_plugin_external_worker.ts', + 'esbuild_plugin_sveltekit_local_imports.ts', + 'filer.ts', + 'loader.ts', + ], + }, + { + path: 'resolve.task.ts', + declarations: [], + dependencies: ['input_path.ts', 'task.ts'], + }, + { + path: 'run_gen.ts', + declarations: [ + { + name: 'GEN_NO_PROD_MESSAGE', + kind: 'variable', + source_line: 22, + type_signature: '"gen runs only during development"', + }, + { + name: 'run_gen', + kind: 'function', + source_line: 24, + type_signature: + '(gen_modules: GenfileModuleMeta[], config: GroConfig, filer: Filer, log: Logger, timings: Timings, invoke_task: InvokeTask, format_file?: ((content: string, options: Options, base_options?: Options | ... 1 more ... | undefined) => Promise<...>) | undefined): Promise<...>', + return_type: 'Promise', + parameters: [ + { + name: 'gen_modules', + type: 'GenfileModuleMeta[]', + optional: false, + }, + { + name: 'config', + type: 'GroConfig', + optional: false, + }, + { + name: 'filer', + type: 'Filer', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'timings', + type: 'Timings', + optional: false, + }, + { + name: 'invoke_task', + type: 'InvokeTask', + optional: false, + }, + { + name: 'format_file', + type: '((content: string, options: Options, base_options?: Options | null | undefined) => Promise) | undefined', + optional: true, + }, + ], + }, + ], + dependencies: ['gen.ts', 'paths.ts', 'svelte_config.ts'], + dependents: ['gen.task.ts'], + }, + { + path: 'run_task.ts', + declarations: [ + { + name: 'RunTaskResult', + kind: 'type', + source_line: 14, + type_signature: 'RunTaskResult', + }, + { + name: 'run_task', + kind: 'function', + source_line: 25, + type_signature: + '(task_meta: TaskModuleMeta, unparsed_args: Args, invoke_task: (task_name: RawInputPath, args: Args | undefined, config: GroConfig, initial_filer?: Filer | undefined, initial_timings?: Timings | ... 1 more ... | undefined, parent_log?: Logger | undefined) => Promise<...>, config: GroConfig, filer: Filer, log: Logger, timings: Timings): Promise<...>', + return_type: 'Promise', + parameters: [ + { + name: 'task_meta', + type: 'TaskModuleMeta', + optional: false, + }, + { + name: 'unparsed_args', + type: 'Args', + optional: false, + }, + { + name: 'invoke_task', + type: '(task_name: RawInputPath, args: Args | undefined, config: GroConfig, initial_filer?: Filer | undefined, initial_timings?: Timings | null | undefined, parent_log?: Logger | undefined) => Promise<...>', + optional: false, + }, + { + name: 'config', + type: 'GroConfig', + optional: false, + }, + { + name: 'filer', + type: 'Filer', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'timings', + type: 'Timings', + optional: false, + }, + ], + }, + ], + dependencies: ['args.ts', 'svelte_config.ts', 'task.ts', 'task_logging.ts'], + dependents: ['invoke_task.ts'], + }, + { + path: 'run.task.ts', + declarations: [], + module_comment: + "Runs a TypeScript file with Gro's loader, forwarding all args to the script.\nUseful for scripts that need SvelteKit shims ($lib, $env, etc).", + dependencies: ['args.ts', 'gro_helpers.ts', 'task.ts'], + }, + { + path: 'search_fs.ts', + declarations: [ + { + name: 'SearchFsOptions', + kind: 'type', + source_line: 8, + type_signature: 'SearchFsOptions', + properties: [ + { + name: 'filter', + kind: 'variable', + type_signature: 'PathFilter | Array', + doc_comment: + 'One or more filter functions, any of which can short-circuit the search by returning `false`.', + }, + { + name: 'file_filter', + kind: 'variable', + type_signature: 'FileFilter | Array', + doc_comment: + 'One or more file filter functions. Every filter must pass for a file to be included.', + }, + { + name: 'sort', + kind: 'variable', + type_signature: + 'boolean | null | ((a: ResolvedPath, b: ResolvedPath) => number)', + doc_comment: + 'Pass `null` or `false` to speed things up at the cost of volatile ordering.', + }, + { + name: 'include_directories', + kind: 'variable', + type_signature: 'boolean', + doc_comment: 'Set to `true` to include directories. Defaults to `false`.', + }, + { + name: 'cwd', + kind: 'variable', + type_signature: 'string | null', + doc_comment: "Sets the cwd for `dir` unless it's an absolute path or `null`.", + }, + ], + }, + { + name: 'search_fs', + kind: 'function', + source_line: 31, + type_signature: '(dir: string, options?: SearchFsOptions): ResolvedPath[]', + return_type: 'ResolvedPath[]', + parameters: [ + { + name: 'dir', + type: 'string', + optional: false, + }, + { + name: 'options', + type: 'SearchFsOptions', + optional: false, + default_value: 'EMPTY_OBJECT', + }, + ], + }, + { + name: 'find_first_existing_file', + kind: 'function', + source_line: 93, + type_signature: '(paths: string[]): string | null', + return_type: 'string | null', + parameters: [ + { + name: 'paths', + type: 'string[]', + optional: false, + }, + ], + }, + ], + dependents: ['gen.ts', 'input_path.ts', 'package_json.ts', 'source_json.ts', 'task.ts'], + }, + { + path: 'source_json.ts', + declarations: [ + { + name: 'SourceJsonMapper', + kind: 'type', + source_line: 14, + type_signature: 'SourceJsonMapper', + }, + { + name: 'source_json_create', + kind: 'function', + source_line: 18, + type_signature: + '(package_json: { [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }, lib_path?: string | undefined, log?: Logger | undefined): { ...; }', + return_type: + '{ [x: string]: unknown; name: string; version: string; modules?: { [x: string]: unknown; path: string; declarations?: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; ... 19 more ...; alias_of?: { ...; } | undefined; }[] | undefine...', + parameters: [ + { + name: 'package_json', + type: '{ [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }', + optional: false, + }, + { + name: 'lib_path', + type: 'string | undefined', + optional: true, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'source_json_serialize', + kind: 'function', + source_line: 29, + type_signature: + '(source_json: { [x: string]: unknown; name: string; version: string; modules?: { [x: string]: unknown; path: string; declarations?: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; ... 19 more ...; alias_of?: { ...; } | undefined; }[] | undefined; module_comment?: string | undefined; dependencies?: string[] | undefined; dependents?: string[] | undefined; }[] | undefined; }): string', + return_type: 'string', + parameters: [ + { + name: 'source_json', + type: '{ [x: string]: unknown; name: string; version: string; modules?: { [x: string]: unknown; path: string; declarations?: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; ... 19 more ...; alias_of?: { ...; } | undefined; }[] | undefine...', + optional: false, + }, + ], + }, + { + name: 'source_modules_create', + kind: 'function', + source_line: 34, + type_signature: + '(exports: string | Record | null | undefined, lib_path?: string, log?: Logger | undefined): { [x: string]: unknown; path: string; declarations?: { [x: string]: unknown; ... 21 more ...; alias_of?: { ...; } | undefined; }[] | undefined; module_comment?: string | undefined; dependencies?: string[] | undefined; dependents?: string[] | undefined; }[] | undefined', + return_type: + '{ [x: string]: unknown; path: string; declarations?: { [x: string]: unknown; name: string; kind: "function" | "type" | "json" | "variable" | "class" | "constructor" | "component" | "css"; doc_comment?: string | undefined; ... 18 more ...; alias_of?: { ...; } | undefined; }[] | undefined; module_comment?: string | un...', + parameters: [ + { + name: 'exports', + type: 'string | Record | null | undefined', + optional: false, + }, + { + name: 'lib_path', + type: 'string', + optional: false, + default_value: 'paths.lib', + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + ], + dependencies: ['constants.ts', 'parse_exports.ts', 'paths.ts', 'search_fs.ts'], + dependents: ['gro_plugin_sveltekit_app.ts'], + }, + { + path: 'svelte_config.ts', + declarations: [ + { + name: 'load_svelte_config', + kind: 'function', + doc_comment: 'Loads a SvelteKit config at `dir`.', + source_line: 21, + type_signature: + '({ dir, config_filename, }?: { dir?: string | undefined; config_filename?: string | undefined; }): Promise', + return_type: 'Promise', + return_description: '`null` if no config is found', + parameters: [ + { + name: '__0', + type: '{ dir?: string | undefined; config_filename?: string | undefined; }', + optional: false, + default_value: 'EMPTY_OBJECT', + }, + ], + }, + { + name: 'ParsedSvelteConfig', + kind: 'type', + doc_comment: + "A subset of SvelteKit's config in a form that Gro uses\nbecause SvelteKit doesn't expose its config resolver.\nFlattens things out to keep them simple and easy to pass around,\nand doesn't deal with most properties, but includes the full `svelte_config`.\nThe `base` and `assets` in particular are renamed for clarity with Gro's internal systems,\nso these properties become first-class vocabulary inside Gro.", + source_line: 40, + type_signature: 'ParsedSvelteConfig', + properties: [ + { + name: 'svelte_config', + kind: 'variable', + type_signature: 'SvelteConfig | null', + }, + { + name: 'alias', + kind: 'variable', + type_signature: 'Record', + }, + { + name: 'base_url', + kind: 'variable', + type_signature: "'' | `/${string}` | undefined", + }, + { + name: 'assets_url', + kind: 'variable', + type_signature: "'' | `http://${string}` | `https://${string}` | undefined", + }, + { + name: 'assets_path', + kind: 'variable', + type_signature: 'string', + doc_comment: 'Same as the SvelteKit `files.assets`.', + }, + { + name: 'lib_path', + kind: 'variable', + type_signature: 'string', + doc_comment: 'Same as the SvelteKit `files.lib`.', + }, + { + name: 'routes_path', + kind: 'variable', + type_signature: 'string', + doc_comment: 'Same as the SvelteKit `files.routes`.', + }, + { + name: 'env_dir', + kind: 'variable', + type_signature: 'string | undefined', + }, + { + name: 'private_prefix', + kind: 'variable', + type_signature: 'string | undefined', + }, + { + name: 'public_prefix', + kind: 'variable', + type_signature: 'string | undefined', + }, + { + name: 'svelte_compile_options', + kind: 'variable', + type_signature: 'CompileOptions', + }, + { + name: 'svelte_compile_module_options', + kind: 'variable', + type_signature: 'ModuleCompileOptions', + }, + { + name: 'svelte_preprocessors', + kind: 'variable', + type_signature: 'PreprocessorGroup | Array | undefined', + }, + ], + }, + { + name: 'parse_svelte_config', + kind: 'function', + doc_comment: + "Returns Gro-relevant properties of a SvelteKit config\nas a convenience wrapper around `load_svelte_config`.\nNeeded because SvelteKit doesn't expose its config resolver.", + source_line: 75, + type_signature: + '({ dir_or_config, config_filename, }?: { dir_or_config?: string | Config | undefined; config_filename?: string | undefined; }): Promise', + return_type: 'Promise', + parameters: [ + { + name: '__0', + type: '{ dir_or_config?: string | Config | undefined; config_filename?: string | undefined; }', + optional: false, + default_value: 'EMPTY_OBJECT', + }, + ], + }, + { + name: 'to_default_compile_module_options', + kind: 'function', + source_line: 129, + type_signature: + '({ dev, generate, filename, rootDir, warningFilter, }: CompileOptions): ModuleCompileOptions', + return_type: 'ModuleCompileOptions', + parameters: [ + { + name: '__0', + type: 'CompileOptions', + optional: false, + }, + ], + }, + { + name: 'default_svelte_config', + kind: 'variable', + doc_comment: + 'The parsed SvelteKit config for the cwd, cached globally at the module level.', + source_line: 140, + type_signature: 'ParsedSvelteConfig', + }, + ], + dependencies: ['constants.ts'], + dependents: [ + 'esbuild_plugin_svelte.ts', + 'filer.ts', + 'gen_helpers.ts', + 'gro_plugin_server.ts', + 'gro_plugin_sveltekit_app.ts', + 'loader.ts', + 'paths.ts', + 'run_gen.ts', + 'run_task.ts', + 'sveltekit_helpers.ts', + ], + }, + { + path: 'sveltekit_helpers.ts', + declarations: [ + { + name: 'has_sveltekit_app', + kind: 'function', + source_line: 20, + type_signature: + '(svelte_config_path?: string): Promise>', + return_type: 'Promise>', + parameters: [ + { + name: 'svelte_config_path', + type: 'string', + optional: false, + default_value: 'SVELTE_CONFIG_FILENAME', + }, + ], + }, + { + name: 'has_sveltekit_library', + kind: 'function', + source_line: 30, + type_signature: + '(package_json: { [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }, svelte_config?: ParsedSvelteConfig, dep_name?: string): Promise<...>', + return_type: 'Promise>', + parameters: [ + { + name: 'package_json', + type: '{ [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }', + optional: false, + }, + { + name: 'svelte_config', + type: 'ParsedSvelteConfig', + optional: false, + default_value: 'default_svelte_config', + }, + { + name: 'dep_name', + type: 'string', + optional: false, + default_value: 'SVELTE_PACKAGE_DEP_NAME', + }, + ], + }, + { + name: 'sveltekit_sync', + kind: 'function', + source_line: 54, + type_signature: '(sveltekit_cli?: string | Cli, pm_cli?: string): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'sveltekit_cli', + type: 'string | Cli', + optional: false, + default_value: 'SVELTEKIT_CLI', + }, + { + name: 'pm_cli', + type: 'string', + optional: false, + default_value: 'PM_CLI_DEFAULT', + }, + ], + }, + { + name: 'sveltekit_sync_if_available', + kind: 'function', + doc_comment: + 'If the SvelteKit CLI is found and its `.svelte-kit` directory is not, run `svelte-kit sync`.', + source_line: 72, + type_signature: '(sveltekit_cli?: string | Cli): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'sveltekit_cli', + type: 'string | Cli', + optional: false, + default_value: 'SVELTEKIT_CLI', + }, + ], + }, + { + name: 'sveltekit_sync_if_obviously_needed', + kind: 'function', + doc_comment: + 'If the SvelteKit CLI is found and its `.svelte-kit` directory is not, run `svelte-kit sync`.', + source_line: 85, + type_signature: '(sveltekit_cli?: string | Cli): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'sveltekit_cli', + type: 'string | Cli', + optional: false, + default_value: 'SVELTEKIT_CLI', + }, + ], + }, + { + name: 'SveltePackageOptions', + kind: 'type', + doc_comment: 'Options to the SvelteKit packaging CLI.', + see_also: ['https://kit.svelte.dev/docs/packaging#options'], + source_line: 103, + type_signature: 'SveltePackageOptions', + properties: [ + { + name: 'watch', + kind: 'variable', + type_signature: 'boolean', + doc_comment: 'Watch files in src/lib for changes and rebuild the package', + }, + { + name: 'w', + kind: 'variable', + type_signature: 'boolean', + doc_comment: 'Alias for `watch`.', + }, + { + name: 'input', + kind: 'variable', + type_signature: 'string', + doc_comment: + 'The input directory which contains all the files of the package.\nDefaults to src/lib', + }, + { + name: 'i', + kind: 'variable', + type_signature: 'string', + doc_comment: 'Alias for `input`.', + }, + { + name: 'output', + kind: 'variable', + type_signature: 'string', + doc_comment: + "The output directory where the processed files are written to.\nYour package.json's exports should point to files inside there,\nand the files array should include that folder.\nDefaults to dist", + }, + { + name: 'o', + kind: 'variable', + type_signature: 'string', + doc_comment: 'Alias for `output`.', + }, + { + name: 'types', + kind: 'variable', + type_signature: 'boolean', + doc_comment: + 'Whether or not to create type definitions (d.ts files).\nWe strongly recommend doing this as it fosters ecosystem library quality.\nDefaults to true', + }, + { + name: 't', + kind: 'variable', + type_signature: 'boolean', + doc_comment: 'Alias for `types`.', + }, + { + name: 'tsconfig', + kind: 'variable', + type_signature: 'string', + doc_comment: + 'The path to a tsconfig or jsconfig.\nWhen not provided, searches for the next upper tsconfig/jsconfig in the workspace path.', + }, + ], + }, + { + name: 'run_svelte_package', + kind: 'function', + source_line: 149, + type_signature: + '(package_json: { [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }, options: SveltePackageOptions | undefined, cli: string | Cli, log: Logger, pm_cli: string): Promise<...>', + return_type: 'Promise', + parameters: [ + { + name: 'package_json', + type: '{ [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }', + optional: false, + }, + { + name: 'options', + type: 'SveltePackageOptions | undefined', + optional: false, + }, + { + name: 'cli', + type: 'string | Cli', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'pm_cli', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'map_sveltekit_aliases', + kind: 'function', + doc_comment: 'Map an import specifier with the SvelteKit aliases.', + source_line: 180, + type_signature: '(specifier: string, aliases: [string, string][]): string', + return_type: 'string', + parameters: [ + { + name: 'specifier', + type: 'string', + optional: false, + }, + { + name: 'aliases', + type: '[string, string][]', + optional: false, + }, + ], + }, + ], + dependencies: [ + 'args.ts', + 'cli.ts', + 'constants.ts', + 'package_json.ts', + 'svelte_config.ts', + 'task.ts', + ], + dependents: [ + 'changeset.task.ts', + 'filer.ts', + 'gro.config.default.ts', + 'gro_plugin_sveltekit_library.ts', + 'invoke.ts', + 'loader.ts', + 'package_json.ts', + 'publish.task.ts', + 'release.task.ts', + 'sync.task.ts', + 'typecheck.task.ts', + ], + }, + { + path: 'sveltekit_shim_app_environment.ts', + declarations: [ + { + name: 'browser', + kind: 'variable', + doc_comment: + "This file is created dynamically by `render_sveltekit_shim_app_environment`\nbut exists here for the sake of the Node loader.\nThere may be a cleaner workaround but I couldn't find it.", + see_also: [ + 'https://github.com/nodejs/loaders for details about the forthcoming virtual file support', + ], + source_line: 11, + type_signature: 'false', + }, + { + name: 'building', + kind: 'variable', + source_line: 12, + type_signature: 'false', + }, + { + name: 'dev', + kind: 'variable', + source_line: 13, + type_signature: 'true', + }, + { + name: 'version', + kind: 'variable', + source_line: 14, + type_signature: '"TODO"', + }, + ], + module_comment: + "This file is created dynamically by `render_sveltekit_shim_app_environment`\nbut exists here for the sake of the Node loader.\nThere may be a cleaner workaround but I couldn't find it.\n@see https://github.com/nodejs/loaders for details about the forthcoming virtual file support", + }, + { + path: 'sveltekit_shim_app_forms.ts', + declarations: [ + { + name: 'applyAction', + kind: 'variable', + source_line: 11, + type_signature: + ' | undefined, Failure extends Record | undefined>(result: ActionResult) => Promise', + }, + { + name: 'deserialize', + kind: 'function', + source_line: 12, + type_signature: + ' | undefined, Failure extends Record | undefined>(result: string): ActionResult', + return_type: 'ActionResult', + parameters: [ + { + name: 'result', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'enhance', + kind: 'function', + source_line: 13, + type_signature: + ' | undefined, Failure extends Record | undefined>(form_element: HTMLFormElement, submit?: SubmitFunction | undefined): { ...; }', + return_type: '{ destroy(): void; }', + parameters: [ + { + name: 'form_element', + type: 'HTMLFormElement', + optional: false, + }, + { + name: 'submit', + type: 'SubmitFunction | undefined', + optional: true, + }, + ], + }, + ], + }, + { + path: 'sveltekit_shim_app_navigation.ts', + declarations: [ + { + name: 'afterNavigate', + kind: 'variable', + source_line: 16, + type_signature: '(callback: (navigation: AfterNavigate) => void) => void', + }, + { + name: 'beforeNavigate', + kind: 'variable', + source_line: 17, + type_signature: '(callback: (navigation: BeforeNavigate) => void) => void', + }, + { + name: 'disableScrollHandling', + kind: 'variable', + source_line: 18, + type_signature: '() => void', + }, + { + name: 'goto', + kind: 'variable', + source_line: 19, + type_signature: + '(url: string | URL, opts?: { replaceState?: boolean | undefined; noScroll?: boolean | undefined; keepFocus?: boolean | undefined; invalidateAll?: boolean | undefined; invalidate?: (string | ... 1 more ... | ((url: URL) => boolean))[] | undefined; state?: PageState | undefined; } | undefined) => Promise<...>', + }, + { + name: 'invalidate', + kind: 'variable', + source_line: 20, + type_signature: + '(resource: string | URL | ((url: URL) => boolean)) => Promise', + }, + { + name: 'invalidateAll', + kind: 'variable', + source_line: 21, + type_signature: '() => Promise', + }, + { + name: 'preloadCode', + kind: 'variable', + source_line: 22, + type_signature: '(pathname: string) => Promise', + }, + { + name: 'preloadData', + kind: 'variable', + source_line: 23, + type_signature: + '(href: string) => Promise<{ type: "loaded"; status: number; data: Record; } | { type: "redirect"; location: string; }>', + }, + ], + }, + { + path: 'sveltekit_shim_app_paths.ts', + declarations: [ + { + name: 'assets', + kind: 'variable', + source_line: 18, + type_signature: '""', + }, + { + name: 'base', + kind: 'variable', + doc_comment: '', + source_line: 20, + type_signature: '""', + }, + { + name: 'resolve', + kind: 'function', + source_line: 21, + type_signature: + '(...args: ResolveArgs): "/" | "/about" | "/docs" | "/docs/api" | "/docs/library" | "/history" | `${`/docs/api/${string}` & {}}` | `${`/docs/api/${string}/` & {}}` | ... 12 more ... | `/${string}/history/`', + return_type: + '"/" | "/about" | "/docs" | "/docs/api" | "/docs/library" | "/history" | `${`/docs/api/${string}` & {}}` | `${`/docs/api/${string}/` & {}}` | `/${string}/` | `/${string}/about` | `/${string}/docs` | `/${string}/docs/api` | `/${string}/docs/library` | `/${string}/history` | ... 6 more ... | `/${string}/history/`', + parameters: [ + { + name: 'args', + type: 'ResolveArgs', + optional: false, + }, + ], + }, + { + name: 'resolveRoute', + kind: 'variable', + doc_comment: '', + source_line: 23, + type_signature: + '(...args: ResolveArgs) => "/" | "/about" | "/docs" | "/docs/api" | "/docs/library" | "/history" | `${`/docs/api/${string}` & {}}` | `${`/docs/api/${string}/` & {}}` | ... 12 more ... | `/${string}/history/`', + }, + { + name: 'asset', + kind: 'function', + source_line: 24, + type_signature: + '(file: "/CNAME" | "/favicon.png" | "/logo.svg" | "/robots.txt" | (string & {})): string', + return_type: 'string', + parameters: [ + { + name: 'file', + type: '"/CNAME" | "/favicon.png" | "/logo.svg" | "/robots.txt" | (string & {})', + optional: false, + }, + ], + }, + ], + module_comment: + "This file is created dynamically by `render_sveltekit_shim_app_paths`\nbut exists here for the sake of the Node loader.\nThere may be a cleaner workaround but I couldn't find it.\n@see https://github.com/nodejs/loaders for details about the forthcoming virtual file support", + }, + { + path: 'sveltekit_shim_app_state.ts', + declarations: [ + { + name: 'navigating', + kind: 'variable', + source_line: 10, + type_signature: + 'Navigation | { from: null; to: null; type: null; willUnload: null; delta: null; complete: null; }', + }, + { + name: 'page', + kind: 'variable', + source_line: 19, + type_signature: + 'Page<{ module_path?: string | undefined; }, "/" | "/about" | "/docs" | "/docs/api" | "/docs/api/[...module_path]" | "/docs/library" | "/history" | null>', + }, + { + name: 'updated', + kind: 'variable', + source_line: 30, + type_signature: '{ readonly current: boolean; check(): Promise; }', + }, + ], + }, + { + path: 'sveltekit_shim_app.ts', + declarations: [ + { + name: 'SVELTEKIT_SHIM_APP_PATHS_MATCHER', + kind: 'variable', + source_line: 3, + type_signature: 'RegExp', + }, + { + name: 'SVELTEKIT_SHIM_APP_ENVIRONMENT_MATCHER', + kind: 'variable', + source_line: 4, + type_signature: 'RegExp', + }, + { + name: 'sveltekit_shim_app_specifiers', + kind: 'variable', + doc_comment: 'Maps SvelteKit `$app` specifiers to their Gro shims.', + see_also: ['https://kit.svelte.dev/docs/modules'], + source_line: 10, + type_signature: 'Map', + }, + { + name: 'render_sveltekit_shim_app_paths', + kind: 'function', + source_line: 18, + type_signature: + '(base_url?: "" | `/${string}` | undefined, assets_url?: "" | `http://${string}` | `https://${string}` | undefined): string', + return_type: 'string', + parameters: [ + { + name: 'base_url', + type: '"" | `/${string}` | undefined', + optional: false, + default_value: "''", + }, + { + name: 'assets_url', + type: '"" | `http://${string}` | `https://${string}` | undefined', + optional: false, + default_value: "''", + }, + ], + }, + { + name: 'render_sveltekit_shim_app_environment', + kind: 'function', + source_line: 32, + type_signature: '(dev: boolean): string', + return_type: 'string', + parameters: [ + { + name: 'dev', + type: 'boolean', + optional: false, + }, + ], + }, + ], + dependents: ['esbuild_plugin_sveltekit_shim_app.ts', 'loader.ts'], + }, + { + path: 'sveltekit_shim_env.ts', + declarations: [ + { + name: 'render_env_shim_module', + kind: 'function', + doc_comment: "Generates a module shim for SvelteKit's `$env` imports.", + source_line: 8, + type_signature: + '(dev: boolean, mode: "static" | "dynamic", visibility: "public" | "private", public_prefix?: string, private_prefix?: string, env_dir?: string | undefined, env_files?: string[] | undefined, ambient_env?: Record<...> | undefined): string', + return_type: 'string', + parameters: [ + { + name: 'dev', + type: 'boolean', + optional: false, + }, + { + name: 'mode', + type: '"static" | "dynamic"', + optional: false, + }, + { + name: 'visibility', + type: '"public" | "private"', + optional: false, + }, + { + name: 'public_prefix', + type: 'string', + optional: false, + default_value: "'PUBLIC_'", + }, + { + name: 'private_prefix', + type: 'string', + optional: false, + default_value: "''", + }, + { + name: 'env_dir', + type: 'string | undefined', + optional: true, + }, + { + name: 'env_files', + type: 'string[] | undefined', + optional: true, + }, + { + name: 'ambient_env', + type: 'Record | undefined', + optional: true, + }, + ], + }, + ], + dependencies: ['env.ts'], + dependents: ['esbuild_plugin_sveltekit_shim_env.ts', 'loader.ts'], + }, + { + path: 'sync.task.ts', + declarations: [], + dependencies: ['package_json.ts', 'sveltekit_helpers.ts', 'task.ts'], + }, + { + path: 'task_logging.ts', + declarations: [ + { + name: 'log_tasks', + kind: 'function', + source_line: 11, + type_signature: + '(log: Logger, loaded_tasks: LoadedTasks, log_intro?: boolean): void', + return_type: 'void', + parameters: [ + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'loaded_tasks', + type: 'LoadedTasks', + optional: false, + }, + { + name: 'log_intro', + type: 'boolean', + optional: false, + default_value: 'true', + }, + ], + }, + { + name: 'log_error_reasons', + kind: 'function', + source_line: 47, + type_signature: '(log: Logger, reasons: string[]): void', + return_type: 'void', + parameters: [ + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'reasons', + type: 'string[]', + optional: false, + }, + ], + }, + { + name: 'log_task_help', + kind: 'function', + source_line: 55, + type_signature: '(log: Logger, meta: TaskModuleMeta): void', + return_type: 'void', + parameters: [ + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'meta', + type: 'TaskModuleMeta', + optional: false, + }, + ], + }, + ], + dependencies: ['paths.ts'], + dependents: ['gen.task.ts', 'invoke_task.ts', 'run_task.ts'], + }, + { + path: 'task.ts', + declarations: [ + { + name: 'Task', + kind: 'type', + source_line: 25, + type_signature: 'Task', + generic_params: [ + { + name: 'TArgs', + default_type: 'Args', + }, + { + name: 'TArgsSchema', + constraint: 'z.ZodType', + default_type: 'z.ZodType', + }, + { + name: 'TReturn', + default_type: 'unknown', + }, + ], + properties: [ + { + name: 'run', + kind: 'variable', + type_signature: '(ctx: TaskContext) => TReturn | Promise', + }, + { + name: 'summary', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'Args', + kind: 'variable', + type_signature: 'TArgsSchema', + }, + ], + also_exported_from: ['index.ts'], + }, + { + name: 'TaskContext', + kind: 'type', + source_line: 35, + type_signature: 'TaskContext', + generic_params: [ + { + name: 'TArgs', + default_type: 'object', + }, + ], + properties: [ + { + name: 'args', + kind: 'variable', + type_signature: 'TArgs', + }, + { + name: 'config', + kind: 'variable', + type_signature: 'GroConfig', + }, + { + name: 'svelte_config', + kind: 'variable', + type_signature: 'ParsedSvelteConfig', + }, + { + name: 'filer', + kind: 'variable', + type_signature: 'Filer', + }, + { + name: 'log', + kind: 'variable', + type_signature: 'Logger', + }, + { + name: 'timings', + kind: 'variable', + type_signature: 'Timings', + }, + { + name: 'invoke_task', + kind: 'variable', + type_signature: 'InvokeTask', + }, + ], + also_exported_from: ['index.ts'], + }, + { + name: 'InvokeTask', + kind: 'type', + source_line: 45, + type_signature: 'InvokeTask', + }, + { + name: 'TASK_FILE_SUFFIX_TS', + kind: 'variable', + source_line: 47, + type_signature: '".task.ts"', + }, + { + name: 'TASK_FILE_SUFFIX_JS', + kind: 'variable', + source_line: 48, + type_signature: '".task.js"', + }, + { + name: 'TASK_FILE_SUFFIXES', + kind: 'variable', + source_line: 49, + type_signature: 'string[]', + }, + { + name: 'is_task_path', + kind: 'function', + source_line: 51, + type_signature: '(path: string): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'to_task_name', + kind: 'function', + source_line: 54, + type_signature: + '(id: PathId, task_root_dir: PathId, input_path: InputPath, root_path: PathId): string', + return_type: 'string', + parameters: [ + { + name: 'id', + type: 'PathId', + optional: false, + }, + { + name: 'task_root_dir', + type: 'PathId', + optional: false, + }, + { + name: 'input_path', + type: 'InputPath', + optional: false, + }, + { + name: 'root_path', + type: 'PathId', + optional: false, + }, + ], + }, + { + name: 'TaskError', + kind: 'class', + doc_comment: + "This is used by tasks to signal a known failure.\nIt's useful for cleaning up logging because\nwe usually don't need their stack trace.", + source_line: 83, + extends: ['Error'], + implements: [], + members: [], + also_exported_from: ['index.ts'], + }, + { + name: 'SilentError', + kind: 'class', + doc_comment: + 'This is used to tell Gro to exit silently, usually still with with a non-zero exit code.\nUsing it means error logging is handled by the code that threw it.', + source_line: 89, + extends: ['Error'], + implements: [], + members: [], + }, + { + name: 'FoundTask', + kind: 'type', + source_line: 91, + type_signature: 'FoundTask', + properties: [ + { + name: 'input_path', + kind: 'variable', + type_signature: 'InputPath', + }, + { + name: 'id', + kind: 'variable', + type_signature: 'PathId', + }, + { + name: 'task_root_dir', + kind: 'variable', + type_signature: 'PathId', + }, + ], + }, + { + name: 'FoundTasks', + kind: 'type', + source_line: 97, + type_signature: 'FoundTasks', + properties: [ + { + name: 'resolved_input_files', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'resolved_input_files_by_root_dir', + kind: 'variable', + type_signature: 'Map>', + }, + { + name: 'resolved_input_paths', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'input_paths', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'task_root_dirs', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'FindTasksResult', + kind: 'type', + source_line: 105, + type_signature: 'FindTasksResult', + }, + { + name: 'FindModulesFailure', + kind: 'type', + source_line: 106, + type_signature: 'FindModulesFailure', + }, + { + name: 'find_tasks', + kind: 'function', + doc_comment: + 'Finds modules from input paths. (see `src/lib/input_path.ts` for more)', + source_line: 129, + type_signature: + '(input_paths: InputPath[], task_root_dirs: PathId[], config: GroConfig, timings?: Timings | undefined): FindTasksResult', + return_type: 'FindTasksResult', + parameters: [ + { + name: 'input_paths', + type: 'InputPath[]', + optional: false, + }, + { + name: 'task_root_dirs', + type: 'PathId[]', + optional: false, + }, + { + name: 'config', + type: 'GroConfig', + optional: false, + }, + { + name: 'timings', + type: 'Timings | undefined', + optional: true, + }, + ], + }, + { + name: 'LoadedTasks', + kind: 'type', + source_line: 199, + type_signature: 'LoadedTasks', + properties: [ + { + name: 'modules', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'found_tasks', + kind: 'variable', + type_signature: 'FoundTasks', + }, + ], + }, + { + name: 'TaskModule', + kind: 'type', + source_line: 204, + type_signature: 'TaskModule', + properties: [ + { + name: 'task', + kind: 'variable', + type_signature: 'Task', + }, + ], + }, + { + name: 'TaskModuleMeta', + kind: 'type', + source_line: 208, + type_signature: 'TaskModuleMeta', + extends: ['ModuleMeta'], + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'LoadTasksResult', + kind: 'type', + source_line: 212, + type_signature: 'LoadTasksResult', + }, + { + name: 'LoadTasksFailure', + kind: 'type', + source_line: 213, + type_signature: 'LoadTasksFailure', + }, + { + name: 'load_tasks', + kind: 'function', + source_line: 215, + type_signature: + '(found_tasks: FoundTasks, root_path?: PathId): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'found_tasks', + type: 'FoundTasks', + optional: false, + }, + { + name: 'root_path', + type: 'PathId', + optional: false, + default_value: 'process.cwd()', + }, + ], + }, + { + name: 'validate_task_module', + kind: 'function', + source_line: 243, + type_signature: '(mod: Record): mod is TaskModule', + return_type: 'boolean', + parameters: [ + { + name: 'mod', + type: 'Record', + optional: false, + }, + ], + }, + ], + dependencies: ['input_path.ts', 'modules.ts', 'paths.ts', 'search_fs.ts'], + dependents: [ + 'build.task.ts', + 'changeset.task.ts', + 'check.task.ts', + 'deploy.task.ts', + 'format.task.ts', + 'gen.task.ts', + 'gro_plugin_sveltekit_app.ts', + 'gro_plugin_sveltekit_library.ts', + 'index.ts', + 'input_path.ts', + 'invoke_task.ts', + 'lint.task.ts', + 'publish.task.ts', + 'reinstall.task.ts', + 'resolve.task.ts', + 'run.task.ts', + 'run_task.ts', + 'sveltekit_helpers.ts', + 'sync.task.ts', + 'test.task.ts', + 'typecheck.task.ts', + 'upgrade.task.ts', + ], + }, + { + path: 'test.task.ts', + declarations: [], + dependencies: [ + 'args.ts', + 'cli.ts', + 'constants.ts', + 'package_json.ts', + 'paths.ts', + 'task.ts', + ], + }, + { + path: 'typecheck.task.ts', + declarations: [], + dependencies: [ + 'args.ts', + 'child_process_logging.ts', + 'cli.ts', + 'constants.ts', + 'paths.ts', + 'sveltekit_helpers.ts', + 'task.ts', + ], + }, + { + path: 'upgrade.task.ts', + declarations: [], + dependencies: ['args.ts', 'cli.ts', 'constants.ts', 'package_json.ts', 'task.ts'], + }, + { + path: 'watch_dir.ts', + declarations: [ + { + name: 'WatchNodeFs', + kind: 'type', + source_line: 12, + type_signature: 'WatchNodeFs', + properties: [ + { + name: 'init', + kind: 'variable', + type_signature: '() => Promise', + }, + { + name: 'close', + kind: 'variable', + type_signature: '() => Promise', + }, + ], + }, + { + name: 'WatcherChange', + kind: 'type', + source_line: 17, + type_signature: 'WatcherChange', + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: 'WatcherChangeType', + }, + { + name: 'path', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'is_directory', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'WatcherChangeType', + kind: 'type', + source_line: 22, + type_signature: 'WatcherChangeType', + }, + { + name: 'WatcherChangeCallback', + kind: 'type', + source_line: 23, + type_signature: 'WatcherChangeCallback', + }, + { + name: 'WatchDirOptions', + kind: 'type', + source_line: 25, + type_signature: 'WatchDirOptions', + properties: [ + { + name: 'dir', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'on_change', + kind: 'variable', + type_signature: 'WatcherChangeCallback', + }, + { + name: 'filter', + kind: 'variable', + type_signature: 'PathFilter | null | undefined', + }, + { + name: 'chokidar', + kind: 'variable', + type_signature: 'ChokidarOptions', + }, + { + name: 'absolute', + kind: 'variable', + type_signature: 'boolean', + doc_comment: 'When `false`, returns the `path` relative to `dir`.', + }, + { + name: 'ignored', + kind: 'variable', + type_signature: 'Matcher | null', + doc_comment: + 'Pattern to ignore files, merged into `chokidar.ignored` if also provided.\n- `undefined` (default) ignores files matching `.tmp.` pattern\n- `null` sets no default ignore pattern\n- or some custom pattern', + }, + ], + }, + { + name: 'watch_dir', + kind: 'function', + doc_comment: 'Watch for changes on the filesystem using chokidar.', + source_line: 47, + type_signature: + '({ dir, on_change, filter, absolute, chokidar, ignored, }: WatchDirOptions): WatchNodeFs', + return_type: 'WatchNodeFs', + parameters: [ + { + name: '__0', + type: 'WatchDirOptions', + optional: false, + }, + ], + }, + ], + dependents: ['filer.ts'], + }, + ], + }, + name: '@ryanatkn/gro', + repo_name: 'gro', + repo_url: 'https://github.com/ryanatkn/gro', + owner_name: 'ryanatkn', + homepage_url: 'https://gro.ryanatkn.com/', + logo_url: 'https://gro.ryanatkn.com/logo.svg', + logo_alt: 'a pixelated green oak acorn with a glint of sun', + npm_url: 'https://www.npmjs.com/package/@ryanatkn/gro', + changelog_url: 'https://github.com/ryanatkn/gro/blob/main/CHANGELOG.md', + published: true, + }, + check_runs: { + status: 'completed', + conclusion: 'success', + }, + pull_requests: [], + }, + { + library_json: { + package_json: { + name: '@ryanatkn/belt', + version: '0.40.0', + description: 'utility belt for JS', + glyph: '🦕', + logo: 'logo.svg', + logo_alt: 'a green sauropod wearing a brown utility belt', + motto: 'ancient not extinct', + public: true, + license: 'MIT', + homepage: 'https://belt.ryanatkn.com/', + author: { + name: 'Ryan Atkinson', + email: 'mail@ryanatkn.com', + url: 'https://www.ryanatkn.com/', + }, + repository: { + type: 'git', + url: 'git+https://github.com/ryanatkn/belt.git', + }, + bugs: 'https://github.com/ryanatkn/belt/issues', + funding: 'https://www.ryanatkn.com/funding', + scripts: { + start: 'gro dev', + dev: 'gro dev', + build: 'gro build', + check: 'gro check', + test: 'gro test', + preview: 'vite preview', + deploy: 'gro deploy', + benchmark: 'gro run src/benchmarks/slugify_benchmark.ts', + 'benchmark-deep-equal': + 'node --max-old-space-size=8192 --expose-gc --import @ryanatkn/gro/register.js src/lib/deep_equal.bench_comparison.ts', + 'benchmark-deep-equal-deno': + 'deno run --allow-read --allow-env --v8-flags=--expose-gc src/lib/deep_equal.bench_comparison.ts', + }, + type: 'module', + engines: { + node: '>=22.15', + }, + keywords: ['js', 'typescript', 'utilities', 'web'], + peerDependencies: { + '@types/node': '^24', + 'esm-env': '^1.2.2', + zod: '^4.0.14', + }, + peerDependenciesMeta: { + '@types/node': { + optional: true, + }, + 'esm-env': { + optional: true, + }, + zod: { + optional: true, + }, + }, + devDependencies: { + '@changesets/changelog-git': '^0.2.1', + '@ryanatkn/eslint-config': '^0.9.0', + '@ryanatkn/fuz': '^0.165.0', + '@ryanatkn/fuz_code': '^0.36.0', + '@ryanatkn/gro': '^0.179.0', + '@ryanatkn/moss': '^0.39.0', + '@sveltejs/adapter-static': '^3.0.10', + '@sveltejs/kit': '^2.49.0', + '@sveltejs/package': '^2.5.6', + '@sveltejs/vite-plugin-svelte': '^6.2.1', + '@types/node': '^24.10.1', + dequal: '^2.0.3', + eslint: '^9.39.1', + 'eslint-plugin-svelte': '^3.13.0', + 'esm-env': '^1.2.2', + prettier: '^3.6.2', + 'prettier-plugin-svelte': '^3.4.0', + svelte: '^5.44.1', + 'svelte-check': '^4.3.4', + tinybench: '^5.1.0', + tslib: '^2.8.1', + typescript: '^5.9.3', + 'typescript-eslint': '^8.48.0', + vitest: '^4.0.14', + zod: '^4.1.13', + }, + prettier: { + plugins: ['prettier-plugin-svelte'], + useTabs: true, + printWidth: 100, + singleQuote: true, + bracketSpacing: false, + overrides: [ + { + files: 'package.json', + options: { + useTabs: false, + }, + }, + ], + }, + sideEffects: ['**/*.css'], + files: ['dist', 'src/lib/**/*.ts', '!src/lib/**/*.test.*', '!dist/**/*.test.*'], + exports: { + './package.json': './package.json', + './*.js': { + types: './dist/*.d.ts', + default: './dist/*.js', + }, + './*.ts': { + types: './dist/*.d.ts', + default: './dist/*.js', + }, + }, + }, + source_json: { + name: '@ryanatkn/belt', + version: '0.40.0', + modules: [ + { + path: 'array.ts', + declarations: [ + { + name: 'EMPTY_ARRAY', + kind: 'variable', + source_line: 4, + type_signature: 'any[]', + }, + { + name: 'to_array', + kind: 'function', + doc_comment: "Converts `value` to an array if it's not already.", + source_line: 7, + type_signature: '(value: T): T extends readonly any[] ? T : T[]', + return_type: 'T extends readonly any[] ? T : T[]', + parameters: [ + { + name: 'value', + type: 'T', + optional: false, + }, + ], + }, + { + name: 'remove_unordered', + kind: 'function', + doc_comment: 'Removes an element from `array` at `index` in an unordered manner.', + source_line: 14, + type_signature: '(array: any[], index: number): void', + return_type: 'void', + parameters: [ + { + name: 'array', + type: 'any[]', + optional: false, + }, + { + name: 'index', + type: 'number', + optional: false, + }, + ], + }, + { + name: 'to_next', + kind: 'function', + doc_comment: + 'Returns a function that returns the next item in the `array`\nin a linear sequence, looping back to index 0 when it reaches the end.', + source_line: 23, + type_signature: '>(array: T): () => ArrayElement', + return_type: '() => ArrayElement', + parameters: [ + { + name: 'array', + type: 'T', + optional: false, + }, + ], + }, + ], + }, + { + path: 'async.ts', + declarations: [ + { + name: 'AsyncStatus', + kind: 'type', + source_line: 1, + type_signature: 'AsyncStatus', + }, + { + name: 'wait', + kind: 'function', + doc_comment: 'Waits for the given `duration` before resolving.', + source_line: 6, + type_signature: '(duration?: number): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'duration', + type: 'number', + optional: false, + default_value: '0', + }, + ], + }, + { + name: 'is_promise', + kind: 'function', + doc_comment: 'Checks if `value` is a `Promise`.', + source_line: 12, + type_signature: '(value: any): value is Promise', + return_type: 'boolean', + parameters: [ + { + name: 'value', + type: 'any', + optional: false, + }, + ], + }, + { + name: 'Deferred', + kind: 'type', + doc_comment: + 'Creates a deferred object with a promise and its resolve/reject handlers.', + source_line: 18, + type_signature: 'Deferred', + generic_params: [ + { + name: 'T', + }, + ], + properties: [ + { + name: 'promise', + kind: 'variable', + type_signature: 'Promise', + }, + { + name: 'resolve', + kind: 'variable', + type_signature: '(value: T) => void', + }, + { + name: 'reject', + kind: 'variable', + type_signature: '(reason: any) => void', + }, + ], + }, + { + name: 'create_deferred', + kind: 'function', + doc_comment: + 'Creates a object with a `promise` and its `resolve`/`reject` handlers.', + source_line: 27, + type_signature: '(): Deferred', + return_type: 'Deferred', + parameters: [], + }, + ], + dependents: ['throttle.ts'], + }, + { + path: 'colors.ts', + declarations: [ + { + name: 'Hsl', + kind: 'type', + source_line: 9, + type_signature: 'Hsl', + }, + { + name: 'Hue', + kind: 'type', + source_line: 10, + type_signature: 'Hue', + }, + { + name: 'Saturation', + kind: 'type', + source_line: 11, + type_signature: 'Saturation', + }, + { + name: 'Lightness', + kind: 'type', + source_line: 12, + type_signature: 'Lightness', + }, + { + name: 'Rgb', + kind: 'type', + source_line: 14, + type_signature: 'Rgb', + }, + { + name: 'Red', + kind: 'type', + source_line: 15, + type_signature: 'Red', + }, + { + name: 'Green', + kind: 'type', + source_line: 16, + type_signature: 'Green', + }, + { + name: 'Blue', + kind: 'type', + source_line: 17, + type_signature: 'Blue', + }, + { + name: 'rgb_to_hex', + kind: 'function', + doc_comment: 'Converts an RGB color to a hex color.', + source_line: 22, + type_signature: '(r: number, g: number, b: number): number', + return_type: 'number', + parameters: [ + { + name: 'r', + type: 'number', + optional: false, + }, + { + name: 'g', + type: 'number', + optional: false, + }, + { + name: 'b', + type: 'number', + optional: false, + }, + ], + }, + { + name: 'hex_to_rgb', + kind: 'function', + doc_comment: 'Converts a hex color to an RGB color.', + source_line: 27, + type_signature: '(hex: number): Rgb', + return_type: 'Rgb', + parameters: [ + { + name: 'hex', + type: 'number', + optional: false, + }, + ], + }, + { + name: 'hex_string_to_rgb', + kind: 'function', + source_line: 29, + type_signature: '(hex: string): Rgb', + return_type: 'Rgb', + parameters: [ + { + name: 'hex', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'rgb_to_hex_string', + kind: 'function', + source_line: 35, + type_signature: '(r: number, g: number, b: number): string', + return_type: 'string', + parameters: [ + { + name: 'r', + type: 'number', + optional: false, + }, + { + name: 'g', + type: 'number', + optional: false, + }, + { + name: 'b', + type: 'number', + optional: false, + }, + ], + }, + { + name: 'to_hex_component', + kind: 'function', + source_line: 38, + type_signature: '(v: number): string', + return_type: 'string', + parameters: [ + { + name: 'v', + type: 'number', + optional: false, + }, + ], + }, + { + name: 'rgb_to_hsl', + kind: 'function', + doc_comment: + 'Converts an RGB color value to HSL. Conversion formula\nadapted from http://wikipedia.org/wiki/HSL_color_space.\nValues r/g/b are in the range [0,255] and\nreturns h/s/l in the range [0,1].', + source_line: 49, + type_signature: '(r: number, g: number, b: number): Hsl', + return_type: 'Hsl', + parameters: [ + { + name: 'r', + type: 'number', + optional: false, + }, + { + name: 'g', + type: 'number', + optional: false, + }, + { + name: 'b', + type: 'number', + optional: false, + }, + ], + }, + { + name: 'hsl_to_rgb', + kind: 'function', + doc_comment: + 'Converts an HSL color value to RGB. Conversion formula\nadapted from http://wikipedia.org/wiki/HSL_color_space.\nValues h/s/l are in the range [0,1] and\nreturns r/g/b in the range [0,255].', + source_line: 84, + type_signature: '(h: Hue, s: Saturation, l: Lightness): Rgb', + return_type: 'Rgb', + parameters: [ + { + name: 'h', + type: 'Hue', + optional: false, + }, + { + name: 's', + type: 'Saturation', + optional: false, + }, + { + name: 'l', + type: 'Lightness', + optional: false, + }, + ], + }, + { + name: 'hue_to_rgb_component', + kind: 'function', + source_line: 98, + type_signature: '(p: number, q: number, t: number): number', + return_type: 'number', + parameters: [ + { + name: 'p', + type: 'number', + optional: false, + }, + { + name: 'q', + type: 'number', + optional: false, + }, + { + name: 't', + type: 'number', + optional: false, + }, + ], + }, + { + name: 'hsl_to_hex', + kind: 'function', + source_line: 106, + type_signature: '(h: Hue, s: Saturation, l: Lightness): number', + return_type: 'number', + parameters: [ + { + name: 'h', + type: 'Hue', + optional: false, + }, + { + name: 's', + type: 'Saturation', + optional: false, + }, + { + name: 'l', + type: 'Lightness', + optional: false, + }, + ], + }, + { + name: 'hsl_to_hex_string', + kind: 'function', + source_line: 111, + type_signature: '(h: Hue, s: Saturation, l: Lightness): string', + return_type: 'string', + parameters: [ + { + name: 'h', + type: 'Hue', + optional: false, + }, + { + name: 's', + type: 'Saturation', + optional: false, + }, + { + name: 'l', + type: 'Lightness', + optional: false, + }, + ], + }, + { + name: 'hsl_to_string', + kind: 'function', + source_line: 116, + type_signature: '(h: Hue, s: Saturation, l: Lightness): string', + return_type: 'string', + parameters: [ + { + name: 'h', + type: 'Hue', + optional: false, + }, + { + name: 's', + type: 'Saturation', + optional: false, + }, + { + name: 'l', + type: 'Lightness', + optional: false, + }, + ], + }, + { + name: 'hex_string_to_hsl', + kind: 'function', + source_line: 119, + type_signature: '(hex: string): Hsl', + return_type: 'Hsl', + parameters: [ + { + name: 'hex', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'parse_hsl_string', + kind: 'function', + source_line: 126, + type_signature: '(hsl: string): Hsl', + return_type: 'Hsl', + parameters: [ + { + name: 'hsl', + type: 'string', + optional: false, + }, + ], + }, + ], + dependencies: ['maths.ts'], + }, + { + path: 'counter.ts', + declarations: [ + { + name: 'Counter', + kind: 'type', + source_line: 1, + type_signature: 'Counter', + }, + { + name: 'CreateCounter', + kind: 'type', + source_line: 3, + type_signature: 'CreateCounter', + }, + { + name: 'create_counter', + kind: 'function', + doc_comment: 'Creates a counter constructor function, starting at `0`.', + source_line: 8, + type_signature: '(initial?: number | undefined): Counter', + return_type: 'Counter', + parameters: [ + { + name: 'initial', + type: 'number | undefined', + optional: true, + }, + ], + }, + ], + dependents: ['id.ts'], + }, + { + path: 'deep_equal.ts', + declarations: [ + { + name: 'deep_equal', + kind: 'function', + doc_comment: + 'Deep equality comparison that checks both structure and type.\n\nKey behaviors:\n\n- Compares by constructor to prevent type confusion (security: `{}` ≠ `[]`, `{}` ≠ `new Map()`, `new ClassA()` ≠ `new ClassB()`)\n- Prevents asymmetry bugs: `deep_equal(a, b)` always equals `deep_equal(b, a)`\n- Compares only enumerable own properties (ignores prototypes, symbols, non-enumerable)\n- Special handling for: Date (timestamp), Number/Boolean (boxed primitives), Error (message/name)\n- Promises always return false (cannot be meaningfully compared)\n- Maps/Sets compare by reference for object keys/values', + source_line: 17, + type_signature: '(a: unknown, b: unknown): boolean', + return_type: 'boolean', + return_description: 'true if deeply equal, false otherwise', + parameters: [ + { + name: 'a', + type: 'unknown', + optional: false, + description: '- First value to compare', + }, + { + name: 'b', + type: 'unknown', + optional: false, + description: '- Second value to compare', + }, + ], + }, + ], + }, + { + path: 'dom.ts', + declarations: [ + { + name: 'is_editable', + kind: 'function', + doc_comment: + 'Checks if the given element is editable.\nReturns `true` for text-based input types, textareas, and contenteditable elements.', + source_line: 5, + type_signature: '(el: any): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'el', + type: 'any', + optional: false, + }, + ], + }, + { + name: 'inside_editable', + kind: 'function', + doc_comment: + 'Returns `true` if the element is within a `contenteditable` ancestor.', + source_line: 19, + type_signature: '(el: Element): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'el', + type: 'Element', + optional: false, + }, + ], + }, + { + name: 'is_interactive', + kind: 'function', + doc_comment: + 'Checks if the element is interactive (clickable, focusable, or otherwise accepts user input).\nReturns `true` for buttons, links, form controls,\nand elements with interactive attributes and ARIA roles.', + source_line: 29, + type_signature: '(el: any): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'el', + type: 'any', + optional: false, + }, + ], + }, + { + name: 'swallow', + kind: 'function', + doc_comment: 'Stops an event from bubbling and doing default behavior.', + source_line: 69, + type_signature: + '>(event: T, immediate?: boolean, preventDefault?: boolean): T', + return_type: 'T', + parameters: [ + { + name: 'event', + type: 'T', + optional: false, + }, + { + name: 'immediate', + type: 'boolean', + optional: false, + description: + 'defaults to `true` to use `stopImmediatePropagation` over `stopPropagation`', + default_value: 'true', + }, + { + name: 'preventDefault', + type: 'boolean', + optional: false, + description: 'defaults to `true`', + default_value: 'true', + }, + ], + }, + { + name: 'handle_target_value', + kind: 'function', + doc_comment: + "Handles the value of an event's target and invokes a callback.\nDefaults to swallowing the event to prevent default actions and propagation.", + source_line: 91, + type_signature: + '(cb: (value: any, event: any) => void, swallow_event?: boolean): (e: any) => void', + return_type: '(e: any) => void', + parameters: [ + { + name: 'cb', + type: '(value: any, event: any) => void', + optional: false, + }, + { + name: 'swallow_event', + type: 'boolean', + optional: false, + default_value: 'true', + }, + ], + }, + { + name: 'is_iframed', + kind: 'function', + doc_comment: + 'Returns a boolean indicating if the current browser window, if any, is iframed inside of another.', + source_line: 101, + type_signature: '(): boolean', + return_type: 'boolean', + parameters: [], + }, + ], + }, + { + path: 'error.ts', + declarations: [ + { + name: 'UnreachableError', + kind: 'class', + doc_comment: + 'Error for asserting unreachable code paths in TypeScript.\nUseful for exhaustive matching.', + source_line: 5, + extends: ['Error'], + implements: [], + members: [ + { + name: 'constructor', + kind: 'constructor', + type_signature: + '(value: never, message?: string, options?: ErrorOptions | undefined): UnreachableError', + parameters: [ + { + name: 'value', + type: 'never', + optional: false, + }, + { + name: 'message', + type: 'string', + optional: false, + default_value: '`Unreachable case: ${value}`', + }, + { + name: 'options', + type: 'ErrorOptions | undefined', + optional: true, + }, + ], + }, + ], + }, + { + name: 'unreachable', + kind: 'function', + doc_comment: + "Beyond terseness, this is useful because `throw` is not an expression,\nand therefore can't be used in places like Svelte markup without a workaround,\nat least until this proposal is accepted and widely available:\nhttps://github.com/tc39/proposal-throw-expressions", + source_line: 17, + type_signature: + '(value: never, message?: string | undefined): asserts value is never', + return_type: 'void', + parameters: [ + { + name: 'value', + type: 'never', + optional: false, + }, + { + name: 'message', + type: 'string | undefined', + optional: true, + }, + ], + }, + ], + }, + { + path: 'fetch.ts', + declarations: [ + { + name: 'FetchValueOptions', + kind: 'type', + source_line: 12, + type_signature: 'FetchValueOptions', + generic_params: [ + { + name: 'TValue', + }, + { + name: 'TParams', + default_type: 'undefined', + }, + ], + properties: [ + { + name: 'request', + kind: 'variable', + type_signature: 'RequestInit', + doc_comment: + 'The `request.headers` take precedence over the headers computed from other options.', + }, + { + name: 'params', + kind: 'variable', + type_signature: 'TParams', + }, + { + name: 'parse', + kind: 'variable', + type_signature: '(v: any) => TValue', + }, + { + name: 'token', + kind: 'variable', + type_signature: 'string | null', + }, + { + name: 'cache', + kind: 'variable', + type_signature: 'FetchValueCache | null', + }, + { + name: 'return_early_from_cache', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'log', + kind: 'variable', + type_signature: 'Logger', + }, + { + name: 'fetch', + kind: 'variable', + type_signature: 'typeof globalThis.fetch', + }, + ], + }, + { + name: 'fetch_value', + kind: 'function', + doc_comment: + "Specializes `fetch` with some slightly different behavior and additional features:\n\n- throws on ratelimit errors to mitigate unintentional abuse\n- optional `parse` function called on the return value\n- optional cache (different from the browser cache,\n\t the caller can serialize it so e.g. dev setups can avoid hitting the network)\n- optional simplified API for authorization and data types\n (you can still provide headers directly)\n\nUnlike `fetch`, this throws on ratelimits (status code 429)\nto halt whatever is happpening in its tracks to avoid accidental abuse,\nbut returns a `Result` in all other cases.\nHandling ratelimit headers with more sophistication gets tricky because behavior\ndiffers across services.\n(e.g. Mastodon returns an ISO string for `x-ratelimit-reset`,\nbut GitHub returns `Date.now()/1000`,\nand other services may do whatever, or even use a different header)\n\nIt's also stateless to avoid the complexity and bugs,\nso we don't try to track `x-ratelimit-remaining` per domain.\n\nIf the `value` is cached, only the cached safe subset of the `headers` are returned.\n(currently just `etag` and `last-modified`)\nOtherwise the full `res.headers` are included.", + source_line: 53, + type_signature: + '(url: string | URL, options?: FetchValueOptions | undefined): Promise>', + return_type: + 'Promise>', + parameters: [ + { + name: 'url', + type: 'string | URL', + optional: false, + }, + { + name: 'options', + type: 'FetchValueOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'FetchValueCacheKey', + kind: 'type', + source_line: 191, + type_signature: 'ZodString', + }, + { + name: 'FetchValueCacheItem', + kind: 'type', + source_line: 194, + type_signature: + 'ZodObject<{ key: ZodString; url: ZodString; params: ZodAny; value: ZodAny; etag: ZodNullable; last_modified: ZodNullable; }, $strip>', + }, + { + name: 'FetchValueCache', + kind: 'type', + source_line: 204, + type_signature: + 'ZodMap; last_modified: ZodNullable<...>; }, $strip>>', + }, + { + name: 'to_fetch_value_cache_key', + kind: 'function', + source_line: 209, + type_signature: '(url: string, params: any, method: string): FetchValueCacheKey', + return_type: 'FetchValueCacheKey', + parameters: [ + { + name: 'url', + type: 'string', + optional: false, + }, + { + name: 'params', + type: 'any', + optional: false, + }, + { + name: 'method', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'serialize_cache', + kind: 'function', + doc_comment: 'Converts `FetchValueCache` to a JSON string.', + source_line: 224, + type_signature: + '(cache: Map): string', + return_type: 'string', + parameters: [ + { + name: 'cache', + type: 'Map', + optional: false, + }, + ], + }, + { + name: 'deserialize_cache', + kind: 'function', + doc_comment: 'Converts a serialized cache string to a `FetchValueCache`.', + source_line: 230, + type_signature: + '(serialized: string): Map', + return_type: + 'Map', + parameters: [ + { + name: 'serialized', + type: 'string', + optional: false, + }, + ], + }, + ], + dependencies: ['json.ts', 'object.ts'], + }, + { + path: 'fs.ts', + declarations: [ + { + name: 'fs_exists', + kind: 'function', + doc_comment: 'Checks if a file or directory exists.', + source_line: 8, + type_signature: '(path: string): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'fs_empty_dir', + kind: 'function', + doc_comment: + 'Empties a directory, recursively by default. If `should_remove` is provided, only entries where it returns `true` are removed.', + source_line: 20, + type_signature: + '(dir: string, should_remove?: ((name: string) => boolean) | undefined, options?: RmOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'dir', + type: 'string', + optional: false, + }, + { + name: 'should_remove', + type: '((name: string) => boolean) | undefined', + optional: true, + }, + { + name: 'options', + type: 'RmOptions | undefined', + optional: true, + }, + ], + }, + ], + dependents: ['git.ts'], + }, + { + path: 'function.ts', + declarations: [ + { + name: 'noop', + kind: 'function', + doc_comment: 'Does nothing when called.', + source_line: 4, + type_signature: '(...args: any[]): any', + return_type: 'any', + parameters: [ + { + name: 'args', + type: 'any[]', + optional: false, + }, + ], + }, + { + name: 'noop_async', + kind: 'function', + doc_comment: 'Async function that returns a resolved promise.', + source_line: 9, + type_signature: '(...args: any[]): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'args', + type: 'any[]', + optional: false, + }, + ], + }, + { + name: 'resolved', + kind: 'variable', + doc_comment: 'A singleton resolved `Promise`.', + source_line: 14, + type_signature: 'Promise', + }, + { + name: 'identity', + kind: 'function', + doc_comment: 'Returns the first arg.', + source_line: 19, + type_signature: '(t: T): T', + return_type: 'T', + parameters: [ + { + name: 't', + type: 'T', + optional: false, + }, + ], + }, + { + name: 'Thunk', + kind: 'type', + doc_comment: + 'Represents a value wrapped in a function.\nUseful for lazy values and bridging reactive boundaries in Svelte.', + source_line: 25, + type_signature: 'Thunk', + generic_params: [ + { + name: 'T', + }, + ], + }, + { + name: 'unthunk', + kind: 'function', + doc_comment: + "Returns the result of calling `value` if it's a function,\notherwise it's like the `identity` function and passes it through.", + source_line: 31, + type_signature: '(value: T | Thunk): T', + return_type: 'T', + parameters: [ + { + name: 'value', + type: 'T | Thunk', + optional: false, + }, + ], + }, + ], + }, + { + path: 'git.ts', + declarations: [ + { + name: 'GitOrigin', + kind: 'type', + source_line: 9, + type_signature: 'ZodString', + }, + { + name: 'GitBranch', + kind: 'type', + source_line: 12, + type_signature: 'ZodString', + }, + { + name: 'git_current_branch_name', + kind: 'function', + doc_comment: + 'Returns the current git branch name or throws if something goes wrong.', + source_line: 18, + type_signature: '(options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_remote_branch_exists', + kind: 'function', + doc_comment: '', + source_line: 28, + type_signature: + '(origin?: GitOrigin, branch?: GitBranch | undefined, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + return_description: 'a boolean indicating if the remote git branch exists', + parameters: [ + { + name: 'origin', + type: 'GitOrigin', + optional: false, + default_value: "'origin' as GitOrigin", + }, + { + name: 'branch', + type: 'GitBranch | undefined', + optional: true, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_local_branch_exists', + kind: 'function', + doc_comment: '', + source_line: 56, + type_signature: + '(branch: GitBranch, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + return_description: 'a boolean indicating if the local git branch exists', + parameters: [ + { + name: 'branch', + type: 'GitBranch', + optional: false, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'GitWorkspaceStatus', + kind: 'type', + doc_comment: + 'Git workspace status flags indicating which types of changes are present.', + source_line: 70, + type_signature: 'GitWorkspaceStatus', + properties: [ + { + name: 'unstaged_changes', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'staged_changes', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'untracked_files', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'git_parse_workspace_status', + kind: 'function', + doc_comment: + 'Parses the output of `git status --porcelain -z` (v1 format) into a status object.\nThis is a pure function that can be tested independently.\n\nFormat: XY path\\0 where:\n- X = staged status (index)\n- Y = unstaged status (work tree)\n- path = file path (unescaped with -z)\n\nSupported status codes:\n- M = modified\n- A = added\n- D = deleted\n- R = renamed\n- C = copied\n- T = type changed (regular file, symbolic link or submodule)\n- U = unmerged\n- ? = untracked\n- ! = ignored\n\nFor renames/copies: XY new\\0old\\0 (two NUL-separated paths)\n\nNote: This implementation treats submodules the same as regular files.\nSubmodule-specific status codes (lowercase m, ?) are interpreted as changes.', + source_line: 104, + type_signature: '(stdout: string | null): GitWorkspaceStatus', + return_type: 'GitWorkspaceStatus', + return_description: + 'status object with flags for unstaged changes, staged changes, and untracked files', + parameters: [ + { + name: 'stdout', + type: 'string | null', + optional: false, + description: '- The raw output from `git status --porcelain -z`', + }, + ], + }, + { + name: 'git_check_workspace', + kind: 'function', + doc_comment: + 'Checks the git workspace status using a single `git status --porcelain -z` call.\nThe -z format provides more reliable parsing by using NUL separators and avoiding escaping.', + source_line: 154, + type_signature: '(options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + return_description: + 'status object with flags for unstaged changes, staged changes, and untracked files', + parameters: [ + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_workspace_is_clean', + kind: 'function', + doc_comment: '', + source_line: 162, + type_signature: '(status: GitWorkspaceStatus): boolean', + return_type: 'boolean', + return_description: '`true` if the workspace has no changes at all', + parameters: [ + { + name: 'status', + type: 'GitWorkspaceStatus', + optional: false, + }, + ], + }, + { + name: 'git_workspace_is_fully_staged', + kind: 'function', + doc_comment: '', + source_line: 168, + type_signature: '(status: GitWorkspaceStatus): boolean', + return_type: 'boolean', + return_description: + '`true` if the workspace has no unstaged changes and no untracked files (staged changes are OK)', + parameters: [ + { + name: 'status', + type: 'GitWorkspaceStatus', + optional: false, + }, + ], + }, + { + name: 'git_workspace_status_message', + kind: 'function', + doc_comment: 'Converts a workspace status to a human-readable message.', + source_line: 174, + type_signature: '(status: GitWorkspaceStatus): string', + return_type: 'string', + parameters: [ + { + name: 'status', + type: 'GitWorkspaceStatus', + optional: false, + }, + ], + }, + { + name: 'git_check_clean_workspace', + kind: 'function', + doc_comment: '', + source_line: 186, + type_signature: '(options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + return_description: + "an error message if the git workspace has any unstaged or uncommitted changes, or `null` if it's clean", + parameters: [ + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_check_fully_staged_workspace', + kind: 'function', + doc_comment: '', + source_line: 194, + type_signature: '(options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + return_description: + 'an error message if the git workspace has any unstaged changes or untracked files, or `null` if fully staged', + parameters: [ + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_fetch', + kind: 'function', + doc_comment: 'Calls `git fetch` and throws if anything goes wrong.', + source_line: 204, + type_signature: + '(origin?: GitOrigin, branch?: GitBranch | undefined, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'origin', + type: 'GitOrigin', + optional: false, + default_value: "'origin' as GitOrigin", + }, + { + name: 'branch', + type: 'GitBranch | undefined', + optional: true, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_checkout', + kind: 'function', + doc_comment: 'Calls `git checkout` and throws if anything goes wrong.', + source_line: 223, + type_signature: + '(branch: GitBranch, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + return_description: 'the previous branch name, if it changed', + parameters: [ + { + name: 'branch', + type: 'GitBranch', + optional: false, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_pull', + kind: 'function', + doc_comment: 'Calls `git pull` and throws if anything goes wrong.', + source_line: 241, + type_signature: + '(origin?: GitOrigin, branch?: GitBranch | undefined, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'origin', + type: 'GitOrigin', + optional: false, + default_value: "'origin' as GitOrigin", + }, + { + name: 'branch', + type: 'GitBranch | undefined', + optional: true, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_push', + kind: 'function', + doc_comment: 'Calls `git push` and throws if anything goes wrong.', + source_line: 257, + type_signature: + '(origin: GitOrigin, branch?: GitBranch | undefined, options?: SpawnOptions | undefined, set_upstream?: boolean): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'origin', + type: 'GitOrigin', + optional: false, + }, + { + name: 'branch', + type: 'GitBranch | undefined', + optional: true, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + { + name: 'set_upstream', + type: 'boolean', + optional: false, + default_value: 'false', + }, + ], + }, + { + name: 'git_push_to_create', + kind: 'function', + doc_comment: 'Calls `git push` and throws if anything goes wrong.', + source_line: 275, + type_signature: + '(origin?: GitOrigin, branch?: GitBranch | undefined, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'origin', + type: 'GitOrigin', + optional: false, + default_value: "'origin' as GitOrigin", + }, + { + name: 'branch', + type: 'GitBranch | undefined', + optional: true, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_delete_local_branch', + kind: 'function', + doc_comment: 'Deletes a branch locally and throws if anything goes wrong.', + source_line: 297, + type_signature: + '(branch: GitBranch, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'branch', + type: 'GitBranch', + optional: false, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_delete_remote_branch', + kind: 'function', + doc_comment: 'Deletes a branch remotely and throws if anything goes wrong.', + source_line: 310, + type_signature: + '(origin: GitOrigin, branch: GitBranch, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'origin', + type: 'GitOrigin', + optional: false, + }, + { + name: 'branch', + type: 'GitBranch', + optional: false, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_reset_branch_to_first_commit', + kind: 'function', + doc_comment: + 'Resets the `target` branch back to its first commit both locally and remotely.', + source_line: 324, + type_signature: + '(origin: GitOrigin, branch: GitBranch, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'origin', + type: 'GitOrigin', + optional: false, + }, + { + name: 'branch', + type: 'GitBranch', + optional: false, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_current_commit_hash', + kind: 'function', + doc_comment: + "Returns the branch's latest commit hash or throws if something goes wrong.", + source_line: 341, + type_signature: + '(branch?: string | undefined, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'branch', + type: 'string | undefined', + optional: true, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_current_branch_first_commit_hash', + kind: 'function', + doc_comment: + "Returns the hash of the current branch's first commit or throws if something goes wrong.", + source_line: 354, + type_signature: '(options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_check_setting_pull_rebase', + kind: 'function', + doc_comment: 'Returns the global git config setting for `pull.rebase`.', + source_line: 369, + type_signature: '(options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_clone_locally', + kind: 'function', + doc_comment: + 'Clones a branch locally to another directory and updates the origin to match the source.', + source_line: 377, + type_signature: + '(origin: GitOrigin, branch: GitBranch, source_dir: string, target_dir: string, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'origin', + type: 'GitOrigin', + optional: false, + }, + { + name: 'branch', + type: 'GitBranch', + optional: false, + }, + { + name: 'source_dir', + type: 'string', + optional: false, + }, + { + name: 'target_dir', + type: 'string', + optional: false, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + ], + dependencies: ['fs.ts', 'path.ts', 'process.ts'], + }, + { + path: 'id.ts', + declarations: [ + { + name: 'Uuid', + kind: 'type', + source_line: 4, + type_signature: 'Uuid', + }, + { + name: 'is_uuid', + kind: 'function', + doc_comment: 'Loosely validates a UUID string.', + source_line: 9, + type_signature: '(str: string): str is Uuid', + return_type: 'boolean', + parameters: [ + { + name: 'str', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'UUID_MATCHER', + kind: 'variable', + doc_comment: + "Postgres doesn't support the namespace prefix, so neither does Felt.\nFor more see the UUID RFC - https://tools.ietf.org/html/rfc4122\nThe Ajv validator does support the namespace, hence this custom implementation.", + source_line: 16, + type_signature: 'RegExp', + }, + { + name: 'ClientIdCreator', + kind: 'type', + source_line: 18, + type_signature: 'ClientIdCreator', + }, + { + name: 'create_client_id_creator', + kind: 'function', + doc_comment: + 'Creates a string id generator function, outputting `${name}_${count}` by default.', + source_line: 23, + type_signature: + '(name: string, count?: number | undefined, separator?: string): ClientIdCreator', + return_type: 'ClientIdCreator', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + }, + { + name: 'count', + type: 'number | undefined', + optional: true, + }, + { + name: 'separator', + type: 'string', + optional: false, + default_value: "'_'", + }, + ], + }, + ], + dependencies: ['counter.ts'], + }, + { + path: 'iterator.ts', + declarations: [ + { + name: 'count_iterator', + kind: 'function', + doc_comment: 'Useful for fast counting when `.length` is not available.', + source_line: 4, + type_signature: '(iterator: Iterable): number', + return_type: 'number', + parameters: [ + { + name: 'iterator', + type: 'Iterable', + optional: false, + }, + ], + }, + ], + dependents: ['string.ts'], + }, + { + path: 'json.ts', + declarations: [ + { + name: 'Json', + kind: 'type', + source_line: 1, + type_signature: 'Json', + }, + { + name: 'JsonPrimitive', + kind: 'type', + source_line: 3, + type_signature: 'JsonPrimitive', + }, + { + name: 'JsonObject', + kind: 'type', + source_line: 5, + type_signature: 'JsonObject', + extends: ['Record'], + properties: [], + }, + { + name: 'JsonArray', + kind: 'type', + source_line: 7, + type_signature: 'JsonArray', + extends: ['Array'], + properties: [], + }, + { + name: 'JsonType', + kind: 'type', + doc_comment: + "Like `typeof json`, but includes arrays. Excludes `'undefined'` because it's not valid JSON.", + source_line: 12, + type_signature: 'JsonType', + }, + { + name: 'json_type_of', + kind: 'function', + doc_comment: + "Returns the `JsonType` of `value`, which is like `typeof json`\nbut includes `'array'` and omits `'undefined'`.", + source_line: 18, + type_signature: '(value: Json): JsonType | undefined', + return_type: 'JsonType | undefined', + parameters: [ + { + name: 'value', + type: 'Json', + optional: false, + }, + ], + }, + { + name: 'json_embed', + kind: 'function', + doc_comment: + 'Embeds `data` as a JSON string, escaping single quotes.\nUseful for optimizing JSON in JS because it parses faster.', + source_line: 39, + type_signature: '(data: T, stringify?: (data: T) => string): string', + return_type: 'string', + parameters: [ + { + name: 'data', + type: 'T', + optional: false, + }, + { + name: 'stringify', + type: '(data: T) => string', + optional: false, + default_value: 'JSON.stringify', + }, + ], + }, + { + name: 'json_stringify_deterministic', + kind: 'function', + doc_comment: + 'Serializes a value to JSON with deterministic key ordering.\nRecursively sorts object keys alphabetically for consistent hashing.\nArrays and primitives are serialized as-is.', + source_line: 50, + type_signature: '(value: unknown): string', + return_type: 'string', + return_description: 'Deterministic JSON string representation', + parameters: [ + { + name: 'value', + type: 'unknown', + optional: false, + description: 'Any JSON-serializable value', + }, + ], + }, + ], + dependents: ['fetch.ts'], + }, + { + path: 'library_json.ts', + declarations: [ + { + name: 'LibraryJson', + kind: 'type', + doc_comment: + "A library's package.json and source metadata with computed properties.", + source_line: 13, + type_signature: 'LibraryJson', + properties: [ + { + name: 'package_json', + kind: 'variable', + type_signature: 'PackageJson', + }, + { + name: 'source_json', + kind: 'variable', + type_signature: 'SourceJson', + }, + { + name: 'name', + kind: 'variable', + type_signature: 'string', + doc_comment: 'Package name, e.g. `@ryanatkn/fuz`.', + }, + { + name: 'repo_name', + kind: 'variable', + type_signature: 'string', + doc_comment: 'Name without scope, e.g. `fuz`.', + }, + { + name: 'repo_url', + kind: 'variable', + type_signature: 'Url', + doc_comment: 'GitHub repo URL, e.g. `https://github.com/ryanatkn/fuz`.', + }, + { + name: 'owner_name', + kind: 'variable', + type_signature: 'string | null', + doc_comment: 'GitHub user/org, e.g. `ryanatkn`.', + }, + { + name: 'homepage_url', + kind: 'variable', + type_signature: 'Url | null', + }, + { + name: 'logo_url', + kind: 'variable', + type_signature: 'Url | null', + doc_comment: 'Logo URL, falls back to `favicon.png`.', + }, + { + name: 'logo_alt', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'npm_url', + kind: 'variable', + type_signature: 'Url | null', + }, + { + name: 'changelog_url', + kind: 'variable', + type_signature: 'Url | null', + }, + { + name: 'published', + kind: 'variable', + type_signature: 'boolean', + doc_comment: 'True if has exports and version is not `0.0.1`.', + }, + ], + }, + { + name: 'library_json_parse', + kind: 'function', + doc_comment: + 'Creates a `LibraryJson` with computed properties from package.json and source metadata.', + source_line: 37, + type_signature: + '(package_json: { [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }, source_json: { ...; }): LibraryJson', + return_type: 'LibraryJson', + parameters: [ + { + name: 'package_json', + type: '{ [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }', + optional: false, + }, + { + name: 'source_json', + type: '{ [x: string]: unknown; name: string; version: string; modules?: { [x: string]: unknown; path: string; declarations?: { [x: string]: unknown; name: string; kind: "function" | "type" | "variable" | "class" | "constructor" | "component" | "json" | "css"; ... 19 more ...; alias_of?: { ...; } | undefined; }[] | undefine...', + optional: false, + }, + ], + }, + { + name: 'library_repo_name_parse', + kind: 'function', + doc_comment: + 'Extracts repo name from a package name, e.g. `@ryanatkn/fuz` → `fuz`.', + source_line: 100, + type_signature: '(name: string): string', + return_type: 'string', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'library_org_url_parse', + kind: 'function', + doc_comment: + 'Extracts GitHub org URL from a library, e.g. `https://github.com/ryanatkn`.', + source_line: 114, + type_signature: '(library: LibraryJson): string | null', + return_type: 'string | null', + parameters: [ + { + name: 'library', + type: 'LibraryJson', + optional: false, + }, + ], + }, + ], + module_comment: 'Library metadata combining package.json with analyzed source.', + dependencies: ['string.ts'], + }, + { + path: 'log.ts', + declarations: [ + { + name: 'LogLevel', + kind: 'type', + doc_comment: + "Log level hierarchy from least to most verbose.\n- `'off'`: No logging\n- `'error'`: Only errors\n- `'warn'`: Errors and warnings\n- `'info'`: Errors, warnings, and info (default)\n- `'debug'`: All messages including debug", + source_line: 12, + type_signature: 'LogLevel', + }, + { + name: 'LogConsole', + kind: 'type', + doc_comment: + 'Console interface subset used by Logger for output.\nAllows custom console implementations for testing.', + source_line: 18, + type_signature: 'LogConsole', + }, + { + name: 'log_level_to_number', + kind: 'function', + doc_comment: + 'Converts a log level to its numeric value for comparison.\nHigher numbers indicate more verbose logging.', + source_line: 48, + type_signature: '(level: LogLevel): number', + return_type: 'number', + return_description: 'Numeric value (0-4)', + parameters: [ + { + name: 'level', + type: 'LogLevel', + optional: false, + description: 'The log level to convert', + }, + ], + }, + { + name: 'log_level_parse', + kind: 'function', + doc_comment: 'Parses and validates a log level string.', + throws: [ + { + type: 'Error', + description: 'if value is provided but invalid', + }, + ], + source_line: 56, + type_signature: '(value: string | undefined): LogLevel | undefined', + return_type: 'LogLevel | undefined', + return_description: 'The validated log level, or undefined if value is undefined', + parameters: [ + { + name: 'value', + type: 'string | undefined', + optional: false, + description: 'The value to parse as a log level', + }, + ], + }, + { + name: 'Logger', + kind: 'class', + doc_comment: + 'Simple, flexible logger with support for child loggers and automatic context.\n\nFeatures:\n- Instance-based configuration (no global state)\n- Child loggers with automatic label concatenation\n- Parent chain inheritance for level, console, and colors\n- Respects NO_COLOR environment variable', + examples: [ + "```ts\n// Basic logger\nconst log = new Logger('app');\nlog.info('starting'); // [app] ➤ starting\n\n// Child logger\nconst db_log = log.child('db');\ndb_log.info('connected'); // [app:db] ➤ connected\n\n// Custom configuration\nconst verbose_log = new Logger('debug', { level: 'debug', colors: true });\n```", + ], + source_line: 92, + members: [ + { + name: 'label', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'string', + }, + { + name: 'parent', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'Logger', + }, + { + name: 'constructor', + kind: 'constructor', + doc_comment: 'Creates a new Logger instance.', + type_signature: '(label?: string | undefined, options?: LoggerOptions): Logger', + parameters: [ + { + name: 'label', + type: 'string | undefined', + optional: true, + description: + "Optional label for this logger. Can be `undefined` for no label, or an\nempty string `''` which is functionally equivalent (both produce no brackets in output).\nNote: Empty strings are only allowed for root loggers - child loggers cannot have empty labels.", + }, + { + name: 'options', + type: 'LoggerOptions', + optional: false, + description: 'Optional configuration for level, colors, and console', + default_value: '{}', + }, + ], + }, + { + name: 'clear_level_override', + kind: 'function', + doc_comment: + 'Clears the level override for this logger, restoring inheritance from parent.\nAfter calling this, the logger will dynamically inherit the level from its parent\n(or use the default level if it has no parent).', + type_signature: '(): void', + return_type: 'void', + parameters: [], + }, + { + name: 'clear_colors_override', + kind: 'function', + doc_comment: + 'Clears the colors override for this logger, restoring inheritance from parent.\nAfter calling this, the logger will dynamically inherit colors from its parent\n(or use the default colors behavior if it has no parent).', + type_signature: '(): void', + return_type: 'void', + parameters: [], + }, + { + name: 'clear_console_override', + kind: 'function', + doc_comment: + 'Clears the console override for this logger, restoring inheritance from parent.\nAfter calling this, the logger will dynamically inherit the console from its parent\n(or use the global console if it has no parent).', + type_signature: '(): void', + return_type: 'void', + parameters: [], + }, + { + name: 'child', + kind: 'function', + doc_comment: + 'Creates a child logger with automatic label concatenation.\nChildren inherit parent configuration unless overridden.', + type_signature: '(label: string, options?: LoggerOptions): Logger', + return_type: 'Logger', + return_description: 'New Logger instance with concatenated label', + parameters: [ + { + name: 'label', + type: 'string', + optional: false, + description: + "Child label (will be concatenated with parent label using `:`).\nCannot be an empty string - empty labels would result in confusing output like `parent:`\nwith a trailing colon. Use `undefined` or `''` only for root loggers.", + }, + { + name: 'options', + type: 'LoggerOptions', + optional: false, + description: 'Optional configuration overrides', + default_value: '{}', + }, + ], + throws: [ + { + type: 'Error', + description: 'if label is an empty string', + }, + ], + }, + { + name: 'error', + kind: 'function', + doc_comment: + 'Logs an error message with `🞩error🞩` prefix.\nOnly outputs if current level is `error` or higher.', + type_signature: '(...args: unknown[]): void', + return_type: 'void', + parameters: [ + { + name: 'args', + type: 'unknown[]', + optional: false, + }, + ], + }, + { + name: 'warn', + kind: 'function', + doc_comment: + 'Logs a warning message with `⚑warn⚑` prefix.\nOnly outputs if current level is `warn` or higher.', + type_signature: '(...args: unknown[]): void', + return_type: 'void', + parameters: [ + { + name: 'args', + type: 'unknown[]', + optional: false, + }, + ], + }, + { + name: 'info', + kind: 'function', + doc_comment: + 'Logs an informational message.\nUnlike error/warn/debug, info has no character prefix - only the label is shown.\nThis keeps standard output clean since info is the default log level.\nOnly outputs if current level is `info` or higher.', + type_signature: '(...args: unknown[]): void', + return_type: 'void', + parameters: [ + { + name: 'args', + type: 'unknown[]', + optional: false, + }, + ], + }, + { + name: 'debug', + kind: 'function', + doc_comment: + 'Logs a debug message with `┆debug┆` prefix.\nOnly outputs if current level is `debug`.', + type_signature: '(...args: unknown[]): void', + return_type: 'void', + parameters: [ + { + name: 'args', + type: 'unknown[]', + optional: false, + }, + ], + }, + { + name: 'raw', + kind: 'function', + doc_comment: + "Logs raw output without any prefix, formatting, or level filtering.\nBypasses the logger's level checking, prefix formatting, and color application entirely.\nUseful for outputting structured data or when you need full control over formatting.\n\nNote: This method ignores the configured log level - it always outputs regardless of\nwhether the logger is set to 'off' or any other level.", + type_signature: '(...args: unknown[]): void', + return_type: 'void', + parameters: [ + { + name: 'args', + type: 'unknown[]', + optional: false, + description: 'Values to log directly to console', + }, + ], + }, + ], + }, + { + name: 'LoggerOptions', + kind: 'type', + source_line: 445, + type_signature: 'LoggerOptions', + properties: [ + { + name: 'level', + kind: 'variable', + type_signature: 'LogLevel', + doc_comment: + "Log level for this logger instance.\nInherits from parent or defaults to 'info'.", + }, + { + name: 'console', + kind: 'variable', + type_signature: 'LogConsole', + doc_comment: + 'Console interface for output.\nInherits from parent or defaults to global console.\nUseful for testing.', + }, + { + name: 'colors', + kind: 'variable', + type_signature: 'boolean', + doc_comment: + 'Whether to use colors in output.\nInherits from parent or defaults to enabled (unless NO_COLOR env var is set).', + }, + ], + }, + ], + dependents: ['process.ts'], + }, + { + path: 'map.ts', + declarations: [ + { + name: 'sort_map', + kind: 'function', + doc_comment: + 'Sorts a map by `comparator`, a function that compares two entries,\ndefaulting to using `localCompare` and `>`.', + source_line: 5, + type_signature: + '>(map: T, comparator?: (a: [any, any], b: [any, any]) => number): T', + return_type: 'T', + parameters: [ + { + name: 'map', + type: 'T', + optional: false, + }, + { + name: 'comparator', + type: '(a: [any, any], b: [any, any]) => number', + optional: false, + default_value: 'compare_simple_map_entries', + }, + ], + }, + { + name: 'compare_simple_map_entries', + kind: 'function', + doc_comment: + 'Compares two map entries for sorting purposes.\nIf the key is a string, it uses `localeCompare` for comparison.\nFor other types, it uses `>`.', + source_line: 15, + type_signature: '(a: [any, any], b: [any, any]): number', + return_type: 'number', + parameters: [ + { + name: 'a', + type: '[any, any]', + optional: false, + }, + { + name: 'b', + type: '[any, any]', + optional: false, + }, + ], + }, + ], + }, + { + path: 'maths.ts', + declarations: [ + { + name: 'clamp', + kind: 'function', + doc_comment: 'Returns `n` bounded to `min` and `max`.', + source_line: 4, + type_signature: '(n: number, min: number, max: number): number', + return_type: 'number', + parameters: [ + { + name: 'n', + type: 'number', + optional: false, + }, + { + name: 'min', + type: 'number', + optional: false, + }, + { + name: 'max', + type: 'number', + optional: false, + }, + ], + }, + { + name: 'lerp', + kind: 'function', + doc_comment: 'Linear interpolation between `a` and `b` by `amount`.', + source_line: 10, + type_signature: '(a: number, b: number, amount: number): number', + return_type: 'number', + parameters: [ + { + name: 'a', + type: 'number', + optional: false, + }, + { + name: 'b', + type: 'number', + optional: false, + }, + { + name: 'amount', + type: 'number', + optional: false, + }, + ], + }, + { + name: 'round', + kind: 'function', + doc_comment: 'Rounds a number to a specified number of decimal places.', + source_line: 15, + type_signature: '(n: number, decimals: number): number', + return_type: 'number', + parameters: [ + { + name: 'n', + type: 'number', + optional: false, + }, + { + name: 'decimals', + type: 'number', + optional: false, + }, + ], + }, + { + name: 'GR', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 23, + type_signature: '1.618033988749895', + }, + { + name: 'GR_i', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `1/GR`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 27, + type_signature: '0.6180339887498948', + }, + { + name: 'GR_2', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `GR**2`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 31, + type_signature: '2.618033988749895', + }, + { + name: 'GR_2i', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `1/(GR**2)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 35, + type_signature: '0.38196601125010515', + }, + { + name: 'GR_3', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `GR**3`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 39, + type_signature: '4.23606797749979', + }, + { + name: 'GR_3i', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `1/(GR**3)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 43, + type_signature: '0.2360679774997897', + }, + { + name: 'GR_4', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `GR**4`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 47, + type_signature: '6.854101966249686', + }, + { + name: 'GR_4i', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `1/(GR**4)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 51, + type_signature: '0.14589803375031543', + }, + { + name: 'GR_5', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `GR**5`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 55, + type_signature: '11.090169943749476', + }, + { + name: 'GR_5i', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `1/(GR**5)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 59, + type_signature: '0.09016994374947422', + }, + { + name: 'GR_6', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `GR**6`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 63, + type_signature: '17.944271909999163', + }, + { + name: 'GR_6i', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `1/(GR**6)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 67, + type_signature: '0.0557280900008412', + }, + { + name: 'GR_7', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `GR**7`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 71, + type_signature: '29.03444185374864', + }, + { + name: 'GR_7i', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `1/(GR**7)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 75, + type_signature: '0.03444185374863302', + }, + { + name: 'GR_8', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `GR**8`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 79, + type_signature: '46.978713763747805', + }, + { + name: 'GR_8i', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `1/(GR**8)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 83, + type_signature: '0.02128623625220818', + }, + { + name: 'GR_9', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `GR**9`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 87, + type_signature: '76.01315561749645', + }, + { + name: 'GR_9i', + kind: 'variable', + doc_comment: + 'golden ratio/mean constants, `1/(GR**9)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio', + source_line: 91, + type_signature: '0.013155617496424835', + }, + ], + dependents: ['colors.ts', 'timings.ts'], + }, + { + path: 'object.ts', + declarations: [ + { + name: 'is_plain_object', + kind: 'function', + doc_comment: + 'Returns a boolean indicating if `value` is\na plain object, possibly created with `Object.create(null)`.\nBut warning! This fails for some obscure corner cases, use a proper library for weird things.', + source_line: 8, + type_signature: '(value: any): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'value', + type: 'any', + optional: false, + }, + ], + }, + { + name: 'map_record', + kind: 'function', + doc_comment: + "Iterated keys in `for..in` are always returned as strings,\nso to prevent usage errors the key type of `mapper` is always a string.\nSymbols are not enumerable as keys, so they're excluded.", + source_line: 16, + type_signature: + '(obj: Record, mapper: (value: T, key: string) => U): Record', + return_type: 'Record', + parameters: [ + { + name: 'obj', + type: 'Record', + optional: false, + }, + { + name: 'mapper', + type: '(value: T, key: string) => U', + optional: false, + }, + ], + }, + { + name: 'omit', + kind: 'function', + doc_comment: 'Creates a new object without the specified `keys`.', + source_line: 30, + type_signature: + ', K extends keyof T>(obj: T, keys: K[]): OmitStrict', + return_type: 'OmitStrict', + parameters: [ + { + name: 'obj', + type: 'T', + optional: false, + }, + { + name: 'keys', + type: 'K[]', + optional: false, + }, + ], + }, + { + name: 'pick_by', + kind: 'function', + doc_comment: + 'Creates a new object with properties that pass the `should_pick` predicate.', + source_line: 46, + type_signature: + ', K extends string | number>(obj: T, should_pick: (value: any, key: K) => boolean): Partial', + return_type: 'Partial', + parameters: [ + { + name: 'obj', + type: 'T', + optional: false, + }, + { + name: 'should_pick', + type: '(value: any, key: K) => boolean', + optional: false, + }, + ], + }, + { + name: 'omit_undefined', + kind: 'function', + doc_comment: + "`omit_undefined` is a commonly used form of `pick_by`.\nSee this issue for why it's used so much:\nhttps://github.com/Microsoft/TypeScript/issues/13195", + source_line: 67, + type_signature: '>(obj: T): T', + return_type: 'T', + return_description: '`obj` with all `undefined` properties removed', + parameters: [ + { + name: 'obj', + type: 'T', + optional: false, + }, + ], + }, + { + name: 'reorder', + kind: 'function', + doc_comment: + 'A more explicit form of `{put_this_first: obj.put_this_first, ...obj}`.', + source_line: 73, + type_signature: + ', K extends string | number>(obj: T, keys: K[]): T', + return_type: 'T', + parameters: [ + { + name: 'obj', + type: 'T', + optional: false, + }, + { + name: 'keys', + type: 'K[]', + optional: false, + }, + ], + }, + { + name: 'EMPTY_OBJECT', + kind: 'variable', + doc_comment: + 'Frozen empty object with no properties, good for options default values.', + source_line: 88, + type_signature: 'Record & object', + }, + { + name: 'traverse', + kind: 'function', + doc_comment: + "Performs a depth-first traversal of an object's enumerable properties,\ncalling `cb` for every key and value with the current `obj` context.", + source_line: 96, + type_signature: '(obj: any, cb: (key: string, value: any, obj: any) => void): void', + return_type: 'void', + parameters: [ + { + name: 'obj', + type: 'any', + optional: false, + description: '- any object with enumerable properties', + }, + { + name: 'cb', + type: '(key: string, value: any, obj: any) => void', + optional: false, + description: + '- receives the key, value, and `obj` for every enumerable property on `obj` and its descendents', + }, + ], + }, + { + name: 'transform_empty_object_to_undefined', + kind: 'function', + source_line: 105, + type_signature: '(obj: T): T | undefined', + return_type: 'T | undefined', + parameters: [ + { + name: 'obj', + type: 'T', + optional: false, + }, + ], + }, + ], + dependents: ['fetch.ts', 'package_json.ts', 'throttle.ts'], + }, + { + path: 'package_json.ts', + declarations: [ + { + name: 'PackageJsonRepository', + kind: 'type', + source_line: 7, + type_signature: + 'ZodUnion; }, $loose>]>', + }, + { + name: 'PackageJsonAuthor', + kind: 'type', + source_line: 17, + type_signature: + 'ZodUnion; url: ZodOptional; }, $loose>]>', + }, + { + name: 'PackageJsonFunding', + kind: 'type', + source_line: 27, + type_signature: + 'ZodUnion]>', + }, + { + name: 'ExportValue', + kind: 'type', + source_line: 47, + type_signature: 'ZodType>', + }, + { + name: 'PackageJsonExports', + kind: 'type', + doc_comment: + 'Package exports can be:\n1. A string (shorthand for main export)\n2. null (to block exports)\n3. A record of export conditions/paths', + source_line: 56, + type_signature: + 'ZodUnion>>]>', + }, + { + name: 'PackageJson', + kind: 'type', + doc_comment: '', + see_also: ['https://docs.npmjs.com/cli/v10/configuring-npm/package-json'], + source_line: 66, + type_signature: + 'ZodObject<{ name: ZodString; version: ZodString; private: ZodOptional; public: ZodOptional; ... 27 more ...; exports: ZodOptional<...>; }, $loose>', + }, + ], + dependencies: ['object.ts', 'string.ts', 'url.ts'], + }, + { + path: 'path.ts', + declarations: [ + { + name: 'PathId', + kind: 'type', + doc_comment: + 'An absolute path on the filesystem. Named "id" to be consistent with Rollup.', + source_line: 6, + type_signature: 'PathId', + }, + { + name: 'PathInfo', + kind: 'type', + doc_comment: 'Basic information about a filesystem path.', + source_line: 11, + type_signature: 'PathInfo', + properties: [ + { + name: 'id', + kind: 'variable', + type_signature: 'PathId', + }, + { + name: 'is_directory', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'ResolvedPath', + kind: 'type', + doc_comment: + 'A resolved path with both the original path string and its absolute id.', + source_line: 19, + type_signature: 'ResolvedPath', + extends: ['PathInfo'], + properties: [ + { + name: 'path', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'PathFilter', + kind: 'type', + doc_comment: + 'A filter function for paths, can distinguish between files and directories.', + source_line: 26, + type_signature: 'PathFilter', + }, + { + name: 'FileFilter', + kind: 'type', + doc_comment: 'A filter function for file paths only.', + source_line: 31, + type_signature: 'FileFilter', + }, + { + name: 'to_file_path', + kind: 'function', + doc_comment: 'Converts a URL to a file path string, or returns the string as-is.', + source_line: 36, + type_signature: '(path_or_url: string | URL): string', + return_type: 'string', + parameters: [ + { + name: 'path_or_url', + type: 'string | URL', + optional: false, + }, + ], + }, + { + name: 'parse_path_parts', + kind: 'function', + doc_comment: '', + examples: [ + "parse_path_parts('./foo/bar/baz.ts') => ['foo', 'foo/bar', 'foo/bar/baz.ts']", + ], + source_line: 42, + type_signature: '(path: string): string[]', + return_type: 'string[]', + parameters: [ + { + name: 'path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'parse_path_segments', + kind: 'function', + doc_comment: 'Gets the individual parts of a path, ignoring dots and separators.', + examples: ["parse_path_segments('/foo/bar/baz.ts') => ['foo', 'bar', 'baz.ts']"], + source_line: 58, + type_signature: '(path: string): string[]', + return_type: 'string[]', + parameters: [ + { + name: 'path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'PathPiece', + kind: 'type', + doc_comment: 'A piece of a parsed path, either a path segment or separator.', + source_line: 64, + type_signature: 'PathPiece', + }, + { + name: 'parse_path_pieces', + kind: 'function', + doc_comment: + "Treats all paths as absolute, so the first piece is always a `'/'` with type `'separator'`.", + source_line: 79, + type_signature: '(raw_path: string): PathPiece[]', + return_type: 'PathPiece[]', + parameters: [ + { + name: 'raw_path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'slugify', + kind: 'function', + doc_comment: 'Converts a string into a URL-compatible slug.', + source_line: 103, + type_signature: '(str: string, map_special_characters?: boolean): string', + return_type: 'string', + parameters: [ + { + name: 'str', + type: 'string', + optional: false, + description: 'the string to convert', + }, + { + name: 'map_special_characters', + type: 'boolean', + optional: false, + description: + 'if `true`, characters like `ñ` are converted to their ASCII equivalents, runs around 5x faster when disabled', + default_value: 'true', + }, + ], + }, + ], + dependents: ['git.ts'], + }, + { + path: 'print.ts', + declarations: [ + { + name: 'st', + kind: 'function', + source_line: 6, + type_signature: + '(format: ForegroundColors | BackgroundColors | Modifiers | (ForegroundColors | BackgroundColors | Modifiers)[], text: string, options?: StyleTextOptions | undefined): string', + return_type: 'string', + parameters: [ + { + name: 'format', + type: 'ForegroundColors | BackgroundColors | Modifiers | (ForegroundColors | BackgroundColors | Modifiers)[]', + optional: false, + }, + { + name: 'text', + type: 'string', + optional: false, + }, + { + name: 'options', + type: 'StyleTextOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'configure_print_colors', + kind: 'function', + doc_comment: 'Configures the module-level styling function for colored output.', + source_line: 12, + type_signature: + '(s: ((format: ForegroundColors | BackgroundColors | Modifiers | (ForegroundColors | BackgroundColors | Modifiers)[], text: string, options?: StyleTextOptions | undefined) => string) | null | undefined): (format: ForegroundColors | ... 2 more ... | (ForegroundColors | ... 1 more ... | Modifiers)[], text: string, options?: StyleTextOptions | undefined) => string', + return_type: + '(format: ForegroundColors | BackgroundColors | Modifiers | (ForegroundColors | BackgroundColors | Modifiers)[], text: string, options?: StyleTextOptions | undefined) => string', + parameters: [ + { + name: 's', + type: '((format: ForegroundColors | BackgroundColors | Modifiers | (ForegroundColors | BackgroundColors | Modifiers)[], text: string, options?: StyleTextOptions | undefined) => string) | null | undefined', + optional: false, + }, + ], + }, + { + name: 'print_key_value', + kind: 'function', + doc_comment: 'Formats a key-value pair for printing.', + source_line: 22, + type_signature: '(key: string, value: string | number): string', + return_type: 'string', + parameters: [ + { + name: 'key', + type: 'string', + optional: false, + }, + { + name: 'value', + type: 'string | number', + optional: false, + }, + ], + }, + { + name: 'print_ms', + kind: 'function', + doc_comment: 'Formats a `number` of milliseconds for printing.', + source_line: 28, + type_signature: + '(ms: number, decimals?: number | undefined, separator?: string | undefined): string', + return_type: 'string', + parameters: [ + { + name: 'ms', + type: 'number', + optional: false, + }, + { + name: 'decimals', + type: 'number | undefined', + optional: true, + }, + { + name: 'separator', + type: 'string | undefined', + optional: true, + }, + ], + }, + { + name: 'print_number_with_separators', + kind: 'function', + doc_comment: 'Formats a `number` with separators for improved readability.', + source_line: 37, + type_signature: '(v: string, separator?: string): string', + return_type: 'string', + parameters: [ + { + name: 'v', + type: 'string', + optional: false, + }, + { + name: 'separator', + type: 'string', + optional: false, + default_value: "','", + }, + ], + }, + { + name: 'print_string', + kind: 'function', + doc_comment: 'Formats a `string` for printing.', + source_line: 54, + type_signature: '(value: string): string', + return_type: 'string', + parameters: [ + { + name: 'value', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'print_number', + kind: 'function', + doc_comment: 'Formats a `number` for printing.', + source_line: 59, + type_signature: '(value: number): string', + return_type: 'string', + parameters: [ + { + name: 'value', + type: 'number', + optional: false, + }, + ], + }, + { + name: 'print_boolean', + kind: 'function', + doc_comment: 'Formats a `boolean` for printing.', + source_line: 64, + type_signature: '(value: boolean): string', + return_type: 'string', + parameters: [ + { + name: 'value', + type: 'boolean', + optional: false, + }, + ], + }, + { + name: 'print_value', + kind: 'function', + doc_comment: 'Formats any value for printing.', + source_line: 69, + type_signature: '(value: unknown): string', + return_type: 'string', + parameters: [ + { + name: 'value', + type: 'unknown', + optional: false, + }, + ], + }, + { + name: 'print_error', + kind: 'function', + doc_comment: + "Formats an error for printing.\nBecause throwing errors and rejecting promises isn't typesafe,\ndon't assume the arg is an `Error` and try to return something useful.", + source_line: 92, + type_signature: '(err: Error): string', + return_type: 'string', + parameters: [ + { + name: 'err', + type: 'Error', + optional: false, + }, + ], + }, + { + name: 'print_timing', + kind: 'function', + doc_comment: 'Formats a timing entry with `key` for printing.', + source_line: 101, + type_signature: '(key: string | number, timing: number | undefined): string', + return_type: 'string', + parameters: [ + { + name: 'key', + type: 'string | number', + optional: false, + }, + { + name: 'timing', + type: 'number | undefined', + optional: false, + }, + ], + }, + { + name: 'print_timings', + kind: 'function', + doc_comment: 'Prints all timings in a `Timings` object.', + source_line: 107, + type_signature: '(timings: Timings, log: Logger): void', + return_type: 'void', + parameters: [ + { + name: 'timings', + type: 'Timings', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + ], + }, + ], + dependents: ['process.ts'], + }, + { + path: 'process.ts', + declarations: [ + { + name: 'SpawnedProcess', + kind: 'type', + source_line: 14, + type_signature: 'SpawnedProcess', + properties: [ + { + name: 'child', + kind: 'variable', + type_signature: 'ChildProcess', + }, + { + name: 'closed', + kind: 'variable', + type_signature: 'Promise', + }, + ], + }, + { + name: 'Spawned', + kind: 'type', + source_line: 19, + type_signature: 'Spawned', + properties: [ + { + name: 'child', + kind: 'variable', + type_signature: 'ChildProcess', + }, + { + name: 'signal', + kind: 'variable', + type_signature: 'NodeJS.Signals | null', + }, + { + name: 'code', + kind: 'variable', + type_signature: 'number | null', + }, + ], + }, + { + name: 'SpawnResult', + kind: 'type', + source_line: 27, + type_signature: 'SpawnResult', + }, + { + name: 'spawn', + kind: 'function', + doc_comment: + 'A convenient promise wrapper around `spawn_process`\nintended for commands that have an end, not long running-processes like watchers.\nAny more advanced usage should use `spawn_process` directly for access to the `child` process.', + source_line: 34, + type_signature: + '(command: string, args?: readonly string[] | undefined, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'args', + type: '[command: string, args?: readonly string[] | undefined, options?: SpawnOptions | undefined]', + optional: false, + }, + ], + }, + { + name: 'SpawnedOut', + kind: 'type', + source_line: 37, + type_signature: 'SpawnedOut', + properties: [ + { + name: 'result', + kind: 'variable', + type_signature: 'SpawnResult', + }, + { + name: 'stdout', + kind: 'variable', + type_signature: 'string | null', + }, + { + name: 'stderr', + kind: 'variable', + type_signature: 'string | null', + }, + ], + }, + { + name: 'spawn_out', + kind: 'function', + doc_comment: + 'Similar to `spawn` but buffers and returns `stdout` and `stderr` as strings.', + source_line: 46, + type_signature: + '(command: string, args?: readonly string[], options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'command', + type: 'string', + optional: false, + }, + { + name: 'args', + type: 'readonly string[]', + optional: false, + default_value: '[]', + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'spawn_process', + kind: 'function', + doc_comment: + 'Wraps the normal Node `childProcess.spawn` with graceful child shutdown behavior.\nAlso returns a convenient `closed` promise.\nIf you only need `closed`, prefer the shorthand function `spawn`.', + source_line: 70, + type_signature: + '(command: string, args?: readonly string[], options?: SpawnOptions | undefined): SpawnedProcess', + return_type: 'SpawnedProcess', + parameters: [ + { + name: 'command', + type: 'string', + optional: false, + }, + { + name: 'args', + type: 'readonly string[]', + optional: false, + default_value: '[]', + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'print_child_process', + kind: 'function', + source_line: 86, + type_signature: '(child: ChildProcess): string', + return_type: 'string', + parameters: [ + { + name: 'child', + type: 'ChildProcess', + optional: false, + }, + ], + }, + { + name: 'global_spawn', + kind: 'variable', + doc_comment: + 'We register spawned processes gloabally so we can gracefully exit child processes.\nOtherwise, errors can cause zombie processes, sometimes blocking ports even!', + source_line: 93, + type_signature: 'Set', + }, + { + name: 'register_global_spawn', + kind: 'function', + doc_comment: 'Returns a function that unregisters the `child`.', + source_line: 101, + type_signature: '(child: ChildProcess): () => void', + return_type: '() => void', + return_description: 'cleanup function that removes the child from `global_spawn`', + parameters: [ + { + name: 'child', + type: 'ChildProcess', + optional: false, + description: 'the child process to register', + }, + ], + }, + { + name: 'despawn', + kind: 'function', + doc_comment: 'Kills a child process and returns a `SpawnResult`.', + source_line: 117, + type_signature: '(child: ChildProcess): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'child', + type: 'ChildProcess', + optional: false, + }, + ], + }, + { + name: 'despawn_all', + kind: 'function', + doc_comment: 'Kills all globally registered child processes.', + source_line: 132, + type_signature: '(): Promise', + return_type: 'Promise', + parameters: [], + }, + { + name: 'attach_process_error_handlers', + kind: 'function', + doc_comment: + "Attaches the `'uncoughtException'` event to despawn all processes,\nand enables custom error logging with `to_error_label`.", + source_line: 141, + type_signature: + '(to_error_label?: ((err: Error, origin: UncaughtExceptionOrigin) => string | null) | undefined, map_error_text?: ((err: Error, origin: UncaughtExceptionOrigin) => string | null) | undefined, handle_error?: (err: Error, origin: UncaughtExceptionOrigin) => void): void', + return_type: 'void', + parameters: [ + { + name: 'to_error_label', + type: '((err: Error, origin: UncaughtExceptionOrigin) => string | null) | undefined', + optional: true, + description: + '- Customize the error label or return `null` for the default `origin`.', + }, + { + name: 'map_error_text', + type: '((err: Error, origin: UncaughtExceptionOrigin) => string | null) | undefined', + optional: true, + description: + "- Customize the error text. Return `''` to silence, or `null` for the default `print_error(err)`.", + }, + { + name: 'handle_error', + type: '(err: Error, origin: UncaughtExceptionOrigin) => void', + optional: false, + default_value: '() =>\n\t\tprocess.exit(1)', + }, + ], + }, + { + name: 'print_spawn_result', + kind: 'function', + doc_comment: 'Formats a `SpawnResult` for printing.', + source_line: 163, + type_signature: '(result: SpawnResult): string', + return_type: 'string', + parameters: [ + { + name: 'result', + type: 'SpawnResult', + optional: false, + }, + ], + }, + { + name: 'RestartableProcess', + kind: 'type', + source_line: 171, + type_signature: 'RestartableProcess', + properties: [ + { + name: 'restart', + kind: 'variable', + type_signature: '() => void', + }, + { + name: 'kill', + kind: 'variable', + type_signature: '() => Promise', + }, + ], + }, + { + name: 'spawn_restartable_process', + kind: 'function', + doc_comment: + 'Like `spawn_process` but with `restart` and `kill`,\nhandling many concurrent `restart` calls gracefully.', + source_line: 180, + type_signature: + '(command: string, args?: readonly string[], options?: SpawnOptions | undefined): RestartableProcess', + return_type: 'RestartableProcess', + parameters: [ + { + name: 'command', + type: 'string', + optional: false, + }, + { + name: 'args', + type: 'readonly string[]', + optional: false, + default_value: '[]', + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + ], + dependencies: ['log.ts', 'print.ts'], + dependents: ['git.ts'], + }, + { + path: 'random_alea.ts', + declarations: [ + { + name: 'Alea', + kind: 'type', + source_line: 31, + type_signature: 'Alea', + properties: [ + { + name: 'uint32', + kind: 'variable', + type_signature: '() => number', + }, + { + name: 'fract53', + kind: 'variable', + type_signature: '() => number', + }, + { + name: 'version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'seeds', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'create_random_alea', + kind: 'function', + doc_comment: + 'Seeded pseudo-random number generator.\nDO NOT USE when security matters, use webcrypto APIs instead.', + see_also: [ + 'http://baagoe.com/en/RandomMusings/javascript/', + 'https://github.com/nquinlan/better-random-numbers-for-javascript-mirror', + ], + source_line: 46, + type_signature: '(...seed: unknown[]): Alea', + return_type: 'Alea', + parameters: [ + { + name: 'seed', + type: 'unknown[]', + optional: false, + }, + ], + }, + { + name: 'masher', + kind: 'function', + doc_comment: '', + source_line: 91, + type_signature: '(): Mash', + return_type: 'Mash', + parameters: [], + }, + ], + }, + { + path: 'random.ts', + declarations: [ + { + name: 'random_float', + kind: 'function', + doc_comment: 'Generates a random `number` between `min` and `max`.', + source_line: 6, + type_signature: '(min: number, max: number, random?: () => number): number', + return_type: 'number', + parameters: [ + { + name: 'min', + type: 'number', + optional: false, + }, + { + name: 'max', + type: 'number', + optional: false, + }, + { + name: 'random', + type: '() => number', + optional: false, + default_value: 'Math.random', + }, + ], + }, + { + name: 'random_int', + kind: 'function', + doc_comment: + "Returns a random integer between `min` and `max` inclusive.\nNode's `randomInt` is similar but exclusive of the max value, and makes `min` optional -\nhttps://nodejs.org/docs/latest-v20.x/api/crypto.html#cryptorandomintmin-max-callback", + source_line: 14, + type_signature: '(min: number, max: number, random?: () => number): number', + return_type: 'number', + parameters: [ + { + name: 'min', + type: 'number', + optional: false, + }, + { + name: 'max', + type: 'number', + optional: false, + }, + { + name: 'random', + type: '() => number', + optional: false, + default_value: 'Math.random', + }, + ], + }, + { + name: 'random_boolean', + kind: 'function', + doc_comment: 'Generates a random `boolean`.', + source_line: 20, + type_signature: '(random?: () => number): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'random', + type: '() => number', + optional: false, + default_value: 'Math.random', + }, + ], + }, + { + name: 'random_item', + kind: 'function', + doc_comment: 'Selects a random item from an array.', + source_line: 25, + type_signature: + '>(arr: T, random?: () => number): ArrayElement', + return_type: 'ArrayElement', + parameters: [ + { + name: 'arr', + type: 'T', + optional: false, + }, + { + name: 'random', + type: '() => number', + optional: false, + default_value: 'Math.random', + }, + ], + }, + { + name: 'shuffle', + kind: 'function', + doc_comment: 'Mutates `array` with random ordering.', + source_line: 34, + type_signature: + '>(array: T, random?: ((min: number, max: number, random?: () => number) => number) | undefined): T', + return_type: 'T', + parameters: [ + { + name: 'array', + type: 'T', + optional: false, + }, + { + name: 'random', + type: '((min: number, max: number, random?: () => number) => number) | undefined', + optional: true, + }, + ], + }, + ], + }, + { + path: 'regexp.ts', + declarations: [ + { + name: 'escape_regexp', + kind: 'function', + doc_comment: 'Escapes a string for literal matching in a RegExp.', + source_line: 5, + type_signature: '(str: string): string', + return_type: 'string', + parameters: [ + { + name: 'str', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'reset_regexp', + kind: 'function', + doc_comment: + "Reset a RegExp's lastIndex to 0 for global and sticky patterns.\nEnsures consistent behavior by clearing state that affects subsequent matches.", + source_line: 12, + type_signature: '(regexp: T): T', + return_type: 'T', + parameters: [ + { + name: 'regexp', + type: 'T', + optional: false, + }, + ], + }, + ], + }, + { + path: 'result.ts', + declarations: [ + { + name: 'Result', + kind: 'type', + doc_comment: + 'An alternative pattern to throwing and catching errors.\nUses the type system to strongly type error return values when desired.\nCatching errors is then reserved for unexpected situations.', + source_line: 6, + type_signature: 'Result', + generic_params: [ + { + name: 'TValue', + default_type: 'object', + }, + { + name: 'TError', + default_type: 'object', + }, + ], + }, + { + name: 'OK', + kind: 'variable', + doc_comment: 'Frozen object representing a successful result.', + source_line: 13, + type_signature: 'Readonly<{ readonly ok: true; }>', + }, + { + name: 'NOT_OK', + kind: 'variable', + doc_comment: 'Frozen object representing a failed result.', + source_line: 18, + type_signature: 'Readonly<{ readonly ok: false; }>', + }, + { + name: 'unwrap', + kind: 'function', + doc_comment: + 'A helper that says,\n"hey I know this is wrapped in a `Result`, but I expect it to be `ok`,\nso if it\'s not, I understand it will throw an error that wraps the result".', + source_line: 28, + type_signature: + '(result: Result, message?: string | undefined): TValue["value"]', + return_type: 'TValue["value"]', + return_description: 'The wrapped value.', + parameters: [ + { + name: 'result', + type: 'Result', + optional: false, + description: 'Some `Result` object.', + }, + { + name: 'message', + type: 'string | undefined', + optional: true, + description: 'Optional custom error message.', + }, + ], + }, + { + name: 'ResultError', + kind: 'class', + doc_comment: + "A custom error class that's thrown by `unwrap`.\nWraps a failed `Result` with an optional message,\nand also accepts an optional message that overrides the result's.\nUseful for generic handling of unwrapped results\nto forward custom messages and other failed result data.", + source_line: 43, + extends: ['Error'], + implements: [], + members: [ + { + name: 'DEFAULT_MESSAGE', + kind: 'variable', + modifiers: ['static'], + }, + { + name: 'result', + kind: 'variable', + modifiers: ['readonly'], + type_signature: '{ok: false; message?: string}', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: + '(result: { ok: false; message?: string | undefined; }, message?: string | undefined, options?: ErrorOptions | undefined): ResultError', + parameters: [ + { + name: 'result', + type: '{ ok: false; message?: string | undefined; }', + optional: false, + }, + { + name: 'message', + type: 'string | undefined', + optional: true, + }, + { + name: 'options', + type: 'ErrorOptions | undefined', + optional: true, + }, + ], + }, + ], + }, + { + name: 'unwrap_error', + kind: 'function', + doc_comment: + 'A helper that does the opposite of `unwrap`, throwing if the `Result` is ok.\nNote that while `unwrap` returns the wrapped `value`, `unwrap_error` returns the entire result.', + source_line: 61, + type_signature: + '(result: Result, message?: string): { ok: false; } & TError', + return_type: '{ ok: false; } & TError', + return_description: 'The type-narrowed result.', + parameters: [ + { + name: 'result', + type: 'Result', + optional: false, + description: 'Some `Result` object.', + }, + { + name: 'message', + type: 'string', + optional: false, + description: 'Optional custom error message.', + default_value: "'Failed to unwrap result error'", + }, + ], + }, + ], + }, + { + path: 'source_json.ts', + declarations: [ + { + name: 'DeclarationKind', + kind: 'type', + doc_comment: 'The kind of exported declaration.', + source_line: 16, + type_signature: + 'ZodEnum<{ function: "function"; type: "type"; variable: "variable"; class: "class"; constructor: "constructor"; component: "component"; json: "json"; css: "css"; }>', + }, + { + name: 'GenericParamInfo', + kind: 'type', + doc_comment: 'Generic type parameter information.', + source_line: 31, + type_signature: + 'ZodObject<{ name: ZodString; constraint: ZodOptional; default_type: ZodOptional; }, $loose>', + }, + { + name: 'ParameterInfo', + kind: 'type', + doc_comment: + 'Parameter information for functions and methods.\n\nKept distinct from ComponentPropInfo despite structural similarity.\nFunction parameters form a tuple with positional semantics:\ncalling order matters (`fn(a, b)` vs `fn(b, a)`),\nmay include rest parameters and destructuring patterns.', + source_line: 49, + type_signature: + 'ZodObject<{ name: ZodString; type: ZodString; optional: ZodBoolean; description: ZodOptional; default_value: ZodOptional; }, $loose>', + }, + { + name: 'ComponentPropInfo', + kind: 'type', + doc_comment: + 'Component prop information for Svelte components.\n\nKept distinct from ParameterInfo despite structural similarity.\nComponent props are named attributes with different semantics:\nno positional order when passing (`` = ``),\nsupport two-way binding via `$bindable` rune.', + source_line: 66, + type_signature: + 'ZodObject<{ name: ZodString; type: ZodString; optional: ZodBoolean; description: ZodOptional; default_value: ZodOptional; bindable: ZodOptional<...>; }, $loose>', + }, + { + name: 'DeclarationJson', + kind: 'type', + doc_comment: + 'Metadata for an exported declaration (function, type, class, component, etc.).\n\nExtracted from TypeScript source and JSDoc/TSDoc comments at build time.', + source_line: 81, + type_signature: + 'ZodObject<{ name: ZodString; kind: ZodEnum<{ function: "function"; type: "type"; variable: "variable"; class: "class"; constructor: "constructor"; component: "component"; json: "json"; css: "css"; }>; ... 19 more ...; alias_of: ZodOptional<...>; }, $loose>', + }, + { + name: 'ModuleJson', + kind: 'type', + doc_comment: 'A source file in `src/lib/` with its exported declarations.', + source_line: 145, + type_signature: + 'ZodObject<{ path: ZodString; declarations: ZodOptional; ... 19 more ...; alias_of: ZodOptional<...>; }, $loo...', + }, + { + name: 'SourceJson', + kind: 'type', + doc_comment: "Metadata for a library's `src/lib/` exports.", + source_line: 161, + type_signature: + 'ZodObject<{ name: ZodString; version: ZodString; modules: ZodOptional; ... 19 more ...; alias_of: ZodOptional<...>; }, $loose>>>; module_comment: ...', + }, + { + name: 'declaration_get_display_name', + kind: 'function', + doc_comment: 'Format declaration name with generic parameters for display.', + examples: [ + "declaration_get_display_name({name: 'Map', kind: 'type', generic_params: [{name: 'K'}, {name: 'V'}]})\n// => 'Map'", + ], + source_line: 173, + type_signature: + '(declaration: { [x: string]: unknown; name: string; kind: "function" | "type" | "variable" | "class" | "constructor" | "component" | "json" | "css"; doc_comment?: string | undefined; type_signature?: string | undefined; ... 17 more ...; alias_of?: { ...; } | undefined; }): string', + return_type: 'string', + parameters: [ + { + name: 'declaration', + type: '{ [x: string]: unknown; name: string; kind: "function" | "type" | "variable" | "class" | "constructor" | "component" | "json" | "css"; doc_comment?: string | undefined; type_signature?: string | undefined; ... 17 more ...; alias_of?: { ...; } | undefined; }', + optional: false, + }, + ], + }, + { + name: 'declaration_generate_import', + kind: 'function', + doc_comment: 'Generate TypeScript import statement for a declaration.', + examples: [ + "declaration_generate_import({name: 'Foo', kind: 'type'}, 'foo.ts', '@pkg/lib')\n// => \"import type {Foo} from '@pkg/lib/foo.js';\"", + ], + source_line: 189, + type_signature: + '(declaration: { [x: string]: unknown; name: string; kind: "function" | "type" | "variable" | "class" | "constructor" | "component" | "json" | "css"; doc_comment?: string | undefined; type_signature?: string | undefined; ... 17 more ...; alias_of?: { ...; } | undefined; }, module_path: string, library_name: string): string', + return_type: 'string', + parameters: [ + { + name: 'declaration', + type: '{ [x: string]: unknown; name: string; kind: "function" | "type" | "variable" | "class" | "constructor" | "component" | "json" | "css"; doc_comment?: string | undefined; type_signature?: string | undefined; ... 17 more ...; alias_of?: { ...; } | undefined; }', + optional: false, + }, + { + name: 'module_path', + type: 'string', + optional: false, + }, + { + name: 'library_name', + type: 'string', + optional: false, + }, + ], + }, + ], + module_comment: + 'Metadata types for library source code analysis.\n\nThese types represent the structure of `src/lib/` exports,\nextracted at build time via TypeScript compiler analysis.\nUsed for generating API documentation and enabling code search.\n\nHierarchy: SourceJson → ModuleJson → DeclarationJson', + }, + { + path: 'string.ts', + declarations: [ + { + name: 'truncate', + kind: 'function', + doc_comment: + 'Truncates a string to a maximum length, adding a suffix if needed that defaults to `...`.', + source_line: 6, + type_signature: '(str: string, maxLength: number, suffix?: string): string', + return_type: 'string', + parameters: [ + { + name: 'str', + type: 'string', + optional: false, + }, + { + name: 'maxLength', + type: 'number', + optional: false, + }, + { + name: 'suffix', + type: 'string', + optional: false, + default_value: "'...'", + }, + ], + }, + { + name: 'strip_start', + kind: 'function', + doc_comment: 'Removes characters inclusive of `stripped`.', + source_line: 17, + type_signature: '(source: string, stripped: string): string', + return_type: 'string', + parameters: [ + { + name: 'source', + type: 'string', + optional: false, + }, + { + name: 'stripped', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'strip_end', + kind: 'function', + doc_comment: 'Removes characters inclusive of `stripped`.', + source_line: 25, + type_signature: '(source: string, stripped: string): string', + return_type: 'string', + parameters: [ + { + name: 'source', + type: 'string', + optional: false, + }, + { + name: 'stripped', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'strip_after', + kind: 'function', + doc_comment: 'Removes characters inclusive of `stripped`.', + source_line: 33, + type_signature: '(source: string, stripped: string): string', + return_type: 'string', + parameters: [ + { + name: 'source', + type: 'string', + optional: false, + }, + { + name: 'stripped', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'strip_before', + kind: 'function', + doc_comment: 'Removes characters inclusive of `stripped`.', + source_line: 43, + type_signature: '(source: string, stripped: string): string', + return_type: 'string', + parameters: [ + { + name: 'source', + type: 'string', + optional: false, + }, + { + name: 'stripped', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'ensure_start', + kind: 'function', + doc_comment: + "Adds the substring `ensured` to the start of the `source` string if it's not already present.", + source_line: 53, + type_signature: '(source: string, ensured: string): string', + return_type: 'string', + parameters: [ + { + name: 'source', + type: 'string', + optional: false, + }, + { + name: 'ensured', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'ensure_end', + kind: 'function', + doc_comment: + "Adds the substring `ensured` to the end of the `source` string if it's not already present.", + source_line: 61, + type_signature: '(source: string, ensured: string): string', + return_type: 'string', + parameters: [ + { + name: 'source', + type: 'string', + optional: false, + }, + { + name: 'ensured', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'deindent', + kind: 'function', + doc_comment: 'Removes leading and trailing spaces from each line of a string.', + source_line: 69, + type_signature: '(str: string): string', + return_type: 'string', + parameters: [ + { + name: 'str', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'plural', + kind: 'function', + doc_comment: 'Returns a plural suffix based on a count.', + source_line: 79, + type_signature: '(count: number | null | undefined, suffix?: string): string', + return_type: 'string', + parameters: [ + { + name: 'count', + type: 'number | null | undefined', + optional: false, + }, + { + name: 'suffix', + type: 'string', + optional: false, + default_value: "'s'", + }, + ], + }, + { + name: 'count_graphemes', + kind: 'function', + doc_comment: + 'Returns the count of graphemes in a string, the individually rendered characters.', + source_line: 85, + type_signature: '(str: string): number', + return_type: 'number', + parameters: [ + { + name: 'str', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'strip_ansi', + kind: 'function', + doc_comment: 'Strips ANSI escape sequences from a string', + source_line: 91, + type_signature: '(str: string): string', + return_type: 'string', + parameters: [ + { + name: 'str', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'stringify', + kind: 'function', + doc_comment: + 'Stringifies a value like `JSON.stringify` but with some corner cases handled better.', + source_line: 98, + type_signature: '(value: unknown): string', + return_type: 'string', + parameters: [ + { + name: 'value', + type: 'unknown', + optional: false, + }, + ], + }, + ], + dependencies: ['iterator.ts'], + dependents: ['library_json.ts', 'package_json.ts', 'url.ts'], + }, + { + path: 'throttle.ts', + declarations: [ + { + name: 'ThrottleOptions', + kind: 'type', + source_line: 4, + type_signature: 'ThrottleOptions', + properties: [ + { + name: 'delay', + kind: 'variable', + type_signature: 'number', + doc_comment: + "Enforced milliseconds between calls. For `when='trailing'` this is the debounce delay.", + }, + { + name: 'when', + kind: 'variable', + type_signature: "'both' | 'leading' | 'trailing'", + doc_comment: 'When to call the throttled function. Defaults to `both`.', + }, + ], + }, + { + name: 'throttle', + kind: 'function', + doc_comment: + 'Throttles calls to a callback that returns a void promise.\nImmediately invokes the callback on the first call unless `leading=false`.\nIf the throttled function is called while the promise is already pending,\nthe call is queued to run after the pending promise completes plus `delay`,\nand only the last call is invoked.\nIn other words, all calls and their args are discarded\nduring the pending window except for the most recent.\nUnlike debouncing, this calls the throttled callback\nboth on the leading and trailing edges of the delay window by default,\nand this can be customized by setting `leading` or `trailing.\nIt also differs from a queue where every call to the throttled callback eventually runs.', + source_line: 29, + type_signature: + ') => Promise>(cb: T, { delay, when }?: ThrottleOptions): T', + return_type: 'T', + return_description: 'same as `cb`', + parameters: [ + { + name: 'cb', + type: 'T', + optional: false, + }, + { + name: '__1', + type: 'ThrottleOptions', + optional: false, + default_value: 'EMPTY_OBJECT', + }, + ], + }, + ], + dependencies: ['async.ts', 'object.ts'], + }, + { + path: 'timings.ts', + declarations: [ + { + name: 'Stopwatch', + kind: 'type', + source_line: 3, + type_signature: 'Stopwatch', + }, + { + name: 'create_stopwatch', + kind: 'function', + doc_comment: 'Tracks elapsed time in milliseconds.', + source_line: 8, + type_signature: '(decimals?: number): Stopwatch', + return_type: 'Stopwatch', + parameters: [ + { + name: 'decimals', + type: 'number', + optional: false, + default_value: '2', + }, + ], + }, + { + name: 'TimingsKey', + kind: 'type', + source_line: 18, + type_signature: 'TimingsKey', + }, + { + name: 'Timings', + kind: 'class', + doc_comment: + 'Tracks and manages multiple timing operations.\nAllows starting, stopping, and retrieving timings with optional precision.', + source_line: 24, + members: [ + { + name: 'decimals', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'number | undefined', + }, + { + name: 'timings', + kind: 'variable', + modifiers: ['private', 'readonly'], + type_signature: 'Map', + }, + { + name: 'stopwatches', + kind: 'variable', + modifiers: ['private', 'readonly'], + type_signature: 'Map', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: '(decimals?: number | undefined): Timings', + parameters: [ + { + name: 'decimals', + type: 'number | undefined', + optional: true, + }, + ], + }, + { + name: 'start', + kind: 'function', + doc_comment: 'Starts a timing operation for the given key.', + type_signature: + '(key: TimingsKey, decimals?: number | undefined): () => number', + return_type: '() => number', + parameters: [ + { + name: 'key', + type: 'TimingsKey', + optional: false, + }, + { + name: 'decimals', + type: 'number | undefined', + optional: false, + default_value: 'this.decimals', + }, + ], + }, + { + name: 'next_key', + kind: 'function', + modifiers: ['private'], + type_signature: '(key: TimingsKey): TimingsKey', + return_type: 'TimingsKey', + parameters: [ + { + name: 'key', + type: 'TimingsKey', + optional: false, + }, + ], + }, + { + name: 'stop', + kind: 'function', + modifiers: ['private'], + doc_comment: 'Stops a timing operation and records the elapsed time.', + type_signature: '(key: TimingsKey): number', + return_type: 'number', + parameters: [ + { + name: 'key', + type: 'TimingsKey', + optional: false, + }, + ], + }, + { + name: 'get', + kind: 'function', + type_signature: '(key: TimingsKey): number', + return_type: 'number', + parameters: [ + { + name: 'key', + type: 'TimingsKey', + optional: false, + }, + ], + }, + { + name: 'entries', + kind: 'function', + type_signature: '(): IterableIterator<[TimingsKey, number | undefined]>', + return_type: 'IterableIterator<[TimingsKey, number | undefined]>', + parameters: [], + }, + { + name: 'merge', + kind: 'function', + doc_comment: + 'Merges other timings into this one,\nadding together values with identical keys.', + type_signature: '(timings: Timings): void', + return_type: 'void', + parameters: [ + { + name: 'timings', + type: 'Timings', + optional: false, + }, + ], + }, + ], + }, + ], + dependencies: ['maths.ts'], + }, + { + path: 'types.ts', + declarations: [ + { + name: 'ClassConstructor', + kind: 'type', + source_line: 11, + type_signature: 'ClassConstructor', + generic_params: [ + { + name: 'TInstance', + }, + { + name: 'TArgs', + constraint: 'Array', + default_type: 'Array', + }, + ], + }, + { + name: 'OmitStrict', + kind: 'type', + source_line: 15, + type_signature: 'OmitStrict', + generic_params: [ + { + name: 'T', + }, + { + name: 'K', + constraint: 'keyof T', + }, + ], + }, + { + name: 'PickUnion', + kind: 'type', + doc_comment: 'Like `Pick` but works for type unions.', + see_also: [ + 'https://stackoverflow.com/questions/75271774/creating-a-type-using-pick-with-a-type-that-is-defined-as-a-union-of-types', + 'https://stackoverflow.com/users/5770132/oblosys', + ], + source_line: 23, + type_signature: 'PickUnion', + generic_params: [ + { + name: 'T', + }, + { + name: 'K', + constraint: 'KeyofUnion', + }, + ], + }, + { + name: 'KeyofUnion', + kind: 'type', + doc_comment: 'Like `keyof` but works for type unions.', + see_also: [ + 'https://stackoverflow.com/questions/75271774/creating-a-type-using-pick-with-a-type-that-is-defined-as-a-union-of-types', + 'https://stackoverflow.com/users/5770132/oblosys', + ], + source_line: 35, + type_signature: 'KeyofUnion', + generic_params: [ + { + name: 'T', + }, + ], + }, + { + name: 'PartialExcept', + kind: 'type', + source_line: 40, + type_signature: 'PartialExcept', + generic_params: [ + { + name: 'T', + }, + { + name: 'K', + constraint: 'keyof T', + }, + ], + }, + { + name: 'PartialOnly', + kind: 'type', + source_line: 43, + type_signature: 'PartialOnly', + generic_params: [ + { + name: 'T', + }, + { + name: 'K', + constraint: 'keyof T', + }, + ], + }, + { + name: 'PartialValues', + kind: 'type', + source_line: 47, + type_signature: 'PartialValues', + generic_params: [ + { + name: 'T', + }, + ], + }, + { + name: 'Assignable', + kind: 'type', + source_line: 51, + type_signature: 'Assignable', + generic_params: [ + { + name: 'T', + }, + { + name: 'K', + constraint: 'keyof T', + default_type: 'keyof T', + }, + ], + }, + { + name: 'Defined', + kind: 'type', + source_line: 55, + type_signature: 'Defined', + generic_params: [ + { + name: 'T', + }, + ], + }, + { + name: 'NotNull', + kind: 'type', + source_line: 56, + type_signature: 'NotNull', + generic_params: [ + { + name: 'T', + }, + ], + }, + { + name: 'ArrayElement', + kind: 'type', + source_line: 58, + type_signature: 'ArrayElement', + generic_params: [ + { + name: 'T', + }, + ], + }, + { + name: 'Flavored', + kind: 'type', + doc_comment: + 'The `Flavored` and `Branded` type helpers add varying degrees of nominal typing to other types.\nThis is especially useful with primitives like strings and numbers.', + see_also: [ + "https://spin.atomicobject.com/typescript-flexible-nominal-typing/ * `Flavored` is a looser form of `Branded` that trades explicitness and a little safety in some cases for ergonomics. With `Flavored` you don't need to cast unflavored types: * ```ts type Email = Flavored; const email1: Email = 'foo'; // ok type Address = Flavored; const email2: Email = 'foo' as Address; // error! ``` * `Branded` requires casting: * ```ts type PhoneNumber = Branded; const phone1: PhoneNumber = 'foo'; // error! const phone2: PhoneNumber = 'foo' as PhoneNumber; // ok ``` * See also Zod's `.brand` schema helper: *", + 'https://github.com/colinhacks/zod#brand', + ], + source_line: 90, + type_signature: 'Flavored', + generic_params: [ + { + name: 'TValue', + }, + { + name: 'TName', + }, + ], + }, + { + name: 'Flavor', + kind: 'type', + source_line: 92, + type_signature: 'Flavor', + generic_params: [ + { + name: 'T', + }, + ], + properties: [], + }, + { + name: 'Branded', + kind: 'type', + source_line: 95, + type_signature: 'Branded', + generic_params: [ + { + name: 'TValue', + }, + { + name: 'TName', + }, + ], + }, + { + name: 'Brand', + kind: 'type', + source_line: 97, + type_signature: 'Brand', + generic_params: [ + { + name: 'T', + }, + ], + properties: [], + }, + ], + }, + { + path: 'url.ts', + declarations: [ + { + name: 'format_url', + kind: 'function', + doc_comment: + "Formats a URL by removing 'https://', 'www.', and trailing slashes.\nNotably it does not remove 'http://', so the user can see that it's insecure.", + source_line: 10, + type_signature: '(url: string): string', + return_type: 'string', + parameters: [ + { + name: 'url', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'Url', + kind: 'type', + source_line: 13, + type_signature: 'ZodURL', + }, + ], + dependencies: ['string.ts'], + dependents: ['package_json.ts'], + }, + ], + }, + name: '@ryanatkn/belt', + repo_name: 'belt', + repo_url: 'https://github.com/ryanatkn/belt', + owner_name: 'ryanatkn', + homepage_url: 'https://belt.ryanatkn.com/', + logo_url: 'https://belt.ryanatkn.com/logo.svg', + logo_alt: 'a green sauropod wearing a brown utility belt', + npm_url: 'https://www.npmjs.com/package/@ryanatkn/belt', + changelog_url: 'https://github.com/ryanatkn/belt/blob/main/CHANGELOG.md', + published: true, + }, + check_runs: { + status: 'completed', + conclusion: 'success', + }, + pull_requests: [], + }, + { + library_json: { + package_json: { + name: '@ryanatkn/fuz_gitops', + version: '0.54.0', + description: 'a tool for managing many repos', + glyph: '🪄', + logo: 'logo.svg', + logo_alt: 'a friendly blue spider facing you', + public: true, + license: 'MIT', + homepage: 'https://gitops.fuz.dev/', + repository: 'https://github.com/ryanatkn/fuz_gitops', + author: { + name: 'Ryan Atkinson', + email: 'mail@ryanatkn.com', + url: 'https://www.ryanatkn.com/', + }, + bugs: 'https://github.com/ryanatkn/fuz_gitops/issues', + funding: 'https://www.ryanatkn.com/funding', + scripts: { + start: 'gro dev', + dev: 'gro dev', + build: 'gro build', + check: 'gro check', + test: 'gro test', + preview: 'vite preview', + deploy: 'gro deploy', + }, + type: 'module', + engines: { + node: '>=22.15', + }, + peerDependencies: { + '@ryanatkn/belt': '>=0.40.0', + '@ryanatkn/fuz': '>=0.165.0', + '@ryanatkn/gro': '>=0.179.0', + '@ryanatkn/moss': '>=0.39.0', + '@sveltejs/kit': '^2', + svelte: '^5', + zod: '^4.1.13', + }, + devDependencies: { + '@changesets/changelog-git': '^0.2.1', + '@ryanatkn/belt': '^0.40.0', + '@ryanatkn/eslint-config': '^0.9.0', + '@ryanatkn/fuz': '^0.165.0', + '@ryanatkn/fuz_code': '^0.36.0', + '@ryanatkn/gro': '^0.179.0', + '@ryanatkn/moss': '^0.39.0', + '@sveltejs/adapter-static': '^3.0.10', + '@sveltejs/kit': '^2.49.0', + '@sveltejs/package': '^2.5.6', + '@sveltejs/vite-plugin-svelte': '^6.2.1', + '@types/node': '^24.10.1', + eslint: '^9.39.1', + 'eslint-plugin-svelte': '^3.13.0', + prettier: '^3.6.2', + 'prettier-plugin-svelte': '^3.4.0', + svelte: '^5.44.1', + 'svelte-check': '^4.3.4', + tslib: '^2.8.1', + typescript: '^5.9.3', + 'typescript-eslint': '^8.48.0', + vitest: '^4.0.14', + }, + prettier: { + plugins: ['prettier-plugin-svelte'], + useTabs: true, + printWidth: 100, + singleQuote: true, + bracketSpacing: false, + overrides: [ + { + files: 'package.json', + options: { + useTabs: false, + }, + }, + ], + }, + sideEffects: ['**/*.css'], + files: ['dist', 'src/lib/**/*.ts', '!src/lib/**/*.test.*', '!dist/**/*.test.*'], + exports: { + './package.json': './package.json', + './*.js': { + types: './dist/*.d.ts', + default: './dist/*.js', + }, + './*.ts': { + types: './dist/*.d.ts', + default: './dist/*.js', + }, + './*.svelte': { + types: './dist/*.svelte.d.ts', + svelte: './dist/*.svelte', + default: './dist/*.svelte', + }, + }, + }, + source_json: { + name: '@ryanatkn/fuz_gitops', + version: '0.54.0', + modules: [ + { + path: 'changeset_generator.ts', + declarations: [ + { + name: 'DependencyVersionChange', + kind: 'type', + source_line: 16, + type_signature: 'DependencyVersionChange', + properties: [ + { + name: 'package_name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'from_version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'to_version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'bump_type', + kind: 'variable', + type_signature: "'major' | 'minor' | 'patch'", + }, + { + name: 'breaking', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'create_changeset_for_dependency_updates', + kind: 'function', + doc_comment: + 'Creates a changeset file for dependency updates.\nReturns the path to the created changeset file.', + source_line: 28, + type_signature: + '(repo: LocalRepo, updates: DependencyVersionChange[], log?: Logger | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'repo', + type: 'LocalRepo', + optional: false, + }, + { + name: 'updates', + type: 'DependencyVersionChange[]', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'generate_changeset_content', + kind: 'function', + doc_comment: + 'Generates markdown changeset content for dependency updates.\n\nCreates properly formatted changeset with YAML frontmatter, summary,\nand categorized list of breaking vs regular updates. Output format\nmatches changesets CLI for consistency.', + source_line: 94, + type_signature: + '(package_name: string, updates: DependencyVersionChange[], bump_type: "major" | "minor" | "patch"): string', + return_type: 'string', + return_description: 'markdown content ready to write to .changeset/*.md file', + parameters: [ + { + name: 'package_name', + type: 'string', + optional: false, + description: 'package receiving the dependency updates', + }, + { + name: 'updates', + type: 'DependencyVersionChange[]', + optional: false, + description: 'list of dependency changes with version info', + }, + { + name: 'bump_type', + type: '"major" | "minor" | "patch"', + optional: false, + description: 'required bump type (calculated from breaking changes)', + }, + ], + }, + { + name: 'create_dependency_updates', + kind: 'function', + source_line: 138, + type_signature: + '(dependencies: Map, published_versions: Map): DependencyVersionChange[]', + return_type: 'DependencyVersionChange[]', + parameters: [ + { + name: 'dependencies', + type: 'Map', + optional: false, + }, + { + name: 'published_versions', + type: 'Map', + optional: false, + }, + ], + }, + ], + module_comment: + 'Auto-generation of changesets for dependency updates during publishing.\n\nCreates changesets when packages need to republish due to updated dependencies.\nFor parsing existing changesets, see `changeset_reader.ts`.', + dependencies: ['version_utils.ts'], + dependents: ['dependency_updater.ts'], + }, + { + path: 'changeset_reader.ts', + declarations: [ + { + name: 'ChangesetInfo', + kind: 'type', + source_line: 17, + type_signature: 'ChangesetInfo', + properties: [ + { + name: 'filename', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'packages', + kind: 'variable', + type_signature: 'Array<{name: string; bump_type: BumpType}>', + }, + { + name: 'summary', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'parse_changeset_content', + kind: 'function', + doc_comment: + 'Parses changeset content string from markdown format.\n\nPure function for testability - no file I/O, just string parsing.\nExtracts package names, bump types, and summary from YAML frontmatter format.\nReturns null if format is invalid or no packages found.\n\nExpected format:\n---\n"package-name": patch\n"@scope/package": minor\n---\n\nSummary of changes', + source_line: 42, + type_signature: '(content: string, filename?: string): ChangesetInfo | null', + return_type: 'ChangesetInfo | null', + return_description: 'parsed changeset info or null if invalid format', + parameters: [ + { + name: 'content', + type: 'string', + optional: false, + description: 'changeset markdown with YAML frontmatter', + }, + { + name: 'filename', + type: 'string', + optional: false, + description: 'optional filename for error reporting context', + default_value: "'changeset.md'", + }, + ], + }, + { + name: 'parse_changeset_file', + kind: 'function', + source_line: 82, + type_signature: + '(filepath: string, log?: Logger | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'filepath', + type: 'string', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'read_changesets', + kind: 'function', + source_line: 103, + type_signature: + '(repo: LocalRepo, log?: Logger | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'repo', + type: 'LocalRepo', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'determine_bump_from_changesets', + kind: 'function', + doc_comment: + 'Determines the bump type for a package from its changesets.\n\nWhen multiple changesets exist for the same package, returns the highest\nbump type (major > minor > patch) to ensure the most significant change\nis reflected in the version bump.', + source_line: 139, + type_signature: + '(changesets: ChangesetInfo[], package_name: string): BumpType | null', + return_type: 'BumpType | null', + return_description: 'the highest bump type, or null if package has no changesets', + parameters: [ + { + name: 'changesets', + type: 'ChangesetInfo[]', + optional: false, + }, + { + name: 'package_name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'has_changesets', + kind: 'function', + doc_comment: + "Checks if a repo has any changeset files (excluding README.md).\n\nUsed by preflight checks and publishing workflow to determine which packages\nneed to be published. Returns false if .changeset directory doesn't exist\nor contains only README.md.", + source_line: 167, + type_signature: '(repo: LocalRepo): Promise', + return_type: 'Promise', + return_description: 'true if repo has unpublished changesets', + parameters: [ + { + name: 'repo', + type: 'LocalRepo', + optional: false, + }, + ], + }, + { + name: 'predict_next_version', + kind: 'function', + doc_comment: + 'Predicts the next version by analyzing all changesets in a repo.\n\nReads all changesets, determines the highest bump type for the package,\nand calculates the next version. Returns null if no changesets found.\n\nCritical for dry-run mode accuracy - allows simulating publishes without\nactually running `gro publish` which consumes changesets.', + source_line: 193, + type_signature: + '(repo: LocalRepo, log?: Logger | undefined): Promise<{ version: string; bump_type: BumpType; } | null>', + return_type: 'Promise<{ version: string; bump_type: BumpType; } | null>', + return_description: 'predicted version and bump type, or null if no changesets', + parameters: [ + { + name: 'repo', + type: 'LocalRepo', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + ], + module_comment: + 'Changeset parsing and version prediction from `.changeset/*.md` files.\n\nReads changesets to determine which packages need publishing and their version bumps.\nFor auto-generating changesets during publishing, see `changeset_generator.ts`.', + dependencies: ['version_utils.ts'], + dependents: ['operations_defaults.ts'], + }, + { + path: 'constants.ts', + declarations: [ + { + name: 'MAX_ITERATIONS', + kind: 'variable', + doc_comment: + 'Maximum number of iterations for fixed-point iteration during publishing.\nUsed in both plan generation and actual publishing to resolve transitive dependency cascades.\n\nIn practice, most repos converge in 2-3 iterations.\nDeep dependency chains may require more iterations.', + source_line: 8, + type_signature: '10', + }, + ], + dependents: ['multi_repo_publisher.ts', 'publishing_plan.ts'], + }, + { + path: 'dependency_graph.ts', + declarations: [ + { + name: 'DEPENDENCY_TYPE', + kind: 'variable', + source_line: 11, + type_signature: + '{ readonly PROD: "prod"; readonly PEER: "peer"; readonly DEV: "dev"; }', + }, + { + name: 'DependencyType', + kind: 'type', + source_line: 17, + type_signature: 'DependencyType', + }, + { + name: 'DependencySpec', + kind: 'type', + source_line: 19, + type_signature: 'DependencySpec', + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: 'DependencyType', + }, + { + name: 'version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'resolved', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'DependencyGraphJson', + kind: 'type', + source_line: 25, + type_signature: 'DependencyGraphJson', + properties: [ + { + name: 'nodes', + kind: 'variable', + type_signature: + 'Array<{\n\t\tname: string;\n\t\tversion: string;\n\t\tdependencies: Array<{name: string; spec: DependencySpec}>;\n\t\tdependents: Array;\n\t\tpublishable: boolean;\n\t}>', + }, + { + name: 'edges', + kind: 'variable', + type_signature: 'Array<{from: string; to: string}>', + }, + ], + }, + { + name: 'DependencyNode', + kind: 'type', + source_line: 36, + type_signature: 'DependencyNode', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo', + kind: 'variable', + type_signature: 'LocalRepo', + }, + { + name: 'dependencies', + kind: 'variable', + type_signature: 'Map', + }, + { + name: 'dependents', + kind: 'variable', + type_signature: 'Set', + }, + { + name: 'publishable', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'DependencyGraph', + kind: 'class', + source_line: 45, + members: [ + { + name: 'nodes', + kind: 'variable', + type_signature: 'Map', + }, + { + name: 'edges', + kind: 'variable', + type_signature: 'Map>', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: '(): DependencyGraph', + parameters: [], + }, + { + name: 'init_from_repos', + kind: 'function', + modifiers: ['public'], + type_signature: '(repos: LocalRepo[]): void', + return_type: 'void', + parameters: [ + { + name: 'repos', + type: 'LocalRepo[]', + optional: false, + }, + ], + }, + { + name: 'get_node', + kind: 'function', + type_signature: '(name: string): DependencyNode | undefined', + return_type: 'DependencyNode | undefined', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'get_dependents', + kind: 'function', + type_signature: '(name: string): Set', + return_type: 'Set', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'get_dependencies', + kind: 'function', + type_signature: '(name: string): Map', + return_type: 'Map', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'topological_sort', + kind: 'function', + doc_comment: + "Computes topological sort order for dependency graph.\n\nUses Kahn's algorithm with alphabetical ordering within tiers for\ndeterministic results. Throws if cycles detected.", + type_signature: '(exclude_dev?: boolean): string[]', + return_type: 'string[]', + return_description: + 'array of package names in dependency order (dependencies before dependents)', + parameters: [ + { + name: 'exclude_dev', + type: 'boolean', + optional: false, + description: + 'if true, excludes dev dependencies to break cycles.\nPublishing uses exclude_dev=true to handle circular dev deps.', + default_value: 'false', + }, + ], + throws: [ + { + type: 'if', + description: 'circular dependencies detected in included dependency types', + }, + ], + }, + { + name: 'detect_cycles', + kind: 'function', + type_signature: '(): string[][]', + return_type: 'string[][]', + parameters: [], + }, + { + name: 'detect_cycles_by_type', + kind: 'function', + doc_comment: + 'Detects circular dependencies, categorized by severity.\n\nProduction/peer cycles prevent publishing (impossible to order packages).\nDev cycles are normal (test utils, shared configs) and safely ignored.\n\nUses DFS traversal with recursion stack to identify back edges.\nDeduplicates cycles using sorted cycle keys.', + type_signature: + '(): { production_cycles: string[][]; dev_cycles: string[][]; }', + return_type: '{ production_cycles: string[][]; dev_cycles: string[][]; }', + return_description: + 'object with production_cycles (errors) and dev_cycles (info)', + parameters: [], + }, + { + name: 'toJSON', + kind: 'function', + type_signature: '(): DependencyGraphJson', + return_type: 'DependencyGraphJson', + parameters: [], + }, + ], + }, + { + name: 'DependencyGraphBuilder', + kind: 'class', + doc_comment: 'Builder for creating and analyzing dependency graphs.', + source_line: 369, + members: [ + { + name: 'build_from_repos', + kind: 'function', + doc_comment: + 'Constructs dependency graph from local repos.\n\nTwo-pass algorithm: first creates nodes, then builds edges (dependents).\nPrioritizes prod/peer deps over dev deps when same package appears in\nmultiple dependency types (stronger constraint wins).', + type_signature: '(repos: LocalRepo[]): DependencyGraph', + return_type: 'DependencyGraph', + return_description: + 'fully initialized dependency graph with all nodes and edges', + parameters: [ + { + name: 'repos', + type: 'LocalRepo[]', + optional: false, + }, + ], + }, + { + name: 'compute_publishing_order', + kind: 'function', + doc_comment: + 'Computes publishing order using topological sort with dev deps excluded.\n\nExcludes dev dependencies to break circular dev dependency cycles while\npreserving production/peer dependency ordering. This allows patterns like\nshared test utilities that depend on each other for development.', + type_signature: '(graph: DependencyGraph): string[]', + return_type: 'string[]', + return_description: + 'package names in safe publishing order (dependencies before dependents)', + parameters: [ + { + name: 'graph', + type: 'DependencyGraph', + optional: false, + }, + ], + throws: [ + { + type: 'if', + description: + 'production/peer cycles detected (cannot be resolved by exclusion)', + }, + ], + }, + { + name: 'analyze', + kind: 'function', + type_signature: + '(graph: DependencyGraph): { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + return_type: + '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + parameters: [ + { + name: 'graph', + type: 'DependencyGraph', + optional: false, + }, + ], + }, + ], + }, + ], + module_comment: + 'Dependency graph data structure and algorithms for multi-repo publishing.\n\nProvides `DependencyGraph` class with topological sort and cycle detection.\nFor validation workflow and publishing order computation, see `graph_validation.ts`.', + dependents: [ + 'gitops_analyze.task.ts', + 'gitops_validate.task.ts', + 'graph_validation.ts', + ], + }, + { + path: 'dependency_updater.ts', + declarations: [ + { + name: 'VersionStrategy', + kind: 'type', + source_line: 14, + type_signature: 'VersionStrategy', + }, + { + name: 'update_package_json', + kind: 'function', + doc_comment: + 'Updates package.json dependencies and creates changeset if needed.\n\nWorkflow:\n1. Updates all dependency types (dependencies, devDependencies, peerDependencies)\n2. Writes updated package.json with tabs formatting\n3. Creates auto-changeset if published_versions provided (for transitive updates)\n4. Commits both package.json and changeset with standard message\n\nUses version strategy to determine prefix (exact, caret, tilde) while preserving\nexisting prefixes when possible.', + throws: [ + { + type: 'if', + description: 'file operations or git operations fail', + }, + ], + source_line: 32, + type_signature: + '(repo: LocalRepo, updates: Map, strategy?: VersionStrategy, published_versions?: Map | undefined, log?: Logger | undefined, git_ops?: GitOperations, fs_ops?: FsOperations): Promise<...>', + return_type: 'Promise', + parameters: [ + { + name: 'repo', + type: 'LocalRepo', + optional: false, + }, + { + name: 'updates', + type: 'Map', + optional: false, + }, + { + name: 'strategy', + type: 'VersionStrategy', + optional: false, + description: 'how to format version ranges (default: caret)', + default_value: "'caret'", + }, + { + name: 'published_versions', + type: 'Map | undefined', + optional: true, + description: 'if provided, generates auto-changesets for updates', + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'git_ops', + type: 'GitOperations', + optional: false, + default_value: 'default_git_operations', + }, + { + name: 'fs_ops', + type: 'FsOperations', + optional: false, + default_value: 'default_fs_operations', + }, + ], + }, + { + name: 'update_all_repos', + kind: 'function', + source_line: 165, + type_signature: + '(repos: LocalRepo[], published: Map, strategy?: VersionStrategy, log?: Logger | undefined, git_ops?: GitOperations, fs_ops?: FsOperations): Promise<...>', + return_type: + 'Promise<{ updated: number; failed: { repo: string; error: Error; }[]; }>', + parameters: [ + { + name: 'repos', + type: 'LocalRepo[]', + optional: false, + }, + { + name: 'published', + type: 'Map', + optional: false, + }, + { + name: 'strategy', + type: 'VersionStrategy', + optional: false, + default_value: "'caret'", + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'git_ops', + type: 'GitOperations', + optional: false, + default_value: 'default_git_operations', + }, + { + name: 'fs_ops', + type: 'FsOperations', + optional: false, + default_value: 'default_fs_operations', + }, + ], + }, + { + name: 'find_updates_needed', + kind: 'function', + source_line: 223, + type_signature: + '(repo: LocalRepo, published: Map): Map', + return_type: + 'Map', + parameters: [ + { + name: 'repo', + type: 'LocalRepo', + optional: false, + }, + { + name: 'published', + type: 'Map', + optional: false, + }, + ], + }, + ], + dependencies: ['changeset_generator.ts', 'operations_defaults.ts', 'version_utils.ts'], + dependents: ['multi_repo_publisher.ts'], + }, + { + path: 'fetch_repo_data.ts', + declarations: [ + { + name: 'fetch_repo_data', + kind: 'function', + doc_comment: + 'Fetches GitHub metadata (CI status, PRs) for all repos.\n\nFetches sequentially with delay between requests to respect GitHub API rate limits.\nUses `await_in_loop` intentionally to avoid parallel requests overwhelming the API.\n\nError handling: Logs fetch failures but continues processing remaining repos.\nRepos with failed fetches will have `null` for check_runs or pull_requests.', + source_line: 24, + type_signature: + '(resolved_repos: LocalRepo[], token?: string | undefined, cache?: Map | undefined, log?: Logger | undefined, delay?: number, github_api_version?: string | undefined): Promise<...>', + return_type: 'Promise', + return_description: 'array of Repo objects with GitHub metadata attached', + parameters: [ + { + name: 'resolved_repos', + type: 'LocalRepo[]', + optional: false, + }, + { + name: 'token', + type: 'string | undefined', + optional: true, + }, + { + name: 'cache', + type: 'Map | undefined', + optional: true, + description: "optional cache from belt's fetch.js for response memoization", + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'delay', + type: 'number', + optional: false, + description: 'milliseconds between API requests (default: 33ms)', + default_value: '33', + }, + { + name: 'github_api_version', + type: 'string | undefined', + optional: true, + }, + ], + }, + ], + dependencies: ['github.ts'], + dependents: ['gitops_sync.task.ts'], + }, + { + path: 'fs_fetch_value_cache.ts', + declarations: [ + { + name: 'FetchCache', + kind: 'type', + source_line: 10, + type_signature: 'FetchCache', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'data', + kind: 'variable', + type_signature: 'FetchValueCache', + }, + { + name: 'save', + kind: 'variable', + type_signature: '() => Promise', + doc_comment: '', + }, + ], + }, + { + name: 'create_fs_fetch_value_cache', + kind: 'function', + doc_comment: + "Creates file-system backed cache for belt's fetch.js API responses.\n\nCache invalidation strategy: If cache file can't be read or parsed, entire\ncache is cleared (delete file) and starts fresh. This handles format changes.\n\nUses `structuredClone` to track changes - only writes to disk if data modified.\nFormatted with Prettier before writing for version control friendliness.", + source_line: 32, + type_signature: '(name: string, dir?: string): Promise', + return_type: 'Promise', + return_description: 'cache object with Map-based data and save() method', + parameters: [ + { + name: 'name', + type: 'string', + optional: false, + description: 'cache filename (without .json extension)', + }, + { + name: 'dir', + type: 'string', + optional: false, + description: 'cache directory (defaults to `.gro/build/fetch/`)', + default_value: "join(paths.build, 'fetch')", + }, + ], + }, + ], + dependents: ['gitops_sync.task.ts'], + }, + { + path: 'git_operations.ts', + declarations: [ + { + name: 'git_add', + kind: 'function', + doc_comment: 'Adds files to git staging area and throws if anything goes wrong.', + source_line: 16, + type_signature: + '(files: string | string[], options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'files', + type: 'string | string[]', + optional: false, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_commit', + kind: 'function', + doc_comment: + 'Commits staged changes with a message and throws if anything goes wrong.', + source_line: 30, + type_signature: + '(message: string, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'message', + type: 'string', + optional: false, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_add_and_commit', + kind: 'function', + doc_comment: + 'Adds files and commits in one operation and throws if anything goes wrong.', + source_line: 40, + type_signature: + '(files: string | string[], message: string, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'files', + type: 'string | string[]', + optional: false, + }, + { + name: 'message', + type: 'string', + optional: false, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_tag', + kind: 'function', + doc_comment: 'Creates a git tag and throws if anything goes wrong.', + source_line: 52, + type_signature: + '(tag_name: string, message?: string | undefined, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'tag_name', + type: 'string', + optional: false, + }, + { + name: 'message', + type: 'string | undefined', + optional: true, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_push_tag', + kind: 'function', + doc_comment: 'Pushes a tag to origin and throws if anything goes wrong.', + source_line: 68, + type_signature: + '(tag_name: string, origin?: GitOrigin, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'tag_name', + type: 'string', + optional: false, + }, + { + name: 'origin', + type: 'GitOrigin', + optional: false, + default_value: "'origin' as GitOrigin", + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_has_changes', + kind: 'function', + source_line: 79, + type_signature: '(options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_get_changed_files', + kind: 'function', + doc_comment: 'Returns list of changed files compared to HEAD.', + source_line: 87, + type_signature: '(options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_has_file_changed', + kind: 'function', + source_line: 97, + type_signature: + '(from_commit: string, to_commit: string, file_path: string, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'from_commit', + type: 'string', + optional: false, + }, + { + name: 'to_commit', + type: 'string', + optional: false, + }, + { + name: 'file_path', + type: 'string', + optional: false, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_stash', + kind: 'function', + doc_comment: 'Stashes current changes and throws if anything goes wrong.', + source_line: 114, + type_signature: + '(message?: string | undefined, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'message', + type: 'string | undefined', + optional: true, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_stash_pop', + kind: 'function', + doc_comment: 'Applies stashed changes and throws if anything goes wrong.', + source_line: 126, + type_signature: '(options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_switch_branch', + kind: 'function', + doc_comment: + 'Switches to a branch with safety checks and throws if workspace is not clean.', + source_line: 136, + type_signature: + '(branch: GitBranch, pull?: boolean, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'branch', + type: 'GitBranch', + optional: false, + }, + { + name: 'pull', + type: 'boolean', + optional: false, + default_value: 'true', + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_current_branch_name_required', + kind: 'function', + doc_comment: "Wrapper for gro's git_current_branch_name that throws if null.", + source_line: 165, + type_signature: '(options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_current_commit_hash_required', + kind: 'function', + doc_comment: "Wrapper for gro's git_current_commit_hash that throws if null.", + source_line: 176, + type_signature: + '(branch?: string | undefined, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'branch', + type: 'string | undefined', + optional: true, + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_check_clean_workspace_as_boolean', + kind: 'function', + doc_comment: "Wrapper for gro's git_check_clean_workspace that returns a boolean.", + source_line: 190, + type_signature: '(options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'git_has_remote', + kind: 'function', + source_line: 197, + type_signature: + '(remote?: string, options?: SpawnOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'remote', + type: 'string', + optional: false, + default_value: "'origin'", + }, + { + name: 'options', + type: 'SpawnOptions | undefined', + optional: true, + }, + ], + }, + ], + dependents: ['operations_defaults.ts'], + }, + { + path: 'github_helpers.ts', + declarations: [ + { + name: 'FilterPullRequest', + kind: 'type', + source_line: 6, + type_signature: 'FilterPullRequest', + }, + { + name: 'PullRequestMeta', + kind: 'type', + source_line: 8, + type_signature: 'PullRequestMeta', + properties: [ + { + name: 'repo', + kind: 'variable', + type_signature: 'Repo', + }, + { + name: 'pull_request', + kind: 'variable', + type_signature: 'GithubPullRequest', + }, + ], + }, + { + name: 'to_pull_requests', + kind: 'function', + source_line: 13, + type_signature: + '(repos: Repo[], filter_pull_request?: FilterPullRequest | undefined): PullRequestMeta[]', + return_type: 'PullRequestMeta[]', + parameters: [ + { + name: 'repos', + type: 'Repo[]', + optional: false, + }, + { + name: 'filter_pull_request', + type: 'FilterPullRequest | undefined', + optional: true, + }, + ], + }, + { + name: 'to_pull_url', + kind: 'function', + source_line: 30, + type_signature: + '(repo_url: string, pull: { number: number; title: string; user: { login: string; }; draft: boolean; }): string', + return_type: 'string', + parameters: [ + { + name: 'repo_url', + type: 'string', + optional: false, + }, + { + name: 'pull', + type: '{ number: number; title: string; user: { login: string; }; draft: boolean; }', + optional: false, + }, + ], + }, + ], + dependents: ['PullRequestsDetail.svelte', 'ReposTable.svelte'], + }, + { + path: 'github.ts', + declarations: [ + { + name: 'GithubRepoInfo', + kind: 'type', + doc_comment: + 'Minimal interface for GitHub API calls - works with both Pkg and Repo.', + source_line: 8, + type_signature: 'GithubRepoInfo', + properties: [ + { + name: 'owner_name', + kind: 'variable', + type_signature: 'string | null', + }, + { + name: 'repo_name', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'GithubPullRequest', + kind: 'type', + doc_comment: '', + see_also: [ + 'https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests', + ], + source_line: 16, + type_signature: + 'ZodObject<{ number: ZodNumber; title: ZodString; user: ZodObject<{ login: ZodString; }, $strip>; draft: ZodBoolean; }, $strip>', + }, + { + name: 'GithubPullRequests', + kind: 'type', + source_line: 25, + type_signature: + 'ZodArray; draft: ZodBoolean; }, $strip>>', + }, + { + name: 'fetch_github_pull_requests', + kind: 'function', + doc_comment: '', + see_also: [ + 'https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests', + ], + source_line: 31, + type_signature: + '(repo_info: GithubRepoInfo, cache?: Map | undefined, log?: Logger | undefined, token?: string | undefined, api_version?: string | undefined): Promise<...>', + return_type: + 'Promise<{ number: number; title: string; user: { login: string; }; draft: boolean; }[] | null>', + parameters: [ + { + name: 'repo_info', + type: 'GithubRepoInfo', + optional: false, + }, + { + name: 'cache', + type: 'Map | undefined', + optional: true, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'token', + type: 'string | undefined', + optional: true, + }, + { + name: 'api_version', + type: 'string | undefined', + optional: true, + }, + ], + }, + { + name: 'GithubCheckRunsItem', + kind: 'type', + doc_comment: '', + see_also: [ + 'https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#list-check-runs-for-a-git-reference', + ], + source_line: 63, + type_signature: + 'ZodObject<{ status: ZodEnum<{ queued: "queued"; in_progress: "in_progress"; completed: "completed"; }>; conclusion: ZodNullable>; }, $strip>', + }, + { + name: 'GithubCheckRuns', + kind: 'type', + source_line: 70, + type_signature: + 'ZodObject<{ total_count: ZodNumber; check_runs: ZodArray; conclusion: ZodNullable>; }, $strip>>; }, $strip>', + }, + { + name: 'fetch_github_check_runs', + kind: 'function', + doc_comment: '', + see_also: [ + 'https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#list-check-runs-for-a-git-reference', + ], + source_line: 79, + type_signature: + '(repo_info: GithubRepoInfo, cache?: Map | undefined, log?: Logger | undefined, token?: string | undefined, api_version?: string | undefined, ref?: string): Promise<...>', + return_type: + 'Promise<{ status: "queued" | "in_progress" | "completed"; conclusion: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | null; } | null>', + parameters: [ + { + name: 'repo_info', + type: 'GithubRepoInfo', + optional: false, + }, + { + name: 'cache', + type: 'Map | undefined', + optional: true, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'token', + type: 'string | undefined', + optional: true, + }, + { + name: 'api_version', + type: 'string | undefined', + optional: true, + }, + { + name: 'ref', + type: 'string', + optional: false, + default_value: "'main'", + }, + ], + }, + ], + dependents: ['fetch_repo_data.ts', 'repo.svelte.ts'], + }, + { + path: 'gitops_analyze.task.ts', + declarations: [], + dependencies: [ + 'dependency_graph.ts', + 'gitops_task_helpers.ts', + 'graph_validation.ts', + 'log_helpers.ts', + 'output_helpers.ts', + ], + }, + { + path: 'gitops_config.ts', + declarations: [ + { + name: 'GitopsConfig', + kind: 'type', + source_line: 19, + type_signature: 'GitopsConfig', + properties: [ + { + name: 'repos', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'repos_dir', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'CreateGitopsConfig', + kind: 'type', + source_line: 24, + type_signature: 'CreateGitopsConfig', + }, + { + name: 'RawGitopsConfig', + kind: 'type', + source_line: 28, + type_signature: 'RawGitopsConfig', + properties: [ + { + name: 'repos', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'repos_dir', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'GitopsRepoConfig', + kind: 'type', + source_line: 33, + type_signature: 'GitopsRepoConfig', + properties: [ + { + name: 'repo_url', + kind: 'variable', + type_signature: 'Url', + doc_comment: 'The HTTPS URL to the repo. Does not include a `.git` suffix.', + }, + { + name: 'repo_dir', + kind: 'variable', + type_signature: 'string | null', + doc_comment: + "Relative or absolute path to the repo's local directory.\nIf `null`, the directory is inferred from the URL and cwd.", + }, + { + name: 'branch', + kind: 'variable', + type_signature: 'GitBranch', + doc_comment: + 'The branch name to use when fetching the repo. Defaults to `main`.', + }, + ], + }, + { + name: 'RawGitopsRepoConfig', + kind: 'type', + source_line: 54, + type_signature: 'RawGitopsRepoConfig', + properties: [ + { + name: 'repo_url', + kind: 'variable', + type_signature: 'Url', + }, + { + name: 'repo_dir', + kind: 'variable', + type_signature: 'string | null', + }, + { + name: 'branch', + kind: 'variable', + type_signature: 'GitBranch', + }, + ], + }, + { + name: 'create_empty_gitops_config', + kind: 'function', + source_line: 60, + type_signature: '(): GitopsConfig', + return_type: 'GitopsConfig', + parameters: [], + }, + { + name: 'normalize_gitops_config', + kind: 'function', + doc_comment: + 'Transforms a `RawGitopsConfig` to the more strict `GitopsConfig`.\nThis allows users to provide a more relaxed config.', + source_line: 69, + type_signature: '(raw_config: RawGitopsConfig): GitopsConfig', + return_type: 'GitopsConfig', + parameters: [ + { + name: 'raw_config', + type: 'RawGitopsConfig', + optional: false, + }, + ], + }, + { + name: 'GitopsConfigModule', + kind: 'type', + source_line: 92, + type_signature: 'GitopsConfigModule', + properties: [ + { + name: 'default', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'RawGitopsConfig | CreateGitopsConfig', + }, + ], + }, + { + name: 'load_gitops_config', + kind: 'function', + source_line: 96, + type_signature: '(config_path: string): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'config_path', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'validate_gitops_config_module', + kind: 'function', + source_line: 111, + type_signature: + '(config_module: any, config_path: string): asserts config_module is GitopsConfigModule', + return_type: 'void', + parameters: [ + { + name: 'config_module', + type: 'any', + optional: false, + }, + { + name: 'config_path', + type: 'string', + optional: false, + }, + ], + }, + ], + module_comment: + 'Configuration types and normalization for gitops multi-repo management.\n\nTwo-phase configuration system:\n- `RawGitopsConfig` - User-friendly format with optional fields and flexible types\n- `GitopsConfig` - Internal format with required fields and strict types\n\nThis allows users to provide minimal configs (e.g., just URLs as strings) while\nthe system works with normalized configs internally for type safety.', + dependencies: ['paths.ts'], + dependents: ['gitops_task_helpers.ts', 'repo_ops.ts'], + }, + { + path: 'gitops_plan.task.ts', + declarations: [], + dependencies: ['gitops_task_helpers.ts', 'output_helpers.ts', 'publishing_plan.ts'], + }, + { + path: 'gitops_publish.task.ts', + declarations: [], + dependencies: [ + 'gitops_task_helpers.ts', + 'multi_repo_publisher.ts', + 'output_helpers.ts', + 'publishing_plan.ts', + ], + }, + { + path: 'gitops_sync.task.ts', + declarations: [], + dependencies: [ + 'fetch_repo_data.ts', + 'fs_fetch_value_cache.ts', + 'gitops_task_helpers.ts', + ], + }, + { + path: 'gitops_task_helpers.ts', + declarations: [ + { + name: 'GetGitopsReadyOptions', + kind: 'type', + source_line: 29, + type_signature: 'GetGitopsReadyOptions', + properties: [ + { + name: 'path', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'dir', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'download', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'log', + kind: 'variable', + type_signature: 'Logger', + }, + { + name: 'git_ops', + kind: 'variable', + type_signature: 'GitOperations', + }, + { + name: 'npm_ops', + kind: 'variable', + type_signature: 'NpmOperations', + }, + ], + }, + { + name: 'get_gitops_ready', + kind: 'function', + doc_comment: + 'Central initialization function for all gitops tasks.\n\nInitialization sequence:\n1. Loads and normalizes config from `gitops.config.ts`\n2. Resolves local repo paths (creates missing with `--download`)\n3. Switches branches and pulls latest changes\n4. Auto-installs deps if package.json changed during pull\n\nPriority for path resolution:\n- `dir` argument (explicit override)\n- Config `repos_dir` setting\n- `DEFAULT_REPOS_DIR` constant', + throws: [ + { + type: 'if', + description: 'config loading or repo resolution fails', + }, + ], + source_line: 57, + type_signature: + '(options: GetGitopsReadyOptions): Promise<{ config_path: string; repos_dir: string; gitops_config: GitopsConfig; local_repos: LocalRepo[]; }>', + return_type: + 'Promise<{ config_path: string; repos_dir: string; gitops_config: GitopsConfig; local_repos: LocalRepo[]; }>', + return_description: + 'initialized config and fully loaded repos ready for operations', + parameters: [ + { + name: 'options', + type: 'GetGitopsReadyOptions', + optional: false, + }, + ], + }, + { + name: 'ResolveGitopsPathsOptions', + kind: 'type', + source_line: 96, + type_signature: 'ResolveGitopsPathsOptions', + properties: [ + { + name: 'path', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'dir', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'config_repos_dir', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'resolve_gitops_paths', + kind: 'function', + source_line: 102, + type_signature: + '(options: ResolveGitopsPathsOptions): { config_path: string; repos_dir: string; }', + return_type: '{ config_path: string; repos_dir: string; }', + parameters: [ + { + name: 'options', + type: 'ResolveGitopsPathsOptions', + optional: false, + }, + ], + }, + { + name: 'import_gitops_config', + kind: 'function', + source_line: 120, + type_signature: '(config_path: string): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'config_path', + type: 'string', + optional: false, + }, + ], + }, + ], + module_comment: + 'Shared initialization logic for all gitops tasks.\n\nProvides `get_gitops_ready()` which orchestrates:\n- Config loading and normalization\n- Repo resolution (local path discovery)\n- Branch switching and syncing\n- Dependency installation\n\nUsed by: `gitops_sync.task.ts`, `gitops_analyze.task.ts`, `gitops_plan.task.ts`,\n`gitops_publish.task.ts`, and `gitops_validate.task.ts`.\n\nAccepts `git_ops` and `npm_ops` parameters to support testing via operations pattern\n(see `operations.ts` for dependency injection details).', + dependencies: [ + 'gitops_config.ts', + 'local_repo.ts', + 'paths.ts', + 'resolved_gitops_config.ts', + ], + dependents: [ + 'gitops_analyze.task.ts', + 'gitops_plan.task.ts', + 'gitops_publish.task.ts', + 'gitops_sync.task.ts', + 'gitops_validate.task.ts', + ], + }, + { + path: 'gitops_validate.task.ts', + declarations: [], + dependencies: [ + 'dependency_graph.ts', + 'gitops_task_helpers.ts', + 'graph_validation.ts', + 'log_helpers.ts', + 'multi_repo_publisher.ts', + 'publishing_plan.ts', + ], + }, + { + path: 'graph_validation.ts', + declarations: [ + { + name: 'GraphValidationResult', + kind: 'type', + source_line: 21, + type_signature: 'GraphValidationResult', + properties: [ + { + name: 'graph', + kind: 'variable', + type_signature: 'DependencyGraph', + }, + { + name: 'publishing_order', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'production_cycles', + kind: 'variable', + type_signature: 'Array>', + }, + { + name: 'dev_cycles', + kind: 'variable', + type_signature: 'Array>', + }, + { + name: 'sort_error', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'validate_dependency_graph', + kind: 'function', + doc_comment: + 'Shared utility for building dependency graph, detecting cycles, and computing publishing order.\nThis centralizes logic that was duplicated across multi_repo_publisher, publishing_plan, and gitops_analyze.', + throws: [ + { + type: 'if', + description: 'production cycles detected and throw_on_prod_cycles is true', + }, + ], + source_line: 39, + type_signature: + '(repos: LocalRepo[], log?: Logger | undefined, options?: { throw_on_prod_cycles?: boolean | undefined; log_cycles?: boolean | undefined; log_order?: boolean | undefined; }): GraphValidationResult', + return_type: 'GraphValidationResult', + return_description: + 'graph validation result with graph, publishing order, and detected cycles', + parameters: [ + { + name: 'repos', + type: 'LocalRepo[]', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'options', + type: '{ throw_on_prod_cycles?: boolean | undefined; log_cycles?: boolean | undefined; log_order?: boolean | undefined; }', + optional: false, + default_value: '{}', + }, + ], + }, + ], + module_comment: + 'Shared dependency graph validation logic used across multiple workflows.\n\nConsolidates graph building, cycle detection, and publishing order computation\nthat was duplicated in three places: `multi_repo_publisher.ts`, `publishing_plan.ts`,\nand `gitops_analyze.task.ts`.\n\nOptions pattern supports different behaviors: analyze can tolerate cycles for\nreporting, while publish must throw on production cycles.\n\nSee also: `dependency_graph.ts` for core graph data structure and algorithms.', + dependencies: ['dependency_graph.ts'], + dependents: [ + 'gitops_analyze.task.ts', + 'gitops_validate.task.ts', + 'multi_repo_publisher.ts', + 'publishing_plan.ts', + ], + }, + { + path: 'local_repo.ts', + declarations: [ + { + name: 'LocalRepo', + kind: 'type', + doc_comment: + 'Fully loaded local repo with Library and extracted dependency data.\nDoes not extend LocalRepoPath - Library is source of truth for name/repo_url/etc.', + source_line: 19, + type_signature: 'LocalRepo', + properties: [ + { + name: 'library', + kind: 'variable', + type_signature: 'Library', + }, + { + name: 'library_json', + kind: 'variable', + type_signature: 'LibraryJson', + }, + { + name: 'repo_dir', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_git_ssh_url', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_config', + kind: 'variable', + type_signature: 'GitopsRepoConfig', + }, + { + name: 'dependencies', + kind: 'variable', + type_signature: 'Map', + }, + { + name: 'dev_dependencies', + kind: 'variable', + type_signature: 'Map', + }, + { + name: 'peer_dependencies', + kind: 'variable', + type_signature: 'Map', + }, + ], + }, + { + name: 'LocalRepoPath', + kind: 'type', + doc_comment: + 'A repo that has been located on the filesystem (path exists).\nUsed before loading - just filesystem/git concerns.', + source_line: 34, + type_signature: 'LocalRepoPath', + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'local_repo_path'", + }, + { + name: 'repo_name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_dir', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_url', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_git_ssh_url', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_config', + kind: 'variable', + type_signature: 'GitopsRepoConfig', + }, + ], + }, + { + name: 'LocalRepoMissing', + kind: 'type', + doc_comment: 'A repo that is missing from the filesystem (needs cloning).', + source_line: 46, + type_signature: 'LocalRepoMissing', + properties: [ + { + name: 'type', + kind: 'variable', + type_signature: "'local_repo_missing'", + }, + { + name: 'repo_name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_url', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_git_ssh_url', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'repo_config', + kind: 'variable', + type_signature: 'GitopsRepoConfig', + }, + ], + }, + { + name: 'local_repo_load', + kind: 'function', + doc_comment: + 'Loads repo data with automatic syncing and dependency management.\n\nWorkflow:\n1. Records current commit hash (for detecting changes)\n2. Switches to target branch if needed (requires clean workspace)\n3. Pulls latest changes from remote (skipped for local-only repos)\n4. Validates workspace is clean after pull\n5. Auto-installs dependencies if package.json changed\n6. Imports library_json from src/routes/library.ts\n7. Creates Library and extracts dependency maps\n\nThis ensures repos are always in sync with their configured branch\nbefore being used by gitops commands.', + throws: [ + { + type: 'if', + description: + 'workspace dirty, branch switch fails, install fails, or library.ts missing', + }, + ], + source_line: 71, + type_signature: + '({ local_repo_path, log: _log, git_ops, npm_ops, }: { local_repo_path: LocalRepoPath; log?: Logger | undefined; git_ops?: GitOperations | undefined; npm_ops?: NpmOperations | undefined; }): Promise<...>', + return_type: 'Promise', + parameters: [ + { + name: '__0', + type: '{ local_repo_path: LocalRepoPath; log?: Logger | undefined; git_ops?: GitOperations | undefined; npm_ops?: NpmOperations | undefined; }', + optional: false, + }, + ], + }, + { + name: 'local_repos_ensure', + kind: 'function', + source_line: 228, + type_signature: + '({ resolved_config, repos_dir, gitops_config, download, log, npm_ops, }: { resolved_config: ResolvedGitopsConfig; repos_dir: string; gitops_config: GitopsConfig; download: boolean; log?: Logger | undefined; npm_ops?: NpmOperations | undefined; }): Promise<...>', + return_type: 'Promise', + parameters: [ + { + name: '__0', + type: '{ resolved_config: ResolvedGitopsConfig; repos_dir: string; gitops_config: GitopsConfig; download: boolean; log?: Logger | undefined; npm_ops?: NpmOperations | undefined; }', + optional: false, + }, + ], + }, + { + name: 'local_repos_load', + kind: 'function', + source_line: 278, + type_signature: + '({ local_repo_paths, log, git_ops, npm_ops, }: { local_repo_paths: LocalRepoPath[]; log?: Logger | undefined; git_ops?: GitOperations | undefined; npm_ops?: NpmOperations | undefined; }): Promise<...>', + return_type: 'Promise', + parameters: [ + { + name: '__0', + type: '{ local_repo_paths: LocalRepoPath[]; log?: Logger | undefined; git_ops?: GitOperations | undefined; npm_ops?: NpmOperations | undefined; }', + optional: false, + }, + ], + }, + { + name: 'local_repo_locate', + kind: 'function', + source_line: 296, + type_signature: + '({ repo_config, repos_dir, }: { repo_config: GitopsRepoConfig; repos_dir: string; }): LocalRepoPath | LocalRepoMissing', + return_type: 'LocalRepoPath | LocalRepoMissing', + parameters: [ + { + name: '__0', + type: '{ repo_config: GitopsRepoConfig; repos_dir: string; }', + optional: false, + }, + ], + }, + ], + dependencies: ['operations_defaults.ts'], + dependents: ['gitops_task_helpers.ts', 'resolved_gitops_config.ts'], + }, + { + path: 'log_helpers.ts', + declarations: [ + { + name: 'format_wildcard_dependencies', + kind: 'function', + doc_comment: + 'Formats wildcard dependencies as styled strings.\nReturns array of lines for inclusion in output.', + source_line: 10, + type_signature: + '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }): string[]', + return_type: 'string[]', + parameters: [ + { + name: 'analysis', + type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + optional: false, + }, + ], + }, + { + name: 'format_dev_cycles', + kind: 'function', + doc_comment: + 'Formats dev circular dependencies as styled strings.\nReturns array of lines for inclusion in output.', + source_line: 27, + type_signature: + '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }): string[]', + return_type: 'string[]', + parameters: [ + { + name: 'analysis', + type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + optional: false, + }, + ], + }, + { + name: 'format_production_cycles', + kind: 'function', + doc_comment: + 'Formats production/peer circular dependencies as styled strings.\nReturns array of lines for inclusion in output.', + source_line: 49, + type_signature: + '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }): string[]', + return_type: 'string[]', + parameters: [ + { + name: 'analysis', + type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + optional: false, + }, + ], + }, + { + name: 'log_wildcard_dependencies', + kind: 'function', + doc_comment: + 'Logs wildcard dependencies as warnings.\nWildcard dependencies require attention and should be reviewed.', + source_line: 71, + type_signature: + '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }, log: Logger, indent?: string): void', + return_type: 'void', + parameters: [ + { + name: 'analysis', + type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'indent', + type: 'string', + optional: false, + default_value: "''", + }, + ], + }, + { + name: 'log_dev_cycles', + kind: 'function', + doc_comment: + "Logs dev circular dependencies as info.\nDev cycles are normal and non-blocking, so they're informational, not warnings.", + source_line: 86, + type_signature: + '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }, log: Logger, indent?: string): void', + return_type: 'void', + parameters: [ + { + name: 'analysis', + type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'indent', + type: 'string', + optional: false, + default_value: "''", + }, + ], + }, + { + name: 'log_production_cycles', + kind: 'function', + doc_comment: + 'Logs production/peer circular dependencies as errors.\nProduction cycles block publishing and must be resolved.', + source_line: 101, + type_signature: + '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }, log: Logger, indent?: string): void', + return_type: 'void', + parameters: [ + { + name: 'analysis', + type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'indent', + type: 'string', + optional: false, + default_value: "''", + }, + ], + }, + { + name: 'log_dependency_analysis', + kind: 'function', + doc_comment: + 'Logs all dependency analysis results (wildcards, production cycles, dev cycles).\nConvenience function that calls all three logging functions in order.', + source_line: 116, + type_signature: + '(analysis: { production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }, log: Logger, indent?: string): void', + return_type: 'void', + parameters: [ + { + name: 'analysis', + type: '{ production_cycles: string[][]; dev_cycles: string[][]; wildcard_deps: { pkg: string; dep: string; version: string; }[]; missing_peers: { pkg: string; dep: string; }[]; }', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'indent', + type: 'string', + optional: false, + default_value: "''", + }, + ], + }, + { + name: 'log_list', + kind: 'function', + doc_comment: + 'Logs a simple bulleted list with a header.\nCommon pattern for warnings, info messages, and other lists.', + source_line: 130, + type_signature: + '(items: string[], header: string, color: "cyan" | "yellow" | "red" | "dim", log: Logger, log_method?: "info" | "warn" | "error"): void', + return_type: 'void', + parameters: [ + { + name: 'items', + type: 'string[]', + optional: false, + }, + { + name: 'header', + type: 'string', + optional: false, + }, + { + name: 'color', + type: '"cyan" | "yellow" | "red" | "dim"', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + { + name: 'log_method', + type: '"info" | "warn" | "error"', + optional: false, + default_value: "'info'", + }, + ], + }, + ], + dependents: ['gitops_analyze.task.ts', 'gitops_validate.task.ts', 'publishing_plan.ts'], + }, + { + path: 'ModulesDetail.svelte', + declarations: [ + { + name: 'ModulesDetail', + kind: 'component', + props: [ + { + name: 'repos', + type: 'Array', + optional: false, + }, + { + name: 'nav_footer', + type: 'Snippet', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['ModulesNav.svelte'], + dependents: ['ModulesPage.svelte'], + }, + { + path: 'ModulesNav.svelte', + declarations: [ + { + name: 'ModulesNav', + kind: 'component', + props: [ + { + name: 'repos_modules', + type: 'Array<{\n\t\t\trepo: Repo;\n\t\t\tmodules: Array;\n\t\t}>', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependents: ['ModulesDetail.svelte'], + }, + { + path: 'ModulesPage.svelte', + declarations: [ + { + name: 'ModulesPage', + kind: 'component', + props: [ + { + name: 'repo', + type: 'Repo', + optional: false, + }, + { + name: 'repos', + type: 'Array', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['ModulesDetail.svelte', 'PageFooter.svelte', 'PageHeader.svelte'], + }, + { + path: 'multi_repo_publisher.ts', + declarations: [ + { + name: 'PublishingOptions', + kind: 'type', + source_line: 18, + type_signature: 'PublishingOptions', + properties: [ + { + name: 'dry_run', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'update_deps', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'version_strategy', + kind: 'variable', + type_signature: 'VersionStrategy', + }, + { + name: 'deploy', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'max_wait', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'skip_install', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'log', + kind: 'variable', + type_signature: 'Logger', + }, + ], + }, + { + name: 'PublishedVersion', + kind: 'type', + source_line: 28, + type_signature: 'PublishedVersion', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'old_version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'new_version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'bump_type', + kind: 'variable', + type_signature: "'major' | 'minor' | 'patch'", + }, + { + name: 'breaking', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'commit', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'tag', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'PublishingResult', + kind: 'type', + source_line: 38, + type_signature: 'PublishingResult', + properties: [ + { + name: 'ok', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'published', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'failed', + kind: 'variable', + type_signature: 'Array<{name: string; error: Error}>', + }, + { + name: 'duration', + kind: 'variable', + type_signature: 'number', + }, + ], + }, + { + name: 'publish_repos', + kind: 'function', + source_line: 45, + type_signature: + '(repos: LocalRepo[], options: PublishingOptions, ops?: GitopsOperations): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'repos', + type: 'LocalRepo[]', + optional: false, + }, + { + name: 'options', + type: 'PublishingOptions', + optional: false, + }, + { + name: 'ops', + type: 'GitopsOperations', + optional: false, + default_value: 'default_gitops_operations', + }, + ], + }, + ], + dependencies: [ + 'constants.ts', + 'dependency_updater.ts', + 'graph_validation.ts', + 'npm_install_helpers.ts', + 'operations_defaults.ts', + 'version_utils.ts', + ], + dependents: ['gitops_publish.task.ts', 'gitops_validate.task.ts'], + }, + { + path: 'npm_install_helpers.ts', + declarations: [ + { + name: 'install_with_cache_healing', + kind: 'function', + doc_comment: + 'Installs npm dependencies with cache healing on ETARGET errors.\n\n**Strategy:**\n1. First attempt: regular `npm install`\n2. On ETARGET error (stale cache): `npm cache clean --force` then retry\n3. On other errors: fail immediately\n\n**Why ETARGET errors occur:**\nAfter publishing a package and waiting for NPM registry propagation,\nnpm\'s local cache may still have stale "404" metadata. This healing\nstrategy clears the cache to force fresh metadata fetch.', + throws: [ + { + type: 'Error', + description: 'if install fails (with details about cache healing attempts)', + }, + ], + source_line: 42, + type_signature: + '(repo: LocalRepo, ops: GitopsOperations, log?: Logger | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'repo', + type: 'LocalRepo', + optional: false, + description: '- The repository to install dependencies for', + }, + { + name: 'ops', + type: 'GitopsOperations', + optional: false, + description: '- Gitops operations (for dependency injection)', + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + description: '- Optional logger', + }, + ], + }, + ], + dependents: ['multi_repo_publisher.ts'], + }, + { + path: 'npm_registry.ts', + declarations: [ + { + name: 'WaitOptions', + kind: 'type', + source_line: 6, + type_signature: 'WaitOptions', + properties: [ + { + name: 'max_attempts', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'initial_delay', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'max_delay', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'timeout', + kind: 'variable', + type_signature: 'number', + }, + ], + }, + { + name: 'PackageInfo', + kind: 'type', + source_line: 13, + type_signature: 'PackageInfo', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'version', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'check_package_available', + kind: 'function', + source_line: 18, + type_signature: + '(pkg: string, version: string, log?: Logger | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'pkg', + type: 'string', + optional: false, + }, + { + name: 'version', + type: 'string', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'wait_for_package', + kind: 'function', + doc_comment: + 'Waits for package version to propagate to NPM registry.\n\nUses exponential backoff with jitter to avoid hammering registry.\nLogs progress every 5 attempts. Respects timeout to avoid infinite waits.\n\nCritical for multi-repo publishing: ensures published packages are available\nbefore updating dependent packages.', + throws: [ + { + type: 'if', + description: 'timeout reached or max attempts exceeded', + }, + ], + source_line: 55, + type_signature: + '(pkg: string, version: string, options?: WaitOptions, log?: Logger | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'pkg', + type: 'string', + optional: false, + }, + { + name: 'version', + type: 'string', + optional: false, + }, + { + name: 'options', + type: 'WaitOptions', + optional: false, + default_value: '{}', + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'get_package_info', + kind: 'function', + doc_comment: + "Fetches package metadata from NPM registry.\n\nReturns name and latest version. Returns null if package doesn't exist\nor registry is unreachable.", + source_line: 112, + type_signature: + '(pkg: string, log?: Logger | undefined): Promise', + return_type: 'Promise', + return_description: 'package info or null on error/not found', + parameters: [ + { + name: 'pkg', + type: 'string', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + { + name: 'package_exists', + kind: 'function', + source_line: 131, + type_signature: '(pkg: string, log?: Logger | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'pkg', + type: 'string', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + ], + }, + ], + dependents: ['operations_defaults.ts'], + }, + { + path: 'operations_defaults.ts', + declarations: [ + { + name: 'default_changeset_operations', + kind: 'variable', + source_line: 44, + type_signature: 'ChangesetOperations', + }, + { + name: 'default_git_operations', + kind: 'variable', + source_line: 80, + type_signature: 'GitOperations', + }, + { + name: 'default_process_operations', + kind: 'variable', + source_line: 263, + type_signature: 'ProcessOperations', + }, + { + name: 'default_npm_operations', + kind: 'variable', + source_line: 287, + type_signature: 'NpmOperations', + }, + { + name: 'default_preflight_operations', + kind: 'variable', + source_line: 363, + type_signature: 'PreflightOperations', + }, + { + name: 'default_fs_operations', + kind: 'variable', + source_line: 369, + type_signature: 'FsOperations', + }, + { + name: 'default_build_operations', + kind: 'variable', + source_line: 391, + type_signature: 'BuildOperations', + }, + { + name: 'default_gitops_operations', + kind: 'variable', + doc_comment: 'Combined default operations for all gitops functionality.', + source_line: 415, + type_signature: 'GitopsOperations', + }, + ], + module_comment: + 'Production implementations of operations interfaces.\n\nProvides real git, npm, fs, and build operations for production use.\nFor interface definitions and dependency injection pattern, see `operations.ts`.', + dependencies: [ + 'changeset_reader.ts', + 'git_operations.ts', + 'npm_registry.ts', + 'preflight_checks.ts', + ], + dependents: [ + 'dependency_updater.ts', + 'local_repo.ts', + 'multi_repo_publisher.ts', + 'preflight_checks.ts', + 'publishing_plan.ts', + ], + }, + { + path: 'operations.ts', + declarations: [ + { + name: 'ChangesetOperations', + kind: 'type', + doc_comment: + 'Changeset operations for reading and predicting versions from `.changeset/*.md` files.', + source_line: 47, + type_signature: 'ChangesetOperations', + properties: [ + { + name: 'has_changesets', + kind: 'variable', + type_signature: + '(options: {\n\t\trepo: LocalRepo;\n\t}) => Promise>', + doc_comment: + 'Checks if a repo has any changeset files.\nReturns true if changesets exist, false if none found.', + }, + { + name: 'read_changesets', + kind: 'variable', + type_signature: + '(options: {\n\t\trepo: LocalRepo;\n\t\tlog?: Logger;\n\t}) => Promise}, {message: string}>>', + doc_comment: + 'Reads all changeset files from a repo.\nReturns array of changeset info, or error if reading fails.', + }, + { + name: 'predict_next_version', + kind: 'variable', + type_signature: + '(options: {\n\t\trepo: LocalRepo;\n\t\tlog?: Logger;\n\t}) => Promise | null>', + doc_comment: + "Predicts the next version based on changesets.\nReturns null if no changesets found (expected, not an error).\nReturns error Result if changesets exist but can't be read/parsed.", + }, + ], + }, + { + name: 'GitOperations', + kind: 'type', + doc_comment: + 'Git operations for branch management, commits, tags, and workspace state.\nAll operations return `Result` instead of throwing errors.', + source_line: 80, + type_signature: 'GitOperations', + properties: [ + { + name: 'current_branch_name', + kind: 'variable', + type_signature: + '(options?: {\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Gets the current branch name.', + }, + { + name: 'current_commit_hash', + kind: 'variable', + type_signature: + '(options?: {\n\t\tbranch?: string;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Gets the current commit hash.', + }, + { + name: 'check_clean_workspace', + kind: 'variable', + type_signature: + '(options?: {\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Checks if the workspace is clean (no uncommitted changes).', + }, + { + name: 'checkout', + kind: 'variable', + type_signature: + '(options: {branch: string; cwd?: string}) => Promise>', + doc_comment: 'Checks out a branch.', + }, + { + name: 'pull', + kind: 'variable', + type_signature: + '(options?: {\n\t\torigin?: string;\n\t\tbranch?: string;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Pulls changes from remote.', + }, + { + name: 'switch_branch', + kind: 'variable', + type_signature: + '(options: {\n\t\tbranch: string;\n\t\tpull?: boolean;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Switches to a branch, optionally pulling.', + }, + { + name: 'has_remote', + kind: 'variable', + type_signature: + '(options?: {\n\t\tremote?: string;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Checks if a remote exists.', + }, + { + name: 'add', + kind: 'variable', + type_signature: + '(options: {\n\t\tfiles: string | Array;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Stages files for commit.', + }, + { + name: 'commit', + kind: 'variable', + type_signature: + '(options: {message: string; cwd?: string}) => Promise>', + doc_comment: 'Creates a commit.', + }, + { + name: 'add_and_commit', + kind: 'variable', + type_signature: + '(options: {\n\t\tfiles: string | Array;\n\t\tmessage: string;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Stages files and creates a commit.', + }, + { + name: 'has_changes', + kind: 'variable', + type_signature: + '(options?: {cwd?: string}) => Promise>', + doc_comment: 'Checks if there are any uncommitted changes.', + }, + { + name: 'get_changed_files', + kind: 'variable', + type_signature: + '(options?: {\n\t\tcwd?: string;\n\t}) => Promise}, {message: string}>>', + doc_comment: 'Gets a list of changed files.', + }, + { + name: 'tag', + kind: 'variable', + type_signature: + '(options: {\n\t\ttag_name: string;\n\t\tmessage?: string;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Creates a git tag.', + }, + { + name: 'push_tag', + kind: 'variable', + type_signature: + '(options: {\n\t\ttag_name: string;\n\t\torigin?: string;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Pushes a tag to remote.', + }, + { + name: 'stash', + kind: 'variable', + type_signature: + '(options?: {message?: string; cwd?: string}) => Promise>', + doc_comment: 'Stashes uncommitted changes.', + }, + { + name: 'stash_pop', + kind: 'variable', + type_signature: + '(options?: {cwd?: string}) => Promise>', + doc_comment: 'Pops the most recent stash.', + }, + { + name: 'has_file_changed', + kind: 'variable', + type_signature: + '(options: {\n\t\tfrom_commit: string;\n\t\tto_commit: string;\n\t\tfile_path: string;\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Checks if a specific file changed between two commits.', + }, + ], + }, + { + name: 'ProcessOperations', + kind: 'type', + doc_comment: 'Process spawning operations for running shell commands.', + source_line: 210, + type_signature: 'ProcessOperations', + properties: [ + { + name: 'spawn', + kind: 'variable', + type_signature: + '(options: {\n\t\tcmd: string;\n\t\targs: Array;\n\t\tspawn_options?: SpawnOptions;\n\t}) => Promise>', + doc_comment: 'Spawns a child process and waits for completion.', + }, + ], + }, + { + name: 'BuildOperations', + kind: 'type', + doc_comment: 'Build operations for validating packages compile before publishing.', + source_line: 224, + type_signature: 'BuildOperations', + properties: [ + { + name: 'build_package', + kind: 'variable', + type_signature: + '(options: {\n\t\trepo: LocalRepo;\n\t\tlog?: Logger;\n\t}) => Promise>', + doc_comment: 'Builds a package using gro build.', + }, + ], + }, + { + name: 'NpmOperations', + kind: 'type', + doc_comment: + 'NPM registry operations for package availability checks and authentication.\nIncludes exponential backoff for waiting on package propagation.', + source_line: 238, + type_signature: 'NpmOperations', + properties: [ + { + name: 'wait_for_package', + kind: 'variable', + type_signature: + '(options: {\n\t\tpkg: string;\n\t\tversion: string;\n\t\twait_options?: WaitOptions;\n\t\tlog?: Logger;\n\t}) => Promise>', + doc_comment: + 'Waits for a package version to be available on NPM.\nUses exponential backoff with configurable timeout.', + }, + { + name: 'check_package_available', + kind: 'variable', + type_signature: + '(options: {\n\t\tpkg: string;\n\t\tversion: string;\n\t\tlog?: Logger;\n\t}) => Promise>', + doc_comment: 'Checks if a package version is available on NPM.', + }, + { + name: 'check_auth', + kind: 'variable', + type_signature: '() => Promise>', + doc_comment: 'Checks npm authentication status.', + }, + { + name: 'check_registry', + kind: 'variable', + type_signature: '() => Promise>', + doc_comment: 'Checks if npm registry is reachable.', + }, + { + name: 'install', + kind: 'variable', + type_signature: + '(options?: {\n\t\tcwd?: string;\n\t}) => Promise>', + doc_comment: 'Installs npm dependencies.', + }, + { + name: 'cache_clean', + kind: 'variable', + type_signature: '() => Promise>', + doc_comment: + 'Cleans the npm cache.\nUses `npm cache clean --force` to clear stale cache entries.', + }, + ], + }, + { + name: 'PreflightOperations', + kind: 'type', + doc_comment: + 'Preflight validation operations to ensure repos are ready for publishing.\nValidates workspace state, branches, builds, and npm authentication.', + source_line: 287, + type_signature: 'PreflightOperations', + properties: [ + { + name: 'run_preflight_checks', + kind: 'variable', + type_signature: + '(options: {\n\t\trepos: Array;\n\t\tpreflight_options: PreflightOptions;\n\t\tgit_ops?: GitOperations;\n\t\tnpm_ops?: NpmOperations;\n\t\tbuild_ops?: BuildOperations;\n\t\tchangeset_ops?: ChangesetOperations;\n\t}) => Promise', + doc_comment: 'Runs preflight validation checks before publishing.', + }, + ], + }, + { + name: 'FsOperations', + kind: 'type', + doc_comment: 'File system operations for reading and writing files.', + source_line: 304, + type_signature: 'FsOperations', + properties: [ + { + name: 'readFile', + kind: 'variable', + type_signature: + '(options: {\n\t\tpath: string;\n\t\tencoding: BufferEncoding;\n\t}) => Promise>', + doc_comment: 'Reads a file from the file system.', + }, + { + name: 'writeFile', + kind: 'variable', + type_signature: + '(options: {\n\t\tpath: string;\n\t\tcontent: string;\n\t}) => Promise>', + doc_comment: 'Writes a file to the file system.', + }, + ], + }, + { + name: 'GitopsOperations', + kind: 'type', + doc_comment: + 'Combined operations interface grouping all gitops functionality.\nThis is the main interface injected into publishing and validation workflows.', + source_line: 326, + type_signature: 'GitopsOperations', + properties: [ + { + name: 'changeset', + kind: 'variable', + type_signature: 'ChangesetOperations', + }, + { + name: 'git', + kind: 'variable', + type_signature: 'GitOperations', + }, + { + name: 'process', + kind: 'variable', + type_signature: 'ProcessOperations', + }, + { + name: 'npm', + kind: 'variable', + type_signature: 'NpmOperations', + }, + { + name: 'preflight', + kind: 'variable', + type_signature: 'PreflightOperations', + }, + { + name: 'fs', + kind: 'variable', + type_signature: 'FsOperations', + }, + { + name: 'build', + kind: 'variable', + type_signature: 'BuildOperations', + }, + ], + }, + ], + module_comment: + "Operations interfaces for dependency injection.\n\nThis is the core pattern enabling testability without mocks.\nAll side effects (git, npm, fs, process) are abstracted into interfaces.\n\n**Design principles:**\n- All operations accept a single `options` object parameter\n- All fallible operations return `Result` from `@ryanatkn/belt`\n- Never throw `Error` in operations - return `Result` with `ok: false`\n- Use `null` for expected \"not found\" cases (not errors)\n- Include `log?: Logger` in options where logging is useful\n\n**Production usage:**\n```typescript\nimport {default_gitops_operations} from './operations_defaults.js';\nconst result = await ops.git.current_branch_name({cwd: '/path'});\nif (!result.ok) {\n throw new TaskError(result.message);\n}\nconst branch = result.value;\n```\n\n**Test usage:**\n```typescript\nconst mock_ops = create_mock_operations();\nconst result = await publish_repos(repos, options, mock_ops);\n// Assert on result without any real git/npm calls\n```\n\nSee `operations_defaults.ts` for real implementations.\nSee test files (*.test.ts) for mock implementations.", + }, + { + path: 'output_helpers.ts', + declarations: [ + { + name: 'OutputFormat', + kind: 'type', + source_line: 4, + type_signature: 'OutputFormat', + }, + { + name: 'OutputOptions', + kind: 'type', + source_line: 6, + type_signature: 'OutputOptions', + properties: [ + { + name: 'format', + kind: 'variable', + type_signature: 'OutputFormat', + }, + { + name: 'outfile', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'log', + kind: 'variable', + type_signature: 'Logger', + }, + ], + }, + { + name: 'OutputFormatters', + kind: 'type', + source_line: 12, + type_signature: 'OutputFormatters', + generic_params: [ + { + name: 'T', + }, + ], + properties: [ + { + name: 'json', + kind: 'variable', + type_signature: '(data: T) => string', + }, + { + name: 'markdown', + kind: 'variable', + type_signature: '(data: T) => Array', + }, + { + name: 'stdout', + kind: 'variable', + type_signature: '(data: T, log: Logger) => void', + doc_comment: + 'This function should call log methods directly for colored/styled output.', + }, + ], + }, + { + name: 'format_and_output', + kind: 'function', + doc_comment: + 'Formats data and outputs to file or stdout based on options.\n\nSupports three formats:\n- stdout: Uses logger for colored/styled output (cannot use with --outfile)\n- json: Stringified JSON\n- markdown: Formatted markdown text', + throws: [ + { + type: 'if', + description: 'stdout format used with outfile, or if logger missing for stdout', + }, + ], + source_line: 31, + type_signature: + '(data: T, formatters: OutputFormatters, options: OutputOptions): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'data', + type: 'T', + optional: false, + }, + { + name: 'formatters', + type: 'OutputFormatters', + optional: false, + }, + { + name: 'options', + type: 'OutputOptions', + optional: false, + }, + ], + }, + ], + dependents: ['gitops_analyze.task.ts', 'gitops_plan.task.ts', 'gitops_publish.task.ts'], + }, + { + path: 'PageFooter.svelte', + declarations: [ + { + name: 'PageFooter', + kind: 'component', + source_line: 1, + }, + ], + dependents: [ + 'ModulesPage.svelte', + 'PullRequestsPage.svelte', + 'TablePage.svelte', + 'TreeItemPage.svelte', + 'TreePage.svelte', + ], + }, + { + path: 'PageHeader.svelte', + declarations: [ + { + name: 'PageHeader', + kind: 'component', + props: [ + { + name: 'repo', + type: '{package_json: PackageJson} | {url: string; package_json: null}', + optional: false, + }, + { + name: 'nav_attrs', + type: "SvelteHTMLElements['nav']", + optional: true, + }, + { + name: 'attrs', + type: "SvelteHTMLElements['header']", + optional: true, + }, + { + name: 'nav', + type: 'Snippet', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependents: [ + 'ModulesPage.svelte', + 'PullRequestsPage.svelte', + 'TablePage.svelte', + 'TreeItemPage.svelte', + 'TreePage.svelte', + ], + }, + { + path: 'paths.ts', + declarations: [ + { + name: 'GITOPS_OUTPUT_DIR', + kind: 'variable', + doc_comment: 'Base directory for all gitops-generated files.', + source_line: 4, + type_signature: '".gro/fuz_gitops"', + }, + { + name: 'DEFAULT_REPOS_DIR', + kind: 'variable', + doc_comment: + 'Default repos directory relative to gitops config file.\nResolves to the parent of the directory with the config\n(e.g., ~/dev/repo/gitops.config.ts resolves to ~/dev/).', + source_line: 11, + type_signature: '".."', + }, + ], + dependents: ['gitops_config.ts', 'gitops_task_helpers.ts', 'repo_ops.ts'], + }, + { + path: 'preflight_checks.ts', + declarations: [ + { + name: 'PreflightOptions', + kind: 'type', + source_line: 20, + type_signature: 'PreflightOptions', + properties: [ + { + name: 'skip_changesets', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'skip_build_validation', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'required_branch', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'check_remote', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'estimate_time', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'log', + kind: 'variable', + type_signature: 'Logger', + }, + ], + }, + { + name: 'PreflightResult', + kind: 'type', + source_line: 29, + type_signature: 'PreflightResult', + properties: [ + { + name: 'ok', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'warnings', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'errors', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'repos_with_changesets', + kind: 'variable', + type_signature: 'Set', + }, + { + name: 'repos_without_changesets', + kind: 'variable', + type_signature: 'Set', + }, + { + name: 'estimated_duration', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'npm_username', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'RunPreflightChecksOptions', + kind: 'type', + source_line: 39, + type_signature: 'RunPreflightChecksOptions', + properties: [ + { + name: 'repos', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'preflight_options', + kind: 'variable', + type_signature: 'PreflightOptions', + }, + { + name: 'git_ops', + kind: 'variable', + type_signature: 'GitOperations', + }, + { + name: 'npm_ops', + kind: 'variable', + type_signature: 'NpmOperations', + }, + { + name: 'build_ops', + kind: 'variable', + type_signature: 'BuildOperations', + }, + { + name: 'changeset_ops', + kind: 'variable', + type_signature: 'ChangesetOperations', + }, + ], + }, + { + name: 'run_preflight_checks', + kind: 'function', + doc_comment: + 'Validates all requirements before publishing can proceed.\n\nPerforms comprehensive pre-flight validation:\n- Clean workspaces (100% clean required - no uncommitted changes)\n- Correct branch (usually main)\n- Changesets present (unless skip_changesets=true)\n- Builds successful (fail-fast to prevent broken state)\n- Git remote reachability\n- NPM authentication with username\n- NPM registry connectivity\n\nBuild validation runs BEFORE any publishing to prevent the scenario where\nversion is bumped but build fails, leaving repo in broken state.', + source_line: 65, + type_signature: + '({ repos, preflight_options, git_ops, npm_ops, build_ops, changeset_ops, }: RunPreflightChecksOptions): Promise', + return_type: 'Promise', + return_description: + 'result with ok=false if any errors, plus warnings and detailed status', + parameters: [ + { + name: '__0', + type: 'RunPreflightChecksOptions', + optional: false, + }, + ], + }, + ], + dependencies: ['operations_defaults.ts'], + dependents: ['operations_defaults.ts'], + }, + { + path: 'publishing_plan.ts', + declarations: [ + { + name: 'VersionChange', + kind: 'type', + source_line: 18, + type_signature: 'VersionChange', + properties: [ + { + name: 'package_name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'from', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'to', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'bump_type', + kind: 'variable', + type_signature: 'BumpType', + }, + { + name: 'breaking', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'has_changesets', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'will_generate_changeset', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'needs_bump_escalation', + kind: 'variable', + type_signature: 'boolean', + }, + { + name: 'existing_bump', + kind: 'variable', + type_signature: 'BumpType', + }, + { + name: 'required_bump', + kind: 'variable', + type_signature: 'BumpType', + }, + ], + }, + { + name: 'DependencyUpdate', + kind: 'type', + source_line: 31, + type_signature: 'DependencyUpdate', + properties: [ + { + name: 'dependent_package', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'updated_dependency', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'new_version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'type', + kind: 'variable', + type_signature: "'dependencies' | 'devDependencies' | 'peerDependencies'", + }, + { + name: 'causes_republish', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'PublishingPlan', + kind: 'type', + source_line: 39, + type_signature: 'PublishingPlan', + properties: [ + { + name: 'publishing_order', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'version_changes', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'dependency_updates', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'breaking_cascades', + kind: 'variable', + type_signature: 'Map>', + }, + { + name: 'warnings', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'info', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'errors', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'generate_publishing_plan', + kind: 'function', + doc_comment: + 'Generates a publishing plan showing what would happen during publishing.\nShows version changes, dependency updates, and breaking change cascades.\nUses fixed-point iteration to resolve transitive cascades.', + source_line: 170, + type_signature: + '(repos: LocalRepo[], log?: Logger | undefined, ops?: ChangesetOperations): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'repos', + type: 'LocalRepo[]', + optional: false, + }, + { + name: 'log', + type: 'Logger | undefined', + optional: true, + }, + { + name: 'ops', + type: 'ChangesetOperations', + optional: false, + default_value: 'default_changeset_operations', + }, + ], + }, + { + name: 'log_publishing_plan', + kind: 'function', + source_line: 461, + type_signature: '(plan: PublishingPlan, log: Logger): void', + return_type: 'void', + parameters: [ + { + name: 'plan', + type: 'PublishingPlan', + optional: false, + }, + { + name: 'log', + type: 'Logger', + optional: false, + }, + ], + }, + ], + dependencies: [ + 'constants.ts', + 'graph_validation.ts', + 'log_helpers.ts', + 'operations_defaults.ts', + 'version_utils.ts', + ], + dependents: [ + 'gitops_plan.task.ts', + 'gitops_publish.task.ts', + 'gitops_validate.task.ts', + ], + }, + { + path: 'PullRequestsDetail.svelte', + declarations: [ + { + name: 'PullRequestsDetail', + kind: 'component', + props: [ + { + name: 'repos', + type: 'Array', + optional: false, + }, + { + name: 'filter_pull_request', + type: 'FilterPullRequest | undefined', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['github_helpers.ts'], + dependents: ['PullRequestsPage.svelte'], + }, + { + path: 'PullRequestsPage.svelte', + declarations: [ + { + name: 'PullRequestsPage', + kind: 'component', + props: [ + { + name: 'repo', + type: 'Repo', + optional: false, + }, + { + name: 'repos', + type: 'Array', + optional: false, + }, + { + name: 'filter_pull_request', + type: 'FilterPullRequest | undefined', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['PageFooter.svelte', 'PageHeader.svelte', 'PullRequestsDetail.svelte'], + }, + { + path: 'repo_ops.ts', + declarations: [ + { + name: 'walk_repo_files', + kind: 'function', + doc_comment: + 'Walk files in a directory, respecting common exclusions.\nYields absolute paths to files (and optionally directories).', + source_line: 155, + type_signature: + '(dir: string, options?: WalkOptions | undefined): AsyncGenerator', + return_type: 'AsyncGenerator', + parameters: [ + { + name: 'dir', + type: 'string', + optional: false, + description: 'Directory to walk', + }, + { + name: 'options', + type: 'WalkOptions | undefined', + optional: true, + description: 'Walk options for exclusions and filtering', + }, + ], + }, + { + name: 'DEFAULT_EXCLUDE_DIRS', + kind: 'variable', + doc_comment: 'Default directories to exclude from file walking', + source_line: 20, + type_signature: + 'readonly ["node_modules", ".git", ".gro", ".svelte-kit", ".deno", ".vscode", ".idea", "dist", "build", "coverage", ".cache", ".turbo"]', + }, + { + name: 'DEFAULT_EXCLUDE_EXTENSIONS', + kind: 'variable', + doc_comment: + 'Default binary/non-text extensions to exclude from content processing', + source_line: 36, + type_signature: + 'readonly [".png", ".jpg", ".jpeg", ".gif", ".svg", ".ico", ".webp", ".woff", ".woff2", ".ttf", ".eot", ".mp4", ".webm", ".mp3", ".wav", ".ogg", ".zip", ".tar", ".gz", ".lock", ".pdf"]', + }, + { + name: 'WalkOptions', + kind: 'type', + source_line: 60, + type_signature: 'WalkOptions', + properties: [ + { + name: 'exclude_dirs', + kind: 'variable', + type_signature: 'Array', + doc_comment: 'Additional directories to exclude (merged with defaults)', + }, + { + name: 'exclude_extensions', + kind: 'variable', + type_signature: 'Array', + doc_comment: 'Additional extensions to exclude (merged with defaults)', + }, + { + name: 'max_file_size', + kind: 'variable', + type_signature: 'number', + doc_comment: 'Maximum file size in bytes (default: 10MB)', + }, + { + name: 'include_dirs', + kind: 'variable', + type_signature: 'boolean', + doc_comment: 'Include directories in output (default: false)', + }, + { + name: 'no_defaults', + kind: 'variable', + type_signature: 'boolean', + doc_comment: 'Use only provided exclusions, ignoring defaults', + }, + ], + }, + { + name: 'RepoPath', + kind: 'type', + source_line: 73, + type_signature: 'RepoPath', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'path', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'url', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'get_repo_paths', + kind: 'function', + doc_comment: + 'Get repo paths from gitops config without full git sync.\nLighter weight than `get_gitops_ready()` - just resolves paths.', + source_line: 86, + type_signature: '(config_path?: string | undefined): Promise', + return_type: 'Promise', + return_description: 'Array of repo info with name, path, and url', + parameters: [ + { + name: 'config_path', + type: 'string | undefined', + optional: true, + description: 'Path to gitops.config.ts (defaults to ./gitops.config.ts)', + }, + ], + }, + { + name: 'should_exclude_path', + kind: 'function', + doc_comment: 'Check if a path should be excluded based on options.', + source_line: 119, + type_signature: '(file_path: string, options?: WalkOptions | undefined): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'file_path', + type: 'string', + optional: false, + }, + { + name: 'options', + type: 'WalkOptions | undefined', + optional: true, + }, + ], + }, + { + name: 'collect_repo_files', + kind: 'function', + doc_comment: + 'Collect all files from walk_repo_files into an array.\nConvenience function for when you need all paths upfront.', + source_line: 204, + type_signature: + '(dir: string, options?: WalkOptions | undefined): Promise', + return_type: 'Promise', + parameters: [ + { + name: 'dir', + type: 'string', + optional: false, + }, + { + name: 'options', + type: 'WalkOptions | undefined', + optional: true, + }, + ], + }, + ], + module_comment: + 'Generic repository operations for scripts that work across repos.\n\nProvides lightweight utilities for:\n- Getting repo paths from gitops config (without full git sync)\n- Walking files in repos with sensible exclusions\n- Common exclusion patterns for node/svelte projects\n\nFor full git sync/clone functionality, use `get_gitops_ready()` from gitops_task_helpers.', + dependencies: ['gitops_config.ts', 'paths.ts'], + }, + { + path: 'repo.svelte.ts', + declarations: [ + { + name: 'RepoJson', + kind: 'type', + doc_comment: 'Serialized repo data as stored in repos.ts (JSON).', + source_line: 14, + type_signature: 'RepoJson', + properties: [ + { + name: 'library_json', + kind: 'variable', + type_signature: 'LibraryJson', + }, + { + name: 'check_runs', + kind: 'variable', + type_signature: 'GithubCheckRunsItem | null', + }, + { + name: 'pull_requests', + kind: 'variable', + type_signature: 'Array | null', + }, + ], + }, + { + name: 'Repo', + kind: 'class', + doc_comment: + 'Runtime repo with Library composition for package metadata.\n\nWraps a Library instance and adds GitHub-specific data (CI status, PRs).\nConvenience getters delegate to `this.library.*` for common properties.', + source_line: 26, + members: [ + { + name: 'library', + kind: 'variable', + modifiers: ['readonly'], + type_signature: 'Library', + }, + { + name: 'check_runs', + kind: 'variable', + type_signature: 'GithubCheckRunsItem | null', + }, + { + name: 'pull_requests', + kind: 'variable', + type_signature: 'Array | null', + }, + { + name: 'constructor', + kind: 'constructor', + type_signature: '(repo_json: RepoJson): Repo', + parameters: [ + { + name: 'repo_json', + type: 'RepoJson', + optional: false, + }, + ], + }, + ], + }, + { + name: 'Repos', + kind: 'type', + source_line: 82, + type_signature: 'Repos', + properties: [ + { + name: 'repo', + kind: 'variable', + type_signature: 'Repo', + }, + { + name: 'repos', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'repos_context', + kind: 'variable', + source_line: 87, + type_signature: + '{ get: (error_message?: string | undefined) => Repos; get_maybe: () => Repos | undefined; set: (value: Repos) => Repos; }', + }, + { + name: 'repos_parse', + kind: 'function', + source_line: 89, + type_signature: '(repos: Repo[], homepage_url: string): Repos', + return_type: 'Repos', + parameters: [ + { + name: 'repos', + type: 'Repo[]', + optional: false, + }, + { + name: 'homepage_url', + type: 'string', + optional: false, + }, + ], + }, + ], + dependencies: ['github.ts'], + }, + { + path: 'ReposTable.svelte', + declarations: [ + { + name: 'ReposTable', + kind: 'component', + props: [ + { + name: 'repos', + type: 'Array', + optional: false, + }, + { + name: 'deps', + type: 'Array', + optional: true, + }, + ], + source_line: 1, + }, + ], + dependencies: ['github_helpers.ts'], + dependents: ['TablePage.svelte'], + }, + { + path: 'ReposTree.svelte', + declarations: [ + { + name: 'ReposTree', + kind: 'component', + props: [ + { + name: 'repos', + type: 'Array', + optional: false, + }, + { + name: 'selected_repo', + type: 'Repo | undefined', + optional: true, + }, + { + name: 'nav', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['ReposTreeNav.svelte'], + dependents: ['TreeItemPage.svelte', 'TreePage.svelte'], + }, + { + path: 'ReposTreeNav.svelte', + declarations: [ + { + name: 'ReposTreeNav', + kind: 'component', + props: [ + { + name: 'repos', + type: 'Array', + optional: false, + }, + { + name: 'selected_repo', + type: 'Repo', + optional: true, + }, + { + name: 'children', + type: 'Snippet', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependents: ['ReposTree.svelte'], + }, + { + path: 'resolved_gitops_config.ts', + declarations: [ + { + name: 'ResolvedGitopsConfig', + kind: 'type', + source_line: 4, + type_signature: 'ResolvedGitopsConfig', + properties: [ + { + name: 'local_repos', + kind: 'variable', + type_signature: 'Array | null', + }, + { + name: 'local_repo_paths', + kind: 'variable', + type_signature: 'Array | null', + }, + { + name: 'local_repos_missing', + kind: 'variable', + type_signature: 'Array | null', + }, + ], + }, + { + name: 'resolve_gitops_config', + kind: 'function', + source_line: 10, + type_signature: + '(gitops_config: GitopsConfig, repos_dir: string): ResolvedGitopsConfig', + return_type: 'ResolvedGitopsConfig', + parameters: [ + { + name: 'gitops_config', + type: 'GitopsConfig', + optional: false, + }, + { + name: 'repos_dir', + type: 'string', + optional: false, + }, + ], + }, + ], + dependencies: ['local_repo.ts'], + dependents: ['gitops_task_helpers.ts'], + }, + { + path: 'semver.ts', + declarations: [ + { + name: 'BumpType', + kind: 'type', + doc_comment: 'Semantic Versioning 2.0.0 utilities', + see_also: ['https://semver.org/'], + source_line: 6, + type_signature: 'BumpType', + }, + { + name: 'Semver', + kind: 'type', + source_line: 8, + type_signature: 'Semver', + properties: [ + { + name: 'major', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'minor', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'patch', + kind: 'variable', + type_signature: 'number', + }, + { + name: 'prerelease', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'build', + kind: 'variable', + type_signature: 'string', + }, + ], + }, + { + name: 'semver_compare_versions', + kind: 'function', + doc_comment: + 'Compares two semver versions according to SemVer 2.0.0 spec.\nReturns -1 if a < b, 0 if a === b, 1 if a > b.\nBuild metadata is ignored in precedence comparison.', + source_line: 116, + type_signature: '(a: string, b: string): number', + return_type: 'number', + parameters: [ + { + name: 'a', + type: 'string', + optional: false, + }, + { + name: 'b', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'semver_bump_version', + kind: 'function', + doc_comment: + 'Bumps a version according to the specified type.\nResets lower version numbers per SemVer spec.', + source_line: 143, + type_signature: '(version: string, type: BumpType): string', + return_type: 'string', + parameters: [ + { + name: 'version', + type: 'string', + optional: false, + }, + { + name: 'type', + type: 'BumpType', + optional: false, + }, + ], + }, + ], + module_comment: 'Semantic Versioning 2.0.0 utilities\n@see https://semver.org/', + }, + { + path: 'serialization_types.ts', + declarations: [ + { + name: 'SerializedNode', + kind: 'type', + source_line: 15, + type_signature: 'SerializedNode', + properties: [ + { + name: 'name', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'version', + kind: 'variable', + type_signature: 'string', + }, + { + name: 'dependencies', + kind: 'variable', + type_signature: + 'Array<{\n\t\tname: string;\n\t\ttype: string;\n\t\tversion: string;\n\t}>', + }, + { + name: 'dependents', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'publishable', + kind: 'variable', + type_signature: 'boolean', + }, + ], + }, + { + name: 'SerializedGraph', + kind: 'type', + source_line: 27, + type_signature: 'SerializedGraph', + properties: [ + { + name: 'nodes', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'edges', + kind: 'variable', + type_signature: 'Array<[string, string]>', + }, + ], + }, + { + name: 'SerializedPublishingPlan', + kind: 'type', + source_line: 32, + type_signature: 'SerializedPublishingPlan', + properties: [ + { + name: 'publishing_order', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'version_changes', + kind: 'variable', + type_signature: + 'Array<{\n\t\tpackage_name: string;\n\t\tfrom: string;\n\t\tto: string;\n\t\tbump_type: string;\n\t\tbreaking: boolean;\n\t\thas_changesets: boolean;\n\t\twill_generate_changeset?: boolean;\n\t\tneeds_bump_escalation?: boolean;\n\t\texisting_bump?: string;\n\t\trequired_bump?: string;\n\t}>', + }, + { + name: 'dependency_updates', + kind: 'variable', + type_signature: + 'Array<{\n\t\tdependent_package: string;\n\t\tupdated_dependency: string;\n\t\tnew_version: string;\n\t\ttype: string;\n\t\tcauses_republish: boolean;\n\t}>', + }, + { + name: 'breaking_cascades', + kind: 'variable', + type_signature: 'Record>', + }, + { + name: 'warnings', + kind: 'variable', + type_signature: 'Array', + }, + { + name: 'errors', + kind: 'variable', + type_signature: 'Array', + }, + ], + }, + { + name: 'serialize_graph', + kind: 'function', + doc_comment: 'Serializes a dependency graph to a JSON-safe format.', + source_line: 61, + type_signature: '(graph: DependencyGraph): SerializedGraph', + return_type: 'SerializedGraph', + parameters: [ + { + name: 'graph', + type: 'DependencyGraph', + optional: false, + }, + ], + }, + ], + module_comment: + 'JSON-serializable types for command output formats.\n\nGitops commands support `--format json` and `--format markdown` output modes\nin addition to styled terminal output. These types define the JSON schema for:\n- Dependency graph structures (`SerializedGraph`)\n- Publishing plan predictions (`SerializedPublishingPlan`)\n\nUsed by `gitops_analyze`, `gitops_plan`, and `gitops_publish --dry_run` when\n`--format json` or `--outfile` is specified.', + }, + { + path: 'TablePage.svelte', + declarations: [ + { + name: 'TablePage', + kind: 'component', + props: [ + { + name: 'repo', + type: 'Repo', + optional: false, + }, + { + name: 'repos', + type: 'Array', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['PageFooter.svelte', 'PageHeader.svelte', 'ReposTable.svelte'], + }, + { + path: 'TreeItemPage.svelte', + declarations: [ + { + name: 'TreeItemPage', + kind: 'component', + props: [ + { + name: 'repo', + type: 'Repo', + optional: false, + }, + { + name: 'repos', + type: 'Array', + optional: false, + }, + { + name: 'slug', + type: 'string', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['PageFooter.svelte', 'PageHeader.svelte', 'ReposTree.svelte'], + }, + { + path: 'TreePage.svelte', + declarations: [ + { + name: 'TreePage', + kind: 'component', + props: [ + { + name: 'repo', + type: 'Repo', + optional: false, + }, + { + name: 'repos', + type: 'Array', + optional: false, + }, + ], + source_line: 1, + }, + ], + dependencies: ['PageFooter.svelte', 'PageHeader.svelte', 'ReposTree.svelte'], + }, + { + path: 'version_utils.ts', + declarations: [ + { + name: 'is_wildcard', + kind: 'function', + source_line: 3, + type_signature: '(version: string): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'version', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'strip_version_prefix', + kind: 'function', + doc_comment: 'Strips version prefix (^, ~, >=, <=, etc) from a version string.', + source_line: 10, + type_signature: '(version: string): string', + return_type: 'string', + parameters: [ + { + name: 'version', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'get_version_prefix', + kind: 'function', + doc_comment: 'Gets the version prefix (^, ~, >=, <=, or empty string).', + source_line: 17, + type_signature: '(version: string): string', + return_type: 'string', + parameters: [ + { + name: 'version', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'normalize_version_for_comparison', + kind: 'function', + doc_comment: + 'Normalizes version string for comparison.\n\nStrips prefixes (^, ~, >=) to get bare version number.\nHandles wildcards as-is. Used by needs_update to compare versions.', + examples: [ + "normalize_version_for_comparison('^1.2.3') // '1.2.3'", + "normalize_version_for_comparison('>=2.0.0') // '2.0.0'", + "normalize_version_for_comparison('*') // '*'", + ], + source_line: 32, + type_signature: '(version: string): string', + return_type: 'string', + parameters: [ + { + name: 'version', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'needs_update', + kind: 'function', + source_line: 45, + type_signature: '(current: string, new_version: string): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'current', + type: 'string', + optional: false, + }, + { + name: 'new_version', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'get_update_prefix', + kind: 'function', + doc_comment: + 'Determines version prefix to use when updating dependencies.\n\nStrategy:\n- Wildcard (*): Use caret (^) as default\n- Has existing prefix: Preserve it (^, ~, >=, <=, etc)\n- No prefix: Use default_strategy\n\nThis preserves user intent while handling wildcard replacements sensibly.', + source_line: 68, + type_signature: + '(current_version: string, default_strategy?: "" | "^" | "~" | ">="): string', + return_type: 'string', + parameters: [ + { + name: 'current_version', + type: 'string', + optional: false, + }, + { + name: 'default_strategy', + type: '"" | "^" | "~" | ">="', + optional: false, + description: 'prefix to use when no existing prefix found', + default_value: "'^'", + }, + ], + }, + { + name: 'is_breaking_change', + kind: 'function', + doc_comment: + 'Determines if a bump is a breaking change based on semver rules.\nPre-1.0: minor bumps are breaking\n1.0+: major bumps are breaking', + source_line: 92, + type_signature: + '(old_version: string, bump_type: "major" | "minor" | "patch"): boolean', + return_type: 'boolean', + parameters: [ + { + name: 'old_version', + type: 'string', + optional: false, + }, + { + name: 'bump_type', + type: '"major" | "minor" | "patch"', + optional: false, + }, + ], + }, + { + name: 'detect_bump_type', + kind: 'function', + source_line: 108, + type_signature: + '(old_version: string, new_version: string): "major" | "minor" | "patch"', + return_type: '"major" | "minor" | "patch"', + parameters: [ + { + name: 'old_version', + type: 'string', + optional: false, + }, + { + name: 'new_version', + type: 'string', + optional: false, + }, + ], + }, + { + name: 'compare_bump_types', + kind: 'function', + doc_comment: + 'Compares bump types. Returns positive if a > b, negative if a < b, 0 if equal.', + source_line: 123, + type_signature: '(a: BumpType, b: BumpType): number', + return_type: 'number', + parameters: [ + { + name: 'a', + type: 'BumpType', + optional: false, + }, + { + name: 'b', + type: 'BumpType', + optional: false, + }, + ], + }, + { + name: 'calculate_next_version', + kind: 'function', + source_line: 132, + type_signature: '(current_version: string, bump_type: BumpType): string', + return_type: 'string', + parameters: [ + { + name: 'current_version', + type: 'string', + optional: false, + }, + { + name: 'bump_type', + type: 'BumpType', + optional: false, + }, + ], + }, + ], + dependents: [ + 'changeset_generator.ts', + 'changeset_reader.ts', + 'dependency_updater.ts', + 'multi_repo_publisher.ts', + 'publishing_plan.ts', + ], + }, + ], + }, + name: '@ryanatkn/fuz_gitops', + repo_name: 'fuz_gitops', + repo_url: 'https://github.com/ryanatkn/fuz_gitops', + owner_name: 'ryanatkn', + homepage_url: 'https://gitops.fuz.dev/', + logo_url: 'https://gitops.fuz.dev/logo.svg', + logo_alt: 'a friendly blue spider facing you', + npm_url: 'https://www.npmjs.com/package/@ryanatkn/fuz_gitops', + changelog_url: 'https://github.com/ryanatkn/fuz_gitops/blob/main/CHANGELOG.md', + published: true, + }, + check_runs: { + status: 'queued', + conclusion: null, + }, + pull_requests: [ + { + number: 40, + title: 're-enable repos', + user: { + login: 'ryanatkn', + }, + draft: false, + }, + ], + }, +]; diff --git a/src/routes/tree/[slug]/+page.ts b/src/routes/tree/[slug]/+page.ts index 8b51cd2e..efa86e1d 100644 --- a/src/routes/tree/[slug]/+page.ts +++ b/src/routes/tree/[slug]/+page.ts @@ -9,5 +9,5 @@ const parsed = repos_parse( ); export const entries: EntryGenerator = () => { - return parsed.repos.map((d) => ({slug: d.pkg.repo_name})); + return parsed.repos.map((d) => ({slug: d.repo_name})); }; diff --git a/src/test/dependency_updater.test.ts b/src/test/dependency_updater.test.ts index 4dac1764..573ce1a9 100644 --- a/src/test/dependency_updater.test.ts +++ b/src/test/dependency_updater.test.ts @@ -578,7 +578,7 @@ describe('dependency_updater', () => { path, JSON.stringify( { - name: repo.pkg.name, + name: repo.library.name, version: '1.0.0', dependencies: {lib: '^1.0.0'}, }, @@ -611,9 +611,9 @@ describe('dependency_updater', () => { path, JSON.stringify( { - name: repo.pkg.name, + name: repo.library.name, version: '1.0.0', - dependencies: repo.pkg.package_json.dependencies, + dependencies: repo.library.package_json.dependencies, }, null, '\t', diff --git a/src/test/fixtures/load_repo_fixtures.ts b/src/test/fixtures/load_repo_fixtures.ts index d8d3ac16..142a2c25 100644 --- a/src/test/fixtures/load_repo_fixtures.ts +++ b/src/test/fixtures/load_repo_fixtures.ts @@ -2,8 +2,10 @@ * Utilities for loading in-memory fixture data as LocalRepo objects. */ +import type {LibraryJson} from '@ryanatkn/belt/library_json.js'; +import {Library} from '@ryanatkn/fuz/library.svelte.js'; + import type {LocalRepo} from '$lib/local_repo.js'; -import {Pkg} from '@ryanatkn/fuz/pkg.svelte.js'; import type {RepoFixtureSet, RepoFixtureData} from './repo_fixture_types.js'; /** @@ -19,25 +21,38 @@ export const fixture_to_local_repos = (fixture: RepoFixtureSet): Array { const {repo_name, repo_url, package_json} = repo_data; - // Create minimal Pkg object - const pkg = new Pkg(package_json, { + // Create LibraryJson from fixture data + const library_json: LibraryJson = { name: package_json.name, - version: package_json.version, - modules: [], - }); + repo_name, + repo_url, + owner_name: 'test', + homepage_url: `https://test.com/${repo_name}`, + logo_url: null, + logo_alt: `logo for ${repo_name}`, + npm_url: null, + changelog_url: null, + published: false, + package_json, + source_json: { + name: package_json.name, + version: package_json.version, + modules: [], + }, + }; + + const library = new Library(library_json); const local_repo: LocalRepo = { - type: 'resolved_local_repo', - repo_name, + library, + library_json, repo_dir: `/fixtures/${repo_name}`, // Fake path - not used in tests - repo_url, repo_git_ssh_url: `git@github.com:test/${repo_name}.git`, repo_config: { repo_url, repo_dir: null, branch: 'main', }, - pkg, }; // Add dependency maps if present diff --git a/src/test/fixtures/mock_changeset_operations.ts b/src/test/fixtures/mock_changeset_operations.ts index 7332583c..df5b5420 100644 --- a/src/test/fixtures/mock_changeset_operations.ts +++ b/src/test/fixtures/mock_changeset_operations.ts @@ -18,14 +18,14 @@ export const create_mock_changeset_ops = (fixture: RepoFixtureSet): ChangesetOpe return { has_changesets: async (options: {repo: LocalRepo}) => { const {repo} = options; - const fixture_repo = repos_by_name.get(repo.pkg.name); + const fixture_repo = repos_by_name.get(repo.library.name); const value = !!(fixture_repo?.changesets && fixture_repo.changesets.length > 0); return {ok: true, value}; }, read_changesets: async (options: {repo: LocalRepo; log?: Logger}) => { const {repo} = options; - const fixture_repo = repos_by_name.get(repo.pkg.name); + const fixture_repo = repos_by_name.get(repo.library.name); if (!fixture_repo?.changesets) { return {ok: true, value: []}; } @@ -43,7 +43,7 @@ export const create_mock_changeset_ops = (fixture: RepoFixtureSet): ChangesetOpe predict_next_version: async (options: {repo: LocalRepo; log?: Logger}) => { const {repo} = options; - const fixture_repo = repos_by_name.get(repo.pkg.name); + const fixture_repo = repos_by_name.get(repo.library.name); if (!fixture_repo?.changesets || fixture_repo.changesets.length === 0) { return null; } @@ -56,7 +56,7 @@ export const create_mock_changeset_ops = (fixture: RepoFixtureSet): ChangesetOpe if (!parsed) continue; // Find the package entry for this repo - const pkg_entry = parsed.packages.find((p) => p.name === repo.pkg.name); + const pkg_entry = parsed.packages.find((p) => p.name === repo.library.name); if (!pkg_entry) continue; // Track the highest bump type diff --git a/src/test/multi_repo_publisher.test.ts b/src/test/multi_repo_publisher.test.ts index 98a66469..88582f4f 100644 --- a/src/test/multi_repo_publisher.test.ts +++ b/src/test/multi_repo_publisher.test.ts @@ -25,10 +25,10 @@ test('dry_run predicts versions without publishing', async () => { const mock_ops = create_mock_gitops_ops({ changeset: { predict_next_version: async (options) => { - if (options.repo.pkg.name === 'pkg-a') { + if (options.repo.library.name === 'pkg-a') { return {ok: true, version: '0.1.1', bump_type: 'patch' as const}; } - if (options.repo.pkg.name === 'pkg-b') { + if (options.repo.library.name === 'pkg-b') { return {ok: true, version: '0.2.1', bump_type: 'patch' as const}; } return null; @@ -108,14 +108,14 @@ test('handles breaking change cascades in dry_run', async () => { changeset: { predict_next_version: async (options) => { // pkg-core has a breaking change (0.x minor bump) - if (options.repo.pkg.name === 'pkg-core') { + if (options.repo.library.name === 'pkg-core') { return {ok: true, version: '0.6.0', bump_type: 'minor' as const}; } // Others have patch bumps - if (options.repo.pkg.name === 'pkg-mid') { + if (options.repo.library.name === 'pkg-mid') { return {ok: true, version: '0.3.1', bump_type: 'patch' as const}; } - if (options.repo.pkg.name === 'pkg-app') { + if (options.repo.library.name === 'pkg-app') { return {ok: true, version: '0.2.1', bump_type: 'patch' as const}; } return null; @@ -161,7 +161,7 @@ test('skips repos without changesets', async () => { changeset: { has_changesets: async (options) => ({ ok: true, - value: options.repo.pkg.name === 'pkg-a', + value: options.repo.library.name === 'pkg-a', }), }, preflight: create_preflight_mock(['pkg-a'], ['pkg-b', 'pkg-c']), @@ -346,7 +346,7 @@ test('deploys only repos with changes (skips unchanged repos)', async () => { changeset: { has_changesets: async (options) => ({ ok: true, - value: options.repo.pkg.name === 'lib', // Only lib has changesets + value: options.repo.library.name === 'lib', // Only lib has changesets }), }, process: process_ops, diff --git a/src/test/preflight_checks.test.ts b/src/test/preflight_checks.test.ts index 244ed241..3d47d88d 100644 --- a/src/test/preflight_checks.test.ts +++ b/src/test/preflight_checks.test.ts @@ -436,7 +436,7 @@ describe('preflight_checks', () => { const build_ops = create_mock_build_ops({ build_package: async (options) => { build_count++; - built_packages.push(options.repo.pkg.name); + built_packages.push(options.repo.library.name); return {ok: true}; }, }); @@ -467,7 +467,7 @@ describe('preflight_checks', () => { const build_ops = create_mock_build_ops({ build_package: async (options) => { call_count++; - if (options.repo.pkg.name === 'package-b') { + if (options.repo.library.name === 'package-b') { return {ok: false, message: 'TypeScript compilation error'}; } return {ok: true}; @@ -496,7 +496,7 @@ describe('preflight_checks', () => { // Mock build ops where package-b fails const build_ops = create_mock_build_ops({ build_package: async (options) => { - if (options.repo.pkg.name === 'package-b') { + if (options.repo.library.name === 'package-b') { return {ok: false, message: 'Build failed: syntax error'}; } return {ok: true}; @@ -507,7 +507,8 @@ describe('preflight_checks', () => { const changeset_ops = { has_changesets: async (options: {repo: LocalRepo}) => ({ ok: true as const, - value: options.repo.pkg.name === 'package-a' || options.repo.pkg.name === 'package-b', + value: + options.repo.library.name === 'package-a' || options.repo.library.name === 'package-b', }), read_changesets: async () => ({ok: true as const, value: []}), predict_next_version: async () => null, @@ -544,7 +545,7 @@ describe('preflight_checks', () => { const changeset_ops = { has_changesets: async (options: {repo: LocalRepo}) => ({ ok: true as const, - value: options.repo.pkg.name === 'failing-package', + value: options.repo.library.name === 'failing-package', }), read_changesets: async () => ({ok: true as const, value: []}), predict_next_version: async () => null, @@ -579,7 +580,7 @@ describe('preflight_checks', () => { const built_packages: Array = []; const build_ops = create_mock_build_ops({ build_package: async (options) => { - built_packages.push(options.repo.pkg.name); + built_packages.push(options.repo.library.name); return {ok: true}; }, }); @@ -609,9 +610,12 @@ describe('preflight_checks', () => { const built_packages: Array = []; const build_ops = create_mock_build_ops({ build_package: async (options) => { - built_packages.push(options.repo.pkg.name); + built_packages.push(options.repo.library.name); // Fail on package-a and package-c - if (options.repo.pkg.name === 'package-a' || options.repo.pkg.name === 'package-c') { + if ( + options.repo.library.name === 'package-a' || + options.repo.library.name === 'package-c' + ) { return {ok: false, message: 'Build error'}; } return {ok: true}; diff --git a/src/test/publishing_plan.test.ts b/src/test/publishing_plan.test.ts index 9ddeb224..0adb5c4d 100644 --- a/src/test/publishing_plan.test.ts +++ b/src/test/publishing_plan.test.ts @@ -18,11 +18,11 @@ test('detects breaking change cascades', async () => { const mock_ops: ChangesetOperations = { has_changesets: async (options) => ({ ok: true, - value: options.repo.pkg.name === 'pkg-a', + value: options.repo.library.name === 'pkg-a', }), read_changesets: async () => ({ok: true, value: []}), predict_next_version: async (options) => { - if (options.repo.pkg.name === 'pkg-a') { + if (options.repo.library.name === 'pkg-a') { // Simulate a breaking change for pkg-a return {ok: true, version: '0.2.0', bump_type: 'minor' as const}; } @@ -51,10 +51,10 @@ test('handles bump escalation', async () => { has_changesets: async () => ({ok: true, value: true}), read_changesets: async () => ({ok: true, value: []}), predict_next_version: async (options) => { - if (options.repo.pkg.name === 'pkg-a') { + if (options.repo.library.name === 'pkg-a') { return {ok: true, version: '0.2.0', bump_type: 'minor' as const}; // breaking } - if (options.repo.pkg.name === 'pkg-b') { + if (options.repo.library.name === 'pkg-b') { return {ok: true, version: '0.2.1', bump_type: 'patch' as const}; // non-breaking } return null; @@ -80,11 +80,11 @@ test('generates auto-changesets for dependency updates', async () => { const mock_ops: ChangesetOperations = { has_changesets: async (options) => ({ ok: true, - value: options.repo.pkg.name === 'pkg-a', + value: options.repo.library.name === 'pkg-a', }), read_changesets: async () => ({ok: true, value: []}), predict_next_version: async (options) => { - if (options.repo.pkg.name === 'pkg-a') { + if (options.repo.library.name === 'pkg-a') { return {ok: true, version: '0.1.1', bump_type: 'patch' as const}; } return null; @@ -172,11 +172,11 @@ test('warns when MAX_ITERATIONS reached without convergence', async () => { const mock_ops: ChangesetOperations = { has_changesets: async (options) => ({ ok: true, - value: options.repo.pkg.name === 'level-1', + value: options.repo.library.name === 'level-1', }), read_changesets: async () => ({ok: true, value: []}), predict_next_version: async (options) => { - if (options.repo.pkg.name === 'level-1') { + if (options.repo.library.name === 'level-1') { // Breaking change in 0.x (minor bump) return {ok: true, version: '0.2.0', bump_type: 'minor' as const}; } diff --git a/src/test/test_helpers.ts b/src/test/test_helpers.ts index e014ab58..a506f882 100644 --- a/src/test/test_helpers.ts +++ b/src/test/test_helpers.ts @@ -1,6 +1,7 @@ import type {Logger} from '@ryanatkn/belt/log.js'; import {vi} from 'vitest'; -import {Pkg} from '@ryanatkn/fuz/pkg.svelte.js'; +import type {LibraryJson} from '@ryanatkn/belt/library_json.js'; +import {Library} from '@ryanatkn/fuz/library.svelte.js'; import type {LocalRepo} from '$lib/local_repo.js'; import type { @@ -26,9 +27,9 @@ export interface MockRepoOptions { } /** - * Creates a mock LocalRepo for testing + * Creates a mock LibraryJson for testing */ -export const create_mock_repo = (options: MockRepoOptions): LocalRepo => { +export const create_mock_library_json = (options: MockRepoOptions): LibraryJson => { const { name, version = '1.0.0', @@ -37,50 +38,48 @@ export const create_mock_repo = (options: MockRepoOptions): LocalRepo => { peer_deps = {}, private: private_option = false, } = options; + return { - type: 'resolved_local_repo' as const, + name, repo_name: name, - repo_dir: `/test/${name}`, repo_url: `https://github.com/test/${name}`, + owner_name: 'test', + homepage_url: `https://test.com/${name}`, + logo_url: null, + logo_alt: `logo for ${name}`, + npm_url: null, + changelog_url: null, + published: false, + package_json: { + name, + version, + private: private_option, + dependencies: Object.keys(deps).length > 0 ? deps : undefined, + devDependencies: Object.keys(dev_deps).length > 0 ? dev_deps : undefined, + peerDependencies: Object.keys(peer_deps).length > 0 ? peer_deps : undefined, + repository: {type: 'git', url: `git+https://github.com/test/${name}.git`}, + }, + source_json: {name, version, modules: []}, + }; +}; + +/** + * Creates a mock LocalRepo for testing + */ +export const create_mock_repo = (options: MockRepoOptions): LocalRepo => { + const {name, deps = {}, dev_deps = {}, peer_deps = {}} = options; + const library_json = create_mock_library_json(options); + + return { + library: new Library(library_json), + library_json, + repo_dir: `/test/${name}`, repo_git_ssh_url: `git@github.com:test/${name}.git`, repo_config: { repo_url: `https://github.com/test/${name}`, repo_dir: null, branch: 'main', }, - pkg: new Pkg( - { - name, - version, - private: private_option, - dependencies: Object.keys(deps).length > 0 ? deps : undefined, - devDependencies: Object.keys(dev_deps).length > 0 ? dev_deps : undefined, - peerDependencies: Object.keys(peer_deps).length > 0 ? peer_deps : undefined, - repository: {type: 'git', url: `git+https://github.com/test/${name}.git`}, - }, - {name, version}, - ), - // { - // name, - // repo_name: name, - // repo_url: `https://github.com/test/${name}`, - // homepage_url: `https://test.com/${name}`, - // owner_name: 'test', - // logo_url: null, - // logo_alt: `logo for ${name}`, - // npm_url: null, - // changelog_url: null, - // published: false, - // src_json: {name, version, modules: []}, - // package_json: { - // name, - // version, - // dependencies: deps, - // devDependencies: dev_deps, - // peerDependencies: peer_deps, - // private: is_private, - // }, - // }, dependencies: new Map(Object.entries(deps)), dev_dependencies: new Map(Object.entries(dev_deps)), peer_dependencies: new Map(Object.entries(peer_deps)), @@ -106,7 +105,7 @@ export const create_mock_gitops_ops = ( read_changesets: async () => ({ok: true, value: []}), predict_next_version: async (options) => ({ ok: true, - version: incrementPatch(options.repo.pkg.package_json.version || '0.0.0'), + version: incrementPatch(options.repo.library.package_json.version || '0.0.0'), bump_type: 'patch' as const, }), ...overrides.changeset, @@ -154,11 +153,11 @@ export const create_mock_package_json_files = ( for (const repo of repos) { const version = - updatedVersions.get(repo.pkg.name) || - incrementPatch(repo.pkg.package_json.version || '0.0.0'); + updatedVersions.get(repo.library.name) || + incrementPatch(repo.library.package_json.version || '0.0.0'); const packageJson = { - ...repo.pkg.package_json, + ...repo.library.package_json, version, }; @@ -192,11 +191,11 @@ export const create_mock_changeset_ops = ( ): ChangesetOperations => ({ has_changesets: async (options) => ({ ok: true, - value: reposWithChangesets.has(options.repo.pkg.name), + value: reposWithChangesets.has(options.repo.library.name), }), read_changesets: async () => ({ok: true, value: []}), predict_next_version: async (options) => { - const prediction = versionPredictions.get(options.repo.pkg.name); + const prediction = versionPredictions.get(options.repo.library.name); if (!prediction) return null; return {ok: true, ...prediction}; },