@fjell/registry 4.4.17 → 4.4.22

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 (72) hide show
  1. package/README.md +1 -1
  2. package/build.js +4 -0
  3. package/dist/Coordinate.d.ts +2 -1
  4. package/dist/Coordinate.d.ts.map +1 -0
  5. package/dist/Instance.d.ts +3 -2
  6. package/dist/Instance.d.ts.map +1 -0
  7. package/dist/Registry.d.ts +1 -0
  8. package/dist/Registry.d.ts.map +1 -0
  9. package/dist/RegistryHub.d.ts +1 -0
  10. package/dist/RegistryHub.d.ts.map +1 -0
  11. package/dist/RegistryStats.d.ts +1 -0
  12. package/dist/RegistryStats.d.ts.map +1 -0
  13. package/dist/errors/CoordinateError.d.ts +1 -0
  14. package/dist/errors/CoordinateError.d.ts.map +1 -0
  15. package/dist/errors/InstanceError.d.ts +1 -0
  16. package/dist/errors/InstanceError.d.ts.map +1 -0
  17. package/dist/errors/RegistryError.d.ts +1 -0
  18. package/dist/errors/RegistryError.d.ts.map +1 -0
  19. package/dist/errors/RegistryHubError.d.ts +1 -0
  20. package/dist/errors/RegistryHubError.d.ts.map +1 -0
  21. package/dist/errors/index.d.ts +1 -0
  22. package/dist/errors/index.d.ts.map +1 -0
  23. package/dist/index.d.ts +1 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +685 -10
  26. package/dist/index.js.map +7 -0
  27. package/dist/logger.d.ts +2 -1
  28. package/dist/logger.d.ts.map +1 -0
  29. package/dist/types.d.ts +1 -0
  30. package/dist/types.d.ts.map +1 -0
  31. package/docs/README.md +8 -8
  32. package/docs/TIMING_NODE_OPTIMIZATION.md +3 -3
  33. package/docs/TIMING_README.md +2 -2
  34. package/docs/docs.config.ts +1 -32
  35. package/docs/package-lock.json +5129 -0
  36. package/docs/package.json +3 -3
  37. package/docs/public/README.md +1 -1
  38. package/docs/public/TIMING_NODE_OPTIMIZATION.md +2 -2
  39. package/docs/public/examples/registry-hub-types.ts +0 -0
  40. package/docs/public/package.json +4 -5
  41. package/docs/timing-range.svg +40 -40
  42. package/examples/registry-hub-types.ts +0 -0
  43. package/package.json +28 -38
  44. package/tsconfig.docs.json +28 -0
  45. package/vitest.config.ts +17 -0
  46. package/MIGRATION_SUMMARY.md +0 -200
  47. package/dist/Coordinate.cjs +0 -32
  48. package/dist/Coordinate.js +0 -28
  49. package/dist/Instance.cjs +0 -24
  50. package/dist/Instance.js +0 -19
  51. package/dist/Registry.cjs +0 -182
  52. package/dist/Registry.js +0 -178
  53. package/dist/RegistryHub.cjs +0 -94
  54. package/dist/RegistryHub.js +0 -90
  55. package/dist/RegistryStats.cjs +0 -198
  56. package/dist/RegistryStats.js +0 -194
  57. package/dist/errors/CoordinateError.cjs +0 -70
  58. package/dist/errors/CoordinateError.js +0 -63
  59. package/dist/errors/InstanceError.cjs +0 -101
  60. package/dist/errors/InstanceError.js +0 -92
  61. package/dist/errors/RegistryError.cjs +0 -82
  62. package/dist/errors/RegistryError.js +0 -75
  63. package/dist/errors/RegistryHubError.cjs +0 -92
  64. package/dist/errors/RegistryHubError.js +0 -84
  65. package/dist/index.cjs +0 -821
  66. package/dist/index.cjs.map +0 -1
  67. package/dist/logger.cjs +0 -10
  68. package/dist/logger.js +0 -6
  69. package/docs/src/index.css +0 -34
  70. package/docs/src/main.tsx +0 -12
  71. package/docs/src/test/setup.ts +0 -1
  72. package/docs/src/types.d.ts +0 -44
package/docs/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "version": "0.0.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
- "copy-docs": "node node_modules/@fjell/docs-template/scripts/copy-docs.js",
7
+ "copy-docs": "npx copy-docs",
8
8
  "dev": "npm run copy-docs && vite",
9
9
  "build": "npm run copy-docs && tsc && vite build",
10
10
  "preview": "vite preview",
@@ -12,7 +12,7 @@
12
12
  "test:watch": "vitest --watch"
13
13
  },
