@pgxsinkit/server 0.1.32 → 0.1.40

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 (52) hide show
  1. package/README.md +12 -0
  2. package/bin/pgxsinkit-generate.mjs +25 -0
  3. package/dist/cli/generate.d.ts +14 -2
  4. package/dist/cli/generate.d.ts.map +1 -1
  5. package/dist/electric-proxy.d.ts +30 -2
  6. package/dist/electric-proxy.d.ts.map +1 -1
  7. package/dist/index.d.ts +56 -9
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +3936 -937
  10. package/dist/index.js.map +40 -25
  11. package/dist/migrations/utilities.d.ts +13 -0
  12. package/dist/migrations/utilities.d.ts.map +1 -0
  13. package/dist/mutations/plpgsql-apply.d.ts +36 -0
  14. package/dist/mutations/plpgsql-apply.d.ts.map +1 -0
  15. package/dist/mutations/route.d.ts +64 -0
  16. package/dist/mutations/route.d.ts.map +1 -0
  17. package/dist/mutations/types.d.ts +4 -0
  18. package/dist/mutations/types.d.ts.map +1 -0
  19. package/dist/operations-log/ddl.d.ts +6 -0
  20. package/dist/operations-log/ddl.d.ts.map +1 -1
  21. package/dist/operations-log/schema.d.ts +2 -32
  22. package/dist/operations-log/schema.d.ts.map +1 -1
  23. package/dist/operations-log/types.d.ts +1 -5
  24. package/dist/operations-log/types.d.ts.map +1 -1
  25. package/dist/operations-log/writer.d.ts.map +1 -1
  26. package/dist/router.d.ts +22 -0
  27. package/dist/router.d.ts.map +1 -0
  28. package/dist/sql-state.d.ts +23 -0
  29. package/dist/sql-state.d.ts.map +1 -0
  30. package/package.json +11 -6
  31. package/skills/deploying/SKILL.md +162 -0
  32. package/src/cli/generate.ts +292 -21
  33. package/src/electric-proxy.ts +280 -45
  34. package/src/index.ts +146 -59
  35. package/src/migrations/utilities.ts +25 -0
  36. package/src/mutations/plpgsql-apply.ts +658 -0
  37. package/src/mutations/route.ts +1176 -0
  38. package/src/mutations/{bulk/types.ts → types.ts} +0 -2
  39. package/src/operations-log/ddl.ts +13 -3
  40. package/src/operations-log/schema.ts +9 -6
  41. package/src/operations-log/types.ts +1 -7
  42. package/src/operations-log/writer.ts +0 -2
  43. package/src/router.ts +109 -0
  44. package/src/sql-state.ts +59 -0
  45. package/dist/mutations/bulk/plpgsql-strategy.d.ts +0 -17
  46. package/dist/mutations/bulk/plpgsql-strategy.d.ts.map +0 -1
  47. package/dist/mutations/bulk/route.d.ts +0 -7
  48. package/dist/mutations/bulk/route.d.ts.map +0 -1
  49. package/dist/mutations/bulk/types.d.ts +0 -5
  50. package/dist/mutations/bulk/types.d.ts.map +0 -1
  51. package/src/mutations/bulk/plpgsql-strategy.ts +0 -370
  52. package/src/mutations/bulk/route.ts +0 -580
