@junando/webhook 0.16.0 → 0.16.1

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 (2) hide show
  1. package/dist/handler.cjs +7 -2
  2. package/package.json +2 -2
package/dist/handler.cjs CHANGED
@@ -65730,6 +65730,7 @@ function sanitizeEndpointPath(endpointPath) {
65730
65730
  if (!endpointPath) return "unknown";
65731
65731
  return endpointPath.replaceAll("`", "").slice(0, 200);
65732
65732
  }
65733
+ const ROLLBACK_PROBABLE_CAUSE_MAX_LEN = 500;
65733
65734
  var SlackNotifier = class {
65734
65735
  botToken;
65735
65736
  channel;
@@ -65845,7 +65846,8 @@ var SlackNotifier = class {
65845
65846
  serviceName: cluster.serviceName,
65846
65847
  endpointPath: cluster.endpointPath,
65847
65848
  alertType: cluster.alertType,
65848
- urgencyLevel: analysis.urgency_level
65849
+ urgencyLevel: analysis.urgency_level,
65850
+ probableCause: analysis.probable_cause.slice(0, ROLLBACK_PROBABLE_CAUSE_MAX_LEN)
65849
65851
  }),
65850
65852
  confirm: {
65851
65853
  title: {
@@ -73668,6 +73670,7 @@ var NoopRollbackActionHandler = class {
73668
73670
  endpointPath: request.endpointPath,
73669
73671
  alertType: request.alertType,
73670
73672
  urgencyLevel: request.urgencyLevel,
73673
+ probableCause: request.probableCause,
73671
73674
  triggeredBy: request.triggeredBy,
73672
73675
  correlationId: request.correlationId,
73673
73676
  messageTs: request.messageTs
@@ -95307,7 +95310,8 @@ const RollbackButtonValueSchema = object({
95307
95310
  serviceName: string$1().min(1),
95308
95311
  endpointPath: string$1().min(1),
95309
95312
  alertType: nativeEnum(AlertType),
95310
- urgencyLevel: _enum(URGENCY_LEVELS)
95313
+ urgencyLevel: _enum(URGENCY_LEVELS),
95314
+ probableCause: string$1().optional()
95311
95315
  });
95312
95316
  /**
95313
95317
  * Parses and validates the JSON value encoded in the Slack rollback button.
@@ -95336,6 +95340,7 @@ function buildRollbackActionRequest(parsed, payload, correlationId) {
95336
95340
  endpointPath: parsed.endpointPath,
95337
95341
  alertType: parsed.alertType,
95338
95342
  urgencyLevel: parsed.urgencyLevel,
95343
+ ...parsed.probableCause !== undefined && { probableCause: parsed.probableCause },
95339
95344
  triggeredBy: {
95340
95345
  ...payload.user?.id !== undefined && { id: payload.user.id },
95341
95346
  ...payload.user?.username !== undefined && { username: payload.user.username },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junando/webhook",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "AWS Lambda webhook handler — receives and enqueues external alert payloads for Junando",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "@aws-sdk/client-sqs": "^3.1127.0",
22
22
  "zod": "^4.5.4",
23
- "@junando/core": "0.16.0"
23
+ "@junando/core": "0.16.1"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/aws-lambda": "^8.10.163",