@fjell/registry 4.4.17 → 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 (60) 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 +1 -0
  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 +1 -0
  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 +40 -40
  35. package/package.json +21 -33
  36. package/tsconfig.docs.json +28 -0
  37. package/vitest.config.ts +17 -0
  38. package/MIGRATION_SUMMARY.md +0 -200
  39. package/dist/Coordinate.cjs +0 -32
  40. package/dist/Coordinate.js +0 -28
  41. package/dist/Instance.cjs +0 -24
  42. package/dist/Instance.js +0 -19
  43. package/dist/Registry.cjs +0 -182
  44. package/dist/Registry.js +0 -178
  45. package/dist/RegistryHub.cjs +0 -94
  46. package/dist/RegistryHub.js +0 -90
  47. package/dist/RegistryStats.cjs +0 -198
  48. package/dist/RegistryStats.js +0 -194
  49. package/dist/errors/CoordinateError.cjs +0 -70
  50. package/dist/errors/CoordinateError.js +0 -63
  51. package/dist/errors/InstanceError.cjs +0 -101
  52. package/dist/errors/InstanceError.js +0 -92
  53. package/dist/errors/RegistryError.cjs +0 -82
  54. package/dist/errors/RegistryError.js +0 -75
  55. package/dist/errors/RegistryHubError.cjs +0 -92
  56. package/dist/errors/RegistryHubError.js +0 -84
  57. package/dist/index.cjs +0 -821
  58. package/dist/index.cjs.map +0 -1
  59. package/dist/logger.cjs +0 -10
  60. package/dist/logger.js +0 -6
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
  },
@@ -21,6 +21,10 @@ declare module '@fjell/docs-template' {
21
21
  subtitle: string;
22
22
  file: string;
23
23
  }>;
24
+ filesToCopy: Array<{
25
+ source: string;
26
+ destination: string;
27
+ }>;
24
28
  plugins?: any[];
25
29
  version: {
26
30
  source: string;
@@ -34,11 +38,15 @@ declare module '@fjell/docs-template' {
34
38
  config: DocsConfig;
35
39
  }
36
40
 
37
- export const DocsApp: React.ComponentType<DocsAppProps>;
41
+ export const DocsApp: any;
38
42
  }
39
43
 
