New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

starpc

Package Overview
Dependencies
Maintainers
0
Versions
188
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

starpc - npm Package Compare versions

Comparing version

to
0.35.3

8

dist/echo/echo_srpc.pb.d.ts

@@ -1,5 +0,5 @@

import { EchoMsg } from './echo.pb.js';
import { Empty, MethodKind } from '@aptre/protobuf-es-lite';
import { RpcStreamPacket } from '../rpcstream/rpcstream.pb.js';
import { MessageStream, ProtoRpc } from 'starpc';
import { EchoMsg } from "./echo.pb.js";
import { Empty, MethodKind } from "@aptre/protobuf-es-lite";
import { RpcStreamPacket } from "../rpcstream/rpcstream.pb.js";
import { MessageStream, ProtoRpc } from "starpc";
/**

@@ -6,0 +6,0 @@ * Echoer service returns the given message.

// @generated by protoc-gen-es-starpc none with parameter "target=ts,ts_nocheck=false"
// @generated from file github.com/aperturerobotics/starpc/echo/echo.proto (package echo, syntax proto3)
/* eslint-disable */
import { EchoMsg } from './echo.pb.js';
import { Empty, MethodKind } from '@aptre/protobuf-es-lite';
import { RpcStreamPacket } from '../rpcstream/rpcstream.pb.js';
import { buildDecodeMessageTransform, buildEncodeMessageTransform, } from 'starpc';
import { EchoMsg } from "./echo.pb.js";
import { Empty, MethodKind } from "@aptre/protobuf-es-lite";
import { RpcStreamPacket } from "../rpcstream/rpcstream.pb.js";
import { buildDecodeMessageTransform, buildEncodeMessageTransform } from "starpc";
/**

@@ -14,3 +14,3 @@ * Echoer service returns the given message.

export const EchoerDefinition = {
typeName: 'echo.Echoer',
typeName: "echo.Echoer",
methods: {

@@ -23,3 +23,3 @@ /**

Echo: {
name: 'Echo',
name: "Echo",
I: EchoMsg,

@@ -35,3 +35,3 @@ O: EchoMsg,

EchoServerStream: {
name: 'EchoServerStream',
name: "EchoServerStream",
I: EchoMsg,

@@ -47,3 +47,3 @@ O: EchoMsg,

EchoClientStream: {
name: 'EchoClientStream',
name: "EchoClientStream",
I: EchoMsg,

@@ -59,3 +59,3 @@ O: EchoMsg,

EchoBidiStream: {
name: 'EchoBidiStream',
name: "EchoBidiStream",
I: EchoMsg,

@@ -71,3 +71,3 @@ O: EchoMsg,

RpcStream: {
name: 'RpcStream',
name: "RpcStream",
I: RpcStreamPacket,

@@ -83,3 +83,3 @@ O: RpcStreamPacket,

DoNothing: {
name: 'DoNothing',
name: "DoNothing",
I: Empty,

@@ -89,3 +89,3 @@ O: Empty,

},
},
}
};

@@ -92,0 +92,0 @@ export const EchoerServiceName = EchoerDefinition.typeName;

@@ -1,2 +0,2 @@

import type { MessageType } from '@aptre/protobuf-es-lite';
import type { MessageType } from "@aptre/protobuf-es-lite";
export declare const protobufPackage = "echo";

@@ -3,0 +3,0 @@ /**

// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
// @generated from file github.com/aperturerobotics/starpc/echo/echo.proto (package echo, syntax proto3)
/* eslint-disable */
import { createMessageType, ScalarType } from '@aptre/protobuf-es-lite';
export const protobufPackage = 'echo';
import { createMessageType, ScalarType } from "@aptre/protobuf-es-lite";
export const protobufPackage = "echo";
;
// EchoMsg contains the message type declaration for EchoMsg.
export const EchoMsg = createMessageType({
typeName: 'echo.EchoMsg',
typeName: "echo.EchoMsg",
fields: [
{ no: 1, name: 'body', kind: 'scalar', T: ScalarType.STRING },
{ no: 1, name: "body", kind: "scalar", T: ScalarType.STRING },
],
packedByDefault: true,
});

