Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ee793b0
ts case-conversion module
Shubham8287 Feb 23, 2026
7c08c2e
Add Rust SDK test client for case conversion (TS module)
Feb 23, 2026
1aa05cf
Rewrite case-conversion tests to use query builder subscriptions
Feb 23, 2026
7c5b6c7
fix view
Shubham8287 Feb 23, 2026
76da451
Update client for module changes: view rename + type fixes
Feb 23, 2026
cdbe8db
Add Rust sdk-test-case-conversion module
Feb 23, 2026
044efda
fix rust typebuildr
Shubham8287 Feb 23, 2026
ecdc27a
ensure same schema
Shubham8287 Feb 25, 2026
ba8ef73
Add TypeScript SDK test for case-conversion modules
clockwork-labs-bot Feb 25, 2026
111d0e3
Fix TypeScript client path and script command
clockwork-labs-bot Feb 25, 2026
12bb8f0
Fix compile command: wrap in sh -c for shell operator support
clockwork-labs-bot Feb 25, 2026
f4e27e8
fix rust codegen
Shubham8287 Feb 25, 2026
2bb9e5b
rs client tests
Shubham8287 Feb 25, 2026
bf4e2b3
Add TypeScript SDK test client for case-conversion Rust module
clockwork-labs-bot Feb 25, 2026
1a42a1f
Merge branch 'master' into shub/case-tests
Shubham8287 Feb 25, 2026
dc24056
fix sourceName in schema
Shubham8287 Feb 25, 2026
00794bd
fix rust codegen
Shubham8287 Feb 25, 2026
39eb9fe
format
Shubham8287 Feb 25, 2026
eee44ea
fix
Shubham8287 Feb 25, 2026
e558d54
Merge branch 'shub/fix-ts-client' into shub/case-tests
Shubham8287 Feb 25, 2026
4de1a42
view test
Shubham8287 Feb 25, 2026
5552855
test-case-conversion
Shubham8287 Feb 25, 2026
e802e9d
Wire up case-conversion TS test client with pnpm workspace
clockwork-labs-bot Feb 25, 2026
e183b8c
fix package.json
Shubham8287 Mar 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ members = [
"modules/sdk-test-connect-disconnect",
"modules/sdk-test-procedure",
"modules/sdk-test-view",
"modules/sdk-test-case-conversion",
"modules/sdk-test-event-table",
"sdks/rust/tests/test-client",
"sdks/rust/tests/test-counter",
"sdks/rust/tests/connect_disconnect_client",
"sdks/rust/tests/procedure-client",
"sdks/rust/tests/view-client",
"sdks/rust/tests/case-conversion-client",
"sdks/rust/tests/event-table-client",
"tools/ci",
"tools/upgrade-version",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
dist/
80 changes: 80 additions & 0 deletions crates/bindings-typescript/case-conversion-test-client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Case Conversion Test Client (TypeScript)

TypeScript SDK test client for the Rust module `sdk-test-case-conversion`.
Tests that the TS SDK correctly handles case-converted names with digit boundaries.

## What it tests

- Table accessors: `player1`, `person2`, `person_at_level_2`
- Field names with digit boundaries: `player1Id`, `currentLevel2`, `status3Field`
- Nested structs: `personInfo.ageValue1`, `personInfo.scoreTotal`
- Enum variants: `Player2Status` (`Active1`, `BannedUntil`)
- Explicit reducer names: `banPlayer1`
- Query builder: filters on digit-boundary columns, right semijoins

## Prerequisites

1. Build the SpacetimeDB CLI and standalone server:

```bash
cargo build -p spacetimedb-cli -p spacetimedb-standalone
```

2. Build the TS SDK (from repo root):
```bash
cd crates/bindings-typescript && pnpm install && pnpm build
```

## Regenerate bindings

If the Rust module (`modules/sdk-test-case-conversion`) changes:

```bash
pnpm run generate
```

This runs `spacetime generate` against the module and formats the output.

## Run via the Rust test harness (recommended)

From the repo root:

```bash
cargo test -p spacetimedb-sdk --test test case_conversion_rust_ts_client
```

This compiles the Rust module, starts a local server, publishes the module, generates
bindings, builds the TS client, and runs each subcommand (`insert-player`, `insert-person`,
`ban-player`, `query-builder-filter`, `query-builder-join`).

## Run manually

1. Start the standalone server:

```bash
spacetime start
```

2. Publish the module:

```bash
spacetime publish sdk-test-case-conversion \
--module-path modules/sdk-test-case-conversion --server local
```

3. Generate bindings (if not already done):

```bash
cd crates/bindings-typescript/case-conversion-test-client
pnpm run generate
```

4. Build and run a test:
```bash
pnpm install
pnpm run build
SPACETIME_SDK_TEST_DB_NAME=sdk-test-case-conversion node dist/index.js insert-player
```

Available subcommands: `insert-player`, `insert-person`, `ban-player`,
`query-builder-filter`, `query-builder-join`.
Loading