@checkly/pulumi 1.1.2 → 2.0.0-alpha.1738251430

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 (54) hide show
  1. package/LICENSE +202 -21
  2. package/README.md +39 -137
  3. package/alertChannel.d.ts +44 -20
  4. package/alertChannel.js +63 -41
  5. package/alertChannel.js.map +1 -1
  6. package/check.d.ts +104 -58
  7. package/check.js +30 -22
  8. package/check.js.map +1 -1
  9. package/checkGroup.d.ts +59 -101
  10. package/checkGroup.js +30 -109
  11. package/checkGroup.js.map +1 -1
  12. package/dashboard.d.ts +90 -10
  13. package/dashboard.js +45 -29
  14. package/dashboard.js.map +1 -1
  15. package/environmentVariable.d.ts +7 -4
  16. package/environmentVariable.js +28 -26
  17. package/environmentVariable.js.map +1 -1
  18. package/getStaticIps.d.ts +50 -0
  19. package/getStaticIps.js +26 -0
  20. package/getStaticIps.js.map +1 -0
  21. package/heartbeatCheck.d.ts +129 -0
  22. package/heartbeatCheck.js +91 -0
  23. package/heartbeatCheck.js.map +1 -0
  24. package/index.d.ts +39 -11
  25. package/index.js +42 -50
  26. package/index.js.map +1 -1
  27. package/maintenanceWindow.d.ts +4 -3
  28. package/maintenanceWindow.js +26 -25
  29. package/maintenanceWindow.js.map +1 -1
  30. package/package.json +7 -7
  31. package/privateLocation.d.ts +2 -3
  32. package/privateLocation.js +26 -25
  33. package/privateLocation.js.map +1 -1
  34. package/provider.js +10 -10
  35. package/provider.js.map +1 -1
  36. package/snippet.d.ts +20 -0
  37. package/snippet.js +39 -19
  38. package/snippet.js.map +1 -1
  39. package/triggerCheck.d.ts +3 -3
  40. package/triggerCheck.js +24 -24
  41. package/triggerCheck.js.map +1 -1
  42. package/triggerCheckGroup.d.ts +3 -3
  43. package/triggerCheckGroup.js +24 -24
  44. package/triggerCheckGroup.js.map +1 -1
  45. package/types/index.js.map +1 -1
  46. package/types/input.d.ts +277 -9
  47. package/types/input.js.map +1 -1
  48. package/types/output.d.ts +283 -15
  49. package/types/output.js.map +1 -1
  50. package/utilities.d.ts +4 -0
  51. package/utilities.js +46 -2
  52. package/utilities.js.map +1 -1
  53. package/package.json.bak +0 -29
  54. package/scripts/install-pulumi-plugin.js +0 -26
package/types/output.d.ts CHANGED
@@ -1,5 +1,18 @@
1
- import { output as outputs } from "../types";
1
+ import * as outputs from "../types/output";
2
+ export interface AlertChannelCall {
3
+ /**
4
+ * The name of this alert channel
5
+ */
6
+ name: string;
7
+ /**
8
+ * The mobile number to receive the alerts
9
+ */
10
+ number: string;
11
+ }
2
12
  export interface AlertChannelEmail {
13
+ /**
14
+ * The email address of this email alert channel.
15
+ */
3
16
  address: string;
4
17
  }
