• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cameri / nostream / 24609919997

18 Apr 2026 05:23PM UTC coverage: 30.829% (-32.0%) from 62.807%
24609919997

Pull #454

github

web-flow
Merge c337d7af3 into 26bcdd51d
Pull Request #454: fix: OpenNode callback accepts unauthenticated requests

268 of 1385 branches covered (19.35%)

Branch coverage included in aggregate %.

29 of 41 new or added lines in 3 files covered. (70.73%)

976 existing lines in 41 files now uncovered.

1164 of 3260 relevant lines covered (35.71%)

5.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

26.67
/src/utils/template-cache.ts
1
import { readFileSync } from 'fs'
1✔
2

3
const cache = new Map<string, string>()
1✔
4
const isProd = process.env.NODE_ENV === 'production'
1✔
5

6
/**
7
 * Return the raw content of a template file.
8
 *
9
 * In production (NODE_ENV=production) the file is read from disk once and
10
 * cached for the lifetime of the process — no per-request I/O. Operators who
11
 * edit files under resources/ must restart the process for changes to take
12
 * effect.
13
 *
14
 * Outside of production the cache is bypassed so template edits are reflected
15
 * immediately without a restart.
16
 */
17
export const getTemplate = (path: string): string => {
1✔
UNCOV
18
  if (isProd) {
×
19
    let template = cache.get(path)
×
20
    if (template === undefined) {
×
21
      template = readFileSync(path, 'utf8')
×
22
      cache.set(path, template)
×
23
    }
24
    return template
×
25
  }
26

UNCOV
27
  return readFileSync(path, 'utf8')
×
28
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc