@coasys/ad4m 0.13.0-test-1 → 0.13.0-test-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.
- package/lib/index.cjs +2377 -849
- package/lib/index.js +2354 -846
- package/lib/src/Literal.js +6 -5
- package/lib/src/agent/AgentClient.d.ts +5 -1
- package/lib/src/agent/AgentClient.js +48 -2
- package/lib/src/expression/ExpressionRef.js +2 -2
- package/lib/src/index.d.ts +0 -1
- package/lib/src/index.js +0 -1
- package/lib/src/language/Language.d.ts +26 -176
- package/lib/src/language/Language.js +28 -2
- package/lib/src/model/Ad4mModel.d.ts +52 -28
- package/lib/src/model/Ad4mModel.js +255 -118
- package/lib/src/model/Ad4mModel.test.js +1727 -537
- package/lib/src/model/ModelQueryBuilder.d.ts +67 -34
- package/lib/src/model/ModelQueryBuilder.js +208 -79
- package/lib/src/model/Subject.js +6 -6
- package/lib/src/model/decorators.d.ts +14 -8
- package/lib/src/model/decorators.js +41 -14
- package/lib/src/model/hydration-batch.d.ts +34 -0
- package/lib/src/model/hydration-batch.js +147 -0
- package/lib/src/model/hydration-batching.test.d.ts +7 -0
- package/lib/src/model/hydration-batching.test.js +456 -0
- package/lib/src/model/hydration.d.ts +4 -3
- package/lib/src/model/hydration.js +365 -86
- package/lib/src/model/index.d.ts +4 -1
- package/lib/src/model/index.js +4 -1
- package/lib/src/model/json-schema.js +2 -2
- package/lib/src/model/query-cache.d.ts +30 -0
- package/lib/src/model/query-cache.js +66 -0
- package/lib/src/model/query-cache.test.d.ts +1 -0
- package/lib/src/model/query-cache.test.js +43 -0
- package/lib/src/model/query-common.d.ts +1 -1
- package/lib/src/model/query-common.js +1 -1
- package/lib/src/model/query-sparql-batch.d.ts +17 -0
- package/lib/src/model/query-sparql-batch.js +260 -0
- package/lib/src/model/query-sparql.d.ts +124 -0
- package/lib/src/model/query-sparql.js +767 -0
- package/lib/src/model/query-sparql.test.d.ts +1 -0
- package/lib/src/model/query-sparql.test.js +495 -0
- package/lib/src/model/{surreal-utils.d.ts → query-utils.d.ts} +12 -9
- package/lib/src/model/{surreal-utils.js → query-utils.js} +43 -27
- package/lib/src/model/relation-filtering.test.js +15 -15
- package/lib/src/model/sdna.js +1 -1
- package/lib/src/model/shacl-gen.js +42 -18
- package/lib/src/model/subscription-delta.test.d.ts +24 -0
- package/lib/src/model/subscription-delta.test.js +180 -0
- package/lib/src/model/subscription-pool.d.ts +39 -0
- package/lib/src/model/subscription-pool.js +165 -0
- package/lib/src/model/types.d.ts +52 -4
- package/lib/src/model/types.js +1 -1
- package/lib/src/perspectives/PerspectiveClient.d.ts +3 -17
- package/lib/src/perspectives/PerspectiveClient.js +42 -66
- package/lib/src/perspectives/PerspectiveClient.test.d.ts +1 -0
- package/lib/src/perspectives/PerspectiveClient.test.js +169 -0
- package/lib/src/perspectives/PerspectiveProxy.d.ts +54 -30
- package/lib/src/perspectives/PerspectiveProxy.js +239 -177
- package/lib/src/perspectives/PerspectiveResolver.d.ts +0 -1
- package/lib/src/perspectives/PerspectiveResolver.js +0 -11
- package/lib/src/perspectives/WakerSubscriptionManager.d.ts +3 -3
- package/lib/src/perspectives/WakerSubscriptionManager.js +7 -8
- package/lib/src/runtime/RuntimeResolver.d.ts +11 -0
- package/lib/src/runtime/RuntimeResolver.js +56 -0
- package/lib/src/schema.gql +11 -1
- package/lib/src/shacl/SHACLFlow.d.ts +1 -1
- package/lib/src/shacl/SHACLFlow.js +9 -9
- package/lib/src/shacl/SHACLShape.d.ts +1 -1
- package/lib/src/shacl/SHACLShape.js +38 -38
- package/lib/src/typeDefs.js +11 -1
- package/lib/src/utils.d.ts +6 -6
- package/lib/src/utils.js +6 -6
- package/package.json +1 -1
- package/src/Ad4mClient.test.ts +56 -1
- package/src/Literal.test.ts +10 -5
- package/src/Literal.ts +6 -5
- package/src/agent/AgentClient.ts +53 -1
- package/src/expression/ExpressionRef.ts +2 -2
- package/src/index.ts +0 -1
- package/src/language/Language.ts +55 -231
- package/src/model/Ad4mModel.test.ts +1709 -572
- package/src/model/Ad4mModel.ts +274 -120
- package/src/model/ModelQueryBuilder.ts +234 -87
- package/src/model/Subject.ts +6 -6
- package/src/model/decorators.ts +51 -22
- package/src/model/hydration-batch.ts +205 -0
- package/src/model/hydration-batching.test.ts +563 -0
- package/src/model/hydration.ts +349 -84
- package/src/model/index.ts +4 -1
- package/src/model/json-schema.ts +2 -2
- package/src/model/query-cache.test.ts +54 -0
- package/src/model/query-cache.ts +79 -0
- package/src/model/query-common.ts +1 -1
- package/src/model/query-sparql-batch.ts +301 -0
- package/src/model/query-sparql.test.ts +568 -0
- package/src/model/query-sparql.ts +820 -0
- package/src/model/{surreal-utils.ts → query-utils.ts} +44 -27
- package/src/model/relation-filtering.test.ts +15 -15
- package/src/model/sdna.ts +1 -1
- package/src/model/shacl-gen.ts +42 -17
- package/src/model/subscription-delta.test.ts +207 -0
- package/src/model/subscription-pool.ts +211 -0
- package/src/model/types.ts +53 -4
- package/src/perspectives/PerspectiveClient.test.ts +204 -0
- package/src/perspectives/PerspectiveClient.ts +41 -68
- package/src/perspectives/PerspectiveProxy.ts +244 -181
- package/src/perspectives/PerspectiveResolver.ts +0 -8
- package/src/perspectives/WakerSubscriptionManager.ts +8 -9
- package/src/runtime/RuntimeResolver.ts +43 -0
- package/src/shacl/SHACLFlow.ts +9 -9
- package/src/shacl/SHACLShape.ts +39 -39
- package/src/utils.ts +6 -6
- package/lib/src/model/query-surreal.d.ts +0 -44
- package/lib/src/model/query-surreal.js +0 -249
- package/src/language/LanguageContext.ts +0 -37
- package/src/model/query-surreal.ts +0 -280
- package/tsconfig-browser.json +0 -82
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SurrealQL query building utilities for Ad4mModel.
|
|
3
|
-
*
|
|
4
|
-
* Contains the graph-traversal WHERE clause builder, legacy
|
|
5
|
-
* subquery-based clause builders, SELECT-field builders, and
|
|
6
|
-
* the main `buildSurrealQLQuery()` function that produces a
|
|
7
|
-
* complete SurrealQL query string from a `Query` object.
|
|
8
|
-
*
|
|
9
|
-
* All functions are stateless — model metadata and relation metadata
|
|
10
|
-
* are passed in as parameters instead of accessed via `this`.
|
|
11
|
-
*
|
|
12
|
-
* @module
|
|
13
|
-
*/
|
|
14
|
-
import { escapeSurrealString } from "../utils";
|
|
15
|
-
import { formatSurrealValue } from "./surreal-utils";
|
|
16
|
-
import { resolveParentPredicate } from "./query-common";
|
|
17
|
-
// ─── Graph Traversal WHERE Clause ────────────────────────────────────────────
|
|
18
|
-
/**
|
|
19
|
-
* Builds WHERE clause filters using SurrealDB graph traversal syntax.
|
|
20
|
-
*
|
|
21
|
-
* Translates where conditions into `->link[WHERE ...]` / `<-link[WHERE ...]`
|
|
22
|
-
* filters that SurrealDB can optimize via graph indexes.
|
|
23
|
-
*
|
|
24
|
-
* @param metadata - Model metadata from `getModelMetadata()`
|
|
25
|
-
* @param allRelationsMetadata - Full relation metadata (needed for belongs-to
|
|
26
|
-
* direction detection)
|
|
27
|
-
* @param where - User-supplied where conditions
|
|
28
|
-
* @returns Combined AND-joined condition string, or empty string
|
|
29
|
-
*/
|
|
30
|
-
export function buildGraphTraversalWhereClause(metadata, allRelationsMetadata, where) {
|
|
31
|
-
if (!where)
|
|
32
|
-
return '';
|
|
33
|
-
const conditions = [];
|
|
34
|
-
for (const [propertyName, condition] of Object.entries(where)) {
|
|
35
|
-
const isSpecial = ['id', 'author', 'timestamp'].includes(propertyName);
|
|
36
|
-
if (isSpecial) {
|
|
37
|
-
if (propertyName === 'author' || propertyName === 'timestamp') {
|
|
38
|
-
continue; // Filtered post-query in JS
|
|
39
|
-
}
|
|
40
|
-
const columnName = 'uri';
|
|
41
|
-
if (Array.isArray(condition)) {
|
|
42
|
-
const formattedValues = condition.map(v => formatSurrealValue(v)).join(', ');
|
|
43
|
-
conditions.push(`${columnName} IN [${formattedValues}]`);
|
|
44
|
-
}
|
|
45
|
-
else if (typeof condition === 'object' && condition !== null) {
|
|
46
|
-
const ops = condition;
|
|
47
|
-
if (ops.not !== undefined) {
|
|
48
|
-
if (Array.isArray(ops.not)) {
|
|
49
|
-
const formattedValues = ops.not.map(v => formatSurrealValue(v)).join(', ');
|
|
50
|
-
conditions.push(`${columnName} NOT IN [${formattedValues}]`);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
conditions.push(`${columnName} != ${formatSurrealValue(ops.not)}`);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
if (ops.between !== undefined && Array.isArray(ops.between) && ops.between.length === 2) {
|
|
57
|
-
conditions.push(`${columnName} >= ${formatSurrealValue(ops.between[0])} AND ${columnName} <= ${formatSurrealValue(ops.between[1])}`);
|
|
58
|
-
}
|
|
59
|
-
if (ops.gt !== undefined) {
|
|
60
|
-
conditions.push(`${columnName} > ${formatSurrealValue(ops.gt)}`);
|
|
61
|
-
}
|
|
62
|
-
if (ops.gte !== undefined) {
|
|
63
|
-
conditions.push(`${columnName} >= ${formatSurrealValue(ops.gte)}`);
|
|
64
|
-
}
|
|
65
|
-
if (ops.lt !== undefined) {
|
|
66
|
-
conditions.push(`${columnName} < ${formatSurrealValue(ops.lt)}`);
|
|
67
|
-
}
|
|
68
|
-
if (ops.lte !== undefined) {
|
|
69
|
-
conditions.push(`${columnName} <= ${formatSurrealValue(ops.lte)}`);
|
|
70
|
-
}
|
|
71
|
-
if (ops.contains !== undefined) {
|
|
72
|
-
conditions.push(`${columnName} CONTAINS ${formatSurrealValue(ops.contains)}`);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
conditions.push(`${columnName} = ${formatSurrealValue(condition)}`);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
// Regular properties — check relation metadata first for direction
|
|
81
|
-
const relMeta = allRelationsMetadata[propertyName];
|
|
82
|
-
const isBelongs = relMeta?.kind === 'belongsToOne' || relMeta?.kind === 'belongsToMany';
|
|
83
|
-
if (relMeta) {
|
|
84
|
-
const predicate = escapeSurrealString(relMeta.predicate);
|
|
85
|
-
if (Array.isArray(condition)) {
|
|
86
|
-
const formattedValues = condition.map(v => formatSurrealValue(v)).join(', ');
|
|
87
|
-
if (isBelongs) {
|
|
88
|
-
conditions.push(`count(<-link[WHERE predicate = '${predicate}' AND in.uri IN [${formattedValues}]]) > 0`);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}' AND out.uri IN [${formattedValues}]]) > 0`);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
else if (typeof condition === 'object' && condition !== null) {
|
|
95
|
-
const ops = condition;
|
|
96
|
-
if (ops.not !== undefined) {
|
|
97
|
-
if (Array.isArray(ops.not)) {
|
|
98
|
-
const formattedValues = ops.not.map(v => formatSurrealValue(v)).join(', ');
|
|
99
|
-
if (isBelongs) {
|
|
100
|
-
conditions.push(`count(<-link[WHERE predicate = '${predicate}' AND in.uri IN [${formattedValues}]]) = 0`);
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}' AND out.uri IN [${formattedValues}]]) = 0`);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
if (isBelongs) {
|
|
108
|
-
conditions.push(`count(<-link[WHERE predicate = '${predicate}' AND in.uri = ${formatSurrealValue(ops.not)}]) = 0`);
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}' AND out.uri = ${formatSurrealValue(ops.not)}]) = 0`);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
if (isBelongs) {
|
|
118
|
-
conditions.push(`count(<-link[WHERE predicate = '${predicate}' AND in.uri = ${formatSurrealValue(condition)}]) > 0`);
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}' AND out.uri = ${formatSurrealValue(condition)}]) > 0`);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
continue;
|
|
125
|
-
}
|
|
126
|
-
const propMeta = metadata.properties[propertyName];
|
|
127
|
-
if (!propMeta)
|
|
128
|
-
continue;
|
|
129
|
-
const predicate = escapeSurrealString(propMeta.predicate);
|
|
130
|
-
const targetField = propMeta.resolveLanguage === 'literal' ? 'fn::parse_literal(out.uri)' : 'out.uri';
|
|
131
|
-
if (Array.isArray(condition)) {
|
|
132
|
-
const formattedValues = condition.map(v => formatSurrealValue(v)).join(', ');
|
|
133
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}' AND ${targetField} IN [${formattedValues}]]) > 0`);
|
|
134
|
-
}
|
|
135
|
-
else if (typeof condition === 'object' && condition !== null) {
|
|
136
|
-
const ops = condition;
|
|
137
|
-
if (ops.not !== undefined) {
|
|
138
|
-
if (Array.isArray(ops.not)) {
|
|
139
|
-
const formattedValues = ops.not.map(v => formatSurrealValue(v)).join(', ');
|
|
140
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}' AND ${targetField} IN [${formattedValues}]]) = 0`);
|
|
141
|
-
}
|
|
142
|
-
else {
|
|
143
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}' AND ${targetField} = ${formatSurrealValue(ops.not)}]) = 0`);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
const hasComparisonOps = ops.gt !== undefined || ops.gte !== undefined ||
|
|
147
|
-
ops.lt !== undefined || ops.lte !== undefined ||
|
|
148
|
-
ops.between !== undefined || ops.contains !== undefined;
|
|
149
|
-
if (hasComparisonOps) {
|
|
150
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}']) > 0`);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}' AND ${targetField} = ${formatSurrealValue(condition)}]) > 0`);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
return conditions.join(' AND ');
|
|
159
|
-
}
|
|
160
|
-
// ─── Main Query Builder ─────────────────────────────────────────────────────
|
|
161
|
-
/**
|
|
162
|
-
* Builds a complete SurrealQL query from a Query object and model metadata.
|
|
163
|
-
*
|
|
164
|
-
* This is the core implementation behind `Ad4mModel.queryToSurrealQL()`.
|
|
165
|
-
* It produces a graph-traversal query that:
|
|
166
|
-
* 1. Filters nodes by required predicates (conformance check)
|
|
167
|
-
* 2. Applies user WHERE conditions
|
|
168
|
-
* 3. Fetches all outgoing links for hydration
|
|
169
|
-
*
|
|
170
|
-
* @param metadata - Model metadata from `getModelMetadata()`
|
|
171
|
-
* @param allRelationsMetadata - Full relation registry (for belongs-to detection)
|
|
172
|
-
* @param query - Query parameters
|
|
173
|
-
* @param modelClass - The model class (for `resolveParentPredicate`)
|
|
174
|
-
* @returns Complete SurrealQL query string
|
|
175
|
-
*/
|
|
176
|
-
export function buildSurrealQLQuery(metadata, allRelationsMetadata, query, modelClass) {
|
|
177
|
-
const { where } = query;
|
|
178
|
-
// Build graph traversal filters for required predicates
|
|
179
|
-
const graphTraversalFilters = [];
|
|
180
|
-
// Parent filter
|
|
181
|
-
if (query.parent) {
|
|
182
|
-
const parentPredicate = resolveParentPredicate(query.parent, modelClass);
|
|
183
|
-
graphTraversalFilters.push(`count(<-link[WHERE in.uri = ${formatSurrealValue(query.parent.id)} AND predicate = '${escapeSurrealString(parentPredicate)}']) > 0`);
|
|
184
|
-
}
|
|
185
|
-
// Required property filters
|
|
186
|
-
for (const [, propMeta] of Object.entries(metadata.properties)) {
|
|
187
|
-
if (propMeta.required) {
|
|
188
|
-
if (propMeta.getter)
|
|
189
|
-
continue;
|
|
190
|
-
if (propMeta.flag && propMeta.initial) {
|
|
191
|
-
graphTraversalFilters.push(`count(->link[WHERE predicate = '${escapeSurrealString(propMeta.predicate)}' AND out.uri = '${escapeSurrealString(propMeta.initial)}']) > 0`);
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
graphTraversalFilters.push(`count(->link[WHERE predicate = '${escapeSurrealString(propMeta.predicate)}']) > 0`);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
// Fallback: initial-value filters
|
|
199
|
-
if (graphTraversalFilters.length === 0) {
|
|
200
|
-
for (const [, propMeta] of Object.entries(metadata.properties)) {
|
|
201
|
-
if (propMeta.initial) {
|
|
202
|
-
if (propMeta.flag) {
|
|
203
|
-
graphTraversalFilters.push(`count(->link[WHERE predicate = '${escapeSurrealString(propMeta.predicate)}' AND out.uri = '${escapeSurrealString(propMeta.initial)}']) > 0`);
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
graphTraversalFilters.push(`count(->link[WHERE predicate = '${escapeSurrealString(propMeta.predicate)}']) > 0`);
|
|
207
|
-
}
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
// Fallback: open-world structural matching
|
|
213
|
-
if (graphTraversalFilters.length === 0) {
|
|
214
|
-
const structuralPredicates = [];
|
|
215
|
-
for (const [, propMeta] of Object.entries(metadata.properties)) {
|
|
216
|
-
if (propMeta.predicate) {
|
|
217
|
-
structuralPredicates.push(`predicate = '${escapeSurrealString(propMeta.predicate)}'`);
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
if (metadata.relations) {
|
|
221
|
-
for (const [, relMeta] of Object.entries(metadata.relations)) {
|
|
222
|
-
if (relMeta.predicate) {
|
|
223
|
-
structuralPredicates.push(`predicate = '${escapeSurrealString(relMeta.predicate)}'`);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
if (structuralPredicates.length > 0) {
|
|
228
|
-
graphTraversalFilters.push(`count(->link[WHERE (${structuralPredicates.join(' OR ')})]) > 0`);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
// User WHERE clause
|
|
232
|
-
const userWhereClause = buildGraphTraversalWhereClause(metadata, allRelationsMetadata, where);
|
|
233
|
-
const whereConditions = [];
|
|
234
|
-
whereConditions.push(...graphTraversalFilters);
|
|
235
|
-
if (userWhereClause) {
|
|
236
|
-
whereConditions.push(userWhereClause);
|
|
237
|
-
}
|
|
238
|
-
whereConditions.push(`count(->link) > 0`);
|
|
239
|
-
const fullQuery = `
|
|
240
|
-
SELECT
|
|
241
|
-
id AS source,
|
|
242
|
-
uri AS source_uri,
|
|
243
|
-
->link AS links
|
|
244
|
-
FROM node
|
|
245
|
-
WHERE ${whereConditions.join(' AND ')}
|
|
246
|
-
FETCH links
|
|
247
|
-
`.trim();
|
|
248
|
-
return fullQuery;
|
|
249
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { AppSignalCb } from '@holochain/client'
|
|
2
|
-
import { Expression } from "../expression/Expression";
|
|
3
|
-
|
|
4
|
-
export interface AgentService {
|
|
5
|
-
readonly did: string
|
|
6
|
-
createSignedExpression(data: any): Expression
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface SignaturesService {
|
|
10
|
-
verify(expr: Expression): boolean
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface LanguageContext {
|
|
14
|
-
agent: AgentService;
|
|
15
|
-
signatures: SignaturesService;
|
|
16
|
-
storageDirectory: string;
|
|
17
|
-
customSettings: object;
|
|
18
|
-
Holochain: HolochainLanguageDelegate | undefined;
|
|
19
|
-
ad4mSignal: Ad4mSignalCB;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export class Dna {
|
|
23
|
-
file: Buffer
|
|
24
|
-
nick: string
|
|
25
|
-
zomeCalls: [string, string][]
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface HolochainLanguageDelegate {
|
|
29
|
-
/** Installs/registers a given DNA in the ad4m-executor */
|
|
30
|
-
registerDNAs(dnas: Dna[], holochainSignalCallback?: AppSignalCb): Promise<void>;
|
|
31
|
-
/** Makes a single call to a given holochain DNA. Underlying implementation puts these calls into a sync fifo queue */
|
|
32
|
-
call(dnaNick: string, zomeName: string, fnName: string, params: object|string): Promise<any>;
|
|
33
|
-
/** Makes all supplied calls in parallel to the provided holochain dna... Should only be called on read operations to avoid source chain async mutation errors */
|
|
34
|
-
callAsync(calls: {dnaNick: string, zomeName: string, fnName: string, params: object|string}[], timeoutMs?: number): Promise<any[]>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export type Ad4mSignalCB = (signal: any) => void
|
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SurrealQL query building utilities for Ad4mModel.
|
|
3
|
-
*
|
|
4
|
-
* Contains the graph-traversal WHERE clause builder, legacy
|
|
5
|
-
* subquery-based clause builders, SELECT-field builders, and
|
|
6
|
-
* the main `buildSurrealQLQuery()` function that produces a
|
|
7
|
-
* complete SurrealQL query string from a `Query` object.
|
|
8
|
-
*
|
|
9
|
-
* All functions are stateless — model metadata and relation metadata
|
|
10
|
-
* are passed in as parameters instead of accessed via `this`.
|
|
11
|
-
*
|
|
12
|
-
* @module
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { escapeSurrealString } from "../utils";
|
|
16
|
-
import { formatSurrealValue } from "./surreal-utils";
|
|
17
|
-
import { resolveParentPredicate } from "./query-common";
|
|
18
|
-
import type { RelationMetadataEntry } from "./decorators";
|
|
19
|
-
import type {
|
|
20
|
-
Where, Query, ModelMetadata
|
|
21
|
-
} from "./types";
|
|
22
|
-
|
|
23
|
-
// ─── Graph Traversal WHERE Clause ────────────────────────────────────────────
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Builds WHERE clause filters using SurrealDB graph traversal syntax.
|
|
27
|
-
*
|
|
28
|
-
* Translates where conditions into `->link[WHERE ...]` / `<-link[WHERE ...]`
|
|
29
|
-
* filters that SurrealDB can optimize via graph indexes.
|
|
30
|
-
*
|
|
31
|
-
* @param metadata - Model metadata from `getModelMetadata()`
|
|
32
|
-
* @param allRelationsMetadata - Full relation metadata (needed for belongs-to
|
|
33
|
-
* direction detection)
|
|
34
|
-
* @param where - User-supplied where conditions
|
|
35
|
-
* @returns Combined AND-joined condition string, or empty string
|
|
36
|
-
*/
|
|
37
|
-
export function buildGraphTraversalWhereClause(
|
|
38
|
-
metadata: ModelMetadata,
|
|
39
|
-
allRelationsMetadata: Record<string, RelationMetadataEntry>,
|
|
40
|
-
where?: Where,
|
|
41
|
-
): string {
|
|
42
|
-
if (!where) return '';
|
|
43
|
-
|
|
44
|
-
const conditions: string[] = [];
|
|
45
|
-
|
|
46
|
-
for (const [propertyName, condition] of Object.entries(where)) {
|
|
47
|
-
const isSpecial = ['id', 'author', 'timestamp'].includes(propertyName);
|
|
48
|
-
|
|
49
|
-
if (isSpecial) {
|
|
50
|
-
if (propertyName === 'author' || propertyName === 'timestamp') {
|
|
51
|
-
continue; // Filtered post-query in JS
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const columnName = 'uri';
|
|
55
|
-
|
|
56
|
-
if (Array.isArray(condition)) {
|
|
57
|
-
const formattedValues = condition.map(v => formatSurrealValue(v)).join(', ');
|
|
58
|
-
conditions.push(`${columnName} IN [${formattedValues}]`);
|
|
59
|
-
} else if (typeof condition === 'object' && condition !== null) {
|
|
60
|
-
const ops = condition as any;
|
|
61
|
-
if (ops.not !== undefined) {
|
|
62
|
-
if (Array.isArray(ops.not)) {
|
|
63
|
-
const formattedValues = ops.not.map(v => formatSurrealValue(v)).join(', ');
|
|
64
|
-
conditions.push(`${columnName} NOT IN [${formattedValues}]`);
|
|
65
|
-
} else {
|
|
66
|
-
conditions.push(`${columnName} != ${formatSurrealValue(ops.not)}`);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
if (ops.between !== undefined && Array.isArray(ops.between) && ops.between.length === 2) {
|
|
70
|
-
conditions.push(`${columnName} >= ${formatSurrealValue(ops.between[0])} AND ${columnName} <= ${formatSurrealValue(ops.between[1])}`);
|
|
71
|
-
}
|
|
72
|
-
if (ops.gt !== undefined) {
|
|
73
|
-
conditions.push(`${columnName} > ${formatSurrealValue(ops.gt)}`);
|
|
74
|
-
}
|
|
75
|
-
if (ops.gte !== undefined) {
|
|
76
|
-
conditions.push(`${columnName} >= ${formatSurrealValue(ops.gte)}`);
|
|
77
|
-
}
|
|
78
|
-
if (ops.lt !== undefined) {
|
|
79
|
-
conditions.push(`${columnName} < ${formatSurrealValue(ops.lt)}`);
|
|
80
|
-
}
|
|
81
|
-
if (ops.lte !== undefined) {
|
|
82
|
-
conditions.push(`${columnName} <= ${formatSurrealValue(ops.lte)}`);
|
|
83
|
-
}
|
|
84
|
-
if (ops.contains !== undefined) {
|
|
85
|
-
conditions.push(`${columnName} CONTAINS ${formatSurrealValue(ops.contains)}`);
|
|
86
|
-
}
|
|
87
|
-
} else {
|
|
88
|
-
conditions.push(`${columnName} = ${formatSurrealValue(condition)}`);
|
|
89
|
-
}
|
|
90
|
-
} else {
|
|
91
|
-
// Regular properties — check relation metadata first for direction
|
|
92
|
-
const relMeta = allRelationsMetadata[propertyName];
|
|
93
|
-
const isBelongs = relMeta?.kind === 'belongsToOne' || relMeta?.kind === 'belongsToMany';
|
|
94
|
-
|
|
95
|
-
if (relMeta) {
|
|
96
|
-
const predicate = escapeSurrealString(relMeta.predicate);
|
|
97
|
-
|
|
98
|
-
if (Array.isArray(condition)) {
|
|
99
|
-
const formattedValues = condition.map(v => formatSurrealValue(v)).join(', ');
|
|
100
|
-
if (isBelongs) {
|
|
101
|
-
conditions.push(`count(<-link[WHERE predicate = '${predicate}' AND in.uri IN [${formattedValues}]]) > 0`);
|
|
102
|
-
} else {
|
|
103
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}' AND out.uri IN [${formattedValues}]]) > 0`);
|
|
104
|
-
}
|
|
105
|
-
} else if (typeof condition === 'object' && condition !== null) {
|
|
106
|
-
const ops = condition as any;
|
|
107
|
-
if (ops.not !== undefined) {
|
|
108
|
-
if (Array.isArray(ops.not)) {
|
|
109
|
-
const formattedValues = ops.not.map(v => formatSurrealValue(v)).join(', ');
|
|
110
|
-
if (isBelongs) {
|
|
111
|
-
conditions.push(`count(<-link[WHERE predicate = '${predicate}' AND in.uri IN [${formattedValues}]]) = 0`);
|
|
112
|
-
} else {
|
|
113
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}' AND out.uri IN [${formattedValues}]]) = 0`);
|
|
114
|
-
}
|
|
115
|
-
} else {
|
|
116
|
-
if (isBelongs) {
|
|
117
|
-
conditions.push(`count(<-link[WHERE predicate = '${predicate}' AND in.uri = ${formatSurrealValue(ops.not)}]) = 0`);
|
|
118
|
-
} else {
|
|
119
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}' AND out.uri = ${formatSurrealValue(ops.not)}]) = 0`);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
} else {
|
|
124
|
-
if (isBelongs) {
|
|
125
|
-
conditions.push(`count(<-link[WHERE predicate = '${predicate}' AND in.uri = ${formatSurrealValue(condition)}]) > 0`);
|
|
126
|
-
} else {
|
|
127
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}' AND out.uri = ${formatSurrealValue(condition)}]) > 0`);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
continue;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const propMeta = metadata.properties[propertyName];
|
|
134
|
-
if (!propMeta) continue;
|
|
135
|
-
|
|
136
|
-
const predicate = escapeSurrealString(propMeta.predicate);
|
|
137
|
-
const targetField = propMeta.resolveLanguage === 'literal' ? 'fn::parse_literal(out.uri)' : 'out.uri';
|
|
138
|
-
|
|
139
|
-
if (Array.isArray(condition)) {
|
|
140
|
-
const formattedValues = condition.map(v => formatSurrealValue(v)).join(', ');
|
|
141
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}' AND ${targetField} IN [${formattedValues}]]) > 0`);
|
|
142
|
-
} else if (typeof condition === 'object' && condition !== null) {
|
|
143
|
-
const ops = condition as any;
|
|
144
|
-
if (ops.not !== undefined) {
|
|
145
|
-
if (Array.isArray(ops.not)) {
|
|
146
|
-
const formattedValues = ops.not.map(v => formatSurrealValue(v)).join(', ');
|
|
147
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}' AND ${targetField} IN [${formattedValues}]]) = 0`);
|
|
148
|
-
} else {
|
|
149
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}' AND ${targetField} = ${formatSurrealValue(ops.not)}]) = 0`);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
const hasComparisonOps = ops.gt !== undefined || ops.gte !== undefined ||
|
|
153
|
-
ops.lt !== undefined || ops.lte !== undefined ||
|
|
154
|
-
ops.between !== undefined || ops.contains !== undefined;
|
|
155
|
-
if (hasComparisonOps) {
|
|
156
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}']) > 0`);
|
|
157
|
-
}
|
|
158
|
-
} else {
|
|
159
|
-
conditions.push(`count(->link[WHERE predicate = '${predicate}' AND ${targetField} = ${formatSurrealValue(condition)}]) > 0`);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
return conditions.join(' AND ');
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// ─── Main Query Builder ─────────────────────────────────────────────────────
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Builds a complete SurrealQL query from a Query object and model metadata.
|
|
171
|
-
*
|
|
172
|
-
* This is the core implementation behind `Ad4mModel.queryToSurrealQL()`.
|
|
173
|
-
* It produces a graph-traversal query that:
|
|
174
|
-
* 1. Filters nodes by required predicates (conformance check)
|
|
175
|
-
* 2. Applies user WHERE conditions
|
|
176
|
-
* 3. Fetches all outgoing links for hydration
|
|
177
|
-
*
|
|
178
|
-
* @param metadata - Model metadata from `getModelMetadata()`
|
|
179
|
-
* @param allRelationsMetadata - Full relation registry (for belongs-to detection)
|
|
180
|
-
* @param query - Query parameters
|
|
181
|
-
* @param modelClass - The model class (for `resolveParentPredicate`)
|
|
182
|
-
* @returns Complete SurrealQL query string
|
|
183
|
-
*/
|
|
184
|
-
export function buildSurrealQLQuery(
|
|
185
|
-
metadata: ModelMetadata,
|
|
186
|
-
allRelationsMetadata: Record<string, RelationMetadataEntry>,
|
|
187
|
-
query: Query,
|
|
188
|
-
modelClass: any,
|
|
189
|
-
): string {
|
|
190
|
-
const { where } = query;
|
|
191
|
-
|
|
192
|
-
// Build graph traversal filters for required predicates
|
|
193
|
-
const graphTraversalFilters: string[] = [];
|
|
194
|
-
|
|
195
|
-
// Parent filter
|
|
196
|
-
if (query.parent) {
|
|
197
|
-
const parentPredicate = resolveParentPredicate(query.parent, modelClass);
|
|
198
|
-
graphTraversalFilters.push(
|
|
199
|
-
`count(<-link[WHERE in.uri = ${formatSurrealValue(query.parent.id)} AND predicate = '${escapeSurrealString(parentPredicate)}']) > 0`
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// Required property filters
|
|
204
|
-
for (const [, propMeta] of Object.entries(metadata.properties)) {
|
|
205
|
-
if (propMeta.required) {
|
|
206
|
-
if (propMeta.getter) continue;
|
|
207
|
-
if (propMeta.flag && propMeta.initial) {
|
|
208
|
-
graphTraversalFilters.push(
|
|
209
|
-
`count(->link[WHERE predicate = '${escapeSurrealString(propMeta.predicate)}' AND out.uri = '${escapeSurrealString(propMeta.initial)}']) > 0`
|
|
210
|
-
);
|
|
211
|
-
} else {
|
|
212
|
-
graphTraversalFilters.push(
|
|
213
|
-
`count(->link[WHERE predicate = '${escapeSurrealString(propMeta.predicate)}']) > 0`
|
|
214
|
-
);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
// Fallback: initial-value filters
|
|
220
|
-
if (graphTraversalFilters.length === 0) {
|
|
221
|
-
for (const [, propMeta] of Object.entries(metadata.properties)) {
|
|
222
|
-
if (propMeta.initial) {
|
|
223
|
-
if (propMeta.flag) {
|
|
224
|
-
graphTraversalFilters.push(
|
|
225
|
-
`count(->link[WHERE predicate = '${escapeSurrealString(propMeta.predicate)}' AND out.uri = '${escapeSurrealString(propMeta.initial)}']) > 0`
|
|
226
|
-
);
|
|
227
|
-
} else {
|
|
228
|
-
graphTraversalFilters.push(
|
|
229
|
-
`count(->link[WHERE predicate = '${escapeSurrealString(propMeta.predicate)}']) > 0`
|
|
230
|
-
);
|
|
231
|
-
}
|
|
232
|
-
break;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
// Fallback: open-world structural matching
|
|
238
|
-
if (graphTraversalFilters.length === 0) {
|
|
239
|
-
const structuralPredicates: string[] = [];
|
|
240
|
-
for (const [, propMeta] of Object.entries(metadata.properties)) {
|
|
241
|
-
if (propMeta.predicate) {
|
|
242
|
-
structuralPredicates.push(`predicate = '${escapeSurrealString(propMeta.predicate)}'`);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
if (metadata.relations) {
|
|
246
|
-
for (const [, relMeta] of Object.entries(metadata.relations)) {
|
|
247
|
-
if (relMeta.predicate) {
|
|
248
|
-
structuralPredicates.push(`predicate = '${escapeSurrealString(relMeta.predicate)}'`);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
if (structuralPredicates.length > 0) {
|
|
253
|
-
graphTraversalFilters.push(
|
|
254
|
-
`count(->link[WHERE (${structuralPredicates.join(' OR ')})]) > 0`
|
|
255
|
-
);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
// User WHERE clause
|
|
260
|
-
const userWhereClause = buildGraphTraversalWhereClause(metadata, allRelationsMetadata, where);
|
|
261
|
-
|
|
262
|
-
const whereConditions: string[] = [];
|
|
263
|
-
whereConditions.push(...graphTraversalFilters);
|
|
264
|
-
if (userWhereClause) {
|
|
265
|
-
whereConditions.push(userWhereClause);
|
|
266
|
-
}
|
|
267
|
-
whereConditions.push(`count(->link) > 0`);
|
|
268
|
-
|
|
269
|
-
const fullQuery = `
|
|
270
|
-
SELECT
|
|
271
|
-
id AS source,
|
|
272
|
-
uri AS source_uri,
|
|
273
|
-
->link AS links
|
|
274
|
-
FROM node
|
|
275
|
-
WHERE ${whereConditions.join(' AND ')}
|
|
276
|
-
FETCH links
|
|
277
|
-
`.trim();
|
|
278
|
-
|
|
279
|
-
return fullQuery;
|
|
280
|
-
}
|
package/tsconfig-browser.json
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"include": ["./src/**/*.ts"],
|
|
3
|
-
"exclude": ["./src/buildSchema.ts", "./src/Ad4mClient.test.ts"],
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"baseUrl": ".",
|
|
6
|
-
"paths": {
|
|
7
|
-
"type-graphql": ["./shims/type-graphql.ts"],
|
|
8
|
-
"reflect-metadata": ["./shims/reflect-metadata.ts"]
|
|
9
|
-
},
|
|
10
|
-
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
|
11
|
-
|
|
12
|
-
/* Basic Options */
|
|
13
|
-
// "incremental": true, /* Enable incremental compilation */
|
|
14
|
-
"target": "es2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
|
|
15
|
-
"lib": ["es2018", "esnext.asynciterable"],
|
|
16
|
-
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
|
17
|
-
// "lib": [], /* Specify library files to be included in the compilation. */
|
|
18
|
-
// "allowJs": true, /* Allow javascript files to be compiled. */
|
|
19
|
-
// "checkJs": true, /* Report errors in .js files. */
|
|
20
|
-
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
|
|
21
|
-
"declaration": true, /* Generates corresponding '.d.ts' file. */
|
|
22
|
-
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
|
23
|
-
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
|
24
|
-
// "outFile": "./", /* Concatenate and emit output to single file. */
|
|
25
|
-
"rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
|
26
|
-
"outDir": "./lib",
|
|
27
|
-
// "composite": true, /* Enable project compilation */
|
|
28
|
-
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
|
29
|
-
// "removeComments": true, /* Do not emit comments to output. */
|
|
30
|
-
// "noEmit": true, /* Do not emit outputs. */
|
|
31
|
-
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
|
32
|
-
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
|
33
|
-
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
|
34
|
-
|
|
35
|
-
/* Strict Type-Checking Options */
|
|
36
|
-
// "strict": true, /* Enable all strict type-checking options. */
|
|
37
|
-
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
|
38
|
-
// "strictNullChecks": true, /* Enable strict null checks. */
|
|
39
|
-
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
|
40
|
-
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
|
41
|
-
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
|
42
|
-
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
|
43
|
-
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
|
44
|
-
|
|
45
|
-
/* Additional Checks */
|
|
46
|
-
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
|
47
|
-
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
48
|
-
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
49
|
-
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
50
|
-
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
|
51
|
-
// "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
|
|
52
|
-
|
|
53
|
-
/* Module Resolution Options */
|
|
54
|
-
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
|
55
|
-
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
|
56
|
-
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
57
|
-
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
58
|
-
// "typeRoots": [], /* List of folders to include type definitions from. */
|
|
59
|
-
// "types": [], /* Type declaration files to be included in compilation. */
|
|
60
|
-
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
|
61
|
-
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
62
|
-
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
63
|
-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
64
|
-
|
|
65
|
-
/* Source Map Options */
|
|
66
|
-
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
67
|
-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
68
|
-
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
69
|
-
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
70
|
-
|
|
71
|
-
/* Experimental Options */
|
|
72
|
-
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
73
|
-
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
74
|
-
|
|
75
|
-
/* Advanced Options */
|
|
76
|
-
"skipLibCheck": true, /* Skip type checking of declaration files. */
|
|
77
|
-
"forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */
|
|
78
|
-
"emitDecoratorMetadata": true,
|
|
79
|
-
"experimentalDecorators": true,
|
|
80
|
-
"allowSyntheticDefaultImports": true
|
|
81
|
-
},
|
|
82
|
-
}
|