@fjell/registry 4.4.6 → 4.4.9

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.
Files changed (54) hide show
  1. package/README.md +81 -4
  2. package/dist/Registry.cjs +20 -1
  3. package/dist/Registry.js +20 -1
  4. package/dist/RegistryHub.cjs +17 -1
  5. package/dist/RegistryHub.js +17 -1
  6. package/dist/index.cjs +35 -0
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/types.d.ts +15 -0
  9. package/docs/README.md +74 -0
  10. package/docs/index.html +17 -0
  11. package/docs/memory-data/scaling-10-instances.json +206 -206
  12. package/docs/memory-data/scaling-100-instances.json +206 -206
  13. package/docs/memory-data/scaling-1000-instances.json +108 -108
  14. package/docs/memory-data/scaling-10000-instances.json +49 -49
  15. package/docs/memory-data/scaling-20-instances.json +208 -208
  16. package/docs/memory-data/scaling-200-instances.json +201 -201
  17. package/docs/memory-data/scaling-2000-instances.json +107 -107
  18. package/docs/memory-data/scaling-50-instances.json +206 -206
  19. package/docs/memory-data/scaling-500-instances.json +108 -108
  20. package/docs/memory-data/scaling-5000-instances.json +49 -49
  21. package/docs/memory-overhead.svg +17 -17
  22. package/docs/memory.md +111 -111
  23. package/docs/package.json +35 -0
  24. package/docs/public/README.md +623 -0
  25. package/docs/public/TIMING_NODE_OPTIMIZATION.md +207 -0
  26. package/docs/public/examples/coordinates-example.ts +253 -0
  27. package/docs/public/examples/multi-level-keys.ts +374 -0
  28. package/docs/public/examples/registry-hub-coordinates-example.ts +370 -0
  29. package/docs/public/examples/registry-hub-types.ts +437 -0
  30. package/docs/public/examples/simple-example.ts +250 -0
  31. package/docs/public/examples-README.md +222 -0
  32. package/docs/public/fjell-icon.svg +1 -0
  33. package/docs/public/icon.png +0 -0
  34. package/docs/public/icon2.png +0 -0
  35. package/docs/public/memory-overhead.svg +120 -0
  36. package/docs/public/memory.md +430 -0
  37. package/docs/public/pano.png +0 -0
  38. package/docs/public/pano2.png +0 -0
  39. package/docs/public/timing-range.svg +176 -0
  40. package/docs/public/timing.md +483 -0
  41. package/docs/src/App.css +1175 -0
  42. package/docs/src/App.test.tsx +50 -0
  43. package/docs/src/App.tsx +583 -0
  44. package/docs/src/index.css +40 -0
  45. package/docs/src/main.tsx +10 -0
  46. package/docs/src/test/setup.ts +1 -0
  47. package/docs/timing-range.svg +41 -41
  48. package/docs/timing.md +101 -101
  49. package/docs/tsconfig.node.json +13 -0
  50. package/docs/vitest.config.ts +14 -0
  51. package/examples/README.md +35 -0
  52. package/examples/coordinates-example.ts +253 -0
  53. package/examples/registry-hub-coordinates-example.ts +370 -0
  54. package/package.json +2 -2
package/README.md CHANGED
@@ -41,6 +41,7 @@ interface Registry {
41
41
  createInstance: <...>(...) => Instance<...>;
42
42
  register: (...) => void; // Deprecated
43
43
  get: (...) => Instance | null;
44
+ getCoordinates: () => Coordinate[]; // Discover all registered coordinates
44
45
  instanceTree: InstanceTree;
45
46
  }
46
47
 
@@ -65,6 +66,7 @@ interface RegistryHub {
65
66
  get: (type: string, kta: string[], options?: { scopes?: string[] }) => Instance | null;
66
67
  getRegistry: (type: string) => Registry | null;
67
68
  getRegisteredTypes: () => string[];
69
+ getAllCoordinates: () => CoordinateWithRegistry[]; // Discover coordinates across all registries
68
70
  unregisterRegistry: (type: string) => boolean;
69
71
  }
70
72
  ```
@@ -184,6 +186,44 @@ const specificRegistry = hub.getRegistry('services');
184
186
  hub.unregisterRegistry('cache'); // Remove if needed
185
187
  ```
186
188
 
