@everystack/server 0.4.10 → 0.4.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 +2 -2
  2. package/src/plugin.ts +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everystack/server",
3
- "version": "0.4.10",
3
+ "version": "0.4.11",
4
4
  "description": "Server runtime primitives for Lambda — event adapters, routing, SSR, image processing",
5
5
  "license": "AGPL-3.0-only",
6
6
  "author": "Scalable Technology, Inc. <licensing@scalable.technology>",
@@ -159,7 +159,7 @@
159
159
  "sst": "4.13.1",
160
160
  "ts-jest": "29.4.9",
161
161
  "typescript": "5.9.3",
162
- "@everystack/cli": "0.4.24",
162
+ "@everystack/cli": "0.4.25",
163
163
  "@everystack/auth": "0.4.0",
164
164
  "@everystack/pg-tools": "0.4.0"
165
165
  },
package/src/plugin.ts CHANGED
@@ -1021,7 +1021,7 @@ export function dbPlugin(options: DbPluginOptions): Plugin {
1021
1021
  // the operator connection: the CLI ships the declared matview identities in dependency order,
1022
1022
  // this REFRESHes each. A least-privileged operator never holds a URL for the routine refresh.
1023
1023
  actions['db:refresh'] = async (payload, _ctx) => {
1024
- const p = (payload ?? {}) as { matviews?: string[] };
1024
+ const p = (payload ?? {}) as { matviews?: string[]; verifyNonempty?: boolean };
1025
1025
  try {
1026
1026
  const { executeRefresh } = await import('@everystack/cli/refresh');
1027
1027
  const { sql } = await import('drizzle-orm');
@@ -1029,8 +1029,8 @@ export function dbPlugin(options: DbPluginOptions): Plugin {
1029
1029
  const result: any = await opsDb.execute(sql.raw(query));
1030
1030
  return Array.isArray(result) ? result : result?.rows ?? [];
1031
1031
  };
1032
- const run = await executeRefresh(runner, { matviews: p.matviews ?? [] });
1033
- return { refreshed: run.refreshed, statements: run.statements, failed: run.failed ?? null };
1032
+ const run = await executeRefresh(runner, { matviews: p.matviews ?? [], verifyNonempty: p.verifyNonempty });
1033
+ return { refreshed: run.refreshed, statements: run.statements, failed: run.failed ?? null, empty: run.empty ?? null };
1034
1034
  } catch (err: any) {
1035
1035
  return { error: err?.message || String(err) };
1036
1036
  }