checkly 4.0.8 → 4.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/constructs.js +1 -0
- package/dist/auth/index.js +1 -1
- package/dist/commands/baseCommand.js +3 -1
- package/dist/commands/baseCommand.js.map +1 -1
- package/dist/commands/deploy.js +65 -21
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/destroy.js +13 -2
- package/dist/commands/destroy.js.map +1 -1
- package/dist/commands/help.d.ts +6 -0
- package/dist/commands/help.js +14 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/commands/login.d.ts +1 -4
- package/dist/commands/login.js +21 -38
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/switch.js +1 -1
- package/dist/commands/switch.js.map +1 -1
- package/dist/commands/test.js +8 -2
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/trigger.js +4 -3
- package/dist/commands/trigger.js.map +1 -1
- package/dist/constructs/api-check.d.ts +1 -1
- package/dist/constructs/api-check.js +1 -0
- package/dist/constructs/api-check.js.map +1 -1
- package/dist/constructs/browser-check.d.ts +1 -1
- package/dist/constructs/browser-check.js +1 -0
- package/dist/constructs/browser-check.js.map +1 -1
- package/dist/constructs/check-group.d.ts +5 -3
- package/dist/constructs/check-group.js +20 -1
- package/dist/constructs/check-group.js.map +1 -1
- package/dist/constructs/check.d.ts +9 -3
- package/dist/constructs/check.js +19 -1
- package/dist/constructs/check.js.map +1 -1
- package/dist/constructs/dashboard.d.ts +138 -0
- package/dist/constructs/dashboard.js +103 -0
- package/dist/constructs/dashboard.js.map +1 -0
- package/dist/constructs/index.d.ts +7 -0
- package/dist/constructs/index.js +7 -0
- package/dist/constructs/index.js.map +1 -1
- package/dist/constructs/maintenance-window.d.ts +61 -0
- package/dist/constructs/maintenance-window.js +47 -0
- package/dist/constructs/maintenance-window.js.map +1 -0
- package/dist/constructs/private-location-check-assignment.d.ts +29 -0
- package/dist/constructs/private-location-check-assignment.js +35 -0
- package/dist/constructs/private-location-check-assignment.js.map +1 -0
- package/dist/constructs/private-location-group-assignment.d.ts +29 -0
- package/dist/constructs/private-location-group-assignment.js +35 -0
- package/dist/constructs/private-location-group-assignment.js.map +1 -0
- package/dist/constructs/private-location.d.ts +49 -0
- package/dist/constructs/private-location.js +59 -0
- package/dist/constructs/private-location.js.map +1 -0
- package/dist/constructs/project.d.ts +10 -4
- package/dist/constructs/project.js +27 -2
- package/dist/constructs/project.js.map +1 -1
- package/dist/help/help-extension.js +5 -1
- package/dist/help/help-extension.js.map +1 -1
- package/dist/reporters/abstract-list.d.ts +7 -3
- package/dist/reporters/abstract-list.js +24 -7
- package/dist/reporters/abstract-list.js.map +1 -1
- package/dist/reporters/github.js.map +1 -1
- package/dist/reporters/list.d.ts +2 -0
- package/dist/reporters/list.js +10 -0
- package/dist/reporters/list.js.map +1 -1
- package/dist/reporters/reporter.d.ts +2 -0
- package/dist/reporters/reporter.js.map +1 -1
- package/dist/reporters/util.d.ts +4 -3
- package/dist/reporters/util.js +11 -6
- package/dist/reporters/util.js.map +1 -1
- package/dist/rest/private-locations.d.ts +3 -4
- package/dist/rest/private-locations.js.map +1 -1
- package/dist/rest/projects.d.ts +2 -0
- package/dist/rest/projects.js.map +1 -1
- package/dist/services/abstract-check-runner.d.ts +4 -1
- package/dist/services/abstract-check-runner.js +31 -6
- package/dist/services/abstract-check-runner.js.map +1 -1
- package/dist/services/config.d.ts +8 -5
- package/dist/services/config.js +41 -30
- package/dist/services/config.js.map +1 -1
- package/dist/services/project-parser.js +57 -3
- package/dist/services/project-parser.js.map +1 -1
- package/dist/services/util.js +7 -7
- package/dist/services/util.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/oclif.manifest.json +15 -18
- package/package.json +8 -48
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Construct } from './construct';
|
|
2
|
+
export type MaintenanceWindowRepeatUnit = 'DAY' | 'WEEK' | 'MONTH';
|
|
3
|
+
export interface MaintenanceWindowProps {
|
|
4
|
+
/**
|
|
5
|
+
* The name of the maintenance window.
|
|
6
|
+
*/
|
|
7
|
+
name: string;
|
|
8
|
+
/**
|
|
9
|
+
* A list of one or more tags that filter which checks are affected by the maintenance window.
|
|
10
|
+
*/
|
|
11
|
+
tags: Array<string>;
|
|
12
|
+
/**
|
|
13
|
+
* The start date and time of the maintenance window in ISO 8601 format, "YYYY-MM-DDTHH:mm:ss.sssZ" as returned by
|
|
14
|
+
* `new Date()`
|
|
15
|
+
*/
|
|
16
|
+
startsAt: Date;
|
|
17
|
+
/**
|
|
18
|
+
* The end date and time of the maintenance window in ISO 8601 format, "YYYY-MM-DDTHH:mm:ss.sssZ" as returned by
|
|
19
|
+
* `new Date()`
|
|
20
|
+
*/
|
|
21
|
+
endsAt: Date;
|
|
22
|
+
/**
|
|
23
|
+
* The repeat interval of the maintenance window from the first occurrence.
|
|
24
|
+
*/
|
|
25
|
+
repeatInterval?: number;
|
|
26
|
+
/**
|
|
27
|
+
* The repeat strategy for the maintenance window. This is mandatory when you specify a repeat interval.
|
|
28
|
+
*/
|
|
29
|
+
repeatUnit?: MaintenanceWindowRepeatUnit;
|
|
30
|
+
/**
|
|
31
|
+
* The end date and time when the maintenance window should stop repeating.
|
|
32
|
+
*/
|
|
33
|
+
repeatEndsAt?: Date;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Creates a Maintenance Window
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
*
|
|
40
|
+
* This class make use of the Maintenance Window endpoints.
|
|
41
|
+
*/
|
|
42
|
+
export declare class MaintenanceWindow extends Construct {
|
|
43
|
+
name: string;
|
|
44
|
+
tags: Array<string>;
|
|
45
|
+
startsAt: Date;
|
|
46
|
+
endsAt: Date;
|
|
47
|
+
repeatInterval?: number;
|
|
48
|
+
repeatUnit?: MaintenanceWindowRepeatUnit;
|
|
49
|
+
repeatEndsAt?: Date;
|
|
50
|
+
static readonly __checklyType = "maintenance-window";
|
|
51
|
+
/**
|
|
52
|
+
* Constructs the Maintenance Window instance
|
|
53
|
+
*
|
|
54
|
+
* @param logicalId unique project-scoped resource name identification
|
|
55
|
+
* @param props maintenance window configuration properties
|
|
56
|
+
*
|
|
57
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#maintenancewindow Read more in the docs}
|
|
58
|
+
*/
|
|
59
|
+
constructor(logicalId: string, props: MaintenanceWindowProps);
|
|
60
|
+
synthesize(): any | null;
|
|
61
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MaintenanceWindow = void 0;
|
|
4
|
+
const construct_1 = require("./construct");
|
|
5
|
+
const project_1 = require("./project");
|
|
6
|
+
/**
|
|
7
|
+
* Creates a Maintenance Window
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
*
|
|
11
|
+
* This class make use of the Maintenance Window endpoints.
|
|
12
|
+
*/
|
|
13
|
+
class MaintenanceWindow extends construct_1.Construct {
|
|
14
|
+
/**
|
|
15
|
+
* Constructs the Maintenance Window instance
|
|
16
|
+
*
|
|
17
|
+
* @param logicalId unique project-scoped resource name identification
|
|
18
|
+
* @param props maintenance window configuration properties
|
|
19
|
+
*
|
|
20
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#maintenancewindow Read more in the docs}
|
|
21
|
+
*/
|
|
22
|
+
constructor(logicalId, props) {
|
|
23
|
+
super(MaintenanceWindow.__checklyType, logicalId);
|
|
24
|
+
this.name = props.name;
|
|
25
|
+
this.tags = props.tags;
|
|
26
|
+
this.startsAt = props.startsAt;
|
|
27
|
+
this.endsAt = props.endsAt;
|
|
28
|
+
this.repeatInterval = props.repeatInterval;
|
|
29
|
+
this.repeatUnit = props.repeatUnit;
|
|
30
|
+
this.repeatEndsAt = props.repeatEndsAt;
|
|
31
|
+
project_1.Session.registerConstruct(this);
|
|
32
|
+
}
|
|
33
|
+
synthesize() {
|
|
34
|
+
return {
|
|
35
|
+
name: this.name,
|
|
36
|
+
tags: this.tags,
|
|
37
|
+
startsAt: this.startsAt,
|
|
38
|
+
endsAt: this.endsAt,
|
|
39
|
+
repeatInterval: this.repeatInterval,
|
|
40
|
+
repeatUnit: this.repeatUnit,
|
|
41
|
+
repeatEndsAt: this.repeatEndsAt,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.MaintenanceWindow = MaintenanceWindow;
|
|
46
|
+
MaintenanceWindow.__checklyType = 'maintenance-window';
|
|
47
|
+
//# sourceMappingURL=maintenance-window.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maintenance-window.js","sourceRoot":"","sources":["../../src/constructs/maintenance-window.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AACvC,uCAAmC;AAqCnC;;;;;;GAMG;AACH,MAAa,iBAAkB,SAAQ,qBAAS;IAW9C;;;;;;;OAOG;IACH,YAAa,SAAiB,EAAE,KAA6B;QAC3D,KAAK,CAAC,iBAAiB,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;QACjD,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;QAC9B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAA;QAC1B,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAA;QAC1C,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAA;QAClC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAA;QACtC,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAA;IACH,CAAC;;AAzCH,8CA0CC;AAjCiB,+BAAa,GAAG,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Ref } from './ref';
|
|
2
|
+
import { Construct } from './construct';
|
|
3
|
+
export interface PrivateLocationCheckAssignmentProps {
|
|
4
|
+
privateLocationId: Ref;
|
|
5
|
+
checkId?: Ref;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Creates an Private Location Assignment
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
*
|
|
12
|
+
* This class make use of the Private Location Assignment endpoints.
|
|
13
|
+
*/
|
|
14
|
+
export declare class PrivateLocationCheckAssignment extends Construct {
|
|
15
|
+
privateLocationId: Ref;
|
|
16
|
+
checkId?: Ref;
|
|
17
|
+
static readonly __checklyType = "private-location-check-assignment";
|
|
18
|
+
/**
|
|
19
|
+
* Constructs the Private Location Assignment instance
|
|
20
|
+
*
|
|
21
|
+
* @param logicalId unique project-scoped resource name identification
|
|
22
|
+
* @param props private location assignment configuration properties
|
|
23
|
+
*/
|
|
24
|
+
constructor(logicalId: string, props: PrivateLocationCheckAssignmentProps);
|
|
25
|
+
synthesize(): {
|
|
26
|
+
privateLocationId: Ref;
|
|
27
|
+
checkId: Ref | undefined;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PrivateLocationCheckAssignment = void 0;
|
|
4
|
+
const construct_1 = require("./construct");
|
|
5
|
+
const project_1 = require("./project");
|
|
6
|
+
/**
|
|
7
|
+
* Creates an Private Location Assignment
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
*
|
|
11
|
+
* This class make use of the Private Location Assignment endpoints.
|
|
12
|
+
*/
|
|
13
|
+
class PrivateLocationCheckAssignment extends construct_1.Construct {
|
|
14
|
+
/**
|
|
15
|
+
* Constructs the Private Location Assignment instance
|
|
16
|
+
*
|
|
17
|
+
* @param logicalId unique project-scoped resource name identification
|
|
18
|
+
* @param props private location assignment configuration properties
|
|
19
|
+
*/
|
|
20
|
+
constructor(logicalId, props) {
|
|
21
|
+
super(PrivateLocationCheckAssignment.__checklyType, logicalId);
|
|
22
|
+
this.privateLocationId = props.privateLocationId;
|
|
23
|
+
this.checkId = props.checkId;
|
|
24
|
+
project_1.Session.registerConstruct(this);
|
|
25
|
+
}
|
|
26
|
+
synthesize() {
|
|
27
|
+
return {
|
|
28
|
+
privateLocationId: this.privateLocationId,
|
|
29
|
+
checkId: this.checkId,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.PrivateLocationCheckAssignment = PrivateLocationCheckAssignment;
|
|
34
|
+
PrivateLocationCheckAssignment.__checklyType = 'private-location-check-assignment';
|
|
35
|
+
//# sourceMappingURL=private-location-check-assignment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-location-check-assignment.js","sourceRoot":"","sources":["../../src/constructs/private-location-check-assignment.ts"],"names":[],"mappings":";;;AACA,2CAAuC;AACvC,uCAAmC;AAOnC;;;;;;GAMG;AACH,MAAa,8BAA+B,SAAQ,qBAAS;IAM3D;;;;;OAKG;IACH,YAAa,SAAiB,EAAE,KAA0C;QACxE,KAAK,CAAC,8BAA8B,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;QAC9D,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAA;QAChD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5B,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO;YACL,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAA;IACH,CAAC;;AAxBH,wEAyBC;AArBiB,4CAAa,GAAG,mCAAmC,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Ref } from './ref';
|
|
2
|
+
import { Construct } from './construct';
|
|
3
|
+
export interface PrivateLocationGroupAssignmentProps {
|
|
4
|
+
privateLocationId: Ref;
|
|
5
|
+
groupId?: Ref;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Creates an Private Location Group Assignment
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
*
|
|
12
|
+
* This class make use of the Private Location Group Assignment endpoints.
|
|
13
|
+
*/
|
|
14
|
+
export declare class PrivateLocationGroupAssignment extends Construct {
|
|
15
|
+
privateLocationId: Ref;
|
|
16
|
+
groupId?: Ref;
|
|
17
|
+
static readonly __checklyType = "private-location-group-assignment";
|
|
18
|
+
/**
|
|
19
|
+
* Constructs the Private Location GroupAssignment instance
|
|
20
|
+
*
|
|
21
|
+
* @param logicalId unique project-scoped resource name identification
|
|
22
|
+
* @param props private location group assignment configuration properties
|
|
23
|
+
*/
|
|
24
|
+
constructor(logicalId: string, props: PrivateLocationGroupAssignmentProps);
|
|
25
|
+
synthesize(): {
|
|
26
|
+
privateLocationId: Ref;
|
|
27
|
+
groupId: Ref | undefined;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PrivateLocationGroupAssignment = void 0;
|
|
4
|
+
const construct_1 = require("./construct");
|
|
5
|
+
const project_1 = require("./project");
|
|
6
|
+
/**
|
|
7
|
+
* Creates an Private Location Group Assignment
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
*
|
|
11
|
+
* This class make use of the Private Location Group Assignment endpoints.
|
|
12
|
+
*/
|
|
13
|
+
class PrivateLocationGroupAssignment extends construct_1.Construct {
|
|
14
|
+
/**
|
|
15
|
+
* Constructs the Private Location GroupAssignment instance
|
|
16
|
+
*
|
|
17
|
+
* @param logicalId unique project-scoped resource name identification
|
|
18
|
+
* @param props private location group assignment configuration properties
|
|
19
|
+
*/
|
|
20
|
+
constructor(logicalId, props) {
|
|
21
|
+
super(PrivateLocationGroupAssignment.__checklyType, logicalId);
|
|
22
|
+
this.privateLocationId = props.privateLocationId;
|
|
23
|
+
this.groupId = props.groupId;
|
|
24
|
+
project_1.Session.registerConstruct(this);
|
|
25
|
+
}
|
|
26
|
+
synthesize() {
|
|
27
|
+
return {
|
|
28
|
+
privateLocationId: this.privateLocationId,
|
|
29
|
+
groupId: this.groupId,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.PrivateLocationGroupAssignment = PrivateLocationGroupAssignment;
|
|
34
|
+
PrivateLocationGroupAssignment.__checklyType = 'private-location-group-assignment';
|
|
35
|
+
//# sourceMappingURL=private-location-group-assignment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-location-group-assignment.js","sourceRoot":"","sources":["../../src/constructs/private-location-group-assignment.ts"],"names":[],"mappings":";;;AACA,2CAAuC;AACvC,uCAAmC;AAOnC;;;;;;GAMG;AACH,MAAa,8BAA+B,SAAQ,qBAAS;IAM3D;;;;;OAKG;IACH,YAAa,SAAiB,EAAE,KAA0C;QACxE,KAAK,CAAC,8BAA8B,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;QAC9D,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAA;QAChD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5B,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO;YACL,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAA;IACH,CAAC;;AAxBH,wEAyBC;AArBiB,4CAAa,GAAG,mCAAmC,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Construct } from './construct';
|
|
2
|
+
export type PrivateLocationIcon = 'alert' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-small-down' | 'arrow-small-left' | 'arrow-small-right' | 'arrow-small-up' | 'arrow-up' | 'beaker' | 'bell' | 'bold' | 'book' | 'bookmark' | 'briefcase' | 'broadcast' | 'browser' | 'bug' | 'calendar' | 'check' | 'checklist' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle-slash' | 'circuit-board' | 'clippy' | 'clock' | 'cloud-download' | 'cloud-upload' | 'code' | 'comment' | 'comment-discussion' | 'credit-card' | 'dash' | 'dashboard' | 'database' | 'desktop-download' | 'device-camera' | 'device-camera-video' | 'device-desktop' | 'device-mobile' | 'diff' | 'diff-added' | 'diff-ignored' | 'diff-modified' | 'diff-removed' | 'diff-renamed' | 'ellipses' | 'ellipsis' | 'eye' | 'file' | 'file-binary' | 'file-code' | 'file-directory' | 'file-media' | 'file-pdf' | 'file-submodule' | 'file-symlink-directory' | 'file-symlink-file' | 'file-text' | 'file-zip' | 'flame' | 'fold' | 'gear' | 'gift' | 'gist' | 'gist-secret' | 'git-branch' | 'git-commit' | 'git-compare' | 'git-merge' | 'git-pull-request' | 'globe' | 'grabber' | 'graph' | 'heart' | 'history' | 'home' | 'horizontal-rule' | 'hubot' | 'inbox' | 'info' | 'issue-closed' | 'issue-opened' | 'issue-reopened' | 'italic' | 'jersey' | 'key' | 'keyboard' | 'law' | 'light-bulb' | 'link' | 'link-external' | 'list-ordered' | 'list-unordered' | 'location' | 'lock' | 'mail' | 'mail-read' | 'mail-reply' | 'markdown' | 'mark-github' | 'megaphone' | 'mention' | 'milestone' | 'mirror' | 'mortar-board' | 'mute' | 'no-newline' | 'octoface' | 'organization' | 'package' | 'paintcan' | 'pencil' | 'person' | 'pin' | 'plug' | 'plus' | 'plus-small' | 'primitive-dot' | 'primitive-square' | 'pulse' | 'question' | 'quote' | 'radio-tower' | 'reply' | 'repo' | 'repo-clone' | 'repo-force-push' | 'repo-forked' | 'repo-pull' | 'repo-push' | 'rocket' | 'rss' | 'ruby' | 'search' | 'server' | 'settings' | 'shield' | 'sign-in' | 'sign-out' | 'smiley' | 'squirrel' | 'star' | 'stop' | 'sync' | 'tag' | 'tasklist' | 'telescope' | 'terminal' | 'text-size' | 'three-bars' | 'thumbsdown' | 'thumbsup' | 'tools' | 'trashcan' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'triangle-up' | 'unfold' | 'unmute' | 'unverified' | 'verified' | 'versions' | 'watch' | 'x' | 'zap';
|
|
3
|
+
export interface PrivateLocationProps {
|
|
4
|
+
/**
|
|
5
|
+
* The name assigned to the private location.
|
|
6
|
+
*/
|
|
7
|
+
name: string;
|
|
8
|
+
/**
|
|
9
|
+
* A valid slug name.
|
|
10
|
+
*/
|
|
11
|
+
slugName: string;
|
|
12
|
+
/**
|
|
13
|
+
* An icon
|
|
14
|
+
*/
|
|
15
|
+
icon?: PrivateLocationIcon;
|
|
16
|
+
/**
|
|
17
|
+
* Define a proxy for outgoing API check HTTP calls from your private location.
|
|
18
|
+
*/
|
|
19
|
+
proxyUrl?: string;
|
|
20
|
+
}
|
|
21
|
+
declare class PrivateLocationWrapper extends Construct {
|
|
22
|
+
constructor(logicalId: string, physicalId: string | number);
|
|
23
|
+
synthesize(): null;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Creates an Private Location
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
*
|
|
30
|
+
* This class make use of the Private Location endpoints.
|
|
31
|
+
*/
|
|
32
|
+
export declare class PrivateLocation extends Construct {
|
|
33
|
+
name: string;
|
|
34
|
+
slugName: string;
|
|
35
|
+
icon?: string;
|
|
36
|
+
proxyUrl?: string;
|
|
37
|
+
static readonly __checklyType = "private-location";
|
|
38
|
+
/**
|
|
39
|
+
* Constructs the Private Location instance
|
|
40
|
+
*
|
|
41
|
+
* @param logicalId unique project-scoped resource name identification
|
|
42
|
+
* @param props private location configuration properties
|
|
43
|
+
*/
|
|
44
|
+
constructor(logicalId: string, props: PrivateLocationProps);
|
|
45
|
+
static fromId(id: string): PrivateLocationWrapper;
|
|
46
|
+
allowInChecklyConfig(): boolean;
|
|
47
|
+
synthesize(): any | null;
|
|
48
|
+
}
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PrivateLocation = void 0;
|
|
4
|
+
const construct_1 = require("./construct");
|
|
5
|
+
const project_1 = require("./project");
|
|
6
|
+
const validator_error_1 = require("./validator-error");
|
|
7
|
+
class PrivateLocationWrapper extends construct_1.Construct {
|
|
8
|
+
constructor(logicalId, physicalId) {
|
|
9
|
+
super(PrivateLocation.__checklyType, logicalId, physicalId, false);
|
|
10
|
+
project_1.Session.registerConstruct(this);
|
|
11
|
+
}
|
|
12
|
+
synthesize() {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Creates an Private Location
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
*
|
|
21
|
+
* This class make use of the Private Location endpoints.
|
|
22
|
+
*/
|
|
23
|
+
class PrivateLocation extends construct_1.Construct {
|
|
24
|
+
/**
|
|
25
|
+
* Constructs the Private Location instance
|
|
26
|
+
*
|
|
27
|
+
* @param logicalId unique project-scoped resource name identification
|
|
28
|
+
* @param props private location configuration properties
|
|
29
|
+
*/
|
|
30
|
+
constructor(logicalId, props) {
|
|
31
|
+
super(PrivateLocation.__checklyType, logicalId);
|
|
32
|
+
this.name = props.name;
|
|
33
|
+
this.slugName = props.slugName;
|
|
34
|
+
this.icon = props.icon;
|
|
35
|
+
this.proxyUrl = props.proxyUrl;
|
|
36
|
+
if (!/^((?!((us(-gov)?|ap|ca|cn|eu|sa|af|me)-(central|(north|south)?(east|west)?)-\d+))[a-zA-Z0-9-]{1,30})$/
|
|
37
|
+
.test(this.slugName)) {
|
|
38
|
+
throw new validator_error_1.ValidationError(`The "slugName" must differ from all AWS locations. (slugName='${this.slugName}')`);
|
|
39
|
+
}
|
|
40
|
+
project_1.Session.registerConstruct(this);
|
|
41
|
+
}
|
|
42
|
+
static fromId(id) {
|
|
43
|
+
return new PrivateLocationWrapper(`private-location-${id}`, id);
|
|
44
|
+
}
|
|
45
|
+
allowInChecklyConfig() {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
synthesize() {
|
|
49
|
+
return {
|
|
50
|
+
name: this.name,
|
|
51
|
+
slugName: this.slugName,
|
|
52
|
+
icon: this.icon,
|
|
53
|
+
proxyUrl: this.proxyUrl,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.PrivateLocation = PrivateLocation;
|
|
58
|
+
PrivateLocation.__checklyType = 'private-location';
|
|
59
|
+
//# sourceMappingURL=private-location.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-location.js","sourceRoot":"","sources":["../../src/constructs/private-location.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AACvC,uCAAmC;AACnC,uDAAmD;AA4CnD,MAAM,sBAAuB,SAAQ,qBAAS;IAC5C,YAAa,SAAiB,EAAE,UAAyB;QACvD,KAAK,CAAC,eAAe,CAAC,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,CAAC,CAAA;QAClE,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAED;;;;;;GAMG;AACH,MAAa,eAAgB,SAAQ,qBAAS;IAQ5C;;;;;OAKG;IACH,YAAa,SAAiB,EAAE,KAA2B;QACzD,KAAK,CAAC,eAAe,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;QAC/C,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;QAC9B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;QAE9B,IAAI,CAAC,uGAAuG;aACzG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YACtB,MAAM,IAAI,iCAAe,CAAC,iEAAiE,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAA;SAC9G;QAED,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,MAAM,CAAC,MAAM,CAAE,EAAU;QACvB,OAAO,IAAI,sBAAsB,CAAC,oBAAoB,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;IACjE,CAAC;IAED,oBAAoB;QAClB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,UAAU;QACR,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAA;IACH,CAAC;;AA5CH,0CA6CC;AAvCiB,6BAAa,GAAG,kBAAkB,CAAA"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { CheckConfigDefaults } from '../services/checkly-config-loader';
|
|
2
2
|
import { Construct } from './construct';
|
|
3
3
|
import type { Runtime } from '../rest/runtimes';
|
|
4
|
-
import { Check } from './
|
|
5
|
-
import { CheckGroup } from './check-group';
|
|
6
|
-
import { AlertChannel } from './alert-channel';
|
|
7
|
-
import { AlertChannelSubscription } from './alert-channel-subscription';
|
|
4
|
+
import { Check, AlertChannelSubscription, AlertChannel, CheckGroup, MaintenanceWindow, Dashboard, PrivateLocation, PrivateLocationCheckAssignment, PrivateLocationGroupAssignment } from './';
|
|
8
5
|
import { ResourceSync } from '../rest/projects';
|
|
6
|
+
import { PrivateLocationApi } from '../rest/private-locations';
|
|
9
7
|
export interface ProjectProps {
|
|
10
8
|
/**
|
|
11
9
|
* Friendly name for your project.
|
|
@@ -21,6 +19,11 @@ export interface ProjectData {
|
|
|
21
19
|
'check-group': Record<string, CheckGroup>;
|
|
22
20
|
'alert-channel': Record<string, AlertChannel>;
|
|
23
21
|
'alert-channel-subscription': Record<string, AlertChannelSubscription>;
|
|
22
|
+
'maintenance-window': Record<string, MaintenanceWindow>;
|
|
23
|
+
'private-location': Record<string, PrivateLocation>;
|
|
24
|
+
'private-location-check-assignment': Record<string, PrivateLocationCheckAssignment>;
|
|
25
|
+
'private-location-group-assignment': Record<string, PrivateLocationGroupAssignment>;
|
|
26
|
+
dashboard: Record<string, Dashboard>;
|
|
24
27
|
}
|
|
25
28
|
export declare class Project extends Construct {
|
|
26
29
|
name: string;
|
|
@@ -40,6 +43,7 @@ export declare class Project extends Construct {
|
|
|
40
43
|
project: Pick<Project, 'logicalId' | 'name' | 'repoUrl'>;
|
|
41
44
|
resources: Array<ResourceSync>;
|
|
42
45
|
};
|
|
46
|
+
getTestOnlyConstructs(): Construct[];
|
|
43
47
|
private synthesizeRecord;
|
|
44
48
|
}
|
|
45
49
|
export declare class Session {
|
|
@@ -52,6 +56,8 @@ export declare class Session {
|
|
|
52
56
|
static availableRuntimes: Record<string, Runtime>;
|
|
53
57
|
static loadingChecklyConfigFile: boolean;
|
|
54
58
|
static checklyConfigFileConstructs?: Construct[];
|
|
59
|
+
static privateLocations: PrivateLocationApi[];
|
|
55
60
|
static registerConstruct(construct: Construct): void;
|
|
56
61
|
static validateCreateConstruct(construct: Construct): void;
|
|
62
|
+
static getPrivateLocations(): Promise<PrivateLocationApi[]>;
|
|
57
63
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Session = exports.Project = void 0;
|
|
4
|
+
const api = require("../rest/api");
|
|
4
5
|
const construct_1 = require("./construct");
|
|
5
6
|
const validator_error_1 = require("./validator-error");
|
|
6
|
-
const
|
|
7
|
+
const _1 = require("./");
|
|
7
8
|
class Project extends construct_1.Construct {
|
|
8
9
|
/**
|
|
9
10
|
* Constructs the Project instance
|
|
@@ -18,6 +19,11 @@ class Project extends construct_1.Construct {
|
|
|
18
19
|
'check-group': {},
|
|
19
20
|
'alert-channel': {},
|
|
20
21
|
'alert-channel-subscription': {},
|
|
22
|
+
'maintenance-window': {},
|
|
23
|
+
'private-location': {},
|
|
24
|
+
'private-location-check-assignment': {},
|
|
25
|
+
'private-location-group-assignment': {},
|
|
26
|
+
dashboard: {},
|
|
21
27
|
};
|
|
22
28
|
if (!props.name) {
|
|
23
29
|
// TODO: Can we collect a list of validation errors and return them all at once? This might be better UX.
|
|
@@ -46,12 +52,24 @@ class Project extends construct_1.Construct {
|
|
|
46
52
|
...this.synthesizeRecord(this.data['check-group']),
|
|
47
53
|
...this.synthesizeRecord(this.data['alert-channel']),
|
|
48
54
|
...this.synthesizeRecord(this.data['alert-channel-subscription']),
|
|
55
|
+
...this.synthesizeRecord(this.data['maintenance-window']),
|
|
56
|
+
...this.synthesizeRecord(this.data['private-location']),
|
|
57
|
+
...this.synthesizeRecord(this.data['private-location-check-assignment']),
|
|
58
|
+
...this.synthesizeRecord(this.data['private-location-group-assignment']),
|
|
59
|
+
...this.synthesizeRecord(this.data.dashboard),
|
|
49
60
|
],
|
|
50
61
|
};
|
|
51
62
|
}
|
|
63
|
+
getTestOnlyConstructs() {
|
|
64
|
+
return Object
|
|
65
|
+
.values(this.data)
|
|
66
|
+
.flatMap((record) => Object
|
|
67
|
+
.values(record)
|
|
68
|
+
.filter((construct) => construct instanceof _1.Check && construct.testOnly));
|
|
69
|
+
}
|
|
52
70
|
synthesizeRecord(record, addTestOnly = true) {
|
|
53
71
|
return Object.entries(record)
|
|
54
|
-
.filter(([, construct]) => construct instanceof
|
|
72
|
+
.filter(([, construct]) => construct instanceof _1.Check ? !construct.testOnly || addTestOnly : true)
|
|
55
73
|
.map(([key, construct]) => ({
|
|
56
74
|
logicalId: key,
|
|
57
75
|
type: construct.type,
|
|
@@ -95,6 +113,13 @@ class Session {
|
|
|
95
113
|
throw new Error(`Unable to create a construct '${construct.constructor.name}' outside a Checkly CLI project.`);
|
|
96
114
|
}
|
|
97
115
|
}
|
|
116
|
+
static async getPrivateLocations() {
|
|
117
|
+
if (!Session.privateLocations) {
|
|
118
|
+
const { data: privateLocations } = await api.privateLocations.getAll();
|
|
119
|
+
Session.privateLocations = privateLocations;
|
|
120
|
+
}
|
|
121
|
+
return Session.privateLocations;
|
|
122
|
+
}
|
|
98
123
|
}
|
|
99
124
|
exports.Session = Session;
|
|
100
125
|
//# sourceMappingURL=project.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/constructs/project.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/constructs/project.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAElC,2CAAuC;AACvC,uDAAmD;AAGnD,yBAGW;AA2BX,MAAa,OAAQ,SAAQ,qBAAS;IAkBpC;;;;;OAKG;IACH,YAAa,SAAiB,EAAE,KAAmB;QACjD,KAAK,CAAC,OAAO,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;QArBzC,SAAI,GAAgB;YAClB,KAAK,EAAE,EAAE;YACT,aAAa,EAAE,EAAE;YACjB,eAAe,EAAE,EAAE;YACnB,4BAA4B,EAAE,EAAE;YAChC,oBAAoB,EAAE,EAAE;YACxB,kBAAkB,EAAE,EAAE;YACtB,mCAAmC,EAAE,E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,gBAAgB,EAAE;YAC7B,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,MAAM,GAAG,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAA;YACtE,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,CAAA;SAC5C;QACD,OAAO,OAAO,CAAC,gBAAgB,CAAA;IACjC,CAAC;CACF;AA/CD,0BA+CC"}
|
|
@@ -41,8 +41,12 @@ class ChecklyHelpClass extends core_1.Help {
|
|
|
41
41
|
this.log(this.formatAllCommands(this.sortedCommands, this.sortedTopics));
|
|
42
42
|
this.log('');
|
|
43
43
|
}
|
|
44
|
+
this.log(this.section('ENVIRONMENT VARIABLES', `Running the CLI from your CI pipeline will need to export variables in the shell:\n
|
|
45
|
+
CHECKLY_ACCOUNT_ID Checkly account ID.
|
|
46
|
+
CHECKLY_API_KEY Checkly User API Key.
|
|
47
|
+
`));
|
|
44
48
|
const examplesString = examples_1.default.reduce((accumulator, example) => {
|
|
45
|
-
return accumulator +
|
|
49
|
+
return accumulator + `${example.description}\n\n${this.indent('$ ' + example.command)}\n\n`;
|
|
46
50
|
}, '');
|
|
47
51
|
this.log(this.section('EXAMPLES', examplesString));
|
|
48
52
|
return Promise.resolve();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help-extension.js","sourceRoot":"","sources":["../../src/help/help-extension.ts"],"names":[],"mappings":";;AAAA,sCAA2C;AAC3C,yCAAiC;AAIjC,MAAqB,gBAAiB,SAAQ,WAAI;IACtC,iBAAiB,CAAE,QAAqE,EAChG,MAAoB;QACpB,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAA;QAEpC,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAA;QACxD,MAAM,kBAAkB,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAA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AAC,IAAI,CAAC,OAAO,CAAC,uBAAuB,EAC7C;;;KAGC,CAAC,CAAC,CAAA;QAEH,MAAM,cAAc,GAAG,kBAAQ,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,OAAO,EAAE,EAAE;YAC9D,OAAO,WAAW,GAAG,GAAG,OAAO,CAAC,WAAW,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAA;QAC7F,CAAC,EAAE,EAAE,CAAC,CAAA;QAEN,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC,CAAA;QAClD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC;CACF;AAjED,mCAiEC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Reporter } from './reporter';
|
|
2
|
-
import
|
|
2
|
+
import { CheckStatus } from './util';
|
|
3
|
+
import type { CheckRunId, RunLocation } from '../services/abstract-check-runner';
|
|
3
4
|
import { Check } from '../constructs/check';
|
|
4
|
-
import { TestResultsShortLinks } from '../rest/test-sessions';
|
|
5
5
|
export type checkFilesMap = Map<string | undefined, Map<CheckRunId, {
|
|
6
6
|
check?: Check;
|
|
7
7
|
result?: any;
|
|
8
8
|
titleString: string;
|
|
9
9
|
testResultId?: string;
|
|
10
|
+
checkStatus?: CheckStatus;
|
|
10
11
|
}>>;
|
|
11
12
|
export default abstract class AbstractListReporter implements Reporter {
|
|
12
13
|
_clearString: string;
|
|
@@ -15,14 +16,17 @@ export default abstract class AbstractListReporter implements Reporter {
|
|
|
15
16
|
numChecks?: number;
|
|
16
17
|
verbose: boolean;
|
|
17
18
|
testSessionId?: string;
|
|
19
|
+
_isSchedulingDelayExceeded?: boolean;
|
|
18
20
|
constructor(runLocation: RunLocation, verbose: boolean);
|
|
19
21
|
onBegin(checks: Array<{
|
|
20
22
|
check: any;
|
|
21
23
|
checkRunId: CheckRunId;
|
|
22
24
|
testResultId?: string;
|
|
23
25
|
}>, testSessionId?: string): void;
|
|
26
|
+
onCheckInProgress(check: any, checkRunId: CheckRunId): void;
|
|
24
27
|
abstract onEnd(): void;
|
|
25
|
-
|
|
28
|
+
onSchedulingDelayExceeded(): void;
|
|
29
|
+
onCheckEnd(checkRunId: CheckRunId, checkResult: any): void;
|
|
26
30
|
onError(err: Error): void;
|
|
27
31
|
_clearSummary(): void;
|
|
28
32
|
_printSummary(opts?: {
|
|
@@ -23,12 +23,22 @@ class AbstractListReporter {
|
|
|
23
23
|
const fileMap = this.checkFilesMap.get((_a = check.getSourceFile) === null || _a === void 0 ? void 0 : _a.call(check));
|
|
24
24
|
fileMap.set(checkRunId, {
|
|
25
25
|
check,
|
|
26
|
-
titleString: (0, util_1.formatCheckTitle)(util_1.CheckStatus.
|
|
26
|
+
titleString: (0, util_1.formatCheckTitle)(util_1.CheckStatus.SCHEDULING, check),
|
|
27
|
+
checkStatus: util_1.CheckStatus.SCHEDULING,
|
|
27
28
|
testResultId,
|
|
28
29
|
});
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
+
onCheckInProgress(check, checkRunId) {
|
|
33
|
+
var _a;
|
|
34
|
+
const checkFile = this.checkFilesMap.get((_a = check.getSourceFile) === null || _a === void 0 ? void 0 : _a.call(check)).get(checkRunId);
|
|
35
|
+
checkFile.titleString = (0, util_1.formatCheckTitle)(util_1.CheckStatus.RUNNING, check);
|
|
36
|
+
checkFile.checkStatus = util_1.CheckStatus.RUNNING;
|
|
37
|
+
}
|
|
38
|
+
onSchedulingDelayExceeded() {
|
|
39
|
+
this._isSchedulingDelayExceeded = true;
|
|
40
|
+
}
|
|
41
|
+
onCheckEnd(checkRunId, checkResult) {
|
|
32
42
|
const checkStatus = this.checkFilesMap.get(checkResult.sourceFile).get(checkRunId);
|
|
33
43
|
checkStatus.result = checkResult;
|
|
34
44
|
const status = checkResult.hasFailures ? util_1.CheckStatus.FAILED : util_1.CheckStatus.SUCCESSFUL;
|
|
@@ -46,7 +56,7 @@ class AbstractListReporter {
|
|
|
46
56
|
(0, util_1.printLn)(this._clearString);
|
|
47
57
|
}
|
|
48
58
|
_printSummary(opts = {}) {
|
|
49
|
-
const counts = { numFailed: 0, numPassed: 0,
|
|
59
|
+
const counts = { numFailed: 0, numPassed: 0, numRunning: 0, scheduling: 0 };
|
|
50
60
|
const status = [];
|
|
51
61
|
if (this.checkFilesMap.size === 1 && this.checkFilesMap.has(undefined)) {
|
|
52
62
|
status.push(chalk.bold('Summary:'));
|
|
@@ -54,9 +64,12 @@ class AbstractListReporter {
|
|
|
54
64
|
for (const [sourceFile, checkMap] of this.checkFilesMap.entries()) {
|
|
55
65
|
if (sourceFile)
|
|
56
66
|
status.push(sourceFile);
|
|
57
|
-
for (const [_, { titleString, result }] of checkMap.entries()) {
|
|
58
|
-
if (
|
|
59
|
-
counts.
|
|
67
|
+
for (const [_, { titleString, result, checkStatus }] of checkMap.entries()) {
|
|
68
|
+
if (checkStatus === util_1.CheckStatus.SCHEDULING) {
|
|
69
|
+
counts.scheduling++;
|
|
70
|
+
}
|
|
71
|
+
else if (!result) {
|
|
72
|
+
counts.numRunning++;
|
|
60
73
|
}
|
|
61
74
|
else if (result.hasFailures) {
|
|
62
75
|
counts.numFailed++;
|
|
@@ -70,11 +83,15 @@ class AbstractListReporter {
|
|
|
70
83
|
if (!opts.skipCheckCount) {
|
|
71
84
|
status.push('');
|
|
72
85
|
status.push([
|
|
86
|
+
counts.scheduling ? chalk.bold.blue(`${counts.scheduling} scheduling`) : undefined,
|
|
87
|
+
counts.numRunning ? chalk.bold.magenta(`${counts.numRunning} running`) : undefined,
|
|
73
88
|
counts.numFailed ? chalk.bold.red(`${counts.numFailed} failed`) : undefined,
|
|
74
89
|
counts.numPassed ? chalk.bold.green(`${counts.numPassed} passed`) : undefined,
|
|
75
|
-
counts.numPending ? chalk.bold.magenta(`${counts.numPending} pending`) : undefined,
|
|
76
90
|
`${this.numChecks} total`,
|
|
77
91
|
].filter(Boolean).join(', '));
|
|
92
|
+
if (this._isSchedulingDelayExceeded && counts.scheduling) {
|
|
93
|
+
status.push('Still waiting to schedule some checks. This may take a minute or two.');
|
|
94
|
+
}
|
|
78
95
|
}
|
|
79
96
|
status.push('');
|
|
80
97
|
const statusString = status.join('\n');
|