glost-registry 0.5.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/LICENSE +21 -0
- package/README.md +283 -0
- package/dist/discovery.d.ts +146 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +262 -0
- package/dist/discovery.js.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/registry.d.ts +193 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +466 -0
- package/dist/registry.js.map +1 -0
- package/dist/types.d.ts +208 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +9 -0
- package/dist/types.js.map +1 -0
- package/dist/validation.d.ts +53 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +204 -0
- package/dist/validation.js.map +1 -0
- package/package.json +45 -0
- package/src/discovery.ts +315 -0
- package/src/index.ts +50 -0
- package/src/registry.ts +557 -0
- package/src/types.ts +275 -0
- package/src/validation.ts +240 -0
package/dist/registry.js
ADDED
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enhanced Plugin Registry
|
|
3
|
+
*
|
|
4
|
+
* Plugin registry with discovery, metadata, and validation capabilities.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Enhanced Plugin Registry
|
|
10
|
+
*
|
|
11
|
+
* Manages plugin metadata, discovery, validation, and conflict detection.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import { PluginRegistry } from "glost-registry";
|
|
16
|
+
*
|
|
17
|
+
* const registry = new PluginRegistry();
|
|
18
|
+
*
|
|
19
|
+
* registry.register(myPlugin, {
|
|
20
|
+
* version: "1.0.0",
|
|
21
|
+
* category: "enhancer",
|
|
22
|
+
* tags: ["transcription", "ipa"]
|
|
23
|
+
* });
|
|
24
|
+
*
|
|
25
|
+
* const plugins = registry.search({ language: "th" });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export class PluginRegistry {
|
|
29
|
+
plugins = new Map();
|
|
30
|
+
extensions = new Map();
|
|
31
|
+
/**
|
|
32
|
+
* Register a plugin with metadata
|
|
33
|
+
*
|
|
34
|
+
* @param extension - The plugin extension
|
|
35
|
+
* @param metadata - Plugin metadata
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* registry.register(myExtension, {
|
|
40
|
+
* version: "1.0.0",
|
|
41
|
+
* description: "Adds transcription support",
|
|
42
|
+
* category: "enhancer",
|
|
43
|
+
* tags: ["transcription"],
|
|
44
|
+
* supports: {
|
|
45
|
+
* languages: ["th", "ja"],
|
|
46
|
+
* async: true
|
|
47
|
+
* }
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
register(extension, metadata) {
|
|
52
|
+
const pluginMetadata = {
|
|
53
|
+
...metadata,
|
|
54
|
+
id: extension.id,
|
|
55
|
+
name: extension.name,
|
|
56
|
+
description: extension.description || metadata.description,
|
|
57
|
+
registeredAt: new Date(),
|
|
58
|
+
};
|
|
59
|
+
if (this.plugins.has(extension.id)) {
|
|
60
|
+
console.warn(`Plugin "${extension.id}" is already registered. Overwriting.`);
|
|
61
|
+
}
|
|
62
|
+
this.plugins.set(extension.id, pluginMetadata);
|
|
63
|
+
this.extensions.set(extension.id, extension);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Get plugin metadata
|
|
67
|
+
*
|
|
68
|
+
* @param pluginId - Plugin ID
|
|
69
|
+
* @returns Plugin metadata or undefined
|
|
70
|
+
*/
|
|
71
|
+
getMetadata(pluginId) {
|
|
72
|
+
return this.plugins.get(pluginId);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Get plugin extension
|
|
76
|
+
*
|
|
77
|
+
* @param pluginId - Plugin ID
|
|
78
|
+
* @returns Plugin extension or undefined
|
|
79
|
+
*/
|
|
80
|
+
getExtension(pluginId) {
|
|
81
|
+
return this.extensions.get(pluginId);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* List all plugins
|
|
85
|
+
*
|
|
86
|
+
* @returns Array of all plugin metadata
|
|
87
|
+
*/
|
|
88
|
+
list() {
|
|
89
|
+
return Array.from(this.plugins.values());
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Search for plugins
|
|
93
|
+
*
|
|
94
|
+
* @param query - Search query
|
|
95
|
+
* @returns Array of matching plugin metadata
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```typescript
|
|
99
|
+
* // Search by keyword
|
|
100
|
+
* const results = registry.search({ keyword: "transcription" });
|
|
101
|
+
*
|
|
102
|
+
* // Filter by category
|
|
103
|
+
* const enhancers = registry.search({ category: "enhancer" });
|
|
104
|
+
*
|
|
105
|
+
* // Filter by language
|
|
106
|
+
* const thaiPlugins = registry.search({ language: "th" });
|
|
107
|
+
*
|
|
108
|
+
* // Multiple filters
|
|
109
|
+
* const results = registry.search({
|
|
110
|
+
* category: "enhancer",
|
|
111
|
+
* language: "th",
|
|
112
|
+
* tags: ["transcription"]
|
|
113
|
+
* });
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
search(query) {
|
|
117
|
+
let results = this.list();
|
|
118
|
+
// Filter by keyword
|
|
119
|
+
if (query.keyword) {
|
|
120
|
+
const keyword = query.keyword.toLowerCase();
|
|
121
|
+
results = results.filter((plugin) => {
|
|
122
|
+
return (plugin.name.toLowerCase().includes(keyword) ||
|
|
123
|
+
plugin.description.toLowerCase().includes(keyword) ||
|
|
124
|
+
plugin.tags.some((tag) => tag.toLowerCase().includes(keyword)));
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
// Filter by category
|
|
128
|
+
if (query.category) {
|
|
129
|
+
results = results.filter((plugin) => plugin.category === query.category);
|
|
130
|
+
}
|
|
131
|
+
// Filter by language
|
|
132
|
+
if (query.language) {
|
|
133
|
+
results = results.filter((plugin) => {
|
|
134
|
+
return (!plugin.supports.languages ||
|
|
135
|
+
plugin.supports.languages.includes(query.language));
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
// Filter by tags
|
|
139
|
+
if (query.tags && query.tags.length > 0) {
|
|
140
|
+
results = results.filter((plugin) => {
|
|
141
|
+
return query.tags.some((tag) => plugin.tags.includes(tag));
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
// Filter by author
|
|
145
|
+
if (query.author) {
|
|
146
|
+
results = results.filter((plugin) => plugin.author === query.author);
|
|
147
|
+
}
|
|
148
|
+
// Filter by capability
|
|
149
|
+
if (query.capability) {
|
|
150
|
+
results = results.filter((plugin) => {
|
|
151
|
+
return plugin.supports.custom?.[query.capability] === true;
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
return results;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Get plugins by category
|
|
158
|
+
*
|
|
159
|
+
* @param category - Plugin category
|
|
160
|
+
* @returns Array of plugin metadata
|
|
161
|
+
*/
|
|
162
|
+
getByCategory(category) {
|
|
163
|
+
return this.list().filter((plugin) => plugin.category === category);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Get plugins that support a language
|
|
167
|
+
*
|
|
168
|
+
* @param language - Language code
|
|
169
|
+
* @returns Array of plugin metadata
|
|
170
|
+
*/
|
|
171
|
+
getLanguageSupport(language) {
|
|
172
|
+
return this.list().filter((plugin) => {
|
|
173
|
+
return (!plugin.supports.languages ||
|
|
174
|
+
plugin.supports.languages.includes(language));
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Check if a plugin supports a language
|
|
179
|
+
*
|
|
180
|
+
* @param pluginId - Plugin ID
|
|
181
|
+
* @param language - Language code
|
|
182
|
+
* @returns True if supported
|
|
183
|
+
*/
|
|
184
|
+
isLanguageSupported(pluginId, language) {
|
|
185
|
+
const metadata = this.getMetadata(pluginId);
|
|
186
|
+
if (!metadata) {
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
return (!metadata.supports.languages ||
|
|
190
|
+
metadata.supports.languages.includes(language));
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Check plugin compatibility
|
|
194
|
+
*
|
|
195
|
+
* @param pluginId - Plugin ID
|
|
196
|
+
* @param version - Version to check (semver)
|
|
197
|
+
* @returns True if compatible
|
|
198
|
+
*/
|
|
199
|
+
isCompatible(pluginId, version) {
|
|
200
|
+
const metadata = this.getMetadata(pluginId);
|
|
201
|
+
if (!metadata) {
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
// Simple version check (could use semver library for proper range checking)
|
|
205
|
+
return metadata.version === version || metadata.version >= version;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Check for conflicts between plugins
|
|
209
|
+
*
|
|
210
|
+
* @param pluginIds - Plugin IDs to check
|
|
211
|
+
* @returns Conflict report
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* ```typescript
|
|
215
|
+
* const report = registry.checkConflicts(["plugin1", "plugin2", "plugin3"]);
|
|
216
|
+
* if (report.hasConflicts) {
|
|
217
|
+
* for (const conflict of report.conflicts) {
|
|
218
|
+
* console.error(`Conflict: ${conflict.plugin1} <-> ${conflict.plugin2}`);
|
|
219
|
+
* console.error(`Reason: ${conflict.reason}`);
|
|
220
|
+
* }
|
|
221
|
+
* }
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
checkConflicts(pluginIds) {
|
|
225
|
+
const conflicts = [];
|
|
226
|
+
for (let i = 0; i < pluginIds.length; i++) {
|
|
227
|
+
const pluginId1 = pluginIds[i];
|
|
228
|
+
const metadata1 = this.getMetadata(pluginId1);
|
|
229
|
+
if (!metadata1) {
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
232
|
+
for (let j = i + 1; j < pluginIds.length; j++) {
|
|
233
|
+
const pluginId2 = pluginIds[j];
|
|
234
|
+
const metadata2 = this.getMetadata(pluginId2);
|
|
235
|
+
if (!metadata2) {
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
// Check explicit conflicts
|
|
239
|
+
if (metadata1.conflicts?.includes(pluginId2)) {
|
|
240
|
+
conflicts.push({
|
|
241
|
+
plugin1: pluginId1,
|
|
242
|
+
plugin2: pluginId2,
|
|
243
|
+
reason: `${pluginId1} declares conflict with ${pluginId2}`,
|
|
244
|
+
severity: "error",
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
if (metadata2.conflicts?.includes(pluginId1)) {
|
|
248
|
+
conflicts.push({
|
|
249
|
+
plugin1: pluginId2,
|
|
250
|
+
plugin2: pluginId1,
|
|
251
|
+
reason: `${pluginId2} declares conflict with ${pluginId1}`,
|
|
252
|
+
severity: "error",
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
// Check for field ownership conflicts
|
|
256
|
+
const ext1 = this.getExtension(pluginId1);
|
|
257
|
+
const ext2 = this.getExtension(pluginId2);
|
|
258
|
+
if (ext1?.provides?.extras && ext2?.provides?.extras) {
|
|
259
|
+
const sharedFields = ext1.provides.extras.filter((field) => ext2.provides.extras.includes(field));
|
|
260
|
+
if (sharedFields.length > 0) {
|
|
261
|
+
conflicts.push({
|
|
262
|
+
plugin1: pluginId1,
|
|
263
|
+
plugin2: pluginId2,
|
|
264
|
+
reason: `Both plugins provide the same fields: ${sharedFields.join(", ")}`,
|
|
265
|
+
severity: "warning",
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return {
|
|
272
|
+
hasConflicts: conflicts.length > 0,
|
|
273
|
+
conflicts,
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Resolve dependencies for plugins
|
|
278
|
+
*
|
|
279
|
+
* @param pluginIds - Plugin IDs to resolve
|
|
280
|
+
* @returns Array of plugin IDs in dependency order
|
|
281
|
+
* @throws {Error} If circular dependencies detected or plugin not found
|
|
282
|
+
*/
|
|
283
|
+
resolveDependencies(pluginIds) {
|
|
284
|
+
const resolved = [];
|
|
285
|
+
const visited = new Set();
|
|
286
|
+
const visiting = new Set();
|
|
287
|
+
const visit = (id) => {
|
|
288
|
+
if (visiting.has(id)) {
|
|
289
|
+
throw new Error(`Circular dependency detected involving plugin: ${id}`);
|
|
290
|
+
}
|
|
291
|
+
if (visited.has(id)) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
const extension = this.getExtension(id);
|
|
295
|
+
if (!extension) {
|
|
296
|
+
throw new Error(`Plugin "${id}" not found in registry`);
|
|
297
|
+
}
|
|
298
|
+
visiting.add(id);
|
|
299
|
+
// Visit dependencies first
|
|
300
|
+
if (extension.dependencies) {
|
|
301
|
+
for (const depId of extension.dependencies) {
|
|
302
|
+
if (!pluginIds.includes(depId)) {
|
|
303
|
+
// Dependency not in the list, skip
|
|
304
|
+
continue;
|
|
305
|
+
}
|
|
306
|
+
visit(depId);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
visiting.delete(id);
|
|
310
|
+
visited.add(id);
|
|
311
|
+
resolved.push(id);
|
|
312
|
+
};
|
|
313
|
+
for (const id of pluginIds) {
|
|
314
|
+
visit(id);
|
|
315
|
+
}
|
|
316
|
+
return resolved;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Validate a plugin configuration
|
|
320
|
+
*
|
|
321
|
+
* @param pluginId - Plugin ID
|
|
322
|
+
* @param options - Plugin options to validate
|
|
323
|
+
* @returns Validation result
|
|
324
|
+
*/
|
|
325
|
+
validate(pluginId, options) {
|
|
326
|
+
const metadata = this.getMetadata(pluginId);
|
|
327
|
+
const errors = [];
|
|
328
|
+
const warnings = [];
|
|
329
|
+
if (!metadata) {
|
|
330
|
+
errors.push({
|
|
331
|
+
plugin: pluginId,
|
|
332
|
+
message: `Plugin "${pluginId}" not found in registry`,
|
|
333
|
+
code: "PLUGIN_NOT_FOUND",
|
|
334
|
+
});
|
|
335
|
+
return { valid: false, errors, warnings };
|
|
336
|
+
}
|
|
337
|
+
// Validate options against schema
|
|
338
|
+
if (metadata.options && options) {
|
|
339
|
+
const schema = metadata.options;
|
|
340
|
+
// Check required properties
|
|
341
|
+
if (schema.required) {
|
|
342
|
+
for (const required of schema.required) {
|
|
343
|
+
if (!(required in options)) {
|
|
344
|
+
errors.push({
|
|
345
|
+
plugin: pluginId,
|
|
346
|
+
message: `Required option "${required}" is missing`,
|
|
347
|
+
code: "MISSING_REQUIRED_OPTION",
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
// Check property types (basic validation)
|
|
353
|
+
if (schema.properties) {
|
|
354
|
+
for (const [key, value] of Object.entries(options)) {
|
|
355
|
+
const propSchema = schema.properties[key];
|
|
356
|
+
if (!propSchema) {
|
|
357
|
+
if (!schema.additionalProperties) {
|
|
358
|
+
warnings.push({
|
|
359
|
+
plugin: pluginId,
|
|
360
|
+
message: `Unknown option "${key}"`,
|
|
361
|
+
code: "UNKNOWN_OPTION",
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
continue;
|
|
365
|
+
}
|
|
366
|
+
const actualType = typeof value;
|
|
367
|
+
const expectedType = propSchema.type;
|
|
368
|
+
if (actualType !== expectedType &&
|
|
369
|
+
!(expectedType === "array" && Array.isArray(value))) {
|
|
370
|
+
errors.push({
|
|
371
|
+
plugin: pluginId,
|
|
372
|
+
message: `Option "${key}" should be ${expectedType}, got ${actualType}`,
|
|
373
|
+
code: "INVALID_OPTION_TYPE",
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
// Check requirements
|
|
380
|
+
if (metadata.requires?.glostVersion) {
|
|
381
|
+
// Could check against actual glost version
|
|
382
|
+
// For now, just emit a warning
|
|
383
|
+
warnings.push({
|
|
384
|
+
plugin: pluginId,
|
|
385
|
+
message: `Plugin requires GLOST version ${metadata.requires.glostVersion}`,
|
|
386
|
+
code: "VERSION_REQUIREMENT",
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
return {
|
|
390
|
+
valid: errors.length === 0,
|
|
391
|
+
errors,
|
|
392
|
+
warnings,
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Get registry statistics
|
|
397
|
+
*
|
|
398
|
+
* @returns Registry statistics
|
|
399
|
+
*/
|
|
400
|
+
getStatistics() {
|
|
401
|
+
const plugins = this.list();
|
|
402
|
+
const byCategory = {
|
|
403
|
+
transformer: 0,
|
|
404
|
+
enhancer: 0,
|
|
405
|
+
generator: 0,
|
|
406
|
+
analyzer: 0,
|
|
407
|
+
utility: 0,
|
|
408
|
+
};
|
|
409
|
+
const byLanguage = {};
|
|
410
|
+
const tagCounts = {};
|
|
411
|
+
for (const plugin of plugins) {
|
|
412
|
+
byCategory[plugin.category]++;
|
|
413
|
+
if (plugin.supports.languages) {
|
|
414
|
+
for (const lang of plugin.supports.languages) {
|
|
415
|
+
byLanguage[lang] = (byLanguage[lang] || 0) + 1;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
for (const tag of plugin.tags) {
|
|
419
|
+
tagCounts[tag] = (tagCounts[tag] || 0) + 1;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
const topTags = Object.entries(tagCounts)
|
|
423
|
+
.sort((a, b) => b[1] - a[1])
|
|
424
|
+
.slice(0, 10)
|
|
425
|
+
.map(([tag, count]) => ({ tag, count }));
|
|
426
|
+
return {
|
|
427
|
+
total: plugins.length,
|
|
428
|
+
byCategory,
|
|
429
|
+
byLanguage,
|
|
430
|
+
topTags,
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Check if a plugin is registered
|
|
435
|
+
*
|
|
436
|
+
* @param pluginId - Plugin ID
|
|
437
|
+
* @returns True if registered
|
|
438
|
+
*/
|
|
439
|
+
has(pluginId) {
|
|
440
|
+
return this.plugins.has(pluginId);
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Unregister a plugin
|
|
444
|
+
*
|
|
445
|
+
* @param pluginId - Plugin ID
|
|
446
|
+
* @returns True if unregistered
|
|
447
|
+
*/
|
|
448
|
+
unregister(pluginId) {
|
|
449
|
+
const hasPlugin = this.plugins.has(pluginId);
|
|
450
|
+
this.plugins.delete(pluginId);
|
|
451
|
+
this.extensions.delete(pluginId);
|
|
452
|
+
return hasPlugin;
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Clear all plugins
|
|
456
|
+
*/
|
|
457
|
+
clear() {
|
|
458
|
+
this.plugins.clear();
|
|
459
|
+
this.extensions.clear();
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Global plugin registry instance
|
|
464
|
+
*/
|
|
465
|
+
export const pluginRegistry = new PluginRegistry();
|
|
466
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAeH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,cAAc;IACjB,OAAO,GAAG,IAAI,GAAG,EAA0B,CAAC;IAC5C,UAAU,GAAG,IAAI,GAAG,EAA0B,CAAC;IAEvD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CACN,SAAyB,EACzB,QAA6C;QAE7C,MAAM,cAAc,GAAmB;YACrC,GAAG,QAAQ;YACX,EAAE,EAAE,SAAS,CAAC,EAAE;YAChB,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,WAAW,EAAE,SAAS,CAAC,WAAW,IAAI,QAAQ,CAAC,WAAW;YAC1D,YAAY,EAAE,IAAI,IAAI,EAAE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AAQ,CAAC,CAAC;QACjC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACrB,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Registry Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the enhanced plugin registry.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Plugin category
|
|
10
|
+
*/
|
|
11
|
+
export type PluginCategory = "transformer" | "enhancer" | "generator" | "analyzer" | "utility";
|
|
12
|
+
/**
|
|
13
|
+
* Plugin metadata
|
|
14
|
+
*
|
|
15
|
+
* Extended metadata for plugins beyond the basic extension interface.
|
|
16
|
+
*/
|
|
17
|
+
export interface PluginMetadata {
|
|
18
|
+
/** Unique plugin identifier */
|
|
19
|
+
id: string;
|
|
20
|
+
/** Human-readable name */
|
|
21
|
+
name: string;
|
|
22
|
+
/** Plugin version (semver) */
|
|
23
|
+
version: string;
|
|
24
|
+
/** Description of what the plugin does */
|
|
25
|
+
description: string;
|
|
26
|
+
/** Plugin author */
|
|
27
|
+
author?: string;
|
|
28
|
+
/** Plugin repository URL */
|
|
29
|
+
repository?: string;
|
|
30
|
+
/** Plugin homepage/documentation URL */
|
|
31
|
+
homepage?: string;
|
|
32
|
+
/** Plugin category */
|
|
33
|
+
category: PluginCategory;
|
|
34
|
+
/** Tags for searching/filtering */
|
|
35
|
+
tags: string[];
|
|
36
|
+
/** Plugin capabilities */
|
|
37
|
+
supports: PluginCapabilities;
|
|
38
|
+
/** Dependencies */
|
|
39
|
+
requires?: PluginRequirements;
|
|
40
|
+
/** Conflicting plugins */
|
|
41
|
+
conflicts?: string[];
|
|
42
|
+
/** Configuration options schema */
|
|
43
|
+
options?: PluginOptionsSchema;
|
|
44
|
+
/** Usage examples */
|
|
45
|
+
examples?: PluginExample[];
|
|
46
|
+
/** When the plugin was registered */
|
|
47
|
+
registeredAt?: Date;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Plugin capabilities
|
|
51
|
+
*/
|
|
52
|
+
export interface PluginCapabilities {
|
|
53
|
+
/** Supported language codes */
|
|
54
|
+
languages?: string[];
|
|
55
|
+
/** Supported node types */
|
|
56
|
+
nodeTypes?: string[];
|
|
57
|
+
/** Whether the plugin supports async operations */
|
|
58
|
+
async: boolean;
|
|
59
|
+
/** Whether the plugin can run in parallel with others */
|
|
60
|
+
parallel?: boolean;
|
|
61
|
+
/** Custom capabilities */
|
|
62
|
+
custom?: Record<string, any>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Plugin requirements
|
|
66
|
+
*/
|
|
67
|
+
export interface PluginRequirements {
|
|
68
|
+
/** Required plugins (IDs) */
|
|
69
|
+
plugins?: string[];
|
|
70
|
+
/** Required GLOST version (semver range) */
|
|
71
|
+
glostVersion?: string;
|
|
72
|
+
/** Required Node.js version (semver range) */
|
|
73
|
+
nodeVersion?: string;
|
|
74
|
+
/** Custom requirements */
|
|
75
|
+
custom?: Record<string, any>;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Plugin options schema
|
|
79
|
+
*/
|
|
80
|
+
export interface PluginOptionsSchema {
|
|
81
|
+
/** Schema type */
|
|
82
|
+
type: "object";
|
|
83
|
+
/** Properties definition */
|
|
84
|
+
properties?: Record<string, PropertySchema>;
|
|
85
|
+
/** Required properties */
|
|
86
|
+
required?: string[];
|
|
87
|
+
/** Allow additional properties */
|
|
88
|
+
additionalProperties?: boolean;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Property schema
|
|
92
|
+
*/
|
|
93
|
+
export interface PropertySchema {
|
|
94
|
+
/** Property type */
|
|
95
|
+
type: "string" | "number" | "boolean" | "array" | "object";
|
|
96
|
+
/** Property description */
|
|
97
|
+
description?: string;
|
|
98
|
+
/** Default value */
|
|
99
|
+
default?: any;
|
|
100
|
+
/** Enum values */
|
|
101
|
+
enum?: any[];
|
|
102
|
+
/** Array items schema */
|
|
103
|
+
items?: PropertySchema;
|
|
104
|
+
/** Object properties schema */
|
|
105
|
+
properties?: Record<string, PropertySchema>;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Plugin example
|
|
109
|
+
*/
|
|
110
|
+
export interface PluginExample {
|
|
111
|
+
/** Example title */
|
|
112
|
+
title: string;
|
|
113
|
+
/** Example description */
|
|
114
|
+
description?: string;
|
|
115
|
+
/** Example code */
|
|
116
|
+
code: string;
|
|
117
|
+
/** Expected output description */
|
|
118
|
+
output?: string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Plugin query for searching
|
|
122
|
+
*/
|
|
123
|
+
export interface PluginQuery {
|
|
124
|
+
/** Search by keyword */
|
|
125
|
+
keyword?: string;
|
|
126
|
+
/** Filter by category */
|
|
127
|
+
category?: PluginCategory;
|
|
128
|
+
/** Filter by language support */
|
|
129
|
+
language?: string;
|
|
130
|
+
/** Filter by tags */
|
|
131
|
+
tags?: string[];
|
|
132
|
+
/** Filter by author */
|
|
133
|
+
author?: string;
|
|
134
|
+
/** Filter by capability */
|
|
135
|
+
capability?: string;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Conflict report
|
|
139
|
+
*/
|
|
140
|
+
export interface ConflictReport {
|
|
141
|
+
/** Whether conflicts were found */
|
|
142
|
+
hasConflicts: boolean;
|
|
143
|
+
/** Conflict details */
|
|
144
|
+
conflicts: PluginConflict[];
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Plugin conflict
|
|
148
|
+
*/
|
|
149
|
+
export interface PluginConflict {
|
|
150
|
+
/** First plugin in conflict */
|
|
151
|
+
plugin1: string;
|
|
152
|
+
/** Second plugin in conflict */
|
|
153
|
+
plugin2: string;
|
|
154
|
+
/** Conflict reason */
|
|
155
|
+
reason: string;
|
|
156
|
+
/** Conflict severity */
|
|
157
|
+
severity: "error" | "warning";
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Validation result
|
|
161
|
+
*/
|
|
162
|
+
export interface ValidationResult {
|
|
163
|
+
/** Whether validation passed */
|
|
164
|
+
valid: boolean;
|
|
165
|
+
/** Validation errors */
|
|
166
|
+
errors: ValidationError[];
|
|
167
|
+
/** Validation warnings */
|
|
168
|
+
warnings: ValidationWarning[];
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Validation error
|
|
172
|
+
*/
|
|
173
|
+
export interface ValidationError {
|
|
174
|
+
/** Plugin ID */
|
|
175
|
+
plugin: string;
|
|
176
|
+
/** Error message */
|
|
177
|
+
message: string;
|
|
178
|
+
/** Error code */
|
|
179
|
+
code: string;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Validation warning
|
|
183
|
+
*/
|
|
184
|
+
export interface ValidationWarning {
|
|
185
|
+
/** Plugin ID */
|
|
186
|
+
plugin: string;
|
|
187
|
+
/** Warning message */
|
|
188
|
+
message: string;
|
|
189
|
+
/** Warning code */
|
|
190
|
+
code: string;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Registry statistics
|
|
194
|
+
*/
|
|
195
|
+
export interface RegistryStatistics {
|
|
196
|
+
/** Total number of plugins */
|
|
197
|
+
total: number;
|
|
198
|
+
/** Plugins by category */
|
|
199
|
+
byCategory: Record<PluginCategory, number>;
|
|
200
|
+
/** Plugins by language */
|
|
201
|
+
byLanguage: Record<string, number>;
|
|
202
|
+
/** Most popular tags */
|
|
203
|
+
topTags: Array<{
|
|
204
|
+
tag: string;
|
|
205
|
+
count: number;
|
|
206
|
+
}>;
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=types.d.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