@niscorp/vex 0.4.4 → 0.4.5
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 +12 -0
- package/DOCS.md +89 -0
- package/README.md +1 -0
- package/dist/adapters/express/index.d.cts +2 -2
- package/dist/adapters/express/index.d.ts +2 -2
- package/dist/adapters/hono/index.d.cts +2 -2
- package/dist/adapters/hono/index.d.ts +2 -2
- package/dist/agent/index.d.cts +1 -1
- package/dist/agent/index.d.ts +1 -1
- package/dist/{handler-CsFbanZA.d.cts → handler-CB0BqKsY.d.cts} +1 -1
- package/dist/{handler-CoJxInw-.d.ts → handler-O6XslV-S.d.ts} +1 -1
- package/dist/index.cjs +174 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +173 -28
- package/dist/index.js.map +1 -1
- package/dist/{types-B2HEmyNq.d.cts → types-BmHuPfPS.d.cts} +33 -2
- package/dist/{types-DC68ZUuq.d.ts → types-D5CCaqcd.d.ts} +33 -2
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as Filter, F as FieldOrValue, Q as Query, C as ComputeExpression, A as AggregateExpression } from './query.schema-B-LVNfyX.cjs';
|
|
2
2
|
import { CompiledIr, JsonValue } from '@niscorp/prism';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { Sequence } from '@niscorp/strata';
|
|
4
|
+
import { Sequence, Upgrader } from '@niscorp/strata';
|
|
5
5
|
|
|
6
6
|
type ScopeValues = Record<string, unknown>;
|
|
7
7
|
type ScopeMatchOne = {
|
|
@@ -891,6 +891,35 @@ declare const scopeProfiles: (behaviors: ScopeBehaviors) => ReadonlySet<string>;
|
|
|
891
891
|
declare const createScopePolicy: (grants: ReadonlySet<string>, behaviors?: ScopeBehaviors, scoping?: string) => ScopePolicy;
|
|
892
892
|
declare const mergeScopePolicies: (policies: readonly ScopePolicy[]) => ScopePolicy;
|
|
893
893
|
|
|
894
|
+
declare const UNREADABLE_MODES: readonly ["refuse", "omit", "null"];
|
|
895
|
+
declare const UpgradedColumnSchema: z.ZodObject<{
|
|
896
|
+
stamp: z.ZodString;
|
|
897
|
+
kind: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
898
|
+
grammar: z.ZodString;
|
|
899
|
+
column: z.ZodString;
|
|
900
|
+
}, z.core.$strict>]>;
|
|
901
|
+
unreadable: z.ZodOptional<z.ZodEnum<{
|
|
902
|
+
null: "null";
|
|
903
|
+
refuse: "refuse";
|
|
904
|
+
omit: "omit";
|
|
905
|
+
}>>;
|
|
906
|
+
}, z.core.$strict>;
|
|
907
|
+
declare const UpgradedColumnsSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
908
|
+
stamp: z.ZodString;
|
|
909
|
+
kind: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
910
|
+
grammar: z.ZodString;
|
|
911
|
+
column: z.ZodString;
|
|
912
|
+
}, z.core.$strict>]>;
|
|
913
|
+
unreadable: z.ZodOptional<z.ZodEnum<{
|
|
914
|
+
null: "null";
|
|
915
|
+
refuse: "refuse";
|
|
916
|
+
omit: "omit";
|
|
917
|
+
}>>;
|
|
918
|
+
}, z.core.$strict>>>;
|
|
919
|
+
type UpgradedColumn = z.infer<typeof UpgradedColumnSchema>;
|
|
920
|
+
type UpgradedColumns = z.infer<typeof UpgradedColumnsSchema>;
|
|
921
|
+
type ColumnUpgrader = Pick<Upgrader, 'upgrade' | 'locate' | 'stamp'>;
|
|
922
|
+
|
|
894
923
|
type GenerationCaller = {
|
|
895
924
|
read: (dsl: Query) => Promise<{
|
|
896
925
|
rows: Row[];
|
|
@@ -928,6 +957,8 @@ type QueryEngineConfig = {
|
|
|
928
957
|
*/
|
|
929
958
|
behaviors?: ScopeBehaviors;
|
|
930
959
|
mapToShape?: MapToShape;
|
|
960
|
+
upgradedColumns?: UpgradedColumns;
|
|
961
|
+
upgrader?: ColumnUpgrader;
|
|
931
962
|
rows?: LiveRowsConfig;
|
|
932
963
|
config?: {
|
|
933
964
|
maxNestingDepth?: number;
|
|
@@ -967,4 +998,4 @@ type ExecuteOptions = {
|
|
|
967
998
|
onChange?: (response: QueryResponse) => void;
|
|
968
999
|
};
|
|
969
1000
|
|
|
970
|
-
export { type
|
|
1001
|
+
export { type ResolvedOnConflict as $, type AnalysisConfig as A, type BoundParams as B, type CompiledQuery as C, type DatabaseSchema as D, type EntitySchema as E, type FieldSchema as F, type GenerateDsl as G, type NormalizedType as H, type IndexSchema as I, type QueryErrorResponse as J, type QueryRequest as K, type LiveRowsConfig as L, type MutationDefinition as M, type NamedScopeBehaviors as N, type OkCacheEntry as O, type ParamSlot as P, type QueryEngineConfig as Q, type ResolvedQuery as R, type ScopePolicy as S, QueryRequestSchema as T, type QueryResponse as U, REFRESH_MODES as V, type RelationSchema as W, type ResolvedField as X, type ResolvedFilter as Y, type ResolvedJoin as Z, type ResolvedMutation as _, type QueryEngine as a, type ResolvedSemantic as a0, type ResolvedSource as a1, type ReturnedRef as a2, SCOPE_VERBS as a3, type ScopeBehaviors as a4, type ScopeBinding as a5, type ScopeEntityRule as a6, type ScopeMatch as a7, type ScopeRule as a8, type ScopeRules as a9, type ScopeSet as aa, type ScopeValues as ab, type TestResult as ac, UNREADABLE_MODES as ad, type UnsatisfiableCacheEntry as ae, type UpgradedColumn as af, type UpgradedColumns as ag, UpgradedColumnsSchema as ah, type VexEvent as ai, type VexEventHandler as aj, createScopePolicy as ak, isRefresh as al, mergeScopePolicies as am, scopeBindings as an, scopeGrants as ao, scopeProfiles as ap, type AnalysisResult as b, type ContextMeta as c, type DatabaseAdapter as d, type Row as e, type ResolvedExists as f, type QueryErrorCode as g, type CacheBackend as h, type CacheEntry as i, type Refresh as j, type ContextContract as k, type AdapterCapabilities as l, type ColumnUpgrader as m, type CoreMutation as n, type ExecuteOptions as o, type GenerationCaller as p, type IntrospectOptions as q, type ItemRef as r, type LiveRowsStats as s, type LookupValue as t, type MapToShape as u, type Mutation as v, type MutationCacheEntry as w, MutationDefinitionSchema as x, MutationSchema as y, type MutationValue as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as Filter, F as FieldOrValue, Q as Query, C as ComputeExpression, A as AggregateExpression } from './query.schema-B-LVNfyX.js';
|
|
2
2
|
import { CompiledIr, JsonValue } from '@niscorp/prism';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { Sequence } from '@niscorp/strata';
|
|
4
|
+
import { Sequence, Upgrader } from '@niscorp/strata';
|
|
5
5
|
|
|
6
6
|
type ScopeValues = Record<string, unknown>;
|
|
7
7
|
type ScopeMatchOne = {
|
|
@@ -891,6 +891,35 @@ declare const scopeProfiles: (behaviors: ScopeBehaviors) => ReadonlySet<string>;
|
|
|
891
891
|
declare const createScopePolicy: (grants: ReadonlySet<string>, behaviors?: ScopeBehaviors, scoping?: string) => ScopePolicy;
|
|
892
892
|
declare const mergeScopePolicies: (policies: readonly ScopePolicy[]) => ScopePolicy;
|
|
893
893
|
|
|
894
|
+
declare const UNREADABLE_MODES: readonly ["refuse", "omit", "null"];
|
|
895
|
+
declare const UpgradedColumnSchema: z.ZodObject<{
|
|
896
|
+
stamp: z.ZodString;
|
|
897
|
+
kind: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
898
|
+
grammar: z.ZodString;
|
|
899
|
+
column: z.ZodString;
|
|
900
|
+
}, z.core.$strict>]>;
|
|
901
|
+
unreadable: z.ZodOptional<z.ZodEnum<{
|
|
902
|
+
null: "null";
|
|
903
|
+
refuse: "refuse";
|
|
904
|
+
omit: "omit";
|
|
905
|
+
}>>;
|
|
906
|
+
}, z.core.$strict>;
|
|
907
|
+
declare const UpgradedColumnsSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
908
|
+
stamp: z.ZodString;
|
|
909
|
+
kind: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
910
|
+
grammar: z.ZodString;
|
|
911
|
+
column: z.ZodString;
|
|
912
|
+
}, z.core.$strict>]>;
|
|
913
|
+
unreadable: z.ZodOptional<z.ZodEnum<{
|
|
914
|
+
null: "null";
|
|
915
|
+
refuse: "refuse";
|
|
916
|
+
omit: "omit";
|
|
917
|
+
}>>;
|
|
918
|
+
}, z.core.$strict>>>;
|
|
919
|
+
type UpgradedColumn = z.infer<typeof UpgradedColumnSchema>;
|
|
920
|
+
type UpgradedColumns = z.infer<typeof UpgradedColumnsSchema>;
|
|
921
|
+
type ColumnUpgrader = Pick<Upgrader, 'upgrade' | 'locate' | 'stamp'>;
|
|
922
|
+
|
|
894
923
|
type GenerationCaller = {
|
|
895
924
|
read: (dsl: Query) => Promise<{
|
|
896
925
|
rows: Row[];
|
|
@@ -928,6 +957,8 @@ type QueryEngineConfig = {
|
|
|
928
957
|
*/
|
|
929
958
|
behaviors?: ScopeBehaviors;
|
|
930
959
|
mapToShape?: MapToShape;
|
|
960
|
+
upgradedColumns?: UpgradedColumns;
|
|
961
|
+
upgrader?: ColumnUpgrader;
|
|
931
962
|
rows?: LiveRowsConfig;
|
|
932
963
|
config?: {
|
|
933
964
|
maxNestingDepth?: number;
|
|
@@ -967,4 +998,4 @@ type ExecuteOptions = {
|
|
|
967
998
|
onChange?: (response: QueryResponse) => void;
|
|
968
999
|
};
|
|
969
1000
|
|
|
970
|
-
export { type
|
|
1001
|
+
export { type ResolvedOnConflict as $, type AnalysisConfig as A, type BoundParams as B, type CompiledQuery as C, type DatabaseSchema as D, type EntitySchema as E, type FieldSchema as F, type GenerateDsl as G, type NormalizedType as H, type IndexSchema as I, type QueryErrorResponse as J, type QueryRequest as K, type LiveRowsConfig as L, type MutationDefinition as M, type NamedScopeBehaviors as N, type OkCacheEntry as O, type ParamSlot as P, type QueryEngineConfig as Q, type ResolvedQuery as R, type ScopePolicy as S, QueryRequestSchema as T, type QueryResponse as U, REFRESH_MODES as V, type RelationSchema as W, type ResolvedField as X, type ResolvedFilter as Y, type ResolvedJoin as Z, type ResolvedMutation as _, type QueryEngine as a, type ResolvedSemantic as a0, type ResolvedSource as a1, type ReturnedRef as a2, SCOPE_VERBS as a3, type ScopeBehaviors as a4, type ScopeBinding as a5, type ScopeEntityRule as a6, type ScopeMatch as a7, type ScopeRule as a8, type ScopeRules as a9, type ScopeSet as aa, type ScopeValues as ab, type TestResult as ac, UNREADABLE_MODES as ad, type UnsatisfiableCacheEntry as ae, type UpgradedColumn as af, type UpgradedColumns as ag, UpgradedColumnsSchema as ah, type VexEvent as ai, type VexEventHandler as aj, createScopePolicy as ak, isRefresh as al, mergeScopePolicies as am, scopeBindings as an, scopeGrants as ao, scopeProfiles as ap, type AnalysisResult as b, type ContextMeta as c, type DatabaseAdapter as d, type Row as e, type ResolvedExists as f, type QueryErrorCode as g, type CacheBackend as h, type CacheEntry as i, type Refresh as j, type ContextContract as k, type AdapterCapabilities as l, type ColumnUpgrader as m, type CoreMutation as n, type ExecuteOptions as o, type GenerationCaller as p, type IntrospectOptions as q, type ItemRef as r, type LiveRowsStats as s, type LookupValue as t, type MapToShape as u, type Mutation as v, type MutationCacheEntry as w, MutationDefinitionSchema as x, MutationSchema as y, type MutationValue as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@niscorp/vex",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"description": "Declarative query synthesis — intent to SQL with caching and scope policies",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"pg": "^8",
|
|
100
100
|
"zod": "^4.2.0",
|
|
101
101
|
"@niscorp/cortex": "^0.1.6",
|
|
102
|
-
"@niscorp/
|
|
103
|
-
"@niscorp/
|
|
102
|
+
"@niscorp/prism": "^0.3.4",
|
|
103
|
+
"@niscorp/strata": "^0.1.9"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@electric-sql/pglite": "^0.5.1",
|
|
@@ -114,9 +114,9 @@
|
|
|
114
114
|
"tsx": "^4.20.3",
|
|
115
115
|
"vitest": "^4.1.2",
|
|
116
116
|
"zod": "^4.6.5",
|
|
117
|
+
"@niscorp/prism": "^0.3.4",
|
|
117
118
|
"@niscorp/cortex": "^0.1.6",
|
|
118
119
|
"@niscorp/signal": "^0.1.9",
|
|
119
|
-
"@niscorp/prism": "^0.3.3",
|
|
120
120
|
"@niscorp/strata": "^0.1.9"
|
|
121
121
|
},
|
|
122
122
|
"peerDependenciesMeta": {
|