@junando/webhook 0.16.0 → 0.16.2
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/dist/handler.cjs +7 -4
- 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
|
|
@@ -95074,7 +95077,6 @@ const ConfigSchema = object({
|
|
|
95074
95077
|
redisUrl: string$1().url().optional(),
|
|
95075
95078
|
sqsQueueUrl: string$1().url().optional().or(literal("")),
|
|
95076
95079
|
dedupTtlSeconds: number().int().positive().default(300),
|
|
95077
|
-
clusterWindowMs: number().int().positive().default(12e4),
|
|
95078
95080
|
logLevel: _enum([
|
|
95079
95081
|
"trace",
|
|
95080
95082
|
"debug",
|
|
@@ -95180,7 +95182,6 @@ async function loadConfig() {
|
|
|
95180
95182
|
dedupTableName: process.env["DEDUP_TABLE_NAME"],
|
|
95181
95183
|
sqsQueueUrl: process.env["SQS_QUEUE_URL"],
|
|
95182
95184
|
dedupTtlSeconds: process.env["DEDUP_TTL_SECONDS"],
|
|
95183
|
-
clusterWindowMs: process.env["CLUSTER_WINDOW_MS"],
|
|
95184
95185
|
logLevel: process.env["LOG_LEVEL"],
|
|
95185
95186
|
nodeEnv: process.env["NODE_ENV"],
|
|
95186
95187
|
llmFallbackModels: process.env["LLM_FALLBACK_MODELS"],
|
|
@@ -95307,7 +95308,8 @@ const RollbackButtonValueSchema = object({
|
|
|
95307
95308
|
serviceName: string$1().min(1),
|
|
95308
95309
|
endpointPath: string$1().min(1),
|
|
95309
95310
|
alertType: nativeEnum(AlertType),
|
|
95310
|
-
urgencyLevel: _enum(URGENCY_LEVELS)
|
|
95311
|
+
urgencyLevel: _enum(URGENCY_LEVELS),
|
|
95312
|
+
probableCause: string$1().optional()
|
|
95311
95313
|
});
|
|
95312
95314
|
/**
|
|
95313
95315
|
* Parses and validates the JSON value encoded in the Slack rollback button.
|
|
@@ -95336,6 +95338,7 @@ function buildRollbackActionRequest(parsed, payload, correlationId) {
|
|
|
95336
95338
|
endpointPath: parsed.endpointPath,
|
|
95337
95339
|
alertType: parsed.alertType,
|
|
95338
95340
|
urgencyLevel: parsed.urgencyLevel,
|
|
95341
|
+
...parsed.probableCause !== undefined && { probableCause: parsed.probableCause },
|
|
95339
95342
|
triggeredBy: {
|
|
95340
95343
|
...payload.user?.id !== undefined && { id: payload.user.id },
|
|
95341
95344
|
...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.
|
|
3
|
+
"version": "0.16.2",
|
|
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.
|
|
23
|
+
"@junando/core": "0.16.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/aws-lambda": "^8.10.163",
|