@@ -1,2 +0,2 @@

import type { MessageType } from '@aptre/protobuf-es-lite';
import type { MessageType } from "@aptre/protobuf-es-lite";
export declare const protobufPackage = "rpcstream";

@@ -51,3 +51,3 @@ /**

value: RpcStreamInit;
case: 'init';
case: "init";
} | {

@@ -61,3 +61,3 @@ /**

value: RpcAck;
case: 'ack';
case: "ack";
} | {

@@ -70,5 +70,5 @@ /**

value: Uint8Array;
case: 'data';
case: "data";
};
}
export declare const RpcStreamPacket: MessageType<RpcStreamPacket>;
// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
// @generated from file github.com/aperturerobotics/starpc/rpcstream/rpcstream.proto (package rpcstream, syntax proto3)
/* eslint-disable */
import { createMessageType, ScalarType } from '@aptre/protobuf-es-lite';
export const protobufPackage = 'rpcstream';
import { createMessageType, ScalarType } from "@aptre/protobuf-es-lite";
export const protobufPackage = "rpcstream";
;
// RpcStreamInit contains the message type declaration for RpcStreamInit.
export const RpcStreamInit = createMessageType({
typeName: 'rpcstream.RpcStreamInit',
typeName: "rpcstream.RpcStreamInit",
fields: [
{ no: 1, name: 'component_id', kind: 'scalar', T: ScalarType.STRING },
{ no: 1, name: "component_id", kind: "scalar", T: ScalarType.STRING },
],
packedByDefault: true,
});
;
// RpcAck contains the message type declaration for RpcAck.
export const RpcAck = createMessageType({
typeName: 'rpcstream.RpcAck',
typeName: "rpcstream.RpcAck",
fields: [
{ no: 1, name: 'error', kind: 'scalar', T: ScalarType.STRING },
{ no: 1, name: "error", kind: "scalar", T: ScalarType.STRING },
],
packedByDefault: true,
});
;
// RpcStreamPacket contains the message type declaration for RpcStreamPacket.
export const RpcStreamPacket = createMessageType({
typeName: 'rpcstream.RpcStreamPacket',
typeName: "rpcstream.RpcStreamPacket",
fields: [
{
no: 1,
name: 'init',
kind: 'message',
T: () => RpcStreamInit,
oneof: 'body',
},
{ no: 2, name: 'ack', kind: 'message', T: () => RpcAck, oneof: 'body' },
{ no: 3, name: 'data', kind: 'scalar', T: ScalarType.BYTES, oneof: 'body' },
{ no: 1, name: "init", kind: "message", T: () => RpcStreamInit, oneof: "body" },
{ no: 2, name: "ack", kind: "message", T: () => RpcAck, oneof: "body" },
{ no: 3, name: "data", kind: "scalar", T: ScalarType.BYTES, oneof: "body" },
],
packedByDefault: true,
});

@@ -1,2 +0,2 @@

import type { MessageType } from '@aptre/protobuf-es-lite';
import type { MessageType } from "@aptre/protobuf-es-lite";
export declare const protobufPackage = "srpc";

