# Description of Changes
Added a repo migration notice workflow to each repository that we've
merged into SpacetimeDB.
These need to be mirrored back to the actual repos with a process like:
```bash
git subtree split --prefix=sdks/typescript -b release/typescript
git push -f git@github.com:clockworklabs/spacetimedb-typescript-sdk.git release/typescript:main
git branch -D release/typescript
```
Once they're migrated there, the bot will automatically comment on any
PR or issue opened in those repos.
# API and ABI breaking changes
None. CI-only changes.
# Expected complexity level and risk
2
# Testing
- [x] In a demo repo, it properly commented and closed a PR:
https://github.com/clockworklabs/github-tooling-test/pull/42
- [x] In a demo repo, it properly commented and closed an issue:
https://github.com/clockworklabs/github-tooling-test/issues/43
---------
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
# Description of Changes
We want to release #2980 for the TS SDK, so I'm bumping our version
number.
# API and ABI breaking changes
None
# Expected complexity level and risk
1
# Testing
None, just a version bump.
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
# Description of Changes
The `ScheduleAt` type appears to have an outdated structure. I've
updated the structure of the `ScheduleAt` type represented in TypeScript
to be in line with the Rust type:
https://docs.rs/spacetimedb/latest/spacetimedb/enum.ScheduleAt.html
Namely, we were missing the inner Spacetime library types of
`TimeDuration` and `Timestamp`.
This is to address #2969.
# API and ABI breaking changes
This is an API breaking change in that it changes the API, but it's
breaking in that it fixes a bug.
# Expected complexity level and risk
2
# Testing
I have not done additional testing, but I thought I would get this PR
started to make it easier for the next person who comes along.
The ideal automated test to add would be one which connects a TypeScript
client to a SpacetimeDB module with a scheduled table, and verifies that
the type is correctly deserialized and represented in TypeScript when
the rows are sent down.
---------
Co-authored-by: Jeffrey Dallatezza <jeffreydallatezza@gmail.com>
# Description of Changes
Bumped all versions to 1.3.0 in preparation for an upcoming minor
release.
# API and ABI breaking changes
No breaking changes.
# Expected complexity level and risk
1
# Testing
None
---------
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
# Description of Changes
Bumping this in preparation for an upcoming release.
# API and ABI breaking changes
None
# Expected complexity level and risk
1
# Testing
None, just a version bump
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
This PR helps to support React Native in the Typescript SDK. We have
identified two issues:
1. Certain versions of React Native exhibit a bug where the constructor
mistakenly treats a URL object as a string. This causes an error when
the constructor attempts to call `.endsWith()` on the URL object,
leading to runtime errors. This PR adds a .toString() call when passing
a URL instance to the URL constructor.
2. React Native doesn't provide an implementation for TextEncoder and
TextDecoder which are used to read/write strings in our binary reader
and writer. This PR use introduce the usage of a library for these two
types.
Note: this still requires the use of a Polyfill as React Native URL
implementation is missing most methods in version older than 0.79 (>= 6
month old)
* Get it working with base64 encoded row ids, and start adding the better way for indexing.
* Use concat to avoid creating too many arguments for big updates.
* Use primitives as rowIds
* Remove OperationsMap
* Add some table cache tests and regen stuff.
* Cleanup
* revert accidental cargo change.
* Add semver parsing.
* Add a minimum version check.
* Use qmark syntax.
* Regen quickstart-chat bindings with 1.2.0 cli
* Bump minimum codegen version.
* Regen test app with 1.2
* Test quickstart-chat in CI
* fix?
* ignore diffs containing SpacetimeDB commit
* prettier config
* fix?
* [REVERT THIS TEST COMMIT] add diff to module bindings
* revert previous test commit
* [REVERT THIS TEST COMMIT] introduce a typechecking error
* revert previous test commit
* tiny review
---------
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
* 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>