package/README.md ADDED
@@ -0,0 +1,12 @@
1
+ # @pgxsinkit/server
2
+
3
+ The [pgxsinkit](https://pgxsinkit.github.io) write API and secured read ingress:
4
+ `createSyncServer` owns the single mutation route and the registry-governed Electric
5
+ shape proxy, both behind one verified-claims adapter, plus the in-database
6
+ apply-function builder.
7
+
8
+ ```bash
9
+ bun add @pgxsinkit/server @pgxsinkit/contracts
10
+ ```
11
+
12
+ See the [documentation](https://pgxsinkit.github.io) for the write path and proxy.
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+ // Portable launcher for `pgxsinkit-generate`.
3
+ //
4
+ // The real CLI is TypeScript and is Bun-required by nature: it dynamically imports your (TypeScript)
5
+ // sync registry and shells out to `drizzle-kit` via Bun. A built JS bin would not change that, so
6
+ // instead of pretending to be a Node tool this launcher runs under Node *or* Bun, locates Bun on PATH,
7
+ // and re-execs the CLI there — turning a missing-Bun setup into a clear, actionable message rather than
8
+ // a cryptic shebang failure (`env: bun: No such file or directory`).
9
+ import { spawnSync } from "node:child_process";
10
+ import { dirname, resolve } from "node:path";
11
+ import { fileURLToPath } from "node:url";
12
+
13
+ const cli = resolve(dirname(fileURLToPath(import.meta.url)), "../src/cli/generate.ts");
14
+ const result = spawnSync("bun", [cli, ...process.argv.slice(2)], { stdio: "inherit" });
15
+
16
+ if (result.error?.code === "ENOENT") {
17
+ process.stderr.write(
18
+ "pgxsinkit-generate requires Bun (https://bun.sh): it imports your TypeScript sync registry and runs\n" +
19
+ "drizzle-kit. Install Bun, then run it via `bunx pgxsinkit-generate` — or any package manager's exec\n" +
20
+ "(npx / pnpm exec / yarn) once Bun is on PATH.\n",
21
+ );
22
+ process.exit(1);
23
+ }
24
+
25
+ process.exit(result.status ?? 1);
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bun
2
2
  /**
3
3
  * pgxsinkit-generate — Generates a drizzle-kit migration with the
4
- * pgxsinkit_apply_batch_mutations PL/pgSQL function.
4
+ * pgxsinkit_apply_mutations PL/pgSQL function.
5
5
  *
6
6
  * External consumers (e.g. transcrobes) invoke this from their own project:
7
7
  *
@@ -14,5 +14,17 @@
14
14
  * then fills the new migration.sql with the generated DDL.
15
15
  * The result is a standard drizzle-kit migration tracked via snapshot.json.
16
16
  */
17
- export {};
17
+ import type { SyncTableRegistry } from "@pgxsinkit/contracts";
18
+ /** Registry source paths are relative to the invocation directory, not the migration output directory. */
19
+ export declare function resolveRegistryModulePath(registryPath: string, cwd?: string): string;
20
+ /** Select a registry from an imported module, with `--export` available for arbitrary names. */
21
+ export declare function selectRegistryExport(moduleExports: Record<string, unknown>, exportName?: string): SyncTableRegistry;
22
+ /**
23
+ * Resolves where drizzle-kit writes migrations for this project, in precedence order:
24
+ * 1. an explicit `--out` (relative to `--project-dir`),
25
+ * 2. the `out` field of the `--config` drizzle config — so a consumer whose migrations
26
+ * live somewhere non-default (e.g. `infra/board-drizzle`) never has to repeat the path,
27
+ * 3. a probe of the conventional `drizzle` / `infra/drizzle` locations.
28
+ */
29
+ export declare function resolveDrizzleOutDir(projectDir: string, drizzleConfig?: string, outFlag?: string): Promise<string | null>;
18
30
  //# sourceMappingURL=generate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/cli/generate.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;GAcG"}
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/cli/generate.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;GAcG;AAQH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA+D9D,0GAA0G;AAC1G,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,SAAgB,GAAG,MAAM,CAE3F;AAMD,gGAAgG;AAChG,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAwBnH;AAiCD;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,aAAa,CAAC,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAuBxB"}
@@ -1,13 +1,41 @@
1
1
  import { type JwtClaims, type SyncTableRegistry } from "@pgxsinkit/contracts";
2
+ export interface ElectricProxyCors {
3
+ /** Exact browser origins allowed to read this shape (e.g. a hosted SPA + localhost dev). */
4
+ origins: string[];
5
+ }
2
6
  export interface ElectricProxyOptions {
3
7
  registry: SyncTableRegistry;
4
8
  electricUrl: string;
5
9
  /** Extra params passed to customWhere functions (e.g. fromLang, toLang). */
6
10
  extraParams?: Record<string, unknown>;
11
+ /**
12
+ * CORS for a browser-facing deployment with **no CORS-adding gateway in front** — e.g. a Supabase
13
+ * Cloud edge function, which the platform routes to directly. When set, OPTIONS preflights are
14
+ * answered here and the response carries the allowed origin plus the Electric headers the client
15
+ * must read off each shape. Omit it where a gateway already handles CORS (the local stack's Envoy).
16
+ */
17
+ cors?: ElectricProxyCors;
18
+ /**
19
+ * Opt-in per-request timing log (default off). When on, each forwarded shape request emits one compact
20
+ * `[pgxsinkit-timing]` line (route `"shape"`) with the request's table/live/offset and the upstream
21
+ * Electric fetch duration + status, for attributing read-path latency. Additive; no behaviour change.
22
+ */
23
+ logTimings?: boolean;
24
+ /**
25
+ * Append a unique `cache-buster` to every `live=true` request forwarded upstream (default ON; set
26
+ * `false` to restore upstream CDN collapse of live long-polls). Stopgap for Electric Cloud serving
27
+ * live long-polls from a layer blind to fresh commits: consecutive full-hold (~41s) `up-to-date`
28
+ * responses at an unmoved offset despite an advancing `cursor`, measured cross-client propagation
29
+ * of 40–89s (backlog 0001, 2026-07-04; upstream report alongside it). Only the live tail is busted —
30
+ * catch-up responses keep their CDN cold-fanout sharing, and per-user-filtered live polls share
31
+ * ~nothing across clients anyway. Remove when Electric fixes the live path (backlog 0001's close).
32
+ */
33
+ bustLiveUpstreamCache?: boolean;
7
34
  }
8
35
  /**
9
- * Proxies an Electric shape request, applying registry-driven row filters
10
- * and stripping omitted columns from JSON shape-log payloads.
36
+ * Proxies an Electric shape request, applying registry-driven row filters and stripping omitted
37
+ * columns from JSON shape-log payloads. Optionally answers CORS preflights and adds CORS headers
38
+ * ({@link ElectricProxyOptions.cors}) for gateway-less browser deployments.
11
39
  *
12
40
  * The caller is responsible for resolving auth claims from the request.
13
41
  * Pass `claims` as `null` for unauthenticated requests (all rows blocked).
@@ -1 +1 @@
1
- {"version":3,"file":"electric-proxy.d.ts","sourceRoot":"","sources":["../src/electric-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,SAAS,EAGd,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED;;;;;;GAMG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,GAAG,IAAI,EACxB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,QAAQ,CAAC,CAmDnB"}
1
+ {"version":3,"file":"electric-proxy.d.ts","sourceRoot":"","sources":["../src/electric-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,SAAS,EAId,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,iBAAiB;IAChC,4FAA4F;IAC5F,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;OAQG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAeD;;;;;;;GAOG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,GAAG,IAAI,EACxB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,QAAQ,CAAC,CAYnB"}
package/dist/index.d.ts CHANGED
@@ -1,18 +1,47 @@
1
1
  import type { PgAsyncDatabase, PgQueryResultHKT } from "drizzle-orm/pg-core";
2
- import { Hono } from "hono";
3
2
  import type { JwtClaims, RegistryRelations, RegistryTables, SyncRuntimeStatus, SyncServerAddress, SyncTableRegistry } from "@pgxsinkit/contracts";
4
- import type { BulkMutationBackend } from "./mutations/bulk/types";
3
+ import { type StartupVerificationMode } from "./mutations/route";
4
+ /**
5
+ * How the operations-log table's presence is resolved at startup (ADR-0030 decision 3):
6
+ * - `"probe"` (default): today's behavior — one query ensures/confirms the table, and logging is
7
+ * disabled at runtime (with a warning) if it is absent. Preserves the documented degradation.
8
+ * - `"enabled"`: assume the table exists — NO query. If it is actually absent, writes then fail loudly.
9
+ * - `"disabled"`: turn logging off with NO query.
10
+ *
11
+ * `"enabled" | "disabled"` are the serverless posture: paired with `startupVerification: "deploy-time"`,
12
+ * a fresh worker sends zero queries before the mutation transaction itself.
13
+ */
14
+ export type OperationsLogStartupMode = "probe" | "enabled" | "disabled";
15
+ /**
16
+ * The `deployment` profile owns the server's startup query posture (ADR-0030 decision 3). Its defaults
17
+ * preserve today's behavior exactly, so long-lived hosts need not set it; serverless / per-request
18
+ * workers set `{ startupVerification: "deploy-time", operationsLog: "enabled" | "disabled" }` for a
19
+ * zero-startup-query first write.
20
+ */
21
+ export interface DeploymentProfile {
22
+ /** Governs ONLY the RLS auth-helper verify now (apply-fn drift is self-verifying). Default `"in-process"`. */
23
+ startupVerification?: StartupVerificationMode;
24
+ /** How the operations-log table presence is resolved. Default `"probe"`. */
25
+ operationsLog?: OperationsLogStartupMode;
26
+ }
5
27
  export interface CreateSyncServerOptions<TRegistry extends SyncTableRegistry, TDb extends PgAsyncDatabase<PgQueryResultHKT, RegistryRelations<TRegistry>> = PgAsyncDatabase<PgQueryResultHKT, RegistryRelations<TRegistry>>> {
6
28
  registry: TRegistry;
7
29
  db: TDb;
8
- /** Existing Hono app to register routes on. If omitted, a new Hono app is created. */
9
- app?: Hono;
10
- backend?: BulkMutationBackend;
11
30
  resolveAuthClaims?: (request: Request) => Promise<JwtClaims | null> | JwtClaims | null;
31
+ /**
32
+ * When set, the server serves a read-path Electric shape proxy that shares the
33
+ * single `resolveAuthClaims` adapter with the write path (ADR-0003). Without it,
34
+ * no shape proxy is registered.
35
+ */
36
+ electricUrl?: string;
37
+ /** Path for the shape proxy route. Defaults to `/api/shape`. */
38
+ shapeProxyPath?: string;
39
+ /** Optional per-request extra params passed to customWhere/shared filters. */
40
+ resolveShapeParams?: (request: Request) => Record<string, unknown> | undefined;
12
41
  operationsLog?: {
13
42
  enabled?: boolean;
14
43
  };
15
- /** Health check endpoint. Only applies when pgxsinkit owns the Hono app. */
44
+ /** Health check endpoint. Enabled by default at `/health`; `false` disables it, `{ path }` relocates it. */
16
45
  healthCheck?: boolean | {
17
46
  path: string;
18
47
  };
@@ -21,6 +50,19 @@ export interface CreateSyncServerOptions<TRegistry extends SyncTableRegistry, TD
21
50
  idleTimeoutSeconds?: number;
22
51
  allowedOrigins?: string[];
23
52
  onStatusChange?: (status: SyncRuntimeStatus) => void;
53
+ /**
54
+ * The startup query posture (ADR-0030). The apply function now verifies its own ADR-0018 fingerprint
55
+ * in-body on every call (SQLSTATE `PXS01` on drift), so there is no startup drift check to configure;
56
+ * this governs only the RLS auth-helper verify and the operations-log presence resolution. Defaults
57
+ * preserve today's behavior. See {@link DeploymentProfile}.
58
+ */
59
+ deployment?: DeploymentProfile;
60
+ /**
61
+ * Opt-in per-request timing log (default false). When on, each mutation and shape-proxy request emits
62
+ * one compact `[pgxsinkit-timing]` line with an ISO-8601(ms, UTC) timestamp and phase durations, for
63
+ * attributing wall-clock latency against the client's `syncDebug` lines. Additive; no behaviour change.
64
+ */
65
+ logTimings?: boolean;
24
66
  }
25
67
  export interface ServerDiagnostics<TRegistry extends SyncTableRegistry> {
26
68
  tables: Array<keyof TRegistry & string>;
@@ -38,10 +80,15 @@ export interface SyncServer<TRegistry extends SyncTableRegistry, TDb extends PgA
38
80
  }
39
81
  export declare function createSyncServer<TRegistry extends SyncTableRegistry, TDb extends PgAsyncDatabase<PgQueryResultHKT, RegistryRelations<TRegistry>> = PgAsyncDatabase<PgQueryResultHKT, RegistryRelations<TRegistry>>>(options: CreateSyncServerOptions<TRegistry, TDb>): SyncServer<TRegistry, TDb>;
40
82
  export declare function buildRegistrySchema<TRegistry extends SyncTableRegistry>(registry: TRegistry): RegistryTables<TRegistry>;
41
- export { registerBulkMutationRoute } from "./mutations/bulk/route";
42
- export { buildPlpgsqlBatchFunctionDdl } from "./mutations/bulk/plpgsql-strategy";
43
- export { ensureOperationsLogSchema } from "./operations-log/ddl";
83
+ export { authoritativeMutationPaths, batchMutationPaths, createMutationHandler } from "./mutations/route";
84
+ export type { StartupVerificationMode } from "./mutations/route";
85
+ export type { CorsConfig, CorsScope, FetchHandler, RouterErrorHandler } from "./router";
86
+ export { FetchRouter } from "./router";
87
+ export { buildPlpgsqlBatchFunctionDdl, expectedApplyFingerprint } from "./mutations/plpgsql-apply";
88
+ export { renderPgxsinkitUtilitiesMigration } from "./migrations/utilities";
89
+ export { ensureOperationsLogSchema, operationsLogRegclassTarget } from "./operations-log/ddl";
44
90
  export { operationsLogTable } from "./operations-log/schema";
45
91
  export { proxyElectricShapeRequest } from "./electric-proxy";
46
92
  export type { ElectricProxyOptions } from "./electric-proxy";
93
+ export { readSqlState } from "./sql-state";
47
94
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,OAAO,KAAK,EACV,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAmBlE,MAAM,WAAW,uBAAuB,CACtC,SAAS,SAAS,iBAAiB,EACnC,GAAG,SAAS,eAAe,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC,GAAG,eAAe,CAC3F,gBAAgB,EAChB,iBAAiB,CAAC,SAAS,CAAC,CAC7B;IAED,QAAQ,EAAE,SAAS,CAAC;IACpB,EAAE,EAAE,GAAG,CAAC;IACR,sFAAsF;IACtF,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,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