@fjell/registry 4.4.52 → 4.4.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/API.md +0 -62
- package/GETTING_STARTED.md +0 -69
- package/build.js +0 -38
- package/docs/README.md +0 -74
- package/docs/TIMING_NODE_OPTIMIZATION.md +0 -207
- package/docs/TIMING_README.md +0 -170
- package/docs/docs.config.ts +0 -114
- package/docs/index.html +0 -26
- package/docs/package-lock.json +0 -5129
- package/docs/package.json +0 -34
- package/docs/public/404.html +0 -53
- package/docs/public/GETTING_STARTED.md +0 -69
- package/docs/public/README.md +0 -623
- package/docs/public/TIMING_NODE_OPTIMIZATION.md +0 -207
- package/docs/public/api.md +0 -62
- package/docs/public/client-api-overview.md +0 -137
- package/docs/public/configuration.md +0 -759
- package/docs/public/error-handling/README.md +0 -356
- package/docs/public/error-handling/network-errors.md +0 -485
- package/docs/public/examples/coordinates-example.ts +0 -253
- package/docs/public/examples/multi-level-keys.ts +0 -374
- package/docs/public/examples/registry-hub-coordinates-example.ts +0 -370
- package/docs/public/examples/registry-hub-types.ts +0 -437
- package/docs/public/examples/simple-example.ts +0 -250
- package/docs/public/examples-README.md +0 -241
- package/docs/public/fjell-icon.svg +0 -1
- package/docs/public/icon.png +0 -0
- package/docs/public/icon2.png +0 -0
- package/docs/public/memory-overhead.svg +0 -120
- package/docs/public/memory.md +0 -430
- package/docs/public/operations/README.md +0 -121
- package/docs/public/operations/all.md +0 -325
- package/docs/public/operations/create.md +0 -415
- package/docs/public/operations/get.md +0 -389
- package/docs/public/package.json +0 -63
- package/docs/public/pano.png +0 -0
- package/docs/public/pano2.png +0 -0
- package/docs/public/timing-range.svg +0 -176
- package/docs/public/timing.md +0 -483
- package/docs/timing-range.svg +0 -174
- package/docs/vitest.config.ts +0 -14
- package/examples/README.md +0 -241
- package/examples/coordinates-example.ts +0 -253
- package/examples/multi-level-keys.ts +0 -382
- package/examples/registry-hub-coordinates-example.ts +0 -370
- package/examples/registry-hub-types.ts +0 -437
- package/examples/registry-statistics-example.ts +0 -264
- package/examples/simple-example.ts +0 -250
- package/tsconfig.docs.json +0 -28
- package/vitest.config.ts +0 -22
package/docs/package.json
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "fjell-registry-docs",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.0",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"copy-docs": "node node_modules/@fjell/docs-template/dist/scripts/copy-docs.js",
|
|
8
|
-
"dev": "npm run copy-docs && vite",
|
|
9
|
-
"build": "npm run copy-docs && tsc && vite build",
|
|
10
|
-
"preview": "vite preview",
|
|
11
|
-
"test": "vitest run --coverage",
|
|
12
|
-
"test:watch": "vitest --watch"
|
|
13
|
-
},
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"@fjell/docs-template": "^1.0.28",
|
|
16
|
-
"react": "^19.1.0",
|
|
17
|
-
"react-dom": "^19.1.0"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"@testing-library/jest-dom": "^6.6.3",
|
|
21
|
-
"@testing-library/react": "^16.3.0",
|
|
22
|
-
"@testing-library/user-event": "^14.6.1",
|
|
23
|
-
"@types/react": "^19.1.8",
|
|
24
|
-
"@types/react-dom": "^19.1.6",
|
|
25
|
-
"@types/react-syntax-highlighter": "^15.5.13",
|
|
26
|
-
"@vitejs/plugin-react": "^4.7.0",
|
|
27
|
-
"@vitest/coverage-v8": "^3.2.4",
|
|
28
|
-
"@vitest/ui": "^3.2.4",
|
|
29
|
-
"jsdom": "^26.1.0",
|
|
30
|
-
"typescript": "^5.8.3",
|
|
31
|
-
"vite": "^7.0.5",
|
|
32
|
-
"vitest": "^3.2.4"
|
|
33
|
-
}
|
|
34
|
-
}
|
package/docs/public/404.html
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<title>Fjell Registry Documentation</title>
|
|
7
|
-
<meta name="description" content="Redirecting to documentation...">
|
|
8
|
-
<script>
|
|
9
|
-
// GitHub Pages SPA routing fix
|
|
10
|
-
// This script redirects 404 errors back to the main app with the path preserved in the hash
|
|
11
|
-
(function () {
|
|
12
|
-
var redirect = sessionStorage.redirect;
|
|
13
|
-
delete sessionStorage.redirect;
|
|
14
|
-
|
|
15
|
-
if (redirect && redirect !== location.href) {
|
|
16
|
-
// Extract the path from the redirect URL
|
|
17
|
-
var path = redirect.split('/registry/')[1] || '';
|
|
18
|
-
|
|
19
|
-
// If there's a path, set it as the hash for the SPA to handle
|
|
20
|
-
if (path) {
|
|
21
|
-
// Convert path segments to hash-based routing
|
|
22
|
-
// e.g., /registry/client-api/operations -> #client-api/operations
|
|
23
|
-
var hashPath = path.replace(/^\/+|\/+$/g, ''); // Remove leading/trailing slashes
|
|
24
|
-
location.replace(location.protocol + '//' + location.host + '/registry/#' + hashPath);
|
|
25
|
-
} else {
|
|
26
|
-
// No specific path, go to root
|
|
27
|
-
location.replace(location.protocol + '//' + location.host + '/registry/');
|
|
28
|
-
}
|
|
29
|
-
} else {
|
|
30
|
-
// Check if current URL has path segments that should be converted to hash
|
|
31
|
-
var segments = location.pathname.split('/registry/')[1];
|
|
32
|
-
if (segments && segments !== '' && segments !== 'index.html') {
|
|
33
|
-
var hashPath = segments.replace(/^\/+|\/+$/g, '');
|
|
34
|
-
location.replace(location.protocol + '//' + location.host + '/registry/#' + hashPath);
|
|
35
|
-
} else {
|
|
36
|
-
// Default redirect to main app
|
|
37
|
-
location.replace(location.protocol + '//' + location.host + '/registry/');
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
})();
|
|
41
|
-
</script>
|
|
42
|
-
</head>
|
|
43
|
-
|
|
44
|
-
<body>
|
|
45
|
-
<div
|
|
46
|
-
style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; text-align: center; padding: 50px;">
|
|
47
|
-
<h1>Redirecting...</h1>
|
|
48
|
-
<p>Taking you to the Fjell Registry documentation.</p>
|
|
49
|
-
<p>If you're not redirected automatically, <a href="/registry/">click here</a>.</p>
|
|
50
|
-
</div>
|
|
51
|
-
</body>
|
|
52
|
-
|
|
53
|
-
</html>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# Getting Started
|
|
2
|
-
|
|
3
|
-
Quick start guide to using Fjell Registry in your applications.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @fjell/registry
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Basic Usage
|
|
12
|
-
|
|
13
|
-
The simplest way to get started with Registry:
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
import { createRegistry, createInstance } from '@fjell/registry'
|
|
17
|
-
|
|
18
|
-
// Create a registry with a type identifier
|
|
19
|
-
const registry = createRegistry('services')
|
|
20
|
-
|
|
21
|
-
// Register a simple service
|
|
22
|
-
registry.createInstance(['logger'], [], (coordinate, context) => {
|
|
23
|
-
const service = new LoggerService()
|
|
24
|
-
const instance = createInstance(context.registry, coordinate)
|
|
25
|
-
|
|
26
|
-
// Attach service methods to the instance
|
|
27
|
-
(instance as any).log = service.log.bind(service)
|
|
28
|
-
return instance
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
// Retrieve and use the service
|
|
32
|
-
const logger = registry.get(['logger'], [])
|
|
33
|
-
logger?.log('Hello from Registry!')
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Core Concepts Quick Reference
|
|
37
|
-
|
|
38
|
-
- **Registry**: Central service container with a mandatory type identifier
|
|
39
|
-
- **Coordinate**: Unique identifier using key types + scopes
|
|
40
|
-
- **Instance**: Registered service with coordinate and registry reference
|
|
41
|
-
- **Scopes**: Context qualifiers like environment or implementation type
|
|
42
|
-
|
|
43
|
-
## Next Steps
|
|
44
|
-
|
|
45
|
-
- Check out the **Examples** section for complete working examples
|
|
46
|
-
- Read the **Foundation** section for deep understanding of concepts
|
|
47
|
-
- Explore the **API Reference** for complete method documentation
|
|
48
|
-
|
|
49
|
-
## Common Patterns
|
|
50
|
-
|
|
51
|
-
### Single Registry (Simple Apps)
|
|
52
|
-
```typescript
|
|
53
|
-
const registry = createRegistry('app')
|
|
54
|
-
// Register all your services here
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Multiple Registries (Enterprise)
|
|
58
|
-
```typescript
|
|
59
|
-
const servicesRegistry = createRegistry('services')
|
|
60
|
-
const dataRegistry = createRegistry('data')
|
|
61
|
-
const cacheRegistry = createRegistry('cache')
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### Scoped Services
|
|
65
|
-
```typescript
|
|
66
|
-
// Different implementations for different environments
|
|
67
|
-
registry.createInstance(['database'], ['postgresql'], ...)
|
|
68
|
-
registry.createInstance(['database'], ['firestore'], ...)
|
|
69
|
-
```
|