checkly 5.6.0 → 6.0.0-prerelease-541d8e1

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.
Files changed (113) hide show
  1. package/dist/commands/baseCommand.d.ts +1 -1
  2. package/dist/commands/baseCommand.js +3 -3
  3. package/dist/commands/baseCommand.js.map +1 -1
  4. package/dist/commands/deploy.js +37 -18
  5. package/dist/commands/deploy.js.map +1 -1
  6. package/dist/commands/import/plan.js +54 -27
  7. package/dist/commands/import/plan.js.map +1 -1
  8. package/dist/commands/test.js +84 -53
  9. package/dist/commands/test.js.map +1 -1
  10. package/dist/commands/trigger.d.ts +0 -1
  11. package/dist/commands/trigger.js +4 -6
  12. package/dist/commands/trigger.js.map +1 -1
  13. package/dist/constructs/api-check-bundle.d.ts +57 -0
  14. package/dist/constructs/api-check-bundle.js +34 -0
  15. package/dist/constructs/api-check-bundle.js.map +1 -0
  16. package/dist/constructs/api-check.d.ts +14 -20
  17. package/dist/constructs/api-check.js +86 -83
  18. package/dist/constructs/api-check.js.map +1 -1
  19. package/dist/constructs/browser-check-bundle.d.ts +58 -0
  20. package/dist/constructs/browser-check-bundle.js +31 -0
  21. package/dist/constructs/browser-check-bundle.js.map +1 -0
  22. package/dist/constructs/browser-check.d.ts +10 -22
  23. package/dist/constructs/browser-check.js +54 -67
  24. package/dist/constructs/browser-check.js.map +1 -1
  25. package/dist/constructs/check-group-codegen.d.ts +6 -5
  26. package/dist/constructs/check-group-codegen.js +14 -7
  27. package/dist/constructs/check-group-codegen.js.map +1 -1
  28. package/dist/constructs/check-group-ref.d.ts +14 -0
  29. package/dist/constructs/check-group-ref.js +37 -0
  30. package/dist/constructs/check-group-ref.js.map +1 -0
  31. package/dist/constructs/check-group-v1.d.ts +294 -0
  32. package/dist/constructs/check-group-v1.js +271 -0
  33. package/dist/constructs/check-group-v1.js.map +1 -0
  34. package/dist/constructs/check-group-v2.d.ts +120 -0
  35. package/dist/constructs/check-group-v2.js +87 -0
  36. package/dist/constructs/check-group-v2.js.map +1 -0
  37. package/dist/constructs/check-group.d.ts +4 -175
  38. package/dist/constructs/check-group.js +8 -246
  39. package/dist/constructs/check-group.js.map +1 -1
  40. package/dist/constructs/check.d.ts +2 -2
  41. package/dist/constructs/construct-diagnostics.d.ts +33 -0
  42. package/dist/constructs/construct-diagnostics.js +101 -0
  43. package/dist/constructs/construct-diagnostics.js.map +1 -0
  44. package/dist/constructs/construct.d.ts +35 -1
  45. package/dist/constructs/construct.js +48 -1
  46. package/dist/constructs/construct.js.map +1 -1
  47. package/dist/constructs/dashboard-bundle.d.ts +11 -0
  48. package/dist/constructs/dashboard-bundle.js +19 -0
  49. package/dist/constructs/dashboard-bundle.js.map +1 -0
  50. package/dist/constructs/dashboard.d.ts +26 -22
  51. package/dist/constructs/dashboard.js +39 -46
  52. package/dist/constructs/dashboard.js.map +1 -1
  53. package/dist/constructs/diagnostics.d.ts +36 -0
  54. package/dist/constructs/diagnostics.js +69 -0
  55. package/dist/constructs/diagnostics.js.map +1 -0
  56. package/dist/constructs/index.d.ts +1 -0
  57. package/dist/constructs/index.js +1 -0
  58. package/dist/constructs/index.js.map +1 -1
  59. package/dist/constructs/multi-step-check-bundle.d.ts +46 -0
  60. package/dist/constructs/multi-step-check-bundle.js +25 -0
  61. package/dist/constructs/multi-step-check-bundle.js.map +1 -0
  62. package/dist/constructs/multi-step-check.d.ts +9 -11
  63. package/dist/constructs/multi-step-check.js +50 -65
  64. package/dist/constructs/multi-step-check.js.map +1 -1
  65. package/dist/constructs/playwright-check-bundle.d.ts +49 -0
  66. package/dist/constructs/playwright-check-bundle.js +28 -0
  67. package/dist/constructs/playwright-check-bundle.js.map +1 -0
  68. package/dist/constructs/playwright-check.d.ts +9 -15
  69. package/dist/constructs/playwright-check.js +37 -33
  70. package/dist/constructs/playwright-check.js.map +1 -1
  71. package/dist/constructs/private-location.d.ts +2 -0
  72. package/dist/constructs/private-location.js +7 -5
  73. package/dist/constructs/private-location.js.map +1 -1
  74. package/dist/constructs/project-bundle.d.ts +30 -0
  75. package/dist/constructs/project-bundle.js +44 -0
  76. package/dist/constructs/project-bundle.js.map +1 -0
  77. package/dist/constructs/project.d.ts +41 -18
  78. package/dist/constructs/project.js +72 -31
  79. package/dist/constructs/project.js.map +1 -1
  80. package/dist/reporters/util.d.ts +0 -1
  81. package/dist/reporters/util.js +1 -5
  82. package/dist/reporters/util.js.map +1 -1
  83. package/dist/rest/projects.d.ts +2 -0
  84. package/dist/rest/projects.js.map +1 -1
  85. package/dist/rest/test-sessions.d.ts +2 -1
  86. package/dist/rest/test-sessions.js.map +1 -1
  87. package/dist/services/check-parser/package-files/json-source-file.js +2 -1
  88. package/dist/services/check-parser/package-files/json-source-file.js.map +1 -1
  89. package/dist/services/check-parser/package-files/loader.d.ts +2 -2
  90. package/dist/services/check-parser/package-files/loader.js +2 -2
  91. package/dist/services/check-parser/package-files/loader.js.map +1 -1
  92. package/dist/services/check-parser/package-files/resolver.d.ts +8 -8
  93. package/dist/services/check-parser/package-files/resolver.js +34 -32
  94. package/dist/services/check-parser/package-files/resolver.js.map +1 -1
  95. package/dist/services/check-parser/package-files/source-file.d.ts +1 -1
  96. package/dist/services/check-parser/package-files/source-file.js +5 -4
  97. package/dist/services/check-parser/package-files/source-file.js.map +1 -1
  98. package/dist/services/check-parser/parser.d.ts +3 -3
  99. package/dist/services/check-parser/parser.js +22 -23
  100. package/dist/services/check-parser/parser.js.map +1 -1
  101. package/dist/services/checkly-config-codegen.js +0 -3
  102. package/dist/services/checkly-config-codegen.js.map +1 -1
  103. package/dist/services/checkly-config-loader.d.ts +0 -1
  104. package/dist/services/checkly-config-loader.js.map +1 -1
  105. package/dist/services/project-parser.d.ts +4 -2
  106. package/dist/services/project-parser.js +109 -67
  107. package/dist/services/project-parser.js.map +1 -1
  108. package/dist/services/test-runner.d.ts +6 -4
  109. package/dist/services/test-runner.js +33 -22
  110. package/dist/services/test-runner.js.map +1 -1
  111. package/dist/tsconfig.tsbuildinfo +1 -1
  112. package/oclif.manifest.json +3 -3
  113. package/package.json +1 -1
