{"_id":"ado-connector","_rev":"6-400c5629eb2db65b83ef858d79feda84","name":"ado-connector","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"ado-connector","version":"1.0.0","keywords":["azure-devops","ado","nextjs","next","pipelines","artifacts","azure","devops","connector","api"],"author":"","license":"MIT","_id":"ado-connector@1.0.0","maintainers":[{"name":"latiasthinh","email":"thomas.ng4542@gmail.com"}],"homepage":"https://github.com/latiosthinh/ado-connector#readme","bugs":{"url":"https://github.com/latiosthinh/ado-connector/issues"},"dist":{"shasum":"9ee3e4ab1e7f5dd3129d8d5270e94acd1cf781b8","tarball":"https://registry.npmjs.org/ado-connector/-/ado-connector-1.0.0.tgz","fileCount":9,"integrity":"sha512-jgc0dXkqhbmU1rvOexjIESuGXHs8rr2SJGMkFkO8xtaTHYJ5aVEso0wusm0Vk6wVVIfot7zucPwnjAdILMXjHA==","signatures":[{"sig":"MEQCIEhU4h+1e09BR5Gi+VB70hXeXwkS67qBnEMTXYWAnn6LAiBlP/dP1++bSHjugGCFbzCpcu+ddoltHtDPhcb0FZhs1A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43121},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","gitHead":"85971c4ca6b6114eab3d37c5c4b127d409335d8c","scripts":{"dev":"tsup --watch","test":"echo \"Error: no test specified\" && exit 1","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"latiasthinh","email":"thomas.ng4542@gmail.com"},"repository":{"url":"git+https://github.com/latiosthinh/ado-connector.git","type":"git"},"_npmVersion":"10.9.2","description":"A simple, powerful library to expose Azure DevOps (ADO) capabilities in your Next.js application","directories":{},"_nodeVersion":"22.17.0","dependencies":{"base-64":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"next":"^16.0.6","tsup":"^8.5.1","ts-node":"^10.9.2","typescript":"^5.9.3","@types/node":"^24.10.1","@types/base-64":"^1.0.2"},"peerDependencies":{"next":">=14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ado-connector_1.0.0_1764661158733_0.1686952189458657","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"ado-connector","version":"1.0.1","keywords":["azure-devops","ado","nextjs","next","pipelines","artifacts","azure","devops","connector","api"],"author":"","license":"MIT","_id":"ado-connector@1.0.1","maintainers":[{"name":"latiasthinh","email":"thomas.ng4542@gmail.com"}],"homepage":"https://github.com/latiosthinh/ado-connector#readme","bugs":{"url":"https://github.com/latiosthinh/ado-connector/issues"},"dist":{"shasum":"27b7f3292e71e7c95661528a0a0ec732db919f26","tarball":"https://registry.npmjs.org/ado-connector/-/ado-connector-1.0.1.tgz","fileCount":9,"integrity":"sha512-VzNzt4wBTLKrvCLL14BHkksdhrF5g6X5wF9iectU1LuM/IU1Yi6Mi7p7SyKR+ye19f4SzEESp78eKfH7q2Okbg==","signatures":[{"sig":"MEUCIQD5RVAJO4wVLfBS3bAeFIJ7JCsM/oDa6IvcLCU8ztNGqQIgUMgPLGEpTL178GXM70BoX9U71I1USx8N0UvSdDf9Fd8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56499},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","gitHead":"ff449dd3846099d9b85806d884914813cb8e3f11","scripts":{"dev":"tsup --watch","test":"echo \"Error: no test specified\" && exit 1","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"latiasthinh","email":"thomas.ng4542@gmail.com"},"repository":{"url":"git+https://github.com/latiosthinh/ado-connector.git","type":"git"},"_npmVersion":"10.9.2","description":"A simple, powerful library to expose Azure DevOps (ADO) capabilities in your Next.js application","directories":{},"_nodeVersion":"22.17.0","dependencies":{"base-64":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"next":"^16.0.6","tsup":"^8.5.1","ts-node":"^10.9.2","typescript":"^5.9.3","@types/node":"^24.10.1","@types/base-64":"^1.0.2"},"peerDependencies":{"next":">=14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ado-connector_1.0.1_1764830350671_0.29007795283836213","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"ado-connector","version":"1.0.2","keywords":["azure-devops","ado","nextjs","next","pipelines","artifacts","azure","devops","connector","api"],"author":"","license":"MIT","_id":"ado-connector@1.0.2","maintainers":[{"name":"latiasthinh","email":"thomas.ng4542@gmail.com"}],"homepage":"https://github.com/latiosthinh/ado-connector#readme","bugs":{"url":"https://github.com/latiosthinh/ado-connector/issues"},"dist":{"shasum":"b2edb34c07c656c5e617924953c2f2c8d85b7e65","tarball":"https://registry.npmjs.org/ado-connector/-/ado-connector-1.0.2.tgz","fileCount":9,"integrity":"sha512-B+7kLs/kxPxN6L/vL0Xvca3DMuQ7ppTfxJB0CHwfBLZfOg8SpzvsRQXYTEQWJel1LVmhvbcnWS+4XIpRwfVnRw==","signatures":[{"sig":"MEUCIDCbmiUMJsI3353M93idbQe4DeBOasa938W0UkQkky2VAiEAvKTnsVE7X1HgBE99ri4DQXpx+0jrkiCvgthGji669fI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57971},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","gitHead":"74a53da427e37e9786beedcdd86f5299b6500004","scripts":{"dev":"tsup --watch","test":"echo \"Error: no test specified\" && exit 1","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"latiasthinh","email":"thomas.ng4542@gmail.com"},"repository":{"url":"git+https://github.com/latiosthinh/ado-connector.git","type":"git"},"_npmVersion":"10.9.2","description":"A simple, powerful library to expose Azure DevOps (ADO) capabilities in your Next.js application","directories":{},"_nodeVersion":"22.17.0","dependencies":{"base-64":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"next":"^16.0.6","tsup":"^8.5.1","ts-node":"^10.9.2","typescript":"^5.9.3","@types/node":"^24.10.1","@types/base-64":"^1.0.2"},"peerDependencies":{"next":">=14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ado-connector_1.0.2_1765355403085_0.6616726784841016","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"ado-connector","version":"1.0.3","keywords":["azure-devops","ado","nextjs","next","pipelines","artifacts","azure","devops","connector","api"],"author":"","license":"MIT","_id":"ado-connector@1.0.3","maintainers":[{"name":"latiasthinh","email":"thomas.ng4542@gmail.com"}],"homepage":"https://github.com/latiosthinh/ado-connector#readme","bugs":{"url":"https://github.com/latiosthinh/ado-connector/issues"},"dist":{"shasum":"3d33a6a15e284229e082b76ee1fff86e868ea379","tarball":"https://registry.npmjs.org/ado-connector/-/ado-connector-1.0.3.tgz","fileCount":9,"integrity":"sha512-ZOCW4SxNvNR4wAk+M/jgshgm1/q05CgYZGr5fhYFX6h1NZmv/hxYXt13LYyJxhzrK2B+yp8pkpZVfRduioFT1Q==","signatures":[{"sig":"MEQCIGc0UpNnb11u9nAVzPI4JtBuGzUd9OaSq32Pruh7TSZpAiBz0Famj7V7epSO2+HpqanGmkRVvGUKDouIHdG16agVNA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60403},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","gitHead":"800ba0a1ce18c73098e5eec5e9dad556bcf86259","scripts":{"dev":"tsup --watch","test":"echo \"Error: no test specified\" && exit 1","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"latiasthinh","email":"thomas.ng4542@gmail.com"},"repository":{"url":"git+https://github.com/latiosthinh/ado-connector.git","type":"git"},"_npmVersion":"10.9.2","description":"A simple, powerful library to expose Azure DevOps (ADO) capabilities in your Next.js application","directories":{},"_nodeVersion":"22.17.0","dependencies":{"base-64":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"next":"^16.0.6","tsup":"^8.5.1","ts-node":"^10.9.2","typescript":"^5.9.3","@types/node":"^24.10.1","@types/base-64":"^1.0.2"},"peerDependencies":{"next":">=14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ado-connector_1.0.3_1765358680219_0.7162482384577109","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"ado-connector","version":"1.0.4","keywords":["azure-devops","ado","nextjs","next","pipelines","artifacts","azure","devops","connector","api"],"author":"","license":"MIT","_id":"ado-connector@1.0.4","maintainers":[{"name":"latiasthinh","email":"thomas.ng4542@gmail.com"}],"homepage":"https://github.com/latiosthinh/ado-connector#readme","bugs":{"url":"https://github.com/latiosthinh/ado-connector/issues"},"dist":{"shasum":"40c9587d1a06439e01399ca81e6f5f270025f04a","tarball":"https://registry.npmjs.org/ado-connector/-/ado-connector-1.0.4.tgz","fileCount":9,"integrity":"sha512-q+D9JARikLP0vZb9n9QHHJIzYufqqv4U2pT8hujlo1rbNFuG4QNl/IbF1WZwnfw10yNc5CKKDYFQZ/vEno4cdQ==","signatures":[{"sig":"MEYCIQDRCgflMJ26JRXUJ8gZKy7iWZc1kxqwYZrI3KMXuAF2DQIhAI/eTHuM/pkeRVzbuZBeT8DiEhQC1qwBoToFhgQdA/0T","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":96190},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","gitHead":"58a5894f3e6f96091fce869fff09f3f2d29987f9","scripts":{"dev":"tsup --watch","test":"echo \"Error: no test specified\" && exit 1","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"latiasthinh","email":"thomas.ng4542@gmail.com"},"repository":{"url":"git+https://github.com/latiosthinh/ado-connector.git","type":"git"},"_npmVersion":"10.9.2","description":"A simple, powerful library to expose Azure DevOps (ADO) capabilities in your Next.js application","directories":{},"_nodeVersion":"22.17.0","dependencies":{"base-64":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"next":"^16.0.6","tsup":"^8.5.1","ts-node":"^10.9.2","typescript":"^5.9.3","@types/node":"^24.10.1","@types/base-64":"^1.0.2"},"peerDependencies":{"next":">=14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ado-connector_1.0.4_1765792586447_0.5021101440831583","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"ado-connector","version":"1.0.5","description":"A simple, powerful library to expose Azure DevOps (ADO) capabilities in your Next.js application","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"tsup","dev":"tsup --watch","test":"echo \"Error: no test specified\" && exit 1","prepublishOnly":"npm run build"},"keywords":["azure-devops","ado","nextjs","next","pipelines","artifacts","azure","devops","connector","api"],"author":"","license":"MIT","repository":{"type":"git","url":"git+https://github.com/latiosthinh/ado-connector.git"},"bugs":{"url":"https://github.com/latiosthinh/ado-connector/issues"},"homepage":"https://github.com/latiosthinh/ado-connector#readme","devDependencies":{"@types/base-64":"^1.0.2","@types/node":"^24.10.1","next":"^16.0.6","ts-node":"^10.9.2","tsup":"^8.5.1","typescript":"^5.9.3"},"dependencies":{"base-64":"^1.0.0"},"peerDependencies":{"next":">=14.0.0"},"_id":"ado-connector@1.0.5","gitHead":"ad0d49f16472c436ff802297ec96df4de674b34c","_nodeVersion":"22.17.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-m2ATXpFGNpLy1BuBLMj6a/hWrLKhbfJ7jb0SZIkWfQVFCpqZfsLcKhMx3Q/cn4TZkCxeamkyH5AIFJ6v2U1xkA==","shasum":"3ebb5724a9f851b18f7b8a82a28ab56c60c60df3","tarball":"https://registry.npmjs.org/ado-connector/-/ado-connector-1.0.5.tgz","fileCount":9,"unpackedSize":100957,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDMkBLADCWWq1G8xM75nkn1DMQHJxaeRLO9u5gK11u15AIgHsH8UUZCBbbxaGPl1BmZm742HgcZAG97MHj3xLNxM9k="}]},"_npmUser":{"name":"latiasthinh","email":"thomas.ng4542@gmail.com"},"directories":{},"maintainers":[{"name":"latiasthinh","email":"thomas.ng4542@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ado-connector_1.0.5_1765852871249_0.6903217013990455"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-02T07:39:18.733Z","modified":"2025-12-16T02:41:11.601Z","1.0.0":"2025-12-02T07:39:18.900Z","1.0.1":"2025-12-04T06:39:10.824Z","1.0.2":"2025-12-10T08:30:03.269Z","1.0.3":"2025-12-10T09:24:40.367Z","1.0.4":"2025-12-15T09:56:26.597Z","1.0.5":"2025-12-16T02:41:11.394Z"},"bugs":{"url":"https://github.com/latiosthinh/ado-connector/issues"},"license":"MIT","homepage":"https://github.com/latiosthinh/ado-connector#readme","keywords":["azure-devops","ado","nextjs","next","pipelines","artifacts","azure","devops","connector","api"],"repository":{"type":"git","url":"git+https://github.com/latiosthinh/ado-connector.git"},"description":"A simple, powerful library to expose Azure DevOps (ADO) capabilities in your Next.js application","maintainers":[{"name":"latiasthinh","email":"thomas.ng4542@gmail.com"}],"readme":"# ADO Connector for Next.js\r\n\r\n[![npm version](https://badge.fury.io/js/ado-connector.svg)](https://www.npmjs.com/package/ado-connector)\r\n[![Publish to NPM](https://github.com/latiosthinh/ado-connector/actions/workflows/publish.yml/badge.svg)](https://github.com/latiosthinh/ado-connector/actions/workflows/publish.yml)\r\n\r\nA simple, powerful library to expose Azure DevOps (ADO) capabilities in your Next.js application.\r\n\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install ado-connector\r\n# or\r\nyarn add ado-connector\r\n```\r\n\r\n## Usage\r\n\r\n### 1. Set up Environment Variables\r\n\r\nEnsure you have the following environment variables in your `.env.local`:\r\n\r\n```env\r\nADO_ORG=your-organization\r\nADO_PROJECT=your-project\r\nADO_PAT=your-personal-access-token\r\n```\r\n\r\n### 2. Create the API Route\r\n\r\nCreate a file at `app/api/ado/[[...ado]]/route.ts` (App Router) or `pages/api/ado/[[...ado]].ts` (Pages Router).\r\n\r\n**App Router (`app/api/ado/[[...ado]]/route.ts`):**\r\n\r\n```typescript\r\nimport { createAdoHandler } from 'ado-connector';\r\n\r\nconst handler = createAdoHandler({\r\n  organization: process.env.ADO_ORG!,\r\n  project: process.env.ADO_PROJECT!,\r\n  pat: process.env.ADO_PAT!,\r\n});\r\n\r\nexport { handler as GET, handler as POST, handler as PATCH };\r\n```\r\n\r\n### 3. Access the API\r\n\r\nNow your application exposes the following endpoints:\r\n\r\n#### Read Operations (GET)\r\n- `GET /api/ado/pipelines`: List all pipelines (enriched with latest run and artifacts).\r\n- `GET /api/ado/pipelines?mode=simple`: List all pipelines (basic info).\r\n- `GET /api/ado/pipelines?mode=simple&top=10&skip=0`: List pipelines with pagination.\r\n- `GET /api/ado/pipelines/:id`: Get pipeline details.\r\n- `GET /api/ado/pipelines/:id/runs`: Get runs for a pipeline.\r\n- `GET /api/ado/pipelines/:id/runs?top=20&skip=0`: Get runs with pagination.\r\n- `GET /api/ado/pipelines/:id/runs/:runId`: Get a specific run.\r\n- `GET /api/ado/builds/:id/artifacts`: Get artifacts for a specific build.\r\n- `GET /api/ado/repositories/:id/branches`: Get all branches for a repository.\r\n\r\n#### Write Operations (POST)\r\n- `POST /api/ado/pipelines/:id/runs`: Trigger a new pipeline run.\r\n\r\n#### Update Operations (PATCH)\r\n- `PATCH /api/ado/pipelines/:id/runs/:runId`: Cancel a running pipeline.\r\n\r\n### 4. Triggering Pipeline Runs\r\n\r\nYou can trigger a pipeline run by sending a POST request:\r\n\r\n```typescript\r\n// Trigger a pipeline run on the default branch\r\nconst response = await fetch('/api/ado/pipelines/123/runs', {\r\n  method: 'POST',\r\n  headers: { 'Content-Type': 'application/json' },\r\n  body: JSON.stringify({})\r\n});\r\n\r\n// Trigger a pipeline run on a specific branch\r\nconst response = await fetch('/api/ado/pipelines/123/runs', {\r\n  method: 'POST',\r\n  headers: { 'Content-Type': 'application/json' },\r\n  body: JSON.stringify({\r\n    resources: {\r\n      repositories: {\r\n        self: {\r\n          refName: 'refs/heads/main'\r\n        }\r\n      }\r\n    }\r\n  })\r\n});\r\n\r\n// Trigger with template parameters and variables\r\nconst response = await fetch('/api/ado/pipelines/123/runs', {\r\n  method: 'POST',\r\n  headers: { 'Content-Type': 'application/json' },\r\n  body: JSON.stringify({\r\n    templateParameters: {\r\n      environment: 'production'\r\n    },\r\n    variables: {\r\n      myVar: { value: 'myValue' },\r\n      secretVar: { value: 'secret', isSecret: true }\r\n    }\r\n  })\r\n});\r\n```\r\n\r\n## Features\r\n\r\n- **Easy Integration**: Plug and play with Next.js Route Handlers.\r\n- **Type Safe**: Written in TypeScript with full type definitions.\r\n- **Enriched Data**: Automatically aggregates pipeline runs and artifacts for a comprehensive view.\r\n- **Pipeline Triggers**: Trigger pipeline runs with custom parameters and variables.\r\n- **Run Management**: Cancel running pipelines with a simple PATCH request.\r\n- **Branch Discovery**: Automatically fetch and list repository branches.\r\n- **Smart Polling**: Built-in support for efficient run status polling.\r\n\r\n## What's New in v1.0.4\r\n\r\n- ✨ **Branch Selection**: New endpoint to fetch repository branches\r\n- 🔄 **Improved Polling**: Automatic stop on terminal states (canceling/completed)\r\n- 🐛 **Bug Fixes**: Better error handling and validation\r\n- 📚 See [Release Notes](docs/release/2025-12-15.md) for full details\r\n","readmeFilename":"README.md"}