* Allow spacetimedb sdk to work when spacetimedb url is more than a host name.
* run pnpm format
---------
Co-authored-by: DeveloperChaseLewis <developer.chase.lewis@gmail.com>
* Regen the api types from the server.
* fmt the client api code
* Use the multi versions of subscription messages.
* Add ref counting of rows and delay callbacks.
* WIP debugging tests.
* Regen test app
* A lot of changes.
* Use new subscription api.
* remove commented out code.
* Fix update and cleanup.
* Fix path to spacetimedb
* Run tests before checking diff in CI
* Update packages/sdk/tests/db_connection.test.ts
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
* Update packages/sdk/tests/db_connection.test.ts
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
* Update packages/sdk/tests/db_connection.test.ts
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
* Update packages/sdk/tests/db_connection.test.ts
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
* Various cleanups.
* Comment out the CI test for the generated code being up to date.
* Regen.
* Add sed command.
---------
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
* 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
* Add `Timestamp` to the SDK, moving it out of `client_api`
Companion to SpacetimeDB#1836
* Add `TimeDuration` class
* Add forgotten return type annotation
* 🤦
* Prettier
* Update `client_api` schema to use `TimeDuration`
* Micros, not nanos
From SpacetimeDB 072c2ea3a3:
Prioritize BSATN and BFLATN compat with 0.12
Timestamp and TimeDuration store `micros: i64`, not `nanos: i64`.
This means that old commitlogs and snapshots should still be compatible,
assuming they don't include timestamps greater than `i64::MAX`,
as previously we used `micros: u64`. This seems unlikely.
* Ran new code gen
* Fixed rebase conflicts
---------
Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
* Updated the quickstart to use the new 1.0 API
* Ran prettier
* Updated CSS
* Removed server code
* Moved out of the client dir
* Updated lockfile
* Added new workflow
* Small fixes
* Updated PR template
* Ran prettier
* Fixes to workflwo
* Workflow fixes
* Fixes the toolchain thing
* Added SpacetimeDB integration test
* Fix workflow hopefully
* Fix workflow
* Prettier
* Updated pull request template to better reflect the reality
* Fixed path in workflow
* Prettier after codegen
* Regenerate
* Say yes to deleting data
* Updated codegen to latest master of SpacetimeDB
* debug actions
* Formatting
* Implemented EventContext update
* Removed unused imports
* Fix merge marker
* Updated the quickstart to use the new 1.0 API
* Ran prettier
* Updated CSS
* Removed server code
* Moved out of the client dir
* Updated lockfile
* Added new workflow
* Small fixes
* Updated PR template
* Ran prettier
* Fixes to workflwo
* Workflow fixes
* Fixes the toolchain thing
* Added SpacetimeDB integration test
* Fix workflow hopefully
* Fix workflow
* Prettier
* Updated pull request template to better reflect the reality
* Fixed path in workflow
* Prettier after codegen
* Regenerate
* Say yes to deleting data
* Updated codegen to latest master of SpacetimeDB
* debug actions
* Formatting
* add README steps
* Ran lints
---------
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
* Amend `withCredentials` to `withToken`
`withCredentials` was designed for our old auth model,
where tokens were always issued by the SpacetimeDB host alongside an `Identity`,
and therefore the bearer always knew their `Identity`.
In our new auth model,
a client may have a valid auth-able JWT but not know what `Identity` it will result in,
as the `Identity` is computed based on the hash of some of the token's contents,
and this hashing algorithm is not included in our client SDKs.
As such, this PR revises `withCredentials` to `withToken`, which just accepts the token.
* TypeScript puts ? on variables, not types
* Prettier
* support TransactionUpdateLight and CallReducerFlags
* Run generate
* Push creds
* run prettier
* Add changeset
* Turn on withLightMode
---------
Co-authored-by: Puru Vijay <awesomepuruvj@gmail.com>
Co-authored-by: Puru Vijay <47742487+PuruVJ@users.noreply.github.com>
* Update Identity and Address to use bigints rather than byte arrays
* Add back accidentally-removed APIs
* Remove debugging log
* Add changeset
* Fix names
* Format
* Update creds
---------
Co-authored-by: Puru Vijay <awesomepuruvj@gmail.com>
* 0.12: Remove global (#99)
* Push
* Half baked satuff
* Push tables stuff
* Update the example a bit
* Added tsup to dev dependencies
* Fixed naming and a lot of issues
* Improved the serialization situation
* More cleanup
* Updating the examples with the code gen
* Unscuffed the scuffery
* Unscuffing
* It works
* Whitespace
* Updated the quickstart
* pnpm format
* Fixed errors and manually imported sdk correctly in code gen code
* Updated the typescript sdk with the new websocket proposal format
* Fixes and removed playground
* Updated for 0.12 still not done fixing tests
* Regenerated the quickstart
* fixes and formating
* Fixed tests almost
* Fixed more tests
* Fixed all tests
* Renamed compile to build
* Fixes
* test-app: Expose the files
* ci: Build the code before tests
* build -> compile
* try to fix CR
---------
Co-authored-by: Puru Vijay <47742487+PuruVJ@users.noreply.github.com>
Co-authored-by: Puru Vijay <awesomepuruvj@gmail.com>