@mikitasazan/notify 1.17.0 → 1.18.0
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/events.d.ts +1 -1
- package/dist/routes.d.ts +13 -5
- package/dist/routes.js +6 -2
- package/package.json +1 -1
package/dist/events.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* - required fields are never added — only a new event type.
|
|
11
11
|
* That keeps old caller code and a new package compatible both ways.
|
|
12
12
|
*/
|
|
13
|
-
export type Project = 'playhub' | 'one-q' | 'zabukai' | 'game-publisher' | 'vault' | 'mac-config' | 'alitools';
|
|
13
|
+
export type Project = 'playhub' | 'one-q' | 'zabukai' | 'game-publisher' | 'vault' | 'mac-config' | 'alitools' | 'playgust';
|
|
14
14
|
/**
|
|
15
15
|
* A stable machine key for the task — the instance tag on the FIRST line of
|
|
16
16
|
* every card, shaped as `#key` (with no project name: the card already sits
|
package/dist/routes.d.ts
CHANGED
|
@@ -3,8 +3,13 @@
|
|
|
3
3
|
* touches: add a row to `ROUTES` — no new bot, no new secret, no edits in
|
|
4
4
|
* the projects themselves.
|
|
5
5
|
*
|
|
6
|
-
* The scheme: ONE
|
|
7
|
-
* notifications) and a "💬 Dev" tab
|
|
6
|
+
* The scheme: ONE CHAT PER PROJECT. A project with a team is a forum
|
|
7
|
+
* supergroup with an "⚙️ Ops" tab (robot notifications) and a "💬 Dev" tab
|
|
8
|
+
* (people's live chat). A project the owner runs alone is a plain
|
|
9
|
+
* supergroup without topics — the robots post straight into it and there
|
|
10
|
+
* is nobody to talk to in a Dev tab (owner's rule of 2026-09-05; the first
|
|
11
|
+
* such chat is `playgust`). A plain chat has no `ops` number: the message
|
|
12
|
+
* goes to the chat itself.
|
|
8
13
|
*
|
|
9
14
|
* Why not one shared forum with a topic per project — that was the first
|
|
10
15
|
* version, and it turned out to be a mistake: Telegram cannot hide one
|
|
@@ -23,10 +28,13 @@
|
|
|
23
28
|
*/
|
|
24
29
|
import type { NotifyEvent, Project } from './events.ts';
|
|
25
30
|
type Forum = {
|
|
26
|
-
/** The id of the project's forum
|
|
31
|
+
/** The id of the project's supergroup (forum or plain). */
|
|
27
32
|
chat: string;
|
|
28
|
-
/**
|
|
29
|
-
|
|
33
|
+
/**
|
|
34
|
+
* The "⚙️ Ops" tab — robots write here. Absent for a plain chat without
|
|
35
|
+
* topics (a solo project): the message then goes to the chat itself.
|
|
36
|
+
*/
|
|
37
|
+
ops?: number;
|
|
30
38
|
/**
|
|
31
39
|
* The "💬 Dev" tab — people. The bot does not write here; the field is
|
|
32
40
|
* kept for completeness. Optional: an infrastructure forum has no people
|
package/dist/routes.js
CHANGED
|
@@ -20,7 +20,11 @@ export const ROUTES = {
|
|
|
20
20
|
// publish delivered" (ali98x-sentry). No `dev` — the project's team lives
|
|
21
21
|
// in other systems, there are no people here. Until 18.08.2026 reports
|
|
22
22
|
// were getting lost on "unknown project" for weeks.
|
|
23
|
-
alitools: { chat: '-1003904331479', ops: 3 }
|
|
23
|
+
alitools: { chat: '-1003904331479', ops: 3 },
|
|
24
|
+
// Solo project, plain supergroup without topics (owner's rule 05.09.2026):
|
|
25
|
+
// no `ops`, no `dev`, the bot posts into the chat itself. Created
|
|
26
|
+
// 05.09.2026 as «Playgust · Ops».
|
|
27
|
+
playgust: { chat: '-1004334723487' }
|
|
24
28
|
};
|
|
25
29
|
/**
|
|
26
30
|
* Where an event goes. Everything goes to its own project's "Ops" tab; a
|
|
@@ -42,5 +46,5 @@ export const targets = (e) => {
|
|
|
42
46
|
console.error(`[notify] unknown project "${e.project}" — known: ${Object.keys(ROUTES).join(', ')}`);
|
|
43
47
|
return [];
|
|
44
48
|
}
|
|
45
|
-
return [{ chat: forum.chat, thread: forum.ops, silent: severity(e) === 'info' }];
|
|
49
|
+
return [{ chat: forum.chat, ...(forum.ops === undefined ? {} : { thread: forum.ops }), silent: severity(e) === 'info' }];
|
|
46
50
|
};
|
package/package.json
CHANGED