@@ -10,252 +10,14 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
10
10
  if (k2 === undefined) k2 = k;
11
11
  o[k2] = m[k];
12
12
  }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
15
  };
28
16
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.CheckGroup = exports.CheckGroupRef = void 0;
30
- const path = __importStar(require("path"));
31
- const glob_1 = require("glob");
32
- const ref_1 = require("./ref");
33
- const project_1 = require("./project");
34
- const construct_1 = require("./construct");
35
- const browser_check_1 = require("./browser-check");
36
- const alert_channel_subscription_1 = require("./alert-channel-subscription");
37
- const private_location_group_assignment_1 = require("./private-location-group-assignment");
38
- const util_1 = require("../services/util");
39
- const multi_step_check_1 = require("./multi-step-check");
40
- const constants_1 = __importDefault(require("../constants"));
41
- const defaultApiCheckDefaults = {
42
- headers: [],
43
- queryParameters: [],
44
- url: '',
45
- basicAuth: {
46
- username: '',
47
- password: '',
48
- },
49
- };
50
- /**
51
- * Creates a reference to an existing Check Group.
52
- *
53
- * References link existing resources to a project without managing them.
54
- */
55
- class CheckGroupRef extends construct_1.Construct {
56
- constructor(logicalId, physicalId) {
57
- super(CheckGroup.__checklyType, logicalId, physicalId, false);
58
- project_1.Session.registerConstruct(this);
59
- }
60
- getCheckDefaults() {
61
- // The only value CheckGroup.getCheckDefaults() returns is frequency,
62
- // which exists purely for convenience, and only at CLI-level. It never
63
- // gets sent to the backend. If references are being used, no access to
64
- // this feature is required, and it can be ignored entirely.
65
- return {};
66
- }
67
- getBrowserCheckDefaults() {
68
- // See the comment for getCheckDefaults(), the same applies here.
69
- return {};
70
- }
71
- getMultiStepCheckDefaults() {
72
- // See the comment for getCheckDefaults(), the same applies here.
73
- return {};
74
- }
75
- synthesize() {
76
- return null;
77
- }
78
- }
79
- exports.CheckGroupRef = CheckGroupRef;
80
- /**
81
- * Creates a Check Group
82
- *
83
- * @remarks
84
- *
85
- * This class make use of the Check Groups endpoints.
86
- */
87
- class CheckGroup extends construct_1.Construct {
88
- name;
89
- activated;
90
- muted;
91
- doubleCheck;
92
- runtimeId;
93
- locations;
94
- privateLocations;
95
- tags;
96
- concurrency;
97
- frequency;
98
- environmentVariables;
99
- alertChannels;
100
- localSetupScript;
101
- localTearDownScript;
102
- apiCheckDefaults;
103
- browserChecks;
104
- multiStepChecks;
105
- retryStrategy;
106
- runParallel;
107
- alertSettings;
108
- useGlobalAlertSettings;
109
- static __checklyType = 'check-group';
110
- /**
111
- * Constructs the CheckGroup instance
112
- *
113
- * @param logicalId unique project-scoped resource name identification
114
- * @param props CheckGroup configuration properties
115
- *
116
- * {@link https://checklyhq.com/docs/cli/constructs-reference/#checkgroup Read more in the docs}
117
- */
118
- constructor(logicalId, props) {
119
- super(CheckGroup.__checklyType, logicalId);
120
- this.name = props.name;
121
- this.activated = props.activated;
122
- this.muted = props.muted;
123
- this.doubleCheck = props.doubleCheck;
124
- this.tags = props.tags;
125
- this.runtimeId = props.runtimeId;
126
- this.locations = props.locations ?? [];
127
- this.privateLocations = props.privateLocations;
128
- this.concurrency = props.concurrency;
129
- // `frequency` is not a CheckGroup resource property. Not present in synthesize()
130
- this.frequency = props.frequency;
131
- this.apiCheckDefaults = { ...defaultApiCheckDefaults, ...props.apiCheckDefaults };
132
- this.alertSettings = props.alertEscalationPolicy;
133
- this.useGlobalAlertSettings = !this.alertSettings;
134
- this.environmentVariables = props.environmentVariables ?? [];
135
- this.environmentVariables.forEach(ev => {
136
- // only empty string is checked because the KeyValuePair.value doesn't allow undefined or null.
137
- if (ev.value === '') {
138
- throw new Error(`Environment variable "${ev.key}" from check group "${logicalId}" is not allowed to be empty`);
139
- }
140
- });
141
- this.alertChannels = props.alertChannels ?? [];
142
- this.localSetupScript = props.localSetupScript;
143
- this.localTearDownScript = props.localTearDownScript;
144
- this.retryStrategy = props.retryStrategy;
145
- this.runParallel = props.runParallel;
146
- // `browserChecks` is not a CheckGroup resource property. Not present in synthesize()
147
- this.browserChecks = props.browserChecks;
148
- const fileAbsolutePath = project_1.Session.checkFileAbsolutePath;
149
- if (props.browserChecks?.testMatch) {
150
- this.__addChecks(fileAbsolutePath, props.browserChecks.testMatch, constants_1.default.BROWSER);
151
- }
152
- this.multiStepChecks = props.multiStepChecks;
153
- if (props.multiStepChecks?.testMatch) {
154
- this.__addChecks(fileAbsolutePath, props.multiStepChecks.testMatch, constants_1.default.MULTI_STEP);
155
- }
156
- project_1.Session.registerConstruct(this);
157
- this.__addSubscriptions();
158
- this.__addPrivateLocationGroupAssignments();
159
- }
160
- static fromId(id) {
161
- return new CheckGroupRef(`check-group-${id}`, id);
162
- }
163
- __addChecks(fileAbsolutePath, testMatch, checkType) {
164
- const parent = path.dirname(fileAbsolutePath);
165
- const matched = glob_1.glob.sync(testMatch, { nodir: true, cwd: parent });
166
- for (const match of matched) {
167
- const filepath = path.join(parent, match);
168
- const props = {
169
- group: this,
170
- name: match,
171
- code: {
172
- entrypoint: filepath,
173
- },
174
- // the browserChecks props inherited from the group are applied in BrowserCheck.constructor()
175
- };
176
- const checkLogicalId = (0, util_1.pathToPosix)(path.relative(project_1.Session.basePath, filepath));
177
- if (checkType === constants_1.default.BROWSER) {
178
- new browser_check_1.BrowserCheck(checkLogicalId, props);
179
- }
180
- else {
181
- new multi_step_check_1.MultiStepCheck(checkLogicalId, props);
182
- }
183
- }
184
- }
185
- __addSubscriptions() {
186
- if (!this.alertChannels) {
187
- return;
188
- }
189
- for (const alertChannel of this.alertChannels) {
190
- const subscription = new alert_channel_subscription_1.AlertChannelSubscription(`check-group-alert-channel-subscription#${this.logicalId}#${alertChannel.logicalId}`, {
191
- alertChannelId: ref_1.Ref.from(alertChannel.logicalId),
192
- groupId: ref_1.Ref.from(this.logicalId),
193
- activated: true,
194
- });
195
- }
196
- }
197
- __addPrivateLocationGroupAssignments() {
198
- if (!this.privateLocations) {
199
- return;
200
- }
201
- for (const privateLocation of this.privateLocations) {
202
- // slugName strings are processed in loadAllPrivateLocations()
203
- if (typeof privateLocation === 'string') {
204
- continue;
205
- }
206
- // use private location assignment for instances
207
- const assignment = new private_location_group_assignment_1.PrivateLocationGroupAssignment(`private-location-group-assignment#${this.logicalId}#${privateLocation.logicalId}`, {
208
- privateLocationId: ref_1.Ref.from(privateLocation.logicalId),
209
- groupId: ref_1.Ref.from(this.logicalId),
210
- });
211
- }
212
- }
213
- getCheckDefaults() {
214
- // TODO: investigate if make sense to add all other check's properties
215
- return {
216
- frequency: this.frequency,
217
- };
218
- }
219
- getBrowserCheckDefaults() {
220
- // TODO: investigate if make sense to add all other browser-check's properties
221
- return {
222
- frequency: this.browserChecks?.frequency,
223
- };
224
- }
225
- getMultiStepCheckDefaults() {
226
- return {
227
- frequency: this.multiStepChecks?.frequency,
228
- };
229
- }
230
- synthesize() {
231
- return {
232
- name: this.name,
233
- activated: this.activated,
234
- muted: this.muted,
235
- tags: this.tags,
236
- locations: this.locations,
237
- runtimeId: this.runtimeId,
238
- // private-location instances are assigned with loadAllPrivateLocations()
239
- privateLocations: undefined,
240
- concurrency: this.concurrency,
241
- localSetupScript: this.localSetupScript,
242
- localTearDownScript: this.localTearDownScript,
243
- apiCheckDefaults: this.apiCheckDefaults,
244
- environmentVariables: this.environmentVariables,
245
- // The backend doesn't actually support the `NO_RETRIES` type, it uses `null` instead.
246
- retryStrategy: this.retryStrategy?.type === 'NO_RETRIES'
247
- ? null
248
- : this.retryStrategy,
249
- // When `retryStrategy: NO_RETRIES` and `doubleCheck: undefined`, we want to let the user disable all retries.
250
- // The backend has a Joi default of `doubleCheck: true`, though, so we need special handling for this case.
251
- doubleCheck: this.doubleCheck === undefined && this.retryStrategy?.type === 'NO_RETRIES'
252
- ? false
253
- : this.doubleCheck,
254
- runParallel: this.runParallel,
255
- alertSettings: this.alertSettings,
256
- useGlobalAlertSettings: this.useGlobalAlertSettings,
257
- };
258
- }
259
- }
260
- exports.CheckGroup = CheckGroup;
17
+ exports.CheckGroup = void 0;
18
+ __exportStar(require("./check-group-v1"), exports);
19
+ __exportStar(require("./check-group-v2"), exports);
20
+ __exportStar(require("./check-group-ref"), exports);
21
+ var check_group_v1_1 = require("./check-group-v1");
22
+ Object.defineProperty(exports, "CheckGroup", { enumerable: true, get: function () { return check_group_v1_1.CheckGroupV1; } });
261
23
  //# sourceMappingURL=check-group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-group.js","sourceRoot":"","sources":["../../src/constructs/check-group.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;AAC5B,+BAA2B;AAC3B,+BAA2B;AAC3B,uCAAmC;AACnC,2CAAuC;AACvC,mDAA8C;AAG9C,6EAAuE;AAEvE,2FAAoF;AAGpF,2CAA8C;AAK9C,yDAAmD;AACnD,6DAAqC;AAErC,MAAM,uBAAuB,GAA0B;IACrD,OAAO,EAAE,EAAE;IACX,eAAe,EAAE,EAAE;IACnB,GAAG,EAAE,EAAE;IACP,SAAS,EAAE;QACT,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,EAAE;KACb;CACF,CAAA;AA2FD;;;;GAIG;AACH,MAAa,aAAc,SAAQ,qBAAS;IAC1C,YAAa,SAAiB,EAAE,UAAyB;QACvD,KAAK,CA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,CAAC,aAAa,EAAE,IAAI,KAAK,YAAY;gBACtF,CAAC,CAAC,KAAK;gBACP,CAAC,CAAC,IAAI,CAAC,WAAW;YACpB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB;SACpD,CAAA;IACH,CAAC;;AA5LH,gCA6LC"}
