@checkstack/healthcheck-http-backend 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @checkstack/healthcheck-http-backend
2
2
 
3
+ ## 0.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 83557c7: ## Multi-Type Editor Support for HTTP Requests
8
+
9
+ - Updated request collector to use new multi-type editor field for body templates
10
+
11
+ - Updated dependencies [83557c7]
12
+ - Updated dependencies [83557c7]
13
+ - @checkstack/backend-api@0.4.0
14
+ - @checkstack/common@0.4.0
15
+ - @checkstack/healthcheck-common@0.4.1
16
+
3
17
  ## 0.1.5
4
18
 
5
19
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/healthcheck-http-backend",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  Versioned,
3
3
  z,
4
+ configString,
4
5
  type HealthCheckRunForAggregation,
5
6
  type CollectorResult,
6
7
  type CollectorStrategy,
@@ -29,7 +30,11 @@ const requestConfigSchema = z.object({
29
30
  .array(z.object({ name: z.string(), value: z.string() }))
30
31
  .optional()
31
32
  .describe("Request headers"),
32
- body: z.string().optional().describe("Request body"),
33
+ body: configString({
34
+ "x-editor-types": ["none", "raw", "json", "yaml", "xml", "formdata"],
35
+ })
36
+ .optional()
37
+ .describe("Request body"),
33
38
  timeout: z
34
39
  .number()
35
40
  .min(100)
@@ -94,15 +99,12 @@ export type RequestAggregatedResult = z.infer<typeof requestAggregatedSchema>;
94
99
  * Built-in HTTP request collector.
95
100
  * Allows users to make HTTP requests and check responses.
96
101
  */
97
- export class RequestCollector
98
- implements
99
- CollectorStrategy<
100
- HttpTransportClient,
101
- RequestConfig,
102
- RequestResult,
103
- RequestAggregatedResult
104
- >
105
- {
102
+ export class RequestCollector implements CollectorStrategy<
103
+ HttpTransportClient,
104
+ RequestConfig,
105
+ RequestResult,
106
+ RequestAggregatedResult
107
+ > {
106
108
  id = "request";
107
109
  displayName = "HTTP Request";
108
110
  description = "Make an HTTP request and check the response";
@@ -161,7 +163,7 @@ export class RequestCollector
161
163
  }
162
164
 
163
165
  aggregateResult(
164
- runs: HealthCheckRunForAggregation<RequestResult>[]
166
+ runs: HealthCheckRunForAggregation<RequestResult>[],
165
167
  ): RequestAggregatedResult {
166
168
  const times = runs
167
169
  .map((r) => r.metadata?.responseTimeMs)