@luckystack/core 0.7.5 → 0.7.6
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 +8 -0
- package/CLAUDE.md +2 -0
- package/dist/index.d.ts +21 -1
- package/dist/index.js +42 -0
- package/dist/index.js.map +1 -1
- package/docs/app-bootstrap.md +14 -0
- package/package.json +1 -1
package/docs/app-bootstrap.md
CHANGED
|
@@ -303,6 +303,20 @@ Returns `process.env.LUCKYSTACK_ENV` ?? `process.env.NODE_ENV` ?? `'development'
|
|
|
303
303
|
|
|
304
304
|
Reads the UUID for the given env key (defaults via `resolveEnvKey()`).
|
|
305
305
|
|
|
306
|
+
### `refreshBootUuid(envKey?: string): Promise<void>`
|
|
307
|
+
|
|
308
|
+
Extends the existing key with the configured TTL without changing its UUID. If
|
|
309
|
+
Redis recovered after the key had already expired, writes a fresh UUID instead.
|
|
310
|
+
The key is environment-level: every healthy backend may renew the current value,
|
|
311
|
+
so multi-instance readiness does not depend on the last process that wrote it.
|
|
312
|
+
|
|
313
|
+
### `startBootUuidHeartbeat(envKey?: string): BootUuidHeartbeat`
|
|
314
|
+
|
|
315
|
+
Starts an unref'd refresh loop at one third of the configured TTL. Each refresh
|
|
316
|
+
must settle before the next timer is scheduled, preventing overlapping Redis
|
|
317
|
+
calls during an outage. Failures are logged and retried. Call `stop()` during
|
|
318
|
+
server shutdown. `@luckystack/server` starts this only after HTTP listen succeeds.
|
|
319
|
+
|
|
306
320
|
### `collectSynchronizedEnvKeys(): string[]`
|
|
307
321
|
|
|
308
322
|
Walks `deployConfig.resources` and collects every `synchronizedEnvKeys[]` entry into a sorted unique list.
|