@teamscala/service-boot 0.23.465 → 0.23.466
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/package.json +1 -1
- package/src/mount-orpc-router.ts +17 -0
package/package.json
CHANGED
package/src/mount-orpc-router.ts
CHANGED
|
@@ -132,6 +132,23 @@ export async function mountOrpcRouter(
|
|
|
132
132
|
decryptSecretConfig: (raw) => decryptSecretConfig(raw as never),
|
|
133
133
|
});
|
|
134
134
|
|
|
135
|
+
// The fn capability primitives (foundation tier) cannot import the email
|
|
136
|
+
// client, so the boot layer injects the real sender — the same shape the
|
|
137
|
+
// bootloader already uses for getPrisma. Until configured, fn.workItems
|
|
138
|
+
// notification procedures degrade to { notified: 0 } with an error log
|
|
139
|
+
// (never throw).
|
|
140
|
+
try {
|
|
141
|
+
const [{ configureWorkItems }, { createEmailClient }] = await Promise.all([
|
|
142
|
+
import("@teamscala/db/work-items"),
|
|
143
|
+
import("@teamscala/email-client/client"),
|
|
144
|
+
]);
|
|
145
|
+
configureWorkItems({ emailSender: createEmailClient(), logger: log });
|
|
146
|
+
} catch (err) {
|
|
147
|
+
log.warn(
|
|
148
|
+
`[scala-install:${serviceSlug}] work-items email sender not wired: ${err instanceof Error ? err.message : err}`,
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
135
152
|
const resolveUser = async (headers: Headers) => {
|
|
136
153
|
if (isLocalhostRequest(headers)) {
|
|
137
154
|
return {
|