-
-
Notifications
You must be signed in to change notification settings - Fork 55
feat/auto-deploy #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat/auto-deploy #15
Changes from 7 commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
2bd2fb4
chore: update VSCode configuration files and tasks
lumpinif 4cf3c72
feat(auth): implement getSessionWithAPIKey route
lumpinif ec6c347
feat(db): add isNull function to index export
lumpinif 213808f
feat(auth): add type definitions for AuthWorkerRpc
lumpinif 4593b35
feat(auth): enhance authentication modes and JWT support
lumpinif daf85c7
feat(jwt): add JWT minting script and CLI command
lumpinif 41ee950
feat(jwt): enhance JWT minting script with environment variable updates
lumpinif e9ecce3
ref(auth): add example environment variable file for local development
lumpinif caca878
feat(auth): implement jwt auth mode and enhance navigation
lumpinif 4a18208
feat(playground): update references from "Dashboard" to "Playground" …
lumpinif a020a16
feat(logging): enable activity logs and add local migration command
lumpinif c24dcc8
fix(auth): simplify getAuthMode function by removing redundant JWT check
lumpinif 5f04f55
chore(vscode): update workspace and task configurations for Playground
lumpinif ff86ffe
chore(ui): update component configurations and formatting settings
lumpinif eb9e468
fix(logs): update default log limit to 10 and adjust card styling
lumpinif 6582e0e
feat(env): introduce centralized runtime configuration and environmen…
lumpinif 19c49db
ref(auth): add comprehensive authentication modes documentation and r…
lumpinif 60db796
ref(auth): update environment variable configurations and improve aut…
lumpinif a806ab6
chore(workspace): update workspace configuration and add environment …
lumpinif 960ee7e
pkg:auth:chore converge url/origin config
lumpinif 30c483f
workers:v0:chore harden cors + urls
lumpinif 7b00e4d
pkg:sdk:fix map legacy unauthorized codes
lumpinif ef9e23d
fix(logs): enhance error handling in log processing and export functions
lumpinif f96c2e9
ref(env): update environment variable configurations and remove depre…
lumpinif f499cdd
ref(cors): streamline CORS configuration and enhance security
lumpinif 4bc64c9
ref(auth): update worker configuration and environment variable defin…
lumpinif 99c2a2d
ref(vscode): enhance task configurations for environment management a…
lumpinif f9767b3
ref(urls): centralize URL handling and improve absolute URL resolution
lumpinif 241d28a
ref(env): update environment variable examples and sync process
lumpinif 5948e43
ref(auth): reorder dependencies in package.json for better clarity
lumpinif cb6288b
ref(dependencies): add '@deepcrawl/runtime' dependency to pnpm-lock.yaml
lumpinif 787c60f
ref(auth): update worker configuration and environment variable defin…
lumpinif 9923b1d
ref(config): update Biome configuration and workspace settings
lumpinif 851ee92
ref(playground): implement API key management and fallback authentica…
lumpinif fbb89e7
ref(branding): implement dynamic brand name configuration
lumpinif f6d765c
ref(auth): enhance API key extraction and improve authorization handling
lumpinif 9b32a17
ref(auth): enhance cookie-based authentication and API key management
lumpinif 9bc9609
ref(env): enhance environment variable management and synchronization
lumpinif 01493eb
ref(tasks): streamline CI checks and update package scripts
lumpinif d39e4b6
ref(lint): enhance lint-staged configuration with absolute path handl…
lumpinif ad5b4c8
ref(formatting): add default formatter for JavaScript in workspace an…
lumpinif 5294db5
ref(husky): enhance pre-push script for changeset checks and CI valid…
lumpinif 449fd39
chore: add changeset for '@deepcrawl/contracts' with no release
lumpinif d42c8da
ref(rate-limiting): implement Upstash Redis for API rate limiting
lumpinif c43601d
ref(rate-limiting): refactor rate limit middleware and introduce API …
lumpinif e1f7377
chore(deps): update package dependencies across multiple packages
lumpinif bc741ec
ref(auth): integrate new rate limiting configuration for authenticati…
lumpinif a3704b9
ref(playground): improve validation handling for playground operations
lumpinif e8fb9a1
feat(deploy-attribution): add Deploy Attribution Banner component and…
lumpinif 855fbc5
chore(deps): update package dependencies to use catalog references
lumpinif ac1820a
feat(auth): enhance API key handling and improve logging in middleware
lumpinif eb6dfbc
feat(jwt): update JWT handling and configuration documentation
lumpinif 0d4e3b2
refactor: update layout and component structures for improved clarity…
lumpinif 32d4301
feat(jwt): enhance JWT minting process with environment key management
lumpinif 6920b6c
refactor: update component structures and improve error handling
lumpinif 4d36087
fix(jwt-mint): improve argument parsing and error handling
lumpinif 9cecf3b
refactor(cors, jwt-auth): simplify trusted origins and enhance sessio…
lumpinif db6e9a7
feat(github-actions): add workflow to sync template branch with main
lumpinif cde09d7
chore(github-actions): enhance sync workflow with concurrency control
lumpinif File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "recommendations": ["biomejs.biome"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "biome.enabled": true, | ||
| "biome.requireConfiguration": true, | ||
| "editor.defaultFormatter": "biomejs.biome", | ||
| "editor.formatOnSave": true, | ||
| "editor.codeActionsOnSave": { | ||
| "source.action.useSortedAttributes.biome": "explicit", | ||
| "source.organizeImports.biome": "explicit", | ||
| "source.fixAll.biome": "explicit" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,130 @@ | ||
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "Start Frontend & Backend", | ||
| "detail": "Start dashboard (Next.js) and workers (Cloudflare Workers) in parallel terminal windows", | ||
| "dependsOn": ["Start Dashboard", "Start Workers"], | ||
| "dependsOrder": "parallel", | ||
| "presentation": { | ||
| "panel": "new", | ||
| "group": "dev", | ||
| "reveal": "always", | ||
| "clear": true | ||
| }, | ||
| "group": { | ||
| "isDefault": true | ||
| } | ||
| }, | ||
| { | ||
| "label": "Start All Dev Services", | ||
| "detail": "Start all dev services in one terminal window with turbo dev", | ||
| "type": "shell", | ||
| "command": "pnpm dev", | ||
| "options": { | ||
| "cwd": "${workspaceFolder}" | ||
| }, | ||
| "isBackground": true, | ||
| "problemMatcher": [], | ||
| "presentation": { | ||
| "panel": "new", | ||
| "group": "dev", | ||
| "reveal": "always", | ||
| "clear": true | ||
| } | ||
| }, | ||
| { | ||
| "label": "Start Dashboard", | ||
| "detail": "Start dashboard dev server (Next.js)", | ||
| "type": "shell", | ||
| "command": "pnpm dev", | ||
| "options": { | ||
| "cwd": "${workspaceFolder}/apps/app" | ||
| }, | ||
| "isBackground": true, | ||
| "problemMatcher": [], | ||
| "presentation": { | ||
| "panel": "new", | ||
| "group": "dev", | ||
| "reveal": "always", | ||
| "clear": true | ||
| } | ||
| }, | ||
| { | ||
| "label": "Start Auth Worker", | ||
| "detail": "Start auth worker dev server (Wrangler)", | ||
| "type": "shell", | ||
| "command": "pnpm dev", | ||
| "options": { | ||
| "cwd": "${workspaceFolder}/apps/workers/auth" | ||
| }, | ||
| "isBackground": true, | ||
| "problemMatcher": [], | ||
| "presentation": { | ||
| "panel": "new", | ||
| "group": "dev", | ||
| "reveal": "always", | ||
| "clear": true | ||
| } | ||
| }, | ||
| { | ||
| "label": "Start V0 Worker", | ||
| "detail": "Start v0 worker dev server (Wrangler)", | ||
| "type": "shell", | ||
| "command": "pnpm dev", | ||
| "options": { | ||
| "cwd": "${workspaceFolder}/apps/workers/v0" | ||
| }, | ||
| "isBackground": true, | ||
| "problemMatcher": [], | ||
| "presentation": { | ||
| "panel": "new", | ||
| "group": "dev", | ||
| "reveal": "always", | ||
| "clear": true | ||
| } | ||
| }, | ||
| { | ||
| "label": "Start Workers", | ||
| "detail": "Start auth + v0 workers in parallel", | ||
| "dependsOn": ["Start Auth Worker", "Start V0 Worker"], | ||
| "dependsOrder": "parallel", | ||
| "presentation": { | ||
| "panel": "new", | ||
| "group": "dev", | ||
| "reveal": "always", | ||
| "clear": true | ||
| } | ||
| }, | ||
| { | ||
| "label": "Generate Worker Auth Types", | ||
| "detail": "Generate Cloudflare types for auth worker", | ||
| "type": "shell", | ||
| "command": "pnpm cf-typegen", | ||
| "options": { | ||
| "cwd": "${workspaceFolder}/apps/workers/auth" | ||
| }, | ||
| "presentation": { | ||
| "panel": "new", | ||
| "group": "tools", | ||
| "reveal": "always", | ||
| "clear": true | ||
| } | ||
| }, | ||
| { | ||
| "label": "Generate Worker V0 Types", | ||
| "detail": "Generate Cloudflare types for v0 worker", | ||
| "type": "shell", | ||
| "command": "pnpm cf-typegen", | ||
| "options": { | ||
| "cwd": "${workspaceFolder}/apps/workers/v0" | ||
| }, | ||
| "presentation": { | ||
| "panel": "new", | ||
| "group": "tools", | ||
| "reveal": "always", | ||
| "clear": true | ||
| } | ||
| } | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import { getAuth } from '@deepcrawl/auth/lib/auth'; | ||
| import { NextResponse } from 'next/server'; | ||
|
|
||
| export async function POST(request: Request) { | ||
| const body = await request.json().catch(() => ({})); | ||
| const apiKey = | ||
| body?.apiKey ?? | ||
| request.headers.get('x-api-key') ?? | ||
| request.headers.get('authorization')?.replace('Bearer ', ''); | ||
|
|
||
| if (!apiKey) { | ||
| return NextResponse.json( | ||
| { error: 'Missing API key' }, | ||
| { | ||
| status: 400, | ||
| }, | ||
| ); | ||
| } | ||
|
|
||
| const auth = getAuth(); | ||
| const headers = new Headers(request.headers); | ||
| headers.set('x-api-key', apiKey); | ||
|
|
||
| const session = await auth.api.getSession({ headers }); | ||
| return NextResponse.json(session); | ||
lumpinif marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import { WorkerEntrypoint } from 'cloudflare:workers'; | ||
| import type { Session } from '@deepcrawl/auth/types'; | ||
|
|
||
| /** | ||
| * Type-only RPC surface for the auth worker service binding. | ||
| * Keep this file free of runtime code or worker env dependencies. | ||
| */ | ||
| export default class AuthWorkerRpc extends WorkerEntrypoint { | ||
| getSessionWithAPIKey(apiKey: string): Promise<Session | undefined>; | ||
| clearApiKeyCache(apiKey: string): Promise<void>; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.