@luckystack/core 0.6.4 → 0.6.5
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 +11 -7
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -29,13 +29,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
29
29
|
|
|
30
30
|
- **Redis secret-manager pointer boot** (ADR 0026): the default Redis client no longer
|
|
31
31
|
fails auth with a baked-in `REDIS_PASSWORD_V<n>` pointer when it was built (during an
|
|
32
|
-
early import) before secrets resolved.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
early import) before secrets resolved. The framework EAGERLY REBUILDS + registers a
|
|
33
|
+
fresh client from the resolved env (`rebuildDefaultRedisClient()`), so the boot-UUID
|
|
34
|
+
write authenticates with the real password — no consumer code. **Correction over
|
|
35
|
+
0.6.3/0.6.4:** the rebuild logic was right but never TRIGGERED for a normal project (the
|
|
36
|
+
server-boot gate `getProjectConfig().secretManager?.url` is falsy — the scaffold doesn't
|
|
37
|
+
register `secretManager` into `projectConfig` — and bare `initSecretManager` wires no
|
|
38
|
+
`onApplied`). Core now publishes `notifySecretsResolved` onto a decoupled global-symbol
|
|
39
|
+
ARRAY (`Symbol.for('luckystack.secretsResolved.listeners')`) at module load, which
|
|
40
|
+
`@luckystack/secret-manager` fires automatically after every resolve — so the rebuild
|
|
41
|
+
happens at resolve time with zero consumer code, in prod and dev, and even survives a
|
|
42
|
+
dual `@luckystack/core` instance.
|
|
39
43
|
- **CORE-2** — `tryCatchSync<T, P = void>` now mirrors `tryCatch`'s `P` default,
|
|
40
44
|
so a params-less call can pass only the result type (`tryCatchSync<URL>(() =>
|
|
41
45
|
new URL(raw))`) instead of failing with TS2558.
|
package/dist/index.js
CHANGED
|
@@ -613,6 +613,15 @@ var notifySecretsResolved = (changedKeys) => {
|
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
};
|
|
616
|
+
var GLOBAL_LISTENERS_SYMBOL = /* @__PURE__ */ Symbol.for("luckystack.secretsResolved.listeners");
|
|
617
|
+
var getGlobalSecretsResolvedListeners = () => {
|
|
618
|
+
const existing = Reflect.get(globalThis, GLOBAL_LISTENERS_SYMBOL);
|
|
619
|
+
if (Array.isArray(existing)) return existing;
|
|
620
|
+
const created = [];
|
|
621
|
+
Reflect.set(globalThis, GLOBAL_LISTENERS_SYMBOL, created);
|
|
622
|
+
return created;
|
|
623
|
+
};
|
|
624
|
+
getGlobalSecretsResolvedListeners().push(notifySecretsResolved);
|
|
616
625
|
|
|
617
626
|
// src/redis.ts
|
|
618
627
|
var cachedDefault = null;
|