@checkstack/notification-backstage-backend 0.1.26 → 0.1.28
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 +28 -0
- package/package.json +4 -4
- package/src/index.ts +15 -2
- package/tsconfig.json +13 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @checkstack/notification-backstage-backend
|
|
2
2
|
|
|
3
|
+
## 0.1.28
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [302cd3f]
|
|
8
|
+
- @checkstack/backend-api@0.14.1
|
|
9
|
+
- @checkstack/notification-backend@1.0.1
|
|
10
|
+
- @checkstack/common@0.7.0
|
|
11
|
+
|
|
12
|
+
## 0.1.27
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 32d52c6: Bulk notifications affecting multiple systems and collapse lifecycle events into a single card.
|
|
17
|
+
|
|
18
|
+
Notifications now carry an optional `subjects` array (the entities they affect) and an optional `collapseKey` (so related notifications collapse into one row per recipient). Incidents, maintenances, anomalies, healthchecks, and dependency-impact events route through these new fields, so an incident affecting three systems produces one in-app notification + one external send per subscriber instead of three. Lifecycle updates for the same entity (created → updated → resolved) also collapse, with an expandable "+N updates" timeline.
|
|
19
|
+
|
|
20
|
+
Subject kinds are namespaced as `<pluginId>.<localKind>` and built via type-safe helpers exported from each domain's common package (`createSystemSubject`, `incidentCollapseKey`, etc.). The frontend kind registry (`registerSubjectKind`) lets plugins bind icon + label for their kinds; unknown kinds fall back to a generic chip.
|
|
21
|
+
|
|
22
|
+
All notification strategies (SMTP, Slack, Discord, Teams, Telegram, Pushover, Gotify, Webex, Backstage) render the affected subjects natively in their format (HTML cards, Slack blocks, Discord embed fields, adaptive cards, markdown lists, etc.).
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [32d52c6]
|
|
25
|
+
- Updated dependencies [32d52c6]
|
|
26
|
+
- Updated dependencies [32d52c6]
|
|
27
|
+
- Updated dependencies [32d52c6]
|
|
28
|
+
- @checkstack/notification-backend@1.0.0
|
|
29
|
+
- @checkstack/backend-api@0.14.0
|
|
30
|
+
|
|
3
31
|
## 0.1.26
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkstack/notification-backstage-backend",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.28",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"checkstack": {
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
".": "./src/index.ts"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
|
-
"typecheck": "
|
|
13
|
+
"typecheck": "tsgo -b"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@checkstack/backend-api": "0.
|
|
17
|
-
"@checkstack/notification-backend": "0.
|
|
16
|
+
"@checkstack/backend-api": "0.14.0",
|
|
17
|
+
"@checkstack/notification-backend": "1.0.0",
|
|
18
18
|
"@checkstack/common": "0.7.0",
|
|
19
19
|
"zod": "^4.2.1"
|
|
20
20
|
},
|
package/src/index.ts
CHANGED
|
@@ -187,10 +187,23 @@ const backstageStrategy: NotificationStrategy<
|
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
// Build the notification payload
|
|
191
|
-
|
|
190
|
+
// Build the notification payload. Backstage's notifications plugin only
|
|
191
|
+
// accepts a single description string and a single link, so subjects
|
|
192
|
+
// are appended to the description as a bulleted list — names hyperlink
|
|
193
|
+
// when URLs are present.
|
|
194
|
+
let description = notification.body
|
|
192
195
|
? markdownToPlainText(notification.body)
|
|
193
196
|
: undefined;
|
|
197
|
+
const subjects = notification.subjects ?? [];
|
|
198
|
+
if (subjects.length > 0) {
|
|
199
|
+
const lines = subjects.map((subject) =>
|
|
200
|
+
subject.url
|
|
201
|
+
? `- [${subject.name}](${subject.url})`
|
|
202
|
+
: `- ${subject.name}`,
|
|
203
|
+
);
|
|
204
|
+
const block = `**Affected:**\n${lines.join("\n")}`;
|
|
205
|
+
description = description ? `${description}\n\n${block}` : block;
|
|
206
|
+
}
|
|
194
207
|
|
|
195
208
|
const payload = {
|
|
196
209
|
recipients: {
|
package/tsconfig.json
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "@checkstack/tsconfig/backend.json"
|
|
3
|
-
|
|
2
|
+
"extends": "@checkstack/tsconfig/backend.json",
|
|
3
|
+
"references": [
|
|
4
|
+
{
|
|
5
|
+
"path": "../../core/backend-api"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"path": "../../core/common"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"path": "../../core/notification-backend"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|