@specverse/engine-registry 4.0.2 → 4.0.4
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/package.json +1 -1
- package/dist/cache/cache-manager.d.ts +0 -132
- package/dist/cache/cache-manager.d.ts.map +0 -1
- package/dist/cache/cache-manager.js +0 -218
- package/dist/cache/cache-manager.js.map +0 -1
- package/dist/client/registry-client.d.ts +0 -129
- package/dist/client/registry-client.d.ts.map +0 -1
- package/dist/client/registry-client.js +0 -317
- package/dist/client/registry-client.js.map +0 -1
- package/dist/formatters/error-formatter.d.ts +0 -100
- package/dist/formatters/error-formatter.d.ts.map +0 -1
- package/dist/formatters/error-formatter.js +0 -290
- package/dist/formatters/error-formatter.js.map +0 -1
- package/dist/formatters/index.d.ts +0 -8
- package/dist/formatters/index.d.ts.map +0 -1
- package/dist/formatters/index.js +0 -7
- package/dist/formatters/index.js.map +0 -1
- package/dist/index.d.ts +0 -19
- package/dist/index.js +0 -22
- package/dist/index.js.map +0 -1
- package/dist/offline/offline-handler.d.ts +0 -150
- package/dist/offline/offline-handler.d.ts.map +0 -1
- package/dist/offline/offline-handler.js +0 -290
- package/dist/offline/offline-handler.js.map +0 -1
- package/dist/types/index.d.ts +0 -13
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -11
- package/dist/types/index.js.map +0 -1
- package/dist/types/registry.d.ts +0 -220
- package/dist/types/registry.d.ts.map +0 -1
- package/dist/types/registry.js +0 -55
- package/dist/types/registry.js.map +0 -1
- package/dist/types/validation.d.ts +0 -197
- package/dist/types/validation.d.ts.map +0 -1
- package/dist/types/validation.js +0 -140
- package/dist/types/validation.js.map +0 -1
- package/dist/utils/manifest-adapter.d.ts +0 -42
- package/dist/utils/manifest-adapter.js +0 -182
- package/dist/utils/manifest-adapter.js.map +0 -1
- package/dist/validators/index.d.ts +0 -12
- package/dist/validators/index.d.ts.map +0 -1
- package/dist/validators/index.js +0 -9
- package/dist/validators/index.js.map +0 -1
- package/dist/validators/installation-validator.d.ts +0 -75
- package/dist/validators/installation-validator.d.ts.map +0 -1
- package/dist/validators/installation-validator.js +0 -142
- package/dist/validators/installation-validator.js.map +0 -1
- package/dist/validators/manifest-validator.d.ts +0 -82
- package/dist/validators/manifest-validator.d.ts.map +0 -1
- package/dist/validators/manifest-validator.js +0 -213
- package/dist/validators/manifest-validator.js.map +0 -1
- package/dist/validators/validator.d.ts +0 -113
- package/dist/validators/validator.d.ts.map +0 -1
- package/dist/validators/validator.js +0 -165
- package/dist/validators/validator.js.map +0 -1
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Error Formatter
|
|
3
|
-
*
|
|
4
|
-
* Formats validation issues for beautiful console output.
|
|
5
|
-
* Provides colored, contextualized error messages with suggestions.
|
|
6
|
-
*
|
|
7
|
-
* @module registry/formatters/error-formatter
|
|
8
|
-
* @version 2.0.0
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* ANSI color codes for terminal output
|
|
12
|
-
*/
|
|
13
|
-
const colors = {
|
|
14
|
-
reset: '\x1b[0m',
|
|
15
|
-
bold: '\x1b[1m',
|
|
16
|
-
dim: '\x1b[2m',
|
|
17
|
-
// Severity colors
|
|
18
|
-
error: '\x1b[31m', // Red
|
|
19
|
-
warning: '\x1b[33m', // Yellow
|
|
20
|
-
info: '\x1b[36m', // Cyan
|
|
21
|
-
success: '\x1b[32m', // Green
|
|
22
|
-
// Element colors
|
|
23
|
-
title: '\x1b[1m\x1b[37m', // Bold White
|
|
24
|
-
file: '\x1b[35m', // Magenta
|
|
25
|
-
code: '\x1b[36m', // Cyan
|
|
26
|
-
suggestion: '\x1b[2m\x1b[37m' // Dim White
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Error Formatter
|
|
30
|
-
*
|
|
31
|
-
* Formats validation issues for console output.
|
|
32
|
-
*/
|
|
33
|
-
export class ErrorFormatter {
|
|
34
|
-
options;
|
|
35
|
-
constructor(options = {}) {
|
|
36
|
-
this.options = {
|
|
37
|
-
colors: options.colors ?? true,
|
|
38
|
-
showSuggestions: options.showSuggestions ?? true,
|
|
39
|
-
showFix: options.showFix ?? true,
|
|
40
|
-
showLearnMore: options.showLearnMore ?? true,
|
|
41
|
-
compact: options.compact ?? false
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Format a complete validation report
|
|
46
|
-
*
|
|
47
|
-
* @param report - Validation report to format
|
|
48
|
-
* @returns Formatted string ready for console output
|
|
49
|
-
*/
|
|
50
|
-
formatReport(report) {
|
|
51
|
-
const lines = [];
|
|
52
|
-
// Header
|
|
53
|
-
lines.push(this.formatHeader(report));
|
|
54
|
-
lines.push('');
|
|
55
|
-
// Summary
|
|
56
|
-
if (!this.options.compact) {
|
|
57
|
-
lines.push(this.formatSummary(report));
|
|
58
|
-
lines.push('');
|
|
59
|
-
}
|
|
60
|
-
// Issues
|
|
61
|
-
if (report.result.errors.length > 0) {
|
|
62
|
-
lines.push(this.color(colors.bold, '━━━ Errors ━━━'));
|
|
63
|
-
lines.push('');
|
|
64
|
-
report.result.errors.forEach(error => {
|
|
65
|
-
lines.push(this.formatIssue(error));
|
|
66
|
-
lines.push('');
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
if (report.result.warnings.length > 0 && !this.options.compact) {
|
|
70
|
-
lines.push(this.color(colors.bold, '━━━ Warnings ━━━'));
|
|
71
|
-
lines.push('');
|
|
72
|
-
report.result.warnings.forEach(warning => {
|
|
73
|
-
lines.push(this.formatIssue(warning));
|
|
74
|
-
lines.push('');
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
if (report.result.info.length > 0 && !this.options.compact) {
|
|
78
|
-
lines.push(this.color(colors.bold, '━━━ Info ━━━'));
|
|
79
|
-
lines.push('');
|
|
80
|
-
report.result.info.forEach(info => {
|
|
81
|
-
lines.push(this.formatIssue(info));
|
|
82
|
-
lines.push('');
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
// Footer
|
|
86
|
-
lines.push(this.formatFooter(report));
|
|
87
|
-
return lines.join('\n');
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Format validation result
|
|
91
|
-
*
|
|
92
|
-
* @param result - Validation result to format
|
|
93
|
-
* @returns Formatted string
|
|
94
|
-
*/
|
|
95
|
-
formatResult(result) {
|
|
96
|
-
const lines = [];
|
|
97
|
-
// Errors
|
|
98
|
-
if (result.errors.length > 0) {
|
|
99
|
-
lines.push(this.color(colors.bold, '━━━ Errors ━━━'));
|
|
100
|
-
lines.push('');
|
|
101
|
-
result.errors.forEach(error => {
|
|
102
|
-
lines.push(this.formatIssue(error));
|
|
103
|
-
lines.push('');
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
// Warnings
|
|
107
|
-
if (result.warnings.length > 0) {
|
|
108
|
-
lines.push(this.color(colors.bold, '━━━ Warnings ━━━'));
|
|
109
|
-
lines.push('');
|
|
110
|
-
result.warnings.forEach(warning => {
|
|
111
|
-
lines.push(this.formatIssue(warning));
|
|
112
|
-
lines.push('');
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
// Info
|
|
116
|
-
if (result.info.length > 0) {
|
|
117
|
-
lines.push(this.color(colors.bold, '━━━ Info ━━━'));
|
|
118
|
-
lines.push('');
|
|
119
|
-
result.info.forEach(info => {
|
|
120
|
-
lines.push(this.formatIssue(info));
|
|
121
|
-
lines.push('');
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
return lines.join('\n');
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Format a single validation issue
|
|
128
|
-
*
|
|
129
|
-
* @param issue - Issue to format
|
|
130
|
-
* @returns Formatted string
|
|
131
|
-
*/
|
|
132
|
-
formatIssue(issue) {
|
|
133
|
-
const lines = [];
|
|
134
|
-
// Icon and title
|
|
135
|
-
const icon = this.getIcon(issue.severity);
|
|
136
|
-
const severityColor = this.getSeverityColor(issue.severity);
|
|
137
|
-
lines.push(`${this.color(severityColor, icon)} ` +
|
|
138
|
-
`${this.color(colors.title, issue.title)} ` +
|
|
139
|
-
`${this.color(colors.dim, `[${issue.code}]`)}`);
|
|
140
|
-
// File location
|
|
141
|
-
if (issue.file) {
|
|
142
|
-
const location = issue.line > 0
|
|
143
|
-
? `${issue.file}:${issue.line}:${issue.column}`
|
|
144
|
-
: issue.file;
|
|
145
|
-
lines.push(` ${this.color(colors.file, location)}`);
|
|
146
|
-
}
|
|
147
|
-
// Message
|
|
148
|
-
lines.push(` ${issue.message}`);
|
|
149
|
-
// Suggestions
|
|
150
|
-
if (this.options.showSuggestions && issue.suggestions && issue.suggestions.length > 0) {
|
|
151
|
-
lines.push('');
|
|
152
|
-
lines.push(this.color(colors.dim, ' Suggestions:'));
|
|
153
|
-
issue.suggestions.forEach(suggestion => {
|
|
154
|
-
lines.push(` ${this.color(colors.suggestion, '• ' + suggestion)}`);
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
// Fix command
|
|
158
|
-
if (this.options.showFix && issue.fix) {
|
|
159
|
-
lines.push('');
|
|
160
|
-
lines.push(this.color(colors.dim, ' Fix:'));
|
|
161
|
-
lines.push(` ${this.color(colors.code, '$ ' + issue.fix)}`);
|
|
162
|
-
}
|
|
163
|
-
// Learn more
|
|
164
|
-
if (this.options.showLearnMore && issue.learnMoreUrl) {
|
|
165
|
-
lines.push('');
|
|
166
|
-
lines.push(` ${this.color(colors.dim, 'Learn more:')} ${this.color(colors.info, issue.learnMoreUrl)}`);
|
|
167
|
-
}
|
|
168
|
-
return lines.join('\n');
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Format header
|
|
172
|
-
*
|
|
173
|
-
* @param report - Validation report
|
|
174
|
-
* @returns Formatted header
|
|
175
|
-
*/
|
|
176
|
-
formatHeader(report) {
|
|
177
|
-
const lines = [];
|
|
178
|
-
if (report.result.valid) {
|
|
179
|
-
lines.push(this.color(colors.success, '✓ Validation Passed'));
|
|
180
|
-
}
|
|
181
|
-
else {
|
|
182
|
-
lines.push(this.color(colors.error, '✗ Validation Failed'));
|
|
183
|
-
}
|
|
184
|
-
return lines.join('\n');
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Format summary
|
|
188
|
-
*
|
|
189
|
-
* @param report - Validation report
|
|
190
|
-
* @returns Formatted summary
|
|
191
|
-
*/
|
|
192
|
-
formatSummary(report) {
|
|
193
|
-
const lines = [];
|
|
194
|
-
const { summary } = report;
|
|
195
|
-
lines.push(this.color(colors.bold, 'Summary:'));
|
|
196
|
-
// Validations
|
|
197
|
-
if (summary.validationsPassed.length > 0) {
|
|
198
|
-
lines.push(` ${this.color(colors.success, '✓')} Passed: ${summary.validationsPassed.join(', ')}`);
|
|
199
|
-
}
|
|
200
|
-
if (summary.validationsFailed.length > 0) {
|
|
201
|
-
lines.push(` ${this.color(colors.error, '✗')} Failed: ${summary.validationsFailed.join(', ')}`);
|
|
202
|
-
}
|
|
203
|
-
// Issue counts
|
|
204
|
-
lines.push('');
|
|
205
|
-
lines.push(this.color(colors.bold, 'Issues:'));
|
|
206
|
-
if (summary.errorCount > 0) {
|
|
207
|
-
lines.push(` ${this.color(colors.error, '✗')} Errors: ${summary.errorCount}`);
|
|
208
|
-
}
|
|
209
|
-
if (summary.warningCount > 0) {
|
|
210
|
-
lines.push(` ${this.color(colors.warning, '⚠')} Warnings: ${summary.warningCount}`);
|
|
211
|
-
}
|
|
212
|
-
if (summary.infoCount > 0) {
|
|
213
|
-
lines.push(` ${this.color(colors.info, 'ℹ')} Info: ${summary.infoCount}`);
|
|
214
|
-
}
|
|
215
|
-
if (summary.totalIssues === 0) {
|
|
216
|
-
lines.push(` ${this.color(colors.success, 'No issues found')}`);
|
|
217
|
-
}
|
|
218
|
-
return lines.join('\n');
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Format footer
|
|
222
|
-
*
|
|
223
|
-
* @param report - Validation report
|
|
224
|
-
* @returns Formatted footer
|
|
225
|
-
*/
|
|
226
|
-
formatFooter(report) {
|
|
227
|
-
const lines = [];
|
|
228
|
-
if (report.result.valid) {
|
|
229
|
-
lines.push(this.color(colors.success, '✓ All validations passed successfully'));
|
|
230
|
-
}
|
|
231
|
-
else {
|
|
232
|
-
lines.push(this.color(colors.error, `✗ Validation failed with ${report.summary.errorCount} error(s)`));
|
|
233
|
-
if (!this.options.compact) {
|
|
234
|
-
lines.push('');
|
|
235
|
-
lines.push(this.color(colors.dim, 'Run with --help for more information'));
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
return lines.join('\n');
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* Get icon for severity
|
|
242
|
-
*
|
|
243
|
-
* @param severity - Issue severity
|
|
244
|
-
* @returns Icon character
|
|
245
|
-
*/
|
|
246
|
-
getIcon(severity) {
|
|
247
|
-
switch (severity) {
|
|
248
|
-
case 'error':
|
|
249
|
-
return '✗';
|
|
250
|
-
case 'warning':
|
|
251
|
-
return '⚠';
|
|
252
|
-
case 'info':
|
|
253
|
-
return 'ℹ';
|
|
254
|
-
default:
|
|
255
|
-
return '•';
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* Get color for severity
|
|
260
|
-
*
|
|
261
|
-
* @param severity - Issue severity
|
|
262
|
-
* @returns ANSI color code
|
|
263
|
-
*/
|
|
264
|
-
getSeverityColor(severity) {
|
|
265
|
-
switch (severity) {
|
|
266
|
-
case 'error':
|
|
267
|
-
return colors.error;
|
|
268
|
-
case 'warning':
|
|
269
|
-
return colors.warning;
|
|
270
|
-
case 'info':
|
|
271
|
-
return colors.info;
|
|
272
|
-
default:
|
|
273
|
-
return colors.reset;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Apply color to text
|
|
278
|
-
*
|
|
279
|
-
* @param colorCode - ANSI color code
|
|
280
|
-
* @param text - Text to color
|
|
281
|
-
* @returns Colored text (or plain text if colors disabled)
|
|
282
|
-
*/
|
|
283
|
-
color(colorCode, text) {
|
|
284
|
-
if (!this.options.colors) {
|
|
285
|
-
return text;
|
|
286
|
-
}
|
|
287
|
-
return `${colorCode}${text}${colors.reset}`;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
//# sourceMappingURL=error-formatter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-formatter.js","sourceRoot":"","sources":["../../src/formatters/error-formatter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH;;GAEG;AACH,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,SAAS;IACf,GAAG,EAAE,SAAS;IAEd,kBAAkB;IAClB,KAAK,EAAE,UAAU,EAAO,MAAM;IAC9B,OAAO,EAAE,UAAU,EAAK,SAAS;IACjC,IAAI,EAAE,UAAU,EAAQ,OAAO;IAC/B,OAAO,EAAE,UAAU,EAAK,QAAQ;IAEhC,iBAAiB;IACjB,KAAK,EAAE,iBAAiB,EAAG,aAAa;IACxC,IAAI,EAAE,UAAU,EAAY,UAAU;IACtC,IAAI,EAAE,UAAU,EAAY,OAAO;IACnC,UAAU,EAAE,iBAAiB,CAAE,YAAY;CAC5C,CAAC;AAsBF;;;;GAIG;AACH,MAAM,OAAO,cAAc;IACjB,OAAO,CAAkC;IAEjD,YAAY,UAAiC,EAAE;QAC7C,IAAI,CAAC,OAAO,GAAG;YACb,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,IAAI;YAC9B,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,IAAI;YAChD,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,IAAI;YAChC,aAAa,EAAE,OAAO,CAAC,aAAa,IAAI,IAAI;YAC5C,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,KAAK;SAClC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,YAAY,CAAC,MAAwB;QACnC,MAAM,KAAK,GAAa,EAAE,CAAC;QAE3B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,CAAC,CAAC,CAAC;YAC7E,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED;;;;;OAKG;IACK,OAAO,CAAC,QAAgB;QAC9B,QAAQ,QAAQ,EAAE,CAAC;YACjB,KAAK,OAAO;gBACV,OAAO,GAAG,CAAC;YACb,KAAK,SAAS;gBACZ,OAAO,GAAG,CAAC;YACb,KAAK,MAAM;gBACT,OAAO,GAAG,CAAC;YACb;gBACE,OAAO,GAAG,CAAC;QACf,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACK,gBAAgB,CAAC,QAAgB;QACvC,QAAQ,QAAQ,EAAE,CAAC;YACjB,KAAK,OAAO;gBACV,OAAO,MAAM,CAAC,KAAK,CAAC;YACtB,KAAK,SAAS;gBACZ,OAAO,MAAM,CAAC,OAAO,CAAC;YACxB,KAAK,MAAM;gBACT,OAAO,MAAM,CAAC,IAAI,CAAC;YACrB;gBACE,OAAO,MAAM,CAAC,KAAK,CAAC;QACxB,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACK,KAAK,CAAC,SAAiB,EAAE,IAAY;QAC3C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;YACzB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;IAC9C,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/formatters/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/formatters/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/formatters/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @specverse/engine-registry
|
|
3
|
-
*
|
|
4
|
-
* Registry client for the SpecVerse community library platform.
|
|
5
|
-
* Provides caching, offline support, manifest validation, and
|
|
6
|
-
* installation validation for the spec registry.
|
|
7
|
-
*/
|
|
8
|
-
export { RegistryClient } from './client/registry-client.js';
|
|
9
|
-
export { CacheManager } from './cache/cache-manager.js';
|
|
10
|
-
export { OfflineHandler } from './offline/offline-handler.js';
|
|
11
|
-
export { Validator } from './validators/validator.js';
|
|
12
|
-
export { ManifestValidator } from './validators/manifest-validator.js';
|
|
13
|
-
export { InstallationValidator } from './validators/installation-validator.js';
|
|
14
|
-
export { ErrorFormatter } from './formatters/error-formatter.js';
|
|
15
|
-
export { manifestConfigToSpecVerseManifest, validateFactoryReferences } from './utils/manifest-adapter.js';
|
|
16
|
-
export type * from './types/index.js';
|
|
17
|
-
export type * from './types/registry.js';
|
|
18
|
-
export type * from './types/validation.js';
|
|
19
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @specverse/engine-registry
|
|
3
|
-
*
|
|
4
|
-
* Registry client for the SpecVerse community library platform.
|
|
5
|
-
* Provides caching, offline support, manifest validation, and
|
|
6
|
-
* installation validation for the spec registry.
|
|
7
|
-
*/
|
|
8
|
-
// Client
|
|
9
|
-
export { RegistryClient } from './client/registry-client.js';
|
|
10
|
-
// Cache
|
|
11
|
-
export { CacheManager } from './cache/cache-manager.js';
|
|
12
|
-
// Offline
|
|
13
|
-
export { OfflineHandler } from './offline/offline-handler.js';
|
|
14
|
-
// Validators
|
|
15
|
-
export { Validator } from './validators/validator.js';
|
|
16
|
-
export { ManifestValidator } from './validators/manifest-validator.js';
|
|
17
|
-
export { InstallationValidator } from './validators/installation-validator.js';
|
|
18
|
-
// Formatters
|
|
19
|
-
export { ErrorFormatter } from './formatters/error-formatter.js';
|
|
20
|
-
// Utils
|
|
21
|
-
export { manifestConfigToSpecVerseManifest, validateFactoryReferences } from './utils/manifest-adapter.js';
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,SAAS;AACT,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,QAAQ;AACR,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,UAAU;AACV,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,aAAa;AACb,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAE/E,aAAa;AACb,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,QAAQ;AACR,OAAO,EAAE,iCAAiC,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Registry Offline Handler
|
|
3
|
-
*
|
|
4
|
-
* Implements cache-first strategy with graceful fallback for offline scenarios.
|
|
5
|
-
* Wraps RegistryClient and CacheManager to provide unified online/offline access.
|
|
6
|
-
*
|
|
7
|
-
* @module registry/offline/offline-handler
|
|
8
|
-
* @version 2.0.0
|
|
9
|
-
*/
|
|
10
|
-
import type { RegistryResponse, RegistryFactoryMetadata, SearchResponse, CapabilitiesResponse, ValidationIssue } from '../types/index.js';
|
|
11
|
-
/**
|
|
12
|
-
* Offline handler configuration
|
|
13
|
-
*/
|
|
14
|
-
export interface OfflineHandlerConfig {
|
|
15
|
-
/** Registry client configuration */
|
|
16
|
-
registryClient?: {
|
|
17
|
-
endpoint?: string;
|
|
18
|
-
timeout?: number;
|
|
19
|
-
retries?: number;
|
|
20
|
-
};
|
|
21
|
-
/** Cache manager configuration */
|
|
22
|
-
cache?: {
|
|
23
|
-
cacheDir?: string;
|
|
24
|
-
ttl?: number;
|
|
25
|
-
enabled?: boolean;
|
|
26
|
-
};
|
|
27
|
-
/** Offline mode - only use cache, never network */
|
|
28
|
-
offlineMode?: boolean;
|
|
29
|
-
/** Allow stale cache as fallback (default: true) */
|
|
30
|
-
allowStaleCache?: boolean;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Fetch result with metadata
|
|
34
|
-
*/
|
|
35
|
-
export interface FetchResult {
|
|
36
|
-
/** Registry response data */
|
|
37
|
-
data: RegistryResponse;
|
|
38
|
-
/** Data source */
|
|
39
|
-
source: 'network' | 'cache-fresh' | 'cache-stale';
|
|
40
|
-
/** Validation issues (warnings about cache staleness, etc.) */
|
|
41
|
-
issues: ValidationIssue[];
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Registry Offline Handler
|
|
45
|
-
*
|
|
46
|
-
* Provides unified access to registry metadata with offline-first strategy:
|
|
47
|
-
* 1. Try to fetch from network
|
|
48
|
-
* 2. If network fails, use fresh cache
|
|
49
|
-
* 3. If no fresh cache, use stale cache as fallback (with warning)
|
|
50
|
-
* 4. If no cache at all, throw error
|
|
51
|
-
*/
|
|
52
|
-
export declare class OfflineHandler {
|
|
53
|
-
private client;
|
|
54
|
-
private cache;
|
|
55
|
-
private config;
|
|
56
|
-
constructor(config?: OfflineHandlerConfig);
|
|
57
|
-
/**
|
|
58
|
-
* Fetch all factories with offline-first strategy
|
|
59
|
-
*
|
|
60
|
-
* @returns Fetch result with data, source, and issues
|
|
61
|
-
*/
|
|
62
|
-
fetchFactories(): Promise<FetchResult>;
|
|
63
|
-
/**
|
|
64
|
-
* Get specific factory by name
|
|
65
|
-
*
|
|
66
|
-
* @param name - Factory name
|
|
67
|
-
* @returns Factory metadata or null if not found
|
|
68
|
-
*/
|
|
69
|
-
getFactory(name: string): Promise<RegistryFactoryMetadata | null>;
|
|
70
|
-
/**
|
|
71
|
-
* Search factories
|
|
72
|
-
*
|
|
73
|
-
* Note: Search functionality requires network access.
|
|
74
|
-
* Falls back to local filtering of cached data when offline.
|
|
75
|
-
*
|
|
76
|
-
* @param query - Search query
|
|
77
|
-
* @returns Search results
|
|
78
|
-
*/
|
|
79
|
-
search(query: string): Promise<SearchResponse>;
|
|
80
|
-
/**
|
|
81
|
-
* Get all capabilities
|
|
82
|
-
*
|
|
83
|
-
* @returns Capabilities response
|
|
84
|
-
*/
|
|
85
|
-
getCapabilities(): Promise<CapabilitiesResponse>;
|
|
86
|
-
/**
|
|
87
|
-
* Check if registry is accessible
|
|
88
|
-
*
|
|
89
|
-
* @returns True if network access is available
|
|
90
|
-
*/
|
|
91
|
-
checkHealth(): Promise<boolean>;
|
|
92
|
-
/**
|
|
93
|
-
* Clear cache
|
|
94
|
-
*/
|
|
95
|
-
clearCache(): Promise<void>;
|
|
96
|
-
/**
|
|
97
|
-
* Get cache status
|
|
98
|
-
*
|
|
99
|
-
* @returns Cache status information
|
|
100
|
-
*/
|
|
101
|
-
getCacheStatus(): Promise<{
|
|
102
|
-
exists: boolean;
|
|
103
|
-
valid: boolean;
|
|
104
|
-
age?: number;
|
|
105
|
-
timeToExpiration?: number;
|
|
106
|
-
createdAt?: string;
|
|
107
|
-
expiresAt?: string;
|
|
108
|
-
}>;
|
|
109
|
-
/**
|
|
110
|
-
* Get registry client endpoint
|
|
111
|
-
*
|
|
112
|
-
* @returns Registry endpoint URL
|
|
113
|
-
*/
|
|
114
|
-
getEndpoint(): string;
|
|
115
|
-
/**
|
|
116
|
-
* Get cache file path
|
|
117
|
-
*
|
|
118
|
-
* @returns Absolute path to cache file
|
|
119
|
-
*/
|
|
120
|
-
getCacheFile(): string;
|
|
121
|
-
/**
|
|
122
|
-
* Enable offline mode
|
|
123
|
-
*/
|
|
124
|
-
enableOfflineMode(): void;
|
|
125
|
-
/**
|
|
126
|
-
* Disable offline mode
|
|
127
|
-
*/
|
|
128
|
-
disableOfflineMode(): void;
|
|
129
|
-
/**
|
|
130
|
-
* Check if offline mode is enabled
|
|
131
|
-
*
|
|
132
|
-
* @returns True if offline mode is enabled
|
|
133
|
-
*/
|
|
134
|
-
isOfflineMode(): boolean;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Offline error
|
|
138
|
-
*
|
|
139
|
-
* Thrown when registry data is unavailable both from network and cache.
|
|
140
|
-
*/
|
|
141
|
-
export declare class OfflineError extends Error {
|
|
142
|
-
code: string;
|
|
143
|
-
issues: ValidationIssue[];
|
|
144
|
-
constructor(message: string, code: string, issues: ValidationIssue[]);
|
|
145
|
-
/**
|
|
146
|
-
* Get user-friendly error message
|
|
147
|
-
*/
|
|
148
|
-
getUserMessage(): string;
|
|
149
|
-
}
|
|
150
|
-
//# sourceMappingURL=offline-handler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"offline-handler.d.ts","sourceRoot":"","sources":["../../src/offline/offline-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,oBAAoB,EACpB,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAO3B;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,oCAAoC;IACpC,cAAc,CAAC,EAAE;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IAEF,kCAAkC;IAClC,KAAK,CAAC,EAAE;QACN,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,GAAG,CAAC,EAAE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