@fjell/registry 4.4.16 → 4.4.20

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 (61) hide show
  1. package/build.js +4 -0
  2. package/dist/Coordinate.d.ts +2 -1
  3. package/dist/Coordinate.d.ts.map +1 -0
  4. package/dist/Instance.d.ts +3 -2
  5. package/dist/Instance.d.ts.map +1 -0
  6. package/dist/Registry.d.ts +1 -0
  7. package/dist/Registry.d.ts.map +1 -0
  8. package/dist/RegistryHub.d.ts +1 -0
  9. package/dist/RegistryHub.d.ts.map +1 -0
  10. package/dist/RegistryStats.d.ts +3 -1
  11. package/dist/RegistryStats.d.ts.map +1 -0
  12. package/dist/errors/CoordinateError.d.ts +1 -0
  13. package/dist/errors/CoordinateError.d.ts.map +1 -0
  14. package/dist/errors/InstanceError.d.ts +1 -0
  15. package/dist/errors/InstanceError.d.ts.map +1 -0
  16. package/dist/errors/RegistryError.d.ts +1 -0
  17. package/dist/errors/RegistryError.d.ts.map +1 -0
  18. package/dist/errors/RegistryHubError.d.ts +1 -0
  19. package/dist/errors/RegistryHubError.d.ts.map +1 -0
  20. package/dist/errors/index.d.ts +1 -0
  21. package/dist/errors/index.d.ts.map +1 -0
  22. package/dist/index.d.ts +1 -0
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.js +685 -10
  25. package/dist/index.js.map +7 -0
  26. package/dist/logger.d.ts +2 -1
  27. package/dist/logger.d.ts.map +1 -0
  28. package/dist/types.d.ts +6 -4
  29. package/dist/types.d.ts.map +1 -0
  30. package/docs/docs.config.ts +1 -32
  31. package/docs/package-lock.json +5129 -0
  32. package/docs/package.json +2 -2
  33. package/docs/src/types.d.ts +13 -5
  34. package/docs/timing-range.svg +172 -0
  35. package/examples/multi-level-keys.ts +10 -2
  36. package/package.json +21 -33
  37. package/tsconfig.docs.json +28 -0
  38. package/vitest.config.ts +17 -0
  39. package/MIGRATION_SUMMARY.md +0 -200
  40. package/dist/Coordinate.cjs +0 -32
  41. package/dist/Coordinate.js +0 -28
  42. package/dist/Instance.cjs +0 -24
  43. package/dist/Instance.js +0 -19
  44. package/dist/Registry.cjs +0 -182
  45. package/dist/Registry.js +0 -178
  46. package/dist/RegistryHub.cjs +0 -94
  47. package/dist/RegistryHub.js +0 -90
  48. package/dist/RegistryStats.cjs +0 -200
  49. package/dist/RegistryStats.js +0 -196
  50. package/dist/errors/CoordinateError.cjs +0 -70
  51. package/dist/errors/CoordinateError.js +0 -63
  52. package/dist/errors/InstanceError.cjs +0 -101
  53. package/dist/errors/InstanceError.js +0 -92
  54. package/dist/errors/RegistryError.cjs +0 -82
  55. package/dist/errors/RegistryError.js +0 -75
  56. package/dist/errors/RegistryHubError.cjs +0 -92
  57. package/dist/errors/RegistryHubError.js +0 -84
  58. package/dist/index.cjs +0 -823
  59. package/dist/index.cjs.map +0 -1
  60. package/dist/logger.cjs +0 -10
  61. package/dist/logger.js +0 -6
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/logger.ts", "../src/Coordinate.ts", "../src/Instance.ts", "../src/RegistryStats.ts", "../src/Registry.ts", "../src/errors/RegistryError.ts", "../src/errors/RegistryHubError.ts", "../src/RegistryHub.ts", "../src/errors/InstanceError.ts", "../src/errors/CoordinateError.ts"],
4
+ "sourcesContent": ["import Logging from '@fjell/logging';\n\nconst LibLogger = Logging.getLogger('@fjell/registry');\n\nexport default LibLogger;\n", "import { ItemTypeArray } from \"@fjell/core\";\n\nimport LibLogger from \"@/logger\";\n\nconst logger = LibLogger.get(\"Coordinate\");\n\nexport interface Coordinate<\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never,\n> {\n kta: ItemTypeArray<S, L1, L2, L3, L4, L5>;\n scopes: string[];\n toString: () => string;\n}\n\nexport const createCoordinate = <\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never,\n>(kta: ItemTypeArray<S, L1, L2, L3, L4, L5> | S, scopes: string[] = []): Coordinate<S, L1, L2, L3, L4, L5> => {\n const ktArray = Array.isArray(kta) ? kta : [kta];\n const toString = () => {\n logger.debug(\"toString\", { kta, scopes });\n return `${ktArray.join(', ')} - ${scopes.join(', ')}`;\n }\n logger.debug(\"createCoordinate\", { kta: ktArray, scopes, toString });\n return { kta: ktArray as ItemTypeArray<S, L1, L2, L3, L4, L5>, scopes, toString };\n}", "/* eslint-disable no-undefined */\n/* eslint-disable indent */\nimport LibLogger from \"@/logger\";\nimport { Registry } from \"./Registry\";\nimport { Coordinate } from \"./Coordinate\";\n\nconst logger = LibLogger.get(\"Instance\");\n\n/**\n * The Instance interface represents a data model instance that provides access to both its structure\n * and operations. It serves as the main interface for interacting with data models in the system.\n *\n * The interface consists of two main components:\n * 1. definition: Defines the structure, keys, and relationships of the data model\n * 2. operations: Provides methods for interacting with the data model (get, find, all, etc.)\n * 3. registry: Manages the registration and lookup of Library instances\n *\n * The Instance interface is generic and supports up to 5 levels of location hierarchy (L1-L5)\n * for contained instances, allowing for complex nested data structures.\n *\n * @template V - The type of the data model item, extending Item\n * @template S - The string literal type representing the model's key type\n * @template L1-L5 - Optional string literal types for location hierarchy levels\n */\nexport interface Instance<\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never\n> {\n coordinate: Coordinate<S, L1, L2, L3, L4, L5>;\n\n /** The registry object that manages the registration and lookup of model instances */\n registry: Registry;\n}\n\nexport const createInstance = <\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never\n>(\n registry: Registry,\n coordinate: Coordinate<S, L1, L2, L3, L4, L5>,\n): Instance<S, L1, L2, L3, L4, L5> => {\n logger.debug(\"createInstance\", { coordinate, registry });\n return { coordinate, registry };\n}\n\nexport const isInstance = (instance: any): instance is Instance<any, any, any, any, any, any> => {\n return instance !== null &&\n instance !== undefined &&\n instance.coordinate !== undefined &&\n instance.registry !== undefined;\n}", "import { AllItemTypeArrays } from '@fjell/core';\n\n/**\n * Represents a service client (another service making the request)\n */\nexport interface ServiceClient {\n /** The type of registry where the calling service is registered */\n registryType: string;\n /** The coordinate of the calling service */\n coordinate: {\n kta: string[];\n scopes: string[];\n };\n}\n\n/**\n * Represents either a service or application client\n */\nexport type ClientIdentifier = ServiceClient | string;\n\n/**\n * Represents a specific coordinate call with both kta and scopes\n */\nexport interface CoordinateCallRecord {\n /** The key type array that was requested */\n kta: string[];\n /** The scopes that were requested (empty array if no scopes) */\n scopes: string[];\n /** Number of times this exact combination was called */\n count: number;\n /** Breakdown of calls by client */\n clientCalls: ClientCallRecord[];\n}\n\n/**\n * Represents calls from a specific client\n */\nexport interface ClientCallRecord {\n /** The client that made the calls */\n client: ClientIdentifier;\n /** Number of calls from this client */\n count: number;\n}\n\n/**\n * Statistics about Registry get() method calls with detailed coordinate tracking\n */\nexport interface RegistryStatistics {\n /** Total number of get() calls made on this registry */\n totalGetCalls: number;\n /** Detailed records of each unique coordinate combination and their call counts */\n coordinateCallRecords: CoordinateCallRecord[];\n /** Summary of calls by client type */\n clientSummary: {\n /** Total calls from services (service-to-service) */\n serviceCalls: number;\n /** Total calls from applications (direct application calls) */\n applicationCalls: number;\n /** Total calls with no client specified */\n unidentifiedCalls: number;\n };\n}\n\n/**\n * Internal class for tracking Registry statistics with complex coordinate combinations and client tracking\n */\nexport class RegistryStats {\n private totalCalls = 0;\n // Map structure: ktaKey -> scopeKey -> clientKey -> count\n private coordinateCalls = new Map<string, Map<string, Map<string, number>>>();\n\n /**\n * Records a get() call for the specified coordinate and client\n */\n recordGetCall<\n S extends string = any,\n L1 extends string = any | never,\n L2 extends string = any | never,\n L3 extends string = any | never,\n L4 extends string = any | never,\n L5 extends string = any | never,\n >(kta: AllItemTypeArrays<S, L1, L2, L3, L4, L5>, scopes?: string[], client?: ClientIdentifier): void {\n this.totalCalls++;\n\n const ktaKey = kta.join('.');\n const scopeKey = this.createScopeKey(scopes || []);\n const clientKey = this.createClientKey(client);\n\n if (!this.coordinateCalls.has(ktaKey)) {\n this.coordinateCalls.set(ktaKey, new Map());\n }\n\n const scopeMap = this.coordinateCalls.get(ktaKey)!;\n if (!scopeMap.has(scopeKey)) {\n scopeMap.set(scopeKey, new Map());\n }\n\n const clientMap = scopeMap.get(scopeKey)!;\n const currentCount = clientMap.get(clientKey) || 0;\n clientMap.set(clientKey, currentCount + 1);\n }\n\n /**\n * Gets the current statistics snapshot\n */\n getStatistics(): RegistryStatistics {\n const coordinateCallRecords: CoordinateCallRecord[] = [];\n let serviceCalls = 0;\n let applicationCalls = 0;\n let unidentifiedCalls = 0;\n\n for (const [ktaKey, scopeMap] of this.coordinateCalls) {\n for (const [scopeKey, clientMap] of scopeMap) {\n const clientCalls: ClientCallRecord[] = [];\n let totalCount = 0;\n\n for (const [clientKey, count] of clientMap) {\n const client = this.parseClientKey(clientKey);\n if (client !== null) {\n clientCalls.push({ client, count });\n }\n totalCount += count;\n\n // Update client summary\n if (clientKey === '__no_client__') {\n unidentifiedCalls += count;\n } else if (typeof client === 'string') {\n applicationCalls += count;\n } else if (client !== null) {\n serviceCalls += count;\n }\n }\n\n coordinateCallRecords.push({\n kta: ktaKey.split('.'),\n scopes: this.parseScopeKey(scopeKey),\n count: totalCount,\n clientCalls: [...clientCalls] // Return a copy\n });\n }\n }\n\n return {\n totalGetCalls: this.totalCalls,\n coordinateCallRecords: [...coordinateCallRecords], // Return a copy\n clientSummary: {\n serviceCalls,\n applicationCalls,\n unidentifiedCalls\n }\n };\n }\n\n /**\n * Gets call count for a specific coordinate combination\n */\n getCallCount(kta: string[], scopes?: string[]): number {\n const ktaKey = kta.join('.');\n const scopeKey = this.createScopeKey(scopes || []);\n\n const scopeMap = this.coordinateCalls.get(ktaKey);\n if (!scopeMap) return 0;\n\n const clientMap = scopeMap.get(scopeKey);\n if (!clientMap) return 0;\n\n let total = 0;\n for (const count of clientMap.values()) {\n total += count;\n }\n return total;\n }\n\n /**\n * Gets call count for a specific coordinate combination from a specific client\n */\n getCallCountByClient(kta: string[], scopes?: string[], client?: ClientIdentifier): number {\n const ktaKey = kta.join('.');\n const scopeKey = this.createScopeKey(scopes || []);\n const clientKey = this.createClientKey(client);\n\n const scopeMap = this.coordinateCalls.get(ktaKey);\n if (!scopeMap) return 0;\n\n const clientMap = scopeMap.get(scopeKey);\n if (!clientMap) return 0;\n\n return clientMap.get(clientKey) || 0;\n }\n\n /**\n * Gets total calls for a specific kta (across all scopes)\n */\n getTotalCallsForKta(kta: string[]): number {\n const ktaKey = kta.join('.');\n const scopeMap = this.coordinateCalls.get(ktaKey);\n if (!scopeMap) return 0;\n\n let total = 0;\n for (const clientMap of scopeMap.values()) {\n for (const count of clientMap.values()) {\n total += count;\n }\n }\n return total;\n }\n\n /**\n * Gets all unique kta paths that have been called\n */\n getCalledKtaPaths(): string[][] {\n const ktaPaths: string[][] = [];\n for (const ktaKey of this.coordinateCalls.keys()) {\n ktaPaths.push(ktaKey.split('.'));\n }\n return ktaPaths;\n }\n\n /**\n * Creates a normalized scope key from scopes array\n */\n private createScopeKey(scopes: string[]): string {\n if (scopes.length === 0) return '__no_scopes__';\n return [...scopes].sort().join(',');\n }\n\n /**\n * Parses a scope key back to scopes array\n */\n private parseScopeKey(scopeKey: string): string[] {\n if (scopeKey === '__no_scopes__') return [];\n return scopeKey.split(',');\n }\n\n /**\n * Creates a normalized client key from client identifier\n */\n private createClientKey(client?: ClientIdentifier): string {\n if (!client) return '__no_client__';\n\n if (typeof client === 'string') {\n return `app:${client}`;\n }\n\n // Service client\n const coordKey = `${client.coordinate.kta.join('.')};${this.createScopeKey(client.coordinate.scopes)}`;\n return `service:${client.registryType}:${coordKey}`;\n }\n\n /**\n * Parses a client key back to client identifier\n */\n private parseClientKey(clientKey: string): ClientIdentifier | null {\n if (clientKey === '__no_client__') return null;\n\n if (clientKey.startsWith('app:')) {\n return clientKey.substring(4);\n }\n\n if (clientKey.startsWith('service:')) {\n const parts = clientKey.substring(8).split(':');\n if (parts.length !== 2) return null;\n\n const registryType = parts[0];\n const coordParts = parts[1].split(';');\n if (coordParts.length !== 2) return null;\n\n const kta = coordParts[0].split('.');\n const scopes = this.parseScopeKey(coordParts[1]);\n\n return {\n registryType,\n coordinate: { kta, scopes }\n };\n }\n\n return null;\n }\n}\n", "/* eslint-disable indent */\nimport LibLogger from '@/logger';\nimport { Instance, isInstance } from './Instance';\nimport { Coordinate, createCoordinate } from './Coordinate';\nimport { AllItemTypeArrays } from '@fjell/core';\nimport {\n InstanceFactory,\n InstanceTree,\n Registry,\n RegistryHub,\n ScopedInstance\n} from './types';\nimport { ClientIdentifier, RegistryStatistics, RegistryStats, ServiceClient } from './RegistryStats';\n\n// Re-export types for backward compatibility\nexport type { Registry, RegistryHub, InstanceFactory, RegistryFactory } from './types';\n\nconst logger = LibLogger.get(\"Registry\");\n\nconst findScopedInstance = (\n scopedInstances: ScopedInstance[],\n requestedScopes?: string[],\n\n): Instance<any, any | never, any | never, any | never, any | never, any | never> => {\n if (!requestedScopes || requestedScopes.length === 0) {\n // Return first instance if no scopes specified\n const firstInstance = scopedInstances[0]?.instance;\n if (!firstInstance) {\n throw new Error('No instances available');\n }\n return firstInstance;\n }\n\n // Find instance that matches all requested scopes\n const matchingInstance = scopedInstances.find(scopedInstance => {\n if (!scopedInstance.scopes) return false;\n return requestedScopes.every(scope =>\n scopedInstance.scopes && scopedInstance.scopes.includes(scope)\n );\n });\n\n if (!matchingInstance) {\n throw new Error(`No instance found matching scopes: ${requestedScopes.join(', ')}`);\n }\n\n return matchingInstance.instance;\n}\n\nexport const createRegistry = (type: string, registryHub?: RegistryHub): Registry => {\n const instanceTree: InstanceTree = {};\n\n // Statistics tracking\n const registryStats = new RegistryStats();\n\n /**\n * Creates a proxied Registry that automatically injects client information for service-to-service calls\n */\n const createProxiedRegistry = (callingCoordinate: Coordinate<any, any | never, any | never, any | never, any | never, any | never>): Registry => {\n const serviceClient: ServiceClient = {\n registryType: type,\n coordinate: {\n kta: callingCoordinate.kta,\n scopes: callingCoordinate.scopes\n }\n };\n\n return {\n ...registry,\n get: <\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never,\n >(kta: AllItemTypeArrays<S, L1, L2, L3, L4, L5>, options?: { scopes?: string[]; client?: ClientIdentifier }): Instance<S, L1, L2, L3, L4, L5> | null => {\n // Automatically inject the calling service as the client if no client is specified\n const clientToUse = options?.client || serviceClient;\n return registry.get(kta, { ...options, client: clientToUse });\n }\n };\n };\n\n const createInstance = <\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never,\n >(\n kta: AllItemTypeArrays<S, L1, L2, L3, L4, L5>,\n scopes: string[],\n factory: InstanceFactory<S, L1, L2, L3, L4, L5>\n ): Instance<S, L1, L2, L3, L4, L5> => {\n logger.debug(`Creating and registering instance for key path and scopes`, kta, scopes, `in registry type: ${type}`);\n\n // Create coordinate for the instance\n const coordinate = createCoordinate(kta as any, scopes);\n\n // Create a proxied registry that automatically tracks this service as the client\n const proxiedRegistry = createProxiedRegistry(coordinate);\n\n // Use factory to create the instance with the proxied registry\n const instance = factory(coordinate, {\n registry: proxiedRegistry,\n registryHub,\n });\n\n // Validate the created instance\n if (!isInstance(instance)) {\n throw new Error(`Factory did not return a valid instance for: ${kta.join('.')}`);\n }\n\n // Register the instance\n registerInternal(kta, instance, { scopes });\n\n return instance;\n };\n\n const registerInternal = <\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never,\n >(kta: AllItemTypeArrays<S, L1, L2, L3, L4, L5>, instance: Instance<S, L1, L2, L3, L4, L5>, options?: { scopes?: string[] }): void => {\n const keyPath = [...kta].reverse(); // Work from most specific to least specific\n let currentLevel = instanceTree;\n\n logger.debug(`Registering instance for key path and scopes`, keyPath, options?.scopes, `in registry type: ${type}`);\n\n if (!isInstance(instance)) {\n throw new Error(`Attempting to register a non-instance: ${kta.join('.')}`);\n }\n\n // Navigate to the correct location in the tree\n for (let i = 0; i < keyPath.length; i++) {\n const keyType = keyPath[i];\n const isLeaf = i === keyPath.length - 1;\n\n if (!currentLevel[keyType]) {\n currentLevel[keyType] = {\n instances: [],\n children: isLeaf ? null : {}\n };\n }\n\n if (isLeaf) {\n // Add instance to the leaf node\n currentLevel[keyType].instances.push({\n scopes: options?.scopes,\n instance\n });\n } else {\n // Navigate deeper into the tree\n if (!currentLevel[keyType].children) {\n currentLevel[keyType].children = {};\n }\n currentLevel = currentLevel[keyType].children!;\n }\n }\n };\n\n const register = <\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never,\n >(kta: AllItemTypeArrays<S, L1, L2, L3, L4, L5>, instance: Instance<S, L1, L2, L3, L4, L5>, options?: { scopes?: string[] }): void => {\n logger.debug('Using deprecated register method. Consider using createInstance instead.');\n registerInternal(kta, instance, options);\n };\n\n const get = <\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never,\n >(kta: AllItemTypeArrays<S, L1, L2, L3, L4, L5>, options?: { scopes?: string[]; client?: ClientIdentifier }): Instance<S, L1, L2, L3, L4, L5> | null => {\n // Track statistics with kta, scopes, and client\n registryStats.recordGetCall(kta, options?.scopes, options?.client);\n\n const keyPath = [...kta].reverse();\n let currentLevel = instanceTree;\n\n // Navigate to the target node\n for (let i = 0; i < keyPath.length; i++) {\n const keyType = keyPath[i];\n const isLeaf = i === keyPath.length - 1;\n\n if (!currentLevel[keyType]) {\n throw new Error(`Instance not found for key path: ${kta.join('.')}, Missing key: ${keyType}`);\n }\n\n if (isLeaf) {\n // Found the target node, extract instance\n const scopedInstances = currentLevel[keyType].instances;\n\n if (scopedInstances.length === 0) {\n throw new Error(`No instances registered for key path: ${kta.join('.')}`);\n }\n\n return findScopedInstance(scopedInstances, options?.scopes);\n } else {\n // Continue navigation\n if (!currentLevel[keyType].children) {\n throw new Error(`Instance not found for key path: ${kta.join('.')}, No children for: ${keyType}`);\n }\n currentLevel = currentLevel[keyType].children!;\n }\n }\n\n return null;\n };\n\n const getCoordinates = (): Coordinate<any, any | never, any | never, any | never, any | never, any | never>[] => {\n const coordinates: Coordinate<any, any | never, any | never, any | never, any | never, any | never>[] = [];\n\n const traverseTree = (node: InstanceTree): void => {\n for (const keyType in node) {\n const treeNode = node[keyType];\n\n // Collect coordinates from instances at this level\n for (const scopedInstance of treeNode.instances) {\n coordinates.push(scopedInstance.instance.coordinate);\n }\n\n // Recursively traverse children if they exist\n if (treeNode.children) {\n traverseTree(treeNode.children);\n }\n }\n };\n\n traverseTree(instanceTree);\n return coordinates;\n };\n\n const getStatistics = (): RegistryStatistics => {\n return registryStats.getStatistics();\n };\n\n const registry: Registry = {\n type,\n registryHub,\n createInstance,\n register,\n get,\n getCoordinates,\n getStatistics,\n instanceTree,\n };\n\n return registry;\n}\n", "/**\n * Base class for all registry-related errors\n */\nexport abstract class RegistryError extends Error {\n public readonly registryType?: string;\n public readonly context?: Record<string, any>;\n\n constructor(message: string, registryType?: string, context?: Record<string, any>) {\n super(message);\n this.name = this.constructor.name;\n this.registryType = registryType;\n this.context = context;\n\n // Maintains proper stack trace for where our error was thrown (Node.js specific)\n const ErrorConstructor = Error as any;\n if (typeof ErrorConstructor.captureStackTrace === 'function') {\n ErrorConstructor.captureStackTrace(this, this.constructor);\n }\n }\n\n public getDetails(): string {\n const details: string[] = [this.message];\n\n if (this.registryType) {\n details.push(`Registry Type: ${this.registryType}`);\n }\n\n if (this.context) {\n details.push(`Context: ${JSON.stringify(this.context, null, 2)}`);\n }\n\n return details.join('\\n');\n }\n}\n\n/**\n * Thrown when attempting to create a registry with invalid parameters\n */\nexport class RegistryCreationError extends RegistryError {\n constructor(type: string, reason: string, context?: Record<string, any>) {\n super(`Failed to create registry of type '${type}': ${reason}`, type, context);\n }\n}\n\n/**\n * Thrown when a factory function returns an invalid instance\n */\nexport class InvalidFactoryResultError extends RegistryError {\n public readonly keyPath: string[];\n public readonly factoryResult: any;\n\n constructor(keyPath: string[], factoryResult: any, registryType?: string) {\n const keyPathStr = keyPath.join('.');\n super(\n `Factory did not return a valid instance for: ${keyPathStr}. ` +\n `Expected instance with 'coordinate' and 'registry' properties, got: ${typeof factoryResult}`,\n registryType,\n { keyPath, factoryResult: typeof factoryResult }\n );\n this.keyPath = keyPath;\n this.factoryResult = factoryResult;\n }\n}\n\n/**\n * Thrown when attempting to register a non-instance object\n */\nexport class InvalidInstanceRegistrationError extends RegistryError {\n public readonly keyPath: string[];\n public readonly attemptedRegistration: any;\n\n constructor(keyPath: string[], attemptedRegistration: any, registryType?: string) {\n const keyPathStr = keyPath.join('.');\n super(\n `Attempting to register a non-instance: ${keyPathStr}. ` +\n `Expected instance with 'coordinate' and 'registry' properties, got: ${typeof attemptedRegistration}`,\n registryType,\n { keyPath, attemptedRegistration: typeof attemptedRegistration }\n );\n this.keyPath = keyPath;\n this.attemptedRegistration = attemptedRegistration;\n }\n}\n", "import { RegistryError } from './RegistryError';\n\n/**\n * Base class for registry hub-related errors\n */\nexport abstract class RegistryHubError extends RegistryError {\n public readonly hubType?: string;\n\n constructor(message: string, hubType?: string, context?: Record<string, any>) {\n const enrichedContext = hubType ? { ...context, hubType } : context;\n super(message, '', enrichedContext);\n this.hubType = hubType;\n }\n}\n\n/**\n * Thrown when attempting to register a registry with a type that already exists\n */\nexport class DuplicateRegistryTypeError extends RegistryHubError {\n public readonly duplicateType: string;\n\n constructor(type: string, context?: Record<string, any>) {\n super(\n `Registry already registered under type: ${type}. ` +\n `Each registry type must be unique within a registry hub.`,\n '',\n { ...context, duplicateType: type }\n );\n this.duplicateType = type;\n }\n}\n\n/**\n * Thrown when attempting to access a registry type that doesn't exist\n */\nexport class RegistryTypeNotFoundError extends RegistryHubError {\n public readonly requestedType: string;\n public readonly availableTypes: string[];\n\n constructor(requestedType: string, availableTypes: string[] = [], context?: Record<string, any>) {\n let message = `No registry registered under type: ${requestedType}`;\n if (availableTypes.length > 0) {\n message += `. Available types: [${availableTypes.join(', ')}]`;\n }\n\n super(message, '', { ...context, requestedType, availableTypes });\n this.requestedType = requestedType;\n this.availableTypes = availableTypes;\n }\n}\n\n/**\n * Thrown when a registry factory function fails to create a valid registry\n */\nexport class RegistryFactoryError extends RegistryHubError {\n public readonly factoryError: Error;\n public readonly attemptedType: string;\n\n constructor(type: string, factoryError: Error, context?: Record<string, any>) {\n super(\n `Registry factory failed to create registry of type '${type}': ${factoryError.message}`,\n '',\n { ...context, attemptedType: type, originalError: factoryError.message }\n );\n this.factoryError = factoryError;\n this.attemptedType = type;\n }\n}\n\n/**\n * Thrown when a factory returns an invalid registry object\n */\nexport class InvalidRegistryFactoryResultError extends RegistryHubError {\n public readonly factoryResult: any;\n public readonly attemptedType: string;\n\n constructor(type: string, factoryResult: any, context?: Record<string, any>) {\n super(\n `Registry factory returned invalid registry for type '${type}'. ` +\n `Expected registry with 'type', 'get', 'register', and 'createInstance' properties, ` +\n `got: ${typeof factoryResult}`,\n '',\n { ...context, attemptedType: type, factoryResult: typeof factoryResult }\n );\n this.factoryResult = factoryResult;\n this.attemptedType = type;\n }\n}\n", "\nimport LibLogger from '@/logger';\nimport { CoordinateWithRegistry, Registry, RegistryFactory, RegistryHub } from './types';\nimport { Instance } from './Instance';\nimport { ClientIdentifier } from './RegistryStats';\nimport {\n DuplicateRegistryTypeError,\n RegistryTypeNotFoundError,\n} from './errors/RegistryHubError';\nimport { AllItemTypeArrays } from '@fjell/core';\n\n// Re-export types for backward compatibility\nexport type { RegistryHub } from './types';\n\nconst logger = LibLogger.get(\"RegistryHub\");\n\ninterface RegistryHubData {\n [type: string]: Registry;\n}\n\nexport const createRegistryHub = (): RegistryHub => {\n const registries: RegistryHubData = {};\n\n const createRegistry = (type: string, factory: RegistryFactory): Registry => {\n logger.debug(`Creating new registry with type: ${type}`);\n\n if (registries[type]) {\n throw new DuplicateRegistryTypeError(type);\n }\n\n // Create the registry with a reference to this hub\n const registry = factory(type, hub);\n\n // Ensure the created registry has a reference to this hub if not already set\n if (!('registryHub' in registry) || registry.registryHub !== hub) {\n // @ts-expect-error: registryHub is optional and may be readonly, but we want to set it for hub awareness\n registry.registryHub = hub;\n }\n\n // Register the created registry\n registries[type] = registry;\n logger.debug(`Successfully created and registered new registry with type: ${type}`);\n\n return registry;\n };\n\n const registerRegistry = (registry: Registry): void => {\n const type = registry.type;\n logger.debug(`Registering registry with type: ${type}`);\n\n if (registries[type]) {\n throw new DuplicateRegistryTypeError(type);\n }\n\n registries[type] = registry;\n\n // Ensure the created registry has a reference to this hub if not already set\n if (!('registryHub' in registry) || registry.registryHub !== hub) {\n // @ts-expect-error: registryHub is optional and may be readonly, but we want to set it for hub awareness\n registry.registryHub = hub;\n }\n\n logger.debug(`Successfully registered registry with type: ${type}`);\n };\n\n const get = <\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never,\n >(\n type: string,\n kta: AllItemTypeArrays<S, L1, L2, L3, L4, L5>,\n options?: { scopes?: string[]; client?: ClientIdentifier },\n ): Instance<S, L1, L2, L3, L4, L5> | null => {\n logger.debug(`Looking up instance for type: ${type}, kta: ${kta.join('.')}, scopes: ${options?.scopes?.join(',') || 'none'}`);\n\n const registry = registries[type];\n if (!registry) {\n const availableTypes = Object.keys(registries);\n throw new RegistryTypeNotFoundError(type, availableTypes);\n }\n\n return registry.get(kta, options);\n };\n\n const getRegistry = (type: string): Registry | null => {\n return registries[type] || null;\n };\n\n const getRegisteredTypes = (): string[] => {\n return Object.keys(registries);\n };\n\n const unregisterRegistry = (type: string): boolean => {\n if (registries[type]) {\n delete registries[type];\n logger.debug(`Unregistered registry under type: ${type}`);\n return true;\n }\n return false;\n };\n\n const getAllCoordinates = (): CoordinateWithRegistry[] => {\n const allCoordinates: CoordinateWithRegistry[] = [];\n\n for (const registryType in registries) {\n const registry = registries[registryType];\n const coordinates = registry.getCoordinates();\n\n coordinates.forEach(coordinate => {\n allCoordinates.push({\n coordinate,\n registryType\n });\n });\n }\n\n logger.debug(`Retrieved ${allCoordinates.length} total coordinates from ${Object.keys(registries).length} registries`);\n return allCoordinates;\n };\n\n const hub: RegistryHub = {\n createRegistry,\n registerRegistry,\n get,\n getRegistry,\n getRegisteredTypes,\n getAllCoordinates,\n unregisterRegistry,\n } as unknown as RegistryHub;\n\n return hub;\n};\n", "import { RegistryError } from './RegistryError';\n\n/**\n * Base class for instance-related errors\n */\nexport abstract class InstanceError extends RegistryError {\n public readonly keyPath: string[];\n\n constructor(message: string, keyPath: string[], registryType?: string, context?: Record<string, any>) {\n super(message, registryType, { ...context, keyPath });\n this.keyPath = keyPath;\n }\n}\n\n/**\n * Thrown when an instance cannot be found for a given key path\n */\nexport class InstanceNotFoundError extends InstanceError {\n public readonly missingKey?: string;\n\n constructor(keyPath: string[], missingKey?: string, registryType?: string, context?: Record<string, any>) {\n const keyPathStr = keyPath.join('.');\n let message = `Instance not found for key path: ${keyPathStr}`;\n\n if (missingKey) {\n message += `, Missing key: ${missingKey}`;\n }\n\n super(message, keyPath, registryType, { ...context, missingKey });\n this.missingKey = missingKey;\n }\n}\n\n/**\n * Thrown when no instances are registered for a key path that exists in the tree\n */\nexport class NoInstancesRegisteredError extends InstanceError {\n constructor(keyPath: string[], registryType?: string, context?: Record<string, any>) {\n const keyPathStr = keyPath.join('.');\n super(\n `No instances registered for key path: ${keyPathStr}. ` +\n `The key path exists in the registry tree but contains no instances.`,\n keyPath,\n registryType,\n context\n );\n }\n}\n\n/**\n * Thrown when no instances are available (empty instances array)\n */\nexport class NoInstancesAvailableError extends InstanceError {\n constructor(keyPath: string[], registryType?: string, context?: Record<string, any>) {\n const keyPathStr = keyPath.join('.');\n super(\n `No instances available for key path: ${keyPathStr}. ` +\n `This typically indicates an internal registry state issue.`,\n keyPath,\n registryType,\n context\n );\n }\n}\n\n/**\n * Thrown when no instance matches the requested scopes\n */\nexport class ScopeNotFoundError extends InstanceError {\n public readonly requestedScopes: string[];\n public readonly availableScopes: string[][];\n\n constructor(\n keyPath: string[],\n requestedScopes: string[],\n availableScopes: string[][] = [],\n registryType?: string\n ) {\n const keyPathStr = keyPath.join('.');\n const scopesStr = requestedScopes.join(', ');\n const availableScopesStr = availableScopes.map(scopes => `[${scopes.join(', ')}]`).join(', ');\n\n let message = `No instance found matching scopes: ${scopesStr} for key path: ${keyPathStr}`;\n if (availableScopes.length > 0) {\n message += `. Available scopes: ${availableScopesStr}`;\n }\n\n super(message, keyPath, registryType, { requestedScopes, availableScopes });\n this.requestedScopes = requestedScopes;\n this.availableScopes = availableScopes;\n }\n}\n\n/**\n * Thrown when a key path has no children but children are expected\n */\nexport class NoChildrenAvailableError extends InstanceError {\n public readonly parentKey: string;\n\n constructor(keyPath: string[], parentKey: string, registryType?: string, context?: Record<string, any>) {\n const keyPathStr = keyPath.join('.');\n super(\n `Instance not found for key path: ${keyPathStr}, No children for: ${parentKey}. ` +\n `The path cannot be traversed further as '${parentKey}' has no child nodes.`,\n keyPath,\n registryType,\n { ...context, parentKey }\n );\n this.parentKey = parentKey;\n }\n}\n", "import { RegistryError } from './RegistryError';\n\n/**\n * Base class for coordinate-related errors\n */\nexport abstract class CoordinateError extends RegistryError {\n public readonly kta?: any;\n public readonly scopes?: string[];\n\n constructor(message: string, kta?: any, scopes?: string[], context?: Record<string, any>) {\n super(message, '', { ...context, kta, scopes });\n this.kta = kta;\n this.scopes = scopes;\n }\n}\n\n/**\n * Thrown when coordinate creation fails due to invalid parameters\n */\nexport class InvalidCoordinateError extends CoordinateError {\n constructor(kta: any, scopes: string[], reason: string, context?: Record<string, any>) {\n super(\n `Invalid coordinate parameters: ${reason}. ` +\n `KTA: ${JSON.stringify(kta)}, Scopes: [${scopes.join(', ')}]`,\n kta,\n scopes,\n { ...context, reason }\n );\n }\n}\n\n/**\n * Thrown when KTA (Key Type Array) is invalid\n */\nexport class InvalidKTAError extends CoordinateError {\n constructor(kta: any, reason: string, context?: Record<string, any>) {\n super(\n `Invalid KTA (Key Type Array): ${reason}. ` +\n `Expected string or array of strings, got: ${JSON.stringify(kta)}`,\n kta,\n [],\n { ...context, reason }\n );\n }\n}\n\n/**\n * Thrown when scopes array contains invalid values\n */\nexport class InvalidScopesError extends CoordinateError {\n public readonly invalidScopes: any[];\n\n constructor(scopes: any[], invalidScopes: any[], reason: string, context?: Record<string, any>) {\n super(\n `Invalid scopes: ${reason}. ` +\n `Invalid scope values: ${JSON.stringify(invalidScopes)}`,\n null,\n scopes.filter(s => typeof s === 'string'),\n { ...context, reason, invalidScopes }\n );\n this.invalidScopes = invalidScopes;\n }\n}\n"],
5
+ "mappings": ";AAAA,OAAO,aAAa;AAEpB,IAAM,YAAY,QAAQ,UAAU,iBAAiB;AAErD,IAAO,iBAAQ;;;ACAf,IAAM,SAAS,eAAU,IAAI,YAAY;AAelC,IAAM,mBAAmB,CAO9B,KAA+C,SAAmB,CAAC,MAAyC;AAC5G,QAAM,UAAU,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,GAAG;AAC/C,QAAM,WAAW,MAAM;AACrB,WAAO,MAAM,YAAY,EAAE,KAAK,OAAO,CAAC;AACxC,WAAO,GAAG,QAAQ,KAAK,IAAI,CAAC,MAAM,OAAO,KAAK,IAAI,CAAC;AAAA,EACrD;AACA,SAAO,MAAM,oBAAoB,EAAE,KAAK,SAAS,QAAQ,SAAS,CAAC;AACnE,SAAO,EAAE,KAAK,SAAiD,QAAQ,SAAS;AAClF;;;AC5BA,IAAMA,UAAS,eAAU,IAAI,UAAU;AAgChC,IAAM,iBAAiB,CAQ5B,UACA,eACoC;AACpC,EAAAA,QAAO,MAAM,kBAAkB,EAAE,YAAY,SAAS,CAAC;AACvD,SAAO,EAAE,YAAY,SAAS;AAChC;AAEO,IAAM,aAAa,CAAC,aAAsE;AAC/F,SAAO,aAAa,QAClB,aAAa,UACb,SAAS,eAAe,UACxB,SAAS,aAA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AAU,GAAG,CAAC,cAAc,OAAO,KAAK,IAAI,CAAC;AAAA,MAC1D;AAAA,MACA;AAAA,MACA,EAAE,GAAG,SAAS,OAAO;AAAA,IACvB;AAAA,EACF;AACF;AAKO,IAAM,kBAAN,cAA8B,gBAAgB;AAAA,EACnD,YAAY,KAAU,QAAgB,SAA+B;AACnE;AAAA,MACE,iCAAiC,MAAM,+CACM,KAAK,UAAU,GAAG,CAAC;AAAA,MAChE;AAAA,MACA,CAAC;AAAA,MACD,EAAE,GAAG,SAAS,OAAO;AAAA,IACvB;AAAA,EACF;AACF;AAKO,IAAM,qBAAN,cAAiC,gBAAgB;AAAA,EACtC;AAAA,EAEhB,YAAY,QAAe,eAAsB,QAAgB,SAA+B;AAC9F;AAAA,MACE,mBAAmB,MAAM,2BACA,KAAK,UAAU,aAAa,CAAC;AAAA,MACtD;AAAA,MACA,OAAO,OAAO,OAAK,OAAO,MAAM,QAAQ;AAAA,MACxC,EAAE,GAAG,SAAS,QAAQ,cAAc;AAAA,IACtC;AACA,SAAK,gBAAgB;AAAA,EACvB;AACF;",
6
+ "names": ["logger", "logger", "createInstance", "logger", "createRegistry"]
7
+ }
package/dist/logger.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- declare const LibLogger: import('@fjell/logging').Logger;
1
+ declare const LibLogger: import("@fjell/logging").Logger;
2
2
  export default LibLogger;
