🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@connectrpc/connect

Package Overview
Dependencies
Maintainers
5
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@connectrpc/connect - npm Package Compare versions

Comparing version
2.0.4
to
2.1.0
+1
-1
dist/cjs/protocol-connect/request-header.js

@@ -43,3 +43,3 @@ "use strict";

// See https://github.com/grpc/grpc/blob/c462bb8d485fc1434ecfae438823ca8d14cf3154/doc/PROTOCOL-HTTP2.md#user-agents
result.set(headers_js_1.headerUserAgent, "connect-es/2.0.4");
result.set(headers_js_1.headerUserAgent, "connect-es/2.1.0");
}

@@ -46,0 +46,0 @@ return result;

@@ -35,3 +35,3 @@ "use strict";

// See https://github.com/grpc/grpc/blob/c462bb8d485fc1434ecfae438823ca8d14cf3154/doc/PROTOCOL-HTTP2.md#user-agents
const userAgent = (_b = (_a = result.get(headers_js_1.headerUserAgent)) !== null && _a !== void 0 ? _a : result.get(headers_js_1.headerXUserAgent)) !== null && _b !== void 0 ? _b : "connect-es/2.0.4";
const userAgent = (_b = (_a = result.get(headers_js_1.headerUserAgent)) !== null && _a !== void 0 ? _a : result.get(headers_js_1.headerXUserAgent)) !== null && _b !== void 0 ? _b : "connect-es/2.1.0";
result.set(headers_js_1.headerXUserAgent, userAgent);

@@ -38,0 +38,0 @@ if (setUserAgent) {

@@ -20,3 +20,3 @@ import type { Serialization } from "../protocol/serialization.js";

*/
export declare function trailerSerialize(trailer: Headers): Uint8Array;
export declare function trailerSerialize(trailer: Headers): Uint8Array<ArrayBuffer>;
/**

@@ -23,0 +23,0 @@ * Create a Serialization object that serializes a gRPC-web trailer, a Headers

@@ -32,3 +32,3 @@ "use strict";

// See https://github.com/grpc/grpc/blob/c462bb8d485fc1434ecfae438823ca8d14cf3154/doc/PROTOCOL-HTTP2.md#user-agents
result.set(headers_js_1.headerUserAgent, "connect-es/2.0.4");
result.set(headers_js_1.headerUserAgent, "connect-es/2.1.0");
}

@@ -35,0 +35,0 @@ if (timeoutMs !== undefined) {

@@ -22,3 +22,3 @@ import { ConnectError } from "../connect-error.js";

*/
compress: (bytes: Uint8Array) => Promise<Uint8Array>;
compress: (bytes: Uint8Array) => Promise<Uint8Array<ArrayBuffer>>;
/**

@@ -32,3 +32,3 @@ * Decompress a chunk of data.

*/
decompress: (bytes: Uint8Array, readMaxBytes: number) => Promise<Uint8Array>;
decompress: (bytes: Uint8Array, readMaxBytes: number) => Promise<Uint8Array<ArrayBuffer>>;
}

@@ -35,0 +35,0 @@ /**

@@ -84,3 +84,3 @@ import type { Compression } from "./compression.js";

*/
export declare function encodeEnvelope(flags: number, data: Uint8Array): Uint8Array;
export declare function encodeEnvelope(flags: number, data: Uint8Array): Uint8Array<ArrayBuffer>;
/**

@@ -91,2 +91,2 @@ * Encode a set of enveloped messages.

*/
export declare function encodeEnvelopes(...envelopes: EnvelopedMessage[]): Uint8Array;
export declare function encodeEnvelopes(...envelopes: EnvelopedMessage[]): Uint8Array<ArrayBuffer>;

@@ -12,3 +12,3 @@ import type { MessageShape, BinaryReadOptions, BinaryWriteOptions, DescMessage, JsonReadOptions, JsonWriteOptions, DescMethodStreaming, DescMethodUnary } from "@bufbuild/protobuf";

