diff --git a/.github/workflows/typescript-test.yml b/.github/workflows/typescript-test.yml index 9affa726f47..fbd3816a8fd 100644 --- a/.github/workflows/typescript-test.yml +++ b/.github/workflows/typescript-test.yml @@ -115,12 +115,12 @@ jobs: fi - name: Generate client bindings - working-directory: templates/quickstart-chat-typescript + working-directory: templates/chat-react-ts run: | pnpm generate - name: Check for changes - working-directory: templates/quickstart-chat-typescript + working-directory: templates/chat-react-ts run: | "${GITHUB_WORKSPACE}"/tools/check-diff.sh src/module_bindings || { echo "Error: Bindings are dirty. Please generate bindings again and commit them to this branch." @@ -144,7 +144,7 @@ jobs: # spacetime logs quickstart-chat - name: Check that quickstart-chat builds - working-directory: templates/quickstart-chat-typescript + working-directory: templates/chat-react-ts run: pnpm build - name: Check that templates build diff --git a/Cargo.toml b/Cargo.toml index a63949f1fcd..1001d8921b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ members = [ "modules/keynote-benchmarks", "modules/perf-test", "modules/module-test", - "templates/quickstart-chat-rust/spacetimedb", + "templates/chat-console-rs/spacetimedb", "modules/sdk-test", "modules/sdk-test-connect-disconnect", "modules/sdk-test-procedure", diff --git a/crates/bindings-typescript/package.json b/crates/bindings-typescript/package.json index 7b83e8e1c4f..4b30509038e 100644 --- a/crates/bindings-typescript/package.json +++ b/crates/bindings-typescript/package.json @@ -36,10 +36,10 @@ "generate:moduledef": "cargo run -p spacetimedb-codegen --example regen-typescript-moduledef && prettier --write src/lib/autogen", "generate:client-api": "cargo run -p generate-client-api && prettier --write src/sdk/client_api", "generate:test-app": "pnpm --filter @clockworklabs/test-app generate", - "generate:examples:quickstart-chat": "pnpm --filter @clockworklabs/quickstart-chat generate", - "generate:examples:basic-react": "pnpm --filter @clockworklabs/basic-react generate", + "generate:examples:chat-react-ts": "pnpm --filter @clockworklabs/chat-react-ts generate", + "generate:examples:react-ts": "pnpm --filter @clockworklabs/react-ts generate", "generate:examples:empty": "pnpm --filter @clockworklabs/empty-client generate", - "generate": "pnpm generate:moduledef && pnpm generate:client-api && pnpm generate:test-app && pnpm generate:examples:quickstart-chat && pnpm generate:examples:basic-react && pnpm generate:examples:empty", + "generate": "pnpm generate:moduledef && pnpm generate:client-api && pnpm generate:test-app && pnpm generate:examples:chat-react-ts && pnpm generate:examples:react-ts && pnpm generate:examples:empty", "prepublishOnly": "pnpm run build && pnpm run test && pnpm run size" }, "main": "dist/index.cjs", diff --git a/crates/cli/build.rs b/crates/cli/build.rs index e49f1e0cbad..00f97dfa3f7 100644 --- a/crates/cli/build.rs +++ b/crates/cli/build.rs @@ -314,8 +314,8 @@ fn generate_template_entry(code: &mut String, template_path: &Path, source: &str // Example: crates/cli let manifest_rel = manifest_canonical.strip_prefix(&repo_root_canonical).unwrap(); - // Example for inside crate: /Users/user/SpacetimeDB/crates/cli/templates/basic-rust/server - // Example for outside crate: /Users/user/SpacetimeDB/modules/quickstart-chat + // Example for inside crate: /Users/user/SpacetimeDB/crates/cli/templates/basic-rs/server + // Example for outside crate: /Users/user/SpacetimeDB/modules/chat-console-rs let resolved_canonical = repo_root.join(&resolved_base).canonicalize().unwrap(); // If the files are outside of the cli crate we need to copy them to the crate directory, @@ -337,8 +337,8 @@ fn generate_template_entry(code: &mut String, template_path: &Path, source: &str code.push_str(" let mut files = HashMap::new();\n"); for file_path in git_files { - // Example file_path: modules/quickstart-chat/src/lib.rs (relative to repo root) - // Example resolved_base: modules/quickstart-chat + // Example file_path: modules/chat-console-rs/src/lib.rs (relative to repo root) + // Example resolved_base: modules/chat-console-rs // Example relative_path: src/lib.rs let relative_path = match file_path.strip_prefix(&resolved_base) { Ok(p) => p, @@ -360,33 +360,33 @@ fn generate_template_entry(code: &mut String, template_path: &Path, source: &str if full_path.exists() && full_path.is_file() { let include_path = if let Some(ref copy_dir) = local_copy_dir { // Outside crate: copy to .templates - // Example dest_file: /Users/user/SpacetimeDB/crates/cli/.templates/parent_parent_modules_quickstart-chat/src/lib.rs + // Example dest_file: /Users/user/SpacetimeDB/crates/cli/.templates/parent_parent_modules_chat-console-rs/src/lib.rs let dest_file = copy_dir.join(relative_path); fs::create_dir_all(dest_file.parent().unwrap()).expect("Failed to create parent directory"); copy_if_changed(&full_path, &dest_file) .unwrap_or_else(|_| panic!("Failed to copy file {:?} to {:?}", full_path, dest_file)); - // Example relative_to_manifest: .templates/parent_parent_modules_quickstart-chat/src/lib.rs + // Example relative_to_manifest: .templates/parent_parent_modules_chat-console-rs/src/lib.rs let relative_to_manifest = dest_file.strip_prefix(manifest_dir).unwrap(); let path_str = relative_to_manifest.to_str().unwrap().replace("\\", "/"); // Watch the original file for changes - // Example: modules/quickstart-chat/src/lib.rs + // Example: modules/chat-console-rs/src/lib.rs println!("cargo:rerun-if-changed={}", full_path.display()); path_str } else { // Inside crate: use path relative to CARGO_MANIFEST_DIR - // Example file_path: crates/cli/templates/basic-rust/server/src/lib.rs + // Example file_path: crates/cli/templates/basic-rs/server/src/lib.rs // Example manifest_rel: crates/cli - // Result: templates/basic-rust/server/src/lib.rs + // Result: templates/basic-rs/server/src/lib.rs let relative_to_manifest = file_path.strip_prefix(manifest_rel).unwrap(); let path_str = relative_to_manifest.to_str().unwrap().replace("\\", "/"); - // Example: crates/cli/templates/basic-rust/server/src/lib.rs + // Example: crates/cli/templates/basic-rs/server/src/lib.rs println!("cargo:rerun-if-changed={}", full_path.display()); path_str }; - // Example include_path (inside crate): "templates/basic-rust/server/src/lib.rs" - // Example include_path (outside crate): ".templates/parent_parent_modules_quickstart-chat/src/lib.rs" + // Example include_path (inside crate): "templates/basic-rs/server/src/lib.rs" + // Example include_path (outside crate): ".templates/parent_parent_modules_chat-console-rs/src/lib.rs" // Example relative_str: "src/lib.rs" code.push_str(&format!( " files.insert(\"{}\", include_str!(concat!(env!(\"CARGO_MANIFEST_DIR\"), \"/{}\")));\n", diff --git a/crates/cli/src/subcommands/init.rs b/crates/cli/src/subcommands/init.rs index 8530bde2933..0d313afc545 100644 --- a/crates/cli/src/subcommands/init.rs +++ b/crates/cli/src/subcommands/init.rs @@ -1484,11 +1484,11 @@ pub async fn exec(mut config: Config, args: &ArgMatches) -> anyhow::Result anyhow::Result<()> { let export_files = vec![ ( - include_str!("../../../../templates/basic-rust/spacetimedb/Cargo.toml"), + include_str!("../../../../templates/basic-rs/spacetimedb/Cargo.toml"), "Cargo.toml", ), ( - include_str!("../../../../templates/basic-rust/spacetimedb/src/lib.rs"), + include_str!("../../../../templates/basic-rs/spacetimedb/src/lib.rs"), "src/lib.rs", ), ]; @@ -1508,15 +1508,15 @@ pub fn init_rust_project(project_path: &Path) -> anyhow::Result<()> { pub fn init_csharp_project(project_path: &Path) -> anyhow::Result<()> { let export_files = vec![ ( - include_str!("../../../../templates/basic-c-sharp/spacetimedb/StdbModule.csproj"), + include_str!("../../../../templates/basic-cs/spacetimedb/StdbModule.csproj"), "StdbModule.csproj", ), ( - include_str!("../../../../templates/basic-c-sharp/spacetimedb/Lib.cs"), + include_str!("../../../../templates/basic-cs/spacetimedb/Lib.cs"), "Lib.cs", ), ( - include_str!("../../../../templates/basic-c-sharp/spacetimedb/global.json"), + include_str!("../../../../templates/basic-cs/spacetimedb/global.json"), "global.json", ), ]; @@ -1536,15 +1536,15 @@ pub fn init_csharp_project(project_path: &Path) -> anyhow::Result<()> { pub fn init_typescript_project(project_path: &Path) -> anyhow::Result<()> { let export_files = vec![ ( - include_str!("../../../../templates/basic-typescript/spacetimedb/package.json"), + include_str!("../../../../templates/basic-ts/spacetimedb/package.json"), "package.json", ), ( - include_str!("../../../../templates/basic-typescript/spacetimedb/tsconfig.json"), + include_str!("../../../../templates/basic-ts/spacetimedb/tsconfig.json"), "tsconfig.json", ), ( - include_str!("../../../../templates/basic-typescript/spacetimedb/src/index.ts"), + include_str!("../../../../templates/basic-ts/spacetimedb/src/index.ts"), "src/index.ts", ), ]; diff --git a/crates/cli/tests/dev.rs b/crates/cli/tests/dev.rs index 0bb0c913557..477546c533f 100644 --- a/crates/cli/tests/dev.rs +++ b/crates/cli/tests/dev.rs @@ -54,7 +54,7 @@ fn cli_init_with_template_creates_project() { .args([ "init", "--template", - "basic-rust", + "basic-rs", "--local", "--non-interactive", "test-project", diff --git a/crates/cli/tests/publish.rs b/crates/cli/tests/publish.rs index 3ef8eab4a36..9e048047e07 100644 --- a/crates/cli/tests/publish.rs +++ b/crates/cli/tests/publish.rs @@ -10,7 +10,7 @@ fn cli_can_publish_spacetimedb_on_disk() { // dir = /modules/quickstart-chat let dir = workspace_dir .join("templates") - .join("quickstart-chat-rust") + .join("chat-console-rs") .join("spacetimedb"); let mut cmd = cargo_bin_cmd!("spacetimedb-cli"); diff --git a/docs/STYLE.md b/docs/STYLE.md index 5e11c5389bb..b5983a759f1 100644 --- a/docs/STYLE.md +++ b/docs/STYLE.md @@ -411,4 +411,4 @@ If the tutorial involved writing code, add a link to the complete code. This sho At the end of the tutorial that builds the `quickstart-chat` module in Rust, you might write: -> You can find the full code for this module in [the SpacetimeDB module examples](https://github.com/clockworklabs/SpacetimeDB/tree/master/templates/quickstart-chat-rust/spacetimedb). +> You can find the full code for this module in [the SpacetimeDB module examples](https://github.com/clockworklabs/SpacetimeDB/tree/master/templates/chat-console-rs/spacetimedb). diff --git a/docs/docs/00100-intro/00200-quickstarts/00100-react.md b/docs/docs/00100-intro/00200-quickstarts/00100-react.md index c254e9ca2de..129140e5281 100644 --- a/docs/docs/00100-intro/00200-quickstarts/00100-react.md +++ b/docs/docs/00100-intro/00200-quickstarts/00100-react.md @@ -29,7 +29,7 @@ Get a SpacetimeDB React app running in under 5 minutes. ```bash -spacetime dev --template basic-react my-spacetime-app +spacetime dev --template react-ts my-spacetime-app ``` diff --git a/docs/docs/00100-intro/00200-quickstarts/00400-typescript.md b/docs/docs/00100-intro/00200-quickstarts/00400-typescript.md index 4510c2e57ca..374aa83fd43 100644 --- a/docs/docs/00100-intro/00200-quickstarts/00400-typescript.md +++ b/docs/docs/00100-intro/00200-quickstarts/00400-typescript.md @@ -29,7 +29,7 @@ Get a SpacetimeDB TypeScript app running in under 5 minutes. ```bash -spacetime dev --template basic-typescript my-spacetime-app +spacetime dev --template basic-ts my-spacetime-app ``` diff --git a/docs/docs/00100-intro/00200-quickstarts/00500-rust.md b/docs/docs/00100-intro/00200-quickstarts/00500-rust.md index ec33acbc918..4bc561fa092 100644 --- a/docs/docs/00100-intro/00200-quickstarts/00500-rust.md +++ b/docs/docs/00100-intro/00200-quickstarts/00500-rust.md @@ -29,7 +29,7 @@ Get a SpacetimeDB Rust app running in under 5 minutes. ```bash -spacetime dev --template basic-rust my-spacetime-app +spacetime dev --template basic-rs my-spacetime-app ``` diff --git a/docs/docs/00100-intro/00200-quickstarts/00600-c-sharp.md b/docs/docs/00100-intro/00200-quickstarts/00600-c-sharp.md index eb6ddb5e2fa..86635b257e6 100644 --- a/docs/docs/00100-intro/00200-quickstarts/00600-c-sharp.md +++ b/docs/docs/00100-intro/00200-quickstarts/00600-c-sharp.md @@ -40,7 +40,7 @@ dotnet workload install wasi-experimental ```bash -spacetime dev --template basic-c-sharp my-spacetime-app +spacetime dev --template basic-cs my-spacetime-app ``` diff --git a/docs/docs/00100-intro/00300-tutorials/00100-chat-app.md b/docs/docs/00100-intro/00300-tutorials/00100-chat-app.md index 14064ef614d..3f9b5f72239 100644 --- a/docs/docs/00100-intro/00300-tutorials/00100-chat-app.md +++ b/docs/docs/00100-intro/00300-tutorials/00100-chat-app.md @@ -661,9 +661,9 @@ Output will resemble: ``` You've just set up your first SpacetimeDB module! You can find the full code for this module: -- [TypeScript server module](https://github.com/clockworklabs/SpacetimeDB/tree/master/templates/quickstart-chat-typescript) -- [C# server module](https://github.com/clockworklabs/SpacetimeDB/tree/master/templates/quickstart-chat-c-sharp/spacetimedb) -- [Rust server module](https://github.com/clockworklabs/SpacetimeDB/tree/master/templates/quickstart-chat-rust/spacetimedb) +- [TypeScript server module](https://github.com/clockworklabs/SpacetimeDB/tree/master/templates/chat-react-ts) +- [C# server module](https://github.com/clockworklabs/SpacetimeDB/tree/master/templates/chat-console-cs/spacetimedb) +- [Rust server module](https://github.com/clockworklabs/SpacetimeDB/tree/master/templates/chat-console-rs/spacetimedb) --- @@ -1429,7 +1429,7 @@ You've just experienced the core features of SpacetimeDB: real-time synchronizat ### Conclusion -Congratulations! You've built a simple chat app with SpacetimeDB. You can find the full source code for the client we've created in this quickstart tutorial [here](https://github.com/clockworklabs/SpacetimeDB/tree/master/templates/quickstart-chat-typescript). +Congratulations! You've built a simple chat app with SpacetimeDB. You can find the full source code for the client we've created in this quickstart tutorial [here](https://github.com/clockworklabs/SpacetimeDB/tree/master/templates/chat-react-ts). At this point you've learned how to create a basic TypeScript client for your SpacetimeDB `quickstart-chat` module. You've learned how to connect to SpacetimeDB and call reducers to update data. You've learned how to subscribe to table data, and hook it up so that it updates reactively in a React application. diff --git a/docs/docs/00200-core-concepts/00100-databases/00200-spacetime-dev.md b/docs/docs/00200-core-concepts/00100-databases/00200-spacetime-dev.md index 4a3eb6ffa21..864d28bf4e2 100644 --- a/docs/docs/00200-core-concepts/00100-databases/00200-spacetime-dev.md +++ b/docs/docs/00200-core-concepts/00100-databases/00200-spacetime-dev.md @@ -64,13 +64,13 @@ Creates a full-stack React web application with: #### Use Template Choose from several built-in templates: -- `basic-typescript` - Basic TypeScript client and server stubs -- `basic-c-sharp` - Basic C# client and server stubs -- `basic-rust` - Basic Rust client and server stubs -- `basic-react` - React web app with TypeScript server -- `quickstart-chat-rust` - Complete Rust chat implementation -- `quickstart-chat-c-sharp` - Complete C# chat implementation -- `quickstart-chat-typescript` - Complete TypeScript chat implementation +- `basic-ts` - Basic TypeScript client and server stubs +- `basic-cs` - Basic C# client and server stubs +- `basic-rs` - Basic Rust client and server stubs +- `react-ts` - React web app with TypeScript server +- `chat-console-rs` - Complete Rust chat implementation +- `chat-console-cs` - Complete C# chat implementation +- `chat-react-ts` - Complete TypeScript chat implementation You can also clone an existing project by entering a GitHub repository (`owner/repo`) or git URL. diff --git a/docs/llms/docs-benchmark-details.json b/docs/llms/docs-benchmark-details.json index c0b59a9469d..51d180518d7 100644 --- a/docs/llms/docs-benchmark-details.json +++ b/docs/llms/docs-benchmark-details.json @@ -37,8 +37,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084853617Z", - "finished_at": "2026-01-15T08:44:05.084853617Z" + "started_at": "2026-01-15T16:46:48.433030661Z", + "finished_at": "2026-01-15T16:46:48.433030661Z" }, "t_001_basic_tables": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -66,8 +66,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084882788Z", - "finished_at": "2026-01-15T08:44:05.084882788Z" + "started_at": "2026-01-15T16:46:48.433070288Z", + "finished_at": "2026-01-15T16:46:48.433070288Z" }, "t_002_scheduled_table": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -95,8 +95,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084873891Z", - "finished_at": "2026-01-15T08:44:05.084873891Z" + "started_at": "2026-01-15T16:46:48.433054387Z", + "finished_at": "2026-01-15T16:46:48.433054387Z" }, "t_003_struct_in_table": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -124,8 +124,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084870202Z", - "finished_at": "2026-01-15T08:44:05.084870202Z" + "started_at": "2026-01-15T16:46:48.433066404Z", + "finished_at": "2026-01-15T16:46:48.433066404Z" }, "t_004_insert": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -153,8 +153,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084895209Z", - "finished_at": "2026-01-15T08:44:05.084895209Z" + "started_at": "2026-01-15T16:46:48.433074686Z", + "finished_at": "2026-01-15T16:46:48.433074686Z" }, "t_005_update": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -182,8 +182,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084862637Z", - "finished_at": "2026-01-15T08:44:05.084862637Z" + "started_at": "2026-01-15T16:46:48.433044798Z", + "finished_at": "2026-01-15T16:46:48.433044798Z" }, "t_006_delete": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -211,8 +211,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084830908Z", - "finished_at": "2026-01-15T08:44:05.084830908Z" + "started_at": "2026-01-15T16:46:48.433049053Z", + "finished_at": "2026-01-15T16:46:48.433049053Z" }, "t_007_crud": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -240,8 +240,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084835177Z", - "finished_at": "2026-01-15T08:44:05.084835177Z" + "started_at": "2026-01-15T16:46:48.433037586Z", + "finished_at": "2026-01-15T16:46:48.433037586Z" }, "t_008_index_lookup": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -269,8 +269,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084850033Z", - "finished_at": "2026-01-15T08:44:05.084850033Z" + "started_at": "2026-01-15T16:46:48.433041506Z", + "finished_at": "2026-01-15T16:46:48.433041506Z" }, "t_009_init": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -298,8 +298,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084857594Z", - "finished_at": "2026-01-15T08:44:05.084857594Z" + "started_at": "2026-01-15T16:46:48.433034152Z", + "finished_at": "2026-01-15T16:46:48.433034152Z" }, "t_010_connect": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -327,8 +327,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084888101Z", - "finished_at": "2026-01-15T08:44:05.084888101Z" + "started_at": "2026-01-15T16:46:48.433079333Z", + "finished_at": "2026-01-15T16:46:48.433079333Z" }, "t_011_helper_function": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -356,8 +356,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084879130Z", - "finished_at": "2026-01-15T08:44:05.084879130Z" + "started_at": "2026-01-15T16:46:48.433061116Z", + "finished_at": "2026-01-15T16:46:48.433061116Z" }, "t_012_spacetime_product_type": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -385,8 +385,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084824707Z", - "finished_at": "2026-01-15T08:44:05.084824707Z" + "started_at": "2026-01-15T16:46:48.433001538Z", + "finished_at": "2026-01-15T16:46:48.433001538Z" }, "t_013_spacetime_sum_type": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -414,8 +414,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084827283Z", - "finished_at": "2026-01-15T08:44:05.084827283Z" + "started_at": "2026-01-15T16:46:48.433006753Z", + "finished_at": "2026-01-15T16:46:48.433006753Z" }, "t_014_elementary_columns": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -443,8 +443,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084777176Z", - "finished_at": "2026-01-15T08:44:05.084777176Z" + "started_at": "2026-01-15T16:46:48.432996914Z", + "finished_at": "2026-01-15T16:46:48.432996914Z" }, "t_015_product_type_columns": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -472,8 +472,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084822119Z", - "finished_at": "2026-01-15T08:44:05.084822119Z" + "started_at": "2026-01-15T16:46:48.432982566Z", + "finished_at": "2026-01-15T16:46:48.432982566Z" }, "t_016_sum_type_columns": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -501,8 +501,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084866461Z", - "finished_at": "2026-01-15T08:44:05.084866461Z" + "started_at": "2026-01-15T16:46:48.433013325Z", + "finished_at": "2026-01-15T16:46:48.433013325Z" }, "t_017_scheduled_columns": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -530,8 +530,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084809104Z", - "finished_at": "2026-01-15T08:44:05.084809104Z" + "started_at": "2026-01-15T16:46:48.432972320Z", + "finished_at": "2026-01-15T16:46:48.432972320Z" }, "t_018_constraints": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -559,8 +559,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084805389Z", - "finished_at": "2026-01-15T08:44:05.084805389Z" + "started_at": "2026-01-15T16:46:48.432986004Z", + "finished_at": "2026-01-15T16:46:48.432986004Z" }, "t_019_many_to_many": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -588,8 +588,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084816252Z", - "finished_at": "2026-01-15T08:44:05.084816252Z" + "started_at": "2026-01-15T16:46:48.432992876Z", + "finished_at": "2026-01-15T16:46:48.432992876Z" }, "t_020_ecs": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -617,8 +617,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084812996Z", - "finished_at": "2026-01-15T08:44:05.084812996Z" + "started_at": "2026-01-15T16:46:48.432978563Z", + "finished_at": "2026-01-15T16:46:48.432978563Z" }, "t_021_multi_column_index": { "hash": "40baf0d53a9de9eab21250fad1d96f530213fd7dd09cb9a3d97f40ff548f0d8a", @@ -646,8 +646,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:44:05.084891997Z", - "finished_at": "2026-01-15T08:44:05.084891997Z" + "started_at": "2026-01-15T16:46:48.432934320Z", + "finished_at": "2026-01-15T16:46:48.432934320Z" } } } @@ -838,14 +838,14 @@ "modes": [ { "mode": "docs", - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "models": [ { "name": "GPT-5", "route_api_model": "gpt-5", "tasks": { "t_000_empty_reducers": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_000_empty_reducers", "lang": "csharp", "golden_published": false, @@ -870,11 +870,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350758519Z", - "finished_at": "2026-01-15T08:48:04.350758519Z" + "started_at": "2026-01-15T16:50:45.732646459Z", + "finished_at": "2026-01-15T16:50:45.732646459Z" }, "t_001_basic_tables": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_001_basic_tables", "lang": "csharp", "golden_published": false, @@ -899,11 +899,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350802382Z", - "finished_at": "2026-01-15T08:48:04.350802382Z" + "started_at": "2026-01-15T16:50:45.732688280Z", + "finished_at": "2026-01-15T16:50:45.732688280Z" }, "t_002_scheduled_table": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_002_scheduled_table", "lang": "csharp", "golden_published": false, @@ -928,11 +928,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350787405Z", - "finished_at": "2026-01-15T08:48:04.350787405Z" + "started_at": "2026-01-15T16:50:45.732672473Z", + "finished_at": "2026-01-15T16:50:45.732672473Z" }, "t_003_struct_in_table": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_003_struct_in_table", "lang": "csharp", "golden_published": false, @@ -957,11 +957,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350798386Z", - "finished_at": "2026-01-15T08:48:04.350798386Z" + "started_at": "2026-01-15T16:50:45.732682491Z", + "finished_at": "2026-01-15T16:50:45.732682491Z" }, "t_004_insert": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_004_insert", "lang": "csharp", "golden_published": false, @@ -986,11 +986,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350810397Z", - "finished_at": "2026-01-15T08:48:04.350810397Z" + "started_at": "2026-01-15T16:50:45.732697587Z", + "finished_at": "2026-01-15T16:50:45.732697587Z" }, "t_005_update": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_005_update", "lang": "csharp", "golden_published": false, @@ -1015,11 +1015,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350783269Z", - "finished_at": "2026-01-15T08:48:04.350783269Z" + "started_at": "2026-01-15T16:50:45.732667959Z", + "finished_at": "2026-01-15T16:50:45.732667959Z" }, "t_006_delete": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_006_delete", "lang": "csharp", "golden_published": false, @@ -1044,11 +1044,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350772180Z", - "finished_at": "2026-01-15T08:48:04.350772180Z" + "started_at": "2026-01-15T16:50:45.732654414Z", + "finished_at": "2026-01-15T16:50:45.732654414Z" }, "t_007_crud": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_007_crud", "lang": "csharp", "golden_published": false, @@ -1073,11 +1073,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350768636Z", - "finished_at": "2026-01-15T08:48:04.350768636Z" + "started_at": "2026-01-15T16:50:45.732650276Z", + "finished_at": "2026-01-15T16:50:45.732650276Z" }, "t_008_index_lookup": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_008_index_lookup", "lang": "csharp", "golden_published": false, @@ -1102,11 +1102,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350775111Z", - "finished_at": "2026-01-15T08:48:04.350775111Z" + "started_at": "2026-01-15T16:50:45.732659550Z", + "finished_at": "2026-01-15T16:50:45.732659550Z" }, "t_009_init": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_009_init", "lang": "csharp", "golden_published": false, @@ -1131,11 +1131,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350777872Z", - "finished_at": "2026-01-15T08:48:04.350777872Z" + "started_at": "2026-01-15T16:50:45.732664024Z", + "finished_at": "2026-01-15T16:50:45.732664024Z" }, "t_010_connect": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_010_connect", "lang": "csharp", "golden_published": false, @@ -1160,11 +1160,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350806555Z", - "finished_at": "2026-01-15T08:48:04.350806555Z" + "started_at": "2026-01-15T16:50:45.732692881Z", + "finished_at": "2026-01-15T16:50:45.732692881Z" }, "t_011_helper_function": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_011_helper_function", "lang": "csharp", "golden_published": false, @@ -1189,11 +1189,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350794264Z", - "finished_at": "2026-01-15T08:48:04.350794264Z" + "started_at": "2026-01-15T16:50:45.732678445Z", + "finished_at": "2026-01-15T16:50:45.732678445Z" }, "t_012_spacetime_product_type": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_012_spacetime_product_type", "lang": "csharp", "golden_published": false, @@ -1218,11 +1218,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350747625Z", - "finished_at": "2026-01-15T08:48:04.350747625Z" + "started_at": "2026-01-15T16:50:45.732621435Z", + "finished_at": "2026-01-15T16:50:45.732621435Z" }, "t_013_spacetime_sum_type": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_013_spacetime_sum_type", "lang": "csharp", "golden_published": false, @@ -1247,11 +1247,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350765485Z", - "finished_at": "2026-01-15T08:48:04.350765485Z" + "started_at": "2026-01-15T16:50:45.732632944Z", + "finished_at": "2026-01-15T16:50:45.732632944Z" }, "t_014_elementary_columns": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_014_elementary_columns", "lang": "csharp", "golden_published": false, @@ -1276,11 +1276,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350744275Z", - "finished_at": "2026-01-15T08:48:04.350744275Z" + "started_at": "2026-01-15T16:50:45.732611546Z", + "finished_at": "2026-01-15T16:50:45.732611546Z" }, "t_015_product_type_columns": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_015_product_type_columns", "lang": "csharp", "golden_published": false, @@ -1305,11 +1305,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350753908Z", - "finished_at": "2026-01-15T08:48:04.350753908Z" + "started_at": "2026-01-15T16:50:45.732624412Z", + "finished_at": "2026-01-15T16:50:45.732624412Z" }, "t_016_sum_type_columns": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_016_sum_type_columns", "lang": "csharp", "golden_published": false, @@ -1334,11 +1334,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350750774Z", - "finished_at": "2026-01-15T08:48:04.350750774Z" + "started_at": "2026-01-15T16:50:45.732628181Z", + "finished_at": "2026-01-15T16:50:45.732628181Z" }, "t_017_scheduled_columns": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_017_scheduled_columns", "lang": "csharp", "golden_published": false, @@ -1363,11 +1363,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350734182Z", - "finished_at": "2026-01-15T08:48:04.350734182Z" + "started_at": "2026-01-15T16:50:45.732608425Z", + "finished_at": "2026-01-15T16:50:45.732608425Z" }, "t_018_constraints": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_018_constraints", "lang": "csharp", "golden_published": false, @@ -1392,11 +1392,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350737033Z", - "finished_at": "2026-01-15T08:48:04.350737033Z" + "started_at": "2026-01-15T16:50:45.732604922Z", + "finished_at": "2026-01-15T16:50:45.732604922Z" }, "t_019_many_to_many": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_019_many_to_many", "lang": "csharp", "golden_published": false, @@ -1421,11 +1421,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350730826Z", - "finished_at": "2026-01-15T08:48:04.350730826Z" + "started_at": "2026-01-15T16:50:45.732587805Z", + "finished_at": "2026-01-15T16:50:45.732587805Z" }, "t_020_ecs": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_020_ecs", "lang": "csharp", "golden_published": false, @@ -1450,11 +1450,11 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350721102Z", - "finished_at": "2026-01-15T08:48:04.350721102Z" + "started_at": "2026-01-15T16:50:45.732601560Z", + "finished_at": "2026-01-15T16:50:45.732601560Z" }, "t_021_multi_column_index": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "task": "t_021_multi_column_index", "lang": "csharp", "golden_published": false, @@ -1479,8 +1479,8 @@ } }, "vendor": "openai", - "started_at": "2026-01-15T08:48:04.350740315Z", - "finished_at": "2026-01-15T08:48:04.350740315Z" + "started_at": "2026-01-15T16:50:45.732617054Z", + "finished_at": "2026-01-15T16:50:45.732617054Z" } } } diff --git a/docs/llms/docs-benchmark-summary.json b/docs/llms/docs-benchmark-summary.json index fc0c66a436f..04b9ac0adaf 100644 --- a/docs/llms/docs-benchmark-summary.json +++ b/docs/llms/docs-benchmark-summary.json @@ -1,11 +1,11 @@ { "version": 1, - "generated_at": "2026-01-15T08:48:04.366Z", + "generated_at": "2026-01-15T16:50:45.748Z", "by_language": { "csharp": { "modes": { "docs": { - "hash": "57aa5b6bb986daddf9d3a9f4992cdb0c6bab78257186c00ab1284c1b40281b46", + "hash": "0bc27c86923ba033c5501217b0ff7911dfdd51ca622ae77ac06a679cbe0fa78a", "models": { "GPT-5": { "categories": { diff --git a/eslint.config.js b/eslint.config.js index 4f96b16ab8e..ed23aceef3c 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -38,9 +38,6 @@ export default tseslint.config( './tsconfig.json', './crates/bindings-typescript/tsconfig.json', './crates/bindings-typescript/test-app/tsconfig.json', - './crates/bindings-typescript/examples/basic-react/tsconfig.json', - './crates/bindings-typescript/examples/empty/tsconfig.json', - './crates/bindings-typescript/examples/quickstart-chat/tsconfig.json', './docs/tsconfig.json', ], projectService: true, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e9de64e1c10..d3628700fb1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -258,35 +258,7 @@ importers: specifier: workspace:^ version: link:../../crates/bindings-typescript - templates/basic-react: - dependencies: - react: - specifier: ^18.3.1 - version: 18.3.1 - react-dom: - specifier: ^18.3.1 - version: 18.3.1(react@18.3.1) - spacetimedb: - specifier: workspace:* - version: link:../../crates/bindings-typescript - devDependencies: - '@types/react': - specifier: ^18.3.18 - version: 18.3.23 - '@types/react-dom': - specifier: ^18.3.5 - version: 18.3.7(@types/react@18.3.23) - '@vitejs/plugin-react': - specifier: ^5.0.2 - version: 5.0.2(vite@7.1.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.4)) - typescript: - specifier: ~5.6.2 - version: 5.6.3 - vite: - specifier: ^7.1.5 - version: 7.1.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.4) - - templates/basic-typescript: + templates/basic-ts: dependencies: spacetimedb: specifier: workspace:* @@ -299,7 +271,7 @@ importers: specifier: ^7.1.5 version: 7.1.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.4) - templates/quickstart-chat-typescript: + templates/chat-react-ts: dependencies: react: specifier: ^18.3.1 @@ -363,12 +335,40 @@ importers: specifier: 3.2.4 version: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.0)(jiti@2.5.1)(jsdom@26.1.0)(terser@5.43.1)(tsx@4.20.4) - templates/quickstart-chat-typescript/spacetimedb: + templates/chat-react-ts/spacetimedb: dependencies: spacetimedb: specifier: workspace:^ version: link:../../../crates/bindings-typescript + templates/react-ts: + dependencies: + react: + specifier: ^18.3.1 + version: 18.3.1 + react-dom: + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) + spacetimedb: + specifier: workspace:* + version: link:../../crates/bindings-typescript + devDependencies: + '@types/react': + specifier: ^18.3.18 + version: 18.3.23 + '@types/react-dom': + specifier: ^18.3.5 + version: 18.3.7(@types/react@18.3.23) + '@vitejs/plugin-react': + specifier: ^5.0.2 + version: 5.0.2(vite@7.1.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.4)) + typescript: + specifier: ~5.6.2 + version: 5.6.3 + vite: + specifier: ^7.1.5 + version: 7.1.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.4) + packages: '@adobe/css-tools@4.4.4': diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 0b6b411ea9e..4dbfe8479b4 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,12 +1,12 @@ packages: - 'crates/bindings-typescript' - 'crates/bindings-typescript/test-app' - - 'templates/quickstart-chat-typescript' - - 'templates/basic-react' - - 'templates/basic-typescript' + - 'templates/chat-react-ts' + - 'templates/react-ts' + - 'templates/basic-ts' - 'modules/benchmarks-ts' - 'modules/module-test-ts' - - 'templates/quickstart-chat-typescript/spacetimedb' + - 'templates/chat-react-ts/spacetimedb' - 'modules/sdk-test-connect-disconnect-ts' - 'modules/sdk-test-procedure-ts' - 'modules/sdk-test-ts' diff --git a/sdks/csharp/DEVELOP.md b/sdks/csharp/DEVELOP.md index 9f02025de65..ff56a1baf82 100644 --- a/sdks/csharp/DEVELOP.md +++ b/sdks/csharp/DEVELOP.md @@ -29,11 +29,11 @@ The SDK uses multiple layers of code generation: The code created by `spacetime generate` imports the SpacetimeDB SDK and extends its various classes to create a SpacetimeDB client. It also imports `SpacetimeDB.BSATN.Codegen` for its serialization needs. -See [`../../templates/quickstart-chat-c-sharp/module_bindings`](../../templates/quickstart-chat-c-sharp/module_bindings/) for an example of what `spacetime generate`d code looks like. +See [`../../templates/chat-console-cs/module_bindings`](../../templates/chat-console-cs/module_bindings/) for an example of what `spacetime generate`d code looks like. If you need to debug `SpacetimeDB.BSATN.Codegen`, you can set `true` in the `` in the SDK code, which lives in [`src/SpacetimeDBClient.cs`](./src/SpacetimeDBClient.cs). This is a general pattern. Similar inheritance patterns are used for tables and indexes: the generated code defines a class that inherits most of its behavior from a class in the SDK. diff --git a/sdks/csharp/SpacetimeDB.ClientSDK.sln b/sdks/csharp/SpacetimeDB.ClientSDK.sln index 0c5f2d3d978..aa629fb0411 100644 --- a/sdks/csharp/SpacetimeDB.ClientSDK.sln +++ b/sdks/csharp/SpacetimeDB.ClientSDK.sln @@ -7,7 +7,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpacetimeDB.ClientSDK", "Sp EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tests", "tests~\tests.csproj", "{5CD31104-4719-4CE3-8D39-8BAE0B75C085}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "client", "..\..\templates\quickstart-chat-c-sharp\client.csproj", "{FE261832-1594-DE21-C8C8-2D525680CBD7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "client", "..\..\templates\chat-console-cs\client.csproj", "{FE261832-1594-DE21-C8C8-2D525680CBD7}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples~", "examples~", "{E0CADA48-79A1-4490-ACEC-698EC7D2AB43}" EndProject diff --git a/sdks/csharp/tests~/tests.csproj b/sdks/csharp/tests~/tests.csproj index 02fb3372328..bcb4e59fef0 100644 --- a/sdks/csharp/tests~/tests.csproj +++ b/sdks/csharp/tests~/tests.csproj @@ -24,7 +24,7 @@ - + diff --git a/sdks/csharp/tools~/gen-quickstart.sh b/sdks/csharp/tools~/gen-quickstart.sh index 340c06b6e2f..25a1abf2213 100755 --- a/sdks/csharp/tools~/gen-quickstart.sh +++ b/sdks/csharp/tools~/gen-quickstart.sh @@ -7,4 +7,4 @@ SDK_PATH="$(realpath "$SDK_PATH")" STDB_PATH="$SDK_PATH/../.." cargo build --manifest-path "$STDB_PATH/crates/standalone/Cargo.toml" -cargo run --manifest-path "$STDB_PATH/crates/cli/Cargo.toml" -- generate -y -l csharp -o "$STDB_PATH/templates/quickstart-chat-c-sharp/module_bindings" --project-path "$STDB_PATH/templates/quickstart-chat-c-sharp/spacetimedb" +cargo run --manifest-path "$STDB_PATH/crates/cli/Cargo.toml" -- generate -y -l csharp -o "$STDB_PATH/templates/chat-console-cs/module_bindings" --project-path "$STDB_PATH/templates/chat-console-cs/spacetimedb" diff --git a/smoketests/__init__.py b/smoketests/__init__.py index 657b7740361..effb7781065 100644 --- a/smoketests/__init__.py +++ b/smoketests/__init__.py @@ -25,8 +25,8 @@ BASE_STDB_CONFIG_PATH = TEST_DIR / "config.toml" # the contents of files for the base smoketest project template -TEMPLATE_LIB_RS = open(STDB_DIR / "templates/basic-rust/spacetimedb/src/lib.rs").read() -TEMPLATE_CARGO_TOML = open(STDB_DIR / "templates/basic-rust/spacetimedb/Cargo.toml").read() +TEMPLATE_LIB_RS = open(STDB_DIR / "templates/basic-rs/spacetimedb/src/lib.rs").read() +TEMPLATE_CARGO_TOML = open(STDB_DIR / "templates/basic-rs/spacetimedb/Cargo.toml").read() bindings_path = (STDB_DIR / "crates/bindings").absolute() escaped_bindings_path = str(bindings_path).replace('\\', '\\\\\\\\') # double escape for re.sub + toml TYPESCRIPT_BINDINGS_PATH = (STDB_DIR / "crates/bindings-typescript").absolute() diff --git a/templates/basic-c-sharp/.template.json b/templates/basic-cs/.template.json similarity index 100% rename from templates/basic-c-sharp/.template.json rename to templates/basic-cs/.template.json diff --git a/templates/basic-c-sharp/LICENSE b/templates/basic-cs/LICENSE similarity index 100% rename from templates/basic-c-sharp/LICENSE rename to templates/basic-cs/LICENSE diff --git a/templates/basic-c-sharp/Program.cs b/templates/basic-cs/Program.cs similarity index 100% rename from templates/basic-c-sharp/Program.cs rename to templates/basic-cs/Program.cs diff --git a/templates/basic-c-sharp/client.csproj b/templates/basic-cs/client.csproj similarity index 100% rename from templates/basic-c-sharp/client.csproj rename to templates/basic-cs/client.csproj diff --git a/templates/basic-c-sharp/spacetimedb/Lib.cs b/templates/basic-cs/spacetimedb/Lib.cs similarity index 100% rename from templates/basic-c-sharp/spacetimedb/Lib.cs rename to templates/basic-cs/spacetimedb/Lib.cs diff --git a/templates/basic-c-sharp/spacetimedb/StdbModule.csproj b/templates/basic-cs/spacetimedb/StdbModule.csproj similarity index 100% rename from templates/basic-c-sharp/spacetimedb/StdbModule.csproj rename to templates/basic-cs/spacetimedb/StdbModule.csproj diff --git a/templates/basic-c-sharp/spacetimedb/global.json b/templates/basic-cs/spacetimedb/global.json similarity index 100% rename from templates/basic-c-sharp/spacetimedb/global.json rename to templates/basic-cs/spacetimedb/global.json diff --git a/templates/basic-rust/.template.json b/templates/basic-rs/.template.json similarity index 100% rename from templates/basic-rust/.template.json rename to templates/basic-rs/.template.json diff --git a/templates/basic-rust/Cargo.toml b/templates/basic-rs/Cargo.toml similarity index 100% rename from templates/basic-rust/Cargo.toml rename to templates/basic-rs/Cargo.toml diff --git a/templates/basic-react/LICENSE b/templates/basic-rs/LICENSE similarity index 100% rename from templates/basic-react/LICENSE rename to templates/basic-rs/LICENSE diff --git a/templates/basic-rust/README.md b/templates/basic-rs/README.md similarity index 100% rename from templates/basic-rust/README.md rename to templates/basic-rs/README.md diff --git a/templates/basic-rust/spacetimedb/Cargo.toml b/templates/basic-rs/spacetimedb/Cargo.toml similarity index 100% rename from templates/basic-rust/spacetimedb/Cargo.toml rename to templates/basic-rs/spacetimedb/Cargo.toml diff --git a/templates/basic-rust/spacetimedb/src/lib.rs b/templates/basic-rs/spacetimedb/src/lib.rs similarity index 100% rename from templates/basic-rust/spacetimedb/src/lib.rs rename to templates/basic-rs/spacetimedb/src/lib.rs diff --git a/templates/basic-rust/src/main.rs b/templates/basic-rs/src/main.rs similarity index 100% rename from templates/basic-rust/src/main.rs rename to templates/basic-rs/src/main.rs diff --git a/templates/basic-typescript/.template.json b/templates/basic-ts/.template.json similarity index 100% rename from templates/basic-typescript/.template.json rename to templates/basic-ts/.template.json diff --git a/templates/basic-rust/LICENSE b/templates/basic-ts/LICENSE similarity index 100% rename from templates/basic-rust/LICENSE rename to templates/basic-ts/LICENSE diff --git a/templates/basic-typescript/index.html b/templates/basic-ts/index.html similarity index 100% rename from templates/basic-typescript/index.html rename to templates/basic-ts/index.html diff --git a/templates/basic-typescript/package.json b/templates/basic-ts/package.json similarity index 100% rename from templates/basic-typescript/package.json rename to templates/basic-ts/package.json diff --git a/templates/basic-react/spacetimedb/package.json b/templates/basic-ts/spacetimedb/package.json similarity index 100% rename from templates/basic-react/spacetimedb/package.json rename to templates/basic-ts/spacetimedb/package.json diff --git a/templates/basic-react/spacetimedb/pnpm-lock.yaml b/templates/basic-ts/spacetimedb/pnpm-lock.yaml similarity index 100% rename from templates/basic-react/spacetimedb/pnpm-lock.yaml rename to templates/basic-ts/spacetimedb/pnpm-lock.yaml diff --git a/templates/basic-typescript/spacetimedb/src/index.ts b/templates/basic-ts/spacetimedb/src/index.ts similarity index 100% rename from templates/basic-typescript/spacetimedb/src/index.ts rename to templates/basic-ts/spacetimedb/src/index.ts diff --git a/templates/basic-react/spacetimedb/tsconfig.json b/templates/basic-ts/spacetimedb/tsconfig.json similarity index 100% rename from templates/basic-react/spacetimedb/tsconfig.json rename to templates/basic-ts/spacetimedb/tsconfig.json diff --git a/templates/basic-typescript/src/main.ts b/templates/basic-ts/src/main.ts similarity index 100% rename from templates/basic-typescript/src/main.ts rename to templates/basic-ts/src/main.ts diff --git a/templates/basic-react/src/module_bindings/add_reducer.ts b/templates/basic-ts/src/module_bindings/add_reducer.ts similarity index 100% rename from templates/basic-react/src/module_bindings/add_reducer.ts rename to templates/basic-ts/src/module_bindings/add_reducer.ts diff --git a/templates/basic-react/src/module_bindings/add_type.ts b/templates/basic-ts/src/module_bindings/add_type.ts similarity index 100% rename from templates/basic-react/src/module_bindings/add_type.ts rename to templates/basic-ts/src/module_bindings/add_type.ts diff --git a/templates/basic-react/src/module_bindings/index.ts b/templates/basic-ts/src/module_bindings/index.ts similarity index 100% rename from templates/basic-react/src/module_bindings/index.ts rename to templates/basic-ts/src/module_bindings/index.ts diff --git a/templates/basic-react/src/module_bindings/init_type.ts b/templates/basic-ts/src/module_bindings/init_type.ts similarity index 100% rename from templates/basic-react/src/module_bindings/init_type.ts rename to templates/basic-ts/src/module_bindings/init_type.ts diff --git a/templates/basic-react/src/module_bindings/on_connect_reducer.ts b/templates/basic-ts/src/module_bindings/on_connect_reducer.ts similarity index 100% rename from templates/basic-react/src/module_bindings/on_connect_reducer.ts rename to templates/basic-ts/src/module_bindings/on_connect_reducer.ts diff --git a/templates/basic-react/src/module_bindings/on_connect_type.ts b/templates/basic-ts/src/module_bindings/on_connect_type.ts similarity index 100% rename from templates/basic-react/src/module_bindings/on_connect_type.ts rename to templates/basic-ts/src/module_bindings/on_connect_type.ts diff --git a/templates/basic-react/src/module_bindings/on_disconnect_reducer.ts b/templates/basic-ts/src/module_bindings/on_disconnect_reducer.ts similarity index 100% rename from templates/basic-react/src/module_bindings/on_disconnect_reducer.ts rename to templates/basic-ts/src/module_bindings/on_disconnect_reducer.ts diff --git a/templates/basic-react/src/module_bindings/on_disconnect_type.ts b/templates/basic-ts/src/module_bindings/on_disconnect_type.ts similarity index 100% rename from templates/basic-react/src/module_bindings/on_disconnect_type.ts rename to templates/basic-ts/src/module_bindings/on_disconnect_type.ts diff --git a/templates/basic-react/src/module_bindings/person_table.ts b/templates/basic-ts/src/module_bindings/person_table.ts similarity index 100% rename from templates/basic-react/src/module_bindings/person_table.ts rename to templates/basic-ts/src/module_bindings/person_table.ts diff --git a/templates/basic-react/src/module_bindings/person_type.ts b/templates/basic-ts/src/module_bindings/person_type.ts similarity index 100% rename from templates/basic-react/src/module_bindings/person_type.ts rename to templates/basic-ts/src/module_bindings/person_type.ts diff --git a/templates/basic-react/src/module_bindings/say_hello_reducer.ts b/templates/basic-ts/src/module_bindings/say_hello_reducer.ts similarity index 100% rename from templates/basic-react/src/module_bindings/say_hello_reducer.ts rename to templates/basic-ts/src/module_bindings/say_hello_reducer.ts diff --git a/templates/basic-react/src/module_bindings/say_hello_type.ts b/templates/basic-ts/src/module_bindings/say_hello_type.ts similarity index 100% rename from templates/basic-react/src/module_bindings/say_hello_type.ts rename to templates/basic-ts/src/module_bindings/say_hello_type.ts diff --git a/templates/basic-typescript/tsconfig.json b/templates/basic-ts/tsconfig.json similarity index 100% rename from templates/basic-typescript/tsconfig.json rename to templates/basic-ts/tsconfig.json diff --git a/templates/basic-typescript/vite.config.ts b/templates/basic-ts/vite.config.ts similarity index 100% rename from templates/basic-typescript/vite.config.ts rename to templates/basic-ts/vite.config.ts diff --git a/templates/quickstart-chat-c-sharp/.template.json b/templates/chat-console-cs/.template.json similarity index 100% rename from templates/quickstart-chat-c-sharp/.template.json rename to templates/chat-console-cs/.template.json diff --git a/templates/basic-typescript/LICENSE b/templates/chat-console-cs/LICENSE similarity index 100% rename from templates/basic-typescript/LICENSE rename to templates/chat-console-cs/LICENSE diff --git a/templates/quickstart-chat-c-sharp/Program.cs b/templates/chat-console-cs/Program.cs similarity index 100% rename from templates/quickstart-chat-c-sharp/Program.cs rename to templates/chat-console-cs/Program.cs diff --git a/templates/quickstart-chat-c-sharp/README.md b/templates/chat-console-cs/README.md similarity index 100% rename from templates/quickstart-chat-c-sharp/README.md rename to templates/chat-console-cs/README.md diff --git a/templates/quickstart-chat-c-sharp/client.csproj b/templates/chat-console-cs/client.csproj similarity index 100% rename from templates/quickstart-chat-c-sharp/client.csproj rename to templates/chat-console-cs/client.csproj diff --git a/templates/quickstart-chat-c-sharp/module_bindings/Reducers/ClientConnected.g.cs b/templates/chat-console-cs/module_bindings/Reducers/ClientConnected.g.cs similarity index 100% rename from templates/quickstart-chat-c-sharp/module_bindings/Reducers/ClientConnected.g.cs rename to templates/chat-console-cs/module_bindings/Reducers/ClientConnected.g.cs diff --git a/templates/quickstart-chat-c-sharp/module_bindings/Reducers/ClientDisconnected.g.cs b/templates/chat-console-cs/module_bindings/Reducers/ClientDisconnected.g.cs similarity index 100% rename from templates/quickstart-chat-c-sharp/module_bindings/Reducers/ClientDisconnected.g.cs rename to templates/chat-console-cs/module_bindings/Reducers/ClientDisconnected.g.cs diff --git a/templates/quickstart-chat-c-sharp/module_bindings/Reducers/SendMessage.g.cs b/templates/chat-console-cs/module_bindings/Reducers/SendMessage.g.cs similarity index 100% rename from templates/quickstart-chat-c-sharp/module_bindings/Reducers/SendMessage.g.cs rename to templates/chat-console-cs/module_bindings/Reducers/SendMessage.g.cs diff --git a/templates/quickstart-chat-c-sharp/module_bindings/Reducers/SetName.g.cs b/templates/chat-console-cs/module_bindings/Reducers/SetName.g.cs similarity index 100% rename from templates/quickstart-chat-c-sharp/module_bindings/Reducers/SetName.g.cs rename to templates/chat-console-cs/module_bindings/Reducers/SetName.g.cs diff --git a/templates/quickstart-chat-c-sharp/module_bindings/SpacetimeDBClient.g.cs b/templates/chat-console-cs/module_bindings/SpacetimeDBClient.g.cs similarity index 100% rename from templates/quickstart-chat-c-sharp/module_bindings/SpacetimeDBClient.g.cs rename to templates/chat-console-cs/module_bindings/SpacetimeDBClient.g.cs diff --git a/templates/quickstart-chat-c-sharp/module_bindings/Tables/Message.g.cs b/templates/chat-console-cs/module_bindings/Tables/Message.g.cs similarity index 100% rename from templates/quickstart-chat-c-sharp/module_bindings/Tables/Message.g.cs rename to templates/chat-console-cs/module_bindings/Tables/Message.g.cs diff --git a/templates/quickstart-chat-c-sharp/module_bindings/Tables/User.g.cs b/templates/chat-console-cs/module_bindings/Tables/User.g.cs similarity index 100% rename from templates/quickstart-chat-c-sharp/module_bindings/Tables/User.g.cs rename to templates/chat-console-cs/module_bindings/Tables/User.g.cs diff --git a/templates/quickstart-chat-c-sharp/module_bindings/Types/Message.g.cs b/templates/chat-console-cs/module_bindings/Types/Message.g.cs similarity index 100% rename from templates/quickstart-chat-c-sharp/module_bindings/Types/Message.g.cs rename to templates/chat-console-cs/module_bindings/Types/Message.g.cs diff --git a/templates/quickstart-chat-c-sharp/module_bindings/Types/User.g.cs b/templates/chat-console-cs/module_bindings/Types/User.g.cs similarity index 100% rename from templates/quickstart-chat-c-sharp/module_bindings/Types/User.g.cs rename to templates/chat-console-cs/module_bindings/Types/User.g.cs diff --git a/templates/quickstart-chat-c-sharp/spacetimedb/Lib.cs b/templates/chat-console-cs/spacetimedb/Lib.cs similarity index 100% rename from templates/quickstart-chat-c-sharp/spacetimedb/Lib.cs rename to templates/chat-console-cs/spacetimedb/Lib.cs diff --git a/templates/quickstart-chat-c-sharp/spacetimedb/StdbModule.csproj b/templates/chat-console-cs/spacetimedb/StdbModule.csproj similarity index 100% rename from templates/quickstart-chat-c-sharp/spacetimedb/StdbModule.csproj rename to templates/chat-console-cs/spacetimedb/StdbModule.csproj diff --git a/templates/quickstart-chat-c-sharp/spacetimedb/global.json b/templates/chat-console-cs/spacetimedb/global.json similarity index 100% rename from templates/quickstart-chat-c-sharp/spacetimedb/global.json rename to templates/chat-console-cs/spacetimedb/global.json diff --git a/templates/quickstart-chat-rust/.template.json b/templates/chat-console-rs/.template.json similarity index 100% rename from templates/quickstart-chat-rust/.template.json rename to templates/chat-console-rs/.template.json diff --git a/templates/quickstart-chat-rust/Cargo.toml b/templates/chat-console-rs/Cargo.toml similarity index 100% rename from templates/quickstart-chat-rust/Cargo.toml rename to templates/chat-console-rs/Cargo.toml diff --git a/templates/quickstart-chat-c-sharp/LICENSE b/templates/chat-console-rs/LICENSE similarity index 100% rename from templates/quickstart-chat-c-sharp/LICENSE rename to templates/chat-console-rs/LICENSE diff --git a/templates/quickstart-chat-rust/README.md b/templates/chat-console-rs/README.md similarity index 100% rename from templates/quickstart-chat-rust/README.md rename to templates/chat-console-rs/README.md diff --git a/templates/quickstart-chat-rust/spacetimedb/Cargo.toml b/templates/chat-console-rs/spacetimedb/Cargo.toml similarity index 100% rename from templates/quickstart-chat-rust/spacetimedb/Cargo.toml rename to templates/chat-console-rs/spacetimedb/Cargo.toml diff --git a/templates/quickstart-chat-rust/spacetimedb/README.md b/templates/chat-console-rs/spacetimedb/README.md similarity index 100% rename from templates/quickstart-chat-rust/spacetimedb/README.md rename to templates/chat-console-rs/spacetimedb/README.md diff --git a/templates/quickstart-chat-rust/spacetimedb/src/lib.rs b/templates/chat-console-rs/spacetimedb/src/lib.rs similarity index 100% rename from templates/quickstart-chat-rust/spacetimedb/src/lib.rs rename to templates/chat-console-rs/spacetimedb/src/lib.rs diff --git a/templates/quickstart-chat-rust/src/main.rs b/templates/chat-console-rs/src/main.rs similarity index 100% rename from templates/quickstart-chat-rust/src/main.rs rename to templates/chat-console-rs/src/main.rs diff --git a/templates/quickstart-chat-rust/src/module_bindings/identity_connected_reducer.rs b/templates/chat-console-rs/src/module_bindings/identity_connected_reducer.rs similarity index 100% rename from templates/quickstart-chat-rust/src/module_bindings/identity_connected_reducer.rs rename to templates/chat-console-rs/src/module_bindings/identity_connected_reducer.rs diff --git a/templates/quickstart-chat-rust/src/module_bindings/identity_disconnected_reducer.rs b/templates/chat-console-rs/src/module_bindings/identity_disconnected_reducer.rs similarity index 100% rename from templates/quickstart-chat-rust/src/module_bindings/identity_disconnected_reducer.rs rename to templates/chat-console-rs/src/module_bindings/identity_disconnected_reducer.rs diff --git a/templates/quickstart-chat-rust/src/module_bindings/message_table.rs b/templates/chat-console-rs/src/module_bindings/message_table.rs similarity index 100% rename from templates/quickstart-chat-rust/src/module_bindings/message_table.rs rename to templates/chat-console-rs/src/module_bindings/message_table.rs diff --git a/templates/quickstart-chat-rust/src/module_bindings/message_type.rs b/templates/chat-console-rs/src/module_bindings/message_type.rs similarity index 100% rename from templates/quickstart-chat-rust/src/module_bindings/message_type.rs rename to templates/chat-console-rs/src/module_bindings/message_type.rs diff --git a/templates/quickstart-chat-rust/src/module_bindings/mod.rs b/templates/chat-console-rs/src/module_bindings/mod.rs similarity index 100% rename from templates/quickstart-chat-rust/src/module_bindings/mod.rs rename to templates/chat-console-rs/src/module_bindings/mod.rs diff --git a/templates/quickstart-chat-rust/src/module_bindings/send_message_reducer.rs b/templates/chat-console-rs/src/module_bindings/send_message_reducer.rs similarity index 100% rename from templates/quickstart-chat-rust/src/module_bindings/send_message_reducer.rs rename to templates/chat-console-rs/src/module_bindings/send_message_reducer.rs diff --git a/templates/quickstart-chat-rust/src/module_bindings/set_name_reducer.rs b/templates/chat-console-rs/src/module_bindings/set_name_reducer.rs similarity index 100% rename from templates/quickstart-chat-rust/src/module_bindings/set_name_reducer.rs rename to templates/chat-console-rs/src/module_bindings/set_name_reducer.rs diff --git a/templates/quickstart-chat-rust/src/module_bindings/user_table.rs b/templates/chat-console-rs/src/module_bindings/user_table.rs similarity index 100% rename from templates/quickstart-chat-rust/src/module_bindings/user_table.rs rename to templates/chat-console-rs/src/module_bindings/user_table.rs diff --git a/templates/quickstart-chat-rust/src/module_bindings/user_type.rs b/templates/chat-console-rs/src/module_bindings/user_type.rs similarity index 100% rename from templates/quickstart-chat-rust/src/module_bindings/user_type.rs rename to templates/chat-console-rs/src/module_bindings/user_type.rs diff --git a/templates/quickstart-chat-typescript/.template.json b/templates/chat-react-ts/.template.json similarity index 100% rename from templates/quickstart-chat-typescript/.template.json rename to templates/chat-react-ts/.template.json diff --git a/templates/quickstart-chat-typescript/CHANGELOG.md b/templates/chat-react-ts/CHANGELOG.md similarity index 100% rename from templates/quickstart-chat-typescript/CHANGELOG.md rename to templates/chat-react-ts/CHANGELOG.md diff --git a/templates/quickstart-chat-rust/LICENSE b/templates/chat-react-ts/LICENSE similarity index 100% rename from templates/quickstart-chat-rust/LICENSE rename to templates/chat-react-ts/LICENSE diff --git a/templates/quickstart-chat-typescript/README.md b/templates/chat-react-ts/README.md similarity index 100% rename from templates/quickstart-chat-typescript/README.md rename to templates/chat-react-ts/README.md diff --git a/templates/quickstart-chat-typescript/index.html b/templates/chat-react-ts/index.html similarity index 100% rename from templates/quickstart-chat-typescript/index.html rename to templates/chat-react-ts/index.html diff --git a/templates/quickstart-chat-typescript/package.json b/templates/chat-react-ts/package.json similarity index 100% rename from templates/quickstart-chat-typescript/package.json rename to templates/chat-react-ts/package.json diff --git a/templates/quickstart-chat-typescript/public/vite.svg b/templates/chat-react-ts/public/vite.svg similarity index 100% rename from templates/quickstart-chat-typescript/public/vite.svg rename to templates/chat-react-ts/public/vite.svg diff --git a/templates/quickstart-chat-typescript/spacetimedb/package-lock.json b/templates/chat-react-ts/spacetimedb/package-lock.json similarity index 100% rename from templates/quickstart-chat-typescript/spacetimedb/package-lock.json rename to templates/chat-react-ts/spacetimedb/package-lock.json diff --git a/templates/quickstart-chat-typescript/spacetimedb/package.json b/templates/chat-react-ts/spacetimedb/package.json similarity index 100% rename from templates/quickstart-chat-typescript/spacetimedb/package.json rename to templates/chat-react-ts/spacetimedb/package.json diff --git a/templates/quickstart-chat-typescript/spacetimedb/src/index.ts b/templates/chat-react-ts/spacetimedb/src/index.ts similarity index 100% rename from templates/quickstart-chat-typescript/spacetimedb/src/index.ts rename to templates/chat-react-ts/spacetimedb/src/index.ts diff --git a/templates/quickstart-chat-typescript/spacetimedb/tsconfig.json b/templates/chat-react-ts/spacetimedb/tsconfig.json similarity index 100% rename from templates/quickstart-chat-typescript/spacetimedb/tsconfig.json rename to templates/chat-react-ts/spacetimedb/tsconfig.json diff --git a/templates/quickstart-chat-typescript/src/.gitattributes b/templates/chat-react-ts/src/.gitattributes similarity index 100% rename from templates/quickstart-chat-typescript/src/.gitattributes rename to templates/chat-react-ts/src/.gitattributes diff --git a/templates/quickstart-chat-typescript/src/App.css b/templates/chat-react-ts/src/App.css similarity index 100% rename from templates/quickstart-chat-typescript/src/App.css rename to templates/chat-react-ts/src/App.css diff --git a/templates/quickstart-chat-typescript/src/App.integration.test.tsx b/templates/chat-react-ts/src/App.integration.test.tsx similarity index 100% rename from templates/quickstart-chat-typescript/src/App.integration.test.tsx rename to templates/chat-react-ts/src/App.integration.test.tsx diff --git a/templates/quickstart-chat-typescript/src/App.tsx b/templates/chat-react-ts/src/App.tsx similarity index 100% rename from templates/quickstart-chat-typescript/src/App.tsx rename to templates/chat-react-ts/src/App.tsx diff --git a/templates/quickstart-chat-typescript/src/assets/react.svg b/templates/chat-react-ts/src/assets/react.svg similarity index 100% rename from templates/quickstart-chat-typescript/src/assets/react.svg rename to templates/chat-react-ts/src/assets/react.svg diff --git a/templates/quickstart-chat-typescript/src/index.css b/templates/chat-react-ts/src/index.css similarity index 100% rename from templates/quickstart-chat-typescript/src/index.css rename to templates/chat-react-ts/src/index.css diff --git a/templates/quickstart-chat-typescript/src/main.tsx b/templates/chat-react-ts/src/main.tsx similarity index 100% rename from templates/quickstart-chat-typescript/src/main.tsx rename to templates/chat-react-ts/src/main.tsx diff --git a/templates/quickstart-chat-typescript/src/module_bindings/index.ts b/templates/chat-react-ts/src/module_bindings/index.ts similarity index 100% rename from templates/quickstart-chat-typescript/src/module_bindings/index.ts rename to templates/chat-react-ts/src/module_bindings/index.ts diff --git a/templates/basic-typescript/src/module_bindings/init_type.ts b/templates/chat-react-ts/src/module_bindings/init_type.ts similarity index 100% rename from templates/basic-typescript/src/module_bindings/init_type.ts rename to templates/chat-react-ts/src/module_bindings/init_type.ts diff --git a/templates/quickstart-chat-typescript/src/module_bindings/message_table.ts b/templates/chat-react-ts/src/module_bindings/message_table.ts similarity index 100% rename from templates/quickstart-chat-typescript/src/module_bindings/message_table.ts rename to templates/chat-react-ts/src/module_bindings/message_table.ts diff --git a/templates/quickstart-chat-typescript/src/module_bindings/message_type.ts b/templates/chat-react-ts/src/module_bindings/message_type.ts similarity index 100% rename from templates/quickstart-chat-typescript/src/module_bindings/message_type.ts rename to templates/chat-react-ts/src/module_bindings/message_type.ts diff --git a/templates/basic-typescript/src/module_bindings/on_connect_reducer.ts b/templates/chat-react-ts/src/module_bindings/on_connect_reducer.ts similarity index 100% rename from templates/basic-typescript/src/module_bindings/on_connect_reducer.ts rename to templates/chat-react-ts/src/module_bindings/on_connect_reducer.ts diff --git a/templates/basic-typescript/src/module_bindings/on_connect_type.ts b/templates/chat-react-ts/src/module_bindings/on_connect_type.ts similarity index 100% rename from templates/basic-typescript/src/module_bindings/on_connect_type.ts rename to templates/chat-react-ts/src/module_bindings/on_connect_type.ts diff --git a/templates/basic-typescript/src/module_bindings/on_disconnect_reducer.ts b/templates/chat-react-ts/src/module_bindings/on_disconnect_reducer.ts similarity index 100% rename from templates/basic-typescript/src/module_bindings/on_disconnect_reducer.ts rename to templates/chat-react-ts/src/module_bindings/on_disconnect_reducer.ts diff --git a/templates/basic-typescript/src/module_bindings/on_disconnect_type.ts b/templates/chat-react-ts/src/module_bindings/on_disconnect_type.ts similarity index 100% rename from templates/basic-typescript/src/module_bindings/on_disconnect_type.ts rename to templates/chat-react-ts/src/module_bindings/on_disconnect_type.ts diff --git a/templates/quickstart-chat-typescript/src/module_bindings/send_message_reducer.ts b/templates/chat-react-ts/src/module_bindings/send_message_reducer.ts similarity index 100% rename from templates/quickstart-chat-typescript/src/module_bindings/send_message_reducer.ts rename to templates/chat-react-ts/src/module_bindings/send_message_reducer.ts diff --git a/templates/quickstart-chat-typescript/src/module_bindings/send_message_type.ts b/templates/chat-react-ts/src/module_bindings/send_message_type.ts similarity index 100% rename from templates/quickstart-chat-typescript/src/module_bindings/send_message_type.ts rename to templates/chat-react-ts/src/module_bindings/send_message_type.ts diff --git a/templates/quickstart-chat-typescript/src/module_bindings/set_name_reducer.ts b/templates/chat-react-ts/src/module_bindings/set_name_reducer.ts similarity index 100% rename from templates/quickstart-chat-typescript/src/module_bindings/set_name_reducer.ts rename to templates/chat-react-ts/src/module_bindings/set_name_reducer.ts diff --git a/templates/quickstart-chat-typescript/src/module_bindings/set_name_type.ts b/templates/chat-react-ts/src/module_bindings/set_name_type.ts similarity index 100% rename from templates/quickstart-chat-typescript/src/module_bindings/set_name_type.ts rename to templates/chat-react-ts/src/module_bindings/set_name_type.ts diff --git a/templates/quickstart-chat-typescript/src/module_bindings/user_table.ts b/templates/chat-react-ts/src/module_bindings/user_table.ts similarity index 100% rename from templates/quickstart-chat-typescript/src/module_bindings/user_table.ts rename to templates/chat-react-ts/src/module_bindings/user_table.ts diff --git a/templates/quickstart-chat-typescript/src/module_bindings/user_type.ts b/templates/chat-react-ts/src/module_bindings/user_type.ts similarity index 100% rename from templates/quickstart-chat-typescript/src/module_bindings/user_type.ts rename to templates/chat-react-ts/src/module_bindings/user_type.ts diff --git a/templates/quickstart-chat-typescript/src/setupTests.ts b/templates/chat-react-ts/src/setupTests.ts similarity index 100% rename from templates/quickstart-chat-typescript/src/setupTests.ts rename to templates/chat-react-ts/src/setupTests.ts diff --git a/templates/quickstart-chat-typescript/tsconfig.app.json b/templates/chat-react-ts/tsconfig.app.json similarity index 100% rename from templates/quickstart-chat-typescript/tsconfig.app.json rename to templates/chat-react-ts/tsconfig.app.json diff --git a/templates/quickstart-chat-typescript/tsconfig.json b/templates/chat-react-ts/tsconfig.json similarity index 100% rename from templates/quickstart-chat-typescript/tsconfig.json rename to templates/chat-react-ts/tsconfig.json diff --git a/templates/quickstart-chat-typescript/tsconfig.node.json b/templates/chat-react-ts/tsconfig.node.json similarity index 100% rename from templates/quickstart-chat-typescript/tsconfig.node.json rename to templates/chat-react-ts/tsconfig.node.json diff --git a/templates/quickstart-chat-typescript/vite.config.ts b/templates/chat-react-ts/vite.config.ts similarity index 100% rename from templates/quickstart-chat-typescript/vite.config.ts rename to templates/chat-react-ts/vite.config.ts diff --git a/templates/quickstart-chat-typescript/vitest.config.ts b/templates/chat-react-ts/vitest.config.ts similarity index 100% rename from templates/quickstart-chat-typescript/vitest.config.ts rename to templates/chat-react-ts/vitest.config.ts diff --git a/templates/basic-react/.template.json b/templates/react-ts/.template.json similarity index 100% rename from templates/basic-react/.template.json rename to templates/react-ts/.template.json diff --git a/templates/quickstart-chat-typescript/LICENSE b/templates/react-ts/LICENSE similarity index 100% rename from templates/quickstart-chat-typescript/LICENSE rename to templates/react-ts/LICENSE diff --git a/templates/basic-react/index.html b/templates/react-ts/index.html similarity index 100% rename from templates/basic-react/index.html rename to templates/react-ts/index.html diff --git a/templates/basic-react/package.json b/templates/react-ts/package.json similarity index 95% rename from templates/basic-react/package.json rename to templates/react-ts/package.json index 1f4a68402ec..a49c2f23238 100644 --- a/templates/basic-react/package.json +++ b/templates/react-ts/package.json @@ -1,5 +1,5 @@ { - "name": "@clockworklabs/basic-react", + "name": "@clockworklabs/react-ts", "private": true, "version": "0.0.1", "type": "module", diff --git a/templates/basic-typescript/spacetimedb/package.json b/templates/react-ts/spacetimedb/package.json similarity index 100% rename from templates/basic-typescript/spacetimedb/package.json rename to templates/react-ts/spacetimedb/package.json diff --git a/templates/basic-typescript/spacetimedb/pnpm-lock.yaml b/templates/react-ts/spacetimedb/pnpm-lock.yaml similarity index 100% rename from templates/basic-typescript/spacetimedb/pnpm-lock.yaml rename to templates/react-ts/spacetimedb/pnpm-lock.yaml diff --git a/templates/basic-react/spacetimedb/src/index.ts b/templates/react-ts/spacetimedb/src/index.ts similarity index 100% rename from templates/basic-react/spacetimedb/src/index.ts rename to templates/react-ts/spacetimedb/src/index.ts diff --git a/templates/basic-typescript/spacetimedb/tsconfig.json b/templates/react-ts/spacetimedb/tsconfig.json similarity index 100% rename from templates/basic-typescript/spacetimedb/tsconfig.json rename to templates/react-ts/spacetimedb/tsconfig.json diff --git a/templates/basic-react/src/App.tsx b/templates/react-ts/src/App.tsx similarity index 100% rename from templates/basic-react/src/App.tsx rename to templates/react-ts/src/App.tsx diff --git a/templates/basic-react/src/main.tsx b/templates/react-ts/src/main.tsx similarity index 94% rename from templates/basic-react/src/main.tsx rename to templates/react-ts/src/main.tsx index 2d43ef4495a..9d5844aebe0 100644 --- a/templates/basic-react/src/main.tsx +++ b/templates/react-ts/src/main.tsx @@ -6,7 +6,7 @@ import { SpacetimeDBProvider } from 'spacetimedb/react'; import { DbConnection, ErrorContext } from './module_bindings/index.ts'; const HOST = import.meta.env.VITE_SPACETIMEDB_HOST ?? 'ws://localhost:3000'; -const DB_NAME = import.meta.env.VITE_SPACETIMEDB_DB_NAME ?? 'basic-react'; +const DB_NAME = import.meta.env.VITE_SPACETIMEDB_DB_NAME ?? 'react-ts'; const onConnect = (_conn: DbConnection, identity: Identity, token: string) => { localStorage.setItem('auth_token', token); diff --git a/templates/basic-typescript/src/module_bindings/add_reducer.ts b/templates/react-ts/src/module_bindings/add_reducer.ts similarity index 100% rename from templates/basic-typescript/src/module_bindings/add_reducer.ts rename to templates/react-ts/src/module_bindings/add_reducer.ts diff --git a/templates/basic-typescript/src/module_bindings/add_type.ts b/templates/react-ts/src/module_bindings/add_type.ts similarity index 100% rename from templates/basic-typescript/src/module_bindings/add_type.ts rename to templates/react-ts/src/module_bindings/add_type.ts diff --git a/templates/basic-typescript/src/module_bindings/index.ts b/templates/react-ts/src/module_bindings/index.ts similarity index 100% rename from templates/basic-typescript/src/module_bindings/index.ts rename to templates/react-ts/src/module_bindings/index.ts diff --git a/templates/quickstart-chat-typescript/src/module_bindings/init_type.ts b/templates/react-ts/src/module_bindings/init_type.ts similarity index 100% rename from templates/quickstart-chat-typescript/src/module_bindings/init_type.ts rename to templates/react-ts/src/module_bindings/init_type.ts diff --git a/templates/quickstart-chat-typescript/src/module_bindings/on_connect_reducer.ts b/templates/react-ts/src/module_bindings/on_connect_reducer.ts similarity index 100% rename from templates/quickstart-chat-typescript/src/module_bindings/on_connect_reducer.ts rename to templates/react-ts/src/module_bindings/on_connect_reducer.ts diff --git a/templates/quickstart-chat-typescript/src/module_bindings/on_connect_type.ts b/templates/react-ts/src/module_bindings/on_connect_type.ts similarity index 100% rename from templates/quickstart-chat-typescript/src/module_bindings/on_connect_type.ts rename to templates/react-ts/src/module_bindings/on_connect_type.ts diff --git a/templates/quickstart-chat-typescript/src/module_bindings/on_disconnect_reducer.ts b/templates/react-ts/src/module_bindings/on_disconnect_reducer.ts similarity index 100% rename from templates/quickstart-chat-typescript/src/module_bindings/on_disconnect_reducer.ts rename to templates/react-ts/src/module_bindings/on_disconnect_reducer.ts diff --git a/templates/quickstart-chat-typescript/src/module_bindings/on_disconnect_type.ts b/templates/react-ts/src/module_bindings/on_disconnect_type.ts similarity index 100% rename from templates/quickstart-chat-typescript/src/module_bindings/on_disconnect_type.ts rename to templates/react-ts/src/module_bindings/on_disconnect_type.ts diff --git a/templates/basic-typescript/src/module_bindings/person_table.ts b/templates/react-ts/src/module_bindings/person_table.ts similarity index 100% rename from templates/basic-typescript/src/module_bindings/person_table.ts rename to templates/react-ts/src/module_bindings/person_table.ts diff --git a/templates/basic-typescript/src/module_bindings/person_type.ts b/templates/react-ts/src/module_bindings/person_type.ts similarity index 100% rename from templates/basic-typescript/src/module_bindings/person_type.ts rename to templates/react-ts/src/module_bindings/person_type.ts diff --git a/templates/basic-typescript/src/module_bindings/say_hello_reducer.ts b/templates/react-ts/src/module_bindings/say_hello_reducer.ts similarity index 100% rename from templates/basic-typescript/src/module_bindings/say_hello_reducer.ts rename to templates/react-ts/src/module_bindings/say_hello_reducer.ts diff --git a/templates/basic-typescript/src/module_bindings/say_hello_type.ts b/templates/react-ts/src/module_bindings/say_hello_type.ts similarity index 100% rename from templates/basic-typescript/src/module_bindings/say_hello_type.ts rename to templates/react-ts/src/module_bindings/say_hello_type.ts diff --git a/templates/basic-react/tsconfig.json b/templates/react-ts/tsconfig.json similarity index 100% rename from templates/basic-react/tsconfig.json rename to templates/react-ts/tsconfig.json diff --git a/templates/basic-react/vite.config.ts b/templates/react-ts/vite.config.ts similarity index 100% rename from templates/basic-react/vite.config.ts rename to templates/react-ts/vite.config.ts diff --git a/templates/templates-list.json b/templates/templates-list.json deleted file mode 100644 index 05f8c035e5c..00000000000 --- a/templates/templates-list.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "highlights": [ - { "name": "React", "template_id": "basic-react" } - ], - "templates": [ - { - "id": "basic-typescript", - "description": "A basic TypeScript client and server template with only stubs for code", - "server_source": "basic-ts/spacetimedb", - "client_source": "basic-ts", - "server_lang": "typescript", - "client_lang": "typescript" - }, - { - "id": "basic-c-sharp", - "description": "A basic C# client and server template with only stubs for code", - "server_source": "basic-cs/spacetimedb", - "client_source": "basic-cs", - "server_lang": "csharp", - "client_lang": "csharp" - }, - { - "id": "basic-rust", - "description": "A basic Rust client and server template with only stubs for code", - "server_source": "basic-rs/spacetimedb", - "client_source": "basic-rs", - "server_lang": "rust", - "client_lang": "rust" - }, - { - "id": "basic-react", - "description": "React web app with TypeScript server", - "server_source": "basic-react/spacetimedb", - "client_source": "basic-react", - "server_lang": "typescript", - "client_lang": "typescript" - }, - { - "id": "quickstart-chat-rust", - "description": "Rust server/client implementing quickstart chat", - "server_source": "quickstart-chat-rs/spacetimedb", - "client_source": "quickstart-chat-rs", - "server_lang": "rust", - "client_lang": "rust" - }, - { - "id": "quickstart-chat-c-sharp", - "description": "C# server/client implementing quickstart chat", - "server_source": "quickstart-chat-cs/spacetimedb", - "client_source": "quickstart-chat-cs", - "server_lang": "csharp", - "client_lang": "csharp" - }, - { - "id": "quickstart-chat-typescript", - "description": "TypeScript server/client implementing quickstart chat", - "server_source": "quickstart-chat-ts/spacetimedb", - "client_source": "quickstart-chat-ts", - "server_lang": "typescript", - "client_lang": "typescript" - } - ] -} diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index 212f82e9fc4..cead3e53883 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -169,7 +169,7 @@ fn main() -> anyhow::Result<()> { } })?; - edit_toml("templates/basic-rust/spacetimedb/Cargo.toml", |doc| { + edit_toml("templates/basic-rs/spacetimedb/Cargo.toml", |doc| { // Only set major.minor.* for the spacetimedb dependency. // See https://github.com/clockworklabs/SpacetimeDB/issues/2724. // @@ -178,7 +178,7 @@ fn main() -> anyhow::Result<()> { doc["dependencies"]["spacetimedb"] = toml_edit::value(wildcard_patch.clone()); })?; - edit_toml("templates/basic-rust/Cargo.toml", |doc| { + edit_toml("templates/basic-rs/Cargo.toml", |doc| { doc["dependencies"]["spacetimedb-sdk"] = toml_edit::value(wildcard_patch.clone()); })?; @@ -256,7 +256,7 @@ fn main() -> anyhow::Result<()> { // 2) StdbModule.csproj files: SpacetimeDB.Runtime dependency -> major.minor let stdb_modules: &[&str] = &[ "demo/Blackholio/server-csharp/StdbModule.csproj", - "templates/quickstart-chat-c-sharp/spacetimedb/StdbModule.csproj", + "templates/chat-console-cs/spacetimedb/StdbModule.csproj", "sdks/csharp/examples~/regression-tests/server/StdbModule.csproj", ]; for path in stdb_modules { @@ -287,7 +287,7 @@ fn main() -> anyhow::Result<()> { // 4) Template StdbModule.csproj: SpacetimeDB.Runtime dependency -> major.minor.* rewrite_csproj_package_ref_version( - "templates/basic-c-sharp/spacetimedb/StdbModule.csproj", + "templates/basic-cs/spacetimedb/StdbModule.csproj", "SpacetimeDB.Runtime", &wildcard_patch, )?;