Skip to content

Commit 1a33c03

Browse files
committed
fix: runtime version
1 parent d74b068 commit 1a33c03

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22

33
# Safe watcher
44

5-
This repository contains simple app that watches safe multisig and notifies about new transactions.
5+
This repository contains simple app that watches safe multisig and notifies about various events:
6+
7+
- New transaction has been proposed (with some checks about suspicious transactions)
8+
- Transaction has been signed by one of the signers
9+
- Transaction has been executed
610

711
## Usage
812

9-
Create config.yaml file with settings. See [config.example.yaml](config.example.yaml) and [schema.yaml](src/config/schema.ts) for reference.
13+
Create config.yaml file with settings. See [config.example.yaml](config.example.yaml) and [schema.ts](src/config/schema.ts) for the reference.
1014

1115
Run docker container with config.yaml file mounted to /app/config.yaml
1216

1317
```bash
14-
docker run -v $(pwd)/config.yaml:/app/config.yaml ghcr.io/gearbox-protocol/safe-watcher:latest
18+
docker run -v $(pwd)/config.local.yaml:/app/config.yaml ghcr.io/gearbox-protocol/safe-watcher:latest
1519
```

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"@commitlint/config-conventional": "^19.0.3",
3535
"@gearbox-protocol/eslint-config": "^2.0.0-next.2",
3636
"@gearbox-protocol/prettier-config": "^2.0.0-next.0",
37+
"@types/node": "^22.13.5",
3738
"esbuild": "^0.24.0",
3839
"eslint": "^8.57.0",
3940
"husky": "^9.0.11",

src/Healthcheck.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import { readFile } from "node:fs/promises";
21
import { createServer } from "node:http";
3-
import { resolve } from "node:path";
42

53
import { formatDuration, intervalToDuration } from "date-fns";
64
import { customAlphabet } from "nanoid";
@@ -15,11 +13,7 @@ class Healthcheck {
1513
#start = Math.round(new Date().valueOf() / 1000);
1614

1715
public async run(): Promise<void> {
18-
const { version } = await readFile(
19-
resolve(import.meta.dirname, "../package.json"),
20-
"utf-8",
21-
).then(JSON.parse);
22-
this.#version = version;
16+
this.#version = process.env.PACKAGE_VERSION || "dev";
2317
const server = createServer(async (req, res) => {
2418
// Routing
2519
if (req.url === "/") {

yarn.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,7 @@ __metadata:
838838
"@commitlint/config-conventional": "npm:^19.0.3"
839839
"@gearbox-protocol/eslint-config": "npm:^2.0.0-next.2"
840840
"@gearbox-protocol/prettier-config": "npm:^2.0.0-next.0"
841+
"@types/node": "npm:^22.13.5"
841842
"@vlad-yakovlev/telegram-md": "npm:^2.0.0"
842843
abitype: "npm:^1.0.8"
843844
date-fns: "npm:^4.1.0"
@@ -1292,7 +1293,7 @@ __metadata:
12921293
languageName: node
12931294
linkType: hard
12941295

1295-
"@types/node@npm:*":
1296+
"@types/node@npm:*, @types/node@npm:^22.13.5":
12961297
version: 22.13.5
12971298
resolution: "@types/node@npm:22.13.5"
12981299
dependencies:

0 commit comments

Comments
 (0)