@checkstack/integration-webhook-backend 0.0.24 → 0.0.25

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,25 @@
1
1
  # @checkstack/integration-webhook-backend
2
2
 
3
+ ## 0.0.25
4
+
5
+ ### Patch Changes
6
+
7
+ - 8d1ef12: ## Downstream consumer bumps for the anomaly detection + cache system rollout
8
+
9
+ Packages on this branch were updated as part of the anomaly detection feature (schema annotations on result fields, plugin metadata for the modular cache system) but were not listed in the upstream changesets.
10
+
11
+ - **`@checkstack/healthcheck-common`** (minor) — new RPC contract additions and schema changes supporting per-field anomaly metadata.
12
+ - **`@checkstack/cache-memory-common`** (minor) — new package providing access rules + plugin metadata for the in-memory cache backend.
13
+ - **healthcheck plugins** (patch) — adopt the new `x-anomaly-*` schema annotations on their result fields so anomaly detection works automatically against their checks. No public API changes.
14
+ - **integration / notification / auth / queue / collector plugins** (patch) — minor internal updates as consumers of upstream API changes (cache plugin registry, schema additions). No public API changes.
15
+
16
+ - Updated dependencies [8d1ef12]
17
+ - Updated dependencies [8d1ef12]
18
+ - @checkstack/common@0.7.0
19
+ - @checkstack/backend-api@0.13.0
20
+ - @checkstack/integration-backend@0.1.20
21
+ - @checkstack/integration-common@0.2.9
22
+
3
23
  ## 0.0.24
4
24
 
5
25
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/integration-webhook-backend",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "checkstack": {
@@ -12,8 +12,8 @@
12
12
  "lint:code": "eslint . --max-warnings 0"
13
13
  },
