@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.
- package/CHANGELOG.md +78 -0
- package/DESIGN.md +72 -45
- package/DOCS.md +130 -21
- package/README.md +17 -0
- package/dist/adapters/express/index.cjs +606 -173
- package/dist/adapters/express/index.cjs.map +1 -1
- package/dist/adapters/express/index.d.cts +6 -2
- package/dist/adapters/express/index.d.ts +6 -2
- package/dist/adapters/express/index.js +16 -3
- package/dist/adapters/express/index.js.map +1 -1
- package/dist/adapters/hono/index.cjs +597 -173
- package/dist/adapters/hono/index.cjs.map +1 -1
- package/dist/adapters/hono/index.d.cts +5 -2
- package/dist/adapters/hono/index.d.ts +5 -2
- package/dist/adapters/hono/index.js +7 -3
- package/dist/adapters/hono/index.js.map +1 -1
- package/dist/agent/index.cjs +12 -12
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +1 -1
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +12 -12
- package/dist/agent/index.js.map +1 -1
- package/dist/{chunk-W5MYFJKT.js → chunk-F7OXXJIH.js} +562 -192
- package/dist/chunk-F7OXXJIH.js.map +1 -0
- package/dist/{chunk-F7RDSWYF.js → chunk-VHNCSQPO.js} +2 -2
- package/dist/{chunk-F7RDSWYF.js.map → chunk-VHNCSQPO.js.map} +1 -1
- package/dist/{handler-O6XslV-S.d.ts → handler-DdfaWN_J.d.ts} +7 -1
- package/dist/{handler-CB0BqKsY.d.cts → handler-kvZkxwaN.d.cts} +7 -1
- package/dist/index.cjs +493 -232
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +118 -221
- package/dist/index.js.map +1 -1
- package/dist/migrations/index.cjs.map +1 -1
- package/dist/migrations/index.js +1 -1
- package/dist/{types-BmHuPfPS.d.cts → types-BxkRxTTx.d.cts} +5 -0
- package/dist/{types-D5CCaqcd.d.ts → types-DgUZNKii.d.ts} +5 -0
- package/package.json +8 -8
- 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-
|
|
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-
|
|
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
|
};
|