Skip to content
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

Base branch for protocol v2 #127

Merged
merged 87 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from 69 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
34dc578
Add INVALID_REQUEST to RiverUncaughtSchema (#107)
masad-frost May 14, 2024
c1bc78d
[protocol v2] RFC PROTOCOL V2 (#111)
masad-frost May 17, 2024
bbac0b2
Streams interface (#118)
masad-frost May 18, 2024
3675b23
ReadStream implementation (#130)
masad-frost May 20, 2024
a802329
WriteStream implementation (#132)
masad-frost May 21, 2024
b5bf962
Client uses ReadStream and WriteStream (#136)
masad-frost May 21, 2024
590837c
clarify half-closed state
masad-frost May 22, 2024
4542ee1
Server uses ReadStream and WriteStream #136 (#137)
masad-frost May 28, 2024
630332b
[protocolv2] Always expect init, input sometimes (#153)
masad-frost May 29, 2024
0236436
Fix derp from rebase
masad-frost May 29, 2024
4dd2d96
fix using old write method
masad-frost May 30, 2024
528f304
[protocolv2] Init always exists (#159)
masad-frost May 31, 2024
acadffe
[protocolv2] swap ReadStream's waitForClose promise with callback sty…
masad-frost May 31, 2024
5fc5e25
[protocolv2] Half-close client implementation (#162)
masad-frost Jun 3, 2024
8bed4e3
[protocolv2] Half-close server implementation (#163)
masad-frost Jun 3, 2024
1d01d20
[protocolv2] swap WriteStream's waitForCloseRequest promise with call…
masad-frost Jun 3, 2024
0e306ec
[protocolv2] Implement close requests (#165)
masad-frost Jun 4, 2024
8d99095
bump protocol version
masad-frost Jun 4, 2024
9c3995c
Make sure jacky doesn't ick
masad-frost Jun 4, 2024
5598c69
[protocolv2] Make ReadStream always emit Result values (#172)
masad-frost Jun 5, 2024
7f30c9a
[protocolv2] Add abort support, move protocol errors to abort status …
masad-frost Jun 6, 2024
ab42557
Swap stream abort with stream close bits
masad-frost Jun 6, 2024
f53f93c
Fix issues with BaseError
masad-frost Jun 6, 2024
2945b7e
[protocolv2] Refactor server proc streams to look like client impleme…
masad-frost Jun 12, 2024
e06bef8
[protocolv2] Implement client abort
masad-frost Jun 13, 2024
29e5696
[protocolv2] Implement server abort
masad-frost Jun 14, 2024
03ab0c3
[protocolv2] Treat uncaught handler errors as abort
masad-frost Jun 14, 2024
b9b32bd
[protocolv2] replace returned dispose function with ctx.addCleanUp
masad-frost Jun 14, 2024
2d08c4c
[protocolv2] Handle invalid requests and internal server errors (#203)
masad-frost Jun 20, 2024
68c5072
[protocolv2] Ignore follow up messages to a stream after server abort…
masad-frost Jun 20, 2024
3e31350
[protocolv2] rename addCleanup -> onRequestFinished (#216)
masad-frost Jun 20, 2024
714f0dc
[protocolv2] try/catch immediately invoked onRequestFinished callback…
masad-frost Jun 20, 2024
57a0656
[protocolv2] Add invalid-request tag to logs (#218)
masad-frost Jun 20, 2024
12258b7
Undo .replit port change
masad-frost Jun 20, 2024
551cf52
Uninstall it-pushable
masad-frost Jun 24, 2024
e79b6b6
0.200.0-rc.0
masad-frost Jun 24, 2024
9209740
Add read and write streams to exports
masad-frost Jun 25, 2024
1545321
0.200.0-rc.1
masad-frost Jun 25, 2024
029fe37
[protocolv2] Allow listening for close on WriteStream (#226)
masad-frost Jul 5, 2024
4b9c39d
0.200.0-rc.2
masad-frost Jul 5, 2024
7ac0c0d
Merge remote-tracking branch 'origin/main' into protocolv2
masad-frost Jul 9, 2024
46555da
Temporarily use old protocol version
masad-frost Jul 9, 2024
4e76796
0.200.0-rc.3
masad-frost Jul 9, 2024
5e8d8a8
fmt
masad-frost Jul 10, 2024
052741c
[protocolv2] Make server backwards compatible for now (#230)
masad-frost Jul 10, 2024
8295845
Add backwards compatible serializer
masad-frost Jul 13, 2024
577cc66
[protocolv2] Fix passing input as first message being backwards incom…
masad-frost Jul 13, 2024
86b6d70
Pass empty object instead for passInitAsInputForBackwardsCompat
masad-frost Jul 13, 2024
6ec651c
Merge remote-tracking branch 'origin/main' into protocolv2
masad-frost Jul 13, 2024
98536f5
request/response and reader/writer nomenclature
masad-frost Jul 13, 2024
57a1b1f
yolo new api
masad-frost Jul 16, 2024
36b78a0
Merge remote-tracking branch 'origin/main' into protocolv2
masad-frost Jul 16, 2024
b2cb04f
0.200.0-rc.7
masad-frost Jul 16, 2024
c70e8b0
Merge remote-tracking branch 'origin/main' into protocolv2
masad-frost Jul 24, 2024
4357884
0.200.0-rc.8
masad-frost Jul 24, 2024
944ea30
Add unwrap to iterator
masad-frost Jul 24, 2024
9b55481
0.200.0-rc.9
masad-frost Jul 24, 2024
7b50c64
Fix asClientUpload returning an array
masad-frost Jul 24, 2024
7e42e02
0.200.0-rc.10
masad-frost Jul 24, 2024
5cb0ede
Expose serializeSchemaBackwardsCompatible
masad-frost Jul 25, 2024
93b4aa9
0.200.0-rc.11
masad-frost Jul 25, 2024
632e212
Expose old serialized schemas
masad-frost Jul 25, 2024
e64d96f
0.200.0-rc.12
masad-frost Jul 25, 2024
60a18b6
Merge remote-tracking branch 'origin/main' into protocolv2
masad-frost Jul 26, 2024
8782852
0.200.0-rc.13
masad-frost Jul 26, 2024
93479b4
Allow nested unions as errors
masad-frost Jul 26, 2024
493babe
0.200.0-rc.14
masad-frost Jul 26, 2024
adbcc1b
0.200.0-rc.15
masad-frost Jul 27, 2024
0df2852
Merge remote-tracking branch 'origin/main' into protocolv2
masad-frost Jul 29, 2024
8227782
0.200.0-rc.16
masad-frost Jul 29, 2024
667b6cb
RFC: take 2 on streams (#249)
masad-frost Aug 1, 2024
251758b
fmt
masad-frost Aug 1, 2024
bab2aa8
[protocolv2] Use new simpler readable and writable interfaces (#250)
masad-frost Aug 1, 2024
87dd2de
[protocolv2] Rename reader to readable and writer to writable (#251)
masad-frost Aug 1, 2024
d44ef6b
Address a bunch of feedback
masad-frost Aug 2, 2024
97f1479
restucture onmessage a bit
masad-frost Aug 2, 2024
c173fc0
Fix invalid-request test
masad-frost Aug 7, 2024
ed0c9a1
Fix server expecting control message for aborts
masad-frost Aug 7, 2024
f3d808b
Simplify abort and signals
masad-frost Aug 7, 2024
a7472d1
Rename abort to cancel
masad-frost Aug 8, 2024
eb98bb1
Update some docs
masad-frost Aug 8, 2024
d22a7d1
0.200.0-rc.17
masad-frost Aug 8, 2024
c4bdf59
Expose unwrapOrThrow
masad-frost Aug 13, 2024
5f9959e
0.200.0-rc.18
masad-frost Aug 13, 2024
831ebb7
Fix unwrapOrThrow being exported as a type only
masad-frost Aug 13, 2024
829097b
0.200.0-rc.19
masad-frost Aug 13, 2024
531c613
Merge remote-tracking branch 'origin/main' into protocolv2
masad-frost Aug 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .replit
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ channel = "stable-23_05"
localPort = 3000
externalPort = 80

[[ports]]
localPort = 24678
externalPort = 3000
masad-frost marked this conversation as resolved.
Show resolved Hide resolved

[languages.eslint]
pattern = "**{*.ts,*.js,*.tsx,*.jsx}"
[languages.eslint.languageServer]
Expand Down
258 changes: 216 additions & 42 deletions PROTOCOL.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ export const ExampleService = ServiceSchema.define(
// procedures
{
add: Procedure.rpc({
input: Type.Object({ n: Type.Number() }),
output: Type.Object({ result: Type.Number() }),
requestData: Type.Object({ n: Type.Number() }),
responseData: Type.Object({ result: Type.Number() }),
errors: Type.Never(),
// note that a handler is unique per user RPC
async handler(ctx, { n }) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably needs an update too

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same with await client.example.add.rpc below

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs

Expand Down
Loading
Loading