appos 0.10.3-0 → 0.10.5-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/api/auth.d.mts +3 -3
- package/dist/api/cache.d.mts +2 -2
- package/dist/api/cli.d.mts +5 -5
- package/dist/api/cli.mjs +12 -12
- package/dist/api/container.d.mts +5 -5
- package/dist/api/container.mjs +2 -2
- package/dist/api/database.d.mts +2 -2
- package/dist/api/database.mjs +2 -2
- package/dist/api/event.d.mts +236 -5
- package/dist/api/event.mjs +234 -3
- package/dist/api/instrumentation.d.mts +2 -1
- package/dist/api/instrumentation.mjs +3 -3
- package/dist/api/mailer.d.mts +5 -5
- package/dist/api/mailer.mjs +3 -4
- package/dist/api/observability.d.mts +3 -3
- package/dist/api/observability.mjs +1 -1
- package/dist/api/openapi.d.mts +5 -5
- package/dist/api/openapi.mjs +465 -3
- package/dist/api/server.d.mts +5 -5
- package/dist/api/server.mjs +5 -6
- package/dist/api/ssr.d.mts +27 -5
- package/dist/api/ssr.mjs +16 -2
- package/dist/api/storage.d.mts +5 -5
- package/dist/api/storage.mjs +2 -3
- package/dist/api/worker.mjs +22 -1
- package/dist/api/workflow.d.mts +5 -5
- package/dist/api/workflow.mjs +2 -3
- package/dist/app-context-Co0rCDdZ.mjs +3 -0
- package/dist/{auth-qap754qy.d.mts → auth-Cn1L6HLs.d.mts} +35 -118
- package/dist/{auth-DcGxNJMM.d.ts → auth-ZWBLYkOZ.d.ts} +698 -802
- package/dist/{cache-M0z3800A.d.mts → cache-CJqBlATk.d.mts} +3 -3
- package/dist/{chunk-Bjknorp7.mjs → chunk-CgcgkAfe.mjs} +3 -3
- package/dist/colors-B4arFOdJ.mjs +3 -0
- package/dist/{constants-Bj0Fwj1k.mjs → constants-D14iAtMu.mjs} +1 -1
- package/dist/{container-C9X9U2J4.d.mts → container-CIm1-Ogf.d.mts} +62 -290
- package/dist/{database-CxDXJbvJ.d.mts → database-C4QyLQ0H.d.mts} +5 -7
- package/dist/{database-B9puLKd7.mjs → database-lzS5JWOl.mjs} +6 -7
- package/dist/devtools/test.d.mts +8 -8
- package/dist/devtools/test.mjs +7 -8
- package/dist/devtools/vite.d.mts +39 -3
- package/dist/devtools/vite.mjs +25 -13
- package/dist/instrumentation-D3_99Qvn.d.mts +7 -0
- package/dist/{instrumentation-NIH3Iibm.mjs → instrumentation-Eq5T7g1h.mjs} +2 -2
- package/dist/{observability-CeiD9O-v.d.mts → observability-NQdrXEya.d.mts} +2 -2
- package/dist/{panel-BEKf0o40.mjs → panel-Ci_q5lir.mjs} +2 -2
- package/dist/panel-c_IJZekd.mjs +5 -0
- package/dist/{routes-DjUUF4j_.mjs → routes-BCFBeb0b.mjs} +1 -1
- package/dist/routes-_Bw7IBYS.mjs +4 -0
- package/dist/{server-BZ5i2-pR.mjs → server-BwlYpYEN.mjs} +108 -12
- package/dist/universal/auth.d.ts +1 -9
- package/dist/universal/auth.js +1 -5
- package/dist/web/auth.d.ts +2 -3
- package/dist/web/i18n.d.ts +65 -467
- package/dist/web/i18n.js +99 -3
- package/dist/web/ui/accordion.d.ts +5 -5
- package/dist/web/ui/alert-dialog.d.ts +13 -13
- package/dist/web/ui/alert-dialog.js +1 -1
- package/dist/web/ui/alert.d.ts +6 -6
- package/dist/web/ui/alert.js +101 -2
- package/dist/web/ui/animated-check.d.ts +3 -3
- package/dist/web/ui/animated-check.js +66 -2
- package/dist/web/ui/aspect-ratio.d.ts +2 -2
- package/dist/web/ui/auth.d.ts +3 -4
- package/dist/web/ui/auth.js +65 -314
- package/dist/web/ui/avatar.d.ts +7 -7
- package/dist/web/ui/badge.d.ts +3 -3
- package/dist/web/ui/badge.js +47 -2
- package/dist/web/ui/brand.d.ts +91 -2
- package/dist/web/ui/brand.js +126 -2
- package/dist/web/ui/breadcrumb.d.ts +7 -7
- package/dist/web/ui/button-group.d.ts +5 -5
- package/dist/web/ui/button-group.js +1 -1
- package/dist/web/ui/button.d.ts +5 -5
- package/dist/web/ui/button.js +79 -2
- package/dist/web/ui/calendar.d.ts +3 -3
- package/dist/web/ui/calendar.js +1 -1
- package/dist/web/ui/card.d.ts +8 -8
- package/dist/web/ui/card.js +152 -2
- package/dist/web/ui/carousel.d.ts +6 -6
- package/dist/web/ui/carousel.js +1 -1
- package/dist/web/ui/chart.d.ts +5 -5
- package/dist/web/ui/checkbox.d.ts +2 -2
- package/dist/web/ui/checkbox.js +31 -2
- package/dist/web/ui/collapsible.d.ts +4 -4
- package/dist/web/ui/command.d.ts +10 -10
- package/dist/web/ui/command.js +0 -3
- package/dist/web/ui/context-menu.d.ts +16 -16
- package/dist/web/ui/dialog.d.ts +11 -11
- package/dist/web/ui/dialog.js +1 -1
- package/dist/web/ui/drawer.d.ts +11 -11
- package/dist/web/ui/dropdown-menu.d.ts +16 -16
- package/dist/web/ui/empty.d.ts +9 -9
- package/dist/web/ui/empty.js +59 -2
- package/dist/web/ui/error-page.d.ts +16 -6
- package/dist/web/ui/error-page.js +107 -29
- package/dist/web/ui/field.d.ts +13 -13
- package/dist/web/ui/field.js +113 -4
- package/dist/web/ui/hover-card.d.ts +4 -4
- package/dist/web/ui/input-group.d.ts +10 -10
- package/dist/web/ui/input-group.js +3 -3
- package/dist/web/ui/input-otp.d.ts +5 -5
- package/dist/web/ui/input-otp.js +46 -2
- package/dist/web/ui/input.d.ts +2 -2
- package/dist/web/ui/input.js +25 -2
- package/dist/web/ui/item.d.ts +13 -13
- package/dist/web/ui/item.js +1 -1
- package/dist/web/ui/kbd.d.ts +3 -3
- package/dist/web/ui/label.d.ts +2 -2
- package/dist/web/ui/label.js +24 -2
- package/dist/web/ui/menubar.d.ts +17 -17
- package/dist/web/ui/navigation-menu.d.ts +11 -11
- package/dist/web/ui/pagination.d.ts +8 -8
- package/dist/web/ui/pagination.js +1 -1
- package/dist/web/ui/popover.d.ts +7 -7
- package/dist/web/ui/progress.d.ts +6 -6
- package/dist/web/ui/radio-group.d.ts +3 -3
- package/dist/web/ui/resizable.d.ts +4 -4
- package/dist/web/ui/scroll-area.d.ts +3 -3
- package/dist/web/ui/select.d.ts +10 -10
- package/dist/web/ui/separator.d.ts +2 -2
- package/dist/web/ui/separator.js +26 -2
- package/dist/web/ui/sheet.d.ts +9 -9
- package/dist/web/ui/sheet.js +1 -1
- package/dist/web/ui/sidebar.d.ts +22 -22
- package/dist/web/ui/sidebar.js +3 -3
- package/dist/web/ui/skeleton.d.ts +2 -2
- package/dist/web/ui/slider.d.ts +2 -2
- package/dist/web/ui/sonner.d.ts +2 -2
- package/dist/web/ui/spinner.d.ts +2 -2
- package/dist/web/ui/spinner.js +26 -2
- package/dist/web/ui/switch.d.ts +2 -2
- package/dist/web/ui/table.d.ts +9 -9
- package/dist/web/ui/tabs.d.ts +7 -7
- package/dist/web/ui/textarea.d.ts +2 -2
- package/dist/web/ui/textarea.js +23 -2
- package/dist/web/ui/theme.d.ts +3 -3
- package/dist/web/ui/toggle-group.d.ts +3 -3
- package/dist/web/ui/toggle.d.ts +4 -4
- package/dist/{workflow-X540Q57w.mjs → workflow-Cc101G1B.mjs} +2 -2
- package/package.json +51 -51
- package/src/devtools/storybook/.storybook/main.ts +20 -4
- package/src/universal/auth.ts +0 -14
- package/src/universal/locales/en/ui.json +33 -1
- package/src/universal/locales/zh-CN/ui.json +33 -1
- package/src/universal/locales/zh-TW/ui.json +33 -1
- package/src/web/routes/api-references/_layout.tsx +21 -22
- package/src/web/routes/api-references/utils.ts +33 -0
- package/src/web/routes/auth/_layout.tsx +20 -14
- package/src/web/routes/auth/email-otp.tsx +17 -0
- package/src/web/routes/auth/forgot-password.tsx +17 -0
- package/src/web/routes/auth/login.tsx +19 -1
- package/src/web/routes/auth/phone-otp.tsx +17 -0
- package/src/web/routes/auth/reset-password.tsx +17 -0
- package/src/web/routes/auth/signup.tsx +17 -0
- package/src/web/routes/auth/utils.ts +4 -0
- package/src/web/routes/auth/verify-email.tsx +17 -0
- package/src/web/routes/docs/$.tsx +7 -17
- package/src/web/routes/docs/_layout.tsx +56 -17
- package/src/web/routes/docs/utils.ts +17 -0
- package/src/web/ui/auth/auth-layout.tsx +19 -95
- package/src/web/ui/auth/auth-pages.stories.tsx +62 -0
- package/src/web/ui/auth/forms/login-form.tsx +9 -5
- package/src/web/ui/auth/forms/signup-form.tsx +1 -1
- package/src/web/ui/auth/forms/two-factor-form.tsx +2 -1
- package/src/web/ui/auth/index.ts +1 -9
- package/src/web/ui/auth/otp-input.tsx +6 -0
- package/src/web/ui/auth/trust-signals.tsx +25 -224
- package/src/web/ui/error-page.stories.tsx +228 -46
- package/src/web/ui/error-page.tsx +148 -32
- package/dist/alert-D8p18fEi.js +0 -103
- package/dist/animated-check-Dx73WV4f.js +0 -68
- package/dist/app-context-Lgi1UZsb.mjs +0 -3
- package/dist/badge-SAGMxRsc.js +0 -49
- package/dist/brand-MxWultcm.js +0 -128
- package/dist/brand-T7flc4kn.d.ts +0 -92
- package/dist/button-DLhbOhOV.js +0 -81
- package/dist/card-Bng7huZY.js +0 -154
- package/dist/checkbox-Dw7Z3UOS.js +0 -33
- package/dist/colors-DaKzQRaF.mjs +0 -3
- package/dist/empty-DMVQeDoW.js +0 -61
- package/dist/event-B2E4wFTO.mjs +0 -236
- package/dist/field-lDjAzuCR.js +0 -115
- package/dist/input-DiW5ycTG.js +0 -27
- package/dist/input-otp-DLJSuqk8.js +0 -48
- package/dist/instrumentation-Xc5_P1bJ.d.mts +0 -3
- package/dist/label-sDujRQCw.js +0 -26
- package/dist/openapi-B-UGCo72.mjs +0 -467
- package/dist/panel-BjA8Sxwg.mjs +0 -5
- package/dist/routes-C96It2J0.mjs +0 -4
- package/dist/separator-vfI-hGk2.js +0 -28
- package/dist/spinner-Dy9qr_gt.js +0 -28
- package/dist/textarea-CGZiDgfZ.js +0 -25
- package/dist/worker-Dv-oM9rL.mjs +0 -24
- package/src/web/ui/auth/auth-card.stories.tsx +0 -295
- package/src/web/ui/auth/auth-layout.stories.tsx +0 -294
- package/src/web/ui/auth/brand-content.tsx +0 -169
- package/src/web/ui/auth/email-input.stories.tsx +0 -167
- package/src/web/ui/auth/otp-input.stories.tsx +0 -199
- package/src/web/ui/auth/passkey-button.stories.tsx +0 -115
- package/src/web/ui/auth/passkey-register-button.stories.tsx +0 -109
- package/src/web/ui/auth/password-input.stories.tsx +0 -287
- package/src/web/ui/auth/phone-input.stories.tsx +0 -160
- package/src/web/ui/auth/social-buttons.stories.tsx +0 -217
- package/src/web/ui/auth/sso-button.stories.tsx +0 -160
- package/src/web/ui/auth/trust-signals.stories.tsx +0 -208
- /package/dist/{app-context-D1ZdyKbf.mjs → app-context-B442LxCN.mjs} +0 -0
- /package/dist/{colors-DRAZU8e-.mjs → colors-HSJNJt_Y.mjs} +0 -0
- /package/dist/{context-tMoLkr9-.mjs → context-CpUat6CJ.mjs} +0 -0
- /package/dist/{env-Dy3oGNWp.mjs → env-DEkC2Wod.mjs} +0 -0
- /package/dist/{logger-C8gOLrUv.d.mts → logger-BoaRYCuF.d.mts} +0 -0
- /package/dist/{utils-DcsrJr6q.d.ts → utils-B638PyaT.d.ts} +0 -0
- /package/dist/{vite-compat-Oc8CvUEd.mjs → vite-compat-B119swHE.mjs} +0 -0
- /package/dist/{youch-handler-DmUj_vMi.mjs → youch-handler-BTLdunoY.mjs} +0 -0
package/dist/api/auth.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../logger-
|
|
2
|
-
import "../database-
|
|
3
|
-
import { a as AuthCaptchaConfig, c as AuthSessionConfig, d as defineAuth, f as defineEndpointRateLimits, i as Auth, l as DefineAuthOptions, n as AccessController, o as AuthConfig, p as defineAuthSchema, r as AuditAction, s as AuthPasskeyConfig, t as AccessControlRoles, u as auditActionSchema } from "../auth-
|
|
1
|
+
import "../logger-BoaRYCuF.mjs";
|
|
2
|
+
import "../database-C4QyLQ0H.mjs";
|
|
3
|
+
import { a as AuthCaptchaConfig, c as AuthSessionConfig, d as defineAuth, f as defineEndpointRateLimits, i as Auth, l as DefineAuthOptions, n as AccessController, o as AuthConfig, p as defineAuthSchema, r as AuditAction, s as AuthPasskeyConfig, t as AccessControlRoles, u as auditActionSchema } from "../auth-Cn1L6HLs.mjs";
|
|
4
4
|
export { AccessControlRoles, AccessController, AuditAction, Auth, AuthCaptchaConfig, AuthConfig, AuthPasskeyConfig, AuthSessionConfig, DefineAuthOptions, auditActionSchema, defineAuth, defineAuthSchema, defineEndpointRateLimits };
|
package/dist/api/cache.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../logger-
|
|
2
|
-
import { a as RedisClient, i as DefineRedisClientOptions, n as DefineCacheOptions, o as defineRedisClient, r as defineCache, t as Cache } from "../cache-
|
|
1
|
+
import "../logger-BoaRYCuF.mjs";
|
|
2
|
+
import { a as RedisClient, i as DefineRedisClientOptions, n as DefineCacheOptions, o as defineRedisClient, r as defineCache, t as Cache } from "../cache-CJqBlATk.mjs";
|
|
3
3
|
export { Cache, DefineCacheOptions, DefineRedisClientOptions, RedisClient, defineCache, defineRedisClient };
|
package/dist/api/cli.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../logger-
|
|
2
|
-
import "../database-
|
|
3
|
-
import "../auth-
|
|
4
|
-
import "../cache-
|
|
5
|
-
import { n as Container } from "../container-
|
|
1
|
+
import "../logger-BoaRYCuF.mjs";
|
|
2
|
+
import "../database-C4QyLQ0H.mjs";
|
|
3
|
+
import "../auth-Cn1L6HLs.mjs";
|
|
4
|
+
import "../cache-CJqBlATk.mjs";
|
|
5
|
+
import { n as Container } from "../container-CIm1-Ogf.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { ChildProcess } from "node:child_process";
|
|
8
8
|
import * as p from "@clack/prompts";
|
package/dist/api/cli.mjs
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import "../auth-schema-DF53iTDS.mjs";
|
|
2
2
|
import "../redis-DwTSiGWI.mjs";
|
|
3
|
-
import { S as WEB_DIR, a as COMMANDS_DIR, d as EMAIL_THEME_FILE, g as MAIN_ENTRY, m as FIXTURES_DIR, o as DATABASES_DIR, p as FILE_EXT, r as BUILD_DIR, t as APPOS_DIR, w as version, x as TEST_EXTENSIONS, y as ROOT_CSS_FILE } from "../constants-
|
|
4
|
-
import {
|
|
5
|
-
import { i as loadWorkflows } from "../workflow-
|
|
6
|
-
import { r as defineMigrationOpts } from "../database-
|
|
7
|
-
import { t as defineServer } from "../server-
|
|
8
|
-
import "../instrumentation-
|
|
9
|
-
import "../app-context-
|
|
10
|
-
import "../
|
|
11
|
-
import "
|
|
12
|
-
import { t as defineWorker } from "../worker-Dv-oM9rL.mjs";
|
|
3
|
+
import { S as WEB_DIR, a as COMMANDS_DIR, d as EMAIL_THEME_FILE, g as MAIN_ENTRY, m as FIXTURES_DIR, o as DATABASES_DIR, p as FILE_EXT, r as BUILD_DIR, t as APPOS_DIR, w as version, x as TEST_EXTENSIONS, y as ROOT_CSS_FILE } from "../constants-D14iAtMu.mjs";
|
|
4
|
+
import { loadEvents } from "./event.mjs";
|
|
5
|
+
import { i as loadWorkflows } from "../workflow-Cc101G1B.mjs";
|
|
6
|
+
import { r as defineMigrationOpts } from "../database-lzS5JWOl.mjs";
|
|
7
|
+
import { t as defineServer } from "../server-BwlYpYEN.mjs";
|
|
8
|
+
import "../instrumentation-Eq5T7g1h.mjs";
|
|
9
|
+
import "../app-context-B442LxCN.mjs";
|
|
10
|
+
import "../context-CpUat6CJ.mjs";
|
|
11
|
+
import { defineWorker } from "./worker.mjs";
|
|
13
12
|
import { createRequire } from "node:module";
|
|
14
13
|
import { z } from "zod";
|
|
15
14
|
import path, { dirname, join } from "node:path";
|
|
@@ -493,7 +492,7 @@ var build_default = defineCommand({
|
|
|
493
492
|
await cp(`./${APPOS_DIR}/${DATABASES_DIR}`, `${outdir}/${APPOS_DIR}/${DATABASES_DIR}`, { recursive: true });
|
|
494
493
|
const rootCssPath = join(process.cwd(), WEB_DIR, ROOT_CSS_FILE);
|
|
495
494
|
if (existsSync(rootCssPath)) {
|
|
496
|
-
const { parseThemeFromString } = await import("../colors-
|
|
495
|
+
const { parseThemeFromString } = await import("../colors-B4arFOdJ.mjs");
|
|
497
496
|
const theme = parseThemeFromString(await readFile(rootCssPath, "utf-8"));
|
|
498
497
|
const emailTheme = {
|
|
499
498
|
background: theme.background,
|
|
@@ -1396,7 +1395,8 @@ var down_default = defineCommand({
|
|
|
1396
1395
|
"--profile=infra",
|
|
1397
1396
|
"down",
|
|
1398
1397
|
"--remove-orphans",
|
|
1399
|
-
"--timeout=0"
|
|
1398
|
+
"--timeout=0",
|
|
1399
|
+
"--volumes"
|
|
1400
1400
|
]));
|
|
1401
1401
|
} catch (error) {
|
|
1402
1402
|
ctx.fail(error instanceof Error ? error.message : String(error));
|
package/dist/api/container.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../logger-
|
|
2
|
-
import "../database-
|
|
3
|
-
import "../auth-
|
|
4
|
-
import "../cache-
|
|
5
|
-
import { An as DefineAppContextOpts, Mn as defineAppContext, On as isLocalDev, a as defineAppContainer, i as WorkerConfig, jn as SessionData, kn as AppContext, n as Container, r as ServerConfig, t as AppContainer } from "../container-
|
|
1
|
+
import "../logger-BoaRYCuF.mjs";
|
|
2
|
+
import "../database-C4QyLQ0H.mjs";
|
|
3
|
+
import "../auth-Cn1L6HLs.mjs";
|
|
4
|
+
import "../cache-CJqBlATk.mjs";
|
|
5
|
+
import { An as DefineAppContextOpts, Mn as defineAppContext, On as isLocalDev, a as defineAppContainer, i as WorkerConfig, jn as SessionData, kn as AppContext, n as Container, r as ServerConfig, t as AppContainer } from "../container-CIm1-Ogf.mjs";
|
|
6
6
|
export { AppContainer, AppContext, Container, DefineAppContextOpts, ServerConfig, SessionData, WorkerConfig, defineAppContainer, defineAppContext, isLocalDev };
|
package/dist/api/container.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as defineAppContext } from "../app-context-
|
|
2
|
-
import { t as isLocalDev } from "../env-
|
|
1
|
+
import { t as defineAppContext } from "../app-context-B442LxCN.mjs";
|
|
2
|
+
import { t as isLocalDev } from "../env-DEkC2Wod.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/container.ts
|
|
5
5
|
/**
|
package/dist/api/database.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../logger-
|
|
2
|
-
import { a as QualifiedTableNames, c as defineMigrationOpts, i as MigrationType, l as defineTestDatabase, n as DefineDatabaseOptions, o as dbChanges, r as DefineTestDatabaseOptions, s as defineDatabase, t as Database, u as migrationsSchema } from "../database-
|
|
1
|
+
import "../logger-BoaRYCuF.mjs";
|
|
2
|
+
import { a as QualifiedTableNames, c as defineMigrationOpts, i as MigrationType, l as defineTestDatabase, n as DefineDatabaseOptions, o as dbChanges, r as DefineTestDatabaseOptions, s as defineDatabase, t as Database, u as migrationsSchema } from "../database-C4QyLQ0H.mjs";
|
|
3
3
|
export * from "drizzle-orm";
|
|
4
4
|
export * from "drizzle-seed";
|
|
5
5
|
export { Database, DefineDatabaseOptions, DefineTestDatabaseOptions, MigrationType, QualifiedTableNames, dbChanges, defineDatabase, defineMigrationOpts, defineTestDatabase, migrationsSchema };
|
package/dist/api/database.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../constants-
|
|
2
|
-
import { a as migrationsSchema, i as defineTestDatabase, n as defineDatabase, r as defineMigrationOpts, t as dbChanges } from "../database-
|
|
1
|
+
import "../constants-D14iAtMu.mjs";
|
|
2
|
+
import { a as migrationsSchema, i as defineTestDatabase, n as defineDatabase, r as defineMigrationOpts, t as dbChanges } from "../database-lzS5JWOl.mjs";
|
|
3
3
|
|
|
4
4
|
export * from "drizzle-orm"
|
|
5
5
|
|
package/dist/api/event.d.mts
CHANGED
|
@@ -1,6 +1,237 @@
|
|
|
1
|
-
import "../logger-
|
|
2
|
-
import "../database-
|
|
3
|
-
import "../auth-
|
|
4
|
-
import "../cache-
|
|
5
|
-
import {
|
|
1
|
+
import { n as Logger } from "../logger-BoaRYCuF.mjs";
|
|
2
|
+
import "../database-C4QyLQ0H.mjs";
|
|
3
|
+
import "../auth-Cn1L6HLs.mjs";
|
|
4
|
+
import "../cache-CJqBlATk.mjs";
|
|
5
|
+
import { n as Container } from "../container-CIm1-Ogf.mjs";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
|
|
8
|
+
//#region src/api/event.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* Context available to event handlers.
|
|
11
|
+
*/
|
|
12
|
+
interface EventContext<TInput> {
|
|
13
|
+
/**
|
|
14
|
+
* The application container with access to db, mailer, logger, etc.
|
|
15
|
+
*/
|
|
16
|
+
container: Container;
|
|
17
|
+
/**
|
|
18
|
+
* The validated input passed to this event.
|
|
19
|
+
*/
|
|
20
|
+
input: TInput;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Options for defining an event bus.
|
|
24
|
+
*/
|
|
25
|
+
interface DefineEventBusOptions {
|
|
26
|
+
/**
|
|
27
|
+
* Redis URL for pub/sub.
|
|
28
|
+
*/
|
|
29
|
+
dbUrl: string;
|
|
30
|
+
/**
|
|
31
|
+
* Logger instance for error reporting.
|
|
32
|
+
*/
|
|
33
|
+
logger: Logger;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The event bus type for container.
|
|
37
|
+
*/
|
|
38
|
+
type EventBus = ReturnType<typeof defineEventBus>;
|
|
39
|
+
/**
|
|
40
|
+
* Defines the event bus for pub/sub messaging.
|
|
41
|
+
* Uses Redis for cross-server communication.
|
|
42
|
+
*
|
|
43
|
+
* Algorithm:
|
|
44
|
+
* 1. Create lazy Redis publisher client
|
|
45
|
+
* 2. Create lazy Redis subscriber client
|
|
46
|
+
* 3. Manage subscriptions via callback registry
|
|
47
|
+
* 4. Provide publish/subscribe/close methods
|
|
48
|
+
*
|
|
49
|
+
* @param opts - Event bus configuration
|
|
50
|
+
* @returns Event bus instance
|
|
51
|
+
*/
|
|
52
|
+
declare function defineEventBus(opts: DefineEventBusOptions): {
|
|
53
|
+
/**
|
|
54
|
+
* Publish a message to a channel.
|
|
55
|
+
* Auto-connects on first call if not already connected.
|
|
56
|
+
*
|
|
57
|
+
* @param channel - Channel name
|
|
58
|
+
* @param message - Message payload (will be JSON stringified)
|
|
59
|
+
*/
|
|
60
|
+
publish(channel: string, message: unknown): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Subscribe to a channel. Returns unsubscribe function.
|
|
63
|
+
* Uses single connection with callback management.
|
|
64
|
+
*
|
|
65
|
+
* @param channel - Channel name
|
|
66
|
+
* @param callback - Callback for received messages
|
|
67
|
+
* @returns Unsubscribe function
|
|
68
|
+
*/
|
|
69
|
+
subscribe(channel: string, callback: (message: unknown) => void): Promise<() => void>;
|
|
70
|
+
/**
|
|
71
|
+
* Check if a channel has any subscribers.
|
|
72
|
+
*
|
|
73
|
+
* @param channel - Channel name
|
|
74
|
+
* @returns true if channel has subscribers
|
|
75
|
+
*/
|
|
76
|
+
hasSubscribers(channel: string): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Close the Redis connections.
|
|
79
|
+
*/
|
|
80
|
+
close(): Promise<void>;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Options for defining an event.
|
|
84
|
+
*/
|
|
85
|
+
interface DefineEventOptions<TInput extends z.ZodType> {
|
|
86
|
+
/**
|
|
87
|
+
* Zod schema for validating event input.
|
|
88
|
+
*/
|
|
89
|
+
input: TInput;
|
|
90
|
+
/**
|
|
91
|
+
* In-memory handler that runs only on the emitting server.
|
|
92
|
+
*
|
|
93
|
+
* @param ctx - Event context with container and input
|
|
94
|
+
*/
|
|
95
|
+
run: (ctx: EventContext<z.infer<TInput>>) => Promise<void>;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Event object returned by defineEvent.
|
|
99
|
+
*/
|
|
100
|
+
interface Event<TInput> {
|
|
101
|
+
/**
|
|
102
|
+
* The event name (set during registration from filename).
|
|
103
|
+
*/
|
|
104
|
+
readonly name: string | null;
|
|
105
|
+
/**
|
|
106
|
+
* Emit this event with the given input.
|
|
107
|
+
* Runs in-memory handler, then publishes to Redis (fire-and-forget).
|
|
108
|
+
*
|
|
109
|
+
* @param input - Input matching the event's input schema.
|
|
110
|
+
*/
|
|
111
|
+
emit(input: TInput): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* The Zod schema for validating input.
|
|
114
|
+
*/
|
|
115
|
+
inputSchema: z.ZodType<TInput>;
|
|
116
|
+
/**
|
|
117
|
+
* Register this event with the container. Called by the event loader.
|
|
118
|
+
*
|
|
119
|
+
* @param container - The application container
|
|
120
|
+
* @param name - The event name (derived from filename)
|
|
121
|
+
*/
|
|
122
|
+
register(container: Container, name: string): void;
|
|
123
|
+
/**
|
|
124
|
+
* Subscribe to this event via Redis pub/sub.
|
|
125
|
+
* Use for tRPC subscriptions, SSE, WebSockets.
|
|
126
|
+
*
|
|
127
|
+
* @param handler - Handler called when event is emitted on any server
|
|
128
|
+
* @returns Unsubscribe function to cleanup the subscription
|
|
129
|
+
*/
|
|
130
|
+
subscribe(handler: (ctx: EventContext<TInput>) => Promise<void>): Promise<() => void>;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Defines a type-safe event with in-memory and Redis pub/sub support.
|
|
134
|
+
*
|
|
135
|
+
* Algorithm:
|
|
136
|
+
* 1. Define event with input schema and in-memory run handler
|
|
137
|
+
* 2. On emit(): validate input, run in-memory handler, publish to Redis (fire-and-forget)
|
|
138
|
+
* 3. .subscribe() creates Redis subscription for tRPC/SSE/WebSocket handlers
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```typescript
|
|
142
|
+
* // api/events/order-status.ts
|
|
143
|
+
* export default defineEvent({
|
|
144
|
+
* input: z.object({
|
|
145
|
+
* orderId: z.string(),
|
|
146
|
+
* status: z.enum(["pending", "shipped", "delivered"]),
|
|
147
|
+
* }),
|
|
148
|
+
* async run(ctx) {
|
|
149
|
+
* ctx.container.logger.info(`Order ${ctx.input.orderId} is ${ctx.input.status}`);
|
|
150
|
+
* },
|
|
151
|
+
* });
|
|
152
|
+
*
|
|
153
|
+
* // Emit from anywhere
|
|
154
|
+
* await orderStatus.emit({ orderId: "123", status: "shipped" });
|
|
155
|
+
*
|
|
156
|
+
* // Subscribe (e.g., in tRPC router)
|
|
157
|
+
* const unsubscribe = await orderStatus.subscribe(async (ctx) => {
|
|
158
|
+
* // Push to client via SSE/WebSocket
|
|
159
|
+
* });
|
|
160
|
+
* // Cleanup when client disconnects
|
|
161
|
+
* unsubscribe();
|
|
162
|
+
* ```
|
|
163
|
+
*/
|
|
164
|
+
declare function defineEvent<TInput extends z.ZodType>(options: DefineEventOptions<TInput>): Event<z.infer<TInput>>;
|
|
165
|
+
/**
|
|
166
|
+
* Input schema for dbChangesEvent.
|
|
167
|
+
*/
|
|
168
|
+
declare const dbChangeInputSchema: z.ZodObject<{
|
|
169
|
+
action: z.ZodEnum<{
|
|
170
|
+
INSERT: "INSERT";
|
|
171
|
+
UPDATE: "UPDATE";
|
|
172
|
+
DELETE: "DELETE";
|
|
173
|
+
}>;
|
|
174
|
+
newData: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
175
|
+
oldData: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
176
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
177
|
+
tableName: z.ZodString;
|
|
178
|
+
timestamp: z.ZodString;
|
|
179
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
180
|
+
}, z.core.$strip>;
|
|
181
|
+
/**
|
|
182
|
+
* Type for dbChangesEvent input.
|
|
183
|
+
*/
|
|
184
|
+
type DbChangeInput = z.infer<typeof dbChangeInputSchema>;
|
|
185
|
+
/**
|
|
186
|
+
* Built-in event for database changes.
|
|
187
|
+
* Emitted by trackDbChanges workflow.
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* ```typescript
|
|
191
|
+
* // Subscribe to DB changes (e.g., in tRPC subscription)
|
|
192
|
+
* import { dbChangesEvent } from "appos/api";
|
|
193
|
+
*
|
|
194
|
+
* const unsubscribe = await dbChangesEvent.subscribe(async (ctx) => {
|
|
195
|
+
* wsServer.publish("db-changes", JSON.stringify(ctx.input));
|
|
196
|
+
* });
|
|
197
|
+
*
|
|
198
|
+
* // Cleanup when done
|
|
199
|
+
* unsubscribe();
|
|
200
|
+
* ```
|
|
201
|
+
*/
|
|
202
|
+
declare const dbChangesEvent: Event<{
|
|
203
|
+
action: "INSERT" | "UPDATE" | "DELETE";
|
|
204
|
+
newData: Record<string, unknown> | null;
|
|
205
|
+
oldData: Record<string, unknown> | null;
|
|
206
|
+
organizationId: string | null;
|
|
207
|
+
tableName: string;
|
|
208
|
+
timestamp: string;
|
|
209
|
+
userId: string | null;
|
|
210
|
+
}>;
|
|
211
|
+
/**
|
|
212
|
+
* Options for loading events.
|
|
213
|
+
*/
|
|
214
|
+
interface LoadEventsOptions {
|
|
215
|
+
/**
|
|
216
|
+
* The application container.
|
|
217
|
+
*/
|
|
218
|
+
container: Container;
|
|
219
|
+
/**
|
|
220
|
+
* Optional custom events directory path.
|
|
221
|
+
*/
|
|
222
|
+
eventsDir?: string;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Auto-discovers and registers all events from the given directory.
|
|
226
|
+
*
|
|
227
|
+
* Algorithm:
|
|
228
|
+
* 1. Register built-in dbChangesEvent
|
|
229
|
+
* 2. Glob all .ts files in the directory (excluding test files)
|
|
230
|
+
* 3. Import each module's default export
|
|
231
|
+
* 4. If it's an Event (has emit + subscribe), call register(container, name)
|
|
232
|
+
*
|
|
233
|
+
* @param opts - Load events options
|
|
234
|
+
*/
|
|
235
|
+
declare function loadEvents(opts: LoadEventsOptions): Promise<void>;
|
|
236
|
+
//#endregion
|
|
6
237
|
export { DbChangeInput, DefineEventBusOptions, Event, EventBus, EventContext, dbChangeInputSchema, dbChangesEvent, defineEvent, defineEventBus, loadEvents };
|
package/dist/api/event.mjs
CHANGED
|
@@ -1,5 +1,236 @@
|
|
|
1
|
-
import "../redis-DwTSiGWI.mjs";
|
|
2
|
-
import "../constants-
|
|
3
|
-
import {
|
|
1
|
+
import { t as defineRedisClient } from "../redis-DwTSiGWI.mjs";
|
|
2
|
+
import { f as EVENTS_DIR, p as FILE_EXT, t as APPOS_DIR } from "../constants-D14iAtMu.mjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { basename, join } from "node:path";
|
|
5
|
+
import { glob } from "node:fs/promises";
|
|
6
|
+
import { camelCase } from "es-toolkit";
|
|
4
7
|
|
|
8
|
+
//#region src/api/event.ts
|
|
9
|
+
/**
|
|
10
|
+
* Defines the event bus for pub/sub messaging.
|
|
11
|
+
* Uses Redis for cross-server communication.
|
|
12
|
+
*
|
|
13
|
+
* Algorithm:
|
|
14
|
+
* 1. Create lazy Redis publisher client
|
|
15
|
+
* 2. Create lazy Redis subscriber client
|
|
16
|
+
* 3. Manage subscriptions via callback registry
|
|
17
|
+
* 4. Provide publish/subscribe/close methods
|
|
18
|
+
*
|
|
19
|
+
* @param opts - Event bus configuration
|
|
20
|
+
* @returns Event bus instance
|
|
21
|
+
*/
|
|
22
|
+
function defineEventBus(opts) {
|
|
23
|
+
const publisherClient = defineRedisClient({
|
|
24
|
+
logger: opts.logger,
|
|
25
|
+
url: opts.dbUrl
|
|
26
|
+
});
|
|
27
|
+
let subscriberClient = null;
|
|
28
|
+
const subscribers = /* @__PURE__ */ new Map();
|
|
29
|
+
return {
|
|
30
|
+
async publish(channel, message) {
|
|
31
|
+
await publisherClient.publish(channel, JSON.stringify(message));
|
|
32
|
+
},
|
|
33
|
+
async subscribe(channel, callback) {
|
|
34
|
+
if (!subscriberClient) {
|
|
35
|
+
subscriberClient = publisherClient.duplicate();
|
|
36
|
+
await subscriberClient.connect();
|
|
37
|
+
}
|
|
38
|
+
if (!subscribers.has(channel)) {
|
|
39
|
+
subscribers.set(channel, /* @__PURE__ */ new Set());
|
|
40
|
+
await subscriberClient.subscribe(channel, (msg) => {
|
|
41
|
+
const callbacks = subscribers.get(channel);
|
|
42
|
+
if (callbacks) {
|
|
43
|
+
let parsed;
|
|
44
|
+
try {
|
|
45
|
+
parsed = JSON.parse(msg);
|
|
46
|
+
} catch (err) {
|
|
47
|
+
opts.logger.error({
|
|
48
|
+
err,
|
|
49
|
+
channel,
|
|
50
|
+
msg
|
|
51
|
+
}, "Failed to parse event message");
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
for (const cb of callbacks) try {
|
|
55
|
+
cb(parsed);
|
|
56
|
+
} catch (err) {
|
|
57
|
+
opts.logger.error({
|
|
58
|
+
err,
|
|
59
|
+
channel
|
|
60
|
+
}, "Event handler error");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
subscribers.get(channel).add(callback);
|
|
66
|
+
return () => {
|
|
67
|
+
const callbacks = subscribers.get(channel);
|
|
68
|
+
if (callbacks) callbacks.delete(callback);
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
hasSubscribers(channel) {
|
|
72
|
+
const callbacks = subscribers.get(channel);
|
|
73
|
+
return callbacks !== void 0 && callbacks.size > 0;
|
|
74
|
+
},
|
|
75
|
+
async close() {
|
|
76
|
+
if (subscriberClient?.isOpen) await subscriberClient.quit();
|
|
77
|
+
if (publisherClient.isOpen) await publisherClient.quit();
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Defines a type-safe event with in-memory and Redis pub/sub support.
|
|
83
|
+
*
|
|
84
|
+
* Algorithm:
|
|
85
|
+
* 1. Define event with input schema and in-memory run handler
|
|
86
|
+
* 2. On emit(): validate input, run in-memory handler, publish to Redis (fire-and-forget)
|
|
87
|
+
* 3. .subscribe() creates Redis subscription for tRPC/SSE/WebSocket handlers
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```typescript
|
|
91
|
+
* // api/events/order-status.ts
|
|
92
|
+
* export default defineEvent({
|
|
93
|
+
* input: z.object({
|
|
94
|
+
* orderId: z.string(),
|
|
95
|
+
* status: z.enum(["pending", "shipped", "delivered"]),
|
|
96
|
+
* }),
|
|
97
|
+
* async run(ctx) {
|
|
98
|
+
* ctx.container.logger.info(`Order ${ctx.input.orderId} is ${ctx.input.status}`);
|
|
99
|
+
* },
|
|
100
|
+
* });
|
|
101
|
+
*
|
|
102
|
+
* // Emit from anywhere
|
|
103
|
+
* await orderStatus.emit({ orderId: "123", status: "shipped" });
|
|
104
|
+
*
|
|
105
|
+
* // Subscribe (e.g., in tRPC router)
|
|
106
|
+
* const unsubscribe = await orderStatus.subscribe(async (ctx) => {
|
|
107
|
+
* // Push to client via SSE/WebSocket
|
|
108
|
+
* });
|
|
109
|
+
* // Cleanup when client disconnects
|
|
110
|
+
* unsubscribe();
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
function defineEvent(options) {
|
|
114
|
+
let container = null;
|
|
115
|
+
let eventName = null;
|
|
116
|
+
return {
|
|
117
|
+
inputSchema: options.input,
|
|
118
|
+
get name() {
|
|
119
|
+
return eventName;
|
|
120
|
+
},
|
|
121
|
+
register(c, name) {
|
|
122
|
+
container = c;
|
|
123
|
+
eventName = name;
|
|
124
|
+
},
|
|
125
|
+
async emit(input) {
|
|
126
|
+
if (!container || !eventName) throw new Error("Event not registered. Ensure the worker is started before emitting events.");
|
|
127
|
+
const validated = options.input.parse(input);
|
|
128
|
+
const ctx = {
|
|
129
|
+
container,
|
|
130
|
+
input: validated
|
|
131
|
+
};
|
|
132
|
+
await options.run(ctx);
|
|
133
|
+
container.eventBus.publish(eventName, validated).catch((err) => {
|
|
134
|
+
container.logger.error({
|
|
135
|
+
err,
|
|
136
|
+
event: eventName
|
|
137
|
+
}, "Redis publish failed");
|
|
138
|
+
});
|
|
139
|
+
},
|
|
140
|
+
async subscribe(handler) {
|
|
141
|
+
if (!container || !eventName) throw new Error("Event not registered. Ensure the worker is started before subscribing.");
|
|
142
|
+
return container.eventBus.subscribe(eventName, async (message) => {
|
|
143
|
+
const validated = options.input.parse(message);
|
|
144
|
+
const ctx = {
|
|
145
|
+
container,
|
|
146
|
+
input: validated
|
|
147
|
+
};
|
|
148
|
+
try {
|
|
149
|
+
await handler(ctx);
|
|
150
|
+
} catch (err) {
|
|
151
|
+
container.logger.error({
|
|
152
|
+
err,
|
|
153
|
+
event: eventName
|
|
154
|
+
}, "Event subscription handler error");
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Input schema for dbChangesEvent.
|
|
162
|
+
*/
|
|
163
|
+
const dbChangeInputSchema = z.object({
|
|
164
|
+
action: z.enum([
|
|
165
|
+
"INSERT",
|
|
166
|
+
"UPDATE",
|
|
167
|
+
"DELETE"
|
|
168
|
+
]),
|
|
169
|
+
newData: z.record(z.string(), z.unknown()).nullable(),
|
|
170
|
+
oldData: z.record(z.string(), z.unknown()).nullable(),
|
|
171
|
+
organizationId: z.string().nullable(),
|
|
172
|
+
tableName: z.string(),
|
|
173
|
+
timestamp: z.string(),
|
|
174
|
+
userId: z.string().nullable()
|
|
175
|
+
});
|
|
176
|
+
/**
|
|
177
|
+
* Built-in event for database changes.
|
|
178
|
+
* Emitted by trackDbChanges workflow.
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```typescript
|
|
182
|
+
* // Subscribe to DB changes (e.g., in tRPC subscription)
|
|
183
|
+
* import { dbChangesEvent } from "appos/api";
|
|
184
|
+
*
|
|
185
|
+
* const unsubscribe = await dbChangesEvent.subscribe(async (ctx) => {
|
|
186
|
+
* wsServer.publish("db-changes", JSON.stringify(ctx.input));
|
|
187
|
+
* });
|
|
188
|
+
*
|
|
189
|
+
* // Cleanup when done
|
|
190
|
+
* unsubscribe();
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
const dbChangesEvent = defineEvent({
|
|
194
|
+
input: dbChangeInputSchema,
|
|
195
|
+
async run() {}
|
|
196
|
+
});
|
|
197
|
+
/**
|
|
198
|
+
* Extracts event name from filepath as camelCase.
|
|
199
|
+
*/
|
|
200
|
+
function getEventName(filepath) {
|
|
201
|
+
return camelCase(basename(filepath, ".ts"));
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Auto-discovers and registers all events from the given directory.
|
|
205
|
+
*
|
|
206
|
+
* Algorithm:
|
|
207
|
+
* 1. Register built-in dbChangesEvent
|
|
208
|
+
* 2. Glob all .ts files in the directory (excluding test files)
|
|
209
|
+
* 3. Import each module's default export
|
|
210
|
+
* 4. If it's an Event (has emit + subscribe), call register(container, name)
|
|
211
|
+
*
|
|
212
|
+
* @param opts - Load events options
|
|
213
|
+
*/
|
|
214
|
+
async function loadEvents(opts) {
|
|
215
|
+
const { container } = opts;
|
|
216
|
+
const eventsDir = opts.eventsDir ?? join(process.cwd(), APPOS_DIR, EVENTS_DIR);
|
|
217
|
+
dbChangesEvent.register(container, "dbChanges");
|
|
218
|
+
const files = await Array.fromAsync(glob(`${eventsDir}/**/*.${FILE_EXT}`, { exclude: [
|
|
219
|
+
"**/*.test.ts",
|
|
220
|
+
"**/*.spec.ts",
|
|
221
|
+
"**/*.test.js",
|
|
222
|
+
"**/*.spec.js"
|
|
223
|
+
] }));
|
|
224
|
+
for (const file of files) {
|
|
225
|
+
const mod = await import(file);
|
|
226
|
+
if (mod.default && typeof mod.default === "object") {
|
|
227
|
+
if ("emit" in mod.default && "subscribe" in mod.default) {
|
|
228
|
+
const name = getEventName(file);
|
|
229
|
+
mod.default.register(container, name);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
//#endregion
|
|
5
236
|
export { dbChangeInputSchema, dbChangesEvent, defineEvent, defineEventBus, loadEvents };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "../chunk-CgcgkAfe.mjs";
|
|
2
|
+
import { t as instrumentation_d_exports$1 } from "../instrumentation-D3_99Qvn.mjs";
|
|
2
3
|
export * from "@opentelemetry/api";
|
|
3
4
|
|
|
4
5
|
//#region src/api/instrumentation.d.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as __reExport } from "../chunk-
|
|
2
|
-
import { t as instrumentation_exports$1 } from "../instrumentation-
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "../chunk-CgcgkAfe.mjs";
|
|
2
|
+
import { t as instrumentation_exports$1 } from "../instrumentation-Eq5T7g1h.mjs";
|
|
3
3
|
|
|
4
4
|
export * from "@opentelemetry/api"
|
|
5
5
|
|
|
6
6
|
//#region src/api/instrumentation.ts
|
|
7
|
-
var instrumentation_exports = {};
|
|
7
|
+
var instrumentation_exports = /* @__PURE__ */ __exportAll({});
|
|
8
8
|
__reExport(instrumentation_exports, instrumentation_exports$1);
|
|
9
9
|
|
|
10
10
|
//#endregion
|
package/dist/api/mailer.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../logger-
|
|
2
|
-
import "../database-
|
|
3
|
-
import "../auth-
|
|
4
|
-
import "../cache-
|
|
5
|
-
import { $ as EmailButtonProps, A as Row, B as render, C as MailerPayloadReact, D as Preview, E as MarkdownProps, F as TailwindProps, G as EmailTheme, H as EmailLayout, I as defineEmail, J as getDefaultEmailTheme, K as defineEmailTailwindConfig, L as defineMailer, M as Section, N as SectionProps, O as PreviewProps, P as Tailwind, Q as Container, R as plainTextSelectors, S as MailerPayloadHtml, T as Markdown, U as EmailLayoutProps, V as toPlainText, W as EMAIL_THEME_KEYS, X as CodeBlock, Y as Button, Z as CodeInline, _ as HeadProps, _t as emailImgVariantKeys, at as EmailImgProps, b as Mailer, c as DefineEmailOptions, ct as Heading, d as EmailColumn, dt as Link, et as EmailCodeBlockProps, f as EmailColumnProps, ft as Text, g as Head, gt as emailHeadingSizeKeys, h as FontProps, ht as emailContainerVariantKeys, it as EmailHrProps, j as RowProps, k as RenderOptions, l as DefineMailerOptions, lt as Hr, m as Font, mt as emailButtonVariantKeys, nt as EmailContainerProps, o as Body, ot as EmailLinkProps, p as EmailComponent, pt as emailButtonSizeKeys, q as defineEmailTheme, rt as EmailHeadingProps, s as BodyProps, st as EmailTextProps, tt as EmailCodeInlineProps, u as DefineMailerOptionsWithQueue, ut as Img, v as Html, vt as emailTextVariantKeys, w as MailerWithQueue, x as MailerPayload, y as HtmlProps, z as pretty } from "../container-
|
|
1
|
+
import "../logger-BoaRYCuF.mjs";
|
|
2
|
+
import "../database-C4QyLQ0H.mjs";
|
|
3
|
+
import "../auth-Cn1L6HLs.mjs";
|
|
4
|
+
import "../cache-CJqBlATk.mjs";
|
|
5
|
+
import { $ as EmailButtonProps, A as Row, B as render, C as MailerPayloadReact, D as Preview, E as MarkdownProps, F as TailwindProps, G as EmailTheme, H as EmailLayout, I as defineEmail, J as getDefaultEmailTheme, K as defineEmailTailwindConfig, L as defineMailer, M as Section, N as SectionProps, O as PreviewProps, P as Tailwind, Q as Container, R as plainTextSelectors, S as MailerPayloadHtml, T as Markdown, U as EmailLayoutProps, V as toPlainText, W as EMAIL_THEME_KEYS, X as CodeBlock, Y as Button, Z as CodeInline, _ as HeadProps, _t as emailImgVariantKeys, at as EmailImgProps, b as Mailer, c as DefineEmailOptions, ct as Heading, d as EmailColumn, dt as Link, et as EmailCodeBlockProps, f as EmailColumnProps, ft as Text, g as Head, gt as emailHeadingSizeKeys, h as FontProps, ht as emailContainerVariantKeys, it as EmailHrProps, j as RowProps, k as RenderOptions, l as DefineMailerOptions, lt as Hr, m as Font, mt as emailButtonVariantKeys, nt as EmailContainerProps, o as Body, ot as EmailLinkProps, p as EmailComponent, pt as emailButtonSizeKeys, q as defineEmailTheme, rt as EmailHeadingProps, s as BodyProps, st as EmailTextProps, tt as EmailCodeInlineProps, u as DefineMailerOptionsWithQueue, ut as Img, v as Html, vt as emailTextVariantKeys, w as MailerWithQueue, x as MailerPayload, y as HtmlProps, z as pretty } from "../container-CIm1-Ogf.mjs";
|
|
6
6
|
export { Body, BodyProps, Button, CodeBlock, CodeInline, DefineEmailOptions, DefineMailerOptions, DefineMailerOptionsWithQueue, EMAIL_THEME_KEYS, EmailButtonProps, EmailCodeBlockProps, EmailCodeInlineProps, EmailColumn, EmailColumnProps, EmailComponent, Container as EmailContainer, EmailContainerProps, EmailHeadingProps, EmailHrProps, EmailImgProps, EmailLayout, EmailLayoutProps, EmailLinkProps, EmailTextProps, EmailTheme, Font, FontProps, Head, HeadProps, Heading, Hr, Html, HtmlProps, Img, Link, Mailer, MailerPayload, MailerPayloadHtml, MailerPayloadReact, MailerWithQueue, Markdown, MarkdownProps, Preview, PreviewProps, RenderOptions, Row, RowProps, Section, SectionProps, Tailwind, TailwindProps, Text, defineEmail, defineEmailTailwindConfig, defineEmailTheme, defineMailer, emailButtonSizeKeys, emailButtonVariantKeys, emailContainerVariantKeys, emailHeadingSizeKeys, emailImgVariantKeys, emailTextVariantKeys, getDefaultEmailTheme, plainTextSelectors, pretty, render, toPlainText };
|
package/dist/api/mailer.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import "../auth-schema-DF53iTDS.mjs";
|
|
2
2
|
import "../redis-DwTSiGWI.mjs";
|
|
3
|
-
import { S as WEB_DIR, d as EMAIL_THEME_FILE, i as BUILD_OUTPUT_DIR, y as ROOT_CSS_FILE } from "../constants-
|
|
4
|
-
import "../
|
|
5
|
-
import {
|
|
6
|
-
import { n as parseThemeFromString } from "../colors-DRAZU8e-.mjs";
|
|
3
|
+
import { S as WEB_DIR, d as EMAIL_THEME_FILE, i as BUILD_OUTPUT_DIR, y as ROOT_CSS_FILE } from "../constants-D14iAtMu.mjs";
|
|
4
|
+
import { a as sendEmail } from "../workflow-Cc101G1B.mjs";
|
|
5
|
+
import { n as parseThemeFromString } from "../colors-HSJNJt_Y.mjs";
|
|
7
6
|
import { join } from "node:path";
|
|
8
7
|
import { existsSync, readFileSync } from "node:fs";
|
|
9
8
|
import { render as render$1 } from "@react-email/render";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Logger, r as defineLogger, t as DefineLoggerOptions } from "../logger-
|
|
2
|
-
import "../instrumentation-
|
|
3
|
-
import { n as withOtelSpan } from "../observability-
|
|
1
|
+
import { n as Logger, r as defineLogger, t as DefineLoggerOptions } from "../logger-BoaRYCuF.mjs";
|
|
2
|
+
import "../instrumentation-D3_99Qvn.mjs";
|
|
3
|
+
import { n as withOtelSpan } from "../observability-NQdrXEya.mjs";
|
|
4
4
|
export { DefineLoggerOptions, Logger, defineLogger, withOtelSpan };
|