{"_id":"@api-core/k6","name":"@api-core/k6","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@api-core/k6","version":"0.0.1","description":"Grafana k6 load testing engine executor for API-CORE","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","sideEffects":false,"license":"MIT","author":{"name":"Shanmuka Chandra Teja Anem","url":"https://github.com/shanmukaanem"},"contributors":[{"name":"Shanmuka Chandra Teja Anem"}],"homepage":"https://github.com/QECore/api-core#readme","repository":{"type":"git","url":"git+https://github.com/QECore/api-core.git"},"bugs":{"url":"https://github.com/QECore/api-core/issues"},"publishConfig":{"access":"public"},"engines":{"node":">=18.0.0"},"keywords":["api","client","k6","load-testing","testing","contract","type-safe","typescript"],"exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsup src/index.ts --format esm --dts --clean --external @api-core/client"},"dependencies":{"@api-core/client":"^0.0.1"},"_id":"@api-core/k6@0.0.1","gitHead":"b3afa2689b9fd48a2eb27955ec8ca91e2ebf241f","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-YJMoCLE9FTOsd4GAGo51gUipaJMtAOD2pBa+fa++tu2fDNLHD6l3fDa0mGKBbf+nSkkGSx6jP0dMH/J4Y2pgIw==","shasum":"018285b6762dc75abce34243ca79cbb307594002","tarball":"https://registry.npmjs.org/@api-core/k6/-/k6-0.0.1.tgz","fileCount":5,"unpackedSize":8001,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCL1ZNAfH+pDDaVMCoaKw+2g8aBD1KVmixygYxnumsVZgIhAKmxL1Rp06mFz0vra49eTFqmWHbvACx0pKEZP2vof4bl"}]},"_npmUser":{"name":"shanmukaanem","email":"shanmukaanem@gmail.com"},"directories":{},"maintainers":[{"name":"shanmukaanem","email":"shanmukaanem@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/k6_0.0.1_1784829509826_0.2957181683764105"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-23T17:58:29.677Z","0.0.1":"2026-07-23T17:58:29.977Z","modified":"2026-07-23T17:58:30.205Z"},"maintainers":[{"name":"shanmukaanem","email":"shanmukaanem@gmail.com"}],"description":"Grafana k6 load testing engine executor for API-CORE","homepage":"https://github.com/QECore/api-core#readme","keywords":["api","client","k6","load-testing","testing","contract","type-safe","typescript"],"repository":{"type":"git","url":"git+https://github.com/QECore/api-core.git"},"contributors":[{"name":"Shanmuka Chandra Teja Anem"}],"author":{"name":"Shanmuka Chandra Teja Anem","url":"https://github.com/shanmukaanem"},"bugs":{"url":"https://github.com/QECore/api-core/issues"},"license":"MIT","readme":"# @api-core/k6\n\nGrafana k6 load testing engine executor for **API-Core**. This package allows you to run type-safe, contract-first API requests inside your k6 performance scripts.\n\n## Installation\n\n```bash\nnpm install @api-core/k6 @api-core\n```\n\n## Quick Start\n\n```ts\nimport http from 'k6/http';\nimport { createClient } from '@api-core/k6';\nimport { registry } from './registry'; // Your API-Core registry\n\nexport default function () {\n  const client = createClient({\n    config: {\n      baseURL: 'https://test-api.example.com',\n    },\n    registry,\n    httpModule: http, // Pass k6/http module\n  });\n\n  const res = client.get('comment.getComment', {\n    path: { id: 1 },\n  });\n\n  console.log(`Status: ${res.status}`);\n}\n```\n\n## Features\n\n- **Type-Safe Load Testing**: Leverage API-Core's contract-first design to write robust, type-safe k6 load scripts.\n- **Native k6 Execution**: delegates requests directly to native `k6/http` for optimal performance.\n- **Clean Autocomplete**: IntelliSense is scoped strictly to k6-specific config options (`httpModule`, `mockHttp`).\n\n## Example\n\nFor a detailed performance script example, see [examples/src/tests/k6.test.ts](file:///z:/QECore/api-core/examples/src/tests/k6.test.ts).\n\n## API Overview\n\n### `createClient(options)`\nInstantiates the client. The options object accepts:\n- `registry`: The API-Core contract registry.\n- `config`: Global configuration overrides (like `baseURL`).\n- `httpModule`: The native `k6/http` import.\n- `mockHttp`: A mock k6 HTTP module for testing.\n\n## License\n\nMIT © Shanmuka Chandra Teja Anem\n\n## Contributing\n\nContributions are welcome! Please read the root contributing guidelines, open an issue, or submit a pull request.\n","readmeFilename":"README.md","_rev":"1-b030d87a5b9c1375e1f2360d0b2d8ee2"}