Skip to content

Commit b9705b0

Browse files
committed
Merge branch 'main' into cache-forceProtectionOff
2 parents 6427598 + e4986e3 commit b9705b0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+5131
-1593
lines changed

.github/workflows/benchmark.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Benchmark
1+
name: 📊 Benchmark
22
on:
33
push: {}
44
workflow_call: {}
@@ -49,8 +49,6 @@ jobs:
4949
- name: Run shell injection Benchmark
5050
run: cd benchmarks/shell-injection && node benchmark.js
5151
- name: Run Hono with Postgres Benchmark
52-
# Skip on Node 24.x due to a bug: https://github.com/honojs/node-server/issues/240
53-
if: matrix.node-version != '24.x'
5452
run: cd benchmarks/hono-pg && node benchmark.js
5553
- name: Run API Discovery Benchmark
5654
run: cd benchmarks/api-discovery && node benchmark.js

.github/workflows/build-and-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and release
1+
name: 🚀 Build and release
22
on:
33
release:
44
types: [created]

.github/workflows/end-to-end-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: End to end tests
1+
name: 🕵️ End to end tests
22
on:
33
push: {}
44
workflow_call: {}
@@ -45,7 +45,7 @@ jobs:
4545
"CLICKHOUSE_DEFAULT_ACCESS": "MANAGEMENT=1"
4646
ports:
4747
- "27019:8123"
48-
timeout-minutes: 10
48+
timeout-minutes: 15
4949
strategy:
5050
matrix:
5151
node-version: [18.x]

.github/workflows/lint-code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint code
1+
name: 🧹 Lint code
22
on: push
33
jobs:
44
lint:

.github/workflows/unit-test.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Unit tests
1+
name: 🧪 Unit tests
22
on:
33
push: {}
44
workflow_call: {}
@@ -52,7 +52,7 @@ jobs:
5252
ports:
5353
- "27019:8123"
5454
mongodb-replica:
55-
image: bitnami/mongodb:8.0
55+
image: bitnami/mongodb:4.4
5656
env:
5757
MONGODB_ADVERTISED_HOSTNAME: 127.0.0.1
5858
MONGODB_REPLICA_SET_MODE: primary
@@ -77,6 +77,14 @@ jobs:
7777
- name: Add local.aikido.io to /etc/hosts
7878
run: |
7979
sudo echo "127.0.0.1 local.aikido.io" | sudo tee -a /etc/hosts
80+
- name: "Install Google Cloud SDK"
81+
uses: google-github-actions/setup-gcloud@6189d56e4096ee891640bb02ac264be376592d6a # v2
82+
with:
83+
install_components: "beta,pubsub-emulator"
84+
version: "524.0.0"
85+
- name: "Start Pub/Sub emulator"
86+
run: |
87+
gcloud beta emulators pubsub start --project=sample-project --host-port='0.0.0.0:8085' &
8088
- run: npm run install-lib-only
8189
- run: npm run build
8290
- run: npm run test:ci

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@ credentials.json
3030
# Test files
3131
library/test.txt
3232
library/test2.txt
33+
34+
# Rust build files
35+
instrumentation-wasm/target/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ Zen for Node.js 16+ is compatible with:
6565

6666
### Cloud providers
6767

68-
*[`@google-cloud/functions-framework`](https://www.npmjs.com/package/@google-cloud/functions-framework) 3.x
69-
*[`@google-cloud/pubsub`](https://www.npmjs.com/package/@google-cloud/pubsub) 4.x
68+
*[`@google-cloud/functions-framework`](https://www.npmjs.com/package/@google-cloud/functions-framework) 4.x, 3.x
69+
*[`@google-cloud/pubsub`](https://www.npmjs.com/package/@google-cloud/pubsub) 5.x, 4.x
7070
* ✅ Google Cloud Functions
7171
* ✅ AWS Lambda
7272

benchmarks/hono-pg/package-lock.json

Lines changed: 27 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

end2end/server/app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const checkToken = require("./src/middleware/checkToken");
88
const updateConfig = require("./src/handlers/updateConfig");
99
const lists = require("./src/handlers/lists");
1010
const updateLists = require("./src/handlers/updateLists");
11+
const realtimeConfig = require("./src/handlers/realtimeConfig");
1112

1213
const app = express();
1314

@@ -18,6 +19,9 @@ app.use(express.json());
1819
app.get("/api/runtime/config", checkToken, config);
1920
app.post("/api/runtime/config", checkToken, updateConfig);
2021

22+
// Realtime polling endpoint
23+
app.get("/config", checkToken, realtimeConfig);
24+
2125
app.get("/api/runtime/events", checkToken, listEvents);
2226
app.post("/api/runtime/events", checkToken, captureEvent);
2327

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const { getAppConfig } = require("../zen/config");
2+
3+
module.exports = function realtimeConfig(req, res) {
4+
if (!req.app) {
5+
throw new Error("App is missing");
6+
}
7+
8+
const config = getAppConfig(req.app);
9+
10+
res.json({
11+
serviceId: req.app.serviceId,
12+
configUpdatedAt: config.configUpdatedAt,
13+
});
14+
};

0 commit comments

Comments
 (0)