@niscorp/vex 0.4.5 → 0.5.0

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 (40) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/DESIGN.md +72 -45
  3. package/DOCS.md +130 -21
  4. package/README.md +17 -0
  5. package/dist/adapters/express/index.cjs +606 -173
  6. package/dist/adapters/express/index.cjs.map +1 -1
  7. package/dist/adapters/express/index.d.cts +6 -2
  8. package/dist/adapters/express/index.d.ts +6 -2
  9. package/dist/adapters/express/index.js +16 -3
  10. package/dist/adapters/express/index.js.map +1 -1
  11. package/dist/adapters/hono/index.cjs +597 -173
  12. package/dist/adapters/hono/index.cjs.map +1 -1
  13. package/dist/adapters/hono/index.d.cts +5 -2
  14. package/dist/adapters/hono/index.d.ts +5 -2
  15. package/dist/adapters/hono/index.js +7 -3
  16. package/dist/adapters/hono/index.js.map +1 -1
  17. package/dist/agent/index.cjs +12 -12
  18. package/dist/agent/index.cjs.map +1 -1
  19. package/dist/agent/index.d.cts +1 -1
  20. package/dist/agent/index.d.ts +1 -1
  21. package/dist/agent/index.js +12 -12
  22. package/dist/agent/index.js.map +1 -1
  23. package/dist/{chunk-W5MYFJKT.js → chunk-F7OXXJIH.js} +562 -192
  24. package/dist/chunk-F7OXXJIH.js.map +1 -0
  25. package/dist/{chunk-F7RDSWYF.js → chunk-VHNCSQPO.js} +2 -2
  26. package/dist/{chunk-F7RDSWYF.js.map → chunk-VHNCSQPO.js.map} +1 -1
  27. package/dist/{handler-O6XslV-S.d.ts → handler-DdfaWN_J.d.ts} +7 -1
  28. package/dist/{handler-CB0BqKsY.d.cts → handler-kvZkxwaN.d.cts} +7 -1
  29. package/dist/index.cjs +493 -232
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.cts +5 -3
  32. package/dist/index.d.ts +5 -3
  33. package/dist/index.js +118 -221
  34. package/dist/index.js.map +1 -1
  35. package/dist/migrations/index.cjs.map +1 -1
  36. package/dist/migrations/index.js +1 -1
  37. package/dist/{types-BmHuPfPS.d.cts → types-BxkRxTTx.d.cts} +5 -0
  38. package/dist/{types-D5CCaqcd.d.ts → types-DgUZNKii.d.ts} +5 -0
  39. package/package.json +8 -8
  40. package/dist/chunk-W5MYFJKT.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { ab as ScopeValues, S as ScopePolicy, D as DatabaseSchema, e as Row, M as MutationDefinition, v as Mutation, n as CoreMutation, a as QueryEngine, U as QueryResponse } from './types-D5CCaqcd.js';
1
+ import { ab as ScopeValues, S as ScopePolicy, D as DatabaseSchema, e as Row, M as MutationDefinition, v as Mutation, n as CoreMutation, a as QueryEngine, U as QueryResponse } from './types-DgUZNKii.js';
2
2
  import { Q as Query } from './query.schema-B-LVNfyX.js';
3
3
 
4
4
  type MutationTx = {
@@ -15,11 +15,14 @@ type MutationContext = {
15
15
  scope: ScopeValues;
16
16
  policy: ScopePolicy;
17
17
  schema: DatabaseSchema;
18
+ checkMovedRows?: boolean;
19
+ answerReadableRows?: boolean;
18
20
  };
19
21
  type WriteResult = {
20
22
  table: string;
21
23
  op: 'insert' | 'update' | 'delete';
22
24
  rows: Row[];
25
+ readable?: Row[];
23
26
  };
24
27
  declare const executeWrites: (client: MutationClient, def: MutationDefinition, mctx: MutationContext) => Promise<WriteResult[]>;
25
28
  declare const executeMutation: (client: MutationClient, def: MutationDefinition, mctx: MutationContext) => Promise<Row[]>;
@@ -45,12 +48,15 @@ type VexHandlerConfig = {
45
48
  engine: QueryEngine;
46
49
  entities?: string[];
47
50
  locked?: boolean;
51
+ manageFingerprints?: boolean;
48
52
  scopePolicy?: ScopePolicy;
49
53
  policyForReach?: (reach: string) => Promise<ScopePolicy | undefined> | ScopePolicy | undefined;
50
54
  mutations?: {
51
55
  client: MutationClient;
52
56
  policy: ScopePolicy;
53
57
  onWrite?: (event: WriteEvent) => void;
58
+ checkMovedRows?: boolean;
59
+ answerReadableRows?: boolean;
54
60
  };
55
61
  onExecute?: (record: ExecuteRecord) => void;
56
62
  };
@@ -1,4 +1,4 @@
1
- import { ab as ScopeValues, S as ScopePolicy, D as DatabaseSchema, e as Row, M as MutationDefinition, v as Mutation, n as CoreMutation, a as QueryEngine, U as QueryResponse } from './types-BmHuPfPS.cjs';
1
+ import { ab as ScopeValues, S as ScopePolicy, D as DatabaseSchema, e as Row, M as MutationDefinition, v as Mutation, n as CoreMutation, a as QueryEngine, U as QueryResponse } from './types-BxkRxTTx.cjs';
2
2
  import { Q as Query } from './query.schema-B-LVNfyX.cjs';
3
3
 
4
4
  type MutationTx = {
@@ -15,11 +15,14 @@ type MutationContext = {
15
15
  scope: ScopeValues;
16
16
  policy: ScopePolicy;
17
17
  schema: DatabaseSchema;
18
+ checkMovedRows?: boolean;
19
+ answerReadableRows?: boolean;
18
20
  };
19
21
  type WriteResult = {
20
22
  table: string;
21
23
  op: 'insert' | 'update' | 'delete';
22
24
  rows: Row[];
25
+ readable?: Row[];
23
26
  };
24
27
  declare const executeWrites: (client: MutationClient, def: MutationDefinition, mctx: MutationContext) => Promise<WriteResult[]>;
25
28
  declare const executeMutation: (client: MutationClient, def: MutationDefinition, mctx: MutationContext) => Promise<Row[]>;
@@ -45,12 +48,15 @@ type VexHandlerConfig = {
45
48
  engine: QueryEngine;
46
49
  entities?: string[];
47
50
  locked?: boolean;
51
+ manageFingerprints?: boolean;
48
52
  scopePolicy?: ScopePolicy;
49
53
  policyForReach?: (reach: string) => Promise<ScopePolicy | undefined> | ScopePolicy | undefined;
50
54
  mutations?: {
51
55
  client: MutationClient;
52
56
  policy: ScopePolicy;
53
57
  onWrite?: (event: WriteEvent) => void;
58
+ checkMovedRows?: boolean;
59
+ answerReadableRows?: boolean;
54
60
  };
55
61
  onExecute?: (record: ExecuteRecord) => void;
56
62
  };