*/
serialize: (data: T) => Uint8Array;
serialize: (data: T) => Uint8Array<ArrayBuffer>;
/**

@@ -67,3 +67,3 @@ * Parse T. Raises a ConnectError with Code.InvalidArgument if an error occurs.

parse: (data: Uint8Array) => MessageShape<O>;
serialize: (data: MessageShape<I>) => Uint8Array;
serialize: (data: MessageShape<I>) => Uint8Array<ArrayBuffer>;
};

@@ -93,3 +93,3 @@ /**

textEncoder?: {
encode(input?: string): Uint8Array;
encode(input?: string): Uint8Array<ArrayBuffer>;
};

@@ -96,0 +96,0 @@ textDecoder?: {

@@ -39,3 +39,3 @@ // Copyright 2021-2025 The Connect Authors

// See https://github.com/grpc/grpc/blob/c462bb8d485fc1434ecfae438823ca8d14cf3154/doc/PROTOCOL-HTTP2.md#user-agents
result.set(headerUserAgent, "connect-es/2.0.4");
result.set(headerUserAgent, "connect-es/2.1.0");
}

@@ -42,0 +42,0 @@ return result;

@@ -31,3 +31,3 @@ // Copyright 2021-2025 The Connect Authors

// See https://github.com/grpc/grpc/blob/c462bb8d485fc1434ecfae438823ca8d14cf3154/doc/PROTOCOL-HTTP2.md#user-agents
const userAgent = (_b = (_a = result.get(headerUserAgent)) !== null && _a !== void 0 ? _a : result.get(headerXUserAgent)) !== null && _b !== void 0 ? _b : "connect-es/2.0.4";
const userAgent = (_b = (_a = result.get(headerUserAgent)) !== null && _a !== void 0 ? _a : result.get(headerXUserAgent)) !== null && _b !== void 0 ? _b : "connect-es/2.1.0";
result.set(headerXUserAgent, userAgent);

@@ -34,0 +34,0 @@ if (setUserAgent) {

@@ -20,3 +20,3 @@ import type { Serialization } from "../protocol/serialization.js";

*/
export declare function trailerSerialize(trailer: Headers): Uint8Array;
export declare function trailerSerialize(trailer: Headers): Uint8Array<ArrayBuffer>;
/**

@@ -23,0 +23,0 @@ * Create a Serialization object that serializes a gRPC-web trailer, a Headers

@@ -28,3 +28,3 @@ // Copyright 2021-2025 The Connect Authors

// See https://github.com/grpc/grpc/blob/c462bb8d485fc1434ecfae438823ca8d14cf3154/doc/PROTOCOL-HTTP2.md#user-agents
result.set(headerUserAgent, "connect-es/2.0.4");
result.set(headerUserAgent, "connect-es/2.1.0");
}

@@ -31,0 +31,0 @@ if (timeoutMs !== undefined) {

@@ -22,3 +22,3 @@ import { ConnectError } from "../connect-error.js";

*/
compress: (bytes: Uint8Array) => Promise<Uint8Array>;
compress: (bytes: Uint8Array) => Promise<Uint8Array<ArrayBuffer>>;
/**

@@ -32,3 +32,3 @@ * Decompress a chunk of data.

*/
decompress: (bytes: Uint8Array, readMaxBytes: number) => Promise<Uint8Array>;
decompress: (bytes: Uint8Array, readMaxBytes: number) => Promise<Uint8Array<ArrayBuffer>>;
}

@@ -35,0 +35,0 @@ /**

@@ -84,3 +84,3 @@ import type { Compression } from "./compression.js";

*/
export declare function encodeEnvelope(flags: number, data: Uint8Array): Uint8Array;
export declare function encodeEnvelope(flags: number, data: Uint8Array): Uint8Array<ArrayBuffer>;
/**

@@ -91,2 +91,2 @@ * Encode a set of enveloped messages.

*/
export declare function encodeEnvelopes(...envelopes: EnvelopedMessage[]): Uint8Array;
export declare function encodeEnvelopes(...envelopes: EnvelopedMessage[]): Uint8Array<ArrayBuffer>;

@@ -12,3 +12,3 @@ import type { MessageShape, BinaryReadOptions, BinaryWriteOptions, DescMessage, JsonReadOptions, JsonWriteOptions, DescMethodStreaming, DescMethodUnary } from "@bufbuild/protobuf";

*/
serialize: (data: T) => Uint8Array;
serialize: (data: T) => Uint8Array<ArrayBuffer>;
/**

@@ -67,3 +67,3 @@ * Parse T. Raises a ConnectError with Code.InvalidArgument if an error occurs.

parse: (data: Uint8Array) => MessageShape<O>;
serialize: (data: MessageShape<I>) => Uint8Array;
serialize: (data: MessageShape<I>) => Uint8Array<ArrayBuffer>;
};

@@ -93,3 +93,3 @@ /**

textEncoder?: {
encode(input?: string): Uint8Array;
encode(input?: string): Uint8Array<ArrayBuffer>;
};

@@ -96,0 +96,0 @@ textDecoder?: {

{
"name": "@connectrpc/connect",
"version": "2.0.4",
"version": "2.1.0",
"description": "Type-safe APIs with Protobuf and TypeScript.",

@@ -59,7 +59,7 @@ "license": "Apache-2.0",

"peerDependencies": {
"@bufbuild/protobuf": "^2.2.0"
"@bufbuild/protobuf": "^2.7.0"
},
"devDependencies": {
"@bufbuild/buf": "^1.56.0",
"@bufbuild/protoc-gen-es": "^2.6.3",
"@bufbuild/protoc-gen-es": "^2.7.0",
"@types/jasmine": "^5.1.8",

@@ -66,0 +66,0 @@ "jasmine": "^5.9.0"