@niscorp/vex 0.2.0 → 0.2.3

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 (37) hide show
  1. package/CHANGELOG.md +161 -0
  2. package/DESIGN.md +78 -3
  3. package/DOCS.md +167 -14
  4. package/README.md +2 -1
  5. package/dist/adapters/express/index.cjs +241 -19
  6. package/dist/adapters/express/index.cjs.map +1 -1
  7. package/dist/adapters/express/index.d.cts +2 -2
  8. package/dist/adapters/express/index.d.ts +2 -2
  9. package/dist/adapters/express/index.js +2 -2
  10. package/dist/adapters/hono/index.cjs +260 -24
  11. package/dist/adapters/hono/index.cjs.map +1 -1
  12. package/dist/adapters/hono/index.d.cts +2 -2
  13. package/dist/adapters/hono/index.d.ts +2 -2
  14. package/dist/adapters/hono/index.js +21 -7
  15. package/dist/adapters/hono/index.js.map +1 -1
  16. package/dist/agent/index.cjs +2 -0
  17. package/dist/agent/index.cjs.map +1 -1
  18. package/dist/agent/index.d.cts +1 -1
  19. package/dist/agent/index.d.ts +1 -1
  20. package/dist/agent/index.js +1 -1
  21. package/dist/{chunk-HF25Q53I.js → chunk-H4BHW76Q.js} +6 -3
  22. package/dist/chunk-H4BHW76Q.js.map +1 -0
  23. package/dist/{chunk-5CBKESBJ.js → chunk-IQM4SQE2.js} +279 -29
  24. package/dist/chunk-IQM4SQE2.js.map +1 -0
  25. package/dist/{handler-Cql8SJ3F.d.cts → handler-BGCL6_Si.d.ts} +3 -2
  26. package/dist/{handler-mICf9ins.d.ts → handler-CMrjTXNx.d.cts} +3 -2
  27. package/dist/index.cjs +320 -57
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +3 -3
  30. package/dist/index.d.ts +3 -3
  31. package/dist/index.js +45 -37
  32. package/dist/index.js.map +1 -1
  33. package/dist/{types-BRvMB6IM.d.cts → types-Bi-Lg86b.d.cts} +48 -2
  34. package/dist/{types-BRvMB6IM.d.ts → types-Bi-Lg86b.d.ts} +48 -2
  35. package/package.json +9 -8
  36. package/dist/chunk-5CBKESBJ.js.map +0 -1
  37. package/dist/chunk-HF25Q53I.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { ak as ScopeValues, S as ScopePolicy, D as DatabaseSchema, f as Row, M as MutationDefinition, N as Mutation, b as Query, u as CoreMutation, a as QueryEngine, a0 as QueryResponse } from './types-BRvMB6IM.cjs';
1
+ import { al as ScopeValues, S as ScopePolicy, D as DatabaseSchema, f as Row, M as MutationDefinition, N as Mutation, b as Query, u as CoreMutation, a as QueryEngine, a0 as QueryResponse } from './types-Bi-Lg86b.js';
2
2
 