1
+ {"version":3,"file":"check-group.js","sourceRoot":"","sources":["../../src/constructs/check-group.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAAgC;AAChC,mDAAgC;AAChC,oDAAiC;AAEjC,mDAGyB;AAFvB,4GAAA,YAAY,OAAc"}
@@ -4,7 +4,7 @@ import { Construct } from './construct';
4
4
  import { AlertChannel, AlertChannelRef } from './alert-channel';
5
5
  import { EnvironmentVariable } from './environment-variable';
6
6
  import type { Region } from '..';
7
- import type { CheckGroup, CheckGroupRef } from './check-group';
7
+ import type { CheckGroupV1, CheckGroupV2, CheckGroupRef } from './check-group';
8
8
  import { PrivateLocation, PrivateLocationRef } from './private-location';
9
9
  import { RetryStrategy } from './retry-strategy';
10
10
  import { AlertEscalation } from './alert-escalation-policy';
@@ -70,7 +70,7 @@ export interface CheckProps {
70
70
  /**
71
71
  * The CheckGroup that this check is part of.
72
72
  */
73
- group?: CheckGroup | CheckGroupRef;
73
+ group?: CheckGroupV1 | CheckGroupV2 | CheckGroupRef;
74
74
  /**
75
75
  * List of alert channels to notify when the check fails or recovers.
76
76
  * If you don't set at least one, we won't be able to alert you in case something goes wrong with your check.
@@ -0,0 +1,33 @@
1
+ import { Construct } from './construct';
2
+ import { Diagnostic, Diagnostics, ErrorDiagnostic, WarningDiagnostic } from './diagnostics';
3
+ export declare class InvalidPropertyValueDiagnostic extends ErrorDiagnostic {
4
+ property: string;
5
+ constructor(property: string, error: Error);
6
+ }
7
+ export declare class DeprecatedPropertyDiagnostic extends WarningDiagnostic {
8
+ property: string;
9
+ constructor(property: string, error: Error);
10
+ }
11
+ export declare class RemovedPropertyDiagnostic extends ErrorDiagnostic {
12
+ property: string;
13
+ constructor(property: string, error: Error);
14
+ }
15
+ export declare class DeprecatedConstructDiagnostic extends WarningDiagnostic {
16
+ construct: string;
17
+ constructor(construct: string, error: Error);
18
+ }
19
+ export declare class UnsupportedRuntimeFeatureDiagnostic extends ErrorDiagnostic {
20
+ runtimeId: string;
21
+ constructor(runtimeId: string, error: Error);
22
+ }
23
+ export declare class ConstructDiagnostic extends Diagnostic {
24
+ underlying: Diagnostic;
25
+ constructor(construct: Construct, underlying: Diagnostic);
26
+ isFatal(): boolean;
27
+ isBenign(): boolean;
28
+ }
29
+ export declare class ConstructDiagnostics extends Diagnostics {
30
+ construct: Construct;
31
+ constructor(construct: Construct);
32
+ add(diagnostic: Diagnostic): void;
33
+ }
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConstructDiagnostics = exports.ConstructDiagnostic = exports.UnsupportedRuntimeFeatureDiagnostic = exports.DeprecatedConstructDiagnostic = exports.RemovedPropertyDiagnostic = exports.DeprecatedPropertyDiagnostic = exports.InvalidPropertyValueDiagnostic = void 0;
4
+ const diagnostics_1 = require("./diagnostics");
5
+ class InvalidPropertyValueDiagnostic extends diagnostics_1.ErrorDiagnostic {
6
+ property;
7
+ constructor(property, error) {
8
+ super({
9
+ title: `Invalid property value`,
10
+ message: `The value provided for property "${property}" is not valid.` +
11
+ `\n\n` +
12
+ `Reason: ${error.message}`,
13
+ error,
14
+ });
15
+ this.property = property;
16
+ }
17
+ }
18
+ exports.InvalidPropertyValueDiagnostic = InvalidPropertyValueDiagnostic;
19
+ class DeprecatedPropertyDiagnostic extends diagnostics_1.WarningDiagnostic {
20
+ property;
21
+ constructor(property, error) {
22
+ super({
23
+ title: `Use of deprecated property`,
24
+ message: `Property "${property}" is deprecated and will eventually be removed.` +
25
+ `\n\n` +
26
+ `Hint: ${error.message}`,
27
+ });
28
+ this.property = property;
29
+ }
30
+ }
31
+ exports.DeprecatedPropertyDiagnostic = DeprecatedPropertyDiagnostic;
32
+ class RemovedPropertyDiagnostic extends diagnostics_1.ErrorDiagnostic {
33
+ property;
34
+ constructor(property, error) {
35
+ super({
36
+ title: `Use of removed property`,
37
+ message: `Property "${property}" has been removed.` +
38
+ `\n\n` +
39
+ `Hint: ${error.message}`,
40
+ error,
41
+ });
42
+ this.property = property;
43
+ }
44
+ }
45
+ exports.RemovedPropertyDiagnostic = RemovedPropertyDiagnostic;
46
+ class DeprecatedConstructDiagnostic extends diagnostics_1.WarningDiagnostic {
47
+ construct;
48
+ constructor(construct, error) {
49
+ super({
50
+ title: `Use of deprecated Construct`,
51
+ message: `Construct "${construct}" is deprecated and will eventually be removed.` +
52
+ `\n\n` +
53
+ `Hint: ${error.message}`,
54
+ });
55
+ this.construct = construct;
56
+ }
57
+ }
58
+ exports.DeprecatedConstructDiagnostic = DeprecatedConstructDiagnostic;
59
+ class UnsupportedRuntimeFeatureDiagnostic extends diagnostics_1.ErrorDiagnostic {
60
+ runtimeId;
61
+ constructor(runtimeId, error) {
62
+ super({
63
+ title: `Use of unsupported runtime feature`,
64
+ message: `Runtime "${runtimeId}" does not support the requested feature.` +
65
+ `\n\n` +
66
+ `Missing feature: ${error.message}`,
67
+ error,
68
+ });
69
+ this.runtimeId = runtimeId;
70
+ }
71
+ }
72
+ exports.UnsupportedRuntimeFeatureDiagnostic = UnsupportedRuntimeFeatureDiagnostic;
73
+ class ConstructDiagnostic extends diagnostics_1.Diagnostic {
74
+ underlying;
75
+ constructor(construct, underlying) {
76
+ super({
77
+ title: `[${construct.type}:${construct.logicalId}] ${underlying.title}`,
78
+ message: underlying.message,
79
+ });
80
+ this.underlying = underlying;
81
+ }
82
+ isFatal() {
83
+ return this.underlying.isFatal();
84
+ }
85
+ isBenign() {
86
+ return this.underlying.isBenign();
87
+ }
88
+ }
89
+ exports.ConstructDiagnostic = ConstructDiagnostic;
90
+ class ConstructDiagnostics extends diagnostics_1.Diagnostics {
91
+ construct;
92
+ constructor(construct) {
93
+ super();
94
+ this.construct = construct;
95
+ }
96
+ add(diagnostic) {
97
+ super.add(new ConstructDiagnostic(this.construct, diagnostic));
98
+ }
99
+ }
100
+ exports.ConstructDiagnostics = ConstructDiagnostics;
101
+ //# sourceMappingURL=construct-diagnostics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"construct-diagnostics.js","sourceRoot":"","sources":["../../src/constructs/construct-diagnostics.ts"],"names":[],"mappings":";;;AACA,+CAA2F;AAE3F,MAAa,8BAA+B,SAAQ,6BAAe;IACjE,QAAQ,CAAQ;IAEhB,YAAa,QAAgB,EAAE,KAAY;QACzC,KAAK,CAAC;YACJ,KAAK,EAAE,wBAAwB;YAC/B,OAAO,EACL,oCAAoC,QAAQ,iBAAiB;gBAC7D,MAAM;gBACN,WAAW,KAAK,CAAC,OAAO,EAAE;YAC5B,KAAK;SACN,CAAC,CAAA;QAEF,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;CACF;AAfD,wEAeC;AAED,MAAa,4BAA6B,SAAQ,+BAAiB;IACjE,QAAQ,CAAQ;IAEhB,YAAa,QAAgB,EAAE,KAAY;QACzC,KAAK,CAAC;YACJ,KAAK,EAAE,4BAA4B;YACnC,OAAO,EACL,aAAa,QAAQ,iDAAiD;gBACtE,MAAM;gBACN,SAAS,KAAK,CAAC,OAAO,EAAE;SAC3B,CAAC,CAAA;QAEF,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;CACF;AAdD,oEAcC;AAED,MAAa,yBAA0B,SAAQ,6BAAe;IAC5D,QAAQ,CAAQ;IAEhB,YAAa,QAAgB,EAAE,KAAY;QACzC,KAAK,CAAC;YACJ,KAAK,EAAE,yBAAyB;YAChC,OAAO,EACL,aAAa,QAAQ,qBAAqB;gBAC1C,MAAM;gBACN,SAAS,KAAK,CAAC,OAAO,EAAE;YAC1B,KAAK;SACN,CAAC,CAAA;Q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D,SAAS,CAAW;IAEpB,YAAa,SAAoB;QAC/B,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,GAAG,CAAE,UAAsB;QACzB,KAAK,CAAC,GAAG,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAA;IAChE,CAAC;CACF;AAXD,oDAWC"}
@@ -1,17 +1,51 @@
1
+ import { Diagnostics } from './diagnostics';
1
2
  import { Ref } from './ref';
2
- export declare abstract class Construct {
3
+ export interface ConstructLike {
4
+ type: string;
5
+ logicalId: string;
6
+ }
7
+ export interface Bundle {
8
+ synthesize(): any | null;
9
+ }
10
+ export interface Validate {
11
+ validate(diagnostics: Diagnostics): Promise<void>;
12
+ }
13
+ export declare abstract class Construct implements Validate, Bundle {
3
14
  type: string;
4
15
  logicalId: string;
5
16
  physicalId?: string | number;
6
17
  member: boolean;
18
+ checkFileAbsolutePath?: string;
7
19
  constructor(type: string, logicalId: string, physicalId?: string | number, member?: boolean);
8
20
  ref(): Ref;
9
21
  allowInChecklyConfig(): boolean;
22
+ resolveContentFilePath(contentPath: string): string;
23
+ /**
24
+ * Validates the Construct, allowing multiple issues to be brought into
25
+ * attention via the provided Diagnostics.
26
+ *
27
+ * @param diagnostics The Diagnostics instance that any issues should be added to.
28
+ * @returns A Promise that resolves when validation is complete.
29
+ */
30
+ validate(diagnostics: Diagnostics): Promise<void>;
31
+ /**
32
+ * Bundles the Construct into a representation that can be synthesized. By
33
+ * default, that representation is the Construct itself, but a different
34
+ * representation may also be returned.
35
+ *
36
+ * Can be used to perform heavier tasks that the Construct constructor may
37
+ * not be suitable for.
38
+ *
39
+ * @returns A Promise that resolves to the bundled representation of the Construct.
40
+ */
41
+ bundle(): Promise<Bundle>;
10
42
  abstract synthesize(): any | null;
11
43
  }
12
44
  export interface Entrypoint {
13
45
  entrypoint: string;
14
46
  }
47
+ export declare function isEntrypoint(value: any): value is Entrypoint;
15
48
  export interface Content {
16
49
  content: string;
17
50
  }
51
+ export declare function isContent(value: any): value is Content;
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Construct = void 0;
6
+ exports.isContent = exports.isEntrypoint = exports.Construct = void 0;
7
+ const node_path_1 = __importDefault(require("node:path"));
4
8
  const project_1 = require("./project");
5
9
  const ref_1 = require("./ref");
6
10
  class Construct {
@@ -8,11 +12,13 @@ class Construct {
8
12
  logicalId;
9
13
  physicalId;
10
14
  member;
15
+ checkFileAbsolutePath;
11
16
  constructor(type, logicalId, physicalId, member) {
12
17
  this.logicalId = logicalId;
13
18
  this.type = type;
14
19
  this.physicalId = physicalId;
15
20
  this.member = member ?? true;
21
+ this.checkFileAbsolutePath = project_1.Session.checkFileAbsolutePath;
16
22
  project_1.Session.validateCreateConstruct(this);
17
23
  }
18
24
  ref() {
@@ -21,6 +27,47 @@ class Construct {
21
27
  allowInChecklyConfig() {
22
28
  return false;
23
29
  }
30
+ resolveContentFilePath(contentPath) {
31
+ if (node_path_1.default.isAbsolute(contentPath)) {
32
+ return contentPath;
33
+ }
34
+ if (!this.checkFileAbsolutePath) {
35
+ throw new Error('Internal error: attempting to use relative content file path without checkFileAbsolutePath set');
36
+ }
37
+ return node_path_1.default.join(node_path_1.default.dirname(this.checkFileAbsolutePath), contentPath);
38
+ }
39
+ /**
40
+ * Validates the Construct, allowing multiple issues to be brought into
41
+ * attention via the provided Diagnostics.
42
+ *
43
+ * @param diagnostics The Diagnostics instance that any issues should be added to.
44
+ * @returns A Promise that resolves when validation is complete.
45
+ */
46
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
47
+ async validate(diagnostics) {
48
+ return;
49
+ }
50
+ /**
51
+ * Bundles the Construct into a representation that can be synthesized. By
52
+ * default, that representation is the Construct itself, but a different
53
+ * representation may also be returned.
54
+ *
55
+ * Can be used to perform heavier tasks that the Construct constructor may
56
+ * not be suitable for.
57
+ *
58
+ * @returns A Promise that resolves to the bundled representation of the Construct.
59
+ */
60
+ async bundle() {
61
+ return this;
62
+ }
24
63
  }
25
64
  exports.Construct = Construct;
65
+ function isEntrypoint(value) {
66
+ return 'entrypoint' in Object(value);
67
+ }
68
+ exports.isEntrypoint = isEntrypoint;
69
+ function isContent(value) {
70
+ return 'content' in Object(value);
71
+ }
72
+ exports.isContent = isContent;
26
73
  //# sourceMappingURL=construct.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"construct.js","sourceRoot":"","sources":["../../src/constructs/construct.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AACnC,+BAA2B;AAE3B,MAAsB,SAAS;IAC7B,IAAI,CAAQ;IACZ,SAAS,CAAQ;IACjB,UAAU,CAAgB;IAC1B,MAAM,CAAS;IACf,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,iBAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAA;IACvC,CAAC;IAED,GAAG;QACD,OAAO,SAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACjC,CAAC;IAED,oBAAoB;QAClB,OAAO,KAAK,CAAA;IACd,CAAC;CAGF;AAtBD,8BAsBC"}
1
+ {"version":3,"file":"construct.js","sourceRoot":"","sources":["../../src/constructs/construct.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA4B;AAG5B,uCAAmC;AACnC,+BAA2B;AAe3B,MAAsB,SAAS;IAC7B,IAAI,CAAQ;IACZ,SAAS,CAAQ;IACjB,UAAU,CAAgB;IAC1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nC,OAAO,SAAS,IAAI,MAAM,CAAC,KAAK,CAAC,CAAA;AACnC,CAAC;AAFD,8BAEC"}
@@ -0,0 +1,11 @@
1
+ import { Bundle } from './construct';
2
+ import { Dashboard } from './dashboard';
3
+ export interface DashboardBundleProps {
4
+ customCSS?: string;
5
+ }
6
+ export declare class DashboardBundle implements Bundle {
7
+ dashboard: Dashboard;
8
+ customCSS?: string;
9
+ constructor(dashboard: Dashboard, props: DashboardBundleProps);
10
+ synthesize(): any;
11
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DashboardBundle = void 0;
4
+ class DashboardBundle {
5
+ dashboard;
6
+ customCSS;
7
+ constructor(dashboard, props) {
8
+ this.dashboard = dashboard;
9
+ this.customCSS = props.customCSS;
10
+ }
11
+ synthesize() {
12
+ return {
13
+ ...this.dashboard.synthesize(),
14
+ customCSS: this.customCSS,
15
+ };
16
+ }
17
+ }
18
+ exports.DashboardBundle = DashboardBundle;
19
+ //# sourceMappingURL=dashboard-bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-bundle.js","sourceRoot":"","sources":["../../src/constructs/dashboard-bundle.ts"],"names":[],"mappings":";;;AAOA,MAAa,eAAe;IAC1B,SAAS,CAAW;IACpB,SAAS,CAAS;IAElB,YAAa,SAAoB,EAAE,KAA2B;QAC5D,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;IAClC,CAAC;IAED,UAAU;QACR,OAAO;YACL,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE;YAC9B,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAA;IACH,CAAC;CACF;AAfD,0CAeC"}