@@ -92,3 +92,3 @@ /**

value: CallStart;
case: 'callStart';
case: "callStart";
} | {

@@ -101,3 +101,3 @@ /**

value: CallData;
case: 'callData';
case: "callData";
} | {

@@ -110,5 +110,5 @@ /**

value: boolean;
case: 'callCancel';
case: "callCancel";
};
}
export declare const Packet: MessageType<Packet>;
// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
// @generated from file github.com/aperturerobotics/starpc/srpc/rpcproto.proto (package srpc, syntax proto3)
/* eslint-disable */
import { createMessageType, ScalarType } from '@aptre/protobuf-es-lite';
export const protobufPackage = 'srpc';
import { createMessageType, ScalarType } from "@aptre/protobuf-es-lite";
export const protobufPackage = "srpc";
;
// CallStart contains the message type declaration for CallStart.
export const CallStart = createMessageType({
typeName: 'srpc.CallStart',
typeName: "srpc.CallStart",
fields: [
{ no: 1, name: 'rpc_service', kind: 'scalar', T: ScalarType.STRING },
{ no: 2, name: 'rpc_method', kind: 'scalar', T: ScalarType.STRING },
{ no: 3, name: 'data', kind: 'scalar', T: ScalarType.BYTES },
{ no: 4, name: 'data_is_zero', kind: 'scalar', T: ScalarType.BOOL },
{ no: 1, name: "rpc_service", kind: "scalar", T: ScalarType.STRING },
{ no: 2, name: "rpc_method", kind: "scalar", T: ScalarType.STRING },
{ no: 3, name: "data", kind: "scalar", T: ScalarType.BYTES },
{ no: 4, name: "data_is_zero", kind: "scalar", T: ScalarType.BOOL },
],
packedByDefault: true,
});
;
// CallData contains the message type declaration for CallData.
export const CallData = createMessageType({
typeName: 'srpc.CallData',
typeName: "srpc.CallData",
fields: [
{ no: 1, name: 'data', kind: 'scalar', T: ScalarType.BYTES },
{ no: 2, name: 'data_is_zero', kind: 'scalar', T: ScalarType.BOOL },
{ no: 3, name: 'complete', kind: 'scalar', T: ScalarType.BOOL },
{ no: 4, name: 'error', kind: 'scalar', T: ScalarType.STRING },
{ no: 1, name: "data", kind: "scalar", T: ScalarType.BYTES },
{ no: 2, name: "data_is_zero", kind: "scalar", T: ScalarType.BOOL },
{ no: 3, name: "complete", kind: "scalar", T: ScalarType.BOOL },
{ no: 4, name: "error", kind: "scalar", T: ScalarType.STRING },
],
packedByDefault: true,
});
;
// Packet contains the message type declaration for Packet.
export const Packet = createMessageType({
typeName: 'srpc.Packet',
typeName: "srpc.Packet",
fields: [
{
no: 1,
name: 'call_start',
kind: 'message',
T: () => CallStart,
oneof: 'body',
},
{
no: 2,
name: 'call_data',
kind: 'message',
T: () => CallData,
oneof: 'body',
},
{
no: 3,
name: 'call_cancel',
kind: 'scalar',
T: ScalarType.BOOL,
oneof: 'body',
},
{ no: 1, name: "call_start", kind: "message", T: () => CallStart, oneof: "body" },
{ no: 2, name: "call_data", kind: "message", T: () => CallData, oneof: "body" },
{ no: 3, name: "call_cancel", kind: "scalar", T: ScalarType.BOOL, oneof: "body" },
],
packedByDefault: true,
});

@@ -5,11 +5,6 @@ // @generated by protoc-gen-es-starpc none with parameter "target=ts,ts_nocheck=false"

import { EchoMsg } from './echo.pb.js'
import { Empty, MethodKind } from '@aptre/protobuf-es-lite'
import { RpcStreamPacket } from '../rpcstream/rpcstream.pb.js'
import {
buildDecodeMessageTransform,
buildEncodeMessageTransform,
MessageStream,
ProtoRpc,
} from 'starpc'
import { EchoMsg } from "./echo.pb.js";
import { Empty, MethodKind } from "@aptre/protobuf-es-lite";
import { RpcStreamPacket } from "../rpcstream/rpcstream.pb.js";
import { buildDecodeMessageTransform, buildEncodeMessageTransform, MessageStream, ProtoRpc } from "starpc";

