heroku / heroku-cli-command

Compare 2e12e11 ... +1 ... 6c08c35

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 6 files from the diff.
Newly tracked file
src/request-id.ts changed.
Other files ignored by Codecov

@@ -1,14 +1,33 @@
Loading
1 -
import {v4 as uuid} from 'uuid'
1 +
import * as uuid from 'uuid'
2 +
3 +
export const requestIdHeader = 'Request-Id'
2 4
3 5
// tslint:disable-next-line: no-unnecessary-class
4 6
export class RequestId {
5 -
  private static _id: string
7 +
  static ids: string[] = []
8 +
9 +
  static track(...ids: string[]) {
10 +
    const tracked = RequestId.ids
11 +
    RequestId.ids = [...ids, ...tracked]
12 +
    return RequestId.ids
13 +
  }
14 +
15 +
  static create(): string[] {
16 +
    const tracked = RequestId.ids
17 +
    const generatedId = RequestId._generate()
18 +
    RequestId.ids = [generatedId, ...tracked]
19 +
    return RequestId.ids
20 +
  }
21 +
22 +
  static empty(): void {
23 +
    RequestId.ids = []
24 +
  }
6 25
7 -
  static get id() {
8 -
    if (!RequestId._id) {
9 -
      RequestId._id = uuid()
10 -
    }
26 +
  static get headerValue() {
27 +
    return RequestId.ids.join(',')
28 +
  }
11 29
12 -
    return RequestId._id
30 +
  static _generate() {
31 +
    return uuid.v4()
13 32
  }
14 33
}

Learn more Showing 1 files with coverage changes found.

New file src/request-id.ts
New
Loading file...
Files Coverage
src 0.00%
Project Totals (8 files) 0.00%
Loading