Skip to content

Commit

Permalink
Chore/bump runtime to 6.3.0 (#282)
Browse files Browse the repository at this point in the history
* chore: bump runtime to 6.3.0

* chore: audit fix

* chore: satisfy linter
  • Loading branch information
jkoenig134 authored Oct 14, 2024
1 parent f05bf71 commit e6d2709
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 105 deletions.
2 changes: 1 addition & 1 deletion .ci/runChecks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ npm run lint:prettier

# auditing
npx license-check --ignoreRegex @nmshd/connector
npx better-npm-audit audit --exclude 1099846,1096302,1093639
npx better-npm-audit audit --exclude 1096302,1093639
176 changes: 89 additions & 87 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,23 @@
"@js-soft/docdb-access-mongo": "1.1.9",
"@js-soft/node-logger": "1.2.0",
"@js-soft/ts-utils": "^2.3.3",
"@nmshd/runtime": "6.2.0",
"@nmshd/runtime": "6.3.0",
"agentkeepalive": "4.5.0",
"amqplib": "^0.10.4",
"axios": "^1.7.7",
"compression": "1.7.4",
"correlation-id": "^5.2.0",
"cors": "2.8.5",
"eventsource": "^2.0.2",
"express": "4.21.0",
"express": "4.21.1",
"helmet": "8.0.0",
"json-stringify-safe": "5.0.1",
"jsonschema": "1.4.1",
"mqtt": "^5.10.1",
"multer": "^1.4.5-lts.1",
"nconf": "0.12.1",
"on-headers": "1.0.2",
"rapidoc": "9.3.7",
"rapidoc": "9.3.8",
"redis": "^4.7.0",
"reflect-metadata": "0.2.2",
"swagger-ui-express": "5.0.1",
Expand All @@ -111,11 +111,11 @@
},
"devDependencies": {
"@apidevtools/swagger-parser": "^10.1.0",
"@js-soft/eslint-config-ts": "1.6.11",
"@js-soft/eslint-config-ts": "1.6.12",
"@js-soft/license-check": "1.0.9",
"@nmshd/connector-sdk": "*",
"@nmshd/content": "6.2.0",
"@nmshd/core-types": "6.2.0",
"@nmshd/content": "6.3.0",
"@nmshd/core-types": "6.3.0",
"@types/amqplib": "^0.10.5",
"@types/compression": "^1.7.5",
"@types/cors": "^2.8.17",
Expand Down Expand Up @@ -144,7 +144,7 @@
"prettier": "^3.3.3",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"typescript": "^5.6.2",
"typescript": "^5.6.3",
"typescript-rest-swagger": "github:nmshd/typescript-rest-swagger#1.4.0"
},
"overrides": {
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"build:schemas:watch": "npx nodemon -e ts -w 'src/types' --exec 'npm run build:schemas'"
},
"dependencies": {
"@nmshd/content": "6.2.0",
"@nmshd/content": "6.3.0",
"axios": "^1.7.7",
"form-data": "^4.0.0",
"form-data": "^4.0.1",
"qs": "^6.13.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/HealthChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class HealthChecker {
await authenticatorClone.getToken();
this.isAuthenticatedUntil = CoreDate.utc().add({ minutes: 5 });
return true;
} catch (e) {
} catch (_) {
return false;
}
}
Expand All @@ -77,7 +77,7 @@ export class HealthChecker {
try {
await this.dbConnection.connect();
return true;
} catch (e) {
} catch (_) {
return false;
} finally {
await this.dbConnection.close();
Expand Down
2 changes: 1 addition & 1 deletion src/infrastructure/httpServer/HttpServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class HttpServer extends ConnectorInfrastructure<HttpServerConfiguration>
private configure(): void {
this.logger.debug("Configuring middleware...");

this.app.use((req, res, next) => {
this.app.use((req, _, next) => {
let correlationId = req.headers["x-correlation-id"];
if (Array.isArray(correlationId)) {
correlationId = correlationId[0];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NextFunction, Request, Response } from "express";
import onHeaders from "on-headers";

export function setDurationHeader(req: Request, res: Response, next: NextFunction): void {
export function setDurationHeader(_: Request, res: Response, next: NextFunction): void {
const startAt = process.hrtime();

onHeaders(res, function onHeaders() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NextFunction, Request, Response } from "express";
import onHeaders from "on-headers";

export function setResponseTimeHeader(req: Request, res: Response, next: NextFunction): void {
export function setResponseTimeHeader(_: Request, res: Response, next: NextFunction): void {
onHeaders(res, function onHeaders() {
res.setHeader("X-Response-Time", new Date().toISOString());
});
Expand Down
4 changes: 2 additions & 2 deletions src/modules/coreHttpApi/CoreHttpApiModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ export default class CoreHttpApiModule extends ConnectorRuntimeModule<CoreHttpAp
private useOpenApi() {
const swaggerDocument = this.loadOpenApiSpec();

this.runtime.infrastructure.httpServer.addEndpoint(HttpMethod.Get, "/docs/json", false, (req, res) => {
this.runtime.infrastructure.httpServer.addEndpoint(HttpMethod.Get, "/docs/json", false, (_, res) => {
res.send(swaggerDocument);
});

this.runtime.infrastructure.httpServer.addEndpoint(HttpMethod.Get, "/docs/yaml", false, (req, res) => {
this.runtime.infrastructure.httpServer.addEndpoint(HttpMethod.Get, "/docs/yaml", false, (_, res) => {
res.set("Content-Type", "text/vnd.yaml");
res.send(yamlJs.stringify(swaggerDocument, 1000));
});
Expand Down
3 changes: 2 additions & 1 deletion test/messages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ describe("Messaging", () => {
});

describe("Message errors", () => {
const fakeAddress = "did:e:a-domain:dids:0000000000000000000000";
const fakeAddress = "did:e:localhost:dids:0000000000000000000000";

test("should throw correct error for empty 'to' in the Message", async () => {
const result = await client1.messages.sendMessage({
recipients: [fakeAddress],
Expand Down

0 comments on commit e6d2709

Please sign in to comment.