@starci/hfs 1.0.0

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 (74) hide show
  1. package/README.md +38 -0
  2. package/bin/hfs.mjs +100 -0
  3. package/package.json +28 -0
  4. package/runtime/engine/runtime-root.mjs +32 -0
  5. package/runtime/engine/yaml.mjs +161 -0
  6. package/runtime/knowledge/hfs/canon-pins.yaml +212 -0
  7. package/runtime/knowledge/hfs/slots.yaml +842 -0
  8. package/runtime/modules/kernel/failure-codes.yaml +169 -0
  9. package/runtime/scripts/lib/glob.mjs +23 -0
  10. package/runtime/scripts/lib/hfs-check.mjs +305 -0
  11. package/runtime/scripts/lib/hfs-slots.mjs +675 -0
  12. package/runtime/scripts/lib/path-key.mjs +15 -0
  13. package/sync/cli.mjs +15 -0
  14. package/sync/hygiene.mjs +92 -0
  15. package/sync/index.mjs +224 -0
  16. package/sync/skeleton.mjs +54 -0
  17. package/sync/sonar-key.mjs +45 -0
  18. package/templates/be/e2e.yml +21 -0
  19. package/templates/be/gitignore +2 -0
  20. package/templates/be/pre-commit +8 -0
  21. package/templates/be/skeleton/apps/__app__/src/__app__.composition.spec.ts +31 -0
  22. package/templates/be/skeleton/apps/__app__/src/__app__.options.ts +7 -0
  23. package/templates/be/skeleton/apps/__app__/src/app.module.ts +23 -0
  24. package/templates/be/skeleton/apps/__app__/src/main.ts +20 -0
  25. package/templates/be/skeleton/src/features/system-health/index.ts +1 -0
  26. package/templates/be/skeleton/src/features/system-health/system-health.module.ts +6 -0
  27. package/templates/be/skeleton/src/features/system-health/transport/http/live.controller.spec.ts +13 -0
  28. package/templates/be/skeleton/src/features/system-health/transport/http/live.controller.ts +18 -0
  29. package/templates/be/skeleton/src/features/system-health/transport/http/system-health-http.module.ts +10 -0
  30. package/templates/be/skeleton/src/modules/platform/config/env-source.spec.ts +36 -0
  31. package/templates/be/skeleton/src/modules/platform/config/env-source.ts +40 -0
  32. package/templates/be/skeleton/src/modules/platform/config/errors/config.error.ts +21 -0
  33. package/templates/be/skeleton/src/modules/platform/config/index.ts +5 -0
  34. package/templates/be/skeleton/src/modules/platform/config/server.config.spec.ts +19 -0
  35. package/templates/be/skeleton/src/modules/platform/config/server.config.ts +15 -0
  36. package/templates/be/skeleton/src/modules/platform/config/server.options.ts +8 -0
  37. package/templates/be/skeleton/src/modules/platform/errors/domain-error.spec.ts +15 -0
  38. package/templates/be/skeleton/src/modules/platform/errors/domain-error.ts +11 -0
  39. package/templates/be/skeleton/src/modules/platform/errors/error.filter.spec.ts +38 -0
  40. package/templates/be/skeleton/src/modules/platform/errors/error.filter.ts +24 -0
  41. package/templates/be/skeleton/src/modules/platform/errors/index.ts +2 -0
  42. package/templates/be/skeleton/src/modules/platform/logging/index.ts +5 -0
  43. package/templates/be/skeleton/src/modules/platform/logging/json-logger.spec.ts +33 -0
  44. package/templates/be/skeleton/src/modules/platform/logging/json-logger.ts +35 -0
  45. package/templates/be/skeleton/src/modules/platform/logging/log-id.ts +9 -0
  46. package/templates/be/skeleton/src/modules/platform/logging/logger.port.ts +19 -0
  47. package/templates/be/skeleton/src/modules/platform/logging/logging.module.ts +11 -0
  48. package/templates/be/sonar-project.properties +10 -0
  49. package/templates/be/starciwork.gitignore +39 -0
  50. package/templates/common/ci.yml +50 -0
  51. package/templates/common/codecov.yml +13 -0
  52. package/templates/common/gitignore.base +33 -0
  53. package/templates/common/pre-push +5 -0
  54. package/templates/fe/e2e.yml +22 -0
  55. package/templates/fe/gitignore +3 -0
  56. package/templates/fe/pre-commit +7 -0
  57. package/templates/fe/skeleton/apps/__app__/next.config.ts +11 -0
  58. package/templates/fe/skeleton/apps/__app__/src/app/[locale]/error.tsx +22 -0
  59. package/templates/fe/skeleton/apps/__app__/src/app/[locale]/layout.tsx +31 -0
  60. package/templates/fe/skeleton/apps/__app__/src/app/[locale]/not-found.tsx +15 -0
  61. package/templates/fe/skeleton/apps/__app__/src/app/[locale]/page.tsx +27 -0
  62. package/templates/fe/skeleton/apps/__app__/src/app/global-error.tsx +24 -0
  63. package/templates/fe/skeleton/apps/__app__/src/app/globals.css +1 -0
  64. package/templates/fe/skeleton/apps/__app__/src/app/health/live/route.spec.ts +10 -0
  65. package/templates/fe/skeleton/apps/__app__/src/app/health/live/route.ts +5 -0
  66. package/templates/fe/skeleton/apps/__app__/src/modules/i18n/config.ts +8 -0
  67. package/templates/fe/skeleton/apps/__app__/src/modules/i18n/messages/vi.json +19 -0
  68. package/templates/fe/skeleton/apps/__app__/src/modules/i18n/messages.spec.ts +27 -0
  69. package/templates/fe/skeleton/apps/__app__/src/modules/i18n/navigation.ts +5 -0
  70. package/templates/fe/skeleton/apps/__app__/src/modules/i18n/request.ts +13 -0
  71. package/templates/fe/skeleton/apps/__app__/src/modules/i18n/routing.spec.ts +10 -0
  72. package/templates/fe/skeleton/apps/__app__/src/modules/i18n/routing.ts +9 -0
  73. package/templates/fe/skeleton/apps/__app__/src/proxy.ts +10 -0
  74. package/templates/fe/sonar-project.properties +11 -0