14
14
  "dependencies": {
15
- "@fjell/docs-template": "^1.0.5",
15
+ "@fjell/docs-template": "^1.0.24",
16
16
  "react": "^19.1.0",
17
17
  "react-dom": "^19.1.0"
18
18
  },
@@ -31,4 +31,4 @@
31
31
  "vite": "^7.0.5",
32
32
  "vitest": "^3.2.4"
33
33
  }
34
- }
34
+ }
@@ -567,7 +567,7 @@ The Fjell Registry includes comprehensive memory profiling to ensure optimal per
567
567
 
568
568
  ```bash
569
569
  # Run memory tests and generate documentation
570
- pnpm run test:memory
570
+ npm run test:memory
571
571
  ```
572
572
 
573
573
  #### Memory Test Coverage
@@ -171,10 +171,10 @@ Test that optimizations are working:
171
171
 
172
172
  ```bash
173
173
  # Run normal timing tests
174
- pnpm run test:timing
174
+ npm run test:timing
175
175
 
176
176
  # Run optimized timing tests
177
- pnpm run test:timing:optimized
177
+ npm run test:timing:optimized
178
178
 
179
179
  # Compare results - optimized should show:
180
180
  # 1. Lower timing variance (smaller standard deviations)
File without changes
@@ -25,10 +25,10 @@
25
25
  "dev": "concurrently \"tsc --watch --noEmit\" \"vite build --watch\"",
26
26
  "lint": "eslint . --ext .ts --fix",
27
27
  "clean": "rimraf dist",
28
- "test": "pnpm run lint && vitest run --coverage",
29
- "test:memory:optimized": "pnpm run lint && NODE_OPTIONS=\"--max-old-space-size=8192 --max-semi-space-size=1024\" vitest run tests/memory.test.ts",
30
- "test:timing:optimized": "pnpm run lint && NODE_OPTIONS=\"--max-old-space-size=8192 --max-semi-space-size=1024\" vitest run tests/timing.test.ts",
31
- "prepublishOnly": "pnpm run clean && pnpm run build"
28
+ "test": "npm run lint && vitest run --coverage",
29
+ "test:memory:optimized": "npm run lint && NODE_OPTIONS=\"--max-old-space-size=8192 --max-semi-space-size=1024\" vitest run tests/memory.test.ts",
30
+ "test:timing:optimized": "npm run lint && NODE_OPTIONS=\"--max-old-space-size=8192 --max-semi-space-size=1024\" vitest run tests/timing.test.ts",
31
+ "prepublishOnly": "npm run clean && npm run build"
32
32
  },
33
33
  "dependencies": {
34
34
  "@fjell/core": "^4.4.7",
@@ -57,7 +57,6 @@
57
57
  "vite-plugin-node": "^7.0.0",
58
58
  "vitest": "^3.2.4"
59
59
  },
60
- "packageManager": "pnpm@10.13.1",
61
60
  "repository": {
62
61
  "type": "git",
63
62
  "url": "git+https://github.com/getfjell/registry.git"
@@ -31,16 +31,16 @@
31
31
  <g transform="translate(110,60)">
32
32
 
33
33
  <!-- Grid lines (logarithmic scale) -->
34
- <line x1="0" y1="420.0849886194532" x2="1015" y2="420.0849886194532" class="grid"/>
35
- <text x="-10" y="424.0849886194532" text-anchor="end" class="label">0.20µs</text>
36
- <line x1="0" y1="350.5956953115503" x2="1015" y2="350.5956953115503" class="grid"/>
37
- <text x="-10" y="354.5956953115503" text-anchor="end" class="label">0.50µs</text>
38
- <line x1="0" y1="298.029074194519" x2="1015" y2="298.029074194519" class="grid"/>
39
- <text x="-10" y="302.029074194519" text-anchor="end" class="label">1.0µs</text>
40
- <line x1="0" y1="245.46245307748777" x2="1015" y2="245.46245307748777" class="grid"/>
41
- <text x="-10" y="249.46245307748777" text-anchor="end" class="label">2.0µs</text>
42
- <line x1="0" y1="175.9731597695848" x2="1015" y2="175.9731597695848" class="grid"/>
43
- <text x="-10" y="179.9731597695848" text-anchor="end" class="label">5.0µs</text>
34
+ <line x1="0" y1="409.4248343333136" x2="1015" y2="409.4248343333136" class="grid"/>
35
+ <text x="-10" y="413.4248343333136" text-anchor="end" class="label">0.20µs</text>
36
+ <line x1="0" y1="315.6500962348101" x2="1015" y2="315.6500962348101" class="grid"/>
37
+ <text x="-10" y="319.6500962348101" text-anchor="end" class="label">0.50µs</text>
38
+ <line x1="0" y1="244.7122453326445" x2="1015" y2="244.7122453326445" class="grid"/>
39
+ <text x="-10" y="248.7122453326445" text-anchor="end" class="label">1.0µs</text>
40
+ <line x1="0" y1="173.77439443047894" x2="1015" y2="173.77439443047894" class="grid"/>
41
+ <text x="-10" y="177.77439443047894" text-anchor="end" class="label">2.0µs</text>
42
+ <line x1="0" y1="79.99965633197542" x2="1015" y2="79.99965633197542" class="grid"/>
43
+ <text x="-10" y="83.99965633197542" text-anchor="end" class="label">5.0µs</text>
44
44
  <line x1="0" y1="0" x2="0" y2="460" class="grid"/>
45
45
  <text x="0" y="480" text-anchor="middle" class="label">10</text>
46
46
  <line x1="76.38636139973525" y1="0" x2="76.38636139973525" y2="460" class="grid"/>
@@ -76,34 +76,34 @@
76
76
  <!-- Axis labels -->
77
77
  <text x="507.5" y="510" text-anchor="middle" class="axis-title">Tree Size (items) - Log Scale</text>
78
78
  <text transform="rotate(-90,-70,230)" x="-70" y="230" text-anchor="middle" class="axis-title">Execution Time (µs)</text>
79
- <path d="M 0 184.24323201331856 L 76.38636139973525 52.566621117031275 L 177.36363860026475 281.19916259702654 L 253.75 99.85536010153385 L 330.1363613997352 155.21187981803513 L 431.1136386002648 233.50965785939817 L 507.5 133.2733413312567 L 583.8863613997353 201.83264227911127 L 684.8636386002647 241.38839289106662 L 761.25 208.28968014579195 L 837.6363613997353 230.0452899203906 L 938.6136386002647 250.83160914868958 L 1015 239.21693209610623" class="register-mean"/>
80
- <path d="M 0 355.7737177734165 L 76.38636139973525 198.38195021909638 L 177.36363860026475 389.2787558924 L 253.75 299.9293231046087 L 330.1363613997352 329.9185992616883 L 431.1136386002648 311.2353680811475 L 507.5 407.4333788829687 L 583.8863613997353 327.2743390082418 L 684.8636386002647 263.6839058972088 L 761.25 68.15862189293904 L 837.6363613997353 319.27642224679016 L 938.6136386002647 290.4087422006638 L 1015 293.63242513417225" class="lookup-mean"/>
81
- <circle cx="0" cy="184.24323201331856" r="4" class="register-dot"/>
82
- <circle cx="76.38636139973525" cy="52.566621117031275" r="4" class="register-dot"/>
83
- <circle cx="177.36363860026475" cy="281.19916259702654" r="4" class="register-dot"/>
84
- <circle cx="253.75" cy="99.85536010153385" r="4" class="register-dot"/>
85
- <circle cx="330.1363613997352" cy="155.21187981803513" r="4" class="register-dot"/>
86
- <circle cx="431.1136386002648" cy="233.50965785939817" r="4" class="register-dot"/>
87
- <circle cx="507.5" cy="133.2733413312567" r="4" class="register-dot"/>
88
- <circle cx="583.8863613997353" cy="201.83264227911127" r="4" class="register-dot"/>
89
- <circle cx="684.8636386002647" cy="241.38839289106662" r="4" class="register-dot"/>
90
- <circle cx="761.25" cy="208.28968014579195" r="4" class="register-dot"/>
91
- <circle cx="837.6363613997353" cy="230.0452899203906" r="4" class="register-dot"/>
92
- <circle cx="938.6136386002647" cy="250.83160914868958" r="4" class="register-dot"/>
93
- <circle cx="1015" cy="239.21693209610623" r="4" class="register-dot"/>
94
- <circle cx="0" cy="355.7737177734165" r="4" class="lookup-dot"/>
95
- <circle cx="76.38636139973525" cy="198.38195021909638" r="4" class="lookup-dot"/>
96
- <circle cx="177.36363860026475" cy="389.2787558924" r="4" class="lookup-dot"/>
97
- <circle cx="253.75" cy="299.9293231046087" r="4" class="lookup-dot"/>
98
- <circle cx="330.1363613997352" cy="329.9185992616883" r="4" class="lookup-dot"/>
99
- <circle cx="431.1136386002648" cy="311.2353680811475" r="4" class="lookup-dot"/>
100
- <circle cx="507.5" cy="407.4333788829687" r="4" class="lookup-dot"/>
101
- <circle cx="583.8863613997353" cy="327.2743390082418" r="4" class="lookup-dot"/>
102
- <circle cx="684.8636386002647" cy="263.6839058972088" r="4" class="lookup-dot"/>
103
- <circle cx="761.25" cy="68.15862189293904" r="4" class="lookup-dot"/>
104
- <circle cx="837.6363613997353" cy="319.27642224679016" r="4" class="lookup-dot"/>
105
- <circle cx="938.6136386002647" cy="290.4087422006638" r="4" class="lookup-dot"/>
106
- <circle cx="1015" cy="293.63242513417225" r="4" class="lookup-dot"/>
79
+ <path d="M 0 135.24798501632807 L 76.38636139973525 81.37800325481362 L 177.36363860026475 164.8553002461701 L 253.75 70.93785090216556 L 330.1363613997352 208.77160665019417 L 431.1136386002648 102.45398980093603 L 507.5 152.88355990786437 L 583.8863613997353 167.11250164835803 L 684.8636386002647 157.71948768486385 L 761.25 208.63620084646618 L 837.6363613997353 165.34427441671193 L 938.6136386002647 220.79219486386418 L 1015 214.45642412767756" class="register-mean"/>
80
+ <path d="M 0 229.12306123894965 L 76.38636139973525 379.87811958586695 L 177.36363860026475 361.63841455024703 L 253.75 333.2697839278607 L 330.1363613997352 374.2763468256818 L 431.1136386002648 376.10709741728203 L 507.5 389.06214909783444 L 583.8863613997353 381.32135389237726 L 684.8636386002647 280.0988191788659 L 761.25 294.29830763362236 L 837.6363613997353 331.55885750384425 L 938.6136386002647 311.90261723503045 L 1015 312.0321436872316" class="lookup-mean"/>
81
+ <circle cx="0" cy="135.24798501632807" r="4" class="register-dot"/>
82
+ <circle cx="76.38636139973525" cy="81.37800325481362" r="4" class="register-dot"/>
83
+ <circle cx="177.36363860026475" cy="164.8553002461701" r="4" class="register-dot"/>
84
+ <circle cx="253.75" cy="70.93785090216556" r="4" class="register-dot"/>
85
+ <circle cx="330.1363613997352" cy="208.77160665019417" r="4" class="register-dot"/>
86
+ <circle cx="431.1136386002648" cy="102.45398980093603" r="4" class="register-dot"/>
87
+ <circle cx="507.5" cy="152.88355990786437" r="4" class="register-dot"/>
88
+ <circle cx="583.8863613997353" cy="167.11250164835803" r="4" class="register-dot"/>
89
+ <circle cx="684.8636386002647" cy="157.71948768486385" r="4" class="register-dot"/>
90
+ <circle cx="761.25" cy="208.63620084646618" r="4" class="register-dot"/>
91
+ <circle cx="837.6363613997353" cy="165.34427441671193" r="4" class="register-dot"/>
92
+ <circle cx="938.6136386002647" cy="220.79219486386418" r="4" class="register-dot"/>
93
+ <circle cx="1015" cy="214.45642412767756" r="4" class="register-dot"/>
94
+ <circle cx="0" cy="229.12306123894965" r="4" class="lookup-dot"/>
95
+ <circle cx="76.38636139973525" cy="379.87811958586695" r="4" class="lookup-dot"/>
96
+ <circle cx="177.36363860026475" cy="361.63841455024703" r="4" class="lookup-dot"/>
97
+ <circle cx="253.75" cy="333.2697839278607" r="4" class="lookup-dot"/>
98
+ <circle cx="330.1363613997352" cy="374.2763468256818" r="4" class="lookup-dot"/>
99
+ <circle cx="431.1136386002648" cy="376.10709741728203" r="4" class="lookup-dot"/>
100
+ <circle cx="507.5" cy="389.06214909783444" r="4" class="lookup-dot"/>
101
+ <circle cx="583.8863613997353" cy="381.32135389237726" r="4" class="lookup-dot"/>
102
+ <circle cx="684.8636386002647" cy="280.0988191788659" r="4" class="lookup-dot"/>
103
+ <circle cx="761.25" cy="294.29830763362236" r="4" class="lookup-dot"/>
104
+ <circle cx="837.6363613997353" cy="331.55885750384425" r="4" class="lookup-dot"/>
105
+ <circle cx="938.6136386002647" cy="311.90261723503045" r="4" class="lookup-dot"/>
106
+ <circle cx="1015" cy="312.0321436872316" r="4" class="lookup-dot"/>
107
107
  <!-- Legend -->
108
108
  <g transform="translate(20, 20)">
109
109
  <rect x="0" y="0" width="190" height="80" fill="white" stroke="#ccc" stroke-width="1"/>
@@ -130,13 +130,13 @@
130
130
  <text x="0" y="0" class="metadata-section">System Information</text>
131
131
 
132
132
  <text x="0" y="25" class="metadata-label">Test Date:</text>
133
- <text x="150" y="25" class="metadata-value">2025-07-24</text>
133
+ <text x="150" y="25" class="metadata-value">2025-07-26</text>
134
134
 
135
135
  <text x="0" y="45" class="metadata-label">Package Version:</text>
136
136
  <text x="150" y="45" class="metadata-value">@fjell/registry v4.4.5</text>
137
137
 
138
138
  <text x="0" y="65" class="metadata-label">Node.js Version:</text>
139
- <text x="150" y="65" class="metadata-value">v22.0.0 (darwin arm64)</text>
139
+ <text x="150" y="65" class="metadata-value">v22.17.1 (darwin arm64)</text>
140
140
 
141
141
  <text x="0" y="85" class="metadata-label">Platform:</text>
142
142
  <text x="150" y="85" class="metadata-value">darwin arm64</text>
File without changes
package/package.json CHANGED
@@ -1,69 +1,59 @@
1
1
  {
2
2
  "name": "@fjell/registry",
3
- "version": "4.4.17",
3
+ "description": "Dependency injection and service location system for the Fjell ecosystem",
4
+ "version": "4.4.22",
4
5
  "keywords": [
5
6
  "registry",
7
+ "dependency-injection",
8
+ "service-locator",
6
9
  "fjell"
7
10
  ],
8
11
  "license": "Apache-2.0",
9
- "description": "Common Registry for Fjell",
10
- "engines": {
11
- "node": ">=21"
12
- },
13
- "main": "dist/index.cjs",
14
- "module": "dist/index.js",
12
+ "main": "./dist/index.js",
13
+ "module": "./dist/index.js",
15
14
  "exports": {
16
15
  ".": {
17
16
  "types": "./dist/index.d.ts",
18
- "require": "./dist/index.cjs",
19
17
  "import": "./dist/index.js"
20
18
  }
21
19
  },
22
20
  "type": "module",
21
+ "scripts": {
22
+ "lint": "eslint . --ext .ts --fix",
23
+ "dev": "concurrently \"tsc --noEmit --watch\" \"node build.js --watch\"",
24
+ "build": "npm run lint && tsc --noEmit && node build.js",
25
+ "typecheck": "tsc --noEmit",
26
+ "clean": "rimraf dist",
27
+ "test": "npm run lint && vitest run --coverage",
28
+ "prepublishOnly": "npm run clean && npm run build",
29
+ "docs:dev": "cd docs && npm run dev",
30
+ "docs:build": "cd docs && npm run build",
31
+ "docs:preview": "cd docs && npm run preview",
32
+ "docs:test": "cd docs && npm run test"
33
+ },
23
34
  "dependencies": {
24
- "@fjell/core": "^4.4.13",
25
- "@fjell/logging": "^4.4.17",
26
- "deepmerge": "^4.3.1"
35
+ "@fjell/core": "^4.4.25",
36
+ "@fjell/logging": "^4.4.30"
27
37
  },
28
38
  "devDependencies": {
29
39
  "@eslint/eslintrc": "^3.3.1",
30
- "@eslint/js": "^9.31.0",
31
- "@fjell/eslint-config": "^1.0.5",
40
+ "@eslint/js": "^9.32.0",
41
+ "@fjell/eslint-config": "^1.1.3",
32
42
  "@swc/core": "^1.13.2",
33
43
  "@tsconfig/recommended": "^1.0.10",
34
- "@types/multer": "^2.0.0",
35
- "@types/node": "^24.1.0",
36
44
  "@typescript-eslint/eslint-plugin": "^8.38.0",
37
45
  "@typescript-eslint/parser": "^8.38.0",
38
- "@vitejs/plugin-react": "^4.7.0",
39
- "@vitest/coverage-v8": "^3.2.4",
46
+ "@vitest/coverage-v8": "3.2.4",
40
47
  "concurrently": "^9.2.0",
41
- "eslint": "^9.31.0",
42
- "nodemon": "^3.1.10",
48
+ "esbuild": "^0.25.8",
49
+ "eslint": "^9.32.0",
50
+ "jsdom": "^26.1.0",
43
51
  "rimraf": "^6.0.1",
44
- "ts-node": "^10.9.2",
45
- "tsc-alias": "^1.8.16",
46
52
  "typescript": "^5.8.3",
47
- "vite": "^7.0.5",
48
- "vite-plugin-dts": "^4.5.4",
49
- "vite-plugin-node": "^7.0.0",
50
- "vitest": "^3.2.4"
53
+ "vitest": "3.2.4"
51
54
  },
52
55
  "repository": {
53
56
  "type": "git",
54
57
  "url": "git+https://github.com/getfjell/registry.git"
55
- },
56
- "scripts": {
57
- "build": "tsc --noEmit && vite build",
58
- "dev": "concurrently \"tsc --watch --noEmit\" \"vite build --watch\"",
59
- "lint": "eslint . --ext .ts --fix",
60
- "clean": "rimraf dist",
61
- "test": "pnpm run lint && vitest run --coverage",
62
- "test:memory:optimized": "pnpm run lint && NODE_OPTIONS=\"--max-old-space-size=8192 --max-semi-space-size=1024\" vitest run tests/memory.test.ts",
63
- "test:timing:optimized": "pnpm run lint && NODE_OPTIONS=\"--max-old-space-size=8192 --max-semi-space-size=1024\" vitest run tests/timing.test.ts",
64
- "docs:dev": "cd docs && pnpm run dev",
65
- "docs:build": "cd docs && pnpm run build",
66
- "docs:preview": "cd docs && pnpm run preview",
67
- "docs:test": "cd docs && pnpm run test"
68
58
  }
69
59
  }
@@ -0,0 +1,28 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "lib": [
6
+ "ES2020",
7
+ "DOM",
8
+ "DOM.Iterable"
9
+ ],
10
+ "types": [
11
+ "vitest/globals"
12
+ ],
13
+ "module": "ESNext",
14
+ "skipLibCheck": true,
15
+ /* Bundler mode */
16
+ "moduleResolution": "bundler",
17
+ "allowImportingTsExtensions": true,
18
+ "resolveJsonModule": true,
19
+ "isolatedModules": true,
20
+ "noEmit": true,
21
+ "jsx": "react-jsx",
22
+ /* Linting */
23
+ "strict": true,
24
+ "noUnusedLocals": true,
25
+ "noUnusedParameters": true,
26
+ "noFallthroughCasesInSwitch": true
27
+ }
28
+ }
@@ -0,0 +1,17 @@
1
+ /// <reference types="vitest" />
2
+ import { defineConfig } from 'vitest/config'
3
+ import { resolve } from 'path'
4
+
5
+ export default defineConfig({
6
+ resolve: {
7
+ alias: {
8
+ '@': resolve(__dirname, './src'),
9
+ },
10
+ },
11
+ test: {
12
+ environment: 'jsdom',
13
+ setupFiles: ['./tests/setup.ts'],
14
+ globals: true,
15
+ testTimeout: 30000,
16
+ },
17
+ })
@@ -1,200 +0,0 @@
1
- # Fjell Documentation Template Migration Summary
2
-
3
- ## Overview
4
-
5
- Successfully migrated fjell-registry, fjell-logging, and fjell-http-api from individual documentation implementations to a shared template system, dramatically reducing code duplication and improving maintainability.
6
-
7
- ## What Was Accomplished
8
-
9
- ### ✅ Created Shared Template Package (`@fjell/docs-template`)
10
-
11
- **Location**: `/fjell-docs-template/` (root level of getfjell workspace)
12
-
13
- **Key Components**:
14
- - **DocsApp**: Main application component with configurable navigation and content rendering
15
- - **Navigation**: Reusable sidebar with project branding and section navigation
16
- - **ContentRenderer**: Markdown rendering with syntax highlighting and image handling
17
- - **Layout**: Overall page structure with responsive design and modals
18
- - **Theme System**: CSS variables for project-specific branding (registry, logging, http-api, etc.)
19
-
20
- **Package Structure**:
21
- ```
22
- fjell-docs-template/
23
- ├── src/
24
- │ ├── components/ # Reusable React components
25
- │ ├── styles/ # Base CSS and theme system
26
- │ ├── utils/ # Content loading utilities
27
- │ └── types/ # TypeScript type definitions
28
- ├── config/ # Vite configuration templates
29
- └── dist/ # Built package output
30
- ```
31
-
32
- ### ✅ Migrated Three Projects
33
-
34
- #### 1. **fjell-registry** (Proof of Concept)
35
- - ✅ Reduced from ~600 lines of duplicated App.tsx to simple config file
36
- - ✅ Maintained all existing functionality (performance charts, examples, etc.)
37
- - ✅ Updated GitHub workflow to build template first
38
-
39
- #### 2. **fjell-logging**
40
- - ✅ Migrated to template with custom content processors
41
- - ✅ Theme: Orange/amber branding
42
- - ✅ Custom sections for logging-specific content
43
-
44
- #### 3. **fjell-http-api**
45
- - ✅ Migrated to template with inline content generation
46
- - ✅ Theme: Green branding
47
- - ✅ Preserved existing copy-examples plugin functionality
48
-
49
- ### ✅ Eliminated Massive Code Duplication
50
-
51
- **Before Migration**:
52
- - **App.tsx**: ~600-750 lines per project × 3 projects = **~2,000 lines**
53
- - **App.css**: ~1,200 lines per project × 3 projects = **~3,600 lines**
54
- - **Configuration files**: Duplicated across all projects
55
- - **Total Duplicated Code**: **~5,600+ lines**
56
-
57
- **After Migration**:
58
- - **Template Package**: ~1,500 lines (shared across all projects)
59
- - **Per-Project Config**: ~100 lines per project × 3 = **~300 lines**
60
- - **Total Code**: **~1,800 lines**
61
-
62
- **Result**: **~70% reduction in total code** while improving maintainability
63
-
64
- ### ✅ Enhanced Developer Experience
65
-
66
- **Simplified Project Structure**:
67
- ```
68
- project/docs/
69
- ├── docs.config.ts # Project-specific configuration
70
- ├── src/
71
- │ ├── main.tsx # Simple template import
72
- │ ├── index.css # Minimal project styles
73
- │ └── types.d.ts # Type declarations
74
- ├── package.json # Template dependency
75
- └── vite.config.ts # Basic configuration
76
- ```
77
-
78
- **Configuration-Driven Approach**:
79
- - **Sections**: Define navigation and content sources
80
- - **Branding**: Project-specific themes and colors
81
- - **Custom Content**: Override default content with project-specific logic
82
- - **Plugins**: Extend functionality (e.g., copy-examples for http-api)
83
-
84
- ### ✅ Improved Maintainability
85
-
86
- **Centralized Updates**:
87
- - Bug fixes and improvements made once in template
88
- - New features automatically available to all projects
89
- - Consistent UI/UX across all Fjell documentation
90
-
91
- **Version Management**:
92
- - Template versioned independently
93
- - Projects can update template dependency as needed
94
- - Breaking changes managed through semantic versioning
95
-
96
- ### ✅ Preserved Project-Specific Features
97
-
98
- **fjell-registry**:
99
- - Performance charts and memory analysis
100
- - Custom content processing for getting-started sections
101
- - SVG chart integration
102
-
103
- **fjell-logging**:
104
- - Component-based logging examples
105
- - Time logging and flood control documentation
106
- - Configuration-specific content extraction
107
-
108
- **fjell-http-api**:
109
- - Examples auto-copy functionality via Vite plugin
110
- - Inline content generation for API documentation
111
- - Method reference structure
112
-
113
- ### ✅ Updated CI/CD Pipeline
114
-
115
- **Modified GitHub Workflow**:
116
- - Template package built first in CI
117
- - Shared across all documentation builds
118
- - Maintains existing deployment patterns
119
-
120
- ## Technical Implementation
121
-
122
- ### Theme System
123
- CSS variables enable easy project-specific branding:
124
- ```css
125
- .brand-registry { --color-accent: #667EEA; }
126
- .brand-logging { --color-accent: #ED8936; }
127
- .brand-http-api { --color-accent: #48BB78; }
128
- ```
129
-
130
- ### Configuration System
131
- Type-safe configuration for each project:
132
- ```typescript
133
- interface DocsConfig {
134
- projectName: string;
135
- basePath: string;
136
- branding: { theme: string; };
137
- sections: DocumentSection[];
138
- customContent?: { [key: string]: ContentProcessor };
139
- }
140
- ```
141
-
142
- ### Content Processing
143
- Flexible content transformation:
144
- ```typescript
145
- customContent: {
146
- 'getting-started': createGettingStartedContent,
147
- 'performance': extractPerformanceSections
148
- }
149
- ```
150
-
151
- ## Benefits Achieved
152
-
153
- ### 🚀 **Faster Development**
154
- - New documentation sites can be created in minutes
155
- - Focus on content, not infrastructure
156
- - Consistent patterns reduce learning curve
157
-
158
- ### 🔧 **Easier Maintenance**
159
- - Single source of truth for documentation UI
160
- - Bug fixes propagate to all projects automatically
161
- - Consistent dependency management
162
-
163
- ### 🎨 **Better Consistency**
164
- - Unified design system across all Fjell projects
165
- - Consistent navigation and user experience
166
- - Shared performance optimizations
167
-
168
- ### 📦 **Reduced Bundle Size**
169
- - Eliminated duplicate dependencies
170
- - Shared React/CSS reduces overall footprint
171
- - External dependencies managed centrally
172
-
173
- ## Next Steps
174
-
175
- ### Immediate
176
- 1. **Resolve Module Resolution**: Fix template package dependency issues in fjell-logging and fjell-http-api
177
- 2. **Test Deployments**: Verify GitHub Pages deployment works correctly for all projects
178
- 3. **Documentation**: Create setup guide for future Fjell projects
179
-
180
- ### Future Enhancements
181
- 1. **Publish to NPM**: Make template publicly available
182
- 2. **CLI Tool**: Create `create-fjell-docs` for instant project setup
183
- 3. **More Themes**: Add themes for remaining Fjell projects (core, cache, etc.)
184
- 4. **Plugin System**: Expand plugin architecture for custom functionality
185
- 5. **Search Integration**: Add documentation search capabilities
186
-
187
- ## Success Metrics
188
-
189
- - ✅ **70% code reduction** across documentation projects
190
- - ✅ **100% feature preservation** during migration
191
- - ✅ **3 projects migrated** successfully
192
- - ✅ **Consistent UI/UX** maintained across all projects
193
- - ✅ **Build process** successfully updated
194
- - ✅ **Template package** created and functional
195
-
196
- ## Conclusion
197
-
198
- The migration successfully demonstrates the power of template-driven development for documentation sites. By extracting common patterns into a shared package, we've dramatically reduced maintenance overhead while preserving all project-specific functionality and improving the overall developer experience.
199
-
200
- This approach provides a scalable foundation for all future Fjell project documentation and serves as a model for similar consolidation efforts across the ecosystem.
@@ -1,32 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const logger$1 = require('./logger.cjs');
6
-
7
- const logger = logger$1.default.get("Coordinate");
8
- const createCoordinate = (kta, scopes = [])=>{
9
- const ktArray = Array.isArray(kta) ? kta : [
10
- kta
11
- ];
12
- const toString = ()=>{
13
- logger.debug("toString", {
14
- kta,
15
- scopes
16
- });
17
- return `${ktArray.join(', ')} - ${scopes.join(', ')}`;
18
- };
19
- logger.debug("createCoordinate", {
20
- kta: ktArray,
21
- scopes,
22
- toString
23
- });
24
- return {
25
- kta: ktArray,
26
- scopes,
27
- toString
28
- };
29
- };
30
-
31
- exports.createCoordinate = createCoordinate;
32
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29vcmRpbmF0ZS5janMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
@@ -1,28 +0,0 @@
1
- import LibLogger from './logger.js';
2
-
3
- const logger = LibLogger.get("Coordinate");
4
- const createCoordinate = (kta, scopes = [])=>{
5
- const ktArray = Array.isArray(kta) ? kta : [
6
- kta
7
- ];
8
- const toString = ()=>{
9
- logger.debug("toString", {
10
- kta,
11
- scopes
12
- });
13
- return `${ktArray.join(', ')} - ${scopes.join(', ')}`;
14
- };
15
- logger.debug("createCoordinate", {
16
- kta: ktArray,
17
- scopes,
18
- toString
19
- });
20
- return {
21
- kta: ktArray,
22
- scopes,
23
- toString
24
- };
25
- };
26
-
27
- export { createCoordinate };
28
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29vcmRpbmF0ZS5qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=
package/dist/Instance.cjs DELETED
@@ -1,24 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const logger$1 = require('./logger.cjs');
6
-
7
- const logger = logger$1.default.get("Instance");
8
- const createInstance = (registry, coordinate)=>{
9
- logger.debug("createInstance", {
10
- coordinate,
11
- registry
12
- });
13
- return {
14
- coordinate,
15
- registry
16
- };
17
- };
18
- const isInstance = (instance)=>{
19
- return instance !== null && instance !== undefined && instance.coordinate !== undefined && instance.registry !== undefined;
20
- };
21
-
22
- exports.createInstance = createInstance;
23
- exports.isInstance = isInstance;
24
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5zdGFuY2UuY2pzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9
package/dist/Instance.js DELETED
@@ -1,19 +0,0 @@
1
- import LibLogger from './logger.js';
2
-
3
- const logger = LibLogger.get("Instance");
4
- const createInstance = (registry, coordinate)=>{
5
- logger.debug("createInstance", {
6
- coordinate,
7
- registry
8
- });
9
- return {
10
- coordinate,
11
- registry
12
- };
13
- };
14
- const isInstance = (instance)=>{
15
- return instance !== null && instance !== undefined && instance.coordinate !== undefined && instance.registry !== undefined;
16
- };
17
-
18
- export { createInstance, isInstance };
19
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5zdGFuY2UuanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9