40
- declare module '../docs.config.ts' {
41
- import type { DocsConfig } from '@fjell/docs-template'
42
- const config: DocsConfig
43
- export default config
44
+ declare module '@fjell/docs-template/config' {
45
+ export function createDocsViteConfig(options?: {
46
+ basePath?: string;
47
+ port?: number;
48
+ plugins?: any[];
49
+ packageJsonPath?: string;
50
+ defineVars?: Record<string, any>;
51
+ }): any;
44
52
  }
@@ -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="393.22897224509614" x2="1015" y2="393.22897224509614" class="grid"/>
35
+ <text x="-10" y="397.22897224509614" text-anchor="end" class="label">0.20µs</text>
36
+ <line x1="0" y1="285.8524636086765" x2="1015" y2="285.8524636086765" class="grid"/>
37
+ <text x="-10" y="289.8524636086765" text-anchor="end" class="label">0.50µs</text>
38
+ <line x1="0" y1="204.6252705021037" x2="1015" y2="204.6252705021037" class="grid"/>
39
+ <text x="-10" y="208.6252705021037" text-anchor="end" class="label">1.0µs</text>
40
+ <line x1="0" y1="123.39807739553095" x2="1015" y2="123.39807739553095" class="grid"/>
41
+ <text x="-10" y="127.39807739553095" text-anchor="end" class="label">2.0µs</text>
42
+ <line x1="0" y1="16.021568759111233" x2="1015" y2="16.021568759111233" class="grid"/>
43
+ <text x="-10" y="20.021568759111233" 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 81.22719310657283 L 76.38636139973525 127.37076593632901 L 177.36363860026475 140.36368304266443 L 253.75 131.8407505931923 L 330.1363613997352 153.10100791189012 L 431.1136386002648 157.2027875202291 L 507.5 148.14280012187862 L 583.8863613997353 160.25564146596378 L 684.8636386002647 151.99052603552718 L 761.25 117.87736443311223 L 837.6363613997353 118.7512616667658 L 938.6136386002647 176.3890488072118 L 1015 189.01182654132322" class="register-mean"/>
80
+ <path d="M 0 308.1116006867061 L 76.38636139973525 371.64731920541044 L 177.36363860026475 378.7728068934272 L 253.75 344.65292696631695 L 330.1363613997352 372.9529342358376 L 431.1136386002648 357.41252615666247 L 507.5 358.05264872672586 L 583.8863613997353 359.27110078280924 L 684.8636386002647 238.78218846609843 L 761.25 285.5603316099687 L 837.6363613997353 262.92859355624 L 938.6136386002647 295.3772854109651 L 1015 291.9403211688891" class="lookup-mean"/>
81
+ <circle cx="0" cy="81.22719310657283" r="4" class="register-dot"/>
82
+ <circle cx="76.38636139973525" cy="127.37076593632901" r="4" class="register-dot"/>
83
+ <circle cx="177.36363860026475" cy="140.36368304266443" r="4" class="register-dot"/>
84
+ <circle cx="253.75" cy="131.8407505931923" r="4" class="register-dot"/>
85
+ <circle cx="330.1363613997352" cy="153.10100791189012" r="4" class="register-dot"/>
86
+ <circle cx="431.1136386002648" cy="157.2027875202291" r="4" class="register-dot"/>
87
+ <circle cx="507.5" cy="148.14280012187862" r="4" class="register-dot"/>
88
+ <circle cx="583.8863613997353" cy="160.25564146596378" r="4" class="register-dot"/>
89
+ <circle cx="684.8636386002647" cy="151.99052603552718" r="4" class="register-dot"/>
90
+ <circle cx="761.25" cy="117.87736443311223" r="4" class="register-dot"/>
91
+ <circle cx="837.6363613997353" cy="118.7512616667658" r="4" class="register-dot"/>
92
+ <circle cx="938.6136386002647" cy="176.3890488072118" r="4" class="register-dot"/>
93
+ <circle cx="1015" cy="189.01182654132322" r="4" class="register-dot"/>
94
+ <circle cx="0" cy="308.1116006867061" r="4" class="lookup-dot"/>
95
+ <circle cx="76.38636139973525" cy="371.64731920541044" r="4" class="lookup-dot"/>
96
+ <circle cx="177.36363860026475" cy="378.7728068934272" r="4" class="lookup-dot"/>
97
+ <circle cx="253.75" cy="344.65292696631695" r="4" class="lookup-dot"/>
98
+ <circle cx="330.1363613997352" cy="372.9529342358376" r="4" class="lookup-dot"/>
99
+ <circle cx="431.1136386002648" cy="357.41252615666247" r="4" class="lookup-dot"/>
100
+ <circle cx="507.5" cy="358.05264872672586" r="4" class="lookup-dot"/>
101
+ <circle cx="583.8863613997353" cy="359.27110078280924" r="4" class="lookup-dot"/>
102
+ <circle cx="684.8636386002647" cy="238.78218846609843" r="4" class="lookup-dot"/>
103
+ <circle cx="761.25" cy="285.5603316099687" r="4" class="lookup-dot"/>
104
+ <circle cx="837.6363613997353" cy="262.92859355624" r="4" class="lookup-dot"/>
105
+ <circle cx="938.6136386002647" cy="295.3772854109651" r="4" class="lookup-dot"/>
106
+ <circle cx="1015" cy="291.9403211688891" 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-25</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>
package/package.json CHANGED
@@ -1,69 +1,57 @@
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.20",
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",
23
21
  "dependencies": {
24
- "@fjell/core": "^4.4.13",
25
- "@fjell/logging": "^4.4.17",
26
- "deepmerge": "^4.3.1"
22
+ "@fjell/core": "^4.4.25",
23
+ "@fjell/logging": "^4.4.30"
27
24
  },
28
25
  "devDependencies": {
29
26
  "@eslint/eslintrc": "^3.3.1",
30
- "@eslint/js": "^9.31.0",
31
- "@fjell/eslint-config": "^1.0.5",
27
+ "@eslint/js": "^9.32.0",
28
+ "@fjell/eslint-config": "^1.1.3",
32
29
  "@swc/core": "^1.13.2",
33
30
  "@tsconfig/recommended": "^1.0.10",
34
- "@types/multer": "^2.0.0",
35
- "@types/node": "^24.1.0",
36
31
  "@typescript-eslint/eslint-plugin": "^8.38.0",
37
32
  "@typescript-eslint/parser": "^8.38.0",
38
- "@vitejs/plugin-react": "^4.7.0",
39
- "@vitest/coverage-v8": "^3.2.4",
33
+ "@vitest/coverage-v8": "3.2.4",
40
34
  "concurrently": "^9.2.0",
41
- "eslint": "^9.31.0",
42
- "nodemon": "^3.1.10",
35
+ "esbuild": "^0.25.8",
36
+ "eslint": "^9.32.0",
43
37
  "rimraf": "^6.0.1",
44
- "ts-node": "^10.9.2",
45
- "tsc-alias": "^1.8.16",
46
38
  "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"
39
+ "vitest": "3.2.4"
51
40
  },
52
41
  "repository": {
53
42
  "type": "git",
54
43
  "url": "git+https://github.com/getfjell/registry.git"
55
44
  },
56
45
  "scripts": {
57
- "build": "tsc --noEmit && vite build",
58
- "dev": "concurrently \"tsc --watch --noEmit\" \"vite build --watch\"",
59
46
  "lint": "eslint . --ext .ts --fix",
47
+ "dev": "concurrently \"tsc --noEmit --watch\" \"node build.js --watch\"",
48
+ "build": "pnpm run lint && tsc --noEmit && node build.js",
49
+ "typecheck": "tsc --noEmit",
60
50
  "clean": "rimraf dist",
61
51
  "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"
52
+ "docs:dev": "cd docs && npm run dev",
53
+ "docs:build": "cd docs && npm run build",
54
+ "docs:preview": "cd docs && npm run preview",
55
+ "docs:test": "cd docs && npm run test"
68
56
  }
69
57
  }
@@ -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