Commit Graph

3186 Commits

Author SHA1 Message Date
james gilles 8a317041d4 Update Rust module documentation (#2050)
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2025-02-21 03:48:46 +00:00
joshua-spacetime aeaa7a423d Add support for COUNT (#2285) 2025-02-20 16:37:33 +00:00
Mario Montoya fa321015da Add link to the cli (#171) 2025-02-20 11:17:48 -05:00
Tyler Cloutier 8e0ed66038 Disable SpacetimeDB integration test for now (#145) 2025-02-19 16:59:20 -05:00
joshua-spacetime 6abfe8ddba Add support for LIMIT (#2279) 2025-02-19 20:18:44 +00:00
Zeke Foppa fdc8c25d68 bump versions to 1.0.0 (#126)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-02-19 14:11:28 -05:00
Mario Montoya 32e24b4095 Add README.md to all modules in SpacetimeDB/modules describing their usage (#2282) 2025-02-19 17:03:34 +00:00
Zeke Foppa 4665c5243c CLI - Add feature to print markdown docs (#2276)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-02-19 04:33:07 +00:00
Zeke Foppa 860edb405b CLI docs (#168)
* [bfops/cli-docs]: CLI docs

* [bfops/cli-docs]: fix?

* [bfops/cli-docs]: manual backticks

* [bfops/cli-docs]: manual bold

* [bfops/cli-docs]: manual bold

* [bfops/cli-docs]: add README for maintaining CLI reference docs

* [bfops/cli-docs]: maybe fix code?

* [bfops/cli-docs]: tweak <code>

* [bfops/cli-docs]: tweak code

* [bfops/cli-docs]: update

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-02-18 17:02:37 -08:00
Zeke Foppa 0162acebdd CLI - Remove newlines from command helptext (#2277)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-02-18 23:24:38 +00:00
Mazdak Farrokhzad 65ec786d2d Impose FilterableValue in UniqueColumn::find (#2267) 2025-02-18 19:18:12 +00:00
Jeffrey Dallatezza bf82614d9c Send delete updates for unsubscribes (#2271) 2025-02-18 17:46:16 +00:00
Mazdak Farrokhzad 224f7b6808 keynote-benchmarks: measure the hot latency in 'roundtrip' (#2264) 2025-02-17 14:51:42 +00:00
Zeke Foppa 5e8eda4869 CI - Fix the SDK Tests CI job after branch rename (#2258)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-02-14 19:05:30 +00:00
Zeke Foppa b80a2b99bc CI - Update release branch check (#246)
## Description of Changes
This updates the CI check protecting the release branch, as part of
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/issues/226
(see that ticket for more details).

Once this is merged, it will need to be cherrypicked into our release
branch in order to take effect there.

The check itself has also been renamed. I have already updated the
branch protection rules to look for the new name.

## API

No code changes.

## Requires SpacetimeDB PRs
None

## Testsuite
SpacetimeDB branch name: master

## Testing
The previous behavior was well-tested, and I've just changed some
strings here, so I have not done further testing. It does pass on this
branch though.

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-02-13 10:29:41 -08:00
Zeke Foppa 0328a4fe4b CI - Update actions/cache@v2 -> @v4 (#2247)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-02-12 17:53:41 +00:00
joshua-spacetime 094f6c95c2 Remove WebSocket api docs and all references to them (#165)
Closes #164.

---------

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2025-02-12 08:28:10 -08:00
Mazdak Farrokhzad 14d21c4b1c Save 10 ms by using Vec instead of VecDeque (#2254) 2025-02-11 23:04:25 +00:00
Phoebe Goldman 4d9cc5921e Import timestamp and duration by file, not from root (#139)
this fixes a circular import or circular definition problem that we don't fully understand.
2025-02-11 17:31:55 -05:00
Mazdak Farrokhzad 0b2364b3a4 Add fast ser/de paths for structs of prims with repr(C) (#2251) 2025-02-11 22:07:14 +00:00
Mazdak Farrokhzad fe68fe6f98 Add keynote-benchmarks (#2252) 2025-02-11 22:05:32 +00:00
james gilles 2f30dc1c2c C# SDK - Emit Event.UnknownTransaction rather than throwing on unknown reducer (#2241) (#2249) 2025-02-11 21:54:06 +00:00
james gilles 724ac3b45a Update for Timestamp stuff & EventContext stuff & ConnectionId stuff (#19)
* Fix C# server bug with overlapping circles

Update for Timestamp stuff

* Update for EventContext changes (TODO: update package .jsons once c# SDK PR is merged

* Regenerate

* Fix package .jsons

* Update for new AuthToken logic

* Update for no onUnhandledReducerError + fix package jsons

* Revert server-rust/Cargo.toml change
2025-02-11 15:37:29 -05:00
Noa f307d531a5 Fixup comment for SpacetimeCreds (#2250) 2025-02-11 20:14:32 +00:00
Noa 03861217b3 Switch to Bearer auth (#236)
## Description of Changes

Switches to Bearer authentication, which is the more proper auth schema
to use with tokens.

## API

 - [ ] This is an API breaking change to the SDK

## Requires SpacetimeDB PRs
- https://github.com/clockworklabs/SpacetimeDB/pull/2181

## Testsuite
*If you would like to run the your SDK changes in this PR against a
specific SpacetimeDB branch, specify that here. This can be a branch
name or a link to a PR.*

SpacetimeDB branch name: master

---------

Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
Co-authored-by: James Gilles <jameshgilles@gmail.com>
2025-02-11 15:13:26 -05:00
Zeke Foppa 076d4ecbb1 Strip trailing / from URIs before connecting (#238)
## Description of Changes
We were not stripping `/` from the end of URIs provided to `Connect`. We
manually append `/...` to the provided addresses, so if we don't start
by stripping trailing `/`s, we end up with `//` in the URI and we get
errors.

Addresses part of
https://github.com/clockworklabs/SpacetimeDB/issues/1551.

## API

No breaking  changes. This fixes an error case.

## Requires SpacetimeDB PRs
None

## Testsuite
SpacetimeDB branch name: master

## Testing
- [x] Tested the quickstart chat client with a host containing a
trailing `/`
```
# start a server, publish the module, send some input
# I also updated one line in `client.csproj` to use `Net8.0` because I no longer have `Net7.0` installed

$ cd examples~/quickstart/client

$ dotnet run
[I] SpacetimeDBClient: Connecting to ws://localhost:3000 quickstart-chat
C200098E is online
Connected
C2007471: hello
C2007471: godo
C2007471: asdf

$ sed -i 's/localhost:3000/localhost:3000\//' Program.cs

$ dotnet run
[I] SpacetimeDBClient: Connecting to ws://localhost:3000 quickstart-chat
C2000601 is online
Connected
C2007471: hello
C2007471: godo
C2007471: asdf

$ git diff
diff --git a/examples~/quickstart/client/Program.cs b/examples~/quickstart/client/Program.cs
index 9eb43b1..289e736 100644
--- a/examples~/quickstart/client/Program.cs
+++ b/examples~/quickstart/client/Program.cs
@@ -7,8 +7,8 @@ using System.Threading;
 using SpacetimeDB;
 using SpacetimeDB.Types;
 
-const string HOST = "http://localhost:3000";
-const string DBNAME = "chatqs";
+const string HOST = "http://localhost:3000/";
+const string DBNAME = "quickstart-chat";
 
 // our local client SpacetimeDB identity
 Identity? local_identity = null;
diff --git a/examples~/quickstart/client/client.csproj b/examples~/quickstart/client/client.csproj
index 48917cc..ab7ce44 100644
--- a/examples~/quickstart/client/client.csproj
+++ b/examples~/quickstart/client/client.csproj
@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <OutputType>Exe</OutputType>
-    <TargetFramework>net7.0</TargetFramework>
+    <TargetFramework>net8.0</TargetFramework>
     <CheckEolTargetFramework>false</CheckEolTargetFramework>
     <ImplicitUsings>disable</ImplicitUsings>
     <Nullable>enable</Nullable>
```

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-02-11 19:42:41 +00:00
Noa c6eded9ade Adjust http api usage for glowup (#242)
## Description of Changes
Companion PR for the http api glowup.

## API

Not a breaking change; this catches us up to being compatible with a
breakage introduced by
- https://github.com/clockworklabs/SpacetimeDB/pull/2225.

## Requires SpacetimeDB PRs
- https://github.com/clockworklabs/SpacetimeDB/pull/2225

## Testsuite
SpacetimeDB branch name: master

## Testing
Existing CI passes (it was failing without this change since it couldn't
connect).

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-02-11 19:21:17 +00:00
Noa e76ba2bd35 Only support bearer auth (#2248) 2025-02-11 18:51:05 +00:00
james gilles 498b25f825 Emit Event.UnknownTransaction rather than throwing on unknown reducer (#244)
## Description of Changes
as described

## API

no breaks

## Requires SpacetimeDB PRs
https://github.com/clockworklabs/SpacetimeDB/pull/2241

## Testsuite

SpacetimeDB branch name: jgilles/unknown_reducer

## Testing

see SpacetimeDB PR
2025-02-11 13:21:06 -05:00
Tyler Cloutier 03fda01fb9 Implemented error arguments in error callbacks (#2229) 2025-02-11 15:48:05 +00:00
Jeffrey Dallatezza 6727e05040 Remove some Identity conversions that could panic (#1966) 2025-02-11 06:19:07 +00:00
Noa 086a239381 Reimplemented/rebased the changes Noa submitted (#134)
Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
2025-02-11 01:01:46 -05:00
Noa a344b5ec2d Switch to Bearer auth (#131) 2025-02-11 00:57:06 -05:00
Tyler Cloutier 204d43c3f9 DBConnection -> DbConnection + some comments (#137) 2025-02-11 00:56:16 -05:00
Tyler Cloutier 61c1f0e27b Implemented the new mutable subscriptions API (#135)
* Implemented the new subscriptions API

* Fixed the ../index thing

* Fixed the ../index thing for realz

* Fixes for Timestamp and TimeDuration

* Better error handling

* Fixed rebase issues

* lint

* Reduce diff

* lint
2025-02-11 00:45:48 -05:00
Noa 6a8375260f Refactor HTTP api to better adhere to REST guidelines (real) (#2243) 2025-02-11 02:59:45 +00:00
Zeke Foppa 6fc5ce44d7 CLI - Default config lists maincloud, not testnet (#2237)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-02-11 02:46:39 +00:00
Tyler Cloutier d191b8561b DBConnection -> DbConnection for the TypeScript API (#2230) 2025-02-11 02:14:02 +00:00
Noa cf6822541f Remove janky schema from http API (#2181) 2025-02-11 00:56:07 +00:00
Tyler Cloutier d16e2d6ae8 Now emitting UnknownTransaction (#138)
* Now emitting UnknownTransaction if reducer name is empty string or the reducer args are not parseable

* Fixed small bug

* Lint
2025-02-10 18:10:04 -05:00
james gilles 5159c79be0 Implement IComparable for Timestamp (#2239) 2025-02-10 21:34:36 +00:00
Jeffrey Dallatezza c2d40f86fb Add metrics for index inserts and deletes (#2236) 2025-02-10 21:34:02 +00:00
Phoebe Goldman 81631318d5 TypeScript SDK: Rename address to connection ID (#133)
* Rename address to connection ID

* Format
2025-02-10 16:02:58 -05:00
Noa d43548b1de Fix confusing csharp workload-install error message (#2238) 2025-02-10 20:31:11 +00:00
Ingvar Stepanyan 8503e93629 Use Into<String> instead of ToString (#2127)
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
2025-02-10 15:05:01 -05:00
Phoebe Goldman aedc601145 Rename Address to ConnectionId (#2220)
Signed-off-by: Phoebe Goldman <phoebe@goldman-tribe.org>
Co-authored-by: James Gilles <jameshgilles@gmail.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
2025-02-10 00:40:16 +00:00
Phoebe Goldman 96d52c1a7b Rename Address to ConnectionId (#239)
## Description of Changes

Companion to [Rename `Address` to
`ConnectionId`](https://github.com/clockworklabs/SpacetimeDB/pull/2220).
See that PR's description for more.

Like all the SDKs, this PR does not change the SDK's behavior; the SDK
still generates a connection ID locally and passes it through the HTTP
API. This is not exposed to users, and can be changed in a follow-up.

Also, use `/usr/bin/env bash` instead of `/bin/bash` in tools, for
portability reasons.

## API

 - [x] This is an API breaking change to the SDK

`Address` is renamed to `ConnectionId`.

## Requires SpacetimeDB PRs

- https://github.com/clockworklabs/SpacetimeDB/pull/2220
- 
## Testsuite
*If you would like to run the your SDK changes in this PR against a
specific SpacetimeDB branch, specify that here. This can be a branch
name or a link to a PR.*

SpacetimeDB branch name: phoebe/rename-address-to-connection-id

## Testing

- [x] Pretty much just automated testing.
- [x] @kazimuth will need to update and run Blackholio.

---------

Co-authored-by: James Gilles <jameshgilles@gmail.com>
2025-02-10 00:29:18 +00:00
Tyler Cloutier e54a28584a Standardized module names and added module-test-cs based on module-test (#2232) 2025-02-09 05:58:19 +00:00
Zeke Foppa 5ddd73ee20 CLI - Warn when using an unstable command (#2227)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-02-08 20:21:46 +00:00
Piotr Sarnacki 00c6aa0baf Add /health endpoint (#1989)
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
2025-02-08 19:58:14 +00:00