ondc-code-generator 0.8.9 → 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 (95) hide show
  1. package/alpha/possible-json-paths.json +34134 -0
  2. package/alpha/table/page/index.html +11487 -0
  3. package/alpha/table/page/style.css +449 -0
  4. package/alpha/table/rag-table-docs/confirm.md +63 -0
  5. package/alpha/table/rag-table-docs/init.md +81 -0
  6. package/alpha/table/rag-table-docs/on_confirm.md +164 -0
  7. package/alpha/table/rag-table-docs/on_init.md +146 -0
  8. package/alpha/table/rag-table-docs/on_search.md +163 -0
  9. package/alpha/table/rag-table-docs/on_select.md +99 -0
  10. package/alpha/table/rag-table-docs/on_status.md +153 -0
  11. package/alpha/table/rag-table-docs/on_update.md +164 -0
  12. package/alpha/table/rag-table-docs/raw_table.json +11198 -0
  13. package/alpha/table/rag-table-docs/search.md +128 -0
  14. package/alpha/table/rag-table-docs/select.md +70 -0
  15. package/alpha/table/rag-table-docs/status.md +44 -0
  16. package/alpha/table/rag-table-docs/update.md +51 -0
  17. package/alpha/table/readme.md +1312 -0
  18. package/alpha/table/validPaths.json +34134 -0
  19. package/alpha/table.zip +0 -0
  20. package/dist/bin/cli.js +4 -0
  21. package/dist/generator/config-compiler.d.ts +16 -2
  22. package/dist/generator/config-compiler.js +57 -19
  23. package/dist/generator/generators/classes/abstract-generator.d.ts +2 -0
  24. package/dist/generator/generators/documentation/md-generator.d.ts +12 -5
  25. package/dist/generator/generators/documentation/md-generator.js +23 -28
  26. package/dist/generator/generators/documentation/templates/index.mustache +162 -26
  27. package/dist/generator/generators/documentation/templates/style.css +387 -142
  28. package/dist/generator/generators/go/go-generator.js +1 -1
  29. package/dist/generator/generators/javascript/js-generator.js +1 -1
  30. package/dist/generator/generators/python/py-generator.js +1 -1
  31. package/dist/generator/generators/rag/rag-generator.d.ts +48 -0
  32. package/dist/generator/generators/rag/rag-generator.js +185 -0
  33. package/dist/generator/generators/rag/rag-table-generator.d.ts +55 -0
  34. package/dist/generator/generators/rag/rag-table-generator.js +269 -0
  35. package/dist/generator/generators/typescript/ts-generator.js +1 -1
  36. package/dist/index.test.js +12 -3
  37. package/dist/types/build.d.ts +4 -0
  38. package/dist/types/compiler-types.d.ts +3 -1
  39. package/dist/types/compiler-types.js +2 -0
  40. package/package.json +1 -1
  41. package/alpha/docs/page/index.html +0 -6137
  42. package/alpha/docs/page/style.css +0 -204
  43. package/alpha/docs/readme.md +0 -5939
  44. package/alpha/docs/validPaths.json +0 -14351
  45. package/alpha/page/index.html +0 -6137
  46. package/alpha/page/style.css +0 -204
  47. package/alpha/readme.md +0 -5939
  48. package/alpha/validationpkg/examples/search.json +0 -143
  49. package/alpha/validationpkg/examples_output/search/case-001/output.json +0 -12
  50. package/alpha/validationpkg/go.mod +0 -8
  51. package/alpha/validationpkg/go.sum +0 -4
  52. package/alpha/validationpkg/jsonvalidations/cancel.go +0 -1289
  53. package/alpha/validationpkg/jsonvalidations/confirm.go +0 -9121
  54. package/alpha/validationpkg/jsonvalidations/init.go +0 -4864
  55. package/alpha/validationpkg/jsonvalidations/issue.go +0 -4868
  56. package/alpha/validationpkg/jsonvalidations/on_cancel.go +0 -7111
  57. package/alpha/validationpkg/jsonvalidations/on_confirm.go +0 -8903
  58. package/alpha/validationpkg/jsonvalidations/on_init.go +0 -4445
  59. package/alpha/validationpkg/jsonvalidations/on_issue.go +0 -2828
  60. package/alpha/validationpkg/jsonvalidations/on_issue_status.go +0 -1938
  61. package/alpha/validationpkg/jsonvalidations/on_search.go +0 -3356
  62. package/alpha/validationpkg/jsonvalidations/on_status.go +0 -8129
  63. package/alpha/validationpkg/jsonvalidations/on_track.go +0 -1415
  64. package/alpha/validationpkg/jsonvalidations/on_update.go +0 -8700
  65. package/alpha/validationpkg/jsonvalidations/search.go +0 -3585
  66. package/alpha/validationpkg/jsonvalidations/status.go +0 -1073
  67. package/alpha/validationpkg/jsonvalidations/track.go +0 -1073
  68. package/alpha/validationpkg/jsonvalidations/update.go +0 -3012
  69. package/alpha/validationpkg/main-validator.go +0 -196
  70. package/alpha/validationpkg/main-validator_test.go +0 -165
  71. package/alpha/validationpkg/storageutils/api_save_utils.go +0 -83
  72. package/alpha/validationpkg/storageutils/cancel.go +0 -30
  73. package/alpha/validationpkg/storageutils/confirm.go +0 -30
  74. package/alpha/validationpkg/storageutils/index.go +0 -132
  75. package/alpha/validationpkg/storageutils/init.go +0 -30
  76. package/alpha/validationpkg/storageutils/issue.go +0 -30
  77. package/alpha/validationpkg/storageutils/on_cancel.go +0 -30
  78. package/alpha/validationpkg/storageutils/on_confirm.go +0 -30
  79. package/alpha/validationpkg/storageutils/on_init.go +0 -30
  80. package/alpha/validationpkg/storageutils/on_issue.go +0 -30
  81. package/alpha/validationpkg/storageutils/on_issue_status.go +0 -30
  82. package/alpha/validationpkg/storageutils/on_search.go +0 -30
  83. package/alpha/validationpkg/storageutils/on_status.go +0 -30
  84. package/alpha/validationpkg/storageutils/on_track.go +0 -30
  85. package/alpha/validationpkg/storageutils/on_update.go +0 -30
  86. package/alpha/validationpkg/storageutils/save_utils.go +0 -75
  87. package/alpha/validationpkg/storageutils/search.go +0 -30
  88. package/alpha/validationpkg/storageutils/status.go +0 -30
  89. package/alpha/validationpkg/storageutils/track.go +0 -30
  90. package/alpha/validationpkg/storageutils/update.go +0 -30
  91. package/alpha/validationpkg/validationutils/json_normalizer.go +0 -152
  92. package/alpha/validationpkg/validationutils/json_path_utils.go +0 -173
  93. package/alpha/validationpkg/validationutils/storage-interface.go +0 -107
  94. package/alpha/validationpkg/validationutils/test-config.go +0 -69
  95. package/alpha/validationpkg/validationutils/validation_utils.go +0 -429
