@tellaro/tql 1.4.3 → 2.0.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/dist/index.js +67 -64
- package/dist/src/builder.d.ts +6 -0
- package/dist/src/completionProvider.js +276 -195
- package/dist/src/complexityAnalyzer.js +41 -32
- package/dist/src/index.d.ts +2 -2
- package/dist/src/parser.d.ts +193 -1
- package/dist/src/parser.js +614 -127
- package/dist/src/semanticPreview.d.ts +23 -0
- package/dist/src/semanticPreview.js +111 -41
- package/dist/src/tokenizer.d.ts +134 -5
- package/dist/src/tokenizer.js +129 -110
- package/dist/src/types.d.ts +86 -4
- package/dist/src/validator.d.ts +101 -1
- package/dist/src/validator.js +391 -152
- package/dist/tql.css +1 -1
- package/dist/vue/TqlAutocomplete.vue.js +2 -2
- package/dist/vue/TqlChart.vue.js +1 -1
- package/dist/vue/TqlInput.vue.js +2 -2
- package/dist/vue/TqlInput.vue2.js +273 -254
- package/package.json +128 -128
package/dist/index.js
CHANGED
|
@@ -1,70 +1,73 @@
|
|
|
1
|
-
import { AGGREGATION_FUNCTIONS as r,
|
|
2
|
-
import { TqlParser as
|
|
3
|
-
import { TqlValidator as
|
|
4
|
-
import { getCompletionTriggerCharacters as
|
|
5
|
-
import { findClosestMatch as
|
|
6
|
-
import { SchemaCache as
|
|
7
|
-
import { ComplexityAnalyzer as
|
|
8
|
-
import { SemanticPreview as
|
|
9
|
-
import { buildStatsQuery as
|
|
1
|
+
import { AGGREGATION_FUNCTIONS as r, BOOLEAN_PREDICATE_MUTATORS as i, BOOLEAN_PREDICATE_MUTATOR_SET as o, COLLECTION_OPERATORS as T, COMPARISON_OPERATORS as a, KEYWORDS as l, LOGICAL_OPERATORS as n, MUTATORS as g, NEGATION_SYMBOL_OPERATORS as s, SYMBOL_OPERATORS as O, TYPE_HINTS as m, TqlTokenizer as A, VISUALIZATION_TYPES as c, findPreviousToken as E, findTokenAtPosition as S, findTokenBefore as p, findTokensInRange as C, tokenizeTql as d, tokenizeTqlNoWhitespace as f } from "./src/tokenizer.js";
|
|
2
|
+
import { TqlParser as h, formatParseError as P, getTqlErrors as _, isValidTql as N, parseTql as x } from "./src/parser.js";
|
|
3
|
+
import { MAX_REGEX_PATTERN_LENGTH as I, TqlValidator as y, formatValidationResult as q, getTqlIssues as M, isValidTqlSyntax as u, validateTql as z } from "./src/validator.js";
|
|
4
|
+
import { getCompletionTriggerCharacters as F, getCompletions as G, getWordAtPosition as U, shouldTriggerCompletion as V } from "./src/completionProvider.js";
|
|
5
|
+
import { findClosestMatch as B, fuzzyFilter as D, fuzzyMatch as Y, highlightMatch as H, levenshteinDistance as W } from "./src/fuzzyMatcher.js";
|
|
6
|
+
import { SchemaCache as X, createSchemaCache as b, getCachedField as K, getCachedFieldNames as Q, getCachedFieldType as Z, getSchemaCache as j } from "./src/schemaCache.js";
|
|
7
|
+
import { ComplexityAnalyzer as $, analyzeComplexity as ee, getComplexityMetrics as te, getComplexityWarnings as re, isHighComplexity as ie } from "./src/complexityAnalyzer.js";
|
|
8
|
+
import { SemanticPreview as Te, flattenLogicTree as ae, formatLogicTreeAscii as le, formatLogicTreeNode as ne, generatePreview as ge, getFieldUsage as se, getLogicTree as Oe, getLogicTreeDepth as me, getOperatorSummary as Ae, getUniqueFields as ce } from "./src/semanticPreview.js";
|
|
9
|
+
import { buildStatsQuery as Se, parseVizHintString as pe } from "./src/builder.js";
|
|
10
10
|
export {
|
|
11
11
|
r as AGGREGATION_FUNCTIONS,
|
|
12
|
-
i as
|
|
13
|
-
o as
|
|
14
|
-
|
|
15
|
-
a as
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
n as
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
i as BOOLEAN_PREDICATE_MUTATORS,
|
|
13
|
+
o as BOOLEAN_PREDICATE_MUTATOR_SET,
|
|
14
|
+
T as COLLECTION_OPERATORS,
|
|
15
|
+
a as COMPARISON_OPERATORS,
|
|
16
|
+
$ as ComplexityAnalyzer,
|
|
17
|
+
l as KEYWORDS,
|
|
18
|
+
n as LOGICAL_OPERATORS,
|
|
19
|
+
I as MAX_REGEX_PATTERN_LENGTH,
|
|
20
|
+
g as MUTATORS,
|
|
21
|
+
s as NEGATION_SYMBOL_OPERATORS,
|
|
22
|
+
O as SYMBOL_OPERATORS,
|
|
23
|
+
X as SchemaCache,
|
|
24
|
+
Te as SemanticPreview,
|
|
25
|
+
m as TYPE_HINTS,
|
|
26
|
+
h as TqlParser,
|
|
27
|
+
A as TqlTokenizer,
|
|
28
|
+
y as TqlValidator,
|
|
26
29
|
c as VISUALIZATION_TYPES,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
30
|
+
ee as analyzeComplexity,
|
|
31
|
+
Se as buildStatsQuery,
|
|
32
|
+
b as createSchemaCache,
|
|
33
|
+
B as findClosestMatch,
|
|
34
|
+
E as findPreviousToken,
|
|
35
|
+
S as findTokenAtPosition,
|
|
36
|
+
p as findTokenBefore,
|
|
37
|
+
C as findTokensInRange,
|
|
38
|
+
ae as flattenLogicTree,
|
|
39
|
+
le as formatLogicTreeAscii,
|
|
40
|
+
ne as formatLogicTreeNode,
|
|
41
|
+
P as formatParseError,
|
|
42
|
+
q as formatValidationResult,
|
|
43
|
+
D as fuzzyFilter,
|
|
44
|
+
Y as fuzzyMatch,
|
|
45
|
+
ge as generatePreview,
|
|
46
|
+
K as getCachedField,
|
|
47
|
+
Q as getCachedFieldNames,
|
|
48
|
+
Z as getCachedFieldType,
|
|
49
|
+
F as getCompletionTriggerCharacters,
|
|
50
|
+
G as getCompletions,
|
|
51
|
+
te as getComplexityMetrics,
|
|
52
|
+
re as getComplexityWarnings,
|
|
53
|
+
se as getFieldUsage,
|
|
54
|
+
Oe as getLogicTree,
|
|
55
|
+
me as getLogicTreeDepth,
|
|
56
|
+
Ae as getOperatorSummary,
|
|
57
|
+
j as getSchemaCache,
|
|
58
|
+
_ as getTqlErrors,
|
|
59
|
+
M as getTqlIssues,
|
|
60
|
+
ce as getUniqueFields,
|
|
61
|
+
U as getWordAtPosition,
|
|
62
|
+
H as highlightMatch,
|
|
63
|
+
ie as isHighComplexity,
|
|
64
|
+
N as isValidTql,
|
|
65
|
+
u as isValidTqlSyntax,
|
|
63
66
|
W as levenshteinDistance,
|
|
64
|
-
|
|
67
|
+
x as parseTql,
|
|
65
68
|
pe as parseVizHintString,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
V as shouldTriggerCompletion,
|
|
70
|
+
d as tokenizeTql,
|
|
71
|
+
f as tokenizeTqlNoWhitespace,
|
|
72
|
+
z as validateTql
|
|
70
73
|
};
|
package/dist/src/builder.d.ts
CHANGED
|
@@ -58,5 +58,11 @@ export declare function buildStatsQuery(config: StatsQueryConfig): string;
|
|
|
58
58
|
/**
|
|
59
59
|
* Parse a TQL viz hint string (e.g., "bar" or 'bar(title="Events")') into a VizHintConfig.
|
|
60
60
|
* This is a lightweight parser for the viz_hint portion only.
|
|
61
|
+
*
|
|
62
|
+
* It does NOT validate the chart type against `VISUALIZATION_TYPES`: the name is cast to
|
|
63
|
+
* `TqlVisualizationType` whatever it is, so `parseVizHintString("zzz")` returns a config the
|
|
64
|
+
* type system claims is valid. Stated because the return type asserts otherwise and a caller
|
|
65
|
+
* would reasonably trust it. The Python grammar's `viz_types` is a closed set and rejects an
|
|
66
|
+
* unknown name at execution, so a bad type is caught there and nowhere earlier.
|
|
61
67
|
*/
|
|
62
68
|
export declare function parseVizHintString(vizStr: string): VizHintConfig | null;
|