@everystack/server 0.4.9 → 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.
- package/package.json +2 -2
- package/src/plugin.ts +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everystack/server",
|
|
3
|
-
"version": "0.4.
|
|
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.
|
|
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
|
@@ -986,6 +986,7 @@ export function dbPlugin(options: DbPluginOptions): Plugin {
|
|
|
986
986
|
rebaseline?: boolean;
|
|
987
987
|
rebuild?: boolean;
|
|
988
988
|
overwriteDrift?: boolean;
|
|
989
|
+
only?: string[];
|
|
989
990
|
actor?: string | null;
|
|
990
991
|
gitRef?: string | null;
|
|
991
992
|
};
|
|
@@ -1004,6 +1005,7 @@ export function dbPlugin(options: DbPluginOptions): Plugin {
|
|
|
1004
1005
|
rebaseline: p.rebaseline,
|
|
1005
1006
|
rebuild: p.rebuild,
|
|
1006
1007
|
overwriteDrift: p.overwriteDrift,
|
|
1008
|
+
only: p.only,
|
|
1007
1009
|
actor: p.actor ?? null,
|
|
1008
1010
|
gitRef: p.gitRef ?? null,
|
|
1009
1011
|
} as any);
|
|
@@ -1019,7 +1021,7 @@ export function dbPlugin(options: DbPluginOptions): Plugin {
|
|
|
1019
1021
|
// the operator connection: the CLI ships the declared matview identities in dependency order,
|
|
1020
1022
|
// this REFRESHes each. A least-privileged operator never holds a URL for the routine refresh.
|
|
1021
1023
|
actions['db:refresh'] = async (payload, _ctx) => {
|
|
1022
|
-
const p = (payload ?? {}) as { matviews?: string[] };
|
|
1024
|
+
const p = (payload ?? {}) as { matviews?: string[]; verifyNonempty?: boolean };
|
|
1023
1025
|
try {
|
|
1024
1026
|
const { executeRefresh } = await import('@everystack/cli/refresh');
|
|
1025
1027
|
const { sql } = await import('drizzle-orm');
|
|
@@ -1027,8 +1029,8 @@ export function dbPlugin(options: DbPluginOptions): Plugin {
|
|
|
1027
1029
|
const result: any = await opsDb.execute(sql.raw(query));
|
|
1028
1030
|
return Array.isArray(result) ? result : result?.rows ?? [];
|
|
1029
1031
|
};
|
|
1030
|
-
const run = await executeRefresh(runner, { matviews: p.matviews ?? [] });
|
|
1031
|
-
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 };
|
|
1032
1034
|
} catch (err: any) {
|
|
1033
1035
|
return { error: err?.message || String(err) };
|
|
1034
1036
|
}
|