checkly 6.0.1 → 6.1.0-prerelease-d6e6adb
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/dist/commands/import/plan.d.ts +1 -0
- package/dist/commands/import/plan.js +92 -43
- package/dist/commands/import/plan.js.map +1 -1
- package/dist/commands/pw-test.d.ts +27 -0
- package/dist/commands/pw-test.js +316 -0
- package/dist/commands/pw-test.js.map +1 -0
- package/dist/commands/rules.d.ts +9 -0
- package/dist/commands/rules.js +126 -0
- package/dist/commands/rules.js.map +1 -0
- package/dist/commands/sync-playwright.d.ts +0 -3
- package/dist/commands/sync-playwright.js +5 -29
- package/dist/commands/sync-playwright.js.map +1 -1
- package/dist/commands/test.d.ts +0 -12
- package/dist/commands/test.js +15 -62
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/trigger.js +2 -2
- package/dist/commands/trigger.js.map +1 -1
- package/dist/constructs/alert-channel.d.ts +67 -12
- package/dist/constructs/alert-channel.js +30 -3
- package/dist/constructs/alert-channel.js.map +1 -1
- package/dist/constructs/alert-escalation-policy.d.ts +80 -0
- package/dist/constructs/alert-escalation-policy.js +20 -0
- package/dist/constructs/alert-escalation-policy.js.map +1 -1
- package/dist/constructs/api-assertion-codegen.d.ts +3 -0
- package/dist/constructs/api-assertion-codegen.js +23 -0
- package/dist/constructs/api-assertion-codegen.js.map +1 -0
- package/dist/constructs/api-assertion.d.ts +74 -0
- package/dist/constructs/api-assertion.js +85 -0
- package/dist/constructs/api-assertion.js.map +1 -0
- package/dist/constructs/api-check-bundle.d.ts +4 -4
- package/dist/constructs/api-check-codegen.d.ts +3 -5
- package/dist/constructs/api-check-codegen.js +4 -80
- package/dist/constructs/api-check-codegen.js.map +1 -1
- package/dist/constructs/api-check.d.ts +147 -46
- package/dist/constructs/api-check.js +114 -28
- package/dist/constructs/api-check.js.map +1 -1
- package/dist/constructs/api-request-codegen.d.ts +4 -0
- package/dist/constructs/api-request-codegen.js +68 -0
- package/dist/constructs/api-request-codegen.js.map +1 -0
- package/dist/constructs/api-request.d.ts +67 -0
- package/dist/constructs/api-request.js +3 -0
- package/dist/constructs/api-request.js.map +1 -0
- package/dist/constructs/browser-check-bundle.d.ts +3 -3
- package/dist/constructs/browser-check-codegen.d.ts +2 -2
- package/dist/constructs/browser-check-codegen.js +1 -1
- package/dist/constructs/browser-check-codegen.js.map +1 -1
- package/dist/constructs/browser-check.d.ts +50 -11
- package/dist/constructs/browser-check.js +47 -25
- package/dist/constructs/browser-check.js.map +1 -1
- package/dist/constructs/check-codegen.d.ts +11 -6
- package/dist/constructs/check-codegen.js +36 -24
- package/dist/constructs/check-codegen.js.map +1 -1
- package/dist/constructs/check-config.d.ts +3 -0
- package/dist/constructs/check-config.js +21 -0
- package/dist/constructs/check-config.js.map +1 -0
- package/dist/constructs/check-group-codegen.js +2 -2
- package/dist/constructs/check-group-codegen.js.map +1 -1
- package/dist/constructs/check-group-v1.js +2 -22
- package/dist/constructs/check-group-v1.js.map +1 -1
- package/dist/constructs/check-group-v2.js +2 -20
- package/dist/constructs/check-group-v2.js.map +1 -1
- package/dist/constructs/check.d.ts +190 -30
- package/dist/constructs/check.js +94 -48
- package/dist/constructs/check.js.map +1 -1
- package/dist/constructs/construct.d.ts +86 -0
- package/dist/constructs/construct.js +51 -0
- package/dist/constructs/construct.js.map +1 -1
- package/dist/constructs/dashboard.d.ts +98 -16
- package/dist/constructs/dashboard.js.map +1 -1
- package/dist/constructs/diagnostics.d.ts +23 -0
- package/dist/constructs/diagnostics.js +10 -0
- package/dist/constructs/diagnostics.js.map +1 -1
- package/dist/constructs/environment-variable.d.ts +19 -0
- package/dist/constructs/frequency.d.ts +42 -0
- package/dist/constructs/frequency.js +42 -0
- package/dist/constructs/frequency.js.map +1 -1
- package/dist/constructs/heartbeat-monitor-codegen.d.ts +11 -0
- package/dist/constructs/{heartbeat-check-codegen.js → heartbeat-monitor-codegen.js} +10 -10
- package/dist/constructs/heartbeat-monitor-codegen.js.map +1 -0
- package/dist/constructs/{heartbeat-check.d.ts → heartbeat-monitor.d.ts} +9 -13
- package/dist/constructs/{heartbeat-check.js → heartbeat-monitor.js} +10 -13
- package/dist/constructs/heartbeat-monitor.js.map +1 -0
- package/dist/constructs/http-header.d.ts +16 -0
- package/dist/constructs/http-request.d.ts +2 -0
- package/dist/constructs/http-request.js +3 -0
- package/dist/constructs/http-request.js.map +1 -0
- package/dist/constructs/index.d.ts +10 -2
- package/dist/constructs/index.js +10 -2
- package/dist/constructs/index.js.map +1 -1
- package/dist/constructs/internal/common-diagnostics.d.ts +9 -0
- package/dist/constructs/internal/common-diagnostics.js +39 -0
- package/dist/constructs/internal/common-diagnostics.js.map +1 -0
- package/dist/constructs/ip.d.ts +2 -0
- package/dist/constructs/ip.js +3 -0
- package/dist/constructs/ip.js.map +1 -0
- package/dist/constructs/key-value-pair.d.ts +35 -0
- package/dist/constructs/monitor-codegen.d.ts +1 -0
- package/dist/constructs/monitor-codegen.js +6 -0
- package/dist/constructs/monitor-codegen.js.map +1 -0
- package/dist/constructs/monitor.d.ts +113 -0
- package/dist/constructs/monitor.js +21 -0
- package/dist/constructs/monitor.js.map +1 -0
- package/dist/constructs/multi-step-check-bundle.d.ts +3 -3
- package/dist/constructs/multi-step-check-codegen.d.ts +2 -2
- package/dist/constructs/multi-step-check-codegen.js +1 -1
- package/dist/constructs/multi-step-check-codegen.js.map +1 -1
- package/dist/constructs/multi-step-check.d.ts +8 -8
- package/dist/constructs/multi-step-check.js +4 -21
- package/dist/constructs/multi-step-check.js.map +1 -1
- package/dist/constructs/playwright-check-bundle.d.ts +2 -2
- package/dist/constructs/playwright-check.d.ts +6 -6
- package/dist/constructs/playwright-check.js +1 -1
- package/dist/constructs/playwright-check.js.map +1 -1
- package/dist/constructs/project.js +1 -1
- package/dist/constructs/project.js.map +1 -1
- package/dist/constructs/query-param.d.ts +16 -0
- package/dist/constructs/ref.d.ts +44 -0
- package/dist/constructs/ref.js +44 -0
- package/dist/constructs/ref.js.map +1 -1
- package/dist/constructs/retry-strategy.d.ts +78 -8
- package/dist/constructs/retry-strategy.js +33 -0
- package/dist/constructs/retry-strategy.js.map +1 -1
- package/dist/constructs/tcp-monitor-codegen.d.ts +15 -0
- package/dist/constructs/{tcp-check-codegen.js → tcp-monitor-codegen.js} +9 -9
- package/dist/constructs/tcp-monitor-codegen.js.map +1 -0
- package/dist/constructs/{tcp-check.d.ts → tcp-monitor.d.ts} +70 -21
- package/dist/constructs/{tcp-check.js → tcp-monitor.js} +34 -13
- package/dist/constructs/tcp-monitor.js.map +1 -0
- package/dist/constructs/url-assertion-codegen.d.ts +3 -0
- package/dist/constructs/url-assertion-codegen.js +15 -0
- package/dist/constructs/url-assertion-codegen.js.map +1 -0
- package/dist/constructs/url-assertion.d.ts +60 -0
- package/dist/constructs/url-assertion.js +56 -0
- package/dist/constructs/url-assertion.js.map +1 -0
- package/dist/constructs/url-monitor-codegen.d.ts +13 -0
- package/dist/constructs/url-monitor-codegen.js +38 -0
- package/dist/constructs/url-monitor-codegen.js.map +1 -0
- package/dist/constructs/url-monitor.d.ts +146 -0
- package/dist/constructs/url-monitor.js +99 -0
- package/dist/constructs/url-monitor.js.map +1 -0
- package/dist/constructs/url-request-codegen.d.ts +4 -0
- package/dist/constructs/url-request-codegen.js +31 -0
- package/dist/constructs/url-request-codegen.js.map +1 -0
- package/dist/constructs/url-request.d.ts +65 -0
- package/dist/constructs/url-request.js +3 -0
- package/dist/constructs/url-request.js.map +1 -0
- package/dist/constructs/webhook-alert-channel.d.ts +1 -1
- package/dist/helpers/constants.d.ts +1 -0
- package/dist/helpers/constants.js +5 -0
- package/dist/helpers/constants.js.map +1 -0
- package/dist/helpers/test-helper.d.ts +16 -0
- package/dist/helpers/test-helper.js +72 -0
- package/dist/helpers/test-helper.js.map +1 -0
- package/dist/helpers/write-config-helpers.d.ts +5 -0
- package/dist/helpers/write-config-helpers.js +88 -0
- package/dist/helpers/write-config-helpers.js.map +1 -0
- package/dist/reporters/util.js +2 -2
- package/dist/reporters/util.js.map +1 -1
- package/dist/rest/api.js +6 -0
- package/dist/rest/api.js.map +1 -1
- package/dist/rules/checkly.rules.md +491 -0
- package/dist/services/checkly-config-loader.d.ts +3 -3
- package/dist/services/checkly-config-loader.js +6 -4
- package/dist/services/checkly-config-loader.js.map +1 -1
- package/dist/services/util.d.ts +2 -2
- package/dist/services/util.js +14 -14
- package/dist/services/util.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/oclif.manifest.json +150 -1
- package/package.json +7 -3
- package/dist/constructs/heartbeat-check-codegen.d.ts +0 -11
- package/dist/constructs/heartbeat-check-codegen.js.map +0 -1
- package/dist/constructs/heartbeat-check.js.map +0 -1
- package/dist/constructs/tcp-check-codegen.d.ts +0 -15
- package/dist/constructs/tcp-check-codegen.js.map +0 -1
- package/dist/constructs/tcp-check.js.map +0 -1
|
@@ -1,24 +1,82 @@
|
|
|
1
1
|
import { Diagnostics } from './diagnostics';
|
|
2
2
|
import { Ref } from './ref';
|
|
3
|
+
/**
|
|
4
|
+
* Base interface for construct-like objects in the Checkly CLI system.
|
|
5
|
+
* Used for type checking and identifying construct objects.
|
|
6
|
+
*/
|
|
3
7
|
export interface ConstructLike {
|
|
8
|
+
/** The type identifier of the construct */
|
|
4
9
|
type: string;
|
|
10
|
+
/** Unique logical identifier within the project scope */
|
|
5
11
|
logicalId: string;
|
|
6
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Interface for objects that can be bundled into a synthesizable representation.
|
|
15
|
+
* Provides the contract for converting constructs into their deployable form.
|
|
16
|
+
*/
|
|
7
17
|
export interface Bundle {
|
|
18
|
+
/** Synthesizes the construct into its deployable representation */
|
|
8
19
|
synthesize(): any | null;
|
|
9
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Interface for constructs that can be validated.
|
|
23
|
+
* Provides the contract for validating construct configuration and reporting issues.
|
|
24
|
+
*/
|
|
10
25
|
export interface Validate {
|
|
26
|
+
/**
|
|
27
|
+
* Validates the construct, reporting any issues via the provided diagnostics.
|
|
28
|
+
* @param diagnostics The diagnostics instance to add any validation issues to
|
|
29
|
+
*/
|
|
11
30
|
validate(diagnostics: Diagnostics): Promise<void>;
|
|
12
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Abstract base class for all constructs in the Checkly CLI system.
|
|
34
|
+
* Provides common functionality for validation, bundling, and resource management.
|
|
35
|
+
*
|
|
36
|
+
* This class is extended by all built-in constructs like ApiCheck, BrowserCheck, etc.
|
|
37
|
+
* It should not be extended directly by user code.
|
|
38
|
+
*/
|
|
13
39
|
export declare abstract class Construct implements Validate, Bundle {
|
|
40
|
+
/** The type identifier of the construct */
|
|
14
41
|
type: string;
|
|
42
|
+
/** Unique logical identifier within the project scope */
|
|
15
43
|
logicalId: string;
|
|
44
|
+
/** Physical identifier from the Checkly API (if exists) */
|
|
16
45
|
physicalId?: string | number;
|
|
46
|
+
/** Whether this construct is a member of the project */
|
|
17
47
|
member: boolean;
|
|
48
|
+
/** Absolute path to the check file that created this construct */
|
|
18
49
|
checkFileAbsolutePath?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Creates a new construct instance.
|
|
52
|
+
*
|
|
53
|
+
* @param type The type identifier for this construct
|
|
54
|
+
* @param logicalId Unique logical identifier within the project scope
|
|
55
|
+
* @param physicalId Optional physical identifier from the Checkly API
|
|
56
|
+
* @param member Whether this construct is a member of the project
|
|
57
|
+
*/
|
|
19
58
|
constructor(type: string, logicalId: string, physicalId?: string | number, member?: boolean);
|
|
59
|
+
/**
|
|
60
|
+
* Creates a reference to this construct that can be used in other constructs.
|
|
61
|
+
*
|
|
62
|
+
* @returns A reference object that can be used to link to this construct
|
|
63
|
+
*/
|
|
20
64
|
ref(): Ref;
|
|
65
|
+
/**
|
|
66
|
+
* Determines whether this construct is allowed to be referenced in checkly.config.ts.
|
|
67
|
+
* Most constructs should not be directly referenced in the config file.
|
|
68
|
+
*
|
|
69
|
+
* @returns true if this construct can be used in checkly.config.ts, false otherwise
|
|
70
|
+
*/
|
|
21
71
|
allowInChecklyConfig(): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Resolves a content file path relative to the check file that created this construct.
|
|
74
|
+
* If the path is already absolute, returns it as-is.
|
|
75
|
+
*
|
|
76
|
+
* @param contentPath The relative or absolute path to resolve
|
|
77
|
+
* @returns The absolute path to the content file
|
|
78
|
+
* @throws Error if checkFileAbsolutePath is not set and a relative path is provided
|
|
79
|
+
*/
|
|
22
80
|
resolveContentFilePath(contentPath: string): string;
|
|
23
81
|
/**
|
|
24
82
|
* Validates the Construct, allowing multiple issues to be brought into
|
|
@@ -39,13 +97,41 @@ export declare abstract class Construct implements Validate, Bundle {
|
|
|
39
97
|
* @returns A Promise that resolves to the bundled representation of the Construct.
|
|
40
98
|
*/
|
|
41
99
|
bundle(): Promise<Bundle>;
|
|
100
|
+
/**
|
|
101
|
+
* Synthesizes the construct into its deployable representation.
|
|
102
|
+
* This method must be implemented by all concrete construct classes.
|
|
103
|
+
*
|
|
104
|
+
* @returns The synthesized representation of the construct, or null if not applicable
|
|
105
|
+
*/
|
|
42
106
|
abstract synthesize(): any | null;
|
|
43
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Interface for script configurations that reference an external file.
|
|
110
|
+
* Used when script code is stored in a separate file rather than inline.
|
|
111
|
+
*/
|
|
44
112
|
export interface Entrypoint {
|
|
113
|
+
/** Path to the script file, relative to the check file or absolute */
|
|
45
114
|
entrypoint: string;
|
|
46
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* Type guard to check if a value is an Entrypoint object.
|
|
118
|
+
*
|
|
119
|
+
* @param value The value to check
|
|
120
|
+
* @returns true if the value is an Entrypoint, false otherwise
|
|
121
|
+
*/
|
|
47
122
|
export declare function isEntrypoint(value: any): value is Entrypoint;
|
|
123
|
+
/**
|
|
124
|
+
* Interface for script configurations that contain inline code.
|
|
125
|
+
* Used when script code is provided directly as a string.
|
|
126
|
+
*/
|
|
48
127
|
export interface Content {
|
|
128
|
+
/** The inline script content as a string */
|
|
49
129
|
content: string;
|
|
50
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* Type guard to check if a value is a Content object.
|
|
133
|
+
*
|
|
134
|
+
* @param value The value to check
|
|
135
|
+
* @returns true if the value is a Content, false otherwise
|
|
136
|
+
*/
|
|
51
137
|
export declare function isContent(value: any): value is Content;
|
|
@@ -7,12 +7,32 @@ exports.isContent = exports.isEntrypoint = exports.Construct = void 0;
|
|
|
7
7
|
const node_path_1 = __importDefault(require("node:path"));
|
|
8
8
|
const project_1 = require("./project");
|
|
9
9
|
const ref_1 = require("./ref");
|
|
10
|
+
/**
|
|
11
|
+
* Abstract base class for all constructs in the Checkly CLI system.
|
|
12
|
+
* Provides common functionality for validation, bundling, and resource management.
|
|
13
|
+
*
|
|
14
|
+
* This class is extended by all built-in constructs like ApiCheck, BrowserCheck, etc.
|
|
15
|
+
* It should not be extended directly by user code.
|
|
16
|
+
*/
|
|
10
17
|
class Construct {
|
|
18
|
+
/** The type identifier of the construct */
|
|
11
19
|
type;
|
|
20
|
+
/** Unique logical identifier within the project scope */
|
|
12
21
|
logicalId;
|
|
22
|
+
/** Physical identifier from the Checkly API (if exists) */
|
|
13
23
|
physicalId;
|
|
24
|
+
/** Whether this construct is a member of the project */
|
|
14
25
|
member;
|
|
26
|
+
/** Absolute path to the check file that created this construct */
|
|
15
27
|
checkFileAbsolutePath;
|
|
28
|
+
/**
|
|
29
|
+
* Creates a new construct instance.
|
|
30
|
+
*
|
|
31
|
+
* @param type The type identifier for this construct
|
|
32
|
+
* @param logicalId Unique logical identifier within the project scope
|
|
33
|
+
* @param physicalId Optional physical identifier from the Checkly API
|
|
34
|
+
* @param member Whether this construct is a member of the project
|
|
35
|
+
*/
|
|
16
36
|
constructor(type, logicalId, physicalId, member) {
|
|
17
37
|
this.logicalId = logicalId;
|
|
18
38
|
this.type = type;
|
|
@@ -21,12 +41,31 @@ class Construct {
|
|
|
21
41
|
this.checkFileAbsolutePath = project_1.Session.checkFileAbsolutePath;
|
|
22
42
|
project_1.Session.validateCreateConstruct(this);
|
|
23
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Creates a reference to this construct that can be used in other constructs.
|
|
46
|
+
*
|
|
47
|
+
* @returns A reference object that can be used to link to this construct
|
|
48
|
+
*/
|
|
24
49
|
ref() {
|
|
25
50
|
return ref_1.Ref.from(this.logicalId);
|
|
26
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Determines whether this construct is allowed to be referenced in checkly.config.ts.
|
|
54
|
+
* Most constructs should not be directly referenced in the config file.
|
|
55
|
+
*
|
|
56
|
+
* @returns true if this construct can be used in checkly.config.ts, false otherwise
|
|
57
|
+
*/
|
|
27
58
|
allowInChecklyConfig() {
|
|
28
59
|
return false;
|
|
29
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Resolves a content file path relative to the check file that created this construct.
|
|
63
|
+
* If the path is already absolute, returns it as-is.
|
|
64
|
+
*
|
|
65
|
+
* @param contentPath The relative or absolute path to resolve
|
|
66
|
+
* @returns The absolute path to the content file
|
|
67
|
+
* @throws Error if checkFileAbsolutePath is not set and a relative path is provided
|
|
68
|
+
*/
|
|
30
69
|
resolveContentFilePath(contentPath) {
|
|
31
70
|
if (node_path_1.default.isAbsolute(contentPath)) {
|
|
32
71
|
return contentPath;
|
|
@@ -62,10 +101,22 @@ class Construct {
|
|
|
62
101
|
}
|
|
63
102
|
}
|
|
64
103
|
exports.Construct = Construct;
|
|
104
|
+
/**
|
|
105
|
+
* Type guard to check if a value is an Entrypoint object.
|
|
106
|
+
*
|
|
107
|
+
* @param value The value to check
|
|
108
|
+
* @returns true if the value is an Entrypoint, false otherwise
|
|
109
|
+
*/
|
|
65
110
|
function isEntrypoint(value) {
|
|
66
111
|
return 'entrypoint' in Object(value);
|
|
67
112
|
}
|
|
68
113
|
exports.isEntrypoint = isEntrypoint;
|
|
114
|
+
/**
|
|
115
|
+
* Type guard to check if a value is a Content object.
|
|
116
|
+
*
|
|
117
|
+
* @param value The value to check
|
|
118
|
+
* @returns true if the value is a Content, false otherwise
|
|
119
|
+
*/
|
|
69
120
|
function isContent(value) {
|
|
70
121
|
return 'content' in Object(value);
|
|
71
122
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"construct.js","sourceRoot":"","sources":["../../src/constructs/construct.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA4B;AAG5B,uCAAmC;AACnC,+BAA2B;
|
|
1
|
+
{"version":3,"file":"construct.js","sourceRoot":"","sources":["../../src/constructs/construct.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA4B;AAG5B,uCAAmC;AACnC,+BAA2B;AAkC3B;;;;;;GAMG;AACH,MAAsB,SAAS;IAC7B,2CAA2C;IAC3C,IAAI,CAAQ;IACZ,yDAAyD;IACzD,SAAS,CAAQ;IACjB,2DAA2D;IAC3D,UAAU,CAAgB;IAC1B,wDAAwD;IACxD,MAAM,CAAS;IACf,kEAAkE;IAClE,qBAAqB,CAAS;IAE9B;;;;;;;OAOG;IACH,YAAa,IAAY,EAAE,SAAiB,EAAE,UAA0B,EAAE,MAAgB;QACxF,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,IAAI,CAAA;QAC5B,IAAI,CAAC,qBAAqB,GAAG,iBAAO,CAAC,qBAAqB,CAAA;QAC1D,iBAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAA;IACvC,CAAC;IAED;;;;OAIG;IACH,GAAG;QACD,OAAO,SAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACjC,CAAC;IAED;;;;;OAKG;IACH,oBAAoB;QAClB,OAAO,KAAK,CAAA;IACd,CAAC;IAED;;;;;;;OAOG;IACH,sBAAsB,CAAE,WAAmB;QACzC,IAAI,mBAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YACjC,OAAO,WAAW,CAAA;QACpB,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,gGAAgG,CAAC,CAAA;QACnH,CAAC;QAED,OAAO,mBAAI,CAAC,IAAI,CAAC,mBAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,EAAE,WAAW,CAAC,CAAA;IACzE,CAAC;IAED;;;;;;OAMG;IACH,6DAA6D;IAC7D,KAAK,CAAC,QAAQ,CAAE,WAAwB;QACtC,OAAM;IACR,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,MAAM;QACV,OAAO,IAAI,CAAA;IACb,CAAC;CASF;AArGD,8BAqGC;AAWD;;;;;GAKG;AACH,SAAgB,YAAY,CAAE,KAAU;IACtC,OAAO,YAAY,IAAI,MAAM,CAAC,KAAK,CAAC,CAAA;AACtC,CAAC;AAFD,oCAEC;AAWD;;;;;GAKG;AACH,SAAgB,SAAS,CAAE,KAAU;IACnC,OAAO,SAAS,IAAI,MAAM,CAAC,KAAK,CAAC,CAAA;AACnC,CAAC;AAFD,8BAEC"}
|
|
@@ -1,98 +1,180 @@
|
|
|
1
1
|
import { Construct, Content, Entrypoint } from './construct';
|
|
2
2
|
import { Diagnostics } from './diagnostics';
|
|
3
3
|
import { DashboardBundle } from './dashboard-bundle';
|
|
4
|
+
/**
|
|
5
|
+
* Configuration properties for dashboards.
|
|
6
|
+
* Dashboards provide a public status page showing the health of your checks.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const dashboard = new Dashboard('status-dashboard', {
|
|
11
|
+
* customUrl: 'my-company-status',
|
|
12
|
+
* header: 'My Company Status',
|
|
13
|
+
* description: 'Service availability and performance monitoring',
|
|
14
|
+
* tags: ['production', 'api'],
|
|
15
|
+
* refreshRate: 60,
|
|
16
|
+
* checksPerPage: 10,
|
|
17
|
+
* enableIncidents: true
|
|
18
|
+
* })
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
4
21
|
export interface DashboardProps {
|
|
5
22
|
/**
|
|
6
23
|
* A list of one or more tags that filter what checks will be shown in the dashboard.
|
|
7
24
|
* All checks are included if no tag is specified.
|
|
25
|
+
*
|
|
26
|
+
* @example ['production', 'api', 'critical']
|
|
8
27
|
*/
|
|
9
28
|
tags?: Array<string>;
|
|
10
29
|
/**
|
|
11
30
|
* A subdomain name under "checklyhq.com". Needs to be unique across all users.
|
|
12
31
|
* This is required if 'customDomain' is not specified.
|
|
32
|
+
*
|
|
33
|
+
* @example 'my-company-status' // Creates https://my-company-status.checklyhq.com
|
|
13
34
|
*/
|
|
14
35
|
customUrl?: string;
|
|
15
36
|
/**
|
|
16
37
|
* A custom user domain, e.g. "status.example.com". See the docs on updating your DNS and SSL usage.
|
|
17
38
|
* This is required if 'customUrl' is not specified.
|
|
39
|
+
*
|
|
40
|
+
* @example 'status.example.com'
|
|
41
|
+
* @see {@link https://www.checklyhq.com/docs/dashboards/custom-domains/ | Custom Domain Setup}
|
|
18
42
|
*/
|
|
19
43
|
customDomain?: string;
|
|
20
44
|
/**
|
|
21
|
-
* A URL pointing to an image file.
|
|
45
|
+
* A URL pointing to an image file for the dashboard logo.
|
|
46
|
+
*
|
|
47
|
+
* @example 'https://example.com/logo.png'
|
|
22
48
|
*/
|
|
23
49
|
logo?: string;
|
|
24
50
|
/**
|
|
25
51
|
* A URL pointing to an image file used as dashboard favicon.
|
|
52
|
+
*
|
|
53
|
+
* @example 'https://example.com/favicon.ico'
|
|
26
54
|
*/
|
|
27
55
|
favicon?: string;
|
|
28
56
|
/**
|
|
29
57
|
* A URL link to redirect when dashboard logo is clicked on.
|
|
58
|
+
*
|
|
59
|
+
* @example 'https://example.com'
|
|
30
60
|
*/
|
|
31
61
|
link?: string;
|
|
32
62
|
/**
|
|
33
63
|
* A piece of text displayed at the top of your dashboard.
|
|
64
|
+
*
|
|
65
|
+
* @example 'My Company Service Status'
|
|
34
66
|
*/
|
|
35
67
|
header?: string;
|
|
36
68
|
/**
|
|
37
69
|
* A piece of text displayed below the header or title of your dashboard.
|
|
70
|
+
*
|
|
71
|
+
* @example 'Real-time status of our services and APIs'
|
|
38
72
|
*/
|
|
39
73
|
description?: string;
|
|
40
74
|
/**
|
|
41
|
-
*
|
|
75
|
+
* Determines whether to use the full screen or focus in the center.
|
|
76
|
+
*
|
|
77
|
+
* @defaultValue 'FULL'
|
|
42
78
|
*/
|
|
43
79
|
width?: 'FULL' | '960PX';
|
|
44
80
|
/**
|
|
45
|
-
* How often to refresh the dashboard in seconds.
|
|
81
|
+
* How often to refresh the dashboard in seconds.
|
|
82
|
+
*
|
|
83
|
+
* @defaultValue 60
|
|
46
84
|
*/
|
|
47
85
|
refreshRate?: 60 | 300 | 600;
|
|
48
86
|
/**
|
|
49
|
-
* Determines
|
|
87
|
+
* Determines if pagination is on or off.
|
|
88
|
+
* When enabled, checks are split across multiple pages.
|
|
89
|
+
*
|
|
90
|
+
* @defaultValue true
|
|
50
91
|
*/
|
|
51
92
|
paginate?: boolean;
|
|
52
93
|
/**
|
|
53
|
-
*
|
|
94
|
+
* How often to trigger pagination in seconds.
|
|
95
|
+
* Controls how frequently the dashboard cycles through pages.
|
|
96
|
+
*
|
|
97
|
+
* @defaultValue 60
|
|
54
98
|
*/
|
|
55
99
|
paginationRate?: 30 | 60 | 300;
|
|
56
100
|
/**
|
|
57
|
-
* Number of checks displayed per page
|
|
101
|
+
* Number of checks displayed per page.
|
|
102
|
+
*
|
|
103
|
+
* @defaultValue 15
|
|
104
|
+
* @minimum 1
|
|
105
|
+
* @maximum 20
|
|
58
106
|
*/
|
|
59
107
|
checksPerPage?: number;
|
|
60
108
|
/**
|
|
61
|
-
* When to use AND operator for tags lookup.
|
|
109
|
+
* When to use AND operator for tags lookup.
|
|
110
|
+
* If true, checks must have ALL specified tags. If false, checks with ANY specified tag are shown.
|
|
111
|
+
*
|
|
112
|
+
* @defaultValue false
|
|
62
113
|
*/
|
|
63
114
|
useTagsAndOperator?: boolean;
|
|
64
115
|
/**
|
|
65
|
-
* Show or hide the tags on the dashboard.
|
|
116
|
+
* Show or hide the tags on the dashboard.
|
|
117
|
+
*
|
|
118
|
+
* @defaultValue false
|
|
66
119
|
*/
|
|
67
120
|
hideTags?: boolean;
|
|
68
121
|
/**
|
|
69
|
-
* Enable or disable incidents on the dashboard.
|
|
70
|
-
*
|
|
122
|
+
* Enable or disable incidents on the dashboard.
|
|
123
|
+
* Allows manual incident creation and management on the status page.
|
|
124
|
+
*
|
|
125
|
+
* @defaultValue false
|
|
126
|
+
* @remarks Only paid accounts can enable this feature
|
|
127
|
+
* @see {@link https://www.checklyhq.com/docs/dashboards/incidents/ | Dashboard Incidents}
|
|
71
128
|
*/
|
|
72
129
|
enableIncidents?: boolean;
|
|
73
130
|
/**
|
|
74
|
-
* Expand or collapse checks on the dashboard.
|
|
131
|
+
* Expand or collapse checks on the dashboard.
|
|
132
|
+
*
|
|
133
|
+
* @defaultValue false
|
|
75
134
|
*/
|
|
76
135
|
expandChecks?: boolean;
|
|
77
136
|
/**
|
|
78
|
-
* Show or hide header and description on the dashboard.
|
|
137
|
+
* Show or hide header and description on the dashboard.
|
|
138
|
+
*
|
|
139
|
+
* @defaultValue true
|
|
79
140
|
*/
|
|
80
141
|
showHeader?: boolean;
|
|
81
142
|
/**
|
|
82
143
|
* Custom CSS to be applied to the dashboard.
|
|
144
|
+
* Allows customization of the dashboard appearance with your own styling.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```typescript
|
|
148
|
+
* // Using external CSS file
|
|
149
|
+
* customCSS: { entrypoint: './dashboard.css' }
|
|
150
|
+
*
|
|
151
|
+
* // Using inline CSS
|
|
152
|
+
* customCSS: {
|
|
153
|
+
* content: '.header { background: #blue; }'
|
|
154
|
+
* }
|
|
155
|
+
* ```
|
|
83
156
|
*/
|
|
84
157
|
customCSS?: Content | Entrypoint;
|
|
85
158
|
/**
|
|
86
|
-
* Determines if the dashboard is public or private.
|
|
87
|
-
*
|
|
159
|
+
* Determines if the dashboard is public or private.
|
|
160
|
+
* Private dashboards require authentication to view.
|
|
161
|
+
*
|
|
162
|
+
* @defaultValue false
|
|
163
|
+
* @remarks Only paid accounts can enable this feature
|
|
88
164
|
*/
|
|
89
165
|
isPrivate?: boolean;
|
|
90
166
|
/**
|
|
91
|
-
* Show or hide the P95 stats on the dashboard.
|
|
167
|
+
* Show or hide the P95 stats on the dashboard.
|
|
168
|
+
* P95 represents the 95th percentile response time.
|
|
169
|
+
*
|
|
170
|
+
* @defaultValue true
|
|
92
171
|
*/
|
|
93
172
|
showP95?: boolean;
|
|
94
173
|
/**
|
|
95
|
-
* Show or hide the P99 stats on the dashboard.
|
|
174
|
+
* Show or hide the P99 stats on the dashboard.
|
|
175
|
+
* P99 represents the 99th percentile response time.
|
|
176
|
+
*
|
|
177
|
+
* @defaultValue true
|
|
96
178
|
*/
|
|
97
179
|
showP99?: boolean;
|
|
98
180
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/constructs/dashboard.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAiC;AAEjC,2CAAqF;AACrF,uCAAmC;AAEnC,mEAAwE;AACxE,yDAAoD;
|
|
1
|
+
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/constructs/dashboard.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAiC;AAEjC,2CAAqF;AACrF,uCAAmC;AAEnC,mEAAwE;AACxE,yDAAoD;AAyMpD;;;;;;GAMG;AACH,MAAa,SAAU,SAAQ,qBAAS;IAC7B,IAAI,CAAgB;IACpB,SAAS,CAAS;IAClB,YAAY,CAAS;IACrB,IAAI,CAAS;IACb,OAAO,CAAS;IAChB,IAAI,CAAS;IACb,MAAM,CAAS;IACf,WAAW,CAAS;IACpB,KAAK,CAAiB;IACtB,WAAW,CAAa;IACxB,QAAQ,CAAU;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EAAE,IAAI,CAAC,SAAS;YACzB,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAA;IACH,CAAC;;AA7IH,8BA8IC"}
|
|
@@ -1,12 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for creating diagnostic messages.
|
|
3
|
+
*/
|
|
1
4
|
export interface DiagnosticOptions {
|
|
5
|
+
/** The title/summary of the diagnostic */
|
|
2
6
|
title: string;
|
|
7
|
+
/** Detailed message describing the diagnostic */
|
|
3
8
|
message: string;
|
|
4
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Abstract base class for diagnostic messages.
|
|
12
|
+
* Diagnostics are used to report issues during validation and processing.
|
|
13
|
+
*/
|
|
5
14
|
export declare abstract class Diagnostic {
|
|
15
|
+
/** The title/summary of the diagnostic */
|
|
6
16
|
title: string;
|
|
17
|
+
/** Detailed message describing the diagnostic */
|
|
7
18
|
message: string;
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new diagnostic instance.
|
|
21
|
+
* @param options The diagnostic configuration
|
|
22
|
+
*/
|
|
8
23
|
constructor(options: DiagnosticOptions);
|
|
24
|
+
/**
|
|
25
|
+
* Determines if this diagnostic represents a fatal error.
|
|
26
|
+
* @returns true if this diagnostic is fatal and should stop processing
|
|
27
|
+
*/
|
|
9
28
|
abstract isFatal(): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Determines if this diagnostic is benign and can be ignored.
|
|
31
|
+
* @returns true if this diagnostic is informational only
|
|
32
|
+
*/
|
|
10
33
|
abstract isBenign(): boolean;
|
|
11
34
|
}
|
|
12
35
|
export interface ErrorDiagnosticOptions extends DiagnosticOptions {
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Diagnostics = exports.NoticeDiagnostic = exports.WarningDiagnostic = exports.ErrorDiagnostic = exports.Diagnostic = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Abstract base class for diagnostic messages.
|
|
6
|
+
* Diagnostics are used to report issues during validation and processing.
|
|
7
|
+
*/
|
|
4
8
|
class Diagnostic {
|
|
9
|
+
/** The title/summary of the diagnostic */
|
|
5
10
|
title;
|
|
11
|
+
/** Detailed message describing the diagnostic */
|
|
6
12
|
message;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new diagnostic instance.
|
|
15
|
+
* @param options The diagnostic configuration
|
|
16
|
+
*/
|
|
7
17
|
constructor(options) {
|
|
8
18
|
this.title = options.title;
|
|
9
19
|
this.message = options.message;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/constructs/diagnostics.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/constructs/diagnostics.ts"],"names":[],"mappings":";;;AAUA;;;GAGG;AACH,MAAsB,UAAU;I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AE,CAAA;IACxC,CAAC;IAED,MAAM,CAAE,GAAG,WAA0B;QACnC,KAAK,MAAM,KAAK,IAAI,WAAW,EAAE,CAAC;YAChC,KAAK,MAAM,WAAW,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;gBAC7C,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;YACvB,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA1BD,kCA0BC"}
|
|
@@ -1,2 +1,21 @@
|
|
|
1
1
|
import KeyValuePair from './key-value-pair';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an environment variable for checks.
|
|
4
|
+
* Environment variables can be used in check scripts and configurations.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const apiUrl: EnvironmentVariable = {
|
|
9
|
+
* key: 'API_URL',
|
|
10
|
+
* value: 'https://api.example.com',
|
|
11
|
+
* locked: true
|
|
12
|
+
* }
|
|
13
|
+
*
|
|
14
|
+
* const secretToken: EnvironmentVariable = {
|
|
15
|
+
* key: 'SECRET_TOKEN',
|
|
16
|
+
* value: 'my-secret-token',
|
|
17
|
+
* secret: true
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
2
21
|
export type EnvironmentVariable = KeyValuePair;
|
|
@@ -1,20 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a check execution frequency with optional offset.
|
|
3
|
+
* Use the static constants for common scheduling patterns.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* // High-frequency monitoring (every 30 seconds) - API/TCP only
|
|
8
|
+
* frequency: Frequency.EVERY_30S
|
|
9
|
+
*
|
|
10
|
+
* // Standard API monitoring (every 5 minutes)
|
|
11
|
+
* frequency: Frequency.EVERY_5M
|
|
12
|
+
*
|
|
13
|
+
* // Daily health checks (every 24 hours)
|
|
14
|
+
* frequency: Frequency.EVERY_24H
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @see {@link https://www.checklyhq.com/docs/monitoring/ | Monitoring Documentation}
|
|
18
|
+
*/
|
|
1
19
|
export declare class Frequency {
|
|
20
|
+
/** Run every 10 seconds */
|
|
2
21
|
static EVERY_10S: Frequency;
|
|
22
|
+
/** Run every 20 seconds */
|
|
3
23
|
static EVERY_20S: Frequency;
|
|
24
|
+
/** Run every 30 seconds */
|
|
4
25
|
static EVERY_30S: Frequency;
|
|
26
|
+
/** Run every 1 minute */
|
|
5
27
|
static EVERY_1M: Frequency;
|
|
28
|
+
/** Run every 2 minutes */
|
|
6
29
|
static EVERY_2M: Frequency;
|
|
30
|
+
/** Run every 5 minutes */
|
|
7
31
|
static EVERY_5M: Frequency;
|
|
32
|
+
/** Run every 10 minutes */
|
|
8
33
|
static EVERY_10M: Frequency;
|
|
34
|
+
/** Run every 15 minutes */
|
|
9
35
|
static EVERY_15M: Frequency;
|
|
36
|
+
/** Run every 30 minutes */
|
|
10
37
|
static EVERY_30M: Frequency;
|
|
38
|
+
/** Run every 1 hour */
|
|
11
39
|
static EVERY_1H: Frequency;
|
|
40
|
+
/** Run every 2 hours */
|
|
12
41
|
static EVERY_2H: Frequency;
|
|
42
|
+
/** Run every 3 hours */
|
|
13
43
|
static EVERY_3H: Frequency;
|
|
44
|
+
/** Run every 6 hours */
|
|
14
45
|
static EVERY_6H: Frequency;
|
|
46
|
+
/** Run every 12 hours */
|
|
15
47
|
static EVERY_12H: Frequency;
|
|
48
|
+
/** Run every 24 hours */
|
|
16
49
|
static EVERY_24H: Frequency;
|
|
50
|
+
/** The frequency in minutes (or 0 for second-based frequencies) */
|
|
17
51
|
frequency: number;
|
|
52
|
+
/** The frequency offset in seconds (used for sub-minute frequencies) */
|
|
18
53
|
frequencyOffset?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Creates a new frequency instance.
|
|
56
|
+
* Use the static constants instead of creating instances directly.
|
|
57
|
+
*
|
|
58
|
+
* @param frequency The frequency in minutes, or 0 for second-based frequencies
|
|
59
|
+
* @param frequencyOffset The frequency offset in seconds (for sub-minute frequencies)
|
|
60
|
+
*/
|
|
19
61
|
private constructor();
|
|
20
62
|
}
|
|
@@ -1,24 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Frequency = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Represents a check execution frequency with optional offset.
|
|
6
|
+
* Use the static constants for common scheduling patterns.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* // High-frequency monitoring (every 30 seconds) - API/TCP only
|
|
11
|
+
* frequency: Frequency.EVERY_30S
|
|
12
|
+
*
|
|
13
|
+
* // Standard API monitoring (every 5 minutes)
|
|
14
|
+
* frequency: Frequency.EVERY_5M
|
|
15
|
+
*
|
|
16
|
+
* // Daily health checks (every 24 hours)
|
|
17
|
+
* frequency: Frequency.EVERY_24H
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @see {@link https://www.checklyhq.com/docs/monitoring/ | Monitoring Documentation}
|
|
21
|
+
*/
|
|
4
22
|
class Frequency {
|
|
23
|
+
/** Run every 10 seconds */
|
|
5
24
|
static EVERY_10S = new Frequency(0, 10);
|
|
25
|
+
/** Run every 20 seconds */
|
|
6
26
|
static EVERY_20S = new Frequency(0, 20);
|
|
27
|
+
/** Run every 30 seconds */
|
|
7
28
|
static EVERY_30S = new Frequency(0, 30);
|
|
29
|
+
/** Run every 1 minute */
|
|
8
30
|
static EVERY_1M = new Frequency(1);
|
|
31
|
+
/** Run every 2 minutes */
|
|
9
32
|
static EVERY_2M = new Frequency(2);
|
|
33
|
+
/** Run every 5 minutes */
|
|
10
34
|
static EVERY_5M = new Frequency(5);
|
|
35
|
+
/** Run every 10 minutes */
|
|
11
36
|
static EVERY_10M = new Frequency(10);
|
|
37
|
+
/** Run every 15 minutes */
|
|
12
38
|
static EVERY_15M = new Frequency(15);
|
|
39
|
+
/** Run every 30 minutes */
|
|
13
40
|
static EVERY_30M = new Frequency(30);
|
|
41
|
+
/** Run every 1 hour */
|
|
14
42
|
static EVERY_1H = new Frequency(1 * 60);
|
|
43
|
+
/** Run every 2 hours */
|
|
15
44
|
static EVERY_2H = new Frequency(2 * 60);
|
|
45
|
+
/** Run every 3 hours */
|
|
16
46
|
static EVERY_3H = new Frequency(3 * 60);
|
|
47
|
+
/** Run every 6 hours */
|
|
17
48
|
static EVERY_6H = new Frequency(6 * 60);
|
|
49
|
+
/** Run every 12 hours */
|
|
18
50
|
static EVERY_12H = new Frequency(12 * 60);
|
|
51
|
+
/** Run every 24 hours */
|
|
19
52
|
static EVERY_24H = new Frequency(24 * 60);
|
|
53
|
+
/** The frequency in minutes (or 0 for second-based frequencies) */
|
|
20
54
|
frequency;
|
|
55
|
+
/** The frequency offset in seconds (used for sub-minute frequencies) */
|
|
21
56
|
frequencyOffset;
|
|
57
|
+
/**
|
|
58
|
+
* Creates a new frequency instance.
|
|
59
|
+
* Use the static constants instead of creating instances directly.
|
|
60
|
+
*
|
|
61
|
+
* @param frequency The frequency in minutes, or 0 for second-based frequencies
|
|
62
|
+
* @param frequencyOffset The frequency offset in seconds (for sub-minute frequencies)
|
|
63
|
+
*/
|
|
22
64
|
constructor(frequency, frequencyOffset) {
|
|
23
65
|
this.frequency = frequency;
|
|
24
66
|
this.frequencyOffset = frequencyOffset;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frequency.js","sourceRoot":"","sources":["../../src/constructs/frequency.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAS;IACpB,MAAM,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IACvC,MAAM,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IACvC,MAAM,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAEvC,M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