recker 1.0.14-next.cd6adc2 → 1.0.15-next.0e216c0
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 +78 -100
- package/dist/bench/generator.d.ts.map +1 -1
- package/dist/bench/generator.js +2 -1
- package/dist/bench/stats.d.ts +15 -1
- package/dist/bench/stats.d.ts.map +1 -1
- package/dist/bench/stats.js +84 -5
- package/dist/cli/index.js +21 -0
- package/dist/cli/tui/load-dashboard.d.ts.map +1 -1
- package/dist/cli/tui/load-dashboard.js +62 -8
- package/dist/cli/tui/scroll-buffer.d.ts +43 -0
- package/dist/cli/tui/scroll-buffer.d.ts.map +1 -0
- package/dist/cli/tui/scroll-buffer.js +162 -0
- package/dist/cli/tui/search-panel.d.ts +41 -0
- package/dist/cli/tui/search-panel.d.ts.map +1 -0
- package/dist/cli/tui/search-panel.js +419 -0
- package/dist/cli/tui/shell.d.ts +11 -0
- package/dist/cli/tui/shell.d.ts.map +1 -1
- package/dist/cli/tui/shell.js +236 -46
- package/dist/contract/index.js +3 -2
- package/dist/dns/index.d.ts +1 -0
- package/dist/dns/index.d.ts.map +1 -1
- package/dist/dns/index.js +1 -0
- package/dist/dns/propagation.d.ts +19 -0
- package/dist/dns/propagation.d.ts.map +1 -0
- package/dist/dns/propagation.js +129 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/mcp/embeddings-loader.d.ts +18 -0
- package/dist/mcp/embeddings-loader.d.ts.map +1 -0
- package/dist/mcp/embeddings-loader.js +152 -0
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/search/hybrid-search.d.ts.map +1 -1
- package/dist/mcp/search/hybrid-search.js +7 -21
- package/dist/mcp/server.d.ts +2 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +8 -1
- package/dist/recker.d.ts +47 -0
- package/dist/recker.d.ts.map +1 -0
- package/dist/recker.js +99 -0
- package/dist/utils/colors.d.ts +16 -0
- package/dist/utils/colors.d.ts.map +1 -1
- package/dist/utils/colors.js +16 -0
- package/dist/utils/tls-inspector.d.ts +6 -0
- package/dist/utils/tls-inspector.d.ts.map +1 -1
- package/dist/utils/tls-inspector.js +35 -1
- package/package.json +2 -2
- package/dist/mcp/data/embeddings.json +0 -1
package/dist/cli/tui/shell.js
CHANGED
|
@@ -12,6 +12,8 @@ import { rdap } from '../../utils/rdap.js';
|
|
|
12
12
|
import { ScrapeDocument } from '../../scrape/document.js';
|
|
13
13
|
import colors from '../../utils/colors.js';
|
|
14
14
|
import { getShellSearch } from './shell-search.js';
|
|
15
|
+
import { openSearchPanel } from './search-panel.js';
|
|
16
|
+
import { ScrollBuffer, parseScrollKey, parseMouseScroll, enableMouseReporting, disableMouseReporting } from './scroll-buffer.js';
|
|
15
17
|
let highlight;
|
|
16
18
|
async function initDependencies() {
|
|
17
19
|
if (!highlight) {
|
|
@@ -36,11 +38,16 @@ export class RekShell {
|
|
|
36
38
|
initialized = false;
|
|
37
39
|
currentDoc = null;
|
|
38
40
|
currentDocUrl = '';
|
|
41
|
+
scrollBuffer;
|
|
42
|
+
originalStdoutWrite = null;
|
|
43
|
+
inScrollMode = false;
|
|
39
44
|
constructor() {
|
|
40
45
|
this.client = createClient({
|
|
41
46
|
baseUrl: 'http://localhost',
|
|
42
|
-
checkHooks: false
|
|
47
|
+
checkHooks: false,
|
|
48
|
+
http2: true
|
|
43
49
|
});
|
|
50
|
+
this.scrollBuffer = new ScrollBuffer({ maxLines: 10000 });
|
|
44
51
|
}
|
|
45
52
|
async ensureInitialized() {
|
|
46
53
|
if (this.initialized)
|
|
@@ -85,7 +92,7 @@ export class RekShell {
|
|
|
85
92
|
const commands = [
|
|
86
93
|
'get', 'post', 'put', 'delete', 'patch', 'head', 'options',
|
|
87
94
|
'ws', 'udp', 'load', 'chat', 'ai',
|
|
88
|
-
'whois', 'tls', 'ssl', 'dns', 'rdap', 'ping',
|
|
95
|
+
'whois', 'tls', 'ssl', 'dns', 'dns:propagate', 'rdap', 'ping',
|
|
89
96
|
'scrap', '$', '$text', '$attr', '$html', '$links', '$images', '$scripts', '$css', '$sourcemaps', '$unmap', '$unmap:view', '$unmap:save', '$beautify', '$beautify:save', '$table',
|
|
90
97
|
'?', 'search', 'suggest', 'example',
|
|
91
98
|
'help', 'clear', 'exit', 'set', 'url', 'vars', 'env'
|
|
@@ -95,9 +102,11 @@ export class RekShell {
|
|
|
95
102
|
}
|
|
96
103
|
async start() {
|
|
97
104
|
await this.ensureInitialized();
|
|
105
|
+
this.setupScrollCapture();
|
|
98
106
|
console.clear();
|
|
99
107
|
console.log(colors.bold(colors.cyan('Rek Console')));
|
|
100
108
|
console.log(colors.gray('Chat with your APIs. Type "help" for magic.'));
|
|
109
|
+
console.log(colors.gray('Page Up/Down or mouse scroll to view history.'));
|
|
101
110
|
console.log(colors.gray('--------------------------------------------\n'));
|
|
102
111
|
this.prompt();
|
|
103
112
|
this.rl.on('line', async (line) => {
|
|
@@ -112,15 +121,159 @@ export class RekShell {
|
|
|
112
121
|
this.rl.close();
|
|
113
122
|
});
|
|
114
123
|
this.rl.on('close', () => {
|
|
124
|
+
this.cleanupScrollCapture();
|
|
115
125
|
console.log(colors.gray('\nSee ya.'));
|
|
116
126
|
process.exit(0);
|
|
117
127
|
});
|
|
128
|
+
process.stdout.on('resize', () => {
|
|
129
|
+
this.scrollBuffer.updateViewport();
|
|
130
|
+
});
|
|
131
|
+
this.setupScrollKeyHandler();
|
|
132
|
+
}
|
|
133
|
+
setupScrollCapture() {
|
|
134
|
+
this.originalStdoutWrite = process.stdout.write.bind(process.stdout);
|
|
135
|
+
const self = this;
|
|
136
|
+
process.stdout.write = function (chunk, encodingOrCallback, callback) {
|
|
137
|
+
const content = typeof chunk === 'string' ? chunk : chunk.toString();
|
|
138
|
+
self.scrollBuffer.write(content);
|
|
139
|
+
if (!self.inScrollMode && self.originalStdoutWrite) {
|
|
140
|
+
return self.originalStdoutWrite(chunk, encodingOrCallback, callback);
|
|
141
|
+
}
|
|
142
|
+
return true;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
cleanupScrollCapture() {
|
|
146
|
+
if (this.originalStdoutWrite) {
|
|
147
|
+
process.stdout.write = this.originalStdoutWrite;
|
|
148
|
+
this.originalStdoutWrite = null;
|
|
149
|
+
}
|
|
150
|
+
disableMouseReporting();
|
|
151
|
+
}
|
|
152
|
+
setupScrollKeyHandler() {
|
|
153
|
+
enableMouseReporting();
|
|
154
|
+
if (process.stdin.isTTY) {
|
|
155
|
+
process.stdin.on('data', (data) => {
|
|
156
|
+
const scrollKey = parseScrollKey(data);
|
|
157
|
+
if (scrollKey) {
|
|
158
|
+
this.handleScrollKey(scrollKey);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
const mouseScroll = parseMouseScroll(data);
|
|
162
|
+
if (mouseScroll) {
|
|
163
|
+
this.handleScrollKey(mouseScroll);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
handleScrollKey(key) {
|
|
170
|
+
let needsRedraw = false;
|
|
171
|
+
switch (key) {
|
|
172
|
+
case 'pageUp':
|
|
173
|
+
if (!this.inScrollMode) {
|
|
174
|
+
this.enterScrollMode();
|
|
175
|
+
}
|
|
176
|
+
needsRedraw = this.scrollBuffer.pageUp();
|
|
177
|
+
break;
|
|
178
|
+
case 'pageDown':
|
|
179
|
+
needsRedraw = this.scrollBuffer.pageDown();
|
|
180
|
+
if (!this.scrollBuffer.isScrolledUp && this.inScrollMode) {
|
|
181
|
+
this.exitScrollMode();
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
break;
|
|
185
|
+
case 'scrollUp':
|
|
186
|
+
if (!this.inScrollMode) {
|
|
187
|
+
this.enterScrollMode();
|
|
188
|
+
}
|
|
189
|
+
needsRedraw = this.scrollBuffer.scrollUp(3);
|
|
190
|
+
break;
|
|
191
|
+
case 'scrollDown':
|
|
192
|
+
needsRedraw = this.scrollBuffer.scrollDown(3);
|
|
193
|
+
if (!this.scrollBuffer.isScrolledUp && this.inScrollMode) {
|
|
194
|
+
this.exitScrollMode();
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
break;
|
|
198
|
+
case 'home':
|
|
199
|
+
if (!this.inScrollMode) {
|
|
200
|
+
this.enterScrollMode();
|
|
201
|
+
}
|
|
202
|
+
this.scrollBuffer.scrollToTop();
|
|
203
|
+
needsRedraw = true;
|
|
204
|
+
break;
|
|
205
|
+
case 'end':
|
|
206
|
+
this.scrollBuffer.scrollToBottom();
|
|
207
|
+
if (this.inScrollMode) {
|
|
208
|
+
this.exitScrollMode();
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
break;
|
|
212
|
+
case 'escape':
|
|
213
|
+
if (this.inScrollMode) {
|
|
214
|
+
this.exitScrollMode();
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
if (needsRedraw && this.inScrollMode) {
|
|
220
|
+
this.renderScrollView();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
enterScrollMode() {
|
|
224
|
+
if (this.inScrollMode)
|
|
225
|
+
return;
|
|
226
|
+
this.inScrollMode = true;
|
|
227
|
+
this.rl.pause();
|
|
228
|
+
if (this.originalStdoutWrite) {
|
|
229
|
+
this.originalStdoutWrite('\x1b[?25l');
|
|
230
|
+
}
|
|
231
|
+
this.renderScrollView();
|
|
232
|
+
}
|
|
233
|
+
exitScrollMode() {
|
|
234
|
+
if (!this.inScrollMode)
|
|
235
|
+
return;
|
|
236
|
+
this.inScrollMode = false;
|
|
237
|
+
if (this.originalStdoutWrite) {
|
|
238
|
+
this.originalStdoutWrite('\x1b[?25h');
|
|
239
|
+
this.originalStdoutWrite('\x1b[2J\x1b[H');
|
|
240
|
+
}
|
|
241
|
+
const recentLines = this.scrollBuffer.getVisibleLines();
|
|
242
|
+
if (this.originalStdoutWrite) {
|
|
243
|
+
this.originalStdoutWrite(recentLines.join('\n') + '\n');
|
|
244
|
+
}
|
|
245
|
+
this.rl.resume();
|
|
246
|
+
this.prompt();
|
|
247
|
+
}
|
|
248
|
+
renderScrollView() {
|
|
249
|
+
if (!this.originalStdoutWrite)
|
|
250
|
+
return;
|
|
251
|
+
const rows = process.stdout.rows || 24;
|
|
252
|
+
const cols = process.stdout.columns || 80;
|
|
253
|
+
const visibleLines = this.scrollBuffer.getVisibleLines();
|
|
254
|
+
const info = this.scrollBuffer.getScrollInfo();
|
|
255
|
+
this.originalStdoutWrite('\x1b[2J\x1b[H');
|
|
256
|
+
for (let i = 0; i < visibleLines.length && i < rows - 1; i++) {
|
|
257
|
+
const line = visibleLines[i] || '';
|
|
258
|
+
const truncated = line.length > cols ? line.slice(0, cols - 1) + '…' : line;
|
|
259
|
+
this.originalStdoutWrite(truncated + '\n');
|
|
260
|
+
}
|
|
261
|
+
const scrollInfo = this.scrollBuffer.isScrolledUp
|
|
262
|
+
? colors.yellow(`↑ ${this.scrollBuffer.position} lines | ${info.percent}% | `)
|
|
263
|
+
: '';
|
|
264
|
+
const helpText = colors.gray('Page Up/Down • Home/End • Esc to exit');
|
|
265
|
+
const statusBar = `\x1b[${rows};1H\x1b[7m ${scrollInfo}${helpText} \x1b[0m`;
|
|
266
|
+
this.originalStdoutWrite(statusBar);
|
|
118
267
|
}
|
|
119
268
|
prompt() {
|
|
120
269
|
this.rl.setPrompt(this.getPrompt());
|
|
121
270
|
this.rl.prompt();
|
|
122
271
|
}
|
|
123
272
|
async handleCommand(input) {
|
|
273
|
+
if (input.endsWith('?') && !input.startsWith('?') && input.length > 1) {
|
|
274
|
+
await this.runSearch(input.slice(0, -1).trim());
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
124
277
|
if (input.includes('=') && !input.includes(' ') && !input.startsWith('http')) {
|
|
125
278
|
}
|
|
126
279
|
const parts = this.parseLine(input);
|
|
@@ -165,6 +318,9 @@ export class RekShell {
|
|
|
165
318
|
case 'dns':
|
|
166
319
|
await this.runDNS(parts[1]);
|
|
167
320
|
return;
|
|
321
|
+
case 'dns:propagate':
|
|
322
|
+
await this.runDNSPropagation(parts[1], parts[2]);
|
|
323
|
+
return;
|
|
168
324
|
case 'rdap':
|
|
169
325
|
await this.runRDAP(parts[1]);
|
|
170
326
|
return;
|
|
@@ -650,25 +806,56 @@ export class RekShell {
|
|
|
650
806
|
const duration = Math.round(performance.now() - startTime);
|
|
651
807
|
const statusIcon = info.valid ? colors.green('✔') : colors.red('✖');
|
|
652
808
|
const statusText = info.valid ? colors.green('Valid') : colors.red('Invalid/Expired');
|
|
653
|
-
console.log(`${statusIcon} Certificate ${statusText}` + colors.gray(` (${duration}ms)\n`));
|
|
654
|
-
console.log(colors.bold(' Certificate:'));
|
|
655
|
-
console.log(` ${colors.cyan('Subject')}: ${info.subject?.CN || info.subject?.O || 'N/A'}`);
|
|
656
|
-
console.log(` ${colors.cyan('Issuer')}: ${info.issuer?.CN || info.issuer?.O || 'N/A'}`);
|
|
657
|
-
console.log(` ${colors.cyan('Valid From')}: ${info.validFrom.toISOString()}`);
|
|
658
|
-
console.log(` ${colors.cyan('Valid To')}: ${info.validTo.toISOString()}`);
|
|
659
809
|
const daysColor = info.daysRemaining < 30 ? colors.red : info.daysRemaining < 90 ? colors.yellow : colors.green;
|
|
660
|
-
console.log(
|
|
661
|
-
console.log(colors.
|
|
662
|
-
console.log(
|
|
663
|
-
console.log(`
|
|
664
|
-
|
|
810
|
+
console.log(`\n${colors.bold(colors.cyan('🔒 TLS/SSL Report'))}`);
|
|
811
|
+
console.log(`${statusIcon} Certificate ${statusText}` + colors.gray(` (${duration}ms)\n`));
|
|
812
|
+
console.log(colors.bold('Certificate:'));
|
|
813
|
+
console.log(` ${colors.gray('Subject:')}`);
|
|
814
|
+
for (const key of Object.keys(info.subject || {})) {
|
|
815
|
+
console.log(` ${colors.gray(key.padEnd(10))}: ${info.subject[key]}`);
|
|
816
|
+
}
|
|
817
|
+
console.log(` ${colors.gray('Issuer:')}`);
|
|
818
|
+
for (const key of Object.keys(info.issuer || {})) {
|
|
819
|
+
console.log(` ${colors.gray(key.padEnd(10))}: ${info.issuer[key]}`);
|
|
820
|
+
}
|
|
821
|
+
console.log(` ${colors.gray('Expires:')} ${daysColor(info.daysRemaining + ' days')} (${info.validTo.toISOString().split('T')[0]})`);
|
|
822
|
+
console.log(` ${colors.gray('Valid From:')} ${info.validFrom.toISOString().split('T')[0]}`);
|
|
823
|
+
console.log(` ${colors.gray('Valid To:')} ${info.validTo.toISOString().split('T')[0]}`);
|
|
824
|
+
console.log(` ${colors.gray('Valid:')} ${info.valid ? colors.green('Yes') : colors.red('No')}`);
|
|
825
|
+
if (info.altNames && info.altNames.length > 0) {
|
|
826
|
+
console.log(colors.bold('\nSubject Alternative Names (SANs):'));
|
|
827
|
+
for (const name of info.altNames) {
|
|
828
|
+
console.log(` ${colors.cyan('→')} ${name}`);
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
console.log(colors.bold('\nPublic Key:'));
|
|
832
|
+
if (info.pubkey) {
|
|
833
|
+
console.log(` ${colors.gray('Algorithm:')} ${info.pubkey.algo}`);
|
|
834
|
+
console.log(` ${colors.gray('Size:')} ${info.pubkey.size} bits`);
|
|
835
|
+
}
|
|
836
|
+
else {
|
|
837
|
+
console.log(' Not available');
|
|
838
|
+
}
|
|
839
|
+
console.log(colors.bold('\nExtended Key Usage:'));
|
|
840
|
+
if (info.extKeyUsage && info.extKeyUsage.length > 0) {
|
|
841
|
+
for (const oid of info.extKeyUsage) {
|
|
842
|
+
console.log(` ${colors.cyan('→')} ${oid}`);
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
else {
|
|
846
|
+
console.log(' None');
|
|
847
|
+
}
|
|
848
|
+
console.log(colors.bold('\nConnection:'));
|
|
849
|
+
console.log(` ${colors.gray('Protocol:')} ${info.protocol || 'N/A'}`);
|
|
850
|
+
console.log(` ${colors.gray('Cipher:')} ${info.cipher?.name || 'N/A'}`);
|
|
851
|
+
console.log(` ${colors.gray('Auth:')} ${info.authorized ? colors.green('Trusted') : colors.red('Untrusted')}`);
|
|
665
852
|
if (info.authorizationError) {
|
|
666
|
-
console.log(`
|
|
853
|
+
console.log(` ${colors.gray('Auth Error:')} ${colors.red(String(info.authorizationError))}`);
|
|
667
854
|
}
|
|
668
|
-
console.log(colors.bold('\
|
|
669
|
-
console.log(`
|
|
670
|
-
console.log(`
|
|
671
|
-
console.log(`
|
|
855
|
+
console.log(colors.bold('\nFingerprints:'));
|
|
856
|
+
console.log(` ${colors.gray('SHA1:')} ${info.fingerprint}`);
|
|
857
|
+
console.log(` ${colors.gray('SHA256:')} ${info.fingerprint256}`);
|
|
858
|
+
console.log(` ${colors.gray('Serial:')} ${info.serialNumber}`);
|
|
672
859
|
this.lastResponse = info;
|
|
673
860
|
}
|
|
674
861
|
catch (error) {
|
|
@@ -736,6 +923,27 @@ export class RekShell {
|
|
|
736
923
|
}
|
|
737
924
|
console.log('');
|
|
738
925
|
}
|
|
926
|
+
async runDNSPropagation(domain, type = 'A') {
|
|
927
|
+
if (!domain) {
|
|
928
|
+
domain = this.getBaseDomain() || '';
|
|
929
|
+
if (!domain) {
|
|
930
|
+
console.log(colors.yellow('Usage: dns:propagate <domain> [type]'));
|
|
931
|
+
console.log(colors.gray(' Examples: dns:propagate google.com | dns:propagate github.com TXT'));
|
|
932
|
+
console.log(colors.gray(' Or set a base URL first: url https://example.com'));
|
|
933
|
+
return;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
console.log(colors.gray(`Checking DNS propagation for ${domain} (${type})...`));
|
|
937
|
+
try {
|
|
938
|
+
const { checkPropagation, formatPropagationReport } = await import('../../dns/propagation.js');
|
|
939
|
+
const results = await checkPropagation(domain, type);
|
|
940
|
+
console.log(formatPropagationReport(results, domain, type));
|
|
941
|
+
this.lastResponse = results;
|
|
942
|
+
}
|
|
943
|
+
catch (error) {
|
|
944
|
+
console.error(colors.red(`Propagation check failed: ${error.message}`));
|
|
945
|
+
}
|
|
946
|
+
}
|
|
739
947
|
async runRDAP(domain) {
|
|
740
948
|
if (!domain) {
|
|
741
949
|
domain = this.getRootDomain() || '';
|
|
@@ -1660,38 +1868,14 @@ export class RekShell {
|
|
|
1660
1868
|
console.log('');
|
|
1661
1869
|
}
|
|
1662
1870
|
async runSearch(query) {
|
|
1663
|
-
if (!query.trim()) {
|
|
1664
|
-
console.log(colors.yellow('Usage: ? <query> or search <query>'));
|
|
1665
|
-
console.log(colors.gray(' Examples:'));
|
|
1666
|
-
console.log(colors.gray(' ? retry exponential backoff'));
|
|
1667
|
-
console.log(colors.gray(' search cache configuration'));
|
|
1668
|
-
return;
|
|
1669
|
-
}
|
|
1670
|
-
console.log(colors.gray('Searching documentation...'));
|
|
1671
1871
|
try {
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
console.log(colors.yellow(`No results for: "${query}"`));
|
|
1676
|
-
console.log(colors.gray('Try different keywords like: retry, cache, streaming, websocket, pagination'));
|
|
1677
|
-
return;
|
|
1678
|
-
}
|
|
1679
|
-
console.log(colors.bold(colors.cyan(`\nFound ${results.length} results for "${query}":\n`)));
|
|
1680
|
-
for (let i = 0; i < results.length; i++) {
|
|
1681
|
-
const result = results[i];
|
|
1682
|
-
const score = Math.round(result.score * 100);
|
|
1683
|
-
console.log(` ${colors.green(`${i + 1}.`)} ${colors.bold(result.title)} ${colors.gray(`(${score}%)`)}`);
|
|
1684
|
-
console.log(` ${colors.gray(result.path)}`);
|
|
1685
|
-
if (result.snippet) {
|
|
1686
|
-
const snippet = result.snippet.slice(0, 120).replace(/\n/g, ' ');
|
|
1687
|
-
console.log(` ${colors.gray(snippet)}${result.snippet.length > 120 ? '...' : ''}`);
|
|
1688
|
-
}
|
|
1689
|
-
console.log('');
|
|
1690
|
-
}
|
|
1691
|
-
console.log(colors.gray(' Tip: Use "get_doc <path>" to read full documentation'));
|
|
1872
|
+
this.rl.pause();
|
|
1873
|
+
await openSearchPanel(query.trim() || undefined);
|
|
1874
|
+
this.rl.resume();
|
|
1692
1875
|
}
|
|
1693
1876
|
catch (error) {
|
|
1694
1877
|
console.error(colors.red(`Search failed: ${error.message}`));
|
|
1878
|
+
this.rl.resume();
|
|
1695
1879
|
}
|
|
1696
1880
|
}
|
|
1697
1881
|
async runSuggest(useCase) {
|
|
@@ -1834,6 +2018,12 @@ export class RekShell {
|
|
|
1834
2018
|
${colors.green('suggest <use-case>')} Get implementation suggestions.
|
|
1835
2019
|
${colors.green('example <feature>')} Get code examples for a feature.
|
|
1836
2020
|
|
|
2021
|
+
${colors.bold('Navigation:')}
|
|
2022
|
+
${colors.green('Page Up/Down')} Scroll through command history.
|
|
2023
|
+
${colors.green('Home/End')} Jump to top/bottom of history.
|
|
2024
|
+
${colors.green('Mouse Scroll')} Scroll with mouse wheel.
|
|
2025
|
+
${colors.green('Escape')} Exit scroll mode.
|
|
2026
|
+
|
|
1837
2027
|
${colors.bold('Examples:')}
|
|
1838
2028
|
› url httpbin.org
|
|
1839
2029
|
› get /json
|
package/dist/contract/index.js
CHANGED
|
@@ -49,14 +49,15 @@ export function createContract(client, contract) {
|
|
|
49
49
|
if (endpoint.errors && err instanceof HttpError && err.response) {
|
|
50
50
|
const schema = endpoint.errors[err.status];
|
|
51
51
|
if (schema) {
|
|
52
|
+
let parsedError;
|
|
52
53
|
try {
|
|
53
54
|
const errorBody = await err.response.json();
|
|
54
|
-
|
|
55
|
-
throw new ContractError(err.status, parsedError, err);
|
|
55
|
+
parsedError = schema.parse(errorBody);
|
|
56
56
|
}
|
|
57
57
|
catch (parseErr) {
|
|
58
58
|
throw err;
|
|
59
59
|
}
|
|
60
|
+
throw new ContractError(err.status, parsedError, err);
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
throw err;
|
package/dist/dns/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { type DnsSecurityRecords } from '../utils/dns-toolkit.js';
|
|
|
2
2
|
export { createLookupFunction, customDNSLookup } from '../utils/dns.js';
|
|
3
3
|
export { createDoHLookup } from '../utils/doh.js';
|
|
4
4
|
export { getSecurityRecords, type DnsSecurityRecords } from '../utils/dns-toolkit.js';
|
|
5
|
+
export { checkPropagation, type PropagationResult, type DnsRecord, formatPropagationReport } from './propagation.js';
|
|
5
6
|
export type { DNSOptions } from '../types/index.js';
|
|
6
7
|
export type RecordType = 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT' | 'NS' | 'SOA' | 'SRV' | 'CAA' | 'PTR';
|
|
7
8
|
export type DoHProvider = 'cloudflare' | 'google' | 'quad9' | 'system';
|
package/dist/dns/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dns/index.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAgD,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAGhH,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACtF,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAKpD,MAAM,MAAM,UAAU,GAAG,GAAG,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAKtG,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAKvE,MAAM,WAAW,gBAAgB;IAK/B,QAAQ,CAAC,EAAE,WAAW,CAAC;IAMvB,OAAO,CAAC,EAAE,MAAM,CAAC;IAMjB,KAAK,CAAC,EAAE,OA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,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAOxE,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAQrD,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAO9C,UAAU,CAAC,QAAQ,EAAE,MAAM;IAO3B,UAAU,CAAC,QAAQ,EAAE,MAAM;IAO3B,UAAU,CAAC,QAAQ,EAAE,MAAM;IAO3B,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAOhC,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IA4BhE,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAItE;AA0BD,wBAAgB,SAAS,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAE/D"}
|
package/dist/dns/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import { getSecurityRecords as getSecurityRecordsUtil } from '../utils/dns-toolk
|
|
|
3
3
|
export { createLookupFunction, customDNSLookup } from '../utils/dns.js';
|
|
4
4
|
export { createDoHLookup } from '../utils/doh.js';
|
|
5
5
|
export { getSecurityRecords } from '../utils/dns-toolkit.js';
|
|
6
|
+
export { checkPropagation, formatPropagationReport } from './propagation.js';
|
|
6
7
|
export class DNSClient {
|
|
7
8
|
options;
|
|
8
9
|
constructor(options = {}) {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface DnsRecord {
|
|
2
|
+
name: string;
|
|
3
|
+
type: number;
|
|
4
|
+
TTL: number;
|
|
5
|
+
data: string;
|
|
6
|
+
}
|
|
7
|
+
export interface PropagationResult {
|
|
8
|
+
id: string;
|
|
9
|
+
provider: string;
|
|
10
|
+
status: 'ok' | 'error';
|
|
11
|
+
records: string[];
|
|
12
|
+
rawRecords: DnsRecord[];
|
|
13
|
+
latency: number;
|
|
14
|
+
error?: string;
|
|
15
|
+
location?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function checkPropagation(domain: string, type?: string): Promise<PropagationResult[]>;
|
|
18
|
+
export declare function formatPropagationReport(results: PropagationResult[], domain: string, type: string): string;
|
|
19
|
+
//# sourceMappingURL=propagation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"propagation.d.ts","sourceRoot":"","sources":["../../src/dns/propagation.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AA8BD,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,MAAY,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAyEvG;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAqD1G"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { request } from 'undici';
|
|
2
|
+
import pc from '../utils/colors.js';
|
|
3
|
+
const PROVIDERS = [
|
|
4
|
+
{ id: 'google', name: 'Google DNS', url: 'https://dns.google/resolve' },
|
|
5
|
+
{ id: 'cloudflare', name: 'Cloudflare', url: 'https://cloudflare-dns.com/dns-query' },
|
|
6
|
+
{ id: 'quad9', name: 'Quad9', url: 'https://dns.quad9.net:5053/dns-query' },
|
|
7
|
+
{ id: 'alidns', name: 'AliDNS (China)', url: 'https://dns.alidns.com/resolve' },
|
|
8
|
+
];
|
|
9
|
+
const TYPE_MAP = {
|
|
10
|
+
'A': '1',
|
|
11
|
+
'AAAA': '28',
|
|
12
|
+
'CNAME': '5',
|
|
13
|
+
'MX': '15',
|
|
14
|
+
'NS': '2',
|
|
15
|
+
'TXT': '16',
|
|
16
|
+
'PTR': '12',
|
|
17
|
+
'SRV': '33',
|
|
18
|
+
'SOA': '6',
|
|
19
|
+
'CAA': '257'
|
|
20
|
+
};
|
|
21
|
+
const TYPE_ID_MAP = Object.entries(TYPE_MAP).reduce((acc, [k, v]) => {
|
|
22
|
+
acc[Number(v)] = k;
|
|
23
|
+
return acc;
|
|
24
|
+
}, {});
|
|
25
|
+
export async function checkPropagation(domain, type = 'A') {
|
|
26
|
+
const typeId = TYPE_MAP[type.toUpperCase()] || type;
|
|
27
|
+
const queries = PROVIDERS.map(async (provider) => {
|
|
28
|
+
const start = performance.now();
|
|
29
|
+
try {
|
|
30
|
+
const url = new URL(provider.url);
|
|
31
|
+
url.searchParams.set('name', domain);
|
|
32
|
+
url.searchParams.set('type', typeId);
|
|
33
|
+
const { body, statusCode } = await request(url, {
|
|
34
|
+
method: 'GET',
|
|
35
|
+
headers: { 'Accept': 'application/dns-json' }
|
|
36
|
+
});
|
|
37
|
+
if (statusCode !== 200) {
|
|
38
|
+
throw new Error(`HTTP ${statusCode}`);
|
|
39
|
+
}
|
|
40
|
+
const json = await body.json();
|
|
41
|
+
const duration = performance.now() - start;
|
|
42
|
+
if (json.Status !== 0) {
|
|
43
|
+
const statusMap = {
|
|
44
|
+
1: 'FormErr', 2: 'ServFail', 3: 'NXDomain', 4: 'NotImp', 5: 'Refused'
|
|
45
|
+
};
|
|
46
|
+
const errorName = statusMap[json.Status] || `Code ${json.Status}`;
|
|
47
|
+
return {
|
|
48
|
+
id: provider.id,
|
|
49
|
+
provider: provider.name,
|
|
50
|
+
status: 'error',
|
|
51
|
+
records: [],
|
|
52
|
+
rawRecords: [],
|
|
53
|
+
latency: duration,
|
|
54
|
+
error: errorName
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const answers = (json.Answer || []);
|
|
58
|
+
const records = answers.map(r => r.data);
|
|
59
|
+
return {
|
|
60
|
+
id: provider.id,
|
|
61
|
+
provider: provider.name,
|
|
62
|
+
status: 'ok',
|
|
63
|
+
records,
|
|
64
|
+
rawRecords: answers,
|
|
65
|
+
latency: duration
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
return {
|
|
70
|
+
id: provider.id,
|
|
71
|
+
provider: provider.name,
|
|
72
|
+
status: 'error',
|
|
73
|
+
records: [],
|
|
74
|
+
rawRecords: [],
|
|
75
|
+
latency: performance.now() - start,
|
|
76
|
+
error: err.message
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
return Promise.all(queries);
|
|
81
|
+
}
|
|
82
|
+
export function formatPropagationReport(results, domain, type) {
|
|
83
|
+
let output = '';
|
|
84
|
+
output += `
|
|
85
|
+
${pc.bold(pc.cyan('🌍 Global DNS Propagation Check'))}
|
|
86
|
+
`;
|
|
87
|
+
output += `${pc.gray('Domain:')} ${pc.white(domain)} ${pc.gray('Type:')} ${pc.white(type.toUpperCase())}
|
|
88
|
+
|
|
89
|
+
`;
|
|
90
|
+
const consensus = {};
|
|
91
|
+
results.forEach(res => {
|
|
92
|
+
const key = res.status === 'ok' ? res.records.sort().join(', ') : `Error: ${res.error}`;
|
|
93
|
+
consensus[key] = (consensus[key] || 0) + 1;
|
|
94
|
+
const statusIcon = res.status === 'ok' ? pc.green('✔') : pc.red('✖');
|
|
95
|
+
const latencyColor = res.latency < 50 ? pc.green : res.latency < 200 ? pc.yellow : pc.red;
|
|
96
|
+
const latencyText = latencyColor(`${Math.round(res.latency)}ms`.padStart(5));
|
|
97
|
+
const providerName = pc.bold(res.provider.padEnd(15));
|
|
98
|
+
let recordsText = '';
|
|
99
|
+
if (res.status === 'ok') {
|
|
100
|
+
if (res.records.length === 0) {
|
|
101
|
+
recordsText = pc.yellow('(No records)');
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
recordsText = res.records.join(', ');
|
|
105
|
+
if (recordsText.length > 60)
|
|
106
|
+
recordsText = recordsText.substring(0, 57) + '...';
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
recordsText = pc.red(res.error || 'Unknown Error');
|
|
111
|
+
}
|
|
112
|
+
output += ` ${statusIcon} ${providerName} ${latencyText} ${recordsText}
|
|
113
|
+
`;
|
|
114
|
+
});
|
|
115
|
+
output += '\n';
|
|
116
|
+
const distinctAnswers = Object.keys(consensus);
|
|
117
|
+
if (distinctAnswers.length === 1) {
|
|
118
|
+
if (distinctAnswers[0].startsWith('Error')) {
|
|
119
|
+
output += pc.red('❌ All providers returned error.\n');
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
output += pc.green('✅ All providers returned the same records. Propagation is complete.\n');
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
else if (distinctAnswers.length > 1) {
|
|
126
|
+
output += pc.yellow('⚠ Inconsistent results detected (Propagation in progress or Split-Horizon DNS).\n');
|
|
127
|
+
}
|
|
128
|
+
return output;
|
|
129
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -64,4 +64,6 @@ export * as protocols from './protocols/index.js';
|
|
|
64
64
|
export * from './mcp/client.js';
|
|
65
65
|
export * from './mcp/contract.js';
|
|
66
66
|
export { Client as Recker } from './core/client.js';
|
|
67
|
+
export { get, post, put, patch, del, del as delete, head, options, whois, whoisAvailable, dns, dnsSecurity, ws, recker, } from './recker.js';
|
|
68
|
+
export { default } from './recker.js';
|
|
67
69
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,C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B,CAAC;AACvC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAGlD,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAOpD,OAAO,EACL,GAAG,EACH,IAAI,EACJ,GAAG,EACH,KAAK,EACL,GAAG,EACH,GAAG,IAAI,MAAM,EACb,IAAI,EACJ,OAAO,EACP,KAAK,EACL,cAAc,EACd,GAAG,EACH,WAAW,EACX,EAAE,EACF,MAAM,GACP,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -64,3 +64,5 @@ export * as protocols from './protocols/index.js';
|
|
|
64
64
|
export * from './mcp/client.js';
|
|
65
65
|
export * from './mcp/contract.js';
|
|
66
66
|
export { Client as Recker } from './core/client.js';
|
|
67
|
+
export { get, post, put, patch, del, del as delete, head, options, whois, whoisAvailable, dns, dnsSecurity, ws, recker, } from './recker.js';
|
|
68
|
+
export { default } from './recker.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { EmbeddingsData } from './search/types.js';
|
|
2
|
+
declare function getPackageVersion(): string;
|
|
3
|
+
export declare function getEmbeddingsCachePath(version?: string): string;
|
|
4
|
+
export declare function hasLocalEmbeddings(version?: string): boolean;
|
|
5
|
+
export declare function loadLocalEmbeddings(version?: string): EmbeddingsData | null;
|
|
6
|
+
export declare function saveLocalEmbeddings(data: EmbeddingsData, version?: string): void;
|
|
7
|
+
export declare function downloadEmbeddings(version?: string): Promise<EmbeddingsData>;
|
|
8
|
+
export declare function loadBundledEmbeddings(): Promise<EmbeddingsData | null>;
|
|
9
|
+
export interface LoadEmbeddingsOptions {
|
|
10
|
+
forceDownload?: boolean;
|
|
11
|
+
version?: string;
|
|
12
|
+
offline?: boolean;
|
|
13
|
+
debug?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function loadEmbeddings(options?: LoadEmbeddingsOptions): Promise<EmbeddingsData | null>;
|
|
16
|
+
export declare function clearEmbeddingsCache(version?: string): void;
|
|
17
|
+
export { getPackageVersion };
|
|
18
|
+
//# sourceMappingURL=embeddings-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embeddings-loader.d.ts","sourceRoot":"","sources":["../../src/mcp/embeddings-loader.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA+BxD,iBAAS,iBAAiB,IAAI,MAAM,CAKnC;AAyBD,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAI/D;AAKD,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAE5D;AAKD,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAa3E;AAKD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAUhF;AAKD,wBAAsB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAoBlF;AAKD,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAsB5E;AAED,MAAM,WAAW,qBAAqB;IAEpC,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAsBD,wBAAsB,cAAc,CAAC,OAAO,GAAE,qBAA0B,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAsCxG;AAKD,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAW3D;AAKD,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|