@@ -22,3 +17,3 @@ /**

export const EchoerDefinition = {
typeName: 'echo.Echoer',
typeName: "echo.Echoer",
methods: {

@@ -31,3 +26,3 @@ /**

Echo: {
name: 'Echo',
name: "Echo",
I: EchoMsg,

@@ -43,3 +38,3 @@ O: EchoMsg,

EchoServerStream: {
name: 'EchoServerStream',
name: "EchoServerStream",
I: EchoMsg,

@@ -55,3 +50,3 @@ O: EchoMsg,

EchoClientStream: {
name: 'EchoClientStream',
name: "EchoClientStream",
I: EchoMsg,

@@ -67,3 +62,3 @@ O: EchoMsg,

EchoBidiStream: {
name: 'EchoBidiStream',
name: "EchoBidiStream",
I: EchoMsg,

@@ -79,3 +74,3 @@ O: EchoMsg,

RpcStream: {
name: 'RpcStream',
name: "RpcStream",
I: RpcStreamPacket,

@@ -91,3 +86,3 @@ O: RpcStreamPacket,

DoNothing: {
name: 'DoNothing',
name: "DoNothing",
I: Empty,

@@ -97,4 +92,4 @@ O: Empty,

},
},
} as const
}
} as const;

@@ -112,3 +107,6 @@ /**

*/
Echo(request: EchoMsg, abortSignal?: AbortSignal): Promise<EchoMsg>
Echo(
request: EchoMsg, abortSignal?: AbortSignal
):
Promise<EchoMsg>

@@ -121,5 +119,5 @@ /**

EchoServerStream(
request: EchoMsg,
abortSignal?: AbortSignal,
): MessageStream<EchoMsg>
request: EchoMsg, abortSignal?: AbortSignal
):
MessageStream<EchoMsg>

@@ -132,5 +130,5 @@ /**

EchoClientStream(
request: MessageStream<EchoMsg>,
abortSignal?: AbortSignal,
): Promise<EchoMsg>
request: MessageStream<EchoMsg>, abortSignal?: AbortSignal
):
Promise<EchoMsg>

@@ -143,5 +141,5 @@ /**

EchoBidiStream(
request: MessageStream<EchoMsg>,
abortSignal?: AbortSignal,
): MessageStream<EchoMsg>
request: MessageStream<EchoMsg>, abortSignal?: AbortSignal
):
MessageStream<EchoMsg>

@@ -154,5 +152,5 @@ /**

RpcStream(
request: MessageStream<RpcStreamPacket>,
abortSignal?: AbortSignal,
): MessageStream<RpcStreamPacket>
request: MessageStream<RpcStreamPacket>, abortSignal?: AbortSignal
):
MessageStream<RpcStreamPacket>

@@ -164,3 +162,7 @@ /**

*/
DoNothing(request: Empty, abortSignal?: AbortSignal): Promise<Empty>
DoNothing(
request: Empty, abortSignal?: AbortSignal
):
Promise<Empty>
}

@@ -188,3 +190,6 @@

