-
Notifications
You must be signed in to change notification settings - Fork 15
Add "receiveWSMessage" and "sendWSMessage" to EventType type definition #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Client additions
Updating documentation
It allows to subscribe to queries, like: client.subscribe("SELECT * FROM Player");
* Add some client tests This adds tests for the client and the ability to supply a test adapter. I also tried to mock WS, but for some reason it didn't work and I figured out making our own adapter is simple enough.
* Remove package-log.json We already have yarn lock, so no need to have both * Add Prettier * Format code using prettier * Add husky and pretty-quick This will ensure formatting before committing
Remove identity from credentials (not needed to log in) Co-authored-by: Derek Brinkmann <[email protected]>
We support primaryKey fields now, thus we can also perform an update operation on the client by utilizing the primaryKey
Added manual ws table connectors
Co-authored-by: Boppy <[email protected]>
Co-authored-by: NateTheDev1 <[email protected]>
* Adding more doc comments with examples * Copy docs from spacetimedb for the SATS types. * Clarification for docs of subscription update * Fix nits * Minimal doc for Identity * Fix params & undefined check in doc * Copy the doc changes from the website
…uffer, this causes a bug in C# module implementation which actually validates the length (clockworklabs#19)
At the moment when we authenticate with the short-lived token we also get the short lived token back. In order to not give it back to the application let's just ignore the identity message token if we already got one
* Initial commiut * Update quickstart example * Cleanup * Update quickstart to use identity changes * Remove misplaced files * Switch generated folder name to match quickstart guide * Switch generated folder name to match quickstart guide --------- Co-authored-by: NateTheDev1 <[email protected]> Co-authored-by: Derek Brinkmann <[email protected]>
* Add license.text * Fix case on file name --------- Co-authored-by: Derek Brinkmann <[email protected]>
When the primary key is of type Identity we were still doing === comparison by using the Map data structure. This commit introduces a different data structure called OperationsMap which can also use isEqual to compare keys if isEqual function is available
After the format of keeping the identity on the server was changed we have to update how we serialize and deserialize Identity values
At some point identities were returned in a form of { __identity_bytes: string } object. This commit changes the implementation to accept regular strings as an argument because that's how we get all of the identities now.
Remove `protobufjs` from devDependencies
Re: clockworklabs/SpacetimeDB#840 This commit updates the TypeScript SDK to no longer use the `row_pk` field in the client API, as that field no longer exists. As in the other SDKs, we replace our use of the `row_pk` with the serialized representation of the row, as this saves our needing to have objects/dicts/hash-maps keyed on domain types. Unlike the other SDKs, we support either the binary (protobuf) or JSON APIs. When using the binary API, we convert the BSATN row to a string, and use that as the `rowPk`. When using the JSON API, we `JSON.stringify` the row itself, and use that as the `rowPk`. The latter is ugly and not performant, but we don't care because the JSON API is slow anyways. This commit also removes some uses of `any` from the deserialization code, because I wanted the compiler to double-check my work.
…alid tables (clockworklabs#32) * Cleaned up code and added better error handling and responses for invalid tables * Fixed breaking test * Implemented new logging system * made a small change to a WS error log
… the name (clockworklabs#35) Co-authored-by: Gérald Divoux <[email protected]>
This PR is quite old so I'm going to close it. We're also now in the process of migrating this repo to the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See clockworklabs/SpacetimeDB#3038
Description of Changes
Added
"receiveWSMessage"
and"sendWSMessage"
to theEventType
type definition.This PR assumes that these two event types (which are already being emitted) are intended to be part of the public API. My current use case is to capture the size of the incoming and outgoing WebSocket message data to track the transfer rate up/down.
(This is a code-only change. Tests still pass, and I didn't see any existing tests for this level of event emitting so I didn't add any. Please let me know if I missed something there!)
API
N/A.
Requires SpacetimeDB PRs
N/A.