{"_id":"@dain-os/e2e-auth","_rev":"2-8c01479abc124465f1f7f7c348bd2e86","name":"@dain-os/e2e-auth","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@dain-os/e2e-auth","version":"0.1.0","_id":"@dain-os/e2e-auth@0.1.0","maintainers":[{"name":"dane-krambergar","email":"hello@dain.agency"},{"name":"jack-dain","email":"jack.taylor@dain.agency"}],"bin":{"e2e-auth-seed":"seed.mjs","e2e-auth-launch":"launch.sh"},"dist":{"shasum":"ea031c79f298679418dfab1ec48a80e1dae3f558","tarball":"https://registry.npmjs.org/@dain-os/e2e-auth/-/e2e-auth-0.1.0.tgz","fileCount":10,"integrity":"sha512-TD9Ln+P6AYnmnQE+JG0ye9boyZ/pjcdZWkOqO9FNUyqFQUsvDgIGnudeAlY+fHERyopj0BjpMcMSY56YaPBCOA==","signatures":[{"sig":"MEYCIQCvSv1Fgf48FtjfywEaIH9pKZRzWFmmDkyQxWIch2swxwIhAOLvPEhnIK7BjGD1Fub+mj0entdFFN0Plz7wLGTztbnP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27369},"type":"module","gitHead":"124fa9c69e774d041907a54741c5d92f2e6fa65a","private":false,"_npmUser":{"name":"dane-krambergar","email":"hello@dain.agency"},"_npmVersion":"11.16.0","description":"Mints a real Supabase session and writes a Playwright storage-state for seeded E2E/MCP logins (host-scoped to localhost, port-agnostic).","directories":{},"_nodeVersion":"24.18.0","dependencies":{"sb250":"npm:@supabase/supabase-js@^2.50.0","@supabase/ssr":"0.7.0","playwright-core":"^1.61.1","@supabase/supabase-js":"^2.50.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/e2e-auth_0.1.0_1782919121850_0.13657252031023015","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@dain-os/e2e-auth","version":"0.1.1","private":false,"type":"module","description":"Mints a real Supabase session and writes a Playwright storage-state for seeded E2E/MCP logins (host-scoped to localhost, port-agnostic).","bin":{"e2e-auth-seed":"seed.mjs","e2e-auth-launch":"launch.sh"},"publishConfig":{"access":"public"},"dependencies":{"@supabase/ssr":"0.7.0","@supabase/supabase-js":"^2.50.0","playwright-core":"^1.61.1","sb250":"npm:@supabase/supabase-js@^2.50.0"},"gitHead":"883225648eb7f80b20ace15789db3d3bc6f68172","_id":"@dain-os/e2e-auth@0.1.1","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-wooYpGe9AqnfDgytiEFrSm6BmKMTc1k5BqeNb/PXT4NPMQxnTquLazkADoVoQoYLLWSd3uOv49W2YWKylZesJQ==","shasum":"1acf473cbc1c8deb60886db1fc3a25f8f019f278","tarball":"https://registry.npmjs.org/@dain-os/e2e-auth/-/e2e-auth-0.1.1.tgz","fileCount":10,"unpackedSize":27849,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDr01ETB52TBZGoAQb9nKOrbiXCS1hA3FpKtBpCmRZ5hQIgTdzsWnmf+ckrq+YkhQvZQ98hFpAEuYZS8xCs2E7y1p8="}]},"_npmUser":{"name":"dane-krambergar","email":"hello@dain.agency"},"directories":{},"maintainers":[{"name":"dane-krambergar","email":"hello@dain.agency"},{"name":"jack-dain","email":"jack.taylor@dain.agency"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/e2e-auth_0.1.1_1782920713626_0.6911071745861881"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-01T15:18:41.729Z","modified":"2026-07-01T15:45:13.964Z","0.1.0":"2026-07-01T15:18:41.993Z","0.1.1":"2026-07-01T15:45:13.772Z"},"description":"Mints a real Supabase session and writes a Playwright storage-state for seeded E2E/MCP logins (host-scoped to localhost, port-agnostic).","maintainers":[{"name":"dane-krambergar","email":"hello@dain.agency"},{"name":"jack-dain","email":"jack.taylor@dain.agency"}],"readme":"# @dain-os/e2e-auth\n\nMints a **real Supabase session** for a user and writes a Playwright\nstorage-state file, so `--isolated` Playwright MCP sessions start already\nlogged in — no interactive SSO/MFA. The cookie is reproduced via the same\n`@supabase/ssr` version the apps use, host-scoped to `localhost` so it works\nacross every evergreen dev port.\n\nShared dev-tooling package — install it in any repo whose apps you want to\ndrive with seeded Playwright/MCP logins.\n\n## Usage\n\n```bash\nnpm i -D @dain-os/e2e-auth\nnpx e2e-auth-seed <herbert|mabel|edna> <email> [envFile]\n# e.g. from a consuming repo root:\nnpx e2e-auth-seed herbert hello@dain.agency\n```\n\n**`envFile` resolution** (first hit wins):\n1. the `[envFile]` CLI arg\n2. `$E2E_AUTH_ENV_FILE`\n3. `<cwd>/apps/web/.env.local` — works when run from a consuming repo's root\n4. `~/dev/eoc-herbert/apps/web/.env.local` — dev-machine fallback\n\nThe chosen file must carry all three projects' Supabase keys. Output:\n`~/.cache/e2e-auth/<project>.json` (mode 600).\n\n## Playwright MCP integration\n\n`launch.sh <project> <email> <outdir> [envFile]` re-mints the session when the\nsaved state is stale (>45 min) and then execs `@playwright/mcp` with\n`--storage-state`. It degrades gracefully: if seeding fails it reuses any\nexisting state, and if there's none it launches unseeded so the MCP never\nhard-fails to start. Wire it into `~/.claude.json` as a stdio MCP server.\n\n## Tenant scoping\n\n`herbert` is tenant-scoped — its RLS reads `tenant_id` from the JWT\n(`app_metadata.tenant_id`), so `seed.mjs` requires that claim\n(`requiresTenant: true`) and fails loudly if it's missing. `mabel`/`edna` gate\non home membership keyed on `auth.uid()` instead, so they don't require a\n`tenant_id` claim and the seeder just notes its absence.\n\n## Notes\n\n- For MCP use, pass an explicit `envFile` as the 4th arg to `launch.sh` so the\n  seeder never depends on the caller's cwd (the MCP host's cwd is unspecified).\n- Consuming a published build requires `@dain-os/e2e-auth` to be published to\n  the registry (like other `@dain-os/*` packages); until then it resolves via\n  the workspace.\n","readmeFilename":"README.md"}