14
14
  "dependencies": {
15
- "@checkstack/backend-api": "0.11.1",
16
- "@checkstack/integration-backend": "0.1.18",
15
+ "@checkstack/backend-api": "0.12.0",
16
+ "@checkstack/integration-backend": "0.1.19",
17
17
  "@checkstack/integration-common": "0.2.8",
18
18
  "@checkstack/common": "0.6.5",
19
19
  "zod": "^4.2.1"
package/src/index.ts CHANGED
@@ -1,7 +1,4 @@
1
- import {
2
- createBackendPlugin,
3
- coreServices,
4
- } from "@checkstack/backend-api";
1
+ import { createBackendPlugin, coreServices } from "@checkstack/backend-api";
5
2
  import { integrationProviderExtensionPoint } from "@checkstack/integration-backend";
6
3
  import { pluginMetadata } from "./plugin-metadata";
7
4
  import { webhookProvider } from "./provider";
@@ -19,7 +16,7 @@ export default createBackendPlugin({
19
16
 
20
17
  // Get the integration provider extension point
21
18
  const extensionPoint = env.getExtensionPoint(
22
- integrationProviderExtensionPoint
19
+ integrationProviderExtensionPoint,
23
20
  );
24
21
 
25
22
  // Register the webhook provider
@@ -27,7 +27,7 @@ const mockLogger = {
27
27
 
28
28
  // Create a test delivery context
29
29
  function createTestContext(
30
- configOverrides: Partial<WebhookConfig> = {}
30
+ configOverrides: Partial<WebhookConfig> = {},
31
31
  ): IntegrationDeliveryContext<WebhookConfig> {
32
32
  const defaultConfig: WebhookConfig = {
33
33
  url: "https://example.com/webhook",
@@ -158,7 +158,7 @@ describe("WebhookProvider", () => {
158
158
 
159
159
  const mockFetch = spyOn(globalThis, "fetch").mockImplementation((async (
160
160
  _url: RequestInfo | URL,
161
- options?: RequestInit
161
+ options?: RequestInit,
162
162
  ) => {
163
163
  capturedBody = options?.body as string;
164
164
  capturedHeaders = options?.headers as Record<string, string>;
@@ -184,7 +184,7 @@ describe("WebhookProvider", () => {
184
184
  expect(capturedHeaders?.["Content-Type"]).toBe("application/json");
185
185
  expect(capturedHeaders?.["X-Delivery-Id"]).toBe("del-456");
186
186
  expect(capturedHeaders?.["X-Event-Type"]).toBe(
187
- "test-plugin.incident.created"
187
+ "test-plugin.incident.created",
188
188
  );
189
189
  } finally {
190
190
  mockFetch.mockRestore();
@@ -197,7 +197,7 @@ describe("WebhookProvider", () => {
197
197
  return new Response(JSON.stringify({ id: "external-id-123" }), {
198
198
  status: 200,
199
199
  });
200
- }) as unknown as typeof fetch
200
+ }) as unknown as typeof fetch,
201
201
  );
202
202
 
203
203
  try {
@@ -215,7 +215,7 @@ describe("WebhookProvider", () => {
215
215
  const mockFetch = spyOn(globalThis, "fetch").mockImplementation(
216
216
  (async () => {
217
217
  return new Response("OK", { status: 200 });
218
- }) as unknown as typeof fetch
218
+ }) as unknown as typeof fetch,
219
219
  );
220
220
 
221
221
  try {
@@ -240,7 +240,7 @@ describe("WebhookProvider", () => {
240
240
 
241
241
  const mockFetch = spyOn(globalThis, "fetch").mockImplementation((async (
242
242
  _url: RequestInfo | URL,
243
- options?: RequestInit
243
+ options?: RequestInit,
244
244
  ) => {
245
245
  capturedHeaders = options?.headers as Record<string, string>;
246
246
  return new Response("OK", { status: 200 });
@@ -254,7 +254,7 @@ describe("WebhookProvider", () => {
254
254
  await webhookProvider.deliver(context);
255
255
 
256
256
  expect(capturedHeaders?.["Authorization"]).toBe(
257
- "Bearer my-secret-token"
257
+ "Bearer my-secret-token",
258
258
  );
259
259
  } finally {
260
260
  mockFetch.mockRestore();
@@ -266,7 +266,7 @@ describe("WebhookProvider", () => {
266
266
 
267
267
  const mockFetch = spyOn(globalThis, "fetch").mockImplementation((async (
268
268
  _url: RequestInfo | URL,
269
- options?: RequestInit
269
+ options?: RequestInit,
270
270
  ) => {
271
271
  capturedHeaders = options?.headers as Record<string, string>;
272
272
  return new Response("OK", { status: 200 });
@@ -282,7 +282,7 @@ describe("WebhookProvider", () => {
282
282
 
283
283
  // user:pass in base64
284
284
  const expectedAuth = `Basic ${Buffer.from("user:pass").toString(
285
- "base64"
285
+ "base64",
286
286
  )}`;
287
287
  expect(capturedHeaders?.["Authorization"]).toBe(expectedAuth);
288
288
  } finally {
@@ -295,7 +295,7 @@ describe("WebhookProvider", () => {
295
295
 
296
296
  const mockFetch = spyOn(globalThis, "fetch").mockImplementation((async (
297
297
  _url: RequestInfo | URL,
298
- options?: RequestInit
298
+ options?: RequestInit,
299
299
  ) => {
300
300
  capturedHeaders = options?.headers as Record<string, string>;
301
301
  return new Response("OK", { status: 200 });
@@ -320,7 +320,7 @@ describe("WebhookProvider", () => {
320
320
 
321
321
  const mockFetch = spyOn(globalThis, "fetch").mockImplementation((async (
322
322
  _url: RequestInfo | URL,
323
- options?: RequestInit
323
+ options?: RequestInit,
324
324
  ) => {
325
325
  capturedHeaders = options?.headers as Record<string, string>;
326
326
  return new Response("OK", { status: 200 });
@@ -352,7 +352,7 @@ describe("WebhookProvider", () => {
352
352
  const mockFetch = spyOn(globalThis, "fetch").mockImplementation(
353
353
  (async () => {
354
354
  return new Response("Not Found", { status: 404 });
355
- }) as unknown as typeof fetch
355
+ }) as unknown as typeof fetch,
356
356
  );
357
357
 
358
358
  try {
@@ -370,7 +370,7 @@ describe("WebhookProvider", () => {
370
370
  const mockFetch = spyOn(globalThis, "fetch").mockImplementation(
371
371
  (async () => {
372
372
  return new Response("Too Many Requests", { status: 429 });
373
- }) as unknown as typeof fetch
373
+ }) as unknown as typeof fetch,
374
374
  );
375
375
 
376
376
  try {
@@ -396,7 +396,7 @@ describe("WebhookProvider", () => {
396
396
  status: 429,
397
397
  headers,
398
398
  });
399
- }) as unknown as typeof fetch
399
+ }) as unknown as typeof fetch,
400
400
  );
401
401
 
402
402
  try {
@@ -415,7 +415,7 @@ describe("WebhookProvider", () => {
415
415
  const mockFetch = spyOn(globalThis, "fetch").mockImplementation(
416
416
  (async () => {
417
417
  throw new Error("ECONNREFUSED");
418
- }) as unknown as typeof fetch
418
+ }) as unknown as typeof fetch,
419
419
  );
420
420
 
421
421
  try {
@@ -434,7 +434,7 @@ describe("WebhookProvider", () => {
434
434
  const mockFetch = spyOn(globalThis, "fetch").mockImplementation(
435
435
  (async () => {
436
436
  throw new Error("timeout");
437
- }) as unknown as typeof fetch
437
+ }) as unknown as typeof fetch,
438
438
  );
439
439
 
440
440
  try {
@@ -460,7 +460,7 @@ describe("WebhookProvider", () => {
460
460
 
461
461
  const mockFetch = spyOn(globalThis, "fetch").mockImplementation((async (
462
462
  _url: RequestInfo | URL,
463
- options?: RequestInit
463
+ options?: RequestInit,
464
464
  ) => {
465
465
  capturedBody = options?.body as string;
466
466
  capturedContentType = (options?.headers as Record<string, string>)?.[
@@ -488,7 +488,7 @@ describe("WebhookProvider", () => {
488
488
 
489
489
  const mockFetch = spyOn(globalThis, "fetch").mockImplementation((async (
490
490
  _url: RequestInfo | URL,
491
- options?: RequestInit
491
+ options?: RequestInit,
492
492
  ) => {
493
493
  capturedBody = options?.body as string;
494
494
  capturedContentType = (options?.headers as Record<string, string>)?.[