@everystack/server 0.2.10 → 0.2.11

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/plugin.ts +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everystack/server",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "Server runtime primitives for Lambda — event adapters, routing, SSR, image processing",
5
5
  "license": "AGPL-3.0-only",
6
6
  "publishConfig": {
package/src/plugin.ts CHANGED
@@ -466,9 +466,13 @@ export function dbPlugin(options: DbPluginOptions): Plugin {
466
466
  const { eq, and, or, gt, lt, gte, lte, ne, count, sum, avg, sql, desc, asc } =
467
467
  await import('drizzle-orm');
468
468
  const evalContext: Record<string, unknown> = {
469
+ ctx,
469
470
  db: ctx.db, schema: ctx.schema,
470
471
  eq, and, or, gt, lt, gte, lte, ne, count, sum, avg, sql, desc, asc,
471
472
  };
473
+ // Expose plugin-contributed context (notifications, rpc, etc.)
474
+ if (ctx.notifications) evalContext.notifications = ctx.notifications;
475
+ if (ctx.rpc) evalContext.rpc = ctx.rpc;
472
476
  const AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;
473
477
  const fn = new AsyncFunction(
474
478
  ...Object.keys(evalContext),