Submodules (TS) - #5823
Conversation
cloutiertyler
left a comment
There was a problem hiding this comment.
I think we need to break this into multiple PRs:
- A PR with just the high priority submodules that do not depend on
fetch/async procs, and whose API we've carefully designed (e.g. cron, resend, agents ?) - High priority ones that depend on
fetch/async procs - Low priority/nice to have ones ones (e.g. grid, lobby, api-keys)
Ale and I would like to make sure the APIs for all of these submodules are carefully designed because we're going to have to maintain them indefinitely. And with 1035 files in this PR it's a little too overwhelming to review.
|
We also want to make sure we use the correct conventions for typescript variable naming. I saw at least in one README an example code that used snake case for variable names. We should make sure both the code and the README examples have variable names consistent with the typescript conventions. Usually:
|
|
Split this into six smaller PRs, grouped by dependencies and review scope:
The integration PRs build on #5903. The final group builds on #5905 because its examples use auth and files. Each PR includes its documentation, tests, and examples. Closing this PR in favor of those focused reviews. The original branch remains available as a reference. |
Description of Changes
Adds reusable TypeScript submodules for SpacetimeDB, including:
Each submodule includes package metadata, documentation, tests, and an example where applicable. The change also adds shared example UI code and connects the packages to the existing pnpm workspace, lint configuration, and CI workflow.
Example screenshots
Agents
API Keys
Auth
Cron
Files
Grid
Lobby
PostHog
Presence
Rate Limit
Resend
Stripe
API and ABI breaking changes
No existing API or ABI is changed. This PR adds new TypeScript package APIs.
Expected complexity level and risk
3/5
The change is large, but most code is isolated in new top-level submodule folders. The main risk is in scheduled work, native HTTP routes, and external provider integrations such as Stripe, Resend, and PostHog.
Testing
Rollback safety impact
n/a