{"_id":"@api-core/playwright","name":"@api-core/playwright","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@api-core/playwright","version":"0.0.1","description":"Playwright HTTP / Browser request context 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","playwright","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/playwright@0.0.1","gitHead":"b3afa2689b9fd48a2eb27955ec8ca91e2ebf241f","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-FnHrNbydZDX8HO6T412+il3M8OHWtSeb2PrRQXkpVf9z6NA6OH6GtvTSKz97P4Y0VNyrEgYai14MYLinYB7zHw==","shasum":"7689aba5cc6c608241f93936c2372f4372137976","tarball":"https://registry.npmjs.org/@api-core/playwright/-/playwright-0.0.1.tgz","fileCount":5,"unpackedSize":10605,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCPKY8TnwnS0jnWR0zyTDI+Xdnh6gY2xpLLDnGbpMiT4QIgOoMW/9J2Ip1bKjYEZTZbvDdd8rZuQHHWFqFMnxD86q4="}]},"_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/playwright_0.0.1_1784829510167_0.5833494944920157"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-23T17:58:29.994Z","0.0.1":"2026-07-23T17:58:30.303Z","modified":"2026-07-23T17:58:30.539Z"},"maintainers":[{"name":"shanmukaanem","email":"shanmukaanem@gmail.com"}],"description":"Playwright HTTP / Browser request context executor for API-CORE","homepage":"https://github.com/QECore/api-core#readme","keywords":["api","client","playwright","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/playwright\n\nPlaywright executor implementation for **API-Core**. This package allows you to run type-safe, contract-first API requests backed by Playwright's `APIRequestContext` or browser `Page` context.\n\n## Installation\n\n```bash\nnpm install @api-core/playwright @api-core\n```\n\n## Quick Start\n\n```ts\nimport { test } from '@playwright/test';\nimport { createClient } from '@api-core/playwright';\nimport { registry } from './registry'; // Your API-Core registry\n\ntest('fetches user details', async ({ request }) => {\n  const client = createClient({\n    config: {\n      baseURL: 'https://api.example.com',\n    },\n    registry,\n    request, // Pass Playwright request context\n  });\n\n  const response = await client.get('users.getUser', {\n    path: { id: 42 },\n  });\n\n  console.log(response.data);\n});\n```\n\n## Features\n\n- **Type-Safe API Calls**: Fully typed request path parameters, query params, headers, and responses mapped from your contract registry.\n- **Playwright Context Integration**: Seamless integration with Playwright's `request` fixture, browser `page` context, or browser `context`.\n- **Automatic Auth & Cookie Management**: Retains context and headers/cookies across browser contexts.\n- **Production-Grade Autocomplete**: Offers clean IntelliSense scoped strictly to Playwright-specific parameters (e.g. `page`, `context`, `request`).\n\n## Example\n\nFor a detailed test suite example, see [examples/src/tests/playwright.test.ts](file:///z:/QECore/api-core/examples/src/tests/playwright.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- `request`: Playwright's `APIRequestContext` (from the `request` fixture).\n- `page`: Playwright's `Page` instance.\n- `context`: Playwright's `BrowserContext`.\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-13d9a6c48f36bbf072e4863d6e02a690"}