189
+ ### 2a. **RegistryHub: Cross-Registry Coordinate Discovery** ✅
190
+ ```typescript
191
+ // Discover all coordinates across ALL registries in the hub
192
+ const allCoordinates = hub.getAllCoordinates();
193
+ console.log(`Found ${allCoordinates.length} total services`);
194
+
195
+ // Each coordinate includes its registry type
196
+ allCoordinates.forEach(({ coordinate, registryType }) => {
197
+ console.log(`${registryType}: ${coordinate.kta.join('.')} [${coordinate.scopes.join(', ')}]`);
198
+ });
199
+
200
+ // Group coordinates by registry type for analysis
201
+ const byRegistry = allCoordinates.reduce((acc, item) => {
202
+ if (!acc[item.registryType]) acc[item.registryType] = [];
203
+ acc[item.registryType].push(item.coordinate);
204
+ return acc;
205
+ }, {} as Record<string, Coordinate[]>);
206
+
207
+ // Environment-based analysis across all registries
208
+ const productionServices = allCoordinates.filter(c =>
209
+ c.coordinate.scopes.includes('production')
210
+ );
211
+ const productionByRegistry = productionServices.reduce((acc, c) => {
212
+ acc[c.registryType] = (acc[c.registryType] || 0) + 1;
213
+ return acc;
214
+ }, {} as Record<string, number>);
215
+
216
+ console.log('Production services by registry:', productionByRegistry);
217
+ // Output: { services: 2, data: 3, cache: 1 }
218
+ ```
219
+
220
+ **Use Cases for hub.getAllCoordinates():**
221
+ - **System-Wide Health Monitoring**: Check services across all registry domains
222
+ - **Architecture Analysis**: Understand service distribution across domains
223
+ - **Environment Validation**: Ensure complete deployment across all registry types
224
+ - **Cross-Registry Dependencies**: Map service relationships between domains
225
+ - **Documentation Generation**: Auto-generate complete system catalogs
226
+
187
227
  ### 3. Multiple Implementations with Scopes
188
228
  ```typescript
189
229
  const registry = createRegistry('data');
@@ -258,7 +298,42 @@ registry.register(['User'], userService, { scopes: ['firestore'] });
258
298
  // Use registry.createInstance() instead! ✅
259
299
  ```
260
300
 
261
- ### 7. Cascade Pattern
301
+ ### 7. Coordinate Discovery with getCoordinates()
302
+ The Registry provides introspection capabilities to discover all registered instances:
303
+ ```typescript
304
+ const registry = createRegistry('services');
305
+
306
+ // Register various services
307
+ registry.createInstance(['User'], ['firestore'], userFirestoreFactory);
308
+ registry.createInstance(['User'], ['postgresql'], userPostgresFactory);
309
+ registry.createInstance(['Cache', 'Redis'], ['production'], redisFactory);
310
+ registry.createInstance(['Cache', 'Memory'], ['development'], memoryFactory);
311
+
312
+ // Discover all registered coordinates
313
+ const coordinates = registry.getCoordinates();
314
+ console.log(`Found ${coordinates.length} registered services`);
315
+
316
+ // Analyze registration patterns
317
+ coordinates.forEach(coord => {
318
+ console.log(`Service: ${coord.kta.join('.')} | Scopes: ${coord.scopes.join(', ')}`);
319
+ });
320
+
321
+ // Group by environment for health checks
322
+ const productionServices = coordinates.filter(c => c.scopes.includes('production'));
323
+ const developmentServices = coordinates.filter(c => c.scopes.includes('development'));
324
+
325
+ // Service discovery - find all cache implementations
326
+ const cacheServices = coordinates.filter(c => c.kta.includes('Cache'));
327
+ ```
328
+
329
+ **Use Cases for getCoordinates():**
330
+ - **Health Monitoring**: Verify all expected services are registered
331
+ - **Development Tools**: Debug service registration in development
332
+ - **Service Discovery**: Find available implementations at runtime
333
+ - **Environment Validation**: Ensure proper scope configuration
334
+ - **Documentation Generation**: Auto-generate service catalogs
335
+
336
+ ### 8. Cascade Pattern
262
337
  The Registry enables automatic service discovery:
