@tayo-dev/rtl 1.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/README.md +250 -0
- package/dist/analyzer/mocks/detector.d.ts +59 -0
- package/dist/analyzer/mocks/detector.d.ts.map +1 -0
- package/dist/analyzer/mocks/detector.js +264 -0
- package/dist/analyzer/mocks/detector.js.map +1 -0
- package/dist/analyzer/mocks/target-analyzer.d.ts +92 -0
- package/dist/analyzer/mocks/target-analyzer.d.ts.map +1 -0
- package/dist/analyzer/mocks/target-analyzer.js +305 -0
- package/dist/analyzer/mocks/target-analyzer.js.map +1 -0
- package/dist/analyzer/visual/element-analyzer.d.ts +44 -0
- package/dist/analyzer/visual/element-analyzer.d.ts.map +1 -0
- package/dist/analyzer/visual/element-analyzer.js +176 -0
- package/dist/analyzer/visual/element-analyzer.js.map +1 -0
- package/dist/analyzer/visual/inspector.d.ts +49 -0
- package/dist/analyzer/visual/inspector.d.ts.map +1 -0
- package/dist/analyzer/visual/inspector.js +109 -0
- package/dist/analyzer/visual/inspector.js.map +1 -0
- package/dist/cli/commands/generate.d.ts +13 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/generate.js +417 -0
- package/dist/cli/commands/generate.js.map +1 -0
- package/dist/core/generator.d.ts +32 -0
- package/dist/core/generator.d.ts.map +1 -0
- package/dist/core/generator.js +173 -0
- package/dist/core/generator.js.map +1 -0
- package/dist/core/js-parser.d.ts +48 -0
- package/dist/core/js-parser.d.ts.map +1 -0
- package/dist/core/js-parser.js +244 -0
- package/dist/core/js-parser.js.map +1 -0
- package/dist/core/mock-intelligence.d.ts +14 -0
- package/dist/core/mock-intelligence.d.ts.map +1 -0
- package/dist/core/mock-intelligence.js +140 -0
- package/dist/core/mock-intelligence.js.map +1 -0
- package/dist/core/orchestrator.d.ts +49 -0
- package/dist/core/orchestrator.d.ts.map +1 -0
- package/dist/core/orchestrator.js +315 -0
- package/dist/core/orchestrator.js.map +1 -0
- package/dist/core/parser.d.ts +9 -0
- package/dist/core/parser.d.ts.map +1 -0
- package/dist/core/parser.js +120 -0
- package/dist/core/parser.js.map +1 -0
- package/dist/core/recording-intelligence.d.ts +15 -0
- package/dist/core/recording-intelligence.d.ts.map +1 -0
- package/dist/core/recording-intelligence.js +178 -0
- package/dist/core/recording-intelligence.js.map +1 -0
- package/dist/core/resolver.d.ts +58 -0
- package/dist/core/resolver.d.ts.map +1 -0
- package/dist/core/resolver.js +291 -0
- package/dist/core/resolver.js.map +1 -0
- package/dist/core/scanner.d.ts +51 -0
- package/dist/core/scanner.d.ts.map +1 -0
- package/dist/core/scanner.js +310 -0
- package/dist/core/scanner.js.map +1 -0
- package/dist/core/scorer.d.ts +8 -0
- package/dist/core/scorer.d.ts.map +1 -0
- package/dist/core/scorer.js +76 -0
- package/dist/core/scorer.js.map +1 -0
- package/dist/core/validator.d.ts +134 -0
- package/dist/core/validator.d.ts.map +1 -0
- package/dist/core/validator.js +44 -0
- package/dist/core/validator.js.map +1 -0
- package/dist/core/verifier.d.ts +10 -0
- package/dist/core/verifier.d.ts.map +1 -0
- package/dist/core/verifier.js +30 -0
- package/dist/core/verifier.js.map +1 -0
- package/dist/core/writer.d.ts +15 -0
- package/dist/core/writer.d.ts.map +1 -0
- package/dist/core/writer.js +43 -0
- package/dist/core/writer.js.map +1 -0
- package/dist/generator/mocks/builder.d.ts +47 -0
- package/dist/generator/mocks/builder.d.ts.map +1 -0
- package/dist/generator/mocks/builder.js +335 -0
- package/dist/generator/mocks/builder.js.map +1 -0
- package/dist/generator/transforms/dialog-transform.d.ts +35 -0
- package/dist/generator/transforms/dialog-transform.d.ts.map +1 -0
- package/dist/generator/transforms/dialog-transform.js +293 -0
- package/dist/generator/transforms/dialog-transform.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/learner/analyzer.d.ts +13 -0
- package/dist/learner/analyzer.d.ts.map +1 -0
- package/dist/learner/analyzer.js +484 -0
- package/dist/learner/analyzer.js.map +1 -0
- package/dist/learner/index.d.ts +66 -0
- package/dist/learner/index.d.ts.map +1 -0
- package/dist/learner/index.js +247 -0
- package/dist/learner/index.js.map +1 -0
- package/dist/learner/storage.d.ts +68 -0
- package/dist/learner/storage.d.ts.map +1 -0
- package/dist/learner/storage.js +201 -0
- package/dist/learner/storage.js.map +1 -0
- package/dist/learner/types.d.ts +41 -0
- package/dist/learner/types.d.ts.map +1 -0
- package/dist/learner/types.js +31 -0
- package/dist/learner/types.js.map +1 -0
- package/dist/parser/recorder-parser.d.ts +40 -0
- package/dist/parser/recorder-parser.d.ts.map +1 -0
- package/dist/parser/recorder-parser.js +139 -0
- package/dist/parser/recorder-parser.js.map +1 -0
- package/dist/parser/steps/deduplicator.d.ts +19 -0
- package/dist/parser/steps/deduplicator.d.ts.map +1 -0
- package/dist/parser/steps/deduplicator.js +75 -0
- package/dist/parser/steps/deduplicator.js.map +1 -0
- package/dist/parser/steps/dialog-detector.d.ts +38 -0
- package/dist/parser/steps/dialog-detector.d.ts.map +1 -0
- package/dist/parser/steps/dialog-detector.js +290 -0
- package/dist/parser/steps/dialog-detector.js.map +1 -0
- package/dist/parser/steps/noise-filter.d.ts +21 -0
- package/dist/parser/steps/noise-filter.d.ts.map +1 -0
- package/dist/parser/steps/noise-filter.js +138 -0
- package/dist/parser/steps/noise-filter.js.map +1 -0
- package/dist/scorer/index.d.ts +43 -0
- package/dist/scorer/index.d.ts.map +1 -0
- package/dist/scorer/index.js +82 -0
- package/dist/scorer/index.js.map +1 -0
- package/dist/scorer/post-verify.d.ts +17 -0
- package/dist/scorer/post-verify.d.ts.map +1 -0
- package/dist/scorer/post-verify.js +163 -0
- package/dist/scorer/post-verify.js.map +1 -0
- package/dist/scorer/pre-audit.d.ts +32 -0
- package/dist/scorer/pre-audit.d.ts.map +1 -0
- package/dist/scorer/pre-audit.js +99 -0
- package/dist/scorer/pre-audit.js.map +1 -0
- package/dist/scorer/quality-gates.d.ts +17 -0
- package/dist/scorer/quality-gates.d.ts.map +1 -0
- package/dist/scorer/quality-gates.js +304 -0
- package/dist/scorer/quality-gates.js.map +1 -0
- package/dist/scorer/types.d.ts +27 -0
- package/dist/scorer/types.d.ts.map +1 -0
- package/dist/scorer/types.js +5 -0
- package/dist/scorer/types.js.map +1 -0
- package/dist/templates/test-template.d.ts +21 -0
- package/dist/templates/test-template.d.ts.map +1 -0
- package/dist/templates/test-template.js +92 -0
- package/dist/templates/test-template.js.map +1 -0
- package/dist/types/conventions.d.ts +49 -0
- package/dist/types/conventions.d.ts.map +1 -0
- package/dist/types/conventions.js +13 -0
- package/dist/types/conventions.js.map +1 -0
- package/dist/types/recording.d.ts +143 -0
- package/dist/types/recording.d.ts.map +1 -0
- package/dist/types/recording.js +5 -0
- package/dist/types/recording.js.map +1 -0
- package/dist/types/score.d.ts +18 -0
- package/dist/types/score.d.ts.map +1 -0
- package/dist/types/score.js +2 -0
- package/dist/types/score.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convention Learning Module
|
|
3
|
+
*
|
|
4
|
+
* Analyzes existing test patterns to derive Taro's conventions.
|
|
5
|
+
* Implements CNV-01: Taro derives conventions from observation.
|
|
6
|
+
* Implements CNV-02: Conventions persist across runs via SQLite storage.
|
|
7
|
+
* Implements CNV-03: Faster subsequent runs via caching.
|
|
8
|
+
*/
|
|
9
|
+
import * as fs from 'fs';
|
|
10
|
+
import * as path from 'path';
|
|
11
|
+
import { extractConventions } from './analyzer.js';
|
|
12
|
+
import { ConventionStore, createStore } from './storage.js';
|
|
13
|
+
import { createEmptyConvention } from './types.js';
|
|
14
|
+
export { createEmptyConvention, ConventionStore, createStore };
|
|
15
|
+
/**
|
|
16
|
+
* Find test directories in a project
|
|
17
|
+
* @param projectRoot - Root directory to search
|
|
18
|
+
* @returns Array of test directory paths
|
|
19
|
+
*/
|
|
20
|
+
function findTestDirectories(projectRoot) {
|
|
21
|
+
const candidates = [
|
|
22
|
+
path.join(projectRoot, 'src', '__tests__'),
|
|
23
|
+
path.join(projectRoot, 'tests'),
|
|
24
|
+
path.join(projectRoot, 'test'),
|
|
25
|
+
path.join(projectRoot, '__tests__')
|
|
26
|
+
];
|
|
27
|
+
return candidates.filter(dir => fs.existsSync(dir) && fs.statSync(dir).isDirectory());
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Find all test files in a project (recursive)
|
|
31
|
+
* @param projectRoot - Root directory to search
|
|
32
|
+
* @returns Array of test file paths
|
|
33
|
+
*/
|
|
34
|
+
function findTestFiles(projectRoot) {
|
|
35
|
+
const testFiles = [];
|
|
36
|
+
function searchDir(dir) {
|
|
37
|
+
if (!fs.existsSync(dir))
|
|
38
|
+
return;
|
|
39
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
40
|
+
for (const entry of entries) {
|
|
41
|
+
const fullPath = path.join(dir, entry.name);
|
|
42
|
+
if (entry.isDirectory()) {
|
|
43
|
+
// Skip node_modules and hidden directories
|
|
44
|
+
if (entry.name !== 'node_modules' && !entry.name.startsWith('.')) {
|
|
45
|
+
searchDir(fullPath);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else if (entry.isFile()) {
|
|
49
|
+
// Match test files: *.test.ts, *.test.tsx, *.spec.ts, *.spec.tsx
|
|
50
|
+
if (/\.(test|spec)\.(ts|tsx|js|jsx)$/.test(entry.name)) {
|
|
51
|
+
testFiles.push(fullPath);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// Search in src and root
|
|
57
|
+
const searchRoots = [projectRoot];
|
|
58
|
+
const srcDir = path.join(projectRoot, 'src');
|
|
59
|
+
if (fs.existsSync(srcDir)) {
|
|
60
|
+
searchRoots.push(srcDir);
|
|
61
|
+
}
|
|
62
|
+
for (const root of searchRoots) {
|
|
63
|
+
searchDir(root);
|
|
64
|
+
}
|
|
65
|
+
return testFiles;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Learn conventions from test files in a project
|
|
69
|
+
*
|
|
70
|
+
* @param projectRoot - Root directory of the project
|
|
71
|
+
* @returns TestConvention object with learned patterns
|
|
72
|
+
*/
|
|
73
|
+
export function learnConventions(projectRoot) {
|
|
74
|
+
// Find test directories
|
|
75
|
+
const testDirs = findTestDirectories(projectRoot);
|
|
76
|
+
// Find individual test files
|
|
77
|
+
const testFiles = findTestFiles(projectRoot);
|
|
78
|
+
let conventions = createEmptyConvention();
|
|
79
|
+
// Extract from test directories
|
|
80
|
+
if (testDirs.length > 0) {
|
|
81
|
+
for (const testDir of testDirs) {
|
|
82
|
+
const dirConventions = extractConventions(testDir);
|
|
83
|
+
conventions = mergeConventions(conventions, dirConventions);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
// Extract from individual test files
|
|
87
|
+
if (testFiles.length > 0) {
|
|
88
|
+
// Create a temporary directory for single-file analysis
|
|
89
|
+
for (const testFile of testFiles) {
|
|
90
|
+
const fileConventions = extractSingleFileConventions(testFile);
|
|
91
|
+
conventions = mergeConventions(conventions, fileConventions);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// Save to storage for persistence
|
|
95
|
+
try {
|
|
96
|
+
const store = createStore(projectRoot);
|
|
97
|
+
store.saveConventions(conventions);
|
|
98
|
+
store.close();
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
console.warn('[learnConventions] Failed to save conventions:', error);
|
|
102
|
+
}
|
|
103
|
+
return conventions;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Extract conventions from a single test file
|
|
107
|
+
*/
|
|
108
|
+
function extractSingleFileConventions(filePath) {
|
|
109
|
+
return extractConventions(path.dirname(filePath));
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Merge two TestConvention objects
|
|
113
|
+
*/
|
|
114
|
+
function mergeConventions(a, b) {
|
|
115
|
+
const result = { ...a };
|
|
116
|
+
// Merge naming - prefer non-default values
|
|
117
|
+
if (b.naming.pattern !== 'camelCase' && b.naming.pattern !== a.naming.pattern) {
|
|
118
|
+
result.naming.pattern = b.naming.pattern;
|
|
119
|
+
}
|
|
120
|
+
if (b.naming.describePrefix && b.naming.describePrefix !== a.naming.describePrefix) {
|
|
121
|
+
result.naming.describePrefix = b.naming.describePrefix;
|
|
122
|
+
}
|
|
123
|
+
if (b.naming.itTemplate !== 'should {description}') {
|
|
124
|
+
result.naming.itTemplate = b.naming.itTemplate;
|
|
125
|
+
}
|
|
126
|
+
// Merge structure - OR logic
|
|
127
|
+
result.structure.describePerComponent =
|
|
128
|
+
result.structure.describePerComponent || b.structure.describePerComponent;
|
|
129
|
+
result.structure.helpersInDescribe =
|
|
130
|
+
result.structure.helpersInDescribe || b.structure.helpersInDescribe;
|
|
131
|
+
// Merge queries - union
|
|
132
|
+
const preferredSet = new Set([...result.queries.preferred, ...b.queries.preferred]);
|
|
133
|
+
const avoidedSet = new Set([...result.queries.avoided, ...b.queries.avoided]);
|
|
134
|
+
result.queries.preferred = Array.from(preferredSet);
|
|
135
|
+
result.queries.avoided = Array.from(avoidedSet);
|
|
136
|
+
// Merge matchers - union
|
|
137
|
+
const matcherSet = new Set([...result.matchers.common, ...b.matchers.common]);
|
|
138
|
+
result.matchers.common = Array.from(matcherSet);
|
|
139
|
+
// Merge imports - union
|
|
140
|
+
const importSet = new Set([...result.imports.common, ...b.imports.common]);
|
|
141
|
+
result.imports.common = Array.from(importSet);
|
|
142
|
+
return result;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Get conventions from persistent storage
|
|
146
|
+
*
|
|
147
|
+
* @param projectRoot - Root directory of the project
|
|
148
|
+
* @returns TestConvention if stored conventions exist, null otherwise
|
|
149
|
+
*/
|
|
150
|
+
export function getConventions(projectRoot) {
|
|
151
|
+
try {
|
|
152
|
+
const taroDir = path.join(projectRoot, '.taro');
|
|
153
|
+
const dbPath = path.join(taroDir, 'conventions.db');
|
|
154
|
+
// Check if database exists
|
|
155
|
+
if (!fs.existsSync(dbPath)) {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
const store = new ConventionStore(dbPath);
|
|
159
|
+
store.init();
|
|
160
|
+
const conventions = store.loadConventions();
|
|
161
|
+
store.close();
|
|
162
|
+
return conventions;
|
|
163
|
+
}
|
|
164
|
+
catch (error) {
|
|
165
|
+
console.warn('[getConventions] Failed to load conventions:', error);
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* ConventionStore - stores and manages learned conventions (in-memory)
|
|
171
|
+
*/
|
|
172
|
+
export class InMemoryConventionStore {
|
|
173
|
+
conventions = new Map();
|
|
174
|
+
/**
|
|
175
|
+
* Add conventions for a specific context
|
|
176
|
+
*/
|
|
177
|
+
add(key, convention) {
|
|
178
|
+
this.conventions.set(key, convention);
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Get conventions for a specific context
|
|
182
|
+
*/
|
|
183
|
+
get(key) {
|
|
184
|
+
return this.conventions.get(key);
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Check if conventions exist for a context
|
|
188
|
+
*/
|
|
189
|
+
has(key) {
|
|
190
|
+
return this.conventions.has(key);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Get all stored conventions
|
|
194
|
+
*/
|
|
195
|
+
getAll() {
|
|
196
|
+
return new Map(this.conventions);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Clear all stored conventions
|
|
200
|
+
*/
|
|
201
|
+
clear() {
|
|
202
|
+
this.conventions.clear();
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Merge multiple convention sets
|
|
206
|
+
*/
|
|
207
|
+
merge(other) {
|
|
208
|
+
const result = createEmptyConvention();
|
|
209
|
+
for (const [, convention] of Array.from(other.getAll())) {
|
|
210
|
+
this.mergeInto(result, convention);
|
|
211
|
+
}
|
|
212
|
+
return result;
|
|
213
|
+
}
|
|
214
|
+
mergeInto(target, source) {
|
|
215
|
+
// Merge naming
|
|
216
|
+
if (source.naming.pattern !== target.naming.pattern) {
|
|
217
|
+
// Keep target preference unless source has one
|
|
218
|
+
if (target.naming.pattern === 'camelCase') {
|
|
219
|
+
target.naming.pattern = source.naming.pattern;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
// Merge structure - OR logic
|
|
223
|
+
target.structure.describePerComponent =
|
|
224
|
+
target.structure.describePerComponent || source.structure.describePerComponent;
|
|
225
|
+
target.structure.helpersInDescribe =
|
|
226
|
+
target.structure.helpersInDescribe || source.structure.helpersInDescribe;
|
|
227
|
+
// Merge queries - union
|
|
228
|
+
const preferredSet = new Set([...target.queries.preferred, ...source.queries.preferred]);
|
|
229
|
+
const avoidedSet = new Set([...target.queries.avoided, ...source.queries.avoided]);
|
|
230
|
+
target.queries.preferred = Array.from(preferredSet);
|
|
231
|
+
target.queries.avoided = Array.from(avoidedSet);
|
|
232
|
+
// Merge matchers - union
|
|
233
|
+
const matcherSet = new Set([...target.matchers.common, ...source.matchers.common]);
|
|
234
|
+
target.matchers.common = Array.from(matcherSet);
|
|
235
|
+
// Merge imports - union
|
|
236
|
+
const importSet = new Set([...target.imports.common, ...source.imports.common]);
|
|
237
|
+
target.imports.common = Array.from(importSet);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
export default {
|
|
241
|
+
learnConventions,
|
|
242
|
+
getConventions,
|
|
243
|
+
ConventionStore,
|
|
244
|
+
InMemoryConventionStore,
|
|
245
|
+
createStore
|
|
246
|
+
};
|
|
247
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/learner/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,O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
2
|
+
* ConventionStore - SQLite-based persistence for learned conventions
|
|
3
|
+
*
|
|
4
|
+
* Implements CNV-02 (conventions persist across runs) and CNV-03 (faster subsequent runs via caching)
|
|
5
|
+
*/
|
|
6
|
+
import { TestConvention } from './types.js';
|
|
7
|
+
export { TestConvention };
|
|
8
|
+
/**
|
|
9
|
+
* ConventionStore class with SQLite persistence
|
|
10
|
+
*/
|
|
11
|
+
export declare class ConventionStore {
|
|
12
|
+
private db;
|
|
13
|
+
private dbPath;
|
|
14
|
+
/**
|
|
15
|
+
* Create a new ConventionStore
|
|
16
|
+
* @param dbPath - Path to SQLite database file
|
|
17
|
+
*/
|
|
18
|
+
constructor(dbPath: string);
|
|
19
|
+
/**
|
|
20
|
+
* Initialize the database - creates tables if they don't exist
|
|
21
|
+
*/
|
|
22
|
+
init(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Save conventions to the database
|
|
25
|
+
* @param conventions - TestConvention object to save
|
|
26
|
+
* @param key - Optional key for the conventions (default: 'default')
|
|
27
|
+
*/
|
|
28
|
+
saveConventions(conventions: TestConvention, key?: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Load conventions from the database
|
|
31
|
+
* @param key - Optional key for the conventions (default: 'default')
|
|
32
|
+
* @returns TestConvention or null if not found
|
|
33
|
+
*/
|
|
34
|
+
loadConventions(key?: string): TestConvention | null;
|
|
35
|
+
/**
|
|
36
|
+
* Get a cached value
|
|
37
|
+
* @param key - Cache key
|
|
38
|
+
* @returns Cached value or null if not found or expired
|
|
39
|
+
*/
|
|
40
|
+
getCached(key: string): unknown | null;
|
|
41
|
+
/**
|
|
42
|
+
* Set a cached value with optional TTL
|
|
43
|
+
* @param key - Cache key
|
|
44
|
+
* @param value - Value to cache (will be JSON serialized)
|
|
45
|
+
* @param ttlSeconds - Optional TTL in seconds
|
|
46
|
+
*/
|
|
47
|
+
setCached(key: string, value: unknown, ttlSeconds?: number): void;
|
|
48
|
+
/**
|
|
49
|
+
* Delete a cached value
|
|
50
|
+
* @param key - Cache key to delete
|
|
51
|
+
*/
|
|
52
|
+
deleteCached(key: string): void;
|
|
53
|
+
/**
|
|
54
|
+
* Clear all cached values
|
|
55
|
+
*/
|
|
56
|
+
clearCache(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Close the database connection
|
|
59
|
+
*/
|
|
60
|
+
close(): void;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Create a ConventionStore instance
|
|
64
|
+
* @param projectRoot - Root directory of the project (will create .taro/ subdirectory)
|
|
65
|
+
* @returns Initialized ConventionStore
|
|
66
|
+
*/
|
|
67
|
+
export declare function createStore(projectRoot: string): ConventionStore;
|
|
68
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/learner/storage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,cAAc,EAAyB,MAAM,YAAY,CAAC;AAKnE,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B;;GAEG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,EAAE,CAA4C;IACtD,OAAO,CAAC,MAAM,CAAS;IAEvB;;;OAGG;gBACS,MAAM,EAAE,MAAM;IAI1B;;OAEG;IACH,IAAI,IAAI,IAAI;IA+BZ;;;;OAIG;IACH,eAAe,CAAC,WAAW,EAAE,cAAc,EAAE,GAAG,GAAE,MAAkB,GAAG,IAAI;IAoB3E;;;;OAIG;IACH,eAAe,CAAC,GAAG,GAAE,MAAkB,GAAG,cAAc,GAAG,IAAI;IA0B/D;;;;OAIG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI;IAgCtC;;;;;OAKG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI;IAyBjE;;;OAGG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAS/B;;OAEG;IACH,UAAU,IAAI,IAAI;IAQlB;;OAEG;IACH,KAAK,IAAI,IAAI;CAOd;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,eAAe,CAQhE"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ConventionStore - SQLite-based persistence for learned conventions
|
|
3
|
+
*
|
|
4
|
+
* Implements CNV-02 (conventions persist across runs) and CNV-03 (faster subsequent runs via caching)
|
|
5
|
+
*/
|
|
6
|
+
import * as fs from 'fs';
|
|
7
|
+
import * as path from 'path';
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
9
|
+
const Database = require('better-sqlite3');
|
|
10
|
+
/**
|
|
11
|
+
* ConventionStore class with SQLite persistence
|
|
12
|
+
*/
|
|
13
|
+
export class ConventionStore {
|
|
14
|
+
db = null;
|
|
15
|
+
dbPath;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new ConventionStore
|
|
18
|
+
* @param dbPath - Path to SQLite database file
|
|
19
|
+
*/
|
|
20
|
+
constructor(dbPath) {
|
|
21
|
+
this.dbPath = dbPath;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Initialize the database - creates tables if they don't exist
|
|
25
|
+
*/
|
|
26
|
+
init() {
|
|
27
|
+
// Ensure directory exists
|
|
28
|
+
const dir = path.dirname(this.dbPath);
|
|
29
|
+
if (!fs.existsSync(dir)) {
|
|
30
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
31
|
+
}
|
|
32
|
+
this.db = new Database(this.dbPath);
|
|
33
|
+
// Create conventions table
|
|
34
|
+
this.db.exec(`
|
|
35
|
+
CREATE TABLE IF NOT EXISTS conventions (
|
|
36
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
37
|
+
key TEXT UNIQUE NOT NULL,
|
|
38
|
+
value TEXT NOT NULL,
|
|
39
|
+
updated_at TEXT NOT NULL
|
|
40
|
+
)
|
|
41
|
+
`);
|
|
42
|
+
// Create cache table with TTL support
|
|
43
|
+
this.db.exec(`
|
|
44
|
+
CREATE TABLE IF NOT EXISTS cache (
|
|
45
|
+
key TEXT PRIMARY KEY NOT NULL,
|
|
46
|
+
value TEXT NOT NULL,
|
|
47
|
+
expires_at TEXT
|
|
48
|
+
)
|
|
49
|
+
`);
|
|
50
|
+
console.log(`[ConventionStore] Initialized database at ${this.dbPath}`);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Save conventions to the database
|
|
54
|
+
* @param conventions - TestConvention object to save
|
|
55
|
+
* @param key - Optional key for the conventions (default: 'default')
|
|
56
|
+
*/
|
|
57
|
+
saveConventions(conventions, key = 'default') {
|
|
58
|
+
if (!this.db) {
|
|
59
|
+
throw new Error('Database not initialized. Call init() first.');
|
|
60
|
+
}
|
|
61
|
+
const value = JSON.stringify(conventions);
|
|
62
|
+
const updatedAt = new Date().toISOString();
|
|
63
|
+
const stmt = this.db.prepare(`
|
|
64
|
+
INSERT INTO conventions (key, value, updated_at)
|
|
65
|
+
VALUES (?, ?, ?)
|
|
66
|
+
ON CONFLICT(key) DO UPDATE SET
|
|
67
|
+
value = excluded.value,
|
|
68
|
+
updated_at = excluded.updated_at
|
|
69
|
+
`);
|
|
70
|
+
stmt.run(key, value, updatedAt);
|
|
71
|
+
console.log(`[ConventionStore] Saved conventions for key: ${key}`);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Load conventions from the database
|
|
75
|
+
* @param key - Optional key for the conventions (default: 'default')
|
|
76
|
+
* @returns TestConvention or null if not found
|
|
77
|
+
*/
|
|
78
|
+
loadConventions(key = 'default') {
|
|
79
|
+
if (!this.db) {
|
|
80
|
+
throw new Error('Database not initialized. Call init() first.');
|
|
81
|
+
}
|
|
82
|
+
const stmt = this.db.prepare(`
|
|
83
|
+
SELECT value FROM conventions WHERE key = ?
|
|
84
|
+
`);
|
|
85
|
+
const row = stmt.get(key);
|
|
86
|
+
if (!row) {
|
|
87
|
+
console.log(`[ConventionStore] No conventions found for key: ${key}`);
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
try {
|
|
91
|
+
const conventions = JSON.parse(row.value);
|
|
92
|
+
console.log(`[ConventionStore] Loaded conventions for key: ${key}`);
|
|
93
|
+
return conventions;
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
console.error(`[ConventionStore] Failed to parse conventions:`, error);
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Get a cached value
|
|
102
|
+
* @param key - Cache key
|
|
103
|
+
* @returns Cached value or null if not found or expired
|
|
104
|
+
*/
|
|
105
|
+
getCached(key) {
|
|
106
|
+
if (!this.db) {
|
|
107
|
+
throw new Error('Database not initialized. Call init() first.');
|
|
108
|
+
}
|
|
109
|
+
const stmt = this.db.prepare(`
|
|
110
|
+
SELECT value, expires_at FROM cache WHERE key = ?
|
|
111
|
+
`);
|
|
112
|
+
const row = stmt.get(key);
|
|
113
|
+
if (!row) {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
// Check if expired
|
|
117
|
+
if (row.expires_at) {
|
|
118
|
+
const expiresAt = new Date(row.expires_at);
|
|
119
|
+
if (expiresAt < new Date()) {
|
|
120
|
+
// Expired - delete and return null
|
|
121
|
+
this.deleteCached(key);
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
try {
|
|
126
|
+
return JSON.parse(row.value);
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Set a cached value with optional TTL
|
|
134
|
+
* @param key - Cache key
|
|
135
|
+
* @param value - Value to cache (will be JSON serialized)
|
|
136
|
+
* @param ttlSeconds - Optional TTL in seconds
|
|
137
|
+
*/
|
|
138
|
+
setCached(key, value, ttlSeconds) {
|
|
139
|
+
if (!this.db) {
|
|
140
|
+
throw new Error('Database not initialized. Call init() first.');
|
|
141
|
+
}
|
|
142
|
+
const serializedValue = JSON.stringify(value);
|
|
143
|
+
let expiresAt = null;
|
|
144
|
+
if (ttlSeconds && ttlSeconds > 0) {
|
|
145
|
+
const expiryDate = new Date();
|
|
146
|
+
expiryDate.setSeconds(expiryDate.getSeconds() + ttlSeconds);
|
|
147
|
+
expiresAt = expiryDate.toISOString();
|
|
148
|
+
}
|
|
149
|
+
const stmt = this.db.prepare(`
|
|
150
|
+
INSERT INTO cache (key, value, expires_at)
|
|
151
|
+
VALUES (?, ?, ?)
|
|
152
|
+
ON CONFLICT(key) DO UPDATE SET
|
|
153
|
+
value = excluded.value,
|
|
154
|
+
expires_at = excluded.expires_at
|
|
155
|
+
`);
|
|
156
|
+
stmt.run(key, serializedValue, expiresAt);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Delete a cached value
|
|
160
|
+
* @param key - Cache key to delete
|
|
161
|
+
*/
|
|
162
|
+
deleteCached(key) {
|
|
163
|
+
if (!this.db) {
|
|
164
|
+
throw new Error('Database not initialized. Call init() first.');
|
|
165
|
+
}
|
|
166
|
+
const stmt = this.db.prepare(`DELETE FROM cache WHERE key = ?`);
|
|
167
|
+
stmt.run(key);
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Clear all cached values
|
|
171
|
+
*/
|
|
172
|
+
clearCache() {
|
|
173
|
+
if (!this.db) {
|
|
174
|
+
throw new Error('Database not initialized. Call init() first.');
|
|
175
|
+
}
|
|
176
|
+
this.db.exec(`DELETE FROM cache`);
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Close the database connection
|
|
180
|
+
*/
|
|
181
|
+
close() {
|
|
182
|
+
if (this.db) {
|
|
183
|
+
this.db.close();
|
|
184
|
+
this.db = null;
|
|
185
|
+
console.log(`[ConventionStore] Closed database connection`);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Create a ConventionStore instance
|
|
191
|
+
* @param projectRoot - Root directory of the project (will create .taro/ subdirectory)
|
|
192
|
+
* @returns Initialized ConventionStore
|
|
193
|
+
*/
|
|
194
|
+
export function createStore(projectRoot) {
|
|
195
|
+
const taroDir = path.join(projectRoot, '.taro');
|
|
196
|
+
const dbPath = path.join(taroDir, 'conventions.db');
|
|
197
|
+
const store = new ConventionStore(dbPath);
|
|
198
|
+
store.init();
|
|
199
|
+
return store;
|
|
200
|
+
}
|
|
201
|
+
//# sourceMappingURL=storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/learner/storage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,8DAA8D;AAC9D,MAAM,QAAQ,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAI3C;;GAEG;AACH,MAAM,OAAO,eAAe;IAClB,EAAE,GAAuC,IAAI,CAAC;IAC9C,MAAM,CAAS;IAEvB;;;OAGG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,IAAI;QACF,0BAA0B;QAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACtC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACzC,CAAC;QAED,IAAI,CAAC,EAAE,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEpC,2BAA2B;QAC3B,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;;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C9D,CAAC;IACH,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,WAAmB;IAC7C,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAChD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;IAEpD,MAAM,KAAK,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;IAC1C,KAAK,CAAC,IAAI,EAAE,CAAC;IAEb,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convention learning types for extracting test patterns
|
|
3
|
+
*/
|
|
4
|
+
export type NamingPattern = 'camelCase' | 'kebab-case' | 'snake_case';
|
|
5
|
+
export interface NamingConventions {
|
|
6
|
+
pattern: NamingPattern;
|
|
7
|
+
describePrefix: string;
|
|
8
|
+
itTemplate: string;
|
|
9
|
+
}
|
|
10
|
+
export type SetupLocation = 'inside-describe' | 'outside-describe' | 'beforeeach';
|
|
11
|
+
export interface StructureConventions {
|
|
12
|
+
describePerComponent: boolean;
|
|
13
|
+
helpersInDescribe: boolean;
|
|
14
|
+
setupLocation: SetupLocation;
|
|
15
|
+
}
|
|
16
|
+
export interface QueryPreferences {
|
|
17
|
+
preferred: string[];
|
|
18
|
+
avoided: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface MatcherConventions {
|
|
21
|
+
common: string[];
|
|
22
|
+
}
|
|
23
|
+
export interface ImportConventions {
|
|
24
|
+
common: string[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* TestConvention captures the learned conventions from analyzing test files
|
|
28
|
+
*/
|
|
29
|
+
export interface TestConvention {
|
|
30
|
+
naming: NamingConventions;
|
|
31
|
+
structure: StructureConventions;
|
|
32
|
+
queries: QueryPreferences;
|
|
33
|
+
matchers: MatcherConventions;
|
|
34
|
+
imports: ImportConventions;
|
|
35
|
+
}
|
|
36
|
+
export type ConventionKey = keyof TestConvention;
|
|
37
|
+
/**
|
|
38
|
+
* Default empty convention
|
|
39
|
+
*/
|
|
40
|
+
export declare function createEmptyConvention(): TestConvention;
|
|
41
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/learner/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,YAAY,GAAG,YAAY,CAAC;AAEtE,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,aAAa,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,YAAY,CAAC;AAElF,MAAM,WAAW,oBAAoB;IACnC,oBAAoB,EAAE,OAAO,CAAC;IAC9B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,SAAS,EAAE,oBAAoB,CAAC;IAChC,OAAO,EAAE,gBAAgB,CAAC;IAC1B,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,cAAc,CAAC;AAEjD;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,cAAc,CAuBtD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convention learning types for extracting test patterns
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Default empty convention
|
|
6
|
+
*/
|
|
7
|
+
export function createEmptyConvention() {
|
|
8
|
+
return {
|
|
9
|
+
naming: {
|
|
10
|
+
pattern: 'camelCase',
|
|
11
|
+
describePrefix: '',
|
|
12
|
+
itTemplate: 'should {description}'
|
|
13
|
+
},
|
|
14
|
+
structure: {
|
|
15
|
+
describePerComponent: true,
|
|
16
|
+
helpersInDescribe: false,
|
|
17
|
+
setupLocation: 'inside-describe'
|
|
18
|
+
},
|
|
19
|
+
queries: {
|
|
20
|
+
preferred: [],
|
|
21
|
+
avoided: []
|
|
22
|
+
},
|
|
23
|
+
matchers: {
|
|
24
|
+
common: []
|
|
25
|
+
},
|
|
26
|
+
imports: {
|
|
27
|
+
common: []
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/learner/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AA4CH;;GAEG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO;QACL,MAAM,EAAE;YACN,OAAO,EAAE,WAAW;YACpB,cAAc,EAAE,EAAE;YAClB,UAAU,EAAE,sBAAsB;SACnC;QACD,SAAS,EAAE;YACT,oBAAoB,EAAE,IAAI;YAC1B,iBAAiB,EAAE,KAAK;YACxB,aAAa,EAAE,iBAAiB;SACjC;QACD,OAAO,EAAE;YACP,SAAS,EAAE,EAAE;YACb,OAAO,EAAE,EAAE;SACZ;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,EAAE;SACX;QACD,OAAO,EAAE;YACP,MAAM,EAAE,EAAE;SACX;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recorder parser - Main entry point for parsing Chrome Recorder exports
|
|
3
|
+
*
|
|
4
|
+
* Pipeline:
|
|
5
|
+
* 1. Parse JSON → NormalizedSteps
|
|
6
|
+
* 2. deduplicateSteps(NormalizedSteps) → DedupedSteps
|
|
7
|
+
* 3. filterNoiseSteps(DedupedSteps) → CleanSteps
|
|
8
|
+
* 4. groupDialogSteps(CleanSteps) → DialogFlows
|
|
9
|
+
* 5. Continue to generation
|
|
10
|
+
*/
|
|
11
|
+
import type { NormalizedRecording, RecordingStep } from '../types/recording.js';
|
|
12
|
+
import { type DialogFlow } from './steps/dialog-detector.js';
|
|
13
|
+
/**
|
|
14
|
+
* Parse Chrome Recorder JSON file and apply deduplication and noise filtering
|
|
15
|
+
*
|
|
16
|
+
* @param filePath - Path to Chrome Recorder JSON export
|
|
17
|
+
* @returns Normalized recording with cleaned steps
|
|
18
|
+
*/
|
|
19
|
+
export declare function parseRecording(filePath: string): Promise<NormalizedRecording & {
|
|
20
|
+
steps: RecordingStep[];
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* Reset step counter (useful for testing)
|
|
24
|
+
*/
|
|
25
|
+
export declare function resetStepCounter(): void;
|
|
26
|
+
export { deduplicateSteps } from './steps/deduplicator.js';
|
|
27
|
+
export { filterNoiseSteps } from './steps/noise-filter.js';
|
|
28
|
+
export { groupDialogSteps, resetDialogIdCounter } from './steps/dialog-detector.js';
|
|
29
|
+
export type { DialogFlow, DialogType } from './steps/dialog-detector.js';
|
|
30
|
+
/**
|
|
31
|
+
* Parse recording and extract dialog flows
|
|
32
|
+
*
|
|
33
|
+
* @param filePath - Path to Chrome Recorder JSON export
|
|
34
|
+
* @returns Object with normalized recording and detected dialog flows
|
|
35
|
+
*/
|
|
36
|
+
export declare function parseRecordingWithDialogs(filePath: string): Promise<{
|
|
37
|
+
recording: NormalizedRecording;
|
|
38
|
+
dialogFlows: DialogFlow[];
|
|
39
|
+
}>;
|
|
40
|
+
//# sourceMappingURL=recorder-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recorder-parser.d.ts","sourceRoot":"","sources":["../../src/parser/recorder-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAoC,mBAAmB,EAAE,aAAa,EAAY,MAAM,uBAAuB,CAAC;AAG5H,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,4BAA4B,CAAC;AA8E/E;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,mBAAmB,GAAG;IAAE,KAAK,EAAE,aAAa,EAAE,CAAA;CAAE,CAAC,CAoC3D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAGD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACpF,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAEzE;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IACzE,SAAS,EAAE,mBAAmB,CAAC;IAC/B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B,CAAC,CAID"}
|