5
18
  export interface AlertChannelOpsgenie {
@@ -14,91 +27,183 @@ export interface AlertChannelPagerduty {
14
27
  serviceName?: string;
15
28
  }
16
29
  export interface AlertChannelSlack {
30
+ /**
31
+ * The name of the alert's Slack channel
32
+ */
17
33
  channel: string;
34
+ /**
35
+ * The Slack webhook URL
36
+ */
18
37
  url: string;
19
38
  }
20
39
  export interface AlertChannelSms {
40
+ /**
41
+ * The name of this alert channel
42
+ */
21
43
  name: string;
44
+ /**
45
+ * The mobile number to receive the alerts
46
+ */
22
47
  number: string;
23
48
  }
24
49
  export interface AlertChannelWebhook {
25
50
  headers: {
26
- [key: string]: any;
51
+ [key: string]: string;
27
52
  };
53
+ /**
54
+ * (Default `POST`)
55
+ */
28
56
  method?: string;
29
57
  name: string;
30
58
  queryParameters: {
31
- [key: string]: any;
59
+ [key: string]: string;
32
60
  };
33
61
  template?: string;
34
62
  url: string;
35
63
  webhookSecret?: string;
64
+ /**
65
+ * Type of the webhook. Possible values are 'WEBHOOK*DISCORD', 'WEBHOOK*FIREHYDRANT', 'WEBHOOK*GITLAB*ALERT', 'WEBHOOK*SPIKESH', 'WEBHOOK*SPLUNK', 'WEBHOOK*MSTEAMS' and 'WEBHOOK*TELEGRAM'.
66
+ */
67
+ webhookType?: string;
36
68
  }
37
69
  export interface CheckAlertChannelSubscription {
38
70
  activated: boolean;
39
71
  channelId: number;
40
72
  }
41
73
  export interface CheckAlertSettings {
74
+ /**
75
+ * Determines what type of escalation to use. Possible values are `RUN_BASED` or `TIME_BASED`.
76
+ */
42
77
  escalationType?: string;
43
- reminders?: outputs.CheckAlertSettingsReminder[];
44
- runBasedEscalations?: outputs.CheckAlertSettingsRunBasedEscalation[];
78
+ parallelRunFailureThresholds: outputs.CheckAlertSettingsParallelRunFailureThreshold[];
79
+ reminders: outputs.CheckAlertSettingsReminder[];
80
+ runBasedEscalations: outputs.CheckAlertSettingsRunBasedEscalation[];
45
81
  /**
46
- * @deprecated The property `ssl_certificates` is deprecated and it's ignored by the Checkly Public API. It will be removed in a future version.
82
+ * @deprecated This property is deprecated and it's ignored by the Checkly Public API. It will be removed in a future version.
47
83
  */
48
84
  sslCertificates?: outputs.CheckAlertSettingsSslCertificate[];
49
- timeBasedEscalations?: outputs.CheckAlertSettingsTimeBasedEscalation[];
85
+ timeBasedEscalations: outputs.CheckAlertSettingsTimeBasedEscalation[];
86
+ }
87
+ export interface CheckAlertSettingsParallelRunFailureThreshold {
88
+ /**
89
+ * Applicable only for checks scheduled in parallel in multiple locations.
90
+ */
91
+ enabled?: boolean;
92
+ /**
93
+ * Possible values are `10`, `20`, `30`, `40`, `50`, `60`, `70`, `80`, `100`, and `100`. (Default `10`).
94
+ */
95
+ percentage?: number;
50
96
  }
51
97
  export interface CheckAlertSettingsReminder {
98
+ /**
99
+ * How many reminders to send out after the initial alert notification. Possible values are `0`, `1`, `2`, `3`, `4`, `5`, and `100000`
100
+ */
52
101
  amount?: number;
102
+ /**
103
+ * Possible values are `5`, `10`, `15`, and `30`. (Default `5`).
104
+ */
53
105
  interval?: number;
54
106
  }
55
107
  export interface CheckAlertSettingsRunBasedEscalation {
108
+ /**
109
+ * After how many failed consecutive check runs an alert notification should be sent. Possible values are between 1 and 5. (Default `1`).
110
+ */
56
111
  failedRunThreshold?: number;
57
112
  }
58
113
  export interface CheckAlertSettingsSslCertificate {
114
+ /**
115
+ * How long before SSL certificate expiry to send alerts. Possible values `3`, `7`, `14`, `30`. (Default `3`).
116
+ */
59
117
  alertThreshold?: number;
118
+ /**
119
+ * Determines if alert notifications should be sent for expiring SSL certificates. Possible values `true`, and `false`. (Default `false`).
120
+ */
60
121
  enabled?: boolean;
61
122
  }
62
123
  export interface CheckAlertSettingsTimeBasedEscalation {
124
+ /**
125
+ * After how many minutes after a check starts failing an alert should be sent. Possible values are `5`, `10`, `15`, and `30`. (Default `5`).
126
+ */
63
127
  minutesFailingThreshold?: number;
64
128
  }
129
+ export interface CheckEnvironmentVariable {
130
+ key: string;
131
+ locked?: boolean;
132
+ secret?: boolean;
133
+ value: string;
134
+ }
65
135
  export interface CheckGroupAlertChannelSubscription {
66
136
  activated: boolean;
67
137
  channelId: number;
68
138
  }
69
139
  export interface CheckGroupAlertSettings {
140
+ /**
141
+ * Determines what type of escalation to use. Possible values are `RUN_BASED` or `TIME_BASED`.
142
+ */
70
143
  escalationType?: string;
71
- reminders?: outputs.CheckGroupAlertSettingsReminder[];
72
- runBasedEscalations?: outputs.CheckGroupAlertSettingsRunBasedEscalation[];
144
+ parallelRunFailureThresholds: outputs.CheckGroupAlertSettingsParallelRunFailureThreshold[];
145
+ reminders: outputs.CheckGroupAlertSettingsReminder[];
146
+ runBasedEscalations: outputs.CheckGroupAlertSettingsRunBasedEscalation[];
73
147
  /**
74
- * @deprecated The property `ssl_certificates` is deprecated and it's ignored by the Checkly Public API. It will be removed in a future version.
148
+ * @deprecated This property is deprecated and it's ignored by the Checkly Public API. It will be removed in a future version.
75
149
  */
76
150
  sslCertificates?: outputs.CheckGroupAlertSettingsSslCertificate[];
77
- timeBasedEscalations?: outputs.CheckGroupAlertSettingsTimeBasedEscalation[];
151
+ timeBasedEscalations: outputs.CheckGroupAlertSettingsTimeBasedEscalation[];
152
+ }
153
+ export interface CheckGroupAlertSettingsParallelRunFailureThreshold {
154
+ /**
155
+ * Applicable only for checks scheduled in parallel in multiple locations.
156
+ */
157
+ enabled?: boolean;
158
+ /**
159
+ * Possible values are `10`, `20`, `30`, `40`, `50`, `60`, `70`, `80`, `100`, and `100`. (Default `10`).
160
+ */
161
+ percentage?: number;
78
162
  }
79
163
  export interface CheckGroupAlertSettingsReminder {
164
+ /**
165
+ * How many reminders to send out after the initial alert notification. Possible values are `0`, `1`, `2`, `3`, `4`, `5`, and `100000`
166
+ */
80
167
  amount?: number;
168
+ /**
169
+ * Possible values are `5`, `10`, `15`, and `30`. (Default `5`).
170
+ */
81
171
  interval?: number;
82
172
  }
83
173
  export interface CheckGroupAlertSettingsRunBasedEscalation {
174
+ /**
175
+ * After how many failed consecutive check runs an alert notification should be sent. Possible values are between 1 and 5. (Default `1`).
176
+ */
84
177
  failedRunThreshold?: number;
85
178
  }
86
179
  export interface CheckGroupAlertSettingsSslCertificate {
180
+ /**
181
+ * At what moment in time to start alerting on SSL certificates. Possible values `3`, `7`, `14`, `30`. (Default `3`).
182
+ */
87
183
  alertThreshold?: number;
184
+ /**
185
+ * Determines if alert notifications should be sent for expiring SSL certificates.
186
+ */
88
187
  enabled?: boolean;
89
188
  }
90
189
  export interface CheckGroupAlertSettingsTimeBasedEscalation {
190
+ /**
191
+ * After how many minutes after a check starts failing an alert should be sent. Possible values are `5`, `10`, `15`, and `30`. (Default `5`).
192
+ */
91
193
  minutesFailingThreshold?: number;
92
194
  }
93
195
  export interface CheckGroupApiCheckDefaults {
94
196
  assertions?: outputs.CheckGroupApiCheckDefaultsAssertion[];
95
197
  basicAuth: outputs.CheckGroupApiCheckDefaultsBasicAuth;
96
198
  headers: {
97
- [key: string]: any;
199
+ [key: string]: string;
98
200
  };
99
201
  queryParameters: {
100
- [key: string]: any;
202
+ [key: string]: string;
101
203
  };
204
+ /**
205
+ * The base url for this group which you can reference with the `GROUP_BASE_URL` variable in all group checks.
206
+ */
102
207
  url: string;
103
208
  }
104
209
  /**
@@ -106,8 +211,14 @@ export interface CheckGroupApiCheckDefaults {
106
211
  */
107
212
  export declare function checkGroupApiCheckDefaultsProvideDefaults(val: CheckGroupApiCheckDefaults): CheckGroupApiCheckDefaults;
108
213
  export interface CheckGroupApiCheckDefaultsAssertion {
214
+ /**
215
+ * The type of comparison to be executed between expected and actual value of the assertion. Possible values `EQUALS`, `NOT_EQUALS`, `HAS_KEY`, `NOT_HAS_KEY`, `HAS_VALUE`, `NOT_HAS_VALUE`, `IS_EMPTY`, `NOT_EMPTY`, `GREATER_THAN`, `LESS_THAN`, `CONTAINS`, `NOT_CONTAINS`, `IS_NULL`, and `NOT_NULL`.
216
+ */
109
217
  comparison: string;
110
218
  property?: string;
219
+ /**
220
+ * The source of the asserted value. Possible values `STATUS_CODE`, `JSON_BODY`, `HEADERS`, `TEXT_BODY`, and `RESPONSE_TIME`.
221
+ */
111
222
  source: string;
112
223
  target: string;
113
224
  }
@@ -115,25 +226,78 @@ export interface CheckGroupApiCheckDefaultsBasicAuth {
115
226
  password: string;
116
227
  username: string;
117
228
  }
229
+ export interface CheckGroupEnvironmentVariable {
230
+ key: string;
231
+ locked?: boolean;
232
+ secret?: boolean;
233
+ value: string;
234
+ }
235
+ export interface CheckGroupRetryStrategy {
236
+ /**
237
+ * The number of seconds to wait before the first retry attempt.
238
+ */
239
+ baseBackoffSeconds?: number;
240
+ /**
241
+ * The total amount of time to continue retrying the check (maximum 600 seconds).
242
+ */
243
+ maxDurationSeconds?: number;
244
+ /**
245
+ * The maximum number of times to retry the check. Value must be between 1 and 10.
246
+ */
247
+ maxRetries?: number;
248
+ /**
249
+ * Whether retries should be run in the same region as the initial check run.
250
+ */
251
+ sameRegion?: boolean;
252
+ /**
253
+ * Determines which type of retry strategy to use. Possible values are `FIXED`, `LINEAR`, or `EXPONENTIAL`.
254
+ */
255
+ type: string;
256
+ }
118
257
  export interface CheckRequest {
258
+ /**
259
+ * A request can have multiple assertions.
260
+ */
119
261
  assertions?: outputs.CheckRequestAssertion[];
262
+ /**
263
+ * Set up HTTP basic authentication (username & password).
264
+ */
120
265
  basicAuth: outputs.CheckRequestBasicAuth;
266
+ /**
267
+ * The body of the request.
268
+ */
121
269
  body?: string;
270
+ /**
271
+ * The `Content-Type` header of the request. Possible values `NONE`, `JSON`, `FORM`, `RAW`, and `GRAPHQL`.
272
+ */
122
273
  bodyType?: string;
123
274
  followRedirects?: boolean;
124
275
  headers: {
125
- [key: string]: any;
276
+ [key: string]: string;
126
277
  };
278
+ /**
279
+ * IP Family to be used when executing the api check. The value can be either IPv4 or IPv6.
280
+ */
281
+ ipFamily?: string;
282
+ /**
283
+ * The HTTP method to use for this API check. Possible values are `GET`, `POST`, `PUT`, `HEAD`, `DELETE`, `PATCH`. (Default `GET`).
284
+ */
127
285
  method?: string;
128
286
  queryParameters: {
129
- [key: string]: any;
287
+ [key: string]: string;
130
288
  };
131
289
  skipSsl?: boolean;
132
290
  url: string;
133
291
  }
134
292
  export interface CheckRequestAssertion {
293
+ /**
294
+ * The type of comparison to be executed between expected and actual value of the assertion. Possible values `EQUALS`, `NOT_EQUALS`, `HAS_KEY`, `NOT_HAS_KEY`, `HAS_VALUE`, `NOT_HAS_VALUE`, `IS_EMPTY`, `NOT_EMPTY`, `GREATER_THAN`, `LESS_THAN`, `CONTAINS`, `NOT_CONTAINS`, `IS_NULL`, and `NOT_NULL`.
295
+ */
135
296
  comparison: string;
136
297
  property?: string;
298
+ /**
299
+ * The source of the asserted value. Possible values `STATUS_CODE`, `JSON_BODY`, `HEADERS`, `TEXT_BODY`, and `RESPONSE_TIME`.
300
+ */
137
301
  source: string;
138
302
  target?: string;
139
303
  }
@@ -141,3 +305,107 @@ export interface CheckRequestBasicAuth {
141
305
  password: string;
142
306
  username: string;
143
307
  }
308
+ export interface CheckRetryStrategy {
309
+ /**
310
+ * The number of seconds to wait before the first retry attempt.
311
+ */
312
+ baseBackoffSeconds?: number;
313
+ /**
314
+ * The total amount of time to continue retrying the check (maximum 600 seconds).
315
+ */
316
+ maxDurationSeconds?: number;
317
+ /**
318
+ * The maximum number of times to retry the check. Value must be between 1 and 10.
319
+ */
320
+ maxRetries?: number;
321
+ /**
322
+ * Whether retries should be run in the same region as the initial check run.
323
+ */
324
+ sameRegion?: boolean;
325
+ /**
326
+ * Determines which type of retry strategy to use. Possible values are `FIXED`, `LINEAR`, or `EXPONENTIAL`.
327
+ */
328
+ type: string;
329
+ }
330
+ export interface HeartbeatCheckAlertChannelSubscription {
331
+ activated: boolean;
332
+ channelId: number;
333
+ }
334
+ export interface HeartbeatCheckAlertSettings {
335
+ /**
336
+ * Determines what type of escalation to use. Possible values are `RUN_BASED` or `TIME_BASED`.
337
+ */
338
+ escalationType?: string;
339
+ parallelRunFailureThresholds: outputs.HeartbeatCheckAlertSettingsParallelRunFailureThreshold[];
340
+ reminders: outputs.HeartbeatCheckAlertSettingsReminder[];
341
+ runBasedEscalations: outputs.HeartbeatCheckAlertSettingsRunBasedEscalation[];
342
+ /**
343
+ * @deprecated This property is deprecated and it's ignored by the Checkly Public API. It will be removed in a future version.
344
+ */
345
+ sslCertificates?: outputs.HeartbeatCheckAlertSettingsSslCertificate[];
346
+ timeBasedEscalations: outputs.HeartbeatCheckAlertSettingsTimeBasedEscalation[];
347
+ }
348
+ export interface HeartbeatCheckAlertSettingsParallelRunFailureThreshold {
349
+ /**
350
+ * Applicable only for checks scheduled in parallel in multiple locations.
351
+ */
352
+ enabled?: boolean;
353
+ /**
354
+ * Possible values are `10`, `20`, `30`, `40`, `50`, `60`, `70`, `80`, `100`, and `100`. (Default `10`).
355
+ */
356
+ percentage?: number;
357
+ }
358
+ export interface HeartbeatCheckAlertSettingsReminder {
359
+ /**
360
+ * How many reminders to send out after the initial alert notification. Possible values are `0`, `1`, `2`, `3`, `4`, `5`, and `100000`
361
+ */
362
+ amount?: number;
363
+ /**
364
+ * Possible values are `5`, `10`, `15`, and `30`. (Default `5`).
365
+ */
366
+ interval?: number;
367
+ }
368
+ export interface HeartbeatCheckAlertSettingsRunBasedEscalation {
369
+ /**
370
+ * After how many failed consecutive check runs an alert notification should be sent. Possible values are between 1 and 5. (Default `1`).
371
+ */
372
+ failedRunThreshold?: number;
373
+ }
374
+ export interface HeartbeatCheckAlertSettingsSslCertificate {
375
+ /**
376
+ * How long before SSL certificate expiry to send alerts. Possible values `3`, `7`, `14`, `30`. (Default `3`).
377
+ */
378
+ alertThreshold?: number;
379
+ /**
380
+ * Determines if alert notifications should be sent for expiring SSL certificates. Possible values `true`, and `false`. (Default `false`).
381
+ */
382
+ enabled?: boolean;
383
+ }
384
+ export interface HeartbeatCheckAlertSettingsTimeBasedEscalation {
385
+ /**
386
+ * After how many minutes after a check starts failing an alert should be sent. Possible values are `5`, `10`, `15`, and `30`. (Default `5`).
387
+ */
388
+ minutesFailingThreshold?: number;
389
+ }
390
+ export interface HeartbeatCheckHeartbeat {
391
+ /**
392
+ * How long Checkly should wait before triggering any alerts when a ping does not arrive within the set period.
393
+ */
394
+ grace: number;
395
+ /**
396
+ * Possible values `seconds`, `minutes`, `hours` and `days`.
397
+ */
398
+ graceUnit: string;
399
+ /**
400
+ * How often you expect a ping to the ping URL.
401
+ */
402
+ period: number;
403
+ /**
404
+ * Possible values `seconds`, `minutes`, `hours` and `days`.
405
+ */
406
+ periodUnit: string;
407
+ /**
408
+ * Custom token to generate your ping URL. Checkly will expect a ping to `https://ping.checklyhq.com/[PING_TOKEN]`.
409
+ */
410
+ pingToken: string;
411
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"output.js","sourceRoot":"","sources":["../../types/output.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAuHjF;;GAEG;AACH,SAAgB,yCAAyC,CAAC,GAA+B;;IACrF,uCACO,GAAG,KACN,GAAG,EAAE,MAAA,CAAC,GAAG,CAAC,GAAG,CAAC,mCAAI,EAAE,IACtB;AACN,CAAC;AALD,8FAKC"}
1
+ {"version":3,"file":"output.js","sourceRoot":"","sources":["../../types/output.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAqOjF;;GAEG;AACH,SAAgB,yCAAyC,CAAC,GAA+B;;IACrF,uCACO,GAAG,KACN,GAAG,EAAE,MAAA,CAAC,GAAG,CAAC,GAAG,CAAC,mCAAI,EAAE,IACtB;AACN,CAAC;AALD,8FAKC"}
package/utilities.d.ts CHANGED
@@ -1,4 +1,8 @@
1
+ import * as pulumi from "@pulumi/pulumi";
1
2
  export declare function getEnv(...vars: string[]): string | undefined;
2
3
  export declare function getEnvBoolean(...vars: string[]): boolean | undefined;
3
4
  export declare function getEnvNumber(...vars: string[]): number | undefined;
4
5
  export declare function getVersion(): string;
6
+ export declare function callAsync<T>(tok: string, props: pulumi.Inputs, res?: pulumi.Resource, opts?: {
7
+ property?: string;
8
+ }): Promise<T>;
package/utilities.js CHANGED
@@ -1,8 +1,18 @@
1
1
  "use strict";
2
2
  // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
+ return new (P || (P = Promise))(function (resolve, reject) {
7
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
11
+ });
12
+ };
4
13
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.resourceOptsDefaults = exports.getVersion = exports.getEnvNumber = exports.getEnvBoolean = exports.getEnv = void 0;
14
+ exports.callAsync = exports.lazyLoad = exports.resourceOptsDefaults = exports.getVersion = exports.getEnvNumber = exports.getEnvBoolean = exports.getEnv = void 0;
15
+ const runtime = require("@pulumi/pulumi/runtime");
6
16
  function getEnv(...vars) {
7
17
  for (const v of vars) {
8
18
  const value = process.env[v];
@@ -51,7 +61,41 @@ function getVersion() {
51
61
  exports.getVersion = getVersion;
52
62
  /** @internal */
53
63
  function resourceOptsDefaults() {
54
- return { version: getVersion(), pluginDownloadURL: "https://github.com/checkly/pulumi-checkly/releases/download/v${VERSION}" };
64
+ return { version: getVersion(), pluginDownloadURL: "github://api.github.com/checkly" };
55
65
  }
56
66
  exports.resourceOptsDefaults = resourceOptsDefaults;
67
+ /** @internal */
68
+ function lazyLoad(exports, props, loadModule) {
69
+ for (let property of props) {
70
+ Object.defineProperty(exports, property, {
71
+ enumerable: true,
72
+ get: function () {
73
+ return loadModule()[property];
74
+ },
75
+ });
76
+ }
77
+ }
78
+ exports.lazyLoad = lazyLoad;
79
+ function callAsync(tok, props, res, opts) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ const o = runtime.call(tok, props, res);
82
+ const value = yield o.promise(true /*withUnknowns*/);
83
+ const isKnown = yield o.isKnown;
84
+ const isSecret = yield o.isSecret;
85
+ const problem = !isKnown ? "an unknown value"
86
+ : isSecret ? "a secret value"
87
+ : undefined;
88
+ // Ingoring o.resources silently. They are typically non-empty, r.f() calls include r as a dependency.
89
+ if (problem) {
90
+ throw new Error(`Plain resource method "${tok}" incorrectly returned ${problem}. ` +
91
+ "This is an error in the provider, please report this to the provider developer.");
92
+ }
93
+ // Extract a single property if requested.
94
+ if (opts && opts.property) {
95
+ return value[opts.property];
96
+ }
97
+ return value;
98
+ });
99
+ }
100
+ exports.callAsync = callAsync;
57
101
  //# sourceMappingURL=utilities.js.map
package/utilities.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utilities.js","sourceRoot":"","sources":["../utilities.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAGjF,SAAgB,MAAM,CAAC,GAAG,IAAc;IACpC,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE;QAClB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,KAAK,EAA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,GAAG,CAAC,CAAC;QAChD,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACrD,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,OAAO,CAAC;QAChC,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,QAAQ,CAAC;QAClC,MAAM,OAAO,GACT,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAkB;YAC7B,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB;gBAC7B,CAAC,CAAC,SAAS,CAAC;QAChB,sGAAsG;QACtG,IAAI,OAAO,EAAE;YACT,MAAM,IAAI,KAAK,CAAC,0BAA0B,GAAG,0BAA0B,OAAO,IAAI;gBAC9E,iFAAiF,CAAC,CAAC;SAC1F;QACD,0CAA0C;QAC1C,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE;YACvB,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SAC/B;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CAAA;AAxBD,8BAwBC"}
package/package.json.bak DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "name": "@checkly/pulumi",
3
- "version": "${VERSION}",
4
- "description": "A Pulumi package for creating and managing Checkly monitoring resources.",
5
- "keywords": [
6
- "pulumi",
7
- "checkly",
8
- "category/monitoring"
9
- ],
10
- "homepage": "https://www.pulumi.com/registry/packages/checkly",
11
- "repository": "https://github.com/checkly/pulumi-checkly",
12
- "license": "MIT",
13
- "scripts": {
14
- "build": "tsc",
15
- "install": "node scripts/install-pulumi-plugin.js resource checkly ${VERSION}"
16
- },
17
- "dependencies": {
18
- "@pulumi/pulumi": "^3.0.0"
19
- },
20
- "devDependencies": {
21
- "@types/mime": "^2.0.0",
22
- "@types/node": "^10.0.0",
23
- "typescript": "^4.3.5"
24
- },
25
- "pulumi": {
26
- "resource": true,
27
- "pluginDownloadURL": "https://github.com/checkly/pulumi-checkly/releases/download/v${VERSION}"
28
- }
29
- }
@@ -1,26 +0,0 @@
1
- "use strict";
2
- var childProcess = require("child_process");
3
-
4
- var args = process.argv.slice(2);
5
-
6
- if (args.indexOf("${VERSION}") !== -1) {
7
- process.exit(0);
8
- }
9
-
10
- var res = childProcess.spawnSync("pulumi", ["plugin", "install", "--server", "https://github.com/checkly/pulumi-checkly/releases/download/v${VERSION}"].concat(args), {
11
- stdio: ["ignore", "inherit", "inherit"]
12
- });
13
-
14
- if (res.error && res.error.code === "ENOENT") {
15
- console.error("\nThere was an error installing the resource provider plugin. " +
16
- "It looks like `pulumi` is not installed on your system. " +
17
- "Please visit https://pulumi.com/ to install the Pulumi CLI.\n" +
18
- "You may try manually installing the plugin by running " +
19
- "`pulumi plugin install " + args.join(" ") + "`");
20
- } else if (res.error || res.status !== 0) {
21
- console.error("\nThere was an error installing the resource provider plugin. " +
22
- "You may try to manually installing the plugin by running " +
23
- "`pulumi plugin install " + args.join(" ") + "`");
24
- }
25
-
26
- process.exit(0);