aboutsummaryrefslogtreecommitdiffstats
path: root/packages/trpc/package.json (follow)
Commit message (Collapse)AuthorAgeFilesLines
* refactor: Extract ratelimiter into separate plugin (#2112)Mohamed Bassem2025-11-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor(trpc): extract rate limiter into dedicated plugin Move the rate limiting middleware from the trpc package to the centralized plugins package. This improves code organization by consolidating all plugins in a single location. Changes: - Created packages/plugins/trpc-ratelimit/ plugin - Moved rate limiter from packages/trpc/rateLimit.ts to packages/plugins/trpc-ratelimit/src/index.ts - Added trpc-ratelimit export to plugins package.json - Added @trpc/server dependency to plugins package - Updated trpc package to import from @karakeep/plugins/trpc-ratelimit - Added @karakeep/plugins dependency to trpc package - Removed packages/trpc/plugins/ directory * refactor(plugins): decouple rate limiter from tRPC Refactor the rate limiting plugin to be framework-agnostic, allowing it to be used outside of tRPC contexts. The plugin now has a generic core with a tRPC-specific adapter. Changes: - Renamed trpc-ratelimit to ratelimit plugin - Created generic RateLimiter class with framework-agnostic API - Added checkRateLimit() method that returns allow/deny results - Created separate tRPC adapter (src/trpc.ts) that uses the generic core - Exported both generic (RateLimiter, globalRateLimiter) and tRPC-specific (createRateLimitMiddleware) APIs - Updated trpc package to import from @karakeep/plugins/ratelimit - Updated plugins package.json exports Benefits: - Rate limiter can now be used in any context (HTTP handlers, WebSocket, etc.) - Cleaner separation of concerns - Easy to create adapters for other frameworks - Generic API allows for custom error handling * refactor(plugins): integrate rate limiter with plugin registry Refactor the rate limiting plugin to use the centralized plugin system with PluginManager, making it consistent with other plugins like queue and search providers. Changes: - Added RateLimit plugin type to PluginType enum - Created RateLimitClient interface in packages/shared/ratelimiting.ts - Created RateLimitProvider class implementing PluginProvider - Updated plugin to auto-register with PluginManager on import - Updated tRPC adapter to use getRateLimitClient() from PluginManager - Added ratelimit plugin to loadAllPlugins() in shared-server - Updated shared/plugins.ts with RateLimit type mapping Benefits: - Consistent plugin architecture across the codebase - Rate limiter can be swapped with alternative implementations - Centralized plugin management and logging - Better separation of concerns - Framework-agnostic core with tRPC adapter pattern * refactor(trpc): move rate limit middleware to trpc package Move the tRPC-specific rate limiting middleware from the plugins package to the trpc package, making the plugins package framework-agnostic. Changes: - Moved packages/plugins/ratelimit/src/trpc.ts to packages/trpc/lib/rateLimit.ts - Updated packages/trpc/index.ts to import from local lib/rateLimit - Removed tRPC export from packages/plugins/ratelimit/index.ts - Removed @trpc/server dependency from packages/plugins/package.json Benefits: - plugins package is now framework-agnostic - tRPC-specific code lives in the trpc package where it belongs - Cleaner separation of concerns - Rate limiter plugin can be used in any context without tRPC * refactor(plugins): rename to ratelimit-memory and add tests Rename the rate limiting plugin from "ratelimit" to "ratelimit-memory" to better indicate it's an in-memory implementation. This naming leaves room for future implementations like ratelimit-redis. Also added comprehensive test coverage. Changes: - Renamed packages/plugins/ratelimit to ratelimit-memory - Updated package.json export from ./ratelimit to ./ratelimit-memory - Updated shared-server to import @karakeep/plugins/ratelimit-memory - Added comprehensive unit tests (index.test.ts): - Rate limit enforcement tests - Window expiration tests - Identifier and path isolation tests - Reset functionality tests - Cleanup mechanism tests - Added provider integration tests (provider.test.ts): - PluginProvider interface compliance - Client singleton behavior - End-to-end rate limiting functionality Benefits: - More descriptive plugin name indicating the storage mechanism - Better test coverage ensuring reliability - Easier to add alternative implementations (Redis, etc.) * change the api to only take the key * move the serverConfig check to the trpc * fix lockfile * get rid of the timer --------- Co-authored-by: Claude <noreply@anthropic.com>
* refactor: Move callsites to liteque to be behind a pluginMohamed Bassem2025-09-141-1/+0
|
* refactor: Extract quota logic into its own classMohamed Bassem2025-09-061-1/+1
|
* fix: Respect wal mode for the queue dbMohamed Bassem2025-08-301-1/+1
|
* refactor: Extract meilisearch as a pluginMohamedBassem2025-07-271-0/+1
|
* chore: More turbo fixesMohamedBassem2025-07-271-2/+2
|
* fix: Fix package boundary violationsMohamedBassem2025-07-271-0/+1
|
* deps: Upgrade viteMohamed Bassem2025-07-261-1/+1
|
* deps: Upgrade trpcMohamed Bassem2025-07-261-1/+1
|
* feat: Add stripe based subscriptionsMohamed Bassem2025-07-131-0/+1
|
* deps: Upgrade drizzleMohamed Bassem2025-07-121-1/+1
|
* feat: Add invite user supportMohamed Bassem2025-07-101-1/+1
|
* feat: Add support for email verificationMohamed Bassem2025-07-101-0/+2
|
* feat: Add prometheus monitoring. Fixes #758Mohamed Bassem2025-07-061-0/+1
|
* chore: migrate away from eslint to oxlint (#1642)xuatz2025-06-221-9/+2
| | | | | | | * chore: migrate away from eslint to oxlint * revert turbo task name lint * it seems like we can remove the seemingly default globals
* feat: Implement generic rule engine (#1318)Mohamed Bassem2025-04-271-0/+2
| | | | | | | | | | | | | | | | | * Add schema for the new rule engine * Add rule engine backend logic * Implement the worker logic and event firing * Implement the UI changesfor the rule engine * Ensure that when a referenced list or tag are deleted, the corresponding event/action is * Dont show smart lists in rule engine events * Add privacy validations for attached tag and list ids * Move the rules logic into a models
* feat: Add an MCP server for karakeepMohamed Bassem2025-04-131-1/+1
|
* chore: Rename hoarder packages to karakeepMohamedBassem2025-04-121-8/+8
|
* deps: Upgrade trpc and react queryMohamed Bassem2025-03-221-1/+1
|
* deps: Upgrade vitestMohamed Bassem2025-03-221-1/+1
|
* fix: Revert the accidental upgrade of deps. #1107Mohamed Bassem2025-03-101-1/+1
|
* build(deps-dev): bump vitest from 1.3.1 to 1.6.1 (#1104)dependabot[bot]2025-03-091-1/+1
| | | | | | | | | | | | | | Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 1.3.1 to 1.6.1. - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Commits](https://github.com/vitest-dev/vitest/commits/v1.6.1/packages/vitest) --- updated-dependencies: - dependency-name: vitest dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Revert "ci: Run tests on push (#807)" (#808)Mohamed Bassem2025-01-021-2/+1
| | | This reverts commit 39358b1517a06b90b9886a648ce1c595d1556c8e.
* ci: Run tests on push (#807)Mohamed Bassem2025-01-021-1/+2
| | | | | | | * ci: Run tests on push * disable drizzle logging in tests * run db migrations in trpc tests
* chore: add format:fix and lint:fix scripts to all packagesMohamed Bassem (aider)2024-12-311-0/+2
|
* deps: Upgrade drizzle-orm to 0.38.3Mohamed Bassem2024-12-291-1/+1
|
* deps: Upgrade drizzle and next auth drizzle adapterMohamedBassem2024-09-151-1/+1
|
* format: Add missing lint and format, and format the entire repoMohamedBassem2024-03-301-0/+2
|
* refactor: Prepare for pagination by dropping querying bookmarks by idMohamedBassem2024-03-171-0/+1
|
* docker: Fix dockerfiles to adapt to the new repo structureMohamedBassem2024-03-141-4/+1
|
* structure: Create apps dir and copy tooling dir from t3-turbo repoMohamedBassem2024-03-141-5/+14
|
* build: Replace bcrypt with bcryptjsMohamedBassem2024-03-111-1/+2
|
* refactor: Extract trpc logic into its packageMohamedBassem2024-03-051-0/+28