@@ -0,0 +1,212 @@
1
+ schema: starci/canon-pins@1
2
+ purpose: >-
3
+ The exact version of every dependency a StarCi product repository pins. One version per dependency for the whole
4
+ family. Raising a version is a change to this file first (with the package bump when it is a @starci package),
5
+ then the repositories' own upgrade lane (each sets the exact version and reinstalls; nothing else installs a @starci package). Read on 2026-09-29 from the packages under
6
+ .claude/packages and from the installed node_modules of nivo-backend, nivo-fe, starci-next, starci-next-fe,
7
+ mia-mia-backend and miamia-fe; where they disagreed the newest version installed in more than one repository
8
+ won, and the runtime's own version won for @starci packages.
9
+ pins:
10
+ # --- @starci packages. Every @starci package is a PUBLISHED npm package (install: registry): a product repository
11
+ # installs the exact pinned version from the npm registry in the root and every workspace package.json, never `file:`.
12
+ '@starci/grammar':
13
+ version: 0.7.1
14
+ group: starci
15
+ install: registry
16
+ side: fe
17
+ source: packages/grammar/package.json
18
+ why: nivo-fe pins 0.4.11 and 0.5.0 in one workspace, starci-next-fe 0.5.1, miamia-fe 0.5.0; the runtime source is 0.7.1.
19
+ '@starci/eslint-canon-be':
20
+ version: 1.7.0
21
+ group: starci
22
+ install: registry
23
+ side: be
24
+ source: packages/eslint/be/package.json
25
+ why: 'back-end repositories carry 1.2.1 and 1.2.2 while the runtime source is 1.7.0: the round-3 catch-up landed the nest code-pattern profile''s version and content digest, left unbumped when R78-R82 landed, plus the inbox-dedupe-required shape-detection fix; 1.7.0 adds named-entity-manager-only (R83).'
26
+ '@starci/eslint-canon-fe':
27
+ version: 5.1.2
28
+ group: starci
29
+ install: registry
30
+ side: fe
31
+ source: packages/eslint/fe/package.json
32
+ why: 'every front-end repository carries 3.0.2 or 4.0.0 while the runtime source is 5.1.0: the vn-ok pragma is gone, starciFeConfig enables every rule and the React Hooks rules at error, and 5.1.0 adds the list, effect, formatter, navigation, metadata and type-safety rules that repositories used to carry in their own config.'
33
+ '@starci/stylelint-canon':
34
+ version: 1.1.0
35
+ group: starci
36
+ install: registry
37
+ side: fe
38
+ source: packages/stylelint/package.json
39
+ why: no front-end repository lints its CSS yet (nivo-fe apps/landing carries 4.3k lines of raw CSS); the runtime source is the first release.
40
+ '@starci/tsconfig':
41
+ version: 1.0.0
42
+ group: starci
43
+ install: registry
44
+ side: both
45
+ source: packages/tsconfig/package.json
46
+ '@starci/prettier-config':
47
+ version: 1.0.0
48
+ group: starci
49
+ install: registry
50
+ side: both
51
+ source: packages/prettier-config/package.json
52
+ '@starci/jest-preset':
53
+ version: 1.1.0
54
+ group: starci
55
+ install: registry
56
+ side: be
57
+ source: packages/jest-preset/package.json
58
+ why: gains the FakeClock test double (./clock) for the platform/clock Clock port, used by the R79 no-ambient-clock migration.
59
+ '@starci/vitest-preset':
60
+ version: 1.0.0
61
+ group: starci
62
+ install: registry
63
+ side: fe
64
+ source: packages/vitest-preset/package.json
65
+ '@starci/playwright-preset':
66
+ version: 1.0.0
67
+ group: starci
68
+ install: registry
69
+ side: fe
70
+ source: packages/playwright-preset/package.json
71
+ '@starci/hfs':
72
+ version: 1.0.0
73
+ group: starci
74
+ install: registry
75
+ side: both
76
+ source: packages/hfs/package.json
77
+ why: the hfs command line (check, init, explain) of every product repository, installed from the npm registry.
78
+ # --- tooling
79
+ typescript:
80
+ version: 5.9.3
81
+ group: tooling
82
+ side: both
83
+ why: all six repositories resolve 5.9.3 already; the declared ranges (^5, ^5.7.3) become exact.
84
+ prettier:
85
+ version: 3.9.6
86
+ group: tooling
87
+ side: both
88
+ why: only nivo-backend has it installed (3.9.6); the other five adopt it with the formatter change.
89
+ stylelint:
90
+ version: 17.15.0
91
+ group: tooling
92
+ side: fe
93
+ why: no repository has it installed; 17.15.0 is the current release, and the canon plugin needs the ESM-only 17 line.
94
+ postcss-value-parser:
95
+ version: 4.2.0
96
+ group: tooling
97
+ side: fe
98
+ why: peer of @starci/stylelint-canon (it parses declaration values); 4.2.0 is what stylelint 17.15.0 itself resolves.
99
+ eslint:
100
+ version: 9.39.5
101
+ group: tooling
102
+ side: both
103
+ why: five repositories resolve 9.39.5, nivo-backend 9.39.4.
104
+ eslint-plugin-react-hooks:
105
+ version: 7.1.1
106
+ group: tooling
107
+ side: fe
108
+ why: '@starci/eslint-canon-fe 5.0.0 enables its recommended set (set-state-in-effect, refs, purity, immutability) at error and needs version 7 or newer; 7.1.1 is what the runtime examples resolve.'
109
+ '@types/node':
110
+ version: 22.20.4
111
+ group: tooling
112
+ side: both
113
+ why: nivo-fe resolves 20.19.43 and nivo-backend 22.20.0; the package engines are node >=22.
114
+ # --- test
115
+ jest:
116
+ version: 29.7.0
117
+ group: test
118
+ side: be
119
+ ts-jest:
120
+ version: 29.4.12
121
+ group: test
122
+ side: be
123
+ '@types/jest':
124
+ version: 29.5.14
125
+ group: test
126
+ side: be
127
+ vitest:
128
+ version: 3.2.7
129
+ group: test
130
+ side: fe
131
+ '@vitest/coverage-v8':
132
+ version: 3.2.7
133
+ group: test
134
+ side: fe
135
+ '@playwright/test':
136
+ version: 1.63.0
137
+ group: test
138
+ side: fe
139
+ why: nivo-fe pins 1.51.1 and starci-next-fe 1.63.0; the newer wins and the viewport projects need no older API.
140
+ jsdom:
141
+ version: 29.1.1
142
+ group: test
143
+ side: fe
144
+ '@vitejs/plugin-react':
145
+ version: 5.2.0
146
+ group: test
147
+ side: fe
148
+ '@testing-library/react':
149
+ version: 16.3.3
150
+ group: test
151
+ side: fe
152
+ why: nivo-fe resolves 16.3.2, the other two 16.3.3.
153
+ '@testing-library/jest-dom':
154
+ version: 7.0.1
155
+ group: test
156
+ side: fe
157
+ # --- framework
158
+ next:
159
+ version: 16.1.6
160
+ group: framework
161
+ side: fe
162
+ react:
163
+ version: 19.2.3
164
+ group: framework
165
+ side: fe
166
+ react-dom:
167
+ version: 19.2.3
168
+ group: framework
169
+ side: fe
170
+ '@nestjs/core':
171
+ version: 11.2.5
172
+ group: framework
173
+ side: be
174
+ why: nivo-backend resolves 11.1.27, starci-next and mia-mia-backend 11.2.5.
175
+ '@nestjs/common':
176
+ version: 11.2.5
177
+ group: framework
178
+ side: be
179
+ '@nestjs/platform-express':
180
+ version: 11.2.5
181
+ group: framework
182
+ side: be
183
+ '@nestjs/testing':
184
+ version: 11.2.5
185
+ group: framework
186
+ side: be
187
+ '@nestjs/terminus':
188
+ version: 11.1.1
189
+ group: framework
190
+ side: be
191
+ why: the health skeleton (hfs sync --init) answers { status, info, error, details } through Terminus; nivo-backend, starci-next and mia-mia-backend all resolve 11.1.1.
192
+ next-intl:
193
+ version: 4.13.6
194
+ group: framework
195
+ side: fe
196
+ why: every HFS front end uses next-intl with the [locale] segment (hfs sync --init writes it); nivo-fe resolves 4.13.6.
197
+ supertest:
198
+ version: 7.3.0
199
+ group: tooling
200
+ side: be
201
+ why: the composition spec of the back-end skeleton boots the real AppModule and calls /health/live; starci-next and mia-mia-backend resolve 7.3.0, nivo-backend 7.2.2.
202
+ # --- ui
203
+ '@heroui/react':
204
+ version: 3.2.6
205
+ group: ui
206
+ side: fe
207
+ why: nivo-fe resolves 3.2.4, starci-next-fe and miamia-fe 3.2.6.
208
+ '@heroui/styles':
209
+ version: 3.2.6
210
+ group: ui
211
+ side: fe
212
+ why: nivo-fe resolves 3.2.4, starci-next-fe and miamia-fe 3.2.6.