3
3
  type MutationTx = {
4
4
  query: (sql: string, params?: unknown[]) => Promise<{
@@ -8,6 +8,7 @@ type MutationTx = {
8
8
  type MutationClient = MutationTx & {
9
9
  transaction?: <T>(fn: (tx: MutationTx) => Promise<T>) => Promise<T>;
10
10
  };
11
+ declare const mutationMisfits: (def: MutationDefinition, schema: DatabaseSchema) => string[];
11
12
  type MutationContext = {
12
13
  context: Record<string, unknown>;
13
14
  scope: ScopeValues;
@@ -130,4 +131,4 @@ declare const handleFingerprintPatch: (config: VexHandlerConfig, fingerprint: st
130
131
  }) => Promise<QueryResult>;
131
132
  declare const handleFingerprintDelete: (config: VexHandlerConfig, fingerprint: string) => Promise<QueryResult>;
132
133
 
133
- export { type ContextField as C, type DiscoveryFingerprint as D, type ExecuteRecord as E, type MutationClient as M, type QueryResult as Q, type VexHandlerConfig as V, type WriteEvent as W, type ContextSignature as a, type DiscoveryResponse as b, type MutationContext as c, type MutationEffect as d, type MutationTx as e, type VexLive as f, type WriteResult as g, collectMutationContext as h, collectQueryContext as i, executeMutation as j, executeWrites as k, handleDiscovery as l, handleFingerprintDelete as m, handleFingerprintPatch as n, handleQuery as o, lintMutation as p, mutationEffect as q, requiredContextKeys as r, tablesChangedBy as t };
134
+ export { type ContextField as C, type DiscoveryFingerprint as D, type ExecuteRecord as E, type MutationClient as M, type QueryResult as Q, type VexHandlerConfig as V, type WriteEvent as W, type ContextSignature as a, type DiscoveryResponse as b, type MutationContext as c, type MutationEffect as d, type MutationTx as e, type VexLive as f, type WriteResult as g, collectMutationContext as h, collectQueryContext as i, executeMutation as j, executeWrites as k, handleDiscovery as l, handleFingerprintDelete as m, handleFingerprintPatch as n, handleQuery as o, lintMutation as p, mutationEffect as q, mutationMisfits as r, requiredContextKeys as s, tablesChangedBy as t };
@@ -1,4 +1,4 @@
1
- import { ak as ScopeValues, S as ScopePolicy, D as DatabaseSchema, f as Row, M as MutationDefinition, N as Mutation, b as Query, u as CoreMutation, a as QueryEngine, a0 as QueryResponse } from './types-BRvMB6IM.js';
1
+ import { al as ScopeValues, S as ScopePolicy, D as DatabaseSchema, f as Row, M as MutationDefinition, N as Mutation, b as Query, u as CoreMutation, a as QueryEngine, a0 as QueryResponse } from './types-Bi-Lg86b.cjs';
2
2
 
3
3
  type MutationTx = {
4
4
  query: (sql: string, params?: unknown[]) => Promise<{
@@ -8,6 +8,7 @@ type MutationTx = {
8
8
  type MutationClient = MutationTx & {
9
9
  transaction?: <T>(fn: (tx: MutationTx) => Promise<T>) => Promise<T>;
10
10
  };
11
+ declare const mutationMisfits: (def: MutationDefinition, schema: DatabaseSchema) => string[];
11
12
  type MutationContext = {
12
13
  context: Record<string, unknown>;
13
14
  scope: ScopeValues;
@@ -130,4 +131,4 @@ declare const handleFingerprintPatch: (config: VexHandlerConfig, fingerprint: st
130
131
  }) => Promise<QueryResult>;
131
132
  declare const handleFingerprintDelete: (config: VexHandlerConfig, fingerprint: string) => Promise<QueryResult>;
132
133
 
133
- export { type ContextField as C, type DiscoveryFingerprint as D, type ExecuteRecord as E, type MutationClient as M, type QueryResult as Q, type VexHandlerConfig as V, type WriteEvent as W, type ContextSignature as a, type DiscoveryResponse as b, type MutationContext as c, type MutationEffect as d, type MutationTx as e, type VexLive as f, type WriteResult as g, collectMutationContext as h, collectQueryContext as i, executeMutation as j, executeWrites as k, handleDiscovery as l, handleFingerprintDelete as m, handleFingerprintPatch as n, handleQuery as o, lintMutation as p, mutationEffect as q, requiredContextKeys as r, tablesChangedBy as t };
134
+ export { type ContextField as C, type DiscoveryFingerprint as D, type ExecuteRecord as E, type MutationClient as M, type QueryResult as Q, type VexHandlerConfig as V, type WriteEvent as W, type ContextSignature as a, type DiscoveryResponse as b, type MutationContext as c, type MutationEffect as d, type MutationTx as e, type VexLive as f, type WriteResult as g, collectMutationContext as h, collectQueryContext as i, executeMutation as j, executeWrites as k, handleDiscovery as l, handleFingerprintDelete as m, handleFingerprintPatch as n, handleQuery as o, lintMutation as p, mutationEffect as q, mutationMisfits as r, requiredContextKeys as s, tablesChangedBy as t };