From df02a4d511743407c1d67ca78eca32d1442124b5 Mon Sep 17 00:00:00 2001 From: Christian Clausen Date: Wed, 4 Dec 2024 12:29:25 +0100 Subject: [PATCH] Publish --- CHANGELOG.md | 5 +++++ Execute.js | 4 ++-- Execute.ts | 4 ++-- package.json | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5a91bd..0648d86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ ## Fixes and improvements - +# 4.4.4 +## Fixes and improvements +- Simulator serves bytes correctly +- Simulator doesn't warn of dead ends for $-messages + # 4.4.3 ## Fixes and improvements - Simulator doesn't crash on logging empty lines diff --git a/Execute.js b/Execute.js index 700ddfa..b5f839b 100644 --- a/Execute.js +++ b/Execute.js @@ -294,7 +294,7 @@ ${NORMAL_COLOR}`); const rs = this.pendingReplies[traceId]; if (rs !== undefined) { delete this.pendingReplies[traceId]; - reply(rs.resp, body.content, body["content-type"], body["status-code"] || 200, body.headers || {}); + reply(rs.resp, Buffer.from(body.content), body["content-type"], body["status-code"] || 200, body.headers || {}); } } processEvent(evnt, payload, envelope) { @@ -326,7 +326,7 @@ ${NORMAL_COLOR}`); } const riverConfigs = processFolders(this.pathToRoot, event); const rivers = Object.keys(riverConfigs); - if (rivers.length === 0) { + if (rivers.length === 0 && event[0] !== "$") { timedOutput(`${YELLOW}Warning: No hooks for '${event}'${NORMAL_COLOR}`, `${GRAY}${traceId}: `); } rivers.forEach((r) => { diff --git a/Execute.ts b/Execute.ts index 57331b6..6eb0d42 100644 --- a/Execute.ts +++ b/Execute.ts @@ -381,7 +381,7 @@ ${NORMAL_COLOR}`); delete this.pendingReplies[traceId]; reply( rs.resp, - body.content, + Buffer.from(body.content), body["content-type"], body["status-code"] || 200, body.headers || {} @@ -418,7 +418,7 @@ ${NORMAL_COLOR}`); } const riverConfigs = processFolders(this.pathToRoot, event); const rivers = Object.keys(riverConfigs); - if (rivers.length === 0) { + if (rivers.length === 0 && event[0] !== "$") { timedOutput( `${YELLOW}Warning: No hooks for '${event}'${NORMAL_COLOR}`, `${GRAY}${traceId}: ` diff --git a/package.json b/package.json index 42541a1..3500fa5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@merrymake/cli", - "version": "4.4.3", + "version": "4.4.4", "description": "", "main": "index.js", "type": "module",