{"_id":"@axelmth/repoflow-core","_rev":"2-3ec64912dde70da36fd581fccc0cceb2","name":"@axelmth/repoflow-core","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.1":{"name":"@axelmth/repoflow-core","version":"0.0.1","keywords":["meta-repository","multi-repo","monorepo","ci-cd","github-actions","release","automation"],"author":{"name":"Axel Mathieu-Le Gall","email":"axel@example.com"},"license":"MIT","_id":"@axelmth/repoflow-core@0.0.1","maintainers":[{"name":"axelmth","email":"aujoulator@hotmail.fr"}],"homepage":"https://github.com/axelmth/repoflow#readme","bugs":{"url":"https://github.com/axelmth/repoflow/issues"},"dist":{"shasum":"f1d14bf09b6208c3e3f3a1a60133a4978e5ca6f1","tarball":"https://registry.npmjs.org/@axelmth/repoflow-core/-/repoflow-core-0.0.1.tgz","fileCount":8,"integrity":"sha512-o5Gskvcs7JsG70lGszpve6KuCKt868wInGZmqBKaJVIy/2BHfYzUCW23RtAhxpVF3FlJh6/V/yO0y0SD1fNuBA==","signatures":[{"sig":"MEUCICRzJkZcooe0OQFehVeGTBMQcij/fKrUslH9bClTp9HcAiEA5ENbvQKdwTMcjgN7GUW8ENMuINHpAsUzwjzaAR/FH2c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55403},"main":"./dist/index.cjs","type":"module","_from":"file:axelmth-repoflow-core-0.0.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup --watch","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"axelmth","email":"aujoulator@hotmail.fr"},"_resolved":"/tmp/1360937a1ed36f0a23feb799c6df8317/axelmth-repoflow-core-0.0.1.tgz","_integrity":"sha512-o5Gskvcs7JsG70lGszpve6KuCKt868wInGZmqBKaJVIy/2BHfYzUCW23RtAhxpVF3FlJh6/V/yO0y0SD1fNuBA==","repository":{"url":"git+https://github.com/axelmth/repoflow.git","type":"git","directory":"packages/core"},"_npmVersion":"10.9.7","description":"Core types, config loading, and repository abstractions for repoflow","directories":{},"_nodeVersion":"22.22.2","dependencies":{"tsx":"^4.19.0","zod":"^3.24.0","simple-git":"^3.27.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.6.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/repoflow-core_0.0.1_1776533388623_0.29666821283829004","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@axelmth/repoflow-core","version":"0.1.0","type":"module","license":"MIT","author":{"name":"Axel Mathieu-Le Gall","email":"axel@example.com"},"description":"Core types, config loading, and repository abstractions for repoflow","engines":{"node":">=20"},"repository":{"type":"git","url":"git+https://github.com/axelmth/repoflow.git","directory":"packages/core"},"homepage":"https://github.com/axelmth/repoflow#readme","bugs":{"url":"https://github.com/axelmth/repoflow/issues"},"keywords":["meta-repository","multi-repo","monorepo","ci-cd","github-actions","release","automation"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","dependencies":{"simple-git":"^3.27.0","tsx":"^4.19.0","zod":"^3.24.0"},"devDependencies":{"@types/node":"^22.0.0","tsup":"^8.0.0","typescript":"^5.6.0"},"scripts":{"build":"tsup","dev":"tsup --watch","typecheck":"tsc --noEmit"},"_id":"@axelmth/repoflow-core@0.1.0","_integrity":"sha512-wPScCD45czTTUogdBQTtzwifpH8cZz5sJRyMP3LKHzN4ztaU2aP9mzgNq2pivGTx2R9XxQnUCmqv+15R1F3wPg==","_resolved":"/tmp/b5e799927ff371326854464ac9f06a04/axelmth-repoflow-core-0.1.0.tgz","_from":"file:axelmth-repoflow-core-0.1.0.tgz","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-wPScCD45czTTUogdBQTtzwifpH8cZz5sJRyMP3LKHzN4ztaU2aP9mzgNq2pivGTx2R9XxQnUCmqv+15R1F3wPg==","shasum":"1c54b37a2985ba96dc61dee96f7253b64b89920c","tarball":"https://registry.npmjs.org/@axelmth/repoflow-core/-/repoflow-core-0.1.0.tgz","fileCount":9,"unpackedSize":58713,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCiGFcySdot54tIGye6MJ7k1hSUQsyEotCYOlDBrmDFfQIgO7VwJRs2gyHtdeu6hNpK0jOYxA1+neLUAqTHJO+rESo="}]},"_npmUser":{"name":"axelmth","email":"aujoulator@hotmail.fr"},"directories":{},"maintainers":[{"name":"axelmth","email":"aujoulator@hotmail.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/repoflow-core_0.1.0_1776540312149_0.9959793452976773"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-18T17:29:48.528Z","modified":"2026-04-18T19:25:12.404Z","0.0.1":"2026-04-18T17:29:48.776Z","0.1.0":"2026-04-18T19:25:12.292Z"},"bugs":{"url":"https://github.com/axelmth/repoflow/issues"},"author":{"name":"Axel Mathieu-Le Gall","email":"axel@example.com"},"license":"MIT","homepage":"https://github.com/axelmth/repoflow#readme","keywords":["meta-repository","multi-repo","monorepo","ci-cd","github-actions","release","automation"],"repository":{"type":"git","url":"git+https://github.com/axelmth/repoflow.git","directory":"packages/core"},"description":"Core types, config loading, and repository abstractions for repoflow","maintainers":[{"name":"axelmth","email":"aujoulator@hotmail.fr"}],"readme":"# @axelmth/repoflow-core\n\nCore library for [repoflow](https://github.com/axelmth/repoflow) — config loading, repository abstractions, and workspace orchestration for multi-repo setups.\n\n> [!WARNING]\n> **Status: Pre-alpha** — APIs will change without notice. Not ready for production use.\n\n## Install\n\n```sh\nnpm i @axelmth/repoflow-core\n# or\npnpm add @axelmth/repoflow-core\n```\n\n## Usage\n\n### Load config\n\n```ts\nimport { loadConfig } from '@axelmth/repoflow-core'\n\nconst config = await loadConfig() // walks up from cwd to find repoflow.config.ts\n```\n\n### Workspace\n\n```ts\nimport { loadConfig, Workspace } from '@axelmth/repoflow-core'\n\nconst config = await loadConfig()\nconst workspace = await Workspace.fromConfig(config)\n\n// Sequential\nawait workspace.forEach(async (repo) => {\n  console.log(repo.name, await repo.currentBranch())\n})\n\n// Parallel (max 4 concurrent)\nawait workspace.parallel(async (repo) => {\n  await repo.pull()\n})\n```\n\n### Define config (typed helper)\n\n```ts\nimport { defineConfig } from '@axelmth/repoflow-core'\n\nexport default defineConfig({\n  repos: [\n    { name: 'backend', url: 'git@github.com:acme/backend.git' },\n    { name: 'web',     url: 'git@github.com:acme/web.git' },\n  ],\n  defaultBranch: 'main',\n})\n```\n\n## API\n\n### `loadConfig(cwd?)`\n\nWalks up the directory tree from `cwd` (default: `process.cwd()`) to find `repoflow.config.ts`, loads it via [tsx](https://github.com/privatenumber/tsx), validates with [zod](https://zod.dev), and applies defaults. Supports `${ENV_VAR}` interpolation.\n\nThrows `ConfigNotFoundError`, `ConfigValidationError`, or `MissingEnvVarError`.\n\n### `Workspace`\n\n| Method | Description |\n|---|---|\n| `Workspace.load(cwd?)` | Load config then build workspace |\n| `Workspace.fromConfig(config)` | Build workspace from already-loaded config |\n| `workspace.forEach(fn)` | Run async function sequentially over all repos |\n| `workspace.parallel(fn)` | Run async function with max 4 concurrent repos |\n\n### `Repository` (exposed as `Repo`)\n\n| Method/Property | Description |\n|---|---|\n| `repo.isPresent` | Whether the repo directory exists on disk |\n| `repo.clone()` | Clone from `repo.url` into `repo.path` |\n| `repo.pull()` | Pull latest on current branch |\n| `repo.checkout(branch)` | Checkout branch |\n| `repo.status()` | Returns `RepoStatus` (ahead, behind, dirty) |\n| `repo.currentBranch()` | Current branch name |\n| `repo.lastTag()` | Most recent git tag |\n| `repo.commitsSince(ref)` | Commits since a ref |\n| `repo.isClean()` | Whether working tree is clean |\n\n## License\n\n[MIT](https://github.com/axelmth/repoflow/blob/main/LICENSE) — Axel Mathieu-Le Gall\n","readmeFilename":"README.md"}