Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@connectrpc/connect-express

Package Overview
Dependencies
Maintainers
6
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@connectrpc/connect-express - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

5

dist/cjs/express-connect-middleware.js

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.expressConnectMiddleware = void 0;
exports.expressConnectMiddleware = expressConnectMiddleware;
const connect_1 = require("@connectrpc/connect");

@@ -42,3 +42,3 @@ const connect_node_1 = require("@connectrpc/connect-node");

}
const uReq = (0, connect_node_1.universalRequestFromNodeRequest)(req, getPreparsedBody(req), (_a = options.contextValues) === null || _a === void 0 ? void 0 : _a.call(options, req));
const uReq = (0, connect_node_1.universalRequestFromNodeRequest)(req, res, getPreparsedBody(req), (_a = options.contextValues) === null || _a === void 0 ? void 0 : _a.call(options, req));
uHandler(uReq)

@@ -55,3 +55,2 @@ .then((uRes) => (0, connect_node_1.universalResponseToNodeResponse)(uRes, res))

}
exports.expressConnectMiddleware = expressConnectMiddleware;
/**

@@ -58,0 +57,0 @@ * Get a pre-parsed JSON value from the request object, or undefined if

2

dist/esm/express-connect-middleware.js

@@ -38,3 +38,3 @@ // Copyright 2021-2024 The Connect Authors

}
const uReq = universalRequestFromNodeRequest(req, getPreparsedBody(req), (_a = options.contextValues) === null || _a === void 0 ? void 0 : _a.call(options, req));
const uReq = universalRequestFromNodeRequest(req, res, getPreparsedBody(req), (_a = options.contextValues) === null || _a === void 0 ? void 0 : _a.call(options, req));
uHandler(uReq)

@@ -41,0 +41,0 @@ .then((uRes) => universalResponseToNodeResponse(uRes, res))

{
"name": "@connectrpc/connect-express",
"version": "1.4.0",
"version": "1.5.0",
"license": "Apache-2.0",

@@ -11,6 +11,11 @@ "repository": {

"scripts": {
"clean": "rm -rf ./dist/*",
"prebuild": "rm -rf ./dist/*",
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc --project tsconfig.json --module commonjs --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
"build:esm": "tsc --project tsconfig.json --module ES2015 --verbatimModuleSyntax --outDir ./dist/esm --declaration --declarationDir ./dist/esm",
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
"build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationDir ./dist/esm",
"test": "jasmine --config=jasmine.json",
"conformance": "tsc --noEmit && connectconformance --mode server --conf ./conformance/conformance-express.yaml -v -- tsx ./conformance/server.ts",
"format": "prettier --write --ignore-unknown '.' '!dist'",
"license-header": "license-header",
"lint": "eslint --max-warnings 0 .",
"attw": "attw --pack"

@@ -30,13 +35,15 @@ },

},
"dependencies": {
"@types/express": "^4.17.18"
"devDependencies": {
"@connectrpc/connect-conformance": "^1.5.0",
"@connectrpc/connect": "1.5.0",
"@connectrpc/connect-node": "1.5.0",
"@types/express": "^4.17.18",
"express": "^4.19.2",
"tsx": "^4.19.0"
},
"peerDependencies": {
"@bufbuild/protobuf": "^1.4.2",
"@connectrpc/connect": "1.4.0",
"@connectrpc/connect-node": "1.4.0"
},
"files": [
"dist/**"
]
"@bufbuild/protobuf": "^1.10.0",
"@connectrpc/connect": "1.5.0",
"@connectrpc/connect-node": "1.5.0"
}
}

@@ -18,3 +18,3 @@ # @connectrpc/connect-express

export default function(router: ConnectRouter) {
export default function (router: ConnectRouter) {
// implement rpc Say(SayRequest) returns (SayResponse)

@@ -68,3 +68,3 @@ router.rpc(ElizaService, ElizaService.methods.say, async (req) => ({

const { sentence } = await client.say({ sentence: "I feel happy." });
console.log(sentence) // you said: I feel happy.
console.log(sentence); // you said: I feel happy.
```

@@ -79,3 +79,2 @@

## Getting started

@@ -82,0 +81,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc