@replit/river-codegen
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -322,8 +322,10 @@ #!/usr/bin/env node | ||
chunks.push(`type: 'stream',`); | ||
} else if (!method.clientStreaming && method.serverStreaming) { | ||
chunks.push(`type: 'server-stream',`); | ||
} else if (!method.clientStreaming && !method.serverStreaming) { | ||
chunks.push(`type: 'rpc',`); | ||
} else { | ||
// TODO: Support client-stream and server-stream RPCs. | ||
// TODO: Support client-stream RPCs. | ||
throw new Error( | ||
`Method ${service.name}.${method.name} is not rpc or stream`, | ||
`Method ${service.name}.${method.name} is not rpc, server-stream, or stream`, | ||
); | ||
@@ -387,3 +389,3 @@ } | ||
"Generate River server type declarations from gRPC service declarations", | ||
version: "0.0.5", | ||
version: "0.0.6", | ||
args: { | ||
@@ -390,0 +392,0 @@ paths: multioption({ |
@@ -267,2 +267,5 @@ #!/usr/bin/env node | ||
} | ||
else if (!method.clientStreaming && method.serverStreaming) { | ||
chunks.push(`type: 'server-stream',`); | ||
} | ||
else if (!method.clientStreaming && !method.serverStreaming) { | ||
@@ -272,4 +275,4 @@ chunks.push(`type: 'rpc',`); | ||
else { | ||
// TODO: Support client-stream and server-stream RPCs. | ||
throw new Error(`Method ${service.name}.${method.name} is not rpc or stream`); | ||
// TODO: Support client-stream RPCs. | ||
throw new Error(`Method ${service.name}.${method.name} is not rpc, server-stream, or stream`); | ||
} | ||
@@ -313,3 +316,3 @@ chunks.push(`input: ${trimPackagePrefix(method.inputType)},`); | ||
description: "Generate River server type declarations from gRPC service declarations", | ||
version: "0.0.5", | ||
version: "0.0.6", | ||
args: { | ||
@@ -316,0 +319,0 @@ paths: (0, cmd_ts_1.multioption)({ |
{ | ||
"name": "@replit/river-codegen", | ||
"description": "codegenning river from grpc", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"bin": { | ||
@@ -6,0 +6,0 @@ "river-codegen": "./dist/codegen.js" |
31003
734