@@ -1,204 +1,449 @@
1
- /* RESET DEFAULT STYLES */
2
- body, ul, li, p, blockquote {
3
- margin: 0;
4
- padding: 0;
1
+ /* ═══════════════════════════════════════════════════════════════
2
+ VARIABLES
3
+ ═══════════════════════════════════════════════════════════════ */
4
+ :root {
5
+ --bg: #0f1117;
6
+ --bg-mid: #161b27;
7
+ --bg-card: #1c2333;
8
+ --border: #2d3748;
9
+ --accent: #1296d9;
10
+ --accent-dim: #0e6fa3;
11
+ --text: #e2e8f0;
12
+ --text-muted: #8892a4;
13
+ --group-bg: #1a2540;
14
+ --group-text: #93c5fd;
15
+ --leaf-bg: #1c2333;
16
+ --mark-bg: #ffdd57;
17
+ --mark-text: #1a1a1a;
18
+ --sidebar-w: 200px;
19
+ --topbar-h: 56px;
20
+ --radius: 6px;
21
+ --font: "Inter", "Segoe UI", system-ui, sans-serif;
22
+ --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
5
23
  }
6
- ul, li {
7
- list-style: none;
24
+
25
+ /* ═══════════════════════════════════════════════════════════════
26
+ RESET & BASE
27
+ ═══════════════════════════════════════════════════════════════ */
28
+ *,
29
+ *::before,
30
+ *::after {
31
+ box-sizing: border-box;
32
+ margin: 0;
33
+ padding: 0;
34
+ }
35
+
36
+ html {
37
+ scroll-behavior: smooth;
8
38
  }
9
39
 
10
- /* BODY STYLES */
11
40
  body {
12
- font-family: "Helvetica Neue", Arial, sans-serif;
13
- background-color: #ffffff; /* Light background */
14
- color: #333333; /* Dark text */
15
- line-height: 1.8;
16
- padding: 20px;
41
+ font-family: var(--font);
42
+ background: var(--bg);
43
+ color: var(--text);
44
+ line-height: 1.6;
45
+ font-size: 14px;
46
+ min-height: 100vh;
17
47
  }
18
48
 
19
- /* LIST STYLES */
20
- ul {
21
- padding-left: 20px;
49
+ a {
50
+ color: var(--accent);
51
+ text-decoration: none;
52
+ }
53
+ a:hover {
54
+ text-decoration: underline;
22
55
  }
23
56
 
24
- li {
25
- margin-bottom: 16px;
26
- position: relative;
57
+ mark {
58
+ background: var(--mark-bg);
59
+ color: var(--mark-text);
60
+ border-radius: 2px;
61
+ padding: 0 2px;
27
62
  }
28
63
 
29
- li > p {
30
- margin-bottom: 8px;
31
- background-color: #f7f7f7; /* Light background */
32
- color: #555555; /* Dark text */
33
- padding: 10px 15px;
34
- border: 1px solid #ddd;
35
- border-radius: 5px;
36
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
37
- transition: background-color 0.3s, border 0.3s, box-shadow 0.3s;
64
+ /* ═══════════════════════════════════════════════════════════════
65
+ TOP BAR
66
+ ═══════════════════════════════════════════════════════════════ */
67
+ .top-bar {
68
+ position: fixed;
69
+ top: 0;
70
+ left: 0;
71
+ right: 0;
72
+ height: var(--topbar-h);
73
+ background: var(--bg-mid);
74
+ border-bottom: 1px solid var(--border);
75
+ display: flex;
76
+ align-items: center;
77
+ gap: 16px;
78
+ padding: 0 20px;
79
+ z-index: 100;
38
80
  }
39
81
 
40
- li > p:hover {
41
- background-color: #e8e8e8;
42
- border-color: #1296d9; /* Updated to blue accent color */
43
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
82
+ .logo {
83
+ font-weight: 700;
84
+ font-size: 15px;
85
+ color: var(--accent);
86
+ white-space: nowrap;
87
+ margin-right: 8px;
44
88
  }
45
89
 
46
- /* NESTED LIST ITEMS */
47
- ul ul li > p {
48
- background-color: #f0f0f0; /* Slightly darker than parent */
90
+ .toolbar {
91
+ display: flex;
92
+ align-items: center;
93
+ gap: 12px;
94
+ flex: 1;
95
+ overflow: hidden;
49
96
  }
50
97
 
51
- ul ul li > p:hover {
52
- background-color: #e0e0e0;
98
+ /* ── Search ── */
99
+ .search-wrap {
100
+ position: relative;
101
+ display: flex;
102
+ align-items: center;
103
+ flex: 1;
104
+ max-width: 480px;
53
105
  }
54
106
 
55
- /* HEADINGS AND EMPHASIS TEXT */
56
- h2,
57
- li > p > strong {
58
- color: #1296d9; /* Changed header color to match blue theme */
59
- font-weight: 600;
107
+ .search-icon {
108
+ position: absolute;
109
+ left: 10px;
110
+ width: 16px;
111
+ height: 16px;
112
+ color: var(--text-muted);
113
+ pointer-events: none;
60
114
  }
61
115
 
62
- li > p > strong {
63
- font-size: 1.1em;
116
+ #search {
117
+ width: 100%;
118
+ background: var(--bg-card);
119
+ border: 1px solid var(--border);
120
+ border-radius: var(--radius);
121
+ color: var(--text);
122
+ font-family: var(--font);
123
+ font-size: 13px;
124
+ padding: 7px 34px 7px 34px;
125
+ outline: none;
126
+ transition: border-color 0.15s;
64
127
  }
65
128
 
66
- /* BLOCKQUOTE STYLES */
67
- blockquote {
68
- margin: 15px 0;
69
- padding: 15px 20px;
70
- background-color: #f7f7f7;
71
- border-left: 5px solid #1296d9; /* Updated border to blue */
72
- color: #555555;
73
- font-style: italic;
74
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
75
- transition: background-color 0.3s, border-left-color 0.3s, box-shadow 0.3s;
129
+ #search:focus {
130
+ border-color: var(--accent);
131
+ box-shadow: 0 0 0 2px rgba(18, 150, 217, 0.18);
76
132
  }
77
133
 
78
- blockquote:hover {
79
- background-color: #e8e8e8;
80
- border-left-color: #1296d9; /* Updated hover border to blue */
81
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
134
+ #search::placeholder {
135
+ color: var(--text-muted);
82
136
  }
83
137
 
84
- /* BLOCKQUOTE INTERNAL ELEMENTS */
85
- blockquote > p {
86
- margin-bottom: 12px;
87
- padding: 10px 15px;
88
- background-color: #f7f7f7;
89
- border-radius: 5px;
90
- font-size: 1em;
91
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
92
- transition: background-color 0.3s, border 0.3s, box-shadow 0.3s;
138
+ .clear-btn {
139
+ position: absolute;
140
+ right: 8px;
141
+ background: none;
142
+ border: none;
143
+ color: var(--text-muted);
144
+ font-size: 16px;
145
+ cursor: pointer;
146
+ line-height: 1;
147
+ padding: 2px 4px;
148
+ }
149
+ .clear-btn:hover {
150
+ color: var(--text);
93
151
  }
94
152
 
95
- blockquote > p:hover {
96
- background-color: #e8e8e8;
97
- border: 1px solid #1296d9; /* Updated border to blue on hover */
98
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
153
+ /* ── Filter pills ── */
154
+ .filter-group {
155
+ display: flex;
156
+ gap: 6px;
157
+ flex-shrink: 0;
99
158
  }
100
159
 
101
- blockquote > ul {
102
- padding-left: 20px;
103
- margin-top: 10px;
160
+ .pill {
161
+ background: var(--bg-card);
162
+ border: 1px solid var(--border);
163
+ border-radius: 20px;
164
+ color: var(--text-muted);
165
+ font-size: 12px;
166
+ padding: 4px 12px;
167
+ cursor: pointer;
168
+ white-space: nowrap;
169
+ transition:
170
+ background 0.15s,
171
+ color 0.15s,
172
+ border-color 0.15s;
104
173
  }
105
174
 
106
- blockquote > ul > li {
107
- margin-bottom: 16px;
108
- position: relative;
109
- background-color: #f7f7f7;
110
- padding: 10px 15px;
111
- border: 1px solid #ddd;
112
- border-radius: 5px;
113
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
114
- transition: background-color 0.3s, border 0.3s, box-shadow 0.3s;
175
+ .pill:hover {
176
+ border-color: var(--accent);
177
+ color: var(--text);
178
+ }
179
+ .pill.active {
180
+ background: var(--accent);
181
+ border-color: var(--accent);
182
+ color: #fff;
183
+ font-weight: 600;
115
184
  }
116
185
 
117
- blockquote > ul > li:hover {
118
- background-color: #e8e8e8;
119
- border-color: #1296d9; /* Updated border to blue on hover */
120
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
186
+ /* ── Match count badge ── */
187
+ #match-count {
188
+ position: fixed;
189
+ bottom: 16px;
190
+ right: 20px;
191
+ background: var(--accent);
192
+ color: #fff;
193
+ font-size: 12px;
194
+ font-weight: 600;
195
+ padding: 5px 12px;
196
+ border-radius: 20px;
197
+ z-index: 200;
198
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
121
199
  }
122
200
 
123
- blockquote > ul > li > strong {
124
- color: #1296d9; /* Changed to blue for emphasis */
125
- font-weight: 600;
126
- font-size: 1.1em;
201
+ /* ═══════════════════════════════════════════════════════════════
202
+ LAYOUT
203
+ ═══════════════════════════════════════════════════════════════ */
204
+ .layout {
205
+ display: flex;
206
+ margin-top: var(--topbar-h);
207
+ min-height: calc(100vh - var(--topbar-h));
127
208
  }
128
209
 
129
- blockquote > ul > li > ul {
130
- padding-left: 20px;
131
- margin-top: 8px;
210
+ /* ── Sidebar ── */
211
+ #sidebar {
212
+ position: fixed;
213
+ top: var(--topbar-h);
214
+ left: 0;
215
+ bottom: 0;
216
+ width: var(--sidebar-w);
217
+ background: var(--bg-mid);
218
+ border-right: 1px solid var(--border);
219
+ overflow-y: auto;
220
+ padding: 16px 0 24px;
221
+ scrollbar-width: thin;
222
+ scrollbar-color: var(--border) transparent;
132
223
  }
133
224
 
134
- blockquote > ul > li > ul > li {
135
- background-color: #f0f0f0;
136
- padding: 8px 12px;
137
- border: 1px solid #ccc;
138
- border-radius: 4px;
139
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
140
- transition: background-color 0.3s, border 0.3s, box-shadow 0.3s;
225
+ .nav-heading {
226
+ font-size: 10px;
227
+ font-weight: 700;
228
+ letter-spacing: 0.08em;
229
+ text-transform: uppercase;
230
+ color: var(--text-muted);
231
+ padding: 0 16px 8px;
141
232
  }
142
233
 
143
- blockquote > ul > li > ul > li:hover {
144
- background-color: #e0e0e0;
145
- border-color: #1296d9; /* Updated border to blue on hover */
146
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
234
+ #sidebar a {
235
+ display: block;
236
+ padding: 7px 16px;
237
+ font-size: 13px;
238
+ color: var(--text-muted);
239
+ white-space: nowrap;
240
+ overflow: hidden;
241
+ text-overflow: ellipsis;
242
+ border-left: 2px solid transparent;
243
+ transition:
244
+ color 0.12s,
245
+ border-color 0.12s,
246
+ background 0.12s;
147
247
  }
148
248
 
149
- /* COLLAPSIBLE INDICATORS */
150
- li.collapsible > p {
151
- cursor: pointer;
249
+ #sidebar a:hover {
250
+ color: var(--text);
251
+ background: rgba(255, 255, 255, 0.04);
252
+ text-decoration: none;
152
253
  }
153
254
 
154
- li.collapsible > p::before {
155
- content: "▼";
156
- display: inline-block;
157
- margin-right: 8px;
158
- transition: transform 0.3s, color 0.3s;
159
- color: #1296d9; /* Updated color to blue */
255
+ #sidebar a.active {
256
+ color: var(--accent);
257
+ border-left-color: var(--accent);
258
+ background: rgba(18, 150, 217, 0.08);
259
+ font-weight: 600;
160
260
  }
161
261
 
162
- li.collapsible.collapsed > p::before {
163
- transform: rotate(-90deg);
262
+ /* ── Main ── */
263
+ #content {
264
+ margin-left: var(--sidebar-w);
265
+ padding: 28px 32px 60px;
266
+ flex: 1;
267
+ min-width: 0;
268
+ overflow-x: auto;
164
269
  }
165
270
 
166
- li.collapsible > p:hover::before {
167
- color: #1296d9; /* Lighter blue on hover */
271
+ /* ═══════════════════════════════════════════════════════════════
272
+ TYPOGRAPHY
273
+ ═══════════════════════════════════════════════════════════════ */
274
+ #content h1 {
275
+ font-size: 20px;
276
+ font-weight: 700;
277
+ color: var(--text);
278
+ margin: 32px 0 6px;
279
+ border-bottom: 1px solid var(--border);
280
+ padding-bottom: 8px;
168
281
  }
169
282
 
170
- /* Hide nested lists by default */
171
- li.collapsible.collapsed > ul {
172
- display: none;
283
+ #content h1:first-child {
284
+ margin-top: 0;
173
285
  }
174
286
 
175
- /* RESPONSIVE DESIGN */
176
- @media only screen and (max-width: 768px) {
177
- body {
178
- padding: 15px;
179
- }
180
- ul {
181
- padding-left: 15px;
182
- }
183
- li > p,
184
- blockquote > p,
185
- blockquote > ul > li {
186
- font-size: 0.95em;
187
- padding: 8px 12px;
188
- }
287
+ #content > p {
288
+ color: var(--text-muted);
289
+ margin-bottom: 16px;
290
+ font-size: 13px;
189
291
  }
190
292
 
191
- /* CUSTOM SCROLLBAR */
192
- ::-webkit-scrollbar {
193
- width: 8px;
194
- background-color: #ffffff;
293
+ #content hr {
294
+ border: none;
295
+ border-top: 1px solid var(--border);
296
+ margin: 20px 0;
195
297
  }
196
298
 
197
- ::-webkit-scrollbar-thumb {
198
- background-color: #ccc;
199
- border-radius: 10px;
299
+ code {
300
+ font-family: var(--font-mono);
301
+ font-size: 12px;
302
+ background: rgba(255, 255, 255, 0.07);
303
+ border: 1px solid var(--border);
304
+ padding: 1px 5px;
305
+ border-radius: 4px;
306
+ color: #a5d6fa;
307
+ }
308
+
309
+ /* ═══════════════════════════════════════════════════════════════
310
+ TABLE
311
+ ═══════════════════════════════════════════════════════════════ */
312
+ table {
313
+ width: 100%;
314
+ border-collapse: collapse;
315
+ font-size: 13px;
316
+ margin-bottom: 8px;
317
+ table-layout: auto;
318
+ }
319
+
320
+ /* Sticky header */
321
+ thead {
322
+ position: sticky;
323
+ top: var(--topbar-h);
324
+ z-index: 10;
325
+ }
326
+
327
+ thead th {
328
+ background: var(--bg-mid);
329
+ border-bottom: 2px solid var(--accent);
330
+ padding: 10px 12px;
331
+ font-size: 11px;
332
+ font-weight: 700;
333
+ letter-spacing: 0.06em;
334
+ text-transform: uppercase;
335
+ color: var(--text-muted);
336
+ white-space: nowrap;
337
+ text-align: left;
338
+ }
339
+
340
+ thead th:first-child {
341
+ text-align: right;
342
+ }
343
+ thead th:nth-child(2) {
344
+ text-align: center;
345
+ }
346
+
347
+ tbody tr {
348
+ border-bottom: 1px solid var(--border);
349
+ }
350
+
351
+ /* Group rows */
352
+ tbody tr[data-rowtype="group"] {
353
+ background: var(--group-bg);
354
+ }
355
+ tbody tr[data-rowtype="group"] td {
356
+ color: var(--group-text);
357
+ font-weight: 600;
358
+ }
359
+
360
+ /* Leaf rows */
361
+ tbody tr[data-rowtype="leaf"] {
362
+ background: var(--leaf-bg);
363
+ }
364
+
365
+ tbody tr:hover {
366
+ background: rgba(255, 255, 255, 0.04);
200
367
  }
201
368
 
369
+ td {
370
+ padding: 9px 12px;
371
+ vertical-align: top;
372
+ line-height: 1.5;
373
+ max-width: 420px;
374
+ }
375
+
376
+ /* # column */
377
+ td:first-child {
378
+ text-align: right;
379
+ color: var(--text-muted);
380
+ font-size: 11px;
381
+ white-space: nowrap;
382
+ padding-right: 8px;
383
+ min-width: 32px;
384
+ }
385
+
386
+ /* Type column */
387
+ td:nth-child(2) {
388
+ text-align: center;
389
+ width: 36px;
390
+ font-size: 15px;
391
+ }
392
+
393
+ /* Dash placeholder */
394
+ td:empty::after,
395
+ td:only-child.empty::after {
396
+ content: "—";
397
+ color: var(--text-muted);
398
+ }
399
+
400
+ /* ── Skip If cell: softer red/orange tint ── */
401
+ td:has(> *):nth-child(7) {
402
+ color: #f6ad55;
403
+ }
404
+
405
+ /* Error code pill */
406
+ td:last-child:not(:only-child) {
407
+ white-space: nowrap;
408
+ }
409
+
410
+ /* ── "—" em dash placeholder cells ── */
411
+ td {
412
+ /* GFM table renders literal "—" for empty cells from our generator */
413
+ }
414
+ td:has(> em) {
415
+ color: var(--text-muted);
416
+ }
417
+
418
+ /* ── Description / skip multiline list ── */
419
+ td ul,
420
+ td ol {
421
+ padding-left: 16px;
422
+ margin: 0;
423
+ }
424
+ td li {
425
+ margin-bottom: 2px;
426
+ }
427
+
428
+ /* ═══════════════════════════════════════════════════════════════
429
+ UTILITY
430
+ ═══════════════════════════════════════════════════════════════ */
431
+ .hidden {
432
+ display: none !important;
433
+ }
434
+
435
+ /* Scrollbar */
436
+ ::-webkit-scrollbar {
437
+ width: 6px;
438
+ height: 6px;
439
+ }
440
+ ::-webkit-scrollbar-track {
441
+ background: transparent;
442
+ }
443
+ ::-webkit-scrollbar-thumb {
444
+ background: var(--border);
445
+ border-radius: 3px;
446
+ }
202
447
  ::-webkit-scrollbar-thumb:hover {
203
- background-color: #bbb;
448
+ background: var(--text-muted);
204
449
  }
@@ -42,7 +42,7 @@ export class GoGenerator extends CodeGenerator {
42
42
  await writeAndFormatCode(this.rootPath, `./${this.codeConfig.goPkgName}/go.mod`, goModCode, "text");
43
43
  await this.generateSessionDataCode();
44
44
  await this.generateUnitTestingCode();
45
- await new MarkdownDocGenerator(this.validationConfig, this.errorCodes, this.rootPath).generateCode();
45
+ await new MarkdownDocGenerator(this.validationConfig, this.errorCodes, this.rootPath).generateCode(codeConfig);
46
46
  };
47
47
  this.generateTestFunction = async (testObject) => {
48
48
  const template = readFileSync(path.resolve(__dirname, "./templates/test-object.mustache"), "utf-8");
@@ -45,7 +45,7 @@ export class JavascriptGenerator extends CodeGenerator {
45
45
  await this.generatePackageJson(codeConfig.codeName);
46
46
  // Step 6: Generate documentation
47
47
  logger.debug("Step 6: Generating documentation");
48
- await new MarkdownDocGenerator(this.validationConfig, this.errorCodes, this.rootPath).generateCode();
48
+ await new MarkdownDocGenerator(this.validationConfig, this.errorCodes, this.rootPath).generateCode(codeConfig);
49
49
  // Step 7: Clean up temporary files
50
50
  logger.debug("Step 7: Cleaning up temporary files");
51
51
  await this.cleanup();
@@ -107,7 +107,7 @@ export class PythonGenerator extends CodeGenerator {
107
107
  await writeAndFormatCode(this.rootPath, "requirements.txt", requirements, "text");
108
108
  await writeAndFormatCode(this.rootPath, "error.py", this.generateErrorFile(this.errorCodes), "python");
109
109
  await writeAndFormatCode(this.rootPath, "__init__.py", this.generateIndexFile(apiNames, codeConfig.codeName), "python");
110
- await new MarkdownDocGenerator(this.validationConfig, this.errorCodes, this.rootPath).generateCode();
110
+ await new MarkdownDocGenerator(this.validationConfig, this.errorCodes, this.rootPath).generateCode(codeConfig);
111
111
  await this.generateSessionDataCode();
112
112
  };
113
113
  this.generateTestFunction = async (testObject) => {
@@ -0,0 +1,48 @@
1
+ import { CodeGenerator, CodeGeneratorProps } from "../classes/abstract-generator.js";
2
+ /**
3
+ * RagGenerator — produces one Markdown file per API action under ./rag-docs/.
4
+ *
5
+ * Each file is a self-contained, richly structured document intended to be
6
+ * fed directly into a Retrieval-Augmented Generation (RAG) pipeline.
7
+ *
8
+ * Layout per file:
9
+ * ---
10
+ * YAML frontmatter (action, codeName, numTests, generated date)
11
+ * ---
12
+ * # <codeName> — <action> Validations
13
+ * Short context paragraph
14
+ * Numbered list of every test with its human-readable description,
15
+ * error code, scope, and (indented) skip condition when present.
16
+ */
17
+ export declare class RagGenerator extends CodeGenerator {
18
+ generateSessionDataCode(): Promise<void>;
19
+ generateUnitTestingCode(): Promise<void>;
20
+ generateValidationCode: () => Promise<void>;
21
+ generateCode: (codeConfig: CodeGeneratorProps) => Promise<void>;
22
+ private buildActionMarkdown;
23
+ /** Count only leaf (non-group) tests recursively. */
24
+ private countLeafTests;
25
+ /**
26
+ * Renders a numbered top-level section (##) for a test object.
27
+ *
28
+ * - Leaf test → full human-readable description + metadata badges
29
+ * - Group node → brief intro line + all children rendered as ### sub-sections
30
+ * (recursing further for deeply nested groups)
31
+ *
32
+ * This preserves the parent→child relationship in the output so RAG
33
+ * consumers can see exactly which sub-validations belong to which group.
34
+ */
35
+ private buildTestSection;
36
+ /**
37
+ * Renders a child/nested section at the given heading level.
38
+ * Recurses deeper (####, #####, …) for nested groups.
39
+ */
40
+ private renderChildSection;
41
+ /**
42
+ * Renders the skip block for a group node as a blockquote.
43
+ * Returns an empty string when there is no _CONTINUE_ on this node.
44
+ */
45
+ private renderSkipBlock;
46
+ /** Renders a leaf test's heading, metadata badges, and compiled description. */
47
+ private renderLeaf;
48
+ }