@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 CHANGED
@@ -1,70 +1,73 @@
1
- import { AGGREGATION_FUNCTIONS as r, COLLECTION_OPERATORS as i, COMPARISON_OPERATORS as o, KEYWORDS as a, LOGICAL_OPERATORS as l, MUTATORS as T, NEGATION_SYMBOL_OPERATORS as n, SYMBOL_OPERATORS as g, TYPE_HINTS as s, TqlTokenizer as m, VISUALIZATION_TYPES as c, findPreviousToken as O, findTokenAtPosition as p, findTokenBefore as d, findTokensInRange as f, tokenizeTql as S, tokenizeTqlNoWhitespace as h } from "./src/tokenizer.js";
2
- import { TqlParser as A, formatParseError as R, getTqlErrors as x, isValidTql as P, parseTql as y } from "./src/parser.js";
3
- import { TqlValidator as q, formatValidationResult as I, getTqlIssues as L, isValidTqlSyntax as N, validateTql as u } from "./src/validator.js";
4
- import { getCompletionTriggerCharacters as _, getCompletions as M, getWordAtPosition as k, shouldTriggerCompletion as F } from "./src/completionProvider.js";
5
- import { findClosestMatch as v, fuzzyFilter as G, fuzzyMatch as U, highlightMatch as Y, levenshteinDistance as W } from "./src/fuzzyMatcher.js";
6
- import { SchemaCache as D, createSchemaCache as H, getCachedField as w, getCachedFieldNames as b, getCachedFieldType as K, getSchemaCache as Q } from "./src/schemaCache.js";
7
- import { ComplexityAnalyzer as j, analyzeComplexity as J, getComplexityMetrics as X, getComplexityWarnings as $, isHighComplexity as ee } from "./src/complexityAnalyzer.js";
8
- import { SemanticPreview as re, flattenLogicTree as ie, formatLogicTreeAscii as oe, formatLogicTreeNode as ae, generatePreview as le, getFieldUsage as Te, getLogicTree as ne, getLogicTreeDepth as ge, getOperatorSummary as se, getUniqueFields as me } from "./src/semanticPreview.js";
9
- import { buildStatsQuery as Oe, parseVizHintString as pe } from "./src/builder.js";
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 COLLECTION_OPERATORS,
13
- o as COMPARISON_OPERATORS,
14
- j as ComplexityAnalyzer,
15
- a as KEYWORDS,
16
- l as LOGICAL_OPERATORS,
17
- T as MUTATORS,
18
- n as NEGATION_SYMBOL_OPERATORS,
19
- g as SYMBOL_OPERATORS,
20
- D as SchemaCache,
21
- re as SemanticPreview,
22
- s as TYPE_HINTS,
23
- A as TqlParser,
24
- m as TqlTokenizer,
25
- q as TqlValidator,
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
- J as analyzeComplexity,
28
- Oe as buildStatsQuery,
29
- H as createSchemaCache,
30
- v as findClosestMatch,
31
- O as findPreviousToken,
32
- p as findTokenAtPosition,
33
- d as findTokenBefore,
34
- f as findTokensInRange,
35
- ie as flattenLogicTree,
36
- oe as formatLogicTreeAscii,
37
- ae as formatLogicTreeNode,
38
- R as formatParseError,
39
- I as formatValidationResult,
40
- G as fuzzyFilter,
41
- U as fuzzyMatch,
42
- le as generatePreview,
43
- w as getCachedField,
44
- b as getCachedFieldNames,
45
- K as getCachedFieldType,
46
- _ as getCompletionTriggerCharacters,
47
- M as getCompletions,
48
- X as getComplexityMetrics,
49
- $ as getComplexityWarnings,
50
- Te as getFieldUsage,
51
- ne as getLogicTree,
52
- ge as getLogicTreeDepth,
53
- se as getOperatorSummary,
54
- Q as getSchemaCache,
55
- x as getTqlErrors,
56
- L as getTqlIssues,
57
- me as getUniqueFields,
58
- k as getWordAtPosition,
59
- Y as highlightMatch,
60
- ee as isHighComplexity,
61
- P as isValidTql,
62
- N as isValidTqlSyntax,
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
- y as parseTql,
67
+ x as parseTql,
65
68
  pe as parseVizHintString,
66
- F as shouldTriggerCompletion,
67
- S as tokenizeTql,
68
- h as tokenizeTqlNoWhitespace,
69
- u as validateTql
69
+ V as shouldTriggerCompletion,
70
+ d as tokenizeTql,
71
+ f as tokenizeTqlNoWhitespace,
72
+ z as validateTql
70
73
  };
@@ -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;