263
338
  ```typescript
264
339
  // System receives an item and automatically finds the right service
@@ -385,9 +460,11 @@ hub.registerRegistry(createClientApiRegistry()); // → 'fjell-client-api'
385
460
  3. **Contextual Scoping**: Environment-aware service selection
386
461
  4. **Hierarchical Organization**: Natural type hierarchy support
387
462
  5. **Dependency Injection**: Clean separation of configuration and usage
388
- 6. **Self-Documenting Registries**: Registry type is built-in, no external tracking needed
389
- 7. **Cross-Registry Access**: Unified interface for accessing instances across multiple registries
390
- 8. **Error Prevention**: Impossible to register a registry under the wrong type
463
+ 6. **Service Introspection**: Discover all registered coordinates with `getCoordinates()`
464
+ 7. **Cross-Registry Discovery**: System-wide coordinate discovery with `getAllCoordinates()`
465
+ 8. **Self-Documenting Registries**: Registry type is built-in, no external tracking needed
466
+ 9. **Cross-Registry Access**: Unified interface for accessing instances across multiple registries
467
+ 10. **Error Prevention**: Impossible to register a registry under the wrong type
391
468
 
392
469
  ## Migration Strategy
393
470
 
package/dist/Registry.cjs CHANGED
@@ -115,16 +115,35 @@ const createRegistry = (type, registryHub)=>{
115
115
  }
116
116
  return null;
117
117
  };
118
+ const getCoordinates = ()=>{
119
+ const coordinates = [];
120
+ const traverseTree = (node)=>{
121
+ for(const keyType in node){
122
+ const treeNode = node[keyType];
123
+ // Collect coordinates from instances at this level
124
+ for (const scopedInstance of treeNode.instances){
125
+ coordinates.push(scopedInstance.instance.coordinate);
126
+ }
127
+ // Recursively traverse children if they exist
128
+ if (treeNode.children) {
129
+ traverseTree(treeNode.children);
130
+ }
131
+ }
132
+ };
133
+ traverseTree(instanceTree);
134
+ return coordinates;
135
+ };
118
136
  const registry = {
119
137
  type,
120
138
  registryHub,
121
139
  createInstance,
122
140
  register,
123
141
  get,
142
+ getCoordinates,
124
143
  instanceTree
125
144
  };
126
145
  return registry;
127
146
  };
128
147
 
129
148
  exports.createRegistry = createRegistry;
130
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVnaXN0cnkuY2pzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
149
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVnaXN0cnkuY2pzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=
package/dist/Registry.js CHANGED
@@ -111,16 +111,35 @@ const createRegistry = (type, registryHub)=>{
111
111
  }
112
112
  return null;
113
113
  };
114
+ const getCoordinates = ()=>{
115
+ const coordinates = [];
116
+ const traverseTree = (node)=>{
117
+ for(const keyType in node){
118
+ const treeNode = node[keyType];
119
+ // Collect coordinates from instances at this level
120
+ for (const scopedInstance of treeNode.instances){
121
+ coordinates.push(scopedInstance.instance.coordinate);
122
+ }
123
+ // Recursively traverse children if they exist
124
+ if (treeNode.children) {
125
+ traverseTree(treeNode.children);
126
+ }
127
+ }
128
+ };
129
+ traverseTree(instanceTree);
130
+ return coordinates;
131
+ };
114
132
  const registry = {
115
133
  type,
116
134
  registryHub,
117
135
  createInstance,
118
136
  register,
119
137
  get,
138
+ getCoordinates,
120
139
  instanceTree
121
140
  };
122
141
  return registry;
123
142
  };
124
143
 
125
144
  export { createRegistry };
126
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVnaXN0cnkuanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=
145
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVnaXN0cnkuanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9
@@ -63,16 +63,32 @@ const createRegistryHub = ()=>{
63
63
  }
64
64
  return false;
65
65
  };
66
+ const getAllCoordinates = ()=>{
67
+ const allCoordinates = [];
68
+ for(const registryType in registries){
69
+ const registry = registries[registryType];
70
+ const coordinates = registry.getCoordinates();
71
+ coordinates.forEach((coordinate)=>{
72
+ allCoordinates.push({
73
+ coordinate,
74
+ registryType
75
+ });
76
+ });
77
+ }
78
+ logger.debug(`Retrieved ${allCoordinates.length} total coordinates from ${Object.keys(registries).length} registries`);
79
+ return allCoordinates;
80
+ };
66
81
  const hub = {
67
82
  createRegistry,
68
83
  registerRegistry,
69
84
  get,
70
85
  getRegistry,
71
86
  getRegisteredTypes,
87
+ getAllCoordinates,
72
88
  unregisterRegistry
73
89
  };
74
90
  return hub;
75
91
  };
76
92
 
77
93
  exports.createRegistryHub = createRegistryHub;
78
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVnaXN0cnlIdWIuY2pzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9
94
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVnaXN0cnlIdWIuY2pzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
@@ -59,16 +59,32 @@ const createRegistryHub = ()=>{
59
59
  }
60
60
  return false;
61
61
  };
62
+ const getAllCoordinates = ()=>{
63
+ const allCoordinates = [];
64
+ for(const registryType in registries){
65
+ const registry = registries[registryType];
66
+ const coordinates = registry.getCoordinates();
67
+ coordinates.forEach((coordinate)=>{
68
+ allCoordinates.push({
69
+ coordinate,
70
+ registryType
71
+ });
72
+ });
73
+ }
74
+ logger.debug(`Retrieved ${allCoordinates.length} total coordinates from ${Object.keys(registries).length} registries`);
75
+ return allCoordinates;
76
+ };
62
77
  const hub = {
63
78
  createRegistry,
64
79
  registerRegistry,
65
80
  get,
66
81
  getRegistry,
67
82
  getRegisteredTypes,
83
+ getAllCoordinates,
68
84
  unregisterRegistry
69
85
  };
70
86
  return hub;
71
87
  };
72
88
 
73
89
  export { createRegistryHub };
74
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVnaXN0cnlIdWIuanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
90
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVnaXN0cnlIdWIuanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=
package/dist/index.cjs CHANGED
@@ -154,12 +154,31 @@ const createRegistry = (type, registryHub)=>{
154
154
  }
155
155
  return null;
156
156
  };
157
+ const getCoordinates = ()=>{
158
+ const coordinates = [];
159
+ const traverseTree = (node)=>{
160
+ for(const keyType in node){
161
+ const treeNode = node[keyType];
162
+ // Collect coordinates from instances at this level
163
+ for (const scopedInstance of treeNode.instances){
164
+ coordinates.push(scopedInstance.instance.coordinate);
165
+ }
166
+ // Recursively traverse children if they exist
167
+ if (treeNode.children) {
168
+ traverseTree(treeNode.children);
169
+ }
170
+ }
171
+ };
172
+ traverseTree(instanceTree);
173
+ return coordinates;
174
+ };
157
175
  const registry = {
158
176
  type,
159
177
  registryHub,
160
178
  createInstance,
161
179
  register,
162
180
  get,
181
+ getCoordinates,
163
182
  instanceTree
164
183
  };
165
184
  return registry;
@@ -376,12 +395,28 @@ const createRegistryHub = ()=>{
376
395
  }
377
396
  return false;
378
397
  };
398
+ const getAllCoordinates = ()=>{
399
+ const allCoordinates = [];
400
+ for(const registryType in registries){
401
+ const registry = registries[registryType];
402
+ const coordinates = registry.getCoordinates();
403
+ coordinates.forEach((coordinate)=>{
404
+ allCoordinates.push({
405
+ coordinate,
406
+ registryType
407
+ });
408
+ });
409
+ }
410
+ logger.debug(`Retrieved ${allCoordinates.length} total coordinates from ${Object.keys(registries).length} registries`);
411
+ return allCoordinates;
412
+ };
379
413
  const hub = {
380
414
  createRegistry,
381
415
  registerRegistry,
382
416
  get,
383
417
  getRegistry,
384
418
  getRegisteredTypes,
419
+ getAllCoordinates,
385
420
  unregisterRegistry
386
421
  };
387
422
  return hub;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/types.d.ts CHANGED
@@ -1,5 +1,12 @@
1
1
  import { Instance } from './Instance';
2
2
  import { Coordinate } from './Coordinate';
3
+ /**
4
+ * Represents a coordinate along with information about which registry contains it.
5
+ */
6
+ export interface CoordinateWithRegistry {
7
+ coordinate: Coordinate<any, any | never, any | never, any | never, any | never, any | never>;
8
+ registryType: string;
9
+ }
3
10
  /**
4
11
  * The RegistryHub interface provides a higher-level registry that manages multiple Registry instances.
5
12
  */
@@ -26,6 +33,10 @@ export interface RegistryHub {
26
33
  * Lists all registered type keys.
27
34
  */
28
35
  readonly getRegisteredTypes: () => string[];
36
+ /**
37
+ * Retrieves all coordinates from all registered registries along with their registry type information.
38
+ */
39
+ readonly getAllCoordinates: () => CoordinateWithRegistry[];
29
40
  /**
30
41
  * Removes a registry from the hub.
31
42
  */
@@ -87,4 +98,8 @@ export interface Registry {
87
98
  }) => Instance<any, any | never, any | never, any | never, any | never, any | never> | null;
88
99
  /** The tree structure representing the hierarchy of instances */
89
100
  instanceTree: InstanceTree;
101
+ /**
102
+ * Retrieves all coordinates currently registered in the registry.
103
+ */
104
+ getCoordinates: () => Coordinate<any, any | never, any | never, any | never, any | never, any | never>[];
90
105
  }
package/docs/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # Fjell Registry Documentation Site
2
+
3
+ This is a React-based documentation site for the Fjell Registry package. It provides an interactive and modern way to view the project documentation with syntax highlighting and responsive design.
4
+
5
+ ## Features
6
+
7
+ - 📱 **Responsive Design** - Works on desktop, tablet, and mobile
8
+ - 🎨 **Modern UI** - Clean, modern interface with Fjell branding
9
+ - 🔍 **Syntax Highlighting** - Code blocks with proper syntax highlighting
10
+ - 📖 **Markdown Support** - Full GitHub Flavored Markdown support
11
+ - 🚀 **Fast Loading** - Built with Vite for optimal performance
12
+
13
+ ## Development
14
+
15
+ ### Prerequisites
16
+
17
+ - Node.js 22+
18
+ - pnpm
19
+
20
+ ### Local Development
21
+
22
+ ```bash
23
+ # Install dependencies
24
+ pnpm install
25
+
26
+ # Start development server
27
+ pnpm run dev
28
+
29
+ # Build for production
30
+ pnpm run build
31
+
32
+ # Preview production build
33
+ pnpm run preview
34
+ ```
35
+
36
+ ### Testing
37
+
38
+ ```bash
39
+ # Run tests
40
+ pnpm run test
41
+
42
+ # Run tests in watch mode
43
+ pnpm run test:watch
44
+ ```
45
+
46
+ ## Deployment
47
+
48
+ The site is automatically deployed to GitHub Pages when changes are pushed to the main branch or any release branch. The deployment is handled by the `.github/workflows/deploy-docs.yml` workflow.
49
+
50
+ ## Architecture
51
+
52
+ - **React 19** - Modern React with hooks
53
+ - **TypeScript** - Full type safety
54
+ - **Vite** - Fast build tool and dev server
55
+ - **React Markdown** - Renders README.md dynamically
56
+ - **React Syntax Highlighter** - Beautiful code syntax highlighting
57
+ - **Vitest** - Fast unit testing framework
58
+
59
+ ## Configuration
60
+
61
+ The site is configured to:
62
+ - Fetch the main README.md from the project root
63
+ - Use the `/fjell-registry/` base path for GitHub Pages
64
+ - Support dark theme code highlighting
65
+ - Include responsive breakpoints for mobile devices
66
+
67
+ ## Contributing
68
+
69
+ The documentation site automatically reflects changes to the main README.md file. To update the site itself:
70
+
71
+ 1. Make changes to the React components in `src/`
72
+ 2. Test locally with `pnpm run dev`
73
+ 3. Commit your changes
74
+ 4. The site will automatically deploy via GitHub Actions
@@ -0,0 +1,17 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <link rel="icon" type="image/svg+xml" href="/fjell-icon.svg" />
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
+ <title>🏔️ Fjell Registry - TypeScript Registry Library</title>
9
+ <meta name="description" content="Common Registry for Fjell - A powerful TypeScript registry system">
10
+ </head>
11
+
12
+ <body>
13
+ <div id="root"></div>
14
+ <script type="module" src="/src/main.tsx"></script>
15
+ </body>
16
+
17
+ </html>