-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tyler's Stable SDK API implementation (#102)
* 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 <[email protected]> Co-authored-by: Puru Vijay <[email protected]>
- Loading branch information
1 parent
17227c0
commit b8c944c
Showing
146 changed files
with
5,383 additions
and
5,203 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@clockworklabs/spacetimedb-sdk': minor | ||
--- | ||
|
||
internal: Remove global instance, allow multiple connections |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,3 @@ node_modules | |
pnpm-lock.yaml | ||
dist | ||
target | ||
module_bindings |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,3 @@ dist-ssr | |
*.sw? | ||
|
||
server | ||
module_bindings |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
65 changes: 65 additions & 0 deletions
65
examples/quickstart/src/module_bindings/identity_connected_reducer.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE | ||
// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. | ||
|
||
import { | ||
// @ts-ignore | ||
Address, | ||
// @ts-ignore | ||
AlgebraicType, | ||
// @ts-ignore | ||
AlgebraicValue, | ||
// @ts-ignore | ||
BinaryReader, | ||
// @ts-ignore | ||
BinaryWriter, | ||
// @ts-ignore | ||
DBConnectionBuilder, | ||
// @ts-ignore | ||
DBConnectionImpl, | ||
// @ts-ignore | ||
DBContext, | ||
// @ts-ignore | ||
Event, | ||
// @ts-ignore | ||
EventContextInterface, | ||
// @ts-ignore | ||
Identity, | ||
// @ts-ignore | ||
ProductType, | ||
// @ts-ignore | ||
ProductTypeElement, | ||
// @ts-ignore | ||
SumType, | ||
// @ts-ignore | ||
SumTypeVariant, | ||
// @ts-ignore | ||
TableCache, | ||
} from '@clockworklabs/spacetimedb-sdk'; | ||
|
||
export type IdentityConnected = {}; | ||
|
||
/** | ||
* A namespace for generated helper functions. | ||
*/ | ||
export namespace IdentityConnected { | ||
/** | ||
* A function which returns this type represented as an AlgebraicType. | ||
* This function is derived from the AlgebraicType used to generate this type. | ||
*/ | ||
export function getAlgebraicType(): AlgebraicType { | ||
return AlgebraicType.createProductType([]); | ||
} | ||
|
||
export function serialize( | ||
writer: BinaryWriter, | ||
value: IdentityConnected | ||
): void { | ||
const converted = {}; | ||
IdentityConnected.getAlgebraicType().serialize(writer, converted); | ||
} | ||
|
||
export function deserialize(reader: BinaryReader): IdentityConnected { | ||
const value = IdentityConnected.getAlgebraicType().deserialize(reader); | ||
return {}; | ||
} | ||
} |
Oops, something went wrong.