Tags: clockworklabs/SpacetimeDB
Tags
fix: fix useSpacetimeDBQuery returns untyped rows for TanStack Start (#… …4488) # Description of Changes - Fix useSpacetimeDBQuery returns untyped rows for TanStack Start Closes #4441 <!-- Please describe your change, mention any related tickets, and so on here. --> # API and ABI breaking changes <!-- If this is an API or ABI breaking change, please apply the corresponding GitHub label. --> # Expected complexity level and risk <!-- How complicated do you think these changes are? Grade on a scale from 1 to 5, where 1 is a trivial change, and 5 is a deep-reaching and complex change. This complexity rating applies not only to the complexity apparent in the diff, but also to its interactions with existing and future code. If you answered more than a 2, explain what is complex about the PR, and what other components it interacts with in potentially concerning ways. --> # Testing <!-- Describe any testing you've done, and any testing you'd like your reviewers to do, so that you're confident that all the changes work as expected! --> - [ ] <!-- maybe a test you want to do --> - [ ] <!-- maybe a test you want a reviewer to do, so they can check it off when they're satisfied. -->
fix: fix useSpacetimeDBQuery returns untyped rows for TanStack Start (#… …4488) # Description of Changes - Fix useSpacetimeDBQuery returns untyped rows for TanStack Start Closes #4441 <!-- Please describe your change, mention any related tickets, and so on here. --> # API and ABI breaking changes <!-- If this is an API or ABI breaking change, please apply the corresponding GitHub label. --> # Expected complexity level and risk <!-- How complicated do you think these changes are? Grade on a scale from 1 to 5, where 1 is a trivial change, and 5 is a deep-reaching and complex change. This complexity rating applies not only to the complexity apparent in the diff, but also to its interactions with existing and future code. If you answered more than a 2, explain what is complex about the PR, and what other components it interacts with in potentially concerning ways. --> # Testing <!-- Describe any testing you've done, and any testing you'd like your reviewers to do, so that you're confident that all the changes work as expected! --> - [ ] <!-- maybe a test you want to do --> - [ ] <!-- maybe a test you want a reviewer to do, so they can check it off when they're satisfied. -->
`cargo bump-versions` properly updates the smoketests lockfile (#4462) # Description of Changes Previously `bump-versions` would push a failing commit because the smoketests had a diff. This fixes that by having `bump-versions` update that lockfile. # API and ABI breaking changes None. # Expected complexity level and risk 1 # Testing - [x] Ran `cargo bump-versions --all 3.0.0` and confirmed that the lockfile was updated Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Fix `spacetime dev` template issues and clean up CLI (#4396) ## Summary Multiple fixes and improvements to `spacetime dev`, `spacetime publish`, `spacetime init`, and templates: ### CLI fixes - **Fix `spacetime dev` watch path and .env.local handling** for templates with a `spacetimedb/` subdirectory - **Validate package manager availability** before installing dependencies — re-prompts if the selected PM isn't on PATH - **Remove JS/TS beta warning** from `spacetime publish` - **Remove unstable warning** from `spacetime init` - **Remove unused `spacetime energy` command** (can be re-added later when properly implemented) - **Fix `tsc` detection on Windows** — `set_extension(".cmd")` produced `tsc..cmd` (double dot); fixed to `set_extension("cmd")` - **Add `typescript` as devDependency** to all server template `spacetimedb/package.json` files so `tsc` is available during build - **Strip `\?\` extended-length path prefix** from user-facing output in both `dev` and `publish` commands (produced by `fs::canonicalize()` on Windows) - **Fix publish reporting success when user declines** non-local server prompt — changed `return Ok(())` to `bail!()` consistent with other abort cases - **Forward stdin to client process** in `spacetime dev` so interactive CLI templates work ### Template fixes - **Fix Angular template environment variables** — Angular's esbuild builder doesn't support `import.meta.env`, so we use a dev script to generate `environment.local.ts` with Angular's native `fileReplacements` pattern - **Fix TanStack Start template** — rename `createRouter` to `getRouter` (v1.121+ breaking change), upgrade to React 19, and add `@vitejs/plugin-react` for automatic JSX runtime support - **Fix `moduleResolution` in remix-ts and nextjs-ts** server tsconfigs — change from `"node"` to `"bundler"` to support subpath exports like `spacetimedb/server` - **Fix browser-ts template** — convert from static HTML + IIFE bundle to standard Vite dev server app so it works with `spacetime dev` and reads env vars from `.env.local` - **Add `deno` as devDependency** to deno-ts template (matches how bun-ts includes bun) - **Convert basic-ts from empty web app to CLI app** matching basic-rs — connect, subscribe to person table, print on insert ## Test plan - [x] `cargo test -p spacetimedb-cli` — all 133 tests pass - [ ] `spacetime dev --template angular-ts` — verify Angular app connects with correct database name - [ ] `spacetime dev --template react-ts` — verify React template still works - [ ] `spacetime dev --template tanstack-ts` — verify TanStack Start template loads without errors - [ ] `spacetime dev --template remix-ts` — verify Remix template builds and runs - [ ] `spacetime dev --template nextjs-ts` — verify Next.js template still works - [ ] `spacetime dev --template browser-ts` — verify Vite dev server starts and app connects - [ ] `spacetime dev --template bun-ts` — verify Bun CLI template runs interactively - [ ] `spacetime dev --template basic-ts` — verify CLI connects and prints on insert - [ ] Verify no `\?\` prefix in any displayed paths on Windows - [ ] Verify no `tsc not found` warning when building server modules - [ ] Select unavailable package manager at init prompt — verify re-prompt - [ ] Decline non-local server prompt — verify clean error instead of "Published successfully!" --------- Co-authored-by: Piotr Sarnacki <drogus@gmail.com> Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com> Co-authored-by: clockwork-labs-bot <bot@clockworklabs.com>
TS Quickstart: Store different auth tokens for different servers/modu… …les (#3252) # Description of Changes In the typescript quickstart example, this includes the server and module name in the local storage variable name that we use for the auth token. This fixes an otherwise annoying issue people run into if they start running the quickstart locally, then try to run it on maincloud. If they have already run the app with a local server, their browser will store the locally signed token, which will get rejected by maincloud. # Expected complexity level and risk 1. # Testing I was able to connect to my local quickstart, then change the variables to point to a module on maincloud, and I didn't get any errors. Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
add missing TypeScript language for 'Module can be written in' (#4205) # Description of Changes When reading the docs, I noticed that even though TypeScript is included in most of the examples, the text at the top of the 'Key Architecture' section doesn't mention it as a language that can be used to write Modules. This change simply adds TypeScript to the list of languages that can be used to write Modules. This is my first ever pull request, so my apologies if this change is considered too small. # API and ABI breaking changes None # Expected complexity level and risk 1 # Testing I've not done any testing considering the size of the changes. Signed-off-by: Luuk Domhof <60610562+ExpLuuk@users.noreply.github.com> Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
PreviousNext