@hadoku/service-kernel 0.1.6 → 0.1.8
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/lifecycle/announce.d.ts +35 -16
- package/dist/lifecycle/announce.js +163 -66
- package/dist/lifecycle/index.d.ts +1 -1
- package/dist/lifecycle/index.js +1 -1
- package/package.json +2 -2
|
@@ -22,13 +22,8 @@ export interface ReleaseOrdering {
|
|
|
22
22
|
}
|
|
23
23
|
/** The newest release notes in `dir`, by `ordering`, or null when there are none. */
|
|
24
24
|
export declare function latestRelease(dir: string, ordering: ReleaseOrdering): Promise<ReleaseNotes | null>;
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
-
* days and refuses an edit it has no record of, so older notes cannot be changed this way anyway.
|
|
28
|
-
*/
|
|
29
|
-
export declare const EDITABLE_RELEASES = 3;
|
|
30
|
-
/** The newest `count` release notes in `dir`, newest first, by `ordering`. */
|
|
31
|
-
export declare function recentReleases(dir: string, ordering: ReleaseOrdering, count?: number): Promise<ReleaseNotes[]>;
|
|
25
|
+
/** Every release's notes in `dir`, newest first, by `ordering`. */
|
|
26
|
+
export declare function allReleases(dir: string, ordering: ReleaseOrdering): Promise<ReleaseNotes[]>;
|
|
32
27
|
/** The `# ` heading is the title; everything after it is the body. */
|
|
33
28
|
export declare function parseNotes(version: string, text: string): ReleaseNotes;
|
|
34
29
|
/**
|
|
@@ -43,13 +38,31 @@ export declare function splitBody(body: string, max?: number): string[];
|
|
|
43
38
|
* the gap: those go. Other blank lines, block starts and anything inside a code fence stay.
|
|
44
39
|
*/
|
|
45
40
|
export declare function forDiscord(body: string): string;
|
|
41
|
+
/** Who a text credits: every `@name` in it, each once (case-insensitive), in the order it first names them. */
|
|
42
|
+
export declare function creditsIn(text: string): string[];
|
|
43
|
+
/** A credited name as the post shows it: bold, italic and underlined, its own markup characters escaped. */
|
|
44
|
+
export declare function creditMark(name: string): string;
|
|
45
|
+
/** Notes text with every `@name` credit shown as `creditMark(name)`: nobody is pinged. */
|
|
46
|
+
export declare function showCredits(text: string): string;
|
|
47
|
+
export declare function releaseEmbeds(notes: ReleaseNotes, appUrl: string): Embed[];
|
|
48
|
+
export interface CreditCount {
|
|
49
|
+
name: string;
|
|
50
|
+
count: number;
|
|
51
|
+
}
|
|
46
52
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
53
|
+
* How many things each person is credited with across `releases`: one per line of notes (a
|
|
54
|
+
* bullet) that names them, however often it does. Most credits first, then by name. Two spellings
|
|
55
|
+
* of one name differing only in case are one person, shown as first seen.
|
|
50
56
|
*/
|
|
51
|
-
export declare function
|
|
52
|
-
export declare
|
|
57
|
+
export declare function creditCounts(releases: readonly ReleaseNotes[]): CreditCount[];
|
|
58
|
+
export declare const CREDITS_TITLE = "Credits & attribution";
|
|
59
|
+
/**
|
|
60
|
+
* The credits post's text: a plain numbered list of everyone the notes credit, most first, with
|
|
61
|
+
* their count, then one line thanking the people `earlier` names, who helped before the release
|
|
62
|
+
* notes credited anyone. Plain text throughout (the operator, 2026-11-09: "doesn't need extra
|
|
63
|
+
* heading or making everything bold"). Null when it would name nobody.
|
|
64
|
+
*/
|
|
65
|
+
export declare function creditsBody(releases: readonly ReleaseNotes[], earlier: readonly string[]): string | null;
|
|
53
66
|
export interface AnnounceOptions {
|
|
54
67
|
/** This app's id: the idempotency key and `source` field are `<service>-release-<version>` / `service`. */
|
|
55
68
|
service: string;
|
|
@@ -59,6 +72,11 @@ export interface AnnounceOptions {
|
|
|
59
72
|
secret: string;
|
|
60
73
|
/** The secret's env var name, used only in the "no secret" skip log line. */
|
|
61
74
|
secretEnvName: string;
|
|
75
|
+
/**
|
|
76
|
+
* A file whose `@name`s are the people credited before there were release notes, listed after
|
|
77
|
+
* the counts in the credits post. Absent or missing file: nobody.
|
|
78
|
+
*/
|
|
79
|
+
earlierCreditsFile?: string;
|
|
62
80
|
archivebotUrl: string;
|
|
63
81
|
appUrl: string;
|
|
64
82
|
log: JsonLog;
|
|
@@ -66,9 +84,10 @@ export interface AnnounceOptions {
|
|
|
66
84
|
now?: () => Date;
|
|
67
85
|
}
|
|
68
86
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
87
|
+
* At boot, in this order: delete the credits post of every older release (404, none on record, is
|
|
88
|
+
* the usual answer); post the current release's notes; re-send every release's notes as edits, so a
|
|
89
|
+
* corrected notes file (a credit added, a typo) changes its post; then post the current release's
|
|
90
|
+
* credits, or edit them when already posted. ArchiveBot edits only a post whose shown text differs
|
|
91
|
+
* and never posts from an edit. Resolves on every outcome; each is logged, never thrown.
|
|
73
92
|
*/
|
|
74
93
|
export declare function announceRelease(options: AnnounceOptions): Promise<void>;
|
|
@@ -6,9 +6,14 @@
|
|
|
6
6
|
* idempotency key `<service>-release-<version>` is deduped by ArchiveBot for 7 days, so a restart
|
|
7
7
|
* posts nothing new.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Whoever a bullet credits is named in it as `@name` (docs/RELEASE.md § "Attribution"). The post
|
|
10
|
+
* shows each as ***__name__*** (bold, italic, underlined) and pings nobody: the operator, 2026-11-09,
|
|
11
|
+
* "we should not do discord @ mentions anymore".
|
|
12
|
+
*
|
|
13
|
+
* Under the newest notes stands one credits post, "Credits & attribution": a plain numbered list of
|
|
14
|
+
* everyone the notes have ever credited, most credits first, then a line thanking the people the
|
|
15
|
+
* app's earlier-credits file names, who helped before there were release notes. Each release deletes the previous release's credits post and
|
|
16
|
+
* posts its own after its notes, so the credits are always the newest post.
|
|
12
17
|
*
|
|
13
18
|
* `secret` is the app's webhook secret (empty = skip, never an error); a failed post never blocks
|
|
14
19
|
* boot, and the next boot retries it.
|
|
@@ -32,14 +37,9 @@ export async function latestRelease(dir, ordering) {
|
|
|
32
37
|
return null;
|
|
33
38
|
return parseNotes(newest.slice(0, -'.md'.length), await readFile(join(dir, newest), 'utf8'));
|
|
34
39
|
}
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
*/
|
|
39
|
-
export const EDITABLE_RELEASES = 3;
|
|
40
|
-
/** The newest `count` release notes in `dir`, newest first, by `ordering`. */
|
|
41
|
-
export async function recentReleases(dir, ordering, count = EDITABLE_RELEASES) {
|
|
42
|
-
const names = ordering.newestFirst(await readdir(dir)).slice(0, count);
|
|
40
|
+
/** Every release's notes in `dir`, newest first, by `ordering`. */
|
|
41
|
+
export async function allReleases(dir, ordering) {
|
|
42
|
+
const names = ordering.newestFirst(await readdir(dir));
|
|
43
43
|
return Promise.all(names.map(async (name) => parseNotes(name.slice(0, -'.md'.length), await readFile(join(dir, name), 'utf8'))));
|
|
44
44
|
}
|
|
45
45
|
/** The `# ` heading is the title; everything after it is the body. */
|
|
@@ -116,39 +116,93 @@ export function forDiscord(body) {
|
|
|
116
116
|
const heading = (line) => line !== undefined && line.trimStart().startsWith('#');
|
|
117
117
|
return out.filter((line, i) => line.trim() !== '' || !(heading(out[i - 1]) || heading(out[i + 1]))).join('\n');
|
|
118
118
|
}
|
|
119
|
-
/**
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
*/
|
|
124
|
-
export function mentionsIn(body) {
|
|
119
|
+
/** A credit in notes text: `@name`, not inside a word, a path or an address; a closing full stop is not part of it. */
|
|
120
|
+
const CREDIT = /(?<![\w@/])@([A-Za-z0-9_.-]*[A-Za-z0-9_])/g;
|
|
121
|
+
/** Who a text credits: every `@name` in it, each once (case-insensitive), in the order it first names them. */
|
|
122
|
+
export function creditsIn(text) {
|
|
125
123
|
const names = new Map();
|
|
126
|
-
for (const match of
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
names.set(name.toLowerCase(), name);
|
|
124
|
+
for (const match of text.matchAll(CREDIT)) {
|
|
125
|
+
if (!names.has(match[1].toLowerCase()))
|
|
126
|
+
names.set(match[1].toLowerCase(), match[1]);
|
|
130
127
|
}
|
|
131
128
|
return [...names.values()];
|
|
132
129
|
}
|
|
130
|
+
/** A credited name as the post shows it: bold, italic and underlined, its own markup characters escaped. */
|
|
131
|
+
export function creditMark(name) {
|
|
132
|
+
return `***__${name.replace(/[\\*_~`|]/g, (c) => `\\${c}`)}__***`;
|
|
133
|
+
}
|
|
134
|
+
/** Notes text with every `@name` credit shown as `creditMark(name)`: nobody is pinged. */
|
|
135
|
+
export function showCredits(text) {
|
|
136
|
+
return text.replace(CREDIT, (_, name) => creditMark(name));
|
|
137
|
+
}
|
|
133
138
|
export function releaseEmbeds(notes, appUrl) {
|
|
134
|
-
return splitBody(forDiscord(notes.body)).map((description, i) => ({
|
|
139
|
+
return splitBody(showCredits(forDiscord(notes.body))).map((description, i) => ({
|
|
135
140
|
...(i === 0 ? { title: notes.title } : {}),
|
|
136
141
|
description,
|
|
137
142
|
url: appUrl,
|
|
138
143
|
color: 0x2f855a,
|
|
139
144
|
}));
|
|
140
145
|
}
|
|
141
|
-
/**
|
|
146
|
+
/**
|
|
147
|
+
* How many things each person is credited with across `releases`: one per line of notes (a
|
|
148
|
+
* bullet) that names them, however often it does. Most credits first, then by name. Two spellings
|
|
149
|
+
* of one name differing only in case are one person, shown as first seen.
|
|
150
|
+
*/
|
|
151
|
+
export function creditCounts(releases) {
|
|
152
|
+
const counts = new Map();
|
|
153
|
+
for (const notes of releases) {
|
|
154
|
+
for (const line of forDiscord(notes.body).split('\n')) {
|
|
155
|
+
for (const name of creditsIn(line)) {
|
|
156
|
+
const key = name.toLowerCase();
|
|
157
|
+
const entry = counts.get(key) ?? { name, count: 0 };
|
|
158
|
+
entry.count += 1;
|
|
159
|
+
counts.set(key, entry);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return [...counts.values()].sort((a, b) => b.count - a.count || a.name.toLowerCase().localeCompare(b.name.toLowerCase()));
|
|
164
|
+
}
|
|
165
|
+
export const CREDITS_TITLE = 'Credits & attribution';
|
|
166
|
+
/** Names joined the way the operator writes them: `a`, `a and b`, `a, b, and c`. */
|
|
167
|
+
function listed(names) {
|
|
168
|
+
if (names.length <= 2)
|
|
169
|
+
return names.join(' and ');
|
|
170
|
+
return `${names.slice(0, -1).join(', ')}, and ${names.at(-1)}`;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* The credits post's text: a plain numbered list of everyone the notes credit, most first, with
|
|
174
|
+
* their count, then one line thanking the people `earlier` names, who helped before the release
|
|
175
|
+
* notes credited anyone. Plain text throughout (the operator, 2026-11-09: "doesn't need extra
|
|
176
|
+
* heading or making everything bold"). Null when it would name nobody.
|
|
177
|
+
*/
|
|
178
|
+
export function creditsBody(releases, earlier) {
|
|
179
|
+
const counts = creditCounts(releases);
|
|
180
|
+
if (counts.length === 0 && earlier.length === 0)
|
|
181
|
+
return null;
|
|
182
|
+
const parts = [];
|
|
183
|
+
if (counts.length > 0)
|
|
184
|
+
parts.push(counts.map((c, i) => `${i + 1}. ${c.name} — ${c.count}`).join('\n'));
|
|
185
|
+
if (earlier.length > 0)
|
|
186
|
+
parts.push(`Extra thanks to ${listed(earlier)}, who contributed many things before the release notes started crediting anyone.`);
|
|
187
|
+
return parts.join('\n\n');
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* The signed ArchiveBot request for one release's notes: its idempotency key is the release's own,
|
|
191
|
+
* its record is kept for good (`retain`), and an edit with no record finds the post by its title's
|
|
192
|
+
* version (`find`), so a release of any age can still be corrected.
|
|
193
|
+
*/
|
|
142
194
|
function notesPayload(service, notes, appUrl, now) {
|
|
143
|
-
const
|
|
195
|
+
const titlePrefix = notes.title.startsWith(`${notes.version} `) ? `${notes.version} ` : notes.title;
|
|
144
196
|
return JSON.stringify({
|
|
145
197
|
idempotencyKey: `${service}-release-${notes.version}`,
|
|
146
198
|
timestamp: now.getTime(),
|
|
147
199
|
source: service,
|
|
148
|
-
|
|
200
|
+
retain: true,
|
|
201
|
+
find: { titlePrefix },
|
|
149
202
|
embeds: releaseEmbeds(notes, appUrl),
|
|
150
203
|
});
|
|
151
204
|
}
|
|
205
|
+
const creditsKey = (service, version) => `${service}-credits-${version}`;
|
|
152
206
|
async function postSigned(options, path, body) {
|
|
153
207
|
const signature = createHmac('sha256', options.secret).update(body).digest('hex');
|
|
154
208
|
return (options.fetch ?? fetch)(`${options.archivebotUrl}${path}`, {
|
|
@@ -158,11 +212,30 @@ async function postSigned(options, path, body) {
|
|
|
158
212
|
signal: AbortSignal.timeout(10_000),
|
|
159
213
|
});
|
|
160
214
|
}
|
|
215
|
+
/** POST `body` to ArchiveBot's `path`: the status, the raw reply, and a 2xx reply parsed (`{}` otherwise). */
|
|
216
|
+
async function call(options, path, body) {
|
|
217
|
+
const res = await postSigned(options, path, body);
|
|
218
|
+
const raw = await res.text();
|
|
219
|
+
return { status: res.status, ok: res.ok, raw, answer: res.ok ? JSON.parse(raw) : {} };
|
|
220
|
+
}
|
|
221
|
+
async function readEarlierCredits(file) {
|
|
222
|
+
if (file === undefined)
|
|
223
|
+
return [];
|
|
224
|
+
try {
|
|
225
|
+
return creditsIn(await readFile(file, 'utf8'));
|
|
226
|
+
}
|
|
227
|
+
catch (err) {
|
|
228
|
+
if (err.code === 'ENOENT')
|
|
229
|
+
return [];
|
|
230
|
+
throw err;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
161
233
|
/**
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
234
|
+
* At boot, in this order: delete the credits post of every older release (404, none on record, is
|
|
235
|
+
* the usual answer); post the current release's notes; re-send every release's notes as edits, so a
|
|
236
|
+
* corrected notes file (a credit added, a typo) changes its post; then post the current release's
|
|
237
|
+
* credits, or edit them when already posted. ArchiveBot edits only a post whose shown text differs
|
|
238
|
+
* and never posts from an edit. Resolves on every outcome; each is logged, never thrown.
|
|
166
239
|
*/
|
|
167
240
|
export async function announceRelease(options) {
|
|
168
241
|
const { log, service, ordering } = options;
|
|
@@ -171,62 +244,86 @@ export async function announceRelease(options) {
|
|
|
171
244
|
return;
|
|
172
245
|
}
|
|
173
246
|
const now = () => (options.now ?? (() => new Date()))();
|
|
247
|
+
let releases;
|
|
174
248
|
try {
|
|
175
|
-
|
|
176
|
-
if (notes === null) {
|
|
177
|
-
log({ event: 'release-announce', outcome: 'skipped', reason: `no release notes in ${options.releasesDir}` });
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
const res = await postSigned(options, '/api/messages/send', notesPayload(service, notes, options.appUrl, now()));
|
|
181
|
-
const reply = await res.text();
|
|
182
|
-
if (!res.ok) {
|
|
183
|
-
log({ event: 'release-announce', outcome: 'failed', version: notes.version, status: res.status, reply: reply.slice(0, 500) });
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
const answer = JSON.parse(reply);
|
|
187
|
-
log({
|
|
188
|
-
event: 'release-announce',
|
|
189
|
-
outcome: answer.deduped === true ? 'already-posted' : 'posted',
|
|
190
|
-
version: notes.version,
|
|
191
|
-
// A name ArchiveBot could not match to anyone is posted as plain text: say so, so it can be fixed.
|
|
192
|
-
...(answer.unresolved !== undefined && answer.unresolved.length > 0 ? { unresolved: answer.unresolved } : {}),
|
|
193
|
-
});
|
|
249
|
+
releases = await allReleases(options.releasesDir, ordering);
|
|
194
250
|
}
|
|
195
251
|
catch (err) {
|
|
196
252
|
log({ event: 'release-announce', outcome: 'failed', error: err instanceof Error ? err.message : String(err) });
|
|
197
253
|
return;
|
|
198
254
|
}
|
|
199
|
-
|
|
255
|
+
const notes = releases[0];
|
|
256
|
+
if (notes === undefined) {
|
|
257
|
+
log({ event: 'release-announce', outcome: 'skipped', reason: `no release notes in ${options.releasesDir}` });
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
for (const older of releases.slice(1)) {
|
|
261
|
+
try {
|
|
262
|
+
const res = await call(options, '/api/messages/delete', JSON.stringify({ idempotencyKey: creditsKey(service, older.version), timestamp: now().getTime(), source: service }));
|
|
263
|
+
if (res.status === 404)
|
|
264
|
+
continue;
|
|
265
|
+
log({ event: 'release-credits', outcome: res.ok ? 'deleted' : 'failed', version: older.version, ...(res.ok ? {} : { status: res.status, reply: res.raw.slice(0, 500) }) });
|
|
266
|
+
}
|
|
267
|
+
catch (err) {
|
|
268
|
+
log({ event: 'release-credits', outcome: 'failed', version: older.version, error: err instanceof Error ? err.message : String(err) });
|
|
269
|
+
}
|
|
270
|
+
}
|
|
200
271
|
try {
|
|
201
|
-
|
|
272
|
+
const res = await call(options, '/api/messages/send', notesPayload(service, notes, options.appUrl, now()));
|
|
273
|
+
if (!res.ok) {
|
|
274
|
+
log({ event: 'release-announce', outcome: 'failed', version: notes.version, status: res.status, reply: res.raw.slice(0, 500) });
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
log({ event: 'release-announce', outcome: res.answer.deduped === true ? 'already-posted' : 'posted', version: notes.version });
|
|
202
278
|
}
|
|
203
279
|
catch (err) {
|
|
204
|
-
log({ event: 'release-
|
|
280
|
+
log({ event: 'release-announce', outcome: 'failed', version: notes.version, error: err instanceof Error ? err.message : String(err) });
|
|
205
281
|
return;
|
|
206
282
|
}
|
|
207
|
-
for (const
|
|
283
|
+
for (const release of releases) {
|
|
208
284
|
try {
|
|
209
|
-
const res = await
|
|
210
|
-
|
|
211
|
-
// 404: ArchiveBot holds no post for it (older than its 7-day record): nothing to change.
|
|
285
|
+
const res = await call(options, '/api/messages/edit', notesPayload(service, release, options.appUrl, now()));
|
|
286
|
+
// 404: no post for it, on record or in the channel's history: nothing to change.
|
|
212
287
|
if (res.status === 404)
|
|
213
288
|
continue;
|
|
214
289
|
if (!res.ok) {
|
|
215
|
-
log({ event: 'release-edit', outcome: 'failed', version:
|
|
290
|
+
log({ event: 'release-edit', outcome: 'failed', version: release.version, status: res.status, reply: res.raw.slice(0, 500) });
|
|
216
291
|
continue;
|
|
217
292
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
continue;
|
|
221
|
-
log({
|
|
222
|
-
event: 'release-edit',
|
|
223
|
-
outcome: 'edited',
|
|
224
|
-
version: notes.version,
|
|
225
|
-
...(answer.unresolved !== undefined && answer.unresolved.length > 0 ? { unresolved: answer.unresolved } : {}),
|
|
226
|
-
});
|
|
293
|
+
if (res.answer.edited === true)
|
|
294
|
+
log({ event: 'release-edit', outcome: 'edited', version: release.version });
|
|
227
295
|
}
|
|
228
296
|
catch (err) {
|
|
229
|
-
log({ event: 'release-edit', outcome: 'failed', version:
|
|
297
|
+
log({ event: 'release-edit', outcome: 'failed', version: release.version, error: err instanceof Error ? err.message : String(err) });
|
|
230
298
|
}
|
|
231
299
|
}
|
|
300
|
+
try {
|
|
301
|
+
const body = creditsBody(releases, await readEarlierCredits(options.earlierCreditsFile));
|
|
302
|
+
if (body === null)
|
|
303
|
+
return;
|
|
304
|
+
const payload = (at) => JSON.stringify({
|
|
305
|
+
idempotencyKey: creditsKey(service, notes.version),
|
|
306
|
+
timestamp: at.getTime(),
|
|
307
|
+
source: service,
|
|
308
|
+
retain: true,
|
|
309
|
+
embeds: splitBody(body).map((description, i) => ({ ...(i === 0 ? { title: CREDITS_TITLE } : {}), description, url: options.appUrl, color: 0x2f855a })),
|
|
310
|
+
});
|
|
311
|
+
const sent = await call(options, '/api/messages/send', payload(now()));
|
|
312
|
+
if (!sent.ok) {
|
|
313
|
+
log({ event: 'release-credits', outcome: 'failed', version: notes.version, status: sent.status, reply: sent.raw.slice(0, 500) });
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
if (sent.answer.deduped !== true) {
|
|
317
|
+
log({ event: 'release-credits', outcome: 'posted', version: notes.version });
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
const edited = await call(options, '/api/messages/edit', payload(now()));
|
|
321
|
+
if (!edited.ok)
|
|
322
|
+
log({ event: 'release-credits', outcome: 'failed', version: notes.version, status: edited.status, reply: edited.raw.slice(0, 500) });
|
|
323
|
+
else if (edited.answer.edited === true)
|
|
324
|
+
log({ event: 'release-credits', outcome: 'edited', version: notes.version });
|
|
325
|
+
}
|
|
326
|
+
catch (err) {
|
|
327
|
+
log({ event: 'release-credits', outcome: 'failed', version: notes.version, error: err instanceof Error ? err.message : String(err) });
|
|
328
|
+
}
|
|
232
329
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { busyHandler, isLocalProbe, type BusyReport, type BusyRun } from './busy.js';
|
|
2
2
|
export { bootClock } from './bootClock.js';
|
|
3
3
|
export { closeConnections, sendThenFlush, type Closable, type Flushable } from './flush-sockets.js';
|
|
4
|
-
export { announceRelease,
|
|
4
|
+
export { allReleases, announceRelease, creditCounts, creditMark, creditsBody, creditsIn, CREDITS_TITLE, forDiscord, latestRelease, parseNotes, releaseEmbeds, showCredits, splitBody, type AnnounceOptions, type CreditCount, type Embed, type ReleaseNotes, type ReleaseOrdering, } from './announce.js';
|
package/dist/lifecycle/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { busyHandler, isLocalProbe } from "./busy.js";
|
|
2
2
|
export { bootClock } from "./bootClock.js";
|
|
3
3
|
export { closeConnections, sendThenFlush } from "./flush-sockets.js";
|
|
4
|
-
export { announceRelease,
|
|
4
|
+
export { allReleases, announceRelease, creditCounts, creditMark, creditsBody, creditsIn, CREDITS_TITLE, forDiscord, latestRelease, parseNotes, releaseEmbeds, showCredits, splitBody, } from "./announce.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hadoku/service-kernel",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "0.1.8",
|
|
4
|
+
"gitHead": "071a7cf29596c25157adb9ec3ce4b6369c9e805a",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"description": "The server parts any game keeps: edge auth and the tier gate, base path and bundle check, health and the busy probe, lifecycle, the JSON logger, the state directory, telemetry and capacity, per-caller limits, the browser relays, the erase registry, and createGameServer, which boots a game from its config and plugins. Knows no game; the app binds its service id, prefix and env names. MIT; imports only node built-ins, express, socket.io and @wolffm/*.",
|