Skip to content

Commit

Permalink
fix: implement .metrics
Browse files Browse the repository at this point in the history
The service assumes it exists
  • Loading branch information
wkillerud committed Jul 23, 2024
1 parent 456f52e commit 2731a78
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ReadFile } from '@eik/common';
import Sink from '@eik/sink';
import MetricsClient from '@metrics/client';
import { Readable, Writable } from 'node:stream';

/** @type {Map<string, string>} */
Expand All @@ -8,6 +9,12 @@ let content = new Map();
let mimetypes = new Map();

export default class SinkMemory extends Sink {
#metrics = new MetricsClient();

get metrics() {
return this.#metrics;
}

/**
* @param {string} filePath
* @param {string} contentType
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"homepage": "https://github.com/eik-lib/sink-memory#readme",
"dependencies": {
"@eik/common": "3.0.1",
"@eik/sink": "1.2.4"
"@eik/sink": "1.2.5",
"@metrics/client": "2.5.2"
},
"devDependencies": {
"@semantic-release/changelog": "6.0.3",
Expand Down

0 comments on commit 2731a78

Please sign in to comment.