*/
async Echo(request: EchoMsg, abortSignal?: AbortSignal): Promise<EchoMsg> {
async Echo(
request: EchoMsg, abortSignal?: AbortSignal
):
Promise<EchoMsg> {
const requestMsg = EchoMsg.create(request)

@@ -206,5 +211,5 @@ const result = await this.rpc.request(

EchoServerStream(
request: EchoMsg,
abortSignal?: AbortSignal,
): MessageStream<EchoMsg> {
request: EchoMsg, abortSignal?: AbortSignal
):
MessageStream<EchoMsg> {
const requestMsg = EchoMsg.create(request)

@@ -226,5 +231,5 @@ const result = this.rpc.serverStreamingRequest(

async EchoClientStream(
request: MessageStream<EchoMsg>,
abortSignal?: AbortSignal,
): Promise<EchoMsg> {
request: MessageStream<EchoMsg>, abortSignal?: AbortSignal
):
Promise<EchoMsg> {
const result = await this.rpc.clientStreamingRequest(

@@ -245,5 +250,5 @@ this.service,

EchoBidiStream(
request: MessageStream<EchoMsg>,
abortSignal?: AbortSignal,
): MessageStream<EchoMsg> {
request: MessageStream<EchoMsg>, abortSignal?: AbortSignal
):
MessageStream<EchoMsg> {
const result = this.rpc.bidirectionalStreamingRequest(

@@ -264,5 +269,5 @@ this.service,

RpcStream(
request: MessageStream<RpcStreamPacket>,
abortSignal?: AbortSignal,
): MessageStream<RpcStreamPacket> {
request: MessageStream<RpcStreamPacket>, abortSignal?: AbortSignal
):
MessageStream<RpcStreamPacket> {
const result = this.rpc.bidirectionalStreamingRequest(

@@ -282,3 +287,6 @@ this.service,

*/
async DoNothing(request: Empty, abortSignal?: AbortSignal): Promise<Empty> {
async DoNothing(
request: Empty, abortSignal?: AbortSignal
):
Promise<Empty> {
const requestMsg = Empty.create(request)

@@ -293,2 +301,3 @@ const result = await this.rpc.request(

}
}

@@ -5,6 +5,6 @@ // @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"

import type { MessageType, PartialFieldInfo } from '@aptre/protobuf-es-lite'
import { createMessageType, ScalarType } from '@aptre/protobuf-es-lite'
import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite";
import { createMessageType, ScalarType } from "@aptre/protobuf-es-lite";
export const protobufPackage = 'echo'
export const protobufPackage = "echo";

@@ -20,12 +20,14 @@ /**

*/
body?: string
}
body?: string;
};
// EchoMsg contains the message type declaration for EchoMsg.
export const EchoMsg: MessageType<EchoMsg> = createMessageType({
typeName: 'echo.EchoMsg',
fields: [
{ no: 1, name: 'body', kind: 'scalar', T: ScalarType.STRING },
] as readonly PartialFieldInfo[],
packedByDefault: true,
})
typeName: "echo.EchoMsg",
fields: [
{ no: 1, name: "body", kind: "scalar", T: ScalarType.STRING },
] as readonly PartialFieldInfo[],
packedByDefault: true,
});
{
"name": "starpc",
"version": "0.35.2",
"version": "0.35.3",
"description": "Streaming protobuf RPC service protocol over any two-way channel.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -5,6 +5,6 @@ // @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"

import type { MessageType, PartialFieldInfo } from '@aptre/protobuf-es-lite'
import { createMessageType, ScalarType } from '@aptre/protobuf-es-lite'
import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite";
import { createMessageType, ScalarType } from "@aptre/protobuf-es-lite";
export const protobufPackage = 'srpc'
export const protobufPackage = "srpc";

@@ -23,3 +23,3 @@ /**

*/
rpcService?: string
rpcService?: string;
/**

@@ -31,3 +31,3 @@ * RpcMethod is the RPC method to call.

*/
rpcMethod?: string
rpcMethod?: string;
/**

@@ -39,3 +39,3 @@ * Data contains the request or the first message in the stream.

*/
data?: Uint8Array
data?: Uint8Array;
/**

@@ -46,16 +46,17 @@ * DataIsZero indicates Data is set with an empty message.

*/
dataIsZero?: boolean
}
dataIsZero?: boolean;
};
// CallStart contains the message type declaration for CallStart.
export const CallStart: MessageType<CallStart> = createMessageType({
typeName: 'srpc.CallStart',
fields: [
{ no: 1, name: 'rpc_service', kind: 'scalar', T: ScalarType.STRING },
{ no: 2, name: 'rpc_method', kind: 'scalar', T: ScalarType.STRING },
{ no: 3, name: 'data', kind: 'scalar', T: ScalarType.BYTES },
{ no: 4, name: 'data_is_zero', kind: 'scalar', T: ScalarType.BOOL },
] as readonly PartialFieldInfo[],
packedByDefault: true,
})
typeName: "srpc.CallStart",
fields: [
{ no: 1, name: "rpc_service", kind: "scalar", T: ScalarType.STRING },
{ no: 2, name: "rpc_method", kind: "scalar", T: ScalarType.STRING },
{ no: 3, name: "data", kind: "scalar", T: ScalarType.BYTES },
{ no: 4, name: "data_is_zero", kind: "scalar", T: ScalarType.BOOL },
] as readonly PartialFieldInfo[],
packedByDefault: true,
});

@@ -73,3 +74,3 @@ /**

*/
data?: Uint8Array
data?: Uint8Array;
/**

@@ -80,3 +81,3 @@ * DataIsZero indicates Data is set with an empty message.

*/
dataIsZero?: boolean
dataIsZero?: boolean;
/**

@@ -87,3 +88,3 @@ * Complete indicates the RPC call is completed.

*/
complete?: boolean
complete?: boolean;
/**

@@ -95,16 +96,17 @@ * Error contains any error that caused the RPC to fail.

*/
error?: string
}
error?: string;
};
// CallData contains the message type declaration for CallData.
export const CallData: MessageType<CallData> = createMessageType({
typeName: 'srpc.CallData',
fields: [
{ no: 1, name: 'data', kind: 'scalar', T: ScalarType.BYTES },
{ no: 2, name: 'data_is_zero', kind: 'scalar', T: ScalarType.BOOL },
{ no: 3, name: 'complete', kind: 'scalar', T: ScalarType.BOOL },
{ no: 4, name: 'error', kind: 'scalar', T: ScalarType.STRING },
] as readonly PartialFieldInfo[],
packedByDefault: true,
})
typeName: "srpc.CallData",
fields: [
{ no: 1, name: "data", kind: "scalar", T: ScalarType.BYTES },
{ no: 2, name: "data_is_zero", kind: "scalar", T: ScalarType.BOOL },
{ no: 3, name: "complete", kind: "scalar", T: ScalarType.BOOL },
{ no: 4, name: "error", kind: "scalar", T: ScalarType.STRING },
] as readonly PartialFieldInfo[],
packedByDefault: true,
});

@@ -117,2 +119,3 @@ /**

export interface Packet {
/**

@@ -123,63 +126,43 @@ * Body is the packet body.

*/
body?:
| {
value?: undefined
case: undefined
}
| {
/**
* CallStart initiates a new call.
*
* @generated from field: srpc.CallStart call_start = 1;
*/
value: CallStart
case: 'callStart'
}
| {
/**
* CallData is a message in a streaming RPC sequence.
*
* @generated from field: srpc.CallData call_data = 2;
*/
value: CallData
case: 'callData'
}
| {
/**
* CallCancel cancels the call.
*
* @generated from field: bool call_cancel = 3;
*/
value: boolean
case: 'callCancel'
}
}
body?: {
value?: undefined,
case: undefined
} | {
/**
* CallStart initiates a new call.
*
* @generated from field: srpc.CallStart call_start = 1;
*/
value: CallStart;
case: "callStart";
} | {
/**
* CallData is a message in a streaming RPC sequence.
*
* @generated from field: srpc.CallData call_data = 2;
*/
value: CallData;
case: "callData";
} | {
/**
* CallCancel cancels the call.
*
* @generated from field: bool call_cancel = 3;
*/
value: boolean;
case: "callCancel";
};
};
// Packet contains the message type declaration for Packet.
export const Packet: MessageType<Packet> = createMessageType({
typeName: 'srpc.Packet',
fields: [
{
no: 1,
name: 'call_start',
kind: 'message',
T: () => CallStart,
oneof: 'body',
},
{
no: 2,
name: 'call_data',
kind: 'message',
T: () => CallData,
oneof: 'body',
},
{
no: 3,
name: 'call_cancel',
kind: 'scalar',
T: ScalarType.BOOL,
oneof: 'body',
},
] as readonly PartialFieldInfo[],
packedByDefault: true,
})
typeName: "srpc.Packet",
fields: [
{ no: 1, name: "call_start", kind: "message", T: () => CallStart, oneof: "body" },
{ no: 2, name: "call_data", kind: "message", T: () => CallData, oneof: "body" },
{ no: 3, name: "call_cancel", kind: "scalar", T: ScalarType.BOOL, oneof: "body" },
] as readonly PartialFieldInfo[],
packedByDefault: true,
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet