chub-dev 0.1.0 → 0.1.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -0
- package/bin/chub-mcp +2 -0
- package/dist/airtable/docs/database/javascript/DOC.md +1437 -0
- package/dist/airtable/docs/database/python/DOC.md +1735 -0
- package/dist/amplitude/docs/analytics/javascript/DOC.md +1282 -0
- package/dist/amplitude/docs/analytics/python/DOC.md +1199 -0
- package/dist/anthropic/docs/claude-api/javascript/DOC.md +503 -0
- package/dist/anthropic/docs/claude-api/python/DOC.md +389 -0
- package/dist/asana/docs/tasks/DOC.md +1396 -0
- package/dist/assemblyai/docs/transcription/DOC.md +1043 -0
- package/dist/atlassian/docs/confluence/javascript/DOC.md +1347 -0
- package/dist/atlassian/docs/confluence/python/DOC.md +1604 -0
- package/dist/auth0/docs/identity/javascript/DOC.md +968 -0
- package/dist/auth0/docs/identity/python/DOC.md +1199 -0
- package/dist/aws/docs/s3/javascript/DOC.md +1773 -0
- package/dist/aws/docs/s3/python/DOC.md +1807 -0
- package/dist/binance/docs/trading/javascript/DOC.md +1315 -0
- package/dist/binance/docs/trading/python/DOC.md +1454 -0
- package/dist/braintree/docs/gateway/javascript/DOC.md +1278 -0
- package/dist/braintree/docs/gateway/python/DOC.md +1179 -0
- package/dist/chromadb/docs/embeddings-db/javascript/DOC.md +1263 -0
- package/dist/chromadb/docs/embeddings-db/python/DOC.md +1707 -0
- package/dist/clerk/docs/auth/javascript/DOC.md +1220 -0
- package/dist/clerk/docs/auth/python/DOC.md +274 -0
- package/dist/cloudflare/docs/workers/javascript/DOC.md +918 -0
- package/dist/cloudflare/docs/workers/python/DOC.md +994 -0
- package/dist/cockroachdb/docs/distributed-db/DOC.md +1500 -0
- package/dist/cohere/docs/llm/DOC.md +1335 -0
- package/dist/datadog/docs/monitoring/javascript/DOC.md +1740 -0
- package/dist/datadog/docs/monitoring/python/DOC.md +1815 -0
- package/dist/deepgram/docs/speech/javascript/DOC.md +885 -0
- package/dist/deepgram/docs/speech/python/DOC.md +685 -0
- package/dist/deepl/docs/translation/javascript/DOC.md +887 -0
- package/dist/deepl/docs/translation/python/DOC.md +944 -0
- package/dist/deepseek/docs/llm/DOC.md +1220 -0
- package/dist/directus/docs/headless-cms/javascript/DOC.md +1128 -0
- package/dist/directus/docs/headless-cms/python/DOC.md +1276 -0
- package/dist/discord/docs/bot/javascript/DOC.md +1090 -0
- package/dist/discord/docs/bot/python/DOC.md +1130 -0
- package/dist/elasticsearch/docs/search/DOC.md +1634 -0
- package/dist/elevenlabs/docs/text-to-speech/javascript/DOC.md +336 -0
- package/dist/elevenlabs/docs/text-to-speech/python/DOC.md +552 -0
- package/dist/firebase/docs/auth/DOC.md +1015 -0
- package/dist/gemini/docs/genai/javascript/DOC.md +691 -0
- package/dist/gemini/docs/genai/python/DOC.md +555 -0
- package/dist/github/docs/octokit/DOC.md +1560 -0
- package/dist/google/docs/bigquery/javascript/DOC.md +1688 -0
- package/dist/google/docs/bigquery/python/DOC.md +1503 -0
- package/dist/hubspot/docs/crm/javascript/DOC.md +1805 -0
- package/dist/hubspot/docs/crm/python/DOC.md +2033 -0
- package/dist/huggingface/docs/transformers/DOC.md +948 -0
- package/dist/intercom/docs/messaging/javascript/DOC.md +1844 -0
- package/dist/intercom/docs/messaging/python/DOC.md +1797 -0
- package/dist/jira/docs/issues/javascript/DOC.md +1420 -0
- package/dist/jira/docs/issues/python/DOC.md +1492 -0
- package/dist/kafka/docs/streaming/javascript/DOC.md +1671 -0
- package/dist/kafka/docs/streaming/python/DOC.md +1464 -0
- package/dist/landingai-ade/docs/api/DOC.md +620 -0
- package/dist/landingai-ade/docs/sdk/python/DOC.md +489 -0
- package/dist/landingai-ade/docs/sdk/typescript/DOC.md +542 -0
- package/dist/landingai-ade/skills/SKILL.md +489 -0
- package/dist/launchdarkly/docs/feature-flags/javascript/DOC.md +1191 -0
- package/dist/launchdarkly/docs/feature-flags/python/DOC.md +1671 -0
- package/dist/linear/docs/tracker/DOC.md +1554 -0
- package/dist/livekit/docs/realtime/javascript/DOC.md +303 -0
- package/dist/livekit/docs/realtime/python/DOC.md +163 -0
- package/dist/mailchimp/docs/marketing/DOC.md +1420 -0
- package/dist/meilisearch/docs/search/DOC.md +1241 -0
- package/dist/microsoft/docs/onedrive/javascript/DOC.md +1421 -0
- package/dist/microsoft/docs/onedrive/python/DOC.md +1549 -0
- package/dist/mongodb/docs/atlas/DOC.md +2041 -0
- package/dist/notion/docs/workspace-api/javascript/DOC.md +1435 -0
- package/dist/notion/docs/workspace-api/python/DOC.md +1400 -0
- package/dist/okta/docs/identity/javascript/DOC.md +1171 -0
- package/dist/okta/docs/identity/python/DOC.md +1401 -0
- package/dist/openai/docs/chat/javascript/DOC.md +407 -0
- package/dist/openai/docs/chat/python/DOC.md +568 -0
- package/dist/paypal/docs/checkout/DOC.md +278 -0
- package/dist/pinecone/docs/sdk/javascript/DOC.md +984 -0
- package/dist/pinecone/docs/sdk/python/DOC.md +1395 -0
- package/dist/plaid/docs/banking/javascript/DOC.md +1163 -0
- package/dist/plaid/docs/banking/python/DOC.md +1203 -0
- package/dist/playwright-community/skills/login-flows/SKILL.md +108 -0
- package/dist/postmark/docs/transactional-email/DOC.md +1168 -0
- package/dist/prisma/docs/orm/javascript/DOC.md +1419 -0
- package/dist/prisma/docs/orm/python/DOC.md +1317 -0
- package/dist/qdrant/docs/vector-search/javascript/DOC.md +1221 -0
- package/dist/qdrant/docs/vector-search/python/DOC.md +1653 -0
- package/dist/rabbitmq/docs/message-queue/javascript/DOC.md +1193 -0
- package/dist/rabbitmq/docs/message-queue/python/DOC.md +1243 -0
- package/dist/razorpay/docs/payments/javascript/DOC.md +1219 -0
- package/dist/razorpay/docs/payments/python/DOC.md +1330 -0
- package/dist/redis/docs/key-value/javascript/DOC.md +1851 -0
- package/dist/redis/docs/key-value/python/DOC.md +2054 -0
- package/dist/registry.json +2817 -0
- package/dist/replicate/docs/model-hosting/DOC.md +1318 -0
- package/dist/resend/docs/email/DOC.md +1271 -0
- package/dist/salesforce/docs/crm/javascript/DOC.md +1241 -0
- package/dist/salesforce/docs/crm/python/DOC.md +1183 -0
- package/dist/search-index.json +1 -0
- package/dist/sendgrid/docs/email-api/javascript/DOC.md +371 -0
- package/dist/sendgrid/docs/email-api/python/DOC.md +656 -0
- package/dist/sentry/docs/error-tracking/javascript/DOC.md +1073 -0
- package/dist/sentry/docs/error-tracking/python/DOC.md +1309 -0
- package/dist/shopify/docs/storefront/DOC.md +457 -0
- package/dist/slack/docs/workspace/javascript/DOC.md +933 -0
- package/dist/slack/docs/workspace/python/DOC.md +271 -0
- package/dist/square/docs/payments/javascript/DOC.md +1855 -0
- package/dist/square/docs/payments/python/DOC.md +1728 -0
- package/dist/stripe/docs/api/DOC.md +1727 -0
- package/dist/stripe/docs/payments/DOC.md +1726 -0
- package/dist/stytch/docs/auth/javascript/DOC.md +1813 -0
- package/dist/stytch/docs/auth/python/DOC.md +1962 -0
- package/dist/supabase/docs/client/DOC.md +1606 -0
- package/dist/twilio/docs/messaging/python/DOC.md +469 -0
- package/dist/twilio/docs/messaging/typescript/DOC.md +946 -0
- package/dist/vercel/docs/platform/DOC.md +1940 -0
- package/dist/weaviate/docs/vector-db/javascript/DOC.md +1268 -0
- package/dist/weaviate/docs/vector-db/python/DOC.md +1388 -0
- package/dist/zendesk/docs/support/javascript/DOC.md +2150 -0
- package/dist/zendesk/docs/support/python/DOC.md +2297 -0
- package/package.json +22 -6
- package/skills/get-api-docs/SKILL.md +84 -0
- package/src/commands/annotate.js +83 -0
- package/src/commands/build.js +12 -1
- package/src/commands/feedback.js +150 -0
- package/src/commands/get.js +83 -42
- package/src/commands/search.js +7 -0
- package/src/index.js +43 -17
- package/src/lib/analytics.js +90 -0
- package/src/lib/annotations.js +57 -0
- package/src/lib/bm25.js +170 -0
- package/src/lib/cache.js +69 -6
- package/src/lib/config.js +8 -3
- package/src/lib/identity.js +99 -0
- package/src/lib/registry.js +103 -20
- package/src/lib/telemetry.js +86 -0
- package/src/mcp/server.js +177 -0
- package/src/mcp/tools.js +251 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: login-flows
|
|
3
|
+
description: Common login automation patterns for web apps using Playwright
|
|
4
|
+
metadata:
|
|
5
|
+
updated-on: "2026-02-01"
|
|
6
|
+
source: community
|
|
7
|
+
tags: "browser,automation,playwright,login,testing"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Login Flow Patterns for Playwright
|
|
11
|
+
|
|
12
|
+
Reusable patterns for automating login flows in end-to-end tests.
|
|
13
|
+
|
|
14
|
+
## Basic Username/Password Login
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { Page } from '@playwright/test';
|
|
18
|
+
|
|
19
|
+
async function login(page: Page, username: string, password: string) {
|
|
20
|
+
await page.goto('/login');
|
|
21
|
+
await page.fill('[name="username"]', username);
|
|
22
|
+
await page.fill('[name="password"]', password);
|
|
23
|
+
await page.click('button[type="submit"]');
|
|
24
|
+
await page.waitForURL('/dashboard');
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## OAuth / SSO Login
|
|
29
|
+
|
|
30
|
+
For OAuth flows that redirect to an external provider:
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
async function loginWithOAuth(page: Page) {
|
|
34
|
+
await page.goto('/login');
|
|
35
|
+
await page.click('text=Sign in with Google');
|
|
36
|
+
|
|
37
|
+
// Handle the OAuth popup or redirect
|
|
38
|
+
await page.fill('input[type="email"]', process.env.TEST_EMAIL!);
|
|
39
|
+
await page.click('text=Next');
|
|
40
|
+
await page.fill('input[type="password"]', process.env.TEST_PASSWORD!);
|
|
41
|
+
await page.click('text=Next');
|
|
42
|
+
|
|
43
|
+
// Wait for redirect back to app
|
|
44
|
+
await page.waitForURL('**/dashboard');
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Persisting Auth State (storageState)
|
|
49
|
+
|
|
50
|
+
Avoid logging in before every test by saving and reusing browser state:
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
// global-setup.ts — runs once before all tests
|
|
54
|
+
import { chromium } from '@playwright/test';
|
|
55
|
+
|
|
56
|
+
async function globalSetup() {
|
|
57
|
+
const browser = await chromium.launch();
|
|
58
|
+
const page = await browser.newPage();
|
|
59
|
+
|
|
60
|
+
await page.goto('/login');
|
|
61
|
+
await page.fill('[name="username"]', 'testuser');
|
|
62
|
+
await page.fill('[name="password"]', 'testpass');
|
|
63
|
+
await page.click('button[type="submit"]');
|
|
64
|
+
await page.waitForURL('/dashboard');
|
|
65
|
+
|
|
66
|
+
// Save signed-in state
|
|
67
|
+
await page.context().storageState({ path: './auth.json' });
|
|
68
|
+
await browser.close();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export default globalSetup;
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Then in `playwright.config.ts`:
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
export default defineConfig({
|
|
78
|
+
globalSetup: './global-setup.ts',
|
|
79
|
+
use: {
|
|
80
|
+
storageState: './auth.json',
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## MFA / 2FA Handling
|
|
86
|
+
|
|
87
|
+
For test environments with TOTP-based 2FA:
|
|
88
|
+
|
|
89
|
+
```typescript
|
|
90
|
+
import { authenticator } from 'otplib';
|
|
91
|
+
|
|
92
|
+
async function loginWithMFA(page: Page, secret: string) {
|
|
93
|
+
await login(page, 'user', 'pass');
|
|
94
|
+
|
|
95
|
+
// Generate TOTP code
|
|
96
|
+
const code = authenticator.generate(secret);
|
|
97
|
+
await page.fill('[name="totp"]', code);
|
|
98
|
+
await page.click('button[type="submit"]');
|
|
99
|
+
await page.waitForURL('/dashboard');
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Tips
|
|
104
|
+
|
|
105
|
+
- Always use `storageState` to avoid repeated logins — it's the single biggest speedup for E2E suites
|
|
106
|
+
- Use environment variables for credentials, never hardcode them
|
|
107
|
+
- For CI, consider a dedicated test user with stable credentials
|
|
108
|
+
- Use `page.waitForURL()` instead of arbitrary `waitForTimeout()` after login
|