checkly 0.0.0-pr.1006.b6b3be2

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 (314) hide show
  1. package/README.md +102 -0
  2. package/bin/run +5 -0
  3. package/bin/run.cmd +3 -0
  4. package/constructs.d.ts +1 -0
  5. package/constructs.js +2 -0
  6. package/dist/auth/index.d.ts +15 -0
  7. package/dist/auth/index.js +262 -0
  8. package/dist/auth/index.js.map +1 -0
  9. package/dist/commands/authCommand.d.ts +5 -0
  10. package/dist/commands/authCommand.js +37 -0
  11. package/dist/commands/authCommand.js.map +1 -0
  12. package/dist/commands/baseCommand.d.ts +13 -0
  13. package/dist/commands/baseCommand.js +48 -0
  14. package/dist/commands/baseCommand.js.map +1 -0
  15. package/dist/commands/deploy.d.ts +18 -0
  16. package/dist/commands/deploy.js +289 -0
  17. package/dist/commands/deploy.js.map +1 -0
  18. package/dist/commands/destroy.d.ts +10 -0
  19. package/dist/commands/destroy.js +84 -0
  20. package/dist/commands/destroy.js.map +1 -0
  21. package/dist/commands/env/add.d.ts +14 -0
  22. package/dist/commands/env/add.js +85 -0
  23. package/dist/commands/env/add.js.map +1 -0
  24. package/dist/commands/env/ls.d.ts +6 -0
  25. package/dist/commands/env/ls.js +44 -0
  26. package/dist/commands/env/ls.js.map +1 -0
  27. package/dist/commands/env/pull.d.ts +12 -0
  28. package/dist/commands/env/pull.js +99 -0
  29. package/dist/commands/env/pull.js.map +1 -0
  30. package/dist/commands/env/rm.d.ts +12 -0
  31. package/dist/commands/env/rm.js +82 -0
  32. package/dist/commands/env/rm.js.map +1 -0
  33. package/dist/commands/env/update.d.ts +14 -0
  34. package/dist/commands/env/update.js +88 -0
  35. package/dist/commands/env/update.js.map +1 -0
  36. package/dist/commands/help.d.ts +6 -0
  37. package/dist/commands/help.js +17 -0
  38. package/dist/commands/help.js.map +1 -0
  39. package/dist/commands/login.d.ts +13 -0
  40. package/dist/commands/login.js +134 -0
  41. package/dist/commands/login.js.map +1 -0
  42. package/dist/commands/logout.d.ts +9 -0
  43. package/dist/commands/logout.js +43 -0
  44. package/dist/commands/logout.js.map +1 -0
  45. package/dist/commands/runtimes.d.ts +6 -0
  46. package/dist/commands/runtimes.js +49 -0
  47. package/dist/commands/runtimes.js.map +1 -0
  48. package/dist/commands/switch.d.ts +9 -0
  49. package/dist/commands/switch.js +81 -0
  50. package/dist/commands/switch.js.map +1 -0
  51. package/dist/commands/sync-playwright.d.ts +10 -0
  52. package/dist/commands/sync-playwright.js +98 -0
  53. package/dist/commands/sync-playwright.js.map +1 -0
  54. package/dist/commands/test.d.ts +45 -0
  55. package/dist/commands/test.js +366 -0
  56. package/dist/commands/test.js.map +1 -0
  57. package/dist/commands/trigger.d.ts +37 -0
  58. package/dist/commands/trigger.js +242 -0
  59. package/dist/commands/trigger.js.map +1 -0
  60. package/dist/commands/whoami.d.ts +6 -0
  61. package/dist/commands/whoami.js +42 -0
  62. package/dist/commands/whoami.js.map +1 -0
  63. package/dist/config.d.ts +31 -0
  64. package/dist/config.js +8 -0
  65. package/dist/config.js.map +1 -0
  66. package/dist/constants.d.ts +7 -0
  67. package/dist/constants.js +10 -0
  68. package/dist/constants.js.map +1 -0
  69. package/dist/constructs/alert-channel-subscription.d.ts +44 -0
  70. package/dist/constructs/alert-channel-subscription.js +39 -0
  71. package/dist/constructs/alert-channel-subscription.js.map +1 -0
  72. package/dist/constructs/alert-channel.d.ts +53 -0
  73. package/dist/constructs/alert-channel.js +55 -0
  74. package/dist/constructs/alert-channel.js.map +1 -0
  75. package/dist/constructs/alert-escalation-policy.d.ts +34 -0
  76. package/dist/constructs/alert-escalation-policy.js +47 -0
  77. package/dist/constructs/alert-escalation-policy.js.map +1 -0
  78. package/dist/constructs/api-check.d.ts +187 -0
  79. package/dist/constructs/api-check.js +279 -0
  80. package/dist/constructs/api-check.js.map +1 -0
  81. package/dist/constructs/browser-check.d.ts +90 -0
  82. package/dist/constructs/browser-check.js +151 -0
  83. package/dist/constructs/browser-check.js.map +1 -0
  84. package/dist/constructs/check-group.d.ts +162 -0
  85. package/dist/constructs/check-group.js +208 -0
  86. package/dist/constructs/check-group.js.map +1 -0
  87. package/dist/constructs/check.d.ts +144 -0
  88. package/dist/constructs/check.js +133 -0
  89. package/dist/constructs/check.js.map +1 -0
  90. package/dist/constructs/construct.d.ts +17 -0
  91. package/dist/constructs/construct.js +22 -0
  92. package/dist/constructs/construct.js.map +1 -0
  93. package/dist/constructs/dashboard.d.ts +138 -0
  94. package/dist/constructs/dashboard.js +126 -0
  95. package/dist/constructs/dashboard.js.map +1 -0
  96. package/dist/constructs/email-alert-channel.d.ts +26 -0
  97. package/dist/constructs/email-alert-channel.js +37 -0
  98. package/dist/constructs/email-alert-channel.js.map +1 -0
  99. package/dist/constructs/environment-variable.d.ts +2 -0
  100. package/dist/constructs/environment-variable.js +3 -0
  101. package/dist/constructs/environment-variable.js.map +1 -0
  102. package/dist/constructs/frequency.d.ts +20 -0
  103. package/dist/constructs/frequency.js +26 -0
  104. package/dist/constructs/frequency.js.map +1 -0
  105. package/dist/constructs/heartbeat-check.d.ts +43 -0
  106. package/dist/constructs/heartbeat-check.js +61 -0
  107. package/dist/constructs/heartbeat-check.js.map +1 -0
  108. package/dist/constructs/http-header.d.ts +2 -0
  109. package/dist/constructs/http-header.js +3 -0
  110. package/dist/constructs/http-header.js.map +1 -0
  111. package/dist/constructs/index.d.ts +27 -0
  112. package/dist/constructs/index.js +44 -0
  113. package/dist/constructs/index.js.map +1 -0
  114. package/dist/constructs/key-value-pair.d.ts +6 -0
  115. package/dist/constructs/key-value-pair.js +3 -0
  116. package/dist/constructs/key-value-pair.js.map +1 -0
  117. package/dist/constructs/maintenance-window.d.ts +61 -0
  118. package/dist/constructs/maintenance-window.js +47 -0
  119. package/dist/constructs/maintenance-window.js.map +1 -0
  120. package/dist/constructs/multi-step-check.d.ts +65 -0
  121. package/dist/constructs/multi-step-check.js +153 -0
  122. package/dist/constructs/multi-step-check.js.map +1 -0
  123. package/dist/constructs/opsgenie-alert-channel.d.ts +45 -0
  124. package/dist/constructs/opsgenie-alert-channel.js +44 -0
  125. package/dist/constructs/opsgenie-alert-channel.js.map +1 -0
  126. package/dist/constructs/pagerduty-alert-channel.d.ts +39 -0
  127. package/dist/constructs/pagerduty-alert-channel.js +42 -0
  128. package/dist/constructs/pagerduty-alert-channel.js.map +1 -0
  129. package/dist/constructs/phone-call-alert-channel.d.ts +34 -0
  130. package/dist/constructs/phone-call-alert-channel.js +42 -0
  131. package/dist/constructs/phone-call-alert-channel.js.map +1 -0
  132. package/dist/constructs/playwright-config.d.ts +52 -0
  133. package/dist/constructs/playwright-config.js +3 -0
  134. package/dist/constructs/playwright-config.js.map +1 -0
  135. package/dist/constructs/private-location-check-assignment.d.ts +29 -0
  136. package/dist/constructs/private-location-check-assignment.js +35 -0
  137. package/dist/constructs/private-location-check-assignment.js.map +1 -0
  138. package/dist/constructs/private-location-group-assignment.d.ts +29 -0
  139. package/dist/constructs/private-location-group-assignment.js +35 -0
  140. package/dist/constructs/private-location-group-assignment.js.map +1 -0
  141. package/dist/constructs/private-location.d.ts +51 -0
  142. package/dist/constructs/private-location.js +61 -0
  143. package/dist/constructs/private-location.js.map +1 -0
  144. package/dist/constructs/project.d.ts +66 -0
  145. package/dist/constructs/project.js +155 -0
  146. package/dist/constructs/project.js.map +1 -0
  147. package/dist/constructs/query-param.d.ts +2 -0
  148. package/dist/constructs/query-param.js +3 -0
  149. package/dist/constructs/query-param.js.map +1 -0
  150. package/dist/constructs/ref.d.ts +5 -0
  151. package/dist/constructs/ref.js +13 -0
  152. package/dist/constructs/ref.js.map +1 -0
  153. package/dist/constructs/retry-strategy.d.ts +50 -0
  154. package/dist/constructs/retry-strategy.js +51 -0
  155. package/dist/constructs/retry-strategy.js.map +1 -0
  156. package/dist/constructs/slack-alert-channel.d.ts +26 -0
  157. package/dist/constructs/slack-alert-channel.js +40 -0
  158. package/dist/constructs/slack-alert-channel.js.map +1 -0
  159. package/dist/constructs/sms-alert-channel.d.ts +32 -0
  160. package/dist/constructs/sms-alert-channel.js +40 -0
  161. package/dist/constructs/sms-alert-channel.js.map +1 -0
  162. package/dist/constructs/validator-error.d.ts +2 -0
  163. package/dist/constructs/validator-error.js +7 -0
  164. package/dist/constructs/validator-error.js.map +1 -0
  165. package/dist/constructs/webhook-alert-channel.d.ts +67 -0
  166. package/dist/constructs/webhook-alert-channel.js +52 -0
  167. package/dist/constructs/webhook-alert-channel.js.map +1 -0
  168. package/dist/help/examples.d.ts +6 -0
  169. package/dist/help/examples.js +22 -0
  170. package/dist/help/examples.js.map +1 -0
  171. package/dist/help/help-extension.d.ts +7 -0
  172. package/dist/help/help-extension.js +59 -0
  173. package/dist/help/help-extension.js.map +1 -0
  174. package/dist/index.d.ts +3 -0
  175. package/dist/index.js +30 -0
  176. package/dist/index.js.map +1 -0
  177. package/dist/messages/common-messages.d.ts +5 -0
  178. package/dist/messages/common-messages.js +9 -0
  179. package/dist/messages/common-messages.js.map +1 -0
  180. package/dist/playwright/playwright-config-loader.d.ts +1 -0
  181. package/dist/playwright/playwright-config-loader.js +26 -0
  182. package/dist/playwright/playwright-config-loader.js.map +1 -0
  183. package/dist/playwright/playwright-config-template.d.ts +8 -0
  184. package/dist/playwright/playwright-config-template.js +78 -0
  185. package/dist/playwright/playwright-config-template.js.map +1 -0
  186. package/dist/reporters/abstract-list.d.ts +41 -0
  187. package/dist/reporters/abstract-list.js +171 -0
  188. package/dist/reporters/abstract-list.js.map +1 -0
  189. package/dist/reporters/ci.d.ts +12 -0
  190. package/dist/reporters/ci.js +34 -0
  191. package/dist/reporters/ci.js.map +1 -0
  192. package/dist/reporters/dot.d.ts +10 -0
  193. package/dist/reporters/dot.js +29 -0
  194. package/dist/reporters/dot.js.map +1 -0
  195. package/dist/reporters/github.d.ts +32 -0
  196. package/dist/reporters/github.js +119 -0
  197. package/dist/reporters/github.js.map +1 -0
  198. package/dist/reporters/json.d.ts +26 -0
  199. package/dist/reporters/json.js +101 -0
  200. package/dist/reporters/json.js.map +1 -0
  201. package/dist/reporters/list.d.ts +15 -0
  202. package/dist/reporters/list.js +85 -0
  203. package/dist/reporters/list.js.map +1 -0
  204. package/dist/reporters/reporter.d.ts +16 -0
  205. package/dist/reporters/reporter.js +29 -0
  206. package/dist/reporters/reporter.js.map +1 -0
  207. package/dist/reporters/util.d.ts +18 -0
  208. package/dist/reporters/util.js +325 -0
  209. package/dist/reporters/util.js.map +1 -0
  210. package/dist/rest/accounts.d.ts +12 -0
  211. package/dist/rest/accounts.js +15 -0
  212. package/dist/rest/accounts.js.map +1 -0
  213. package/dist/rest/api.d.ts +33 -0
  214. package/dist/rest/api.js +98 -0
  215. package/dist/rest/api.js.map +1 -0
  216. package/dist/rest/assets.d.ts +13 -0
  217. package/dist/rest/assets.js +30 -0
  218. package/dist/rest/assets.js.map +1 -0
  219. package/dist/rest/checkly-storage.d.ts +12 -0
  220. package/dist/rest/checkly-storage.js +15 -0
  221. package/dist/rest/checkly-storage.js.map +1 -0
  222. package/dist/rest/environment-variables.d.ts +17 -0
  223. package/dist/rest/environment-variables.js +25 -0
  224. package/dist/rest/environment-variables.js.map +1 -0
  225. package/dist/rest/heartbeat-checks.d.ts +11 -0
  226. package/dist/rest/heartbeat-checks.js +17 -0
  227. package/dist/rest/heartbeat-checks.js.map +1 -0
  228. package/dist/rest/locations.d.ts +11 -0
  229. package/dist/rest/locations.js +12 -0
  230. package/dist/rest/locations.js.map +1 -0
  231. package/dist/rest/private-locations.d.ts +10 -0
  232. package/dist/rest/private-locations.js +12 -0
  233. package/dist/rest/private-locations.js.map +1 -0
  234. package/dist/rest/projects.d.ts +46 -0
  235. package/dist/rest/projects.js +25 -0
  236. package/dist/rest/projects.js.map +1 -0
  237. package/dist/rest/runtimes.d.ts +16 -0
  238. package/dist/rest/runtimes.js +15 -0
  239. package/dist/rest/runtimes.js.map +1 -0
  240. package/dist/rest/test-sessions.d.ts +59 -0
  241. package/dist/rest/test-sessions.js +24 -0
  242. package/dist/rest/test-sessions.js.map +1 -0
  243. package/dist/rest/users.d.ts +12 -0
  244. package/dist/rest/users.js +12 -0
  245. package/dist/rest/users.js.map +1 -0
  246. package/dist/rest/util.d.ts +4 -0
  247. package/dist/rest/util.js +17 -0
  248. package/dist/rest/util.js.map +1 -0
  249. package/dist/services/abstract-check-runner.d.ts +60 -0
  250. package/dist/services/abstract-check-runner.js +225 -0
  251. package/dist/services/abstract-check-runner.js.map +1 -0
  252. package/dist/services/check-parser/collector.d.ts +33 -0
  253. package/dist/services/check-parser/collector.js +48 -0
  254. package/dist/services/check-parser/collector.js.map +1 -0
  255. package/dist/services/check-parser/errors.d.ts +8 -0
  256. package/dist/services/check-parser/errors.js +45 -0
  257. package/dist/services/check-parser/errors.js.map +1 -0
  258. package/dist/services/check-parser/package-files/index.d.ts +1 -0
  259. package/dist/services/check-parser/package-files/index.js +6 -0
  260. package/dist/services/check-parser/package-files/index.js.map +1 -0
  261. package/dist/services/check-parser/package-files/json-source-file.d.ts +13 -0
  262. package/dist/services/check-parser/package-files/json-source-file.js +34 -0
  263. package/dist/services/check-parser/package-files/json-source-file.js.map +1 -0
  264. package/dist/services/check-parser/package-files/loader.d.ts +7 -0
  265. package/dist/services/check-parser/package-files/loader.js +19 -0
  266. package/dist/services/check-parser/package-files/loader.js.map +1 -0
  267. package/dist/services/check-parser/package-files/package-json-file.d.ts +23 -0
  268. package/dist/services/check-parser/package-files/package-json-file.js +44 -0
  269. package/dist/services/check-parser/package-files/package-json-file.js.map +1 -0
  270. package/dist/services/check-parser/package-files/paths.d.ts +22 -0
  271. package/dist/services/check-parser/package-files/paths.js +108 -0
  272. package/dist/services/check-parser/package-files/paths.js.map +1 -0
  273. package/dist/services/check-parser/package-files/resolver.d.ts +32 -0
  274. package/dist/services/check-parser/package-files/resolver.js +186 -0
  275. package/dist/services/check-parser/package-files/resolver.js.map +1 -0
  276. package/dist/services/check-parser/package-files/source-file.d.ts +13 -0
  277. package/dist/services/check-parser/package-files/source-file.js +41 -0
  278. package/dist/services/check-parser/package-files/source-file.js.map +1 -0
  279. package/dist/services/check-parser/package-files/tsconfig-json-file.d.ts +68 -0
  280. package/dist/services/check-parser/package-files/tsconfig-json-file.js +119 -0
  281. package/dist/services/check-parser/package-files/tsconfig-json-file.js.map +1 -0
  282. package/dist/services/check-parser/parser.d.ts +32 -0
  283. package/dist/services/check-parser/parser.js +303 -0
  284. package/dist/services/check-parser/parser.js.map +1 -0
  285. package/dist/services/checkly-config-loader.d.ts +72 -0
  286. package/dist/services/checkly-config-loader.js +103 -0
  287. package/dist/services/checkly-config-loader.js.map +1 -0
  288. package/dist/services/config.d.ts +28 -0
  289. package/dist/services/config.js +99 -0
  290. package/dist/services/config.js.map +1 -0
  291. package/dist/services/project-parser.d.ts +21 -0
  292. package/dist/services/project-parser.js +192 -0
  293. package/dist/services/project-parser.js.map +1 -0
  294. package/dist/services/snapshot-service.d.ts +13 -0
  295. package/dist/services/snapshot-service.js +85 -0
  296. package/dist/services/snapshot-service.js.map +1 -0
  297. package/dist/services/socket-client.d.ts +4 -0
  298. package/dist/services/socket-client.js +88 -0
  299. package/dist/services/socket-client.js.map +1 -0
  300. package/dist/services/test-filters.d.ts +3 -0
  301. package/dist/services/test-filters.js +27 -0
  302. package/dist/services/test-filters.js.map +1 -0
  303. package/dist/services/test-runner.d.ts +24 -0
  304. package/dist/services/test-runner.js +91 -0
  305. package/dist/services/test-runner.js.map +1 -0
  306. package/dist/services/trigger-runner.d.ts +29 -0
  307. package/dist/services/trigger-runner.js +59 -0
  308. package/dist/services/trigger-runner.js.map +1 -0
  309. package/dist/services/util.d.ts +32 -0
  310. package/dist/services/util.js +244 -0
  311. package/dist/services/util.js.map +1 -0
  312. package/dist/tsconfig.tsbuildinfo +1 -0
  313. package/oclif.manifest.json +635 -0
  314. package/package.json +151 -0
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.NoMatchingChecksError = void 0;
7
+ const api_1 = require("../rest/api");
8
+ const abstract_check_runner_1 = __importDefault(require("./abstract-check-runner"));
9
+ class NoMatchingChecksError extends Error {
10
+ }
11
+ exports.NoMatchingChecksError = NoMatchingChecksError;
12
+ class TriggerRunner extends abstract_check_runner_1.default {
13
+ constructor(accountId, timeout, verbose, shouldRecord, location, targetTags, envVars, repoInfo, environment, testSessionName, testRetryStrategy) {
14
+ super(accountId, timeout, verbose);
15
+ this.shouldRecord = shouldRecord;
16
+ this.location = location;
17
+ this.targetTags = targetTags;
18
+ this.envVars = envVars;
19
+ this.repoInfo = repoInfo;
20
+ this.environment = environment;
21
+ this.testSessionName = testSessionName;
22
+ this.testRetryStrategy = testRetryStrategy;
23
+ }
24
+ async scheduleChecks(checkRunSuiteId) {
25
+ var _a, _b, _c, _d, _e, _f;
26
+ try {
27
+ const { data } = await api_1.testSessions.trigger({
28
+ name: (_a = this.testSessionName) !== null && _a !== void 0 ? _a : 'Triggered Session',
29
+ shouldRecord: this.shouldRecord,
30
+ runLocation: this.location,
31
+ checkRunSuiteId,
32
+ targetTags: this.targetTags,
33
+ environmentVariables: this.envVars,
34
+ repoInfo: this.repoInfo,
35
+ environment: this.environment,
36
+ testRetryStrategy: this.testRetryStrategy,
37
+ });
38
+ const { checks, testSessionId, sequenceIds, } = data;
39
+ if (!checks.length) {
40
+ // Currently the BE will never return an empty `checks` array, it returns a 403 instead.
41
+ // This is added to make the old CLI versions compatible if we ever change this, though.
42
+ throw new NoMatchingChecksError();
43
+ }
44
+ const augmentedChecks = checks.map(check => ({
45
+ check,
46
+ sequenceId: sequenceIds === null || sequenceIds === void 0 ? void 0 : sequenceIds[check.id],
47
+ }));
48
+ return { checks: augmentedChecks, testSessionId };
49
+ }
50
+ catch (err) {
51
+ if (((_c = (_b = err.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.errorCode) === 'ERR_NO_MATCHING_CHECKS') {
52
+ throw new NoMatchingChecksError();
53
+ }
54
+ throw new Error((_f = (_e = (_d = err.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.message) !== null && _f !== void 0 ? _f : err.message);
55
+ }
56
+ }
57
+ }
58
+ exports.default = TriggerRunner;
59
+ //# sourceMappingURL=trigger-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trigger-runner.js","sourceRoot":"","sources":["../../src/services/trigger-runner.ts"],"names":[],"mappings":";;;;;;AACA,qCAA0C;AAC1C,oFAAsF;AAGtF,MAAa,qBAAsB,SAAQ,KAAK;CAAG;AAAnD,sDAAmD;AAEnD,MAAqB,aAAc,SAAQ,+BAAmB;IAU5D,YACE,SAAiB,EACjB,OAAe,EACf,OAAgB,EAChB,YAAqB,EACrB,QAAqB,EACrB,UAAsB,EACtB,OAA8C,EAC9C,QAA+B,EAC/B,WAA0B,EAC1B,eAAmC,EACnC,iBAAuC;QAEvC,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;QAClC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;QAChC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;QACtC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAA;IAC5C,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,eAAuB;;QAKvB,IAAI,CAAC;YACH,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,kBAAY,CAAC,OAAO,CAAC;gBAC1C,IAAI,EAAE,MAAA,IAAI,CAAC,eAAe,mCAAI,mBAAmB;gBACjD,YAAY,EAAE,IAAI,CAAC,YAAY;gBAC/B,WAAW,EAAE,IAAI,CAAC,QAAQ;gBAC1B,eAAe;gBACf,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,oBAAoB,EAAE,IAAI,CAAC,OAAO;gBAClC,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;aAC1C,CAAC,CAAA;YACF,MAAM,EACJ,MAAM,EACN,aAAa,EACb,WAAW,GACZ,GAKG,IAAI,CAAA;YACR,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;gBACnB,wFAAwF;gBACxF,wFAAwF;gBACxF,MAAM,IAAI,qBAAqB,EAAE,CAAA;YACnC,CAAC;YACD,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBAC3C,KAAK;gBACL,UAAU,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,KAAK,CAAC,EAAE,CAAC;aACpC,CAAC,CAAC,CAAA;YACH,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,aAAa,EAAE,CAAA;QACnD,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,IAAI,CAAA,MAAA,MAAA,GAAG,CAAC,QAAQ,0CAAE,IAAI,0CAAE,SAAS,MAAK,wBAAwB,EAAE,CAAC;gBAC/D,MAAM,IAAI,qBAAqB,EAAE,CAAA;YACnC,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,MAAA,MAAA,MAAA,GAAG,CAAC,QAAQ,0CAAE,IAAI,0CAAE,OAAO,mCAAI,GAAG,CAAC,OAAO,CAAC,CAAA;QAC7D,CAAC;IACH,CAAC;CACF;AA/ED,gCA+EC"}
@@ -0,0 +1,32 @@
1
+ import type { CreateAxiosDefaults } from 'axios';
2
+ export interface GitInformation {
3
+ commitId: string;
4
+ repoUrl?: string | null;
5
+ branchName?: string | null;
6
+ commitOwner?: string | null;
7
+ commitMessage?: string | null;
8
+ }
9
+ export interface CiInformation {
10
+ environment: string | null;
11
+ }
12
+ export declare function findFilesRecursively(directory: string, ignoredPaths?: Array<string>): string[];
13
+ export declare function loadJsFile(filepath: string): Promise<any>;
14
+ export declare function loadTsFile(filepath: string): Promise<any>;
15
+ /**
16
+ * @param relPath the path to be converted
17
+ * @param separator this is for testing purposes only so we can reliably replace the separator on Linux / Darwin
18
+ */
19
+ export declare function pathToPosix(relPath: string, separator?: string): string;
20
+ export declare function splitConfigFilePath(configFile?: string): {
21
+ configDirectory: string;
22
+ configFilenames?: string[];
23
+ };
24
+ export declare function isFileSync(path: string): boolean;
25
+ /**
26
+ * @param repoUrl default repoURL the user can set in their project config.
27
+ */
28
+ export declare function getGitInformation(repoUrl?: string): GitInformation | null;
29
+ export declare function getCiInformation(): CiInformation;
30
+ export declare function escapeValue(value: string | undefined): string;
31
+ export declare function getEnvs(envFile: string | undefined, envArgs: Array<string>): Promise<import("dotenv").DotenvParseOutput>;
32
+ export declare function assignProxy(baseURL: string, axiosConfig: CreateAxiosDefaults): CreateAxiosDefaults<any>;
@@ -0,0 +1,244 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
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 };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.assignProxy = exports.getEnvs = exports.escapeValue = exports.getCiInformation = exports.getGitInformation = exports.isFileSync = exports.splitConfigFilePath = exports.pathToPosix = exports.loadTsFile = exports.loadJsFile = exports.findFilesRecursively = void 0;
30
+ const path = __importStar(require("path"));
31
+ const fs = __importStar(require("fs/promises"));
32
+ const fsSync = __importStar(require("fs"));
33
+ const git_repo_info_1 = __importDefault(require("git-repo-info"));
34
+ const dotenv_1 = require("dotenv");
35
+ // @ts-ignore
36
+ const proxy_from_env_1 = require("proxy-from-env");
37
+ const tunnel_1 = require("tunnel");
38
+ // Copied from oclif/core
39
+ // eslint-disable-next-line
40
+ const _importDynamic = new Function('modulePath', 'return import(modulePath)');
41
+ function findFilesRecursively(directory, ignoredPaths = []) {
42
+ var _a;
43
+ if (!((_a = fsSync.statSync(directory, { throwIfNoEntry: false })) === null || _a === void 0 ? void 0 : _a.isDirectory())) {
44
+ return [];
45
+ }
46
+ const files = [];
47
+ const directoriesToVisit = [directory];
48
+ const ignoredPathsSet = new Set(ignoredPaths);
49
+ while (directoriesToVisit.length > 0) {
50
+ const currentDirectory = directoriesToVisit.shift();
51
+ const contents = fsSync.readdirSync(currentDirectory, { withFileTypes: true });
52
+ for (const content of contents) {
53
+ if (content.isSymbolicLink()) {
54
+ continue;
55
+ }
56
+ const fullPath = path.resolve(currentDirectory, content.name);
57
+ if (ignoredPathsSet.has(fullPath)) {
58
+ continue;
59
+ }
60
+ if (content.isDirectory()) {
61
+ directoriesToVisit.push(fullPath);
62
+ }
63
+ else {
64
+ files.push(fullPath);
65
+ }
66
+ }
67
+ }
68
+ return files;
69
+ }
70
+ exports.findFilesRecursively = findFilesRecursively;
71
+ async function loadJsFile(filepath) {
72
+ try {
73
+ // There is a Node opened issue related with a segmentation fault using ES6 modules
74
+ // with jest https://github.com/nodejs/node/issues/35889
75
+ // As a work around, we check if Jest is running to modify the way to import the module.
76
+ // TODO: investigate if the issue is fixed to clean up the conditional import
77
+ let { default: exported } = typeof jest !== 'undefined'
78
+ ? { default: await require(filepath) }
79
+ : await _importDynamic(pathToPosix(filepath));
80
+ if (exported instanceof Function) {
81
+ exported = await exported();
82
+ }
83
+ return exported;
84
+ }
85
+ catch (err) {
86
+ throw new Error(`Error loading file ${filepath}\n${err.stack}`);
87
+ }
88
+ }
89
+ exports.loadJsFile = loadJsFile;
90
+ async function loadTsFile(filepath) {
91
+ try {
92
+ const tsCompiler = await getTsCompiler();
93
+ tsCompiler.enabled(true);
94
+ let { default: exported } = await require(filepath);
95
+ if (exported instanceof Function) {
96
+ exported = await exported();
97
+ }
98
+ tsCompiler.enabled(false); // Re-disable the TS compiler
99
+ return exported;
100
+ }
101
+ catch (err) {
102
+ throw new Error(`Error loading file ${filepath}\n${err.stack}`);
103
+ }
104
+ }
105
+ exports.loadTsFile = loadTsFile;
106
+ // To avoid a dependency on typescript for users with no TS checks, we need to dynamically import ts-node
107
+ let tsCompiler;
108
+ async function getTsCompiler() {
109
+ if (tsCompiler)
110
+ return tsCompiler;
111
+ try {
112
+ const tsNode = await import('ts-node');
113
+ tsCompiler = tsNode.register({
114
+ moduleTypes: {
115
+ '**/*': 'cjs',
116
+ },
117
+ compilerOptions: {
118
+ module: 'CommonJS',
119
+ },
120
+ });
121
+ }
122
+ catch (err) {
123
+ if (err.code === 'ERR_MODULE_NOT_FOUND' || err.code === 'MODULE_NOT_FOUND') {
124
+ throw new Error('Please install "ts-node" and "typescript" to use TypeScript configuration files');
125
+ }
126
+ throw err;
127
+ }
128
+ return tsCompiler;
129
+ }
130
+ /**
131
+ * @param relPath the path to be converted
132
+ * @param separator this is for testing purposes only so we can reliably replace the separator on Linux / Darwin
133
+ */
134
+ function pathToPosix(relPath, separator) {
135
+ // Windows uses \ rather than / as a path separator.
136
+ // It's important that logical ID's are consistent across platforms, though.
137
+ // Otherwise, checks will be deleted and recreated when `npx checkly deploy` is run on different machines.
138
+ return path.normalize(relPath).split(separator !== null && separator !== void 0 ? separator : path.sep).join(path.posix.sep).replace(/^[C|D]:/i, '');
139
+ }
140
+ exports.pathToPosix = pathToPosix;
141
+ function splitConfigFilePath(configFile) {
142
+ if (configFile) {
143
+ const cwd = path.resolve(path.dirname(configFile));
144
+ return {
145
+ configDirectory: cwd,
146
+ configFilenames: [path.basename(configFile)],
147
+ };
148
+ }
149
+ return {
150
+ configDirectory: process.cwd(),
151
+ configFilenames: undefined,
152
+ };
153
+ }
154
+ exports.splitConfigFilePath = splitConfigFilePath;
155
+ function isFileSync(path) {
156
+ // This helper is useful to test paths inside constructors which cannot be async.
157
+ let result;
158
+ try {
159
+ result = fsSync.existsSync(path);
160
+ }
161
+ catch (err) {
162
+ throw new Error(`Error parsing the file path: ${path}`);
163
+ }
164
+ return result;
165
+ }
166
+ exports.isFileSync = isFileSync;
167
+ /**
168
+ * @param repoUrl default repoURL the user can set in their project config.
169
+ */
170
+ function getGitInformation(repoUrl) {
171
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
172
+ const repositoryInfo = (0, git_repo_info_1.default)();
173
+ if (!process.env.CHECKLY_REPO_SHA && !process.env.CHECKLY_TEST_REPO_SHA && !repositoryInfo.sha) {
174
+ return null;
175
+ }
176
+ // safe way to remove the email address
177
+ const committer = (_b = (((_a = repositoryInfo.committer) === null || _a === void 0 ? void 0 : _a.match(/([^<]+)/)) || [])[1]) === null || _b === void 0 ? void 0 : _b.trim();
178
+ return {
179
+ commitId: (_d = (_c = process.env.CHECKLY_REPO_SHA) !== null && _c !== void 0 ? _c : process.env.CHECKLY_TEST_REPO_SHA) !== null && _d !== void 0 ? _d : repositoryInfo.sha,
180
+ repoUrl: (_f = (_e = process.env.CHECKLY_REPO_URL) !== null && _e !== void 0 ? _e : process.env.CHECKLY_TEST_REPO_URL) !== null && _f !== void 0 ? _f : repoUrl,
181
+ branchName: (_h = (_g = process.env.CHECKLY_REPO_BRANCH) !== null && _g !== void 0 ? _g : process.env.CHECKLY_TEST_REPO_BRANCH) !== null && _h !== void 0 ? _h : repositoryInfo.branch,
182
+ commitOwner: (_k = (_j = process.env.CHECKLY_REPO_COMMIT_OWNER) !== null && _j !== void 0 ? _j : process.env.CHECKLY_TEST_REPO_COMMIT_OWNER) !== null && _k !== void 0 ? _k : committer,
183
+ commitMessage: (_m = (_l = process.env.CHECKLY_REPO_COMMIT_MESSAGE) !== null && _l !== void 0 ? _l : process.env.CHECKLY_TEST_REPO_COMMIT_MESSAGE) !== null && _m !== void 0 ? _m : repositoryInfo.commitMessage,
184
+ };
185
+ }
186
+ exports.getGitInformation = getGitInformation;
187
+ function getCiInformation() {
188
+ var _a;
189
+ return {
190
+ environment: (_a = process.env.CHECKLY_TEST_ENVIRONMENT) !== null && _a !== void 0 ? _a : null,
191
+ };
192
+ }
193
+ exports.getCiInformation = getCiInformation;
194
+ function escapeValue(value) {
195
+ return value
196
+ ? value
197
+ .replace(/\n/g, '\\n') // combine newlines (unix) into one line
198
+ .replace(/\r/g, '\\r') // combine newlines (windows) into one line
199
+ : '';
200
+ }
201
+ exports.escapeValue = escapeValue;
202
+ async function getEnvs(envFile, envArgs) {
203
+ if (envFile) {
204
+ const envsString = await fs.readFile(envFile, { encoding: 'utf8' });
205
+ return (0, dotenv_1.parse)(envsString);
206
+ }
207
+ const envsString = `${envArgs.join('\n')}`;
208
+ return (0, dotenv_1.parse)(envsString);
209
+ }
210
+ exports.getEnvs = getEnvs;
211
+ const isHttps = (protocol) => protocol.startsWith('https');
212
+ function assignProxy(baseURL, axiosConfig) {
213
+ const proxyUrlEnv = (0, proxy_from_env_1.getProxyForUrl)(baseURL);
214
+ if (!proxyUrlEnv) {
215
+ return axiosConfig;
216
+ }
217
+ const parsedProxyUrl = new URL(proxyUrlEnv);
218
+ const isProxyHttps = isHttps(parsedProxyUrl.protocol);
219
+ const isEndpointHttps = isHttps(baseURL);
220
+ const proxy = {
221
+ host: parsedProxyUrl.hostname,
222
+ port: parsedProxyUrl.port,
223
+ protocol: parsedProxyUrl.protocol,
224
+ };
225
+ if (parsedProxyUrl.username && parsedProxyUrl.password) {
226
+ proxy.proxyAuth = `${parsedProxyUrl.username}:${parsedProxyUrl.password}`;
227
+ }
228
+ if (isProxyHttps && isEndpointHttps) {
229
+ axiosConfig.httpsAgent = (0, tunnel_1.httpsOverHttps)({ proxy });
230
+ }
231
+ else if (isProxyHttps && !isEndpointHttps) {
232
+ axiosConfig.httpAgent = (0, tunnel_1.httpOverHttps)({ proxy });
233
+ }
234
+ else if (!isProxyHttps && isEndpointHttps) {
235
+ axiosConfig.httpsAgent = (0, tunnel_1.httpsOverHttp)({ proxy });
236
+ }
237
+ else {
238
+ axiosConfig.httpAgent = (0, tunnel_1.httpOverHttp)({ proxy });
239
+ }
240
+ axiosConfig.proxy = false;
241
+ return axiosConfig;
242
+ }
243
+ exports.assignProxy = assignProxy;
244
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/services/util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2CAA4B;AAC5B,gDAAiC;AACjC,2CAA4B;AAE5B,kEAAuC;AACvC,mCAA8B;AAC9B,aAAa;AACb,mDAA+C;AAC/C,mCAAmF;AAEnF,yBAAyB;AACzB,2BAA2B;AAC3B,MAAM,cAAc,GAAG,IAAI,QAAQ,CAAC,YAAY,EAAE,2BAA2B,CAAC,CAAA;AAc9E,SAAgB,oBAAoB,CAAE,SAAiB,EAAE,eAA8B,EAAE;;IACvF,IAAI,CAAC,CAAA,MAAA,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,EAAE,cAA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