Skip to content

Commit 5125f01

Browse files
committed
feat: Add Convex authentication flow with browser OAuth and credential detection
New Authentication Module: - Add src/cli/auth/convex-auth.ts with browser-based OAuth flow - Detect existing credentials from env vars, .env files, convex.json - Localhost callback server (auto-finds available port) - Styled HTML forms for credential input with Convex branding - Manual credential entry fallback - Test credentials with Convex API before returning Credential Detection: - Check CONVEX_URL/CONVEX_DEPLOYMENT an
1 parent c9811b3 commit 5125f01

12 files changed

Lines changed: 1833 additions & 384 deletions

File tree

.claude/settings.local.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@
2626
"Bash(git commit --no-verify -m \"$\\(cat <<''EOF''\nfeat: Multi-database adapter pattern + working rollback + updated README\n\nBREAKING CHANGE: Migration engine now uses DatabaseAdapter abstraction\n\nMulti-Database Support:\n- Add database adapter abstraction layer \\(src/adapters/\\)\n- Implement PostgreSQL, MySQL, SQLite, SQL Server adapters\n- Each adapter provides: connect, query, streamRows, getTableRowCount\n- StreamBatch interface with rows, totalFetched, isLastBatch, nextCursor\n- Factory function createAdapter\\(\\) auto-detects DB type from connection string\n\nMigration Engine Refactor:\n- TableMigrator now accepts DatabaseAdapter instead of Pool\n- Unified migrateWithAdapterStreaming\\(\\) replaces separate streaming/batching\n- Remove PostgreSQL-specific PostgresCursorStream and BatchTransform classes\n- MigrationEngine creates adapter from connection string automatically\n- ParallelMigrator updated to use adapter pattern\n\nConvex Client Improvements:\n- Add delete\\(\\) method - calls generated remove mutation\n- Add batchDelete\\(\\) method - calls generated batchRemove mutation \n- Implement truncateTable\\(\\) - queries all docs then batch deletes\n- Rollback now actually works using real delete methods\n\nDocumentation:\n- Complete README rewrite for SunSetter AQM+\n- Document all 4 supported databases\n- Add command reference and options\n- Add type mapping table\n- Add architecture diagram\n\nBuild: 0 errors, 56/56 tests passing\n\n🤖 Generated with [Claude Code]\\(https://claude.com/claude-code\\)\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
2727
"Bash(npm test:*)",
2828
"Bash(git commit -m \"$\\(cat <<''EOF''\nfeat: Add MCP server, CLI enhancements, and comprehensive tests\n\nMCP Server Integration:\n- New MCP server with 12 tools, 4 resources, 3 prompts\n- Tools: connect, introspect, generate schema/queries/mutations, migrate, rollback\n- Resources: schema://current, migration://status, convex://generated, config://current\n- Prompts: plan-migration, analyze-schema, optimize-migration\n- Config examples for Claude Code and Claude Desktop\n\nCLI Enhancements:\n- Add --version, --help-full flags\n- Add --json output mode for CI/CD pipelines\n- Add --quiet, --verbose, --config flags\n- Add config file support \\(.sunsetterrc, .sunsetterrc.json\\)\n- New commands: init, validate-config, doctor\n- Enhanced help system with examples\n\nCode Improvements:\n- Implement payload in progress bar \\(table name, phase display\\)\n- Implement batchNumber logging \\(every 100 batches, checkpoints every 50\\)\n- Implement options callbacks \\(validateRow, onRowError, checkpointCallback\\)\n- Implement dataType in check-constraint-converter \\(type-specific handling\\)\n\nNew Tests \\(158 total\\):\n- tests/config/config-loader.test.ts\n- tests/utils/fuzzy-match.test.ts\n- tests/convex/check-constraint-converter.test.ts\n- tests/cli/json-output.test.ts\n- tests/mcp/server.test.ts\n\nDocumentation:\n- Updated README with MCP integration guide\n- Added config file documentation\n- Added JSON output documentation\n- Added system requirements section\n\nBuild: 0 errors, 158/158 tests passing\n\n🤖 Generated with [Claude Code]\\(https://claude.com/claude-code\\)\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
29-
"Bash(git commit:*)"
29+
"Bash(git commit:*)",
30+
"WebFetch(domain:raw.githubusercontent.com)",
31+
"Bash(curl:*)",
32+
"Bash(cat:*)",
33+
"Bash(psql:*)",
34+
"Bash(node:*)",
35+
"Bash(timeout 5 node:*)"
3036
]
3137
}
3238
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ test.db
5656

5757
# Generated output (for testing)
5858
convex/
59+
out/
60+
1/
5961
*.prisma
6062
pagila*.sql
6163
sakila.db

package-lock.json

Lines changed: 72 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
"inquirer": "^9.2.12",
125125
"mssql": "^12.2.0",
126126
"mysql2": "^3.16.0",
127+
"open": "^11.0.0",
127128
"ora": "^7.0.1",
128129
"pg": "^8.11.3",
129130
"terminal-kit": "^3.1.2",

0 commit comments

Comments
 (0)