3
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,SAAS,iCAAuC,CAAC;AAEvD,eAAe,SAAS,CAAC"}
package/dist/types.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Instance } from './Instance';
2
2
  import { Coordinate } from './Coordinate';
3
3
  import { ClientIdentifier, RegistryStatistics } from './RegistryStats';
4
+ import { AllItemTypeArrays } from '@fjell/core';
4
5
  /**
5
6
  * Represents a coordinate along with information about which registry contains it.
6
7
  */
@@ -84,21 +85,21 @@ export interface Registry {
84
85
  /**
85
86
  * Creates and registers a new instance in the registry in one atomic operation.
86
87
  */
87
- createInstance: <S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(kta: S[], scopes: string[], factory: InstanceFactory<S, L1, L2, L3, L4, L5>) => Instance<S, L1, L2, L3, L4, L5>;
88
+ createInstance: <S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(kta: AllItemTypeArrays<S, L1, L2, L3, L4, L5>, scopes: string[], factory: InstanceFactory<S, L1, L2, L3, L4, L5>) => Instance<S, L1, L2, L3, L4, L5>;
88
89
  /**
89
90
  * Registers an existing instance in the registry (for migration/advanced use cases).
90
91
  * @deprecated Use createInstance instead for new code
91
92
  */
92
- register: (kta: string[], instance: Instance<any, any | never, any | never, any | never, any | never, any | never>, options?: {
93
+ register: <S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(kta: AllItemTypeArrays<S, L1, L2, L3, L4, L5>, instance: Instance<S, L1, L2, L3, L4, L5>, options?: {
93
94
  scopes?: string[];
94
95
  }) => void;
95
96
  /**
96
97
  * Retrieves an instance from the registry.
97
98
  */
98
- get: (kta: string[], options?: {
99
+ get: <S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(kta: AllItemTypeArrays<S, L1, L2, L3, L4, L5>, options?: {
99
100
  scopes?: string[];
100
101
  client?: ClientIdentifier;
101
- }) => Instance<any, any | never, any | never, any | never, any | never, any | never> | null;
102
+ }) => Instance<S, L1, L2, L3, L4, L5> | null;
102
103
  /** The tree structure representing the hierarchy of instances */
103
104
  instanceTree: InstanceTree;
104
105
  /**
@@ -110,3 +111,4 @@ export interface Registry {
110
111
  */
111
112
  getStatistics: () => RegistryStatistics;
112
113
  }
114
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types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,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EACzC,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,KAC5B,IAAI,CAAC;IAEV;;OAEG;IACH,GAAG,EAAE,CACH,CAAC,SAAS,MAAM,EAChB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EAEzB,GAAG,EAAE,iBAAiB,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAC7C,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,MAAM,CAAC,EAAE,gBAAgB,CAAA;KAAE,KACvD,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC;IAE5C,iEAAiE;IACjE,YAAY,EAAE,YAAY,CAAC;IAE3B;;OAEG;IACH,cAAc,EAAE,MAAM,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,KAAK,EAAE,GAAG,GAAG,KAAK,EAAE,GAAG,GAAG,KAAK,EAAE,GAAG,GAAG,KAAK,EAAE,GAAG,GAAG,KAAK,CAAC,EAAE,CAAC;IAEzG;;OAEG;IACH,aAAa,EAAE,MAAM,kBAAkB,CAAC;CACzC"}
@@ -1,35 +1,4 @@
1
- interface DocsConfig {
2
- projectName: string;
3
- basePath: string;
4
- port: number;
5
- branding: {
6
- theme: string;
7
- tagline: string;
8
- logo?: string;
9
- backgroundImage?: string;
10
- primaryColor?: string;
11
- accentColor?: string;
12
- github?: string;
13
- npm?: string;
14
- };
15
- sections: Array<{
16
- id: string;
17
- title: string;
18
- subtitle: string;
19
- file: string;
20
- }>;
21
- filesToCopy: Array<{
22
- source: string;
23
- destination: string;
24
- }>;
25
- plugins?: any[];
26
- version: {
27
- source: string;
28
- };
29
- customContent?: {
30
- [key: string]: (content: string) => string;
31
- };
32
- }
1
+ import { DocsConfig } from '@fjell/docs-template';
33
2
 
34
3
  const config: DocsConfig = {
35
4
  projectName: 'Fjell Registry',