#213 Create shared DTOs package for lambdas#234
Open
nourshoreibah wants to merge 3 commits into
Open
Conversation
Replaces the per-lambda copies of db-types.d.ts and the duplicated auth DTO interfaces with a single types-only package in shared/dtos, installed in every lambda via a file: dependency. Since the package ships only .d.ts files, imports are erased at compile time and the deployed lambda.zip artifacts remain fully self contained. The lambda CLI now adds the package to new handlers, and the regenerate-db-types workflow writes the generated types into shared/dtos instead of copying them into each lambda. The unused shared git submodule is replaced by a regular directory. Co-authored-by: Cursor <cursoragent@cursor.com>
The package mostly contains kysely DB row types (closer to ORM models than DTOs), so name it for what it holds: shared/types exporting @branch/types. Co-authored-by: Cursor <cursoragent@cursor.com>
Coerce isAdmin to a boolean when building AuthorizationCheck mocks so allowed is always boolean, matching the shared type definition. Co-authored-by: Cursor <cursoragent@cursor.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
closes #213
Test plan
npm install+tscbuild pass in all 6 lambdasany)dist/contains no runtime reference to@branch/dtosinit-handlerscaffold includes the new dependency