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

pmcelhaney / counterfact / 6935309875

20 Nov 2023 08:13PM UTC coverage: 82.591% (+0.04%) from 82.547%
6935309875

Pull #654

github

pmcelhaney
replace marginally useful logs on startup with a banner
Pull Request #654: cli banner

740 of 828 branches covered (0.0%)

Branch coverage included in aggregate %.

0 of 1 new or added line in 1 file covered. (0.0%)

2339 of 2900 relevant lines covered (80.66%)

37.87 hits per line

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

0.0
/src/server/code-generator.ts
1
import { type FSWatcher, watch } from "chokidar";
×
2

×
3
import { generate } from "../typescript-generator/generate.js";
×
4

×
5
export class CodeGenerator {
×
6
  private readonly openapiPath: string;
×
7

×
8
  private readonly destination: string;
×
9

×
10
  private watcher: FSWatcher | undefined;
×
11

×
12
  public constructor(openApiPath: string, destination: string) {
×
13
    this.openapiPath = openApiPath;
×
14
    this.destination = destination;
×
15
  }
×
16

×
17
  public async watch() {
×
18
    await generate(this.openapiPath, this.destination);
×
19

×
20
    if (this.openapiPath.startsWith("http")) {
×
21
      return;
×
22
    }
×
23

×
24
    this.watcher = watch(this.openapiPath).on("change", () => {
×
25
      void generate(this.openapiPath, this.destination);
×
26
    });
×
27
  }
×
28

×
29
  public async stopWatching(): Promise<void> {
×
30
    await this.watcher?.close();
×
31
  }
×
32
}
×
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

© 2025 Coveralls, Inc