@fjell/registry 4.4.84 → 4.4.86
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 +1 -1
- package/guide/index.md +30 -0
- package/guide/integration.md +32 -0
- package/guide/usage.md +41 -0
- package/package.json +5 -5
package/LICENSE
CHANGED
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
same "printed page" as the copyright notice for easier
|
|
188
188
|
identification within third-party archives.
|
|
189
189
|
|
|
190
|
-
Copyright
|
|
190
|
+
Copyright 2026 Tim O'Brien
|
|
191
191
|
|
|
192
192
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
193
|
you may not use this file except in compliance with the License.
|
package/guide/index.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# @fjell/registry - Agentic Guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Dependency injection and service registry utilities for composing Fjell systems.
|
|
6
|
+
|
|
7
|
+
This guide is optimized for AI-assisted code generation and integration workflows.
|
|
8
|
+
|
|
9
|
+
## Documentation
|
|
10
|
+
|
|
11
|
+
- **[Usage Guide](./usage.md)** - API-oriented usage patterns and model-safe examples
|
|
12
|
+
- **[Integration Guide](./integration.md)** - Architecture placement, composition rules, and implementation guidance
|
|
13
|
+
|
|
14
|
+
## Key Capabilities
|
|
15
|
+
|
|
16
|
+
- Registers and resolves service instances with typed lookups
|
|
17
|
+
- Supports registry hubs and stats for larger multi-service deployments
|
|
18
|
+
- Centralizes dependency wiring for app bootstrap and tests
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install @fjell/registry
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Public API Highlights
|
|
27
|
+
|
|
28
|
+
- `Registry`, `RegistryHub`, and `Instance` helpers
|
|
29
|
+
- `RegistryStats` for observability
|
|
30
|
+
- Registry error and type exports for safe composition
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Integration Guide
|
|
2
|
+
|
|
3
|
+
Guide for integrating `@fjell/registry` into larger Fjell-based systems.
|
|
4
|
+
|
|
5
|
+
## Where It Fits
|
|
6
|
+
|
|
7
|
+
Dependency injection and service registry utilities for composing Fjell systems.
|
|
8
|
+
|
|
9
|
+
## Recommended Integration Pattern
|
|
10
|
+
|
|
11
|
+
- Create one root registry per runtime process and pass scoped registries into modules
|
|
12
|
+
- Prefer constructor injection from registry values over hidden singleton imports
|
|
13
|
+
- Mock registry entries in tests to isolate network and storage dependencies
|
|
14
|
+
|
|
15
|
+
## System Composition Checklist
|
|
16
|
+
|
|
17
|
+
- Define package boundaries: schema/types, transport, operations, adapters, and UI.
|
|
18
|
+
- Keep contracts stable by sharing @fjell/types interfaces where applicable.
|
|
19
|
+
- Centralize retries/timeouts/logging around infrastructure-facing operations.
|
|
20
|
+
- Validate inputs at API boundaries before invoking persistence or provider layers.
|
|
21
|
+
- Add contract and integration tests for every generated workflow.
|
|
22
|
+
|
|
23
|
+
## Cross-Library Pairings
|
|
24
|
+
|
|
25
|
+
- Pair with @fjell/types for shared contracts.
|
|
26
|
+
- Pair with @fjell/validation for input and schema checks.
|
|
27
|
+
- Pair with @fjell/logging for observability in integration flows.
|
|
28
|
+
- Pair with storage/router/provider packages based on your runtime architecture.
|
|
29
|
+
|
|
30
|
+
## Integration Example Shape
|
|
31
|
+
|
|
32
|
+
Use this package behind an application service layer that exposes stable domain methods. Generated code should call those service methods, not raw infrastructure primitives, unless your architecture intentionally keeps infrastructure at the edge.
|
package/guide/usage.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Usage Guide
|
|
2
|
+
|
|
3
|
+
Comprehensive usage guidance for `@fjell/registry`.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @fjell/registry
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## API Highlights
|
|
12
|
+
|
|
13
|
+
- `Registry`, `RegistryHub`, and `Instance` helpers
|
|
14
|
+
- `RegistryStats` for observability
|
|
15
|
+
- Registry error and type exports for safe composition
|
|
16
|
+
|
|
17
|
+
## Quick Example
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { Registry } from "@fjell/registry";
|
|
21
|
+
|
|
22
|
+
const registry = new Registry();
|
|
23
|
+
registry.register("logger", { info: console.log });
|
|
24
|
+
|
|
25
|
+
const logger = registry.get("logger");
|
|
26
|
+
logger.info("Registry wired");
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Model Consumption Rules
|
|
30
|
+
|
|
31
|
+
1. Import from the package root (`@fjell/registry`) instead of deep-internal paths unless explicitly documented.
|
|
32
|
+
2. Keep usage aligned with exported public symbols listed in this guide.
|
|
33
|
+
3. Prefer explicit typing at package boundaries so generated code remains robust during upgrades.
|
|
34
|
+
4. Keep error handling deterministic and map infrastructure failures into domain-level errors.
|
|
35
|
+
5. Co-locate integration wrappers in your app so model-generated code has one canonical entry point.
|
|
36
|
+
|
|
37
|
+
## Best Practices
|
|
38
|
+
|
|
39
|
+
- Keep examples and abstractions consistent with existing Fjell package conventions.
|
|
40
|
+
- Favor composable wrappers over one-off inline integration logic.
|
|
41
|
+
- Add targeted tests around generated integration code paths.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fjell/registry",
|
|
3
3
|
"description": "Dependency injection and service location system for the Fjell ecosystem",
|
|
4
|
-
"version": "4.4.
|
|
4
|
+
"version": "4.4.86",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"registry",
|
|
7
7
|
"dependency-injection",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"docs:test": "cd docs && npm run test"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@fjell/core": "^4.4.
|
|
43
|
-
"@fjell/logging": "^4.4.
|
|
44
|
-
"@fjell/types": "^4.4.
|
|
42
|
+
"@fjell/core": "^4.4.79",
|
|
43
|
+
"@fjell/logging": "^4.4.72",
|
|
44
|
+
"@fjell/types": "^4.4.9"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@eslint/eslintrc": "^3.3.1",
|
|
48
48
|
"@eslint/js": "^9.39.1",
|
|
49
|
-
"@fjell/common-config": "^1.1.
|
|
49
|
+
"@fjell/common-config": "^1.1.38",
|
|
50
50
|
"@swc/core": "^1.15.2",
|
|
51
51
|
"@tsconfig/recommended": "^1.0.13",
|
|
52
52
|
"@types/node": "^24.10.1",
|