@gitpagedocs/cli 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +193 -0
- package/ai/application/ai-command.ts +24 -0
- package/ai/application/ai-provider-factory.ts +22 -0
- package/ai/application/docs-pattern.ts +72 -0
- package/ai/application/resolve-chat-credentials.ts +69 -0
- package/ai/application/run-ai-cli-command.ts +167 -0
- package/ai/config.ts +50 -0
- package/ai/core/chat-session.ts +44 -0
- package/ai/core/models/ai-cli-config.ts +33 -0
- package/ai/core/models/parse-ai-cli-config.ts +76 -0
- package/ai/core/ports/illm-provider.ts +32 -0
- package/ai/infrastructure/ai-config-file.ts +101 -0
- package/ai/infrastructure/file-system-adapter.ts +85 -0
- package/ai/infrastructure/llm/tools-llm-provider.ts +54 -0
- package/ai/infrastructure/version-docs-writer.ts +143 -0
- package/ai/presentation/ai-prompts.ts +239 -0
- package/application/config-only/handler.mjs +57 -0
- package/application/home/handler.mjs +87 -0
- package/application/ports/cli-runtime-ports.ts +93 -0
- package/application/report/config-only-reporter.mjs +68 -0
- package/application/use-cases/dispatch-mode.ts +18 -0
- package/builders/config-orchestrator.mjs +35 -0
- package/builders/language-bundles-builder.mjs +24 -0
- package/builders/project-links.mjs +50 -0
- package/builders/root-config-builder.d.mts +16 -0
- package/builders/root-config-builder.mjs +56 -0
- package/builders/route-builders.mjs +136 -0
- package/builders/theme-template.mjs +76 -0
- package/builders/version-config-builder.mjs +186 -0
- package/content/docs-en.mjs +556 -0
- package/content/docs-es.mjs +469 -0
- package/content/docs-pt.mjs +469 -0
- package/content/docs.mjs +9 -0
- package/contracts/doc-versions.mjs +3 -0
- package/contracts/index.mjs +11 -0
- package/contracts/langs-paths.mjs +28 -0
- package/contracts/languages.mjs +6 -0
- package/contracts/layouts-paths.d.mts +17 -0
- package/contracts/layouts-paths.mjs +68 -0
- package/contracts/path-segments.d.mts +2 -0
- package/contracts/path-segments.mjs +15 -0
- package/data/default-site-config.mjs +328 -0
- package/data/i18n-langmenu.mjs +350 -0
- package/data/i18n-translations.mjs +20 -0
- package/data/layouts.mjs +437 -0
- package/data/path-mappings.mjs +26 -0
- package/data/route-metas.mjs +93 -0
- package/data/theme-colors.mjs +444 -0
- package/data/urls.mjs +12 -0
- package/data/version-constants.mjs +3 -0
- package/domain/models/cli-options.ts +33 -0
- package/domain/services/layouts-migration.d.mts +15 -0
- package/domain/services/layouts-migration.mjs +74 -0
- package/domain/services/sanitize-segment.mjs +7 -0
- package/home/constants.mjs +4 -0
- package/home/home-file-writer.mjs +19 -0
- package/home/templates.mjs +51 -0
- package/index.mjs +38 -0
- package/infrastructure/config-only/runtime.mjs +17 -0
- package/infrastructure/gitpagedocs-config-file.ts +47 -0
- package/infrastructure/home/runtime.mjs +37 -0
- package/package.json +60 -0
- package/presentation/commands/ai-info.ts +57 -0
- package/presentation/commands/chat.ts +259 -0
- package/presentation/commands/config-clear.ts +23 -0
- package/presentation/commands/config-info.ts +72 -0
- package/presentation/commands/diagnostics.ts +174 -0
- package/presentation/commands/docs.ts +42 -0
- package/presentation/commands/mcp.ts +20 -0
- package/presentation/commands/pages.ts +103 -0
- package/presentation/commands/password.ts +62 -0
- package/presentation/commands/run-command.ts +72 -0
- package/presentation/index.ts +125 -0
- package/presentation/options/parser.ts +120 -0
- package/presentation/options/resolver.ts +46 -0
- package/presentation/options/schema.ts +14 -0
- package/presentation/ui/banner.ts +13 -0
- package/presentation/ui/clack.ts +91 -0
- package/presentation/ui/layouts-prompts.ts +124 -0
- package/presentation/ui/prompts.ts +147 -0
- package/presentation/ui/terminal-stream.ts +97 -0
- package/presentation/ui/tty.ts +37 -0
- package/runtime/doc-path-resolver.mjs +59 -0
- package/runtime/exec.mjs +168 -0
- package/runtime/git-ops.mjs +112 -0
- package/runtime/layouts-migrator.d.mts +11 -0
- package/runtime/layouts-migrator.mjs +117 -0
- package/runtime/output.mjs +201 -0
- package/runtime/workflow.mjs +131 -0
- package/start.mjs +14 -0
- package/ui/logger.mjs +9 -0
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
export const THEME_COLORS = {
|
|
2
|
+
"duet-light": {
|
|
3
|
+
background: "#FFFFFF", primary: "#000000", secondary: "#5E5E5E", text: "#000000",
|
|
4
|
+
textSecondary: "#5E5E5E", cardBackground: "#FFFFFF", cardBorder: "#E2E2E2", error: "#000000", success: "#000000",
|
|
5
|
+
},
|
|
6
|
+
"duet-dark": {
|
|
7
|
+
background: "#000000", primary: "#FFFFFF", secondary: "#AFAFAF", text: "#FFFFFF",
|
|
8
|
+
textSecondary: "#AFAFAF", cardBackground: "#282828", cardBorder: "#4B4B4B", error: "#FFFFFF", success: "#FFFFFF",
|
|
9
|
+
},
|
|
10
|
+
"matrix-dark": {
|
|
11
|
+
background: "#030606",
|
|
12
|
+
primary: "#22C55E",
|
|
13
|
+
secondary: "#4ADE80",
|
|
14
|
+
text: "#DCFCE7",
|
|
15
|
+
textSecondary: "#86EFAC",
|
|
16
|
+
cardBackground: "#04120A",
|
|
17
|
+
cardBorder: "#14532D",
|
|
18
|
+
error: "#F87171",
|
|
19
|
+
success: "#22C55E",
|
|
20
|
+
},
|
|
21
|
+
"matrix-light": {
|
|
22
|
+
background: "#F0FDF4",
|
|
23
|
+
primary: "#15803D",
|
|
24
|
+
secondary: "#16A34A",
|
|
25
|
+
text: "#052E16",
|
|
26
|
+
textSecondary: "#166534",
|
|
27
|
+
cardBackground: "#FFFFFF",
|
|
28
|
+
cardBorder: "#BBF7D0",
|
|
29
|
+
error: "#DC2626",
|
|
30
|
+
success: "#16A34A",
|
|
31
|
+
},
|
|
32
|
+
default: {
|
|
33
|
+
background: "#FFFFFF",
|
|
34
|
+
primary: "#0EA5E9",
|
|
35
|
+
secondary: "#2563EB",
|
|
36
|
+
text: "#0F172A",
|
|
37
|
+
textSecondary: "#334155",
|
|
38
|
+
cardBackground: "#FFFFFF",
|
|
39
|
+
cardBorder: "#E2E8F0",
|
|
40
|
+
error: "#DC2626",
|
|
41
|
+
success: "#16A34A",
|
|
42
|
+
},
|
|
43
|
+
"github-dark": {
|
|
44
|
+
background: "#0D1117",
|
|
45
|
+
primary: "#58A6FF",
|
|
46
|
+
secondary: "#2EA043",
|
|
47
|
+
text: "#E6EDF3",
|
|
48
|
+
textSecondary: "#8B949E",
|
|
49
|
+
cardBackground: "#161B22",
|
|
50
|
+
cardBorder: "#30363D",
|
|
51
|
+
error: "#F85149",
|
|
52
|
+
success: "#3FB950",
|
|
53
|
+
},
|
|
54
|
+
"github-light": {
|
|
55
|
+
background: "#FFFFFF",
|
|
56
|
+
primary: "#0969DA",
|
|
57
|
+
secondary: "#1A7F37",
|
|
58
|
+
text: "#1F2328",
|
|
59
|
+
textSecondary: "#57606A",
|
|
60
|
+
cardBackground: "#FFFFFF",
|
|
61
|
+
cardBorder: "#D0D7DE",
|
|
62
|
+
error: "#D1242F",
|
|
63
|
+
success: "#1A7F37",
|
|
64
|
+
},
|
|
65
|
+
"cyberpunk-dark": {
|
|
66
|
+
background: "#090014",
|
|
67
|
+
primary: "#F472B6",
|
|
68
|
+
secondary: "#22D3EE",
|
|
69
|
+
text: "#F5D0FE",
|
|
70
|
+
textSecondary: "#C4B5FD",
|
|
71
|
+
cardBackground: "#160024",
|
|
72
|
+
cardBorder: "#7E22CE",
|
|
73
|
+
error: "#FB7185",
|
|
74
|
+
success: "#2DD4BF",
|
|
75
|
+
},
|
|
76
|
+
"cyberpunk-light": {
|
|
77
|
+
background: "#FFF1F8",
|
|
78
|
+
primary: "#DB2777",
|
|
79
|
+
secondary: "#0891B2",
|
|
80
|
+
text: "#4A044E",
|
|
81
|
+
textSecondary: "#6D28D9",
|
|
82
|
+
cardBackground: "#FFFFFF",
|
|
83
|
+
cardBorder: "#F5D0FE",
|
|
84
|
+
error: "#E11D48",
|
|
85
|
+
success: "#0D9488",
|
|
86
|
+
},
|
|
87
|
+
"aurora-dark": {
|
|
88
|
+
background: "#070A14",
|
|
89
|
+
primary: "#7C3AED",
|
|
90
|
+
secondary: "#22D3EE",
|
|
91
|
+
text: "#E5E7EB",
|
|
92
|
+
textSecondary: "#B8C3D6",
|
|
93
|
+
cardBackground: "#101726",
|
|
94
|
+
cardBorder: "#334155",
|
|
95
|
+
error: "#FB7185",
|
|
96
|
+
success: "#34D399",
|
|
97
|
+
},
|
|
98
|
+
"aurora-light": {
|
|
99
|
+
background: "#F8FAFC",
|
|
100
|
+
primary: "#6D28D9",
|
|
101
|
+
secondary: "#0891B2",
|
|
102
|
+
text: "#0F172A",
|
|
103
|
+
textSecondary: "#475569",
|
|
104
|
+
cardBackground: "#FFFFFF",
|
|
105
|
+
cardBorder: "#E2E8F0",
|
|
106
|
+
error: "#E11D48",
|
|
107
|
+
success: "#059669",
|
|
108
|
+
},
|
|
109
|
+
"nord-dark": {
|
|
110
|
+
background: "#2E3440",
|
|
111
|
+
primary: "#88C0D0",
|
|
112
|
+
secondary: "#81A1C1",
|
|
113
|
+
text: "#ECEFF4",
|
|
114
|
+
textSecondary: "#D8DEE9",
|
|
115
|
+
cardBackground: "#3B4252",
|
|
116
|
+
cardBorder: "#4C566A",
|
|
117
|
+
error: "#BF616A",
|
|
118
|
+
success: "#A3BE8C",
|
|
119
|
+
},
|
|
120
|
+
"nord-light": {
|
|
121
|
+
background: "#ECEFF4",
|
|
122
|
+
primary: "#5E81AC",
|
|
123
|
+
secondary: "#81A1C1",
|
|
124
|
+
text: "#2E3440",
|
|
125
|
+
textSecondary: "#4C566A",
|
|
126
|
+
cardBackground: "#FFFFFF",
|
|
127
|
+
cardBorder: "#D8DEE9",
|
|
128
|
+
error: "#BF616A",
|
|
129
|
+
success: "#5E81AC",
|
|
130
|
+
},
|
|
131
|
+
"sunset-dark": {
|
|
132
|
+
background: "#1A0F0C",
|
|
133
|
+
primary: "#FB923C",
|
|
134
|
+
secondary: "#F472B6",
|
|
135
|
+
text: "#FFE4D6",
|
|
136
|
+
textSecondary: "#FDBA74",
|
|
137
|
+
cardBackground: "#2A1611",
|
|
138
|
+
cardBorder: "#7C2D12",
|
|
139
|
+
error: "#FB7185",
|
|
140
|
+
success: "#4ADE80",
|
|
141
|
+
},
|
|
142
|
+
"sunset-light": {
|
|
143
|
+
background: "#FFF7ED",
|
|
144
|
+
primary: "#EA580C",
|
|
145
|
+
secondary: "#DB2777",
|
|
146
|
+
text: "#431407",
|
|
147
|
+
textSecondary: "#9A3412",
|
|
148
|
+
cardBackground: "#FFFFFF",
|
|
149
|
+
cardBorder: "#FED7AA",
|
|
150
|
+
error: "#E11D48",
|
|
151
|
+
success: "#16A34A",
|
|
152
|
+
},
|
|
153
|
+
"mono-dark": {
|
|
154
|
+
background: "#0B0F0C",
|
|
155
|
+
primary: "#A3E635",
|
|
156
|
+
secondary: "#65A30D",
|
|
157
|
+
text: "#ECFCCB",
|
|
158
|
+
textSecondary: "#BEF264",
|
|
159
|
+
cardBackground: "#141A16",
|
|
160
|
+
cardBorder: "#365314",
|
|
161
|
+
error: "#F87171",
|
|
162
|
+
success: "#84CC16",
|
|
163
|
+
},
|
|
164
|
+
"mono-light": {
|
|
165
|
+
background: "#F7FEE7",
|
|
166
|
+
primary: "#4D7C0F",
|
|
167
|
+
secondary: "#65A30D",
|
|
168
|
+
text: "#1A2E05",
|
|
169
|
+
textSecondary: "#3F6212",
|
|
170
|
+
cardBackground: "#FFFFFF",
|
|
171
|
+
cardBorder: "#D9F99D",
|
|
172
|
+
error: "#DC2626",
|
|
173
|
+
success: "#4D7C0F",
|
|
174
|
+
},
|
|
175
|
+
"oceanic-dark": {
|
|
176
|
+
background: "#06121A",
|
|
177
|
+
primary: "#0EA5E9",
|
|
178
|
+
secondary: "#22D3EE",
|
|
179
|
+
text: "#DDF6FF",
|
|
180
|
+
textSecondary: "#9CC5D8",
|
|
181
|
+
cardBackground: "#0C1C27",
|
|
182
|
+
cardBorder: "#1E3A4B",
|
|
183
|
+
error: "#F87171",
|
|
184
|
+
success: "#34D399",
|
|
185
|
+
},
|
|
186
|
+
"oceanic-light": {
|
|
187
|
+
background: "#F0F9FF",
|
|
188
|
+
primary: "#0284C7",
|
|
189
|
+
secondary: "#0891B2",
|
|
190
|
+
text: "#0C4A6E",
|
|
191
|
+
textSecondary: "#1D4E89",
|
|
192
|
+
cardBackground: "#FFFFFF",
|
|
193
|
+
cardBorder: "#BAE6FD",
|
|
194
|
+
error: "#DC2626",
|
|
195
|
+
success: "#0F766E",
|
|
196
|
+
},
|
|
197
|
+
"rose-dark": {
|
|
198
|
+
background: "#1B0B13",
|
|
199
|
+
primary: "#F43F5E",
|
|
200
|
+
secondary: "#FB7185",
|
|
201
|
+
text: "#FFE4EA",
|
|
202
|
+
textSecondary: "#F9A8D4",
|
|
203
|
+
cardBackground: "#28111C",
|
|
204
|
+
cardBorder: "#7A1F3D",
|
|
205
|
+
error: "#FB7185",
|
|
206
|
+
success: "#34D399",
|
|
207
|
+
},
|
|
208
|
+
"rose-light": {
|
|
209
|
+
background: "#FFF1F5",
|
|
210
|
+
primary: "#E11D48",
|
|
211
|
+
secondary: "#DB2777",
|
|
212
|
+
text: "#7A1733",
|
|
213
|
+
textSecondary: "#9D174D",
|
|
214
|
+
cardBackground: "#FFFFFF",
|
|
215
|
+
cardBorder: "#FBCFE8",
|
|
216
|
+
error: "#DC2626",
|
|
217
|
+
success: "#059669",
|
|
218
|
+
},
|
|
219
|
+
"forest-dark": {
|
|
220
|
+
background: "#0A140F",
|
|
221
|
+
primary: "#22C55E",
|
|
222
|
+
secondary: "#4ADE80",
|
|
223
|
+
text: "#DCFCE7",
|
|
224
|
+
textSecondary: "#86EFAC",
|
|
225
|
+
cardBackground: "#122017",
|
|
226
|
+
cardBorder: "#275A3F",
|
|
227
|
+
error: "#F87171",
|
|
228
|
+
success: "#22C55E",
|
|
229
|
+
},
|
|
230
|
+
"forest-light": {
|
|
231
|
+
background: "#F3FFF5",
|
|
232
|
+
primary: "#15803D",
|
|
233
|
+
secondary: "#16A34A",
|
|
234
|
+
text: "#14532D",
|
|
235
|
+
textSecondary: "#166534",
|
|
236
|
+
cardBackground: "#FFFFFF",
|
|
237
|
+
cardBorder: "#BBF7D0",
|
|
238
|
+
error: "#DC2626",
|
|
239
|
+
success: "#15803D",
|
|
240
|
+
},
|
|
241
|
+
"graphite-dark": {
|
|
242
|
+
background: "#0B0F14",
|
|
243
|
+
primary: "#60A5FA",
|
|
244
|
+
secondary: "#93C5FD",
|
|
245
|
+
text: "#E5E7EB",
|
|
246
|
+
textSecondary: "#9CA3AF",
|
|
247
|
+
cardBackground: "#141A22",
|
|
248
|
+
cardBorder: "#2A3442",
|
|
249
|
+
error: "#F87171",
|
|
250
|
+
success: "#34D399",
|
|
251
|
+
},
|
|
252
|
+
"graphite-light": {
|
|
253
|
+
background: "#F8FAFC",
|
|
254
|
+
primary: "#2563EB",
|
|
255
|
+
secondary: "#3B82F6",
|
|
256
|
+
text: "#0F172A",
|
|
257
|
+
textSecondary: "#475569",
|
|
258
|
+
cardBackground: "#FFFFFF",
|
|
259
|
+
cardBorder: "#CBD5E1",
|
|
260
|
+
error: "#DC2626",
|
|
261
|
+
success: "#059669",
|
|
262
|
+
},
|
|
263
|
+
"lava-dark": {
|
|
264
|
+
background: "#1A0D08",
|
|
265
|
+
primary: "#F97316",
|
|
266
|
+
secondary: "#FB923C",
|
|
267
|
+
text: "#FFE7D5",
|
|
268
|
+
textSecondary: "#FDBA74",
|
|
269
|
+
cardBackground: "#2B1610",
|
|
270
|
+
cardBorder: "#7C2D12",
|
|
271
|
+
error: "#FB7185",
|
|
272
|
+
success: "#4ADE80",
|
|
273
|
+
},
|
|
274
|
+
"lava-light": {
|
|
275
|
+
background: "#FFF7ED",
|
|
276
|
+
primary: "#EA580C",
|
|
277
|
+
secondary: "#F97316",
|
|
278
|
+
text: "#7C2D12",
|
|
279
|
+
textSecondary: "#9A3412",
|
|
280
|
+
cardBackground: "#FFFFFF",
|
|
281
|
+
cardBorder: "#FED7AA",
|
|
282
|
+
error: "#DC2626",
|
|
283
|
+
success: "#16A34A",
|
|
284
|
+
},
|
|
285
|
+
"skyline-dark": {
|
|
286
|
+
background: "#080E1E",
|
|
287
|
+
primary: "#3B82F6",
|
|
288
|
+
secondary: "#22D3EE",
|
|
289
|
+
text: "#E0E7FF",
|
|
290
|
+
textSecondary: "#93C5FD",
|
|
291
|
+
cardBackground: "#101A2F",
|
|
292
|
+
cardBorder: "#2B3A67",
|
|
293
|
+
error: "#F87171",
|
|
294
|
+
success: "#34D399",
|
|
295
|
+
},
|
|
296
|
+
"skyline-light": {
|
|
297
|
+
background: "#EFF6FF",
|
|
298
|
+
primary: "#2563EB",
|
|
299
|
+
secondary: "#0EA5E9",
|
|
300
|
+
text: "#1E3A8A",
|
|
301
|
+
textSecondary: "#1D4ED8",
|
|
302
|
+
cardBackground: "#FFFFFF",
|
|
303
|
+
cardBorder: "#BFDBFE",
|
|
304
|
+
error: "#DC2626",
|
|
305
|
+
success: "#059669",
|
|
306
|
+
},
|
|
307
|
+
"emerald-dark": {
|
|
308
|
+
background: "#07150F",
|
|
309
|
+
primary: "#10B981",
|
|
310
|
+
secondary: "#34D399",
|
|
311
|
+
text: "#D1FAE5",
|
|
312
|
+
textSecondary: "#6EE7B7",
|
|
313
|
+
cardBackground: "#10231A",
|
|
314
|
+
cardBorder: "#1F6A4C",
|
|
315
|
+
error: "#F87171",
|
|
316
|
+
success: "#10B981",
|
|
317
|
+
},
|
|
318
|
+
"emerald-light": {
|
|
319
|
+
background: "#ECFDF5",
|
|
320
|
+
primary: "#059669",
|
|
321
|
+
secondary: "#10B981",
|
|
322
|
+
text: "#064E3B",
|
|
323
|
+
textSecondary: "#065F46",
|
|
324
|
+
cardBackground: "#FFFFFF",
|
|
325
|
+
cardBorder: "#A7F3D0",
|
|
326
|
+
error: "#DC2626",
|
|
327
|
+
success: "#059669",
|
|
328
|
+
},
|
|
329
|
+
"violet-dark": {
|
|
330
|
+
background: "#12081F",
|
|
331
|
+
primary: "#8B5CF6",
|
|
332
|
+
secondary: "#A78BFA",
|
|
333
|
+
text: "#EDE9FE",
|
|
334
|
+
textSecondary: "#C4B5FD",
|
|
335
|
+
cardBackground: "#1E1033",
|
|
336
|
+
cardBorder: "#4C1D95",
|
|
337
|
+
error: "#FB7185",
|
|
338
|
+
success: "#34D399",
|
|
339
|
+
},
|
|
340
|
+
"violet-light": {
|
|
341
|
+
background: "#F5F3FF",
|
|
342
|
+
primary: "#7C3AED",
|
|
343
|
+
secondary: "#8B5CF6",
|
|
344
|
+
text: "#4C1D95",
|
|
345
|
+
textSecondary: "#5B21B6",
|
|
346
|
+
cardBackground: "#FFFFFF",
|
|
347
|
+
cardBorder: "#DDD6FE",
|
|
348
|
+
error: "#DC2626",
|
|
349
|
+
success: "#059669",
|
|
350
|
+
},
|
|
351
|
+
"amber-dark": {
|
|
352
|
+
background: "#1A1306",
|
|
353
|
+
primary: "#F59E0B",
|
|
354
|
+
secondary: "#FBBF24",
|
|
355
|
+
text: "#FEF3C7",
|
|
356
|
+
textSecondary: "#FCD34D",
|
|
357
|
+
cardBackground: "#2A1E0D",
|
|
358
|
+
cardBorder: "#7C5B13",
|
|
359
|
+
error: "#FB7185",
|
|
360
|
+
success: "#4ADE80",
|
|
361
|
+
},
|
|
362
|
+
"amber-light": {
|
|
363
|
+
background: "#FFFBEB",
|
|
364
|
+
primary: "#D97706",
|
|
365
|
+
secondary: "#F59E0B",
|
|
366
|
+
text: "#78350F",
|
|
367
|
+
textSecondary: "#92400E",
|
|
368
|
+
cardBackground: "#FFFFFF",
|
|
369
|
+
cardBorder: "#FDE68A",
|
|
370
|
+
error: "#DC2626",
|
|
371
|
+
success: "#16A34A",
|
|
372
|
+
},
|
|
373
|
+
"slate-dark": {
|
|
374
|
+
background: "#0B1120",
|
|
375
|
+
primary: "#64748B",
|
|
376
|
+
secondary: "#94A3B8",
|
|
377
|
+
text: "#E2E8F0",
|
|
378
|
+
textSecondary: "#CBD5E1",
|
|
379
|
+
cardBackground: "#111827",
|
|
380
|
+
cardBorder: "#334155",
|
|
381
|
+
error: "#F87171",
|
|
382
|
+
success: "#34D399",
|
|
383
|
+
},
|
|
384
|
+
"slate-light": {
|
|
385
|
+
background: "#F8FAFC",
|
|
386
|
+
primary: "#475569",
|
|
387
|
+
secondary: "#64748B",
|
|
388
|
+
text: "#1E293B",
|
|
389
|
+
textSecondary: "#334155",
|
|
390
|
+
cardBackground: "#FFFFFF",
|
|
391
|
+
cardBorder: "#CBD5E1",
|
|
392
|
+
error: "#DC2626",
|
|
393
|
+
success: "#16A34A",
|
|
394
|
+
},
|
|
395
|
+
"vscode-dark": {
|
|
396
|
+
background: "#1E1E1E",
|
|
397
|
+
primary: "#007ACC",
|
|
398
|
+
secondary: "#4EC9B0",
|
|
399
|
+
text: "#D4D4D4",
|
|
400
|
+
textSecondary: "#858585",
|
|
401
|
+
cardBackground: "#252526",
|
|
402
|
+
cardBorder: "#3C3C3C",
|
|
403
|
+
error: "#F14C4C",
|
|
404
|
+
success: "#4EC9B0",
|
|
405
|
+
},
|
|
406
|
+
"vscode-light": {
|
|
407
|
+
background: "#FFFFFF",
|
|
408
|
+
primary: "#005FB8",
|
|
409
|
+
secondary: "#267F99",
|
|
410
|
+
text: "#1E1E1E",
|
|
411
|
+
textSecondary: "#6E6E6E",
|
|
412
|
+
cardBackground: "#F3F3F3",
|
|
413
|
+
cardBorder: "#E5E5E5",
|
|
414
|
+
error: "#CD3131",
|
|
415
|
+
success: "#098658",
|
|
416
|
+
},
|
|
417
|
+
|
|
418
|
+
// --- 25 modern layouts (see MODERN_LAYOUTS in cli/data/layouts.mjs) ---
|
|
419
|
+
"midnight-dark": { background: "#0A0E27", primary: "#4F7CFF", secondary: "#38BDF8", text: "#E2E8F5", textSecondary: "#94A3C8", cardBackground: "#111634", cardBorder: "#25305C", error: "#FB7185", success: "#34D399" },
|
|
420
|
+
"carbon-dark": { background: "#0A0A0A", primary: "#FFFFFF", secondary: "#A3A3A3", text: "#EDEDED", textSecondary: "#8A8A8A", cardBackground: "#161616", cardBorder: "#2E2E2E", error: "#FF6B6B", success: "#5EEAD4" },
|
|
421
|
+
"neon-noir-dark": { background: "#0B0014", primary: "#FF2E97", secondary: "#00E5FF", text: "#F5E9FF", textSecondary: "#B388D9", cardBackground: "#160022", cardBorder: "#3A0F52", error: "#FF3D71", success: "#2BFFC6" },
|
|
422
|
+
"ember-dark": { background: "#1A0F0A", primary: "#FF7A18", secondary: "#FFB347", text: "#FBE8DC", textSecondary: "#C99A82", cardBackground: "#261610", cardBorder: "#4A2A1A", error: "#FF5252", success: "#74D680" },
|
|
423
|
+
"cobalt-dark": { background: "#021024", primary: "#2563EB", secondary: "#38BDF8", text: "#DCE7FF", textSecondary: "#8FA8D6", cardBackground: "#061A3A", cardBorder: "#14315E", error: "#FB7185", success: "#34D399" },
|
|
424
|
+
"plum-dark": { background: "#15091F", primary: "#A855F7", secondary: "#F472B6", text: "#F0E4FA", textSecondary: "#B294C9", cardBackground: "#221033", cardBorder: "#3F1D5C", error: "#FB7185", success: "#4ADE80" },
|
|
425
|
+
"obsidian-dark": { background: "#060A0A", primary: "#14B8A6", secondary: "#2DD4BF", text: "#E0F2F1", textSecondary: "#8FB5B2", cardBackground: "#0E1817", cardBorder: "#1E3331", error: "#F87171", success: "#2DD4BF" },
|
|
426
|
+
"lagoon-dark": { background: "#041E26", primary: "#06B6D4", secondary: "#22D3EE", text: "#D8F3F8", textSecondary: "#84B6C0", cardBackground: "#07303A", cardBorder: "#0F4D5C", error: "#FB7185", success: "#2DD4BF" },
|
|
427
|
+
"orchid-dark": { background: "#1A0B1E", primary: "#D946EF", secondary: "#F0ABFC", text: "#F7E6FA", textSecondary: "#C792D0", cardBackground: "#2A1230", cardBorder: "#4C2256", error: "#FB7185", success: "#4ADE80" },
|
|
428
|
+
"steel-dark": { background: "#0E1116", primary: "#60A5FA", secondary: "#93C5FD", text: "#E5EAF0", textSecondary: "#98A4B5", cardBackground: "#181D26", cardBorder: "#2C3440", error: "#F87171", success: "#34D399" },
|
|
429
|
+
"moss-dark": { background: "#0D1410", primary: "#84CC16", secondary: "#A3E635", text: "#E6F0D9", textSecondary: "#9CB088", cardBackground: "#161F18", cardBorder: "#2A3A26", error: "#F87171", success: "#84CC16" },
|
|
430
|
+
"indigo-dark": { background: "#0B0B2B", primary: "#6366F1", secondary: "#818CF8", text: "#E4E4FB", textSecondary: "#9999CC", cardBackground: "#14143F", cardBorder: "#262668", error: "#FB7185", success: "#34D399" },
|
|
431
|
+
"verdant-dark": { background: "#04140D", primary: "#10B981", secondary: "#34D399", text: "#DCF5E8", textSecondary: "#84B89E", cardBackground: "#07241A", cardBorder: "#0F3D2C", error: "#FB7185", success: "#10B981" },
|
|
432
|
+
"crimson-dark": { background: "#1A0508", primary: "#EF4444", secondary: "#FB7185", text: "#FBE2E5", textSecondary: "#C98F95", cardBackground: "#260A0E", cardBorder: "#4A161C", error: "#EF4444", success: "#34D399" },
|
|
433
|
+
"velvet-dark": { background: "#15071A", primary: "#7C3AED", secondary: "#FBBF24", text: "#EFE6F5", textSecondary: "#B499C4", cardBackground: "#220F2B", cardBorder: "#3E1D4C", error: "#FB7185", success: "#FBBF24" },
|
|
434
|
+
"sakura-light": { background: "#FFF5F7", primary: "#EC4899", secondary: "#F472B6", text: "#3D1A2B", textSecondary: "#8A5C70", cardBackground: "#FFFFFF", cardBorder: "#FBD0E0", error: "#E11D48", success: "#10B981" },
|
|
435
|
+
"arctic-light": { background: "#F4F9FF", primary: "#0284C7", secondary: "#38BDF8", text: "#0F2A3D", textSecondary: "#4D6B80", cardBackground: "#FFFFFF", cardBorder: "#D6E8F5", error: "#E11D48", success: "#059669" },
|
|
436
|
+
"sage-light": { background: "#F6F8F2", primary: "#4D7C4F", secondary: "#84A98C", text: "#24331F", textSecondary: "#5C6B54", cardBackground: "#FFFFFF", cardBorder: "#DCE5D0", error: "#DC2626", success: "#4D7C4F" },
|
|
437
|
+
"mint-light": { background: "#F0FBF6", primary: "#10B981", secondary: "#34D399", text: "#0F3326", textSecondary: "#4D7A66", cardBackground: "#FFFFFF", cardBorder: "#C8EDDB", error: "#DC2626", success: "#10B981" },
|
|
438
|
+
"coral-light": { background: "#FFF6F2", primary: "#F97316", secondary: "#FB923C", text: "#3D2317", textSecondary: "#8A6553", cardBackground: "#FFFFFF", cardBorder: "#FBD9C8", error: "#E11D48", success: "#059669" },
|
|
439
|
+
"marigold-light": { background: "#FFFBF0", primary: "#D97706", secondary: "#F59E0B", text: "#3D2E0F", textSecondary: "#8A7444", cardBackground: "#FFFFFF", cardBorder: "#FBEBC0", error: "#DC2626", success: "#059669" },
|
|
440
|
+
"tangerine-light": { background: "#FFF7F0", primary: "#EA580C", secondary: "#FB923C", text: "#3D2410", textSecondary: "#8A6240", cardBackground: "#FFFFFF", cardBorder: "#FBDCC0", error: "#DC2626", success: "#059669" },
|
|
441
|
+
"blush-light": { background: "#FFF5F8", primary: "#DB2777", secondary: "#F472B6", text: "#3D1A29", textSecondary: "#8A5A6E", cardBackground: "#FFFFFF", cardBorder: "#FBD4E2", error: "#E11D48", success: "#10B981" },
|
|
442
|
+
"azure-light": { background: "#F2F8FF", primary: "#2563EB", secondary: "#60A5FA", text: "#11243D", textSecondary: "#4D6488", cardBackground: "#FFFFFF", cardBorder: "#D0E2FB", error: "#E11D48", success: "#059669" },
|
|
443
|
+
"sand-light": { background: "#FBF7F0", primary: "#B45309", secondary: "#D97706", text: "#332814", textSecondary: "#786A4D", cardBackground: "#FFFFFF", cardBorder: "#ECE0C8", error: "#DC2626", success: "#4D7C4F" },
|
|
444
|
+
};
|
package/data/urls.mjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Official layout URLs for git-page-docs repository.
|
|
2
|
+
* The canonical home is the root `gitpagelayouts/` folder; the legacy
|
|
3
|
+
* `gitpagedocs/layouts/` folder stays online for older deployments. */
|
|
4
|
+
|
|
5
|
+
export const OFFICIAL_LAYOUTS_CONFIG_URL =
|
|
6
|
+
"https://github.com/Vidigal-code/git-page-docs/blob/main/gitpagelayouts/layoutsConfig.json";
|
|
7
|
+
|
|
8
|
+
export const OFFICIAL_LAYOUTS_TEMPLATES_URL =
|
|
9
|
+
"https://github.com/Vidigal-code/git-page-docs/blob/main/gitpagelayouts/templates";
|
|
10
|
+
|
|
11
|
+
export const LEGACY_OFFICIAL_LAYOUTS_CONFIG_URL =
|
|
12
|
+
"https://github.com/Vidigal-code/git-page-docs/blob/main/gitpagedocs/layouts/layoutsConfig.json";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type CliMode = "home" | "full" | "config-only" | "ai";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Values the user supplied explicitly on the command line. Interactive mode
|
|
5
|
+
* only asks for what is missing, so an explicit flag is never re-asked.
|
|
6
|
+
*/
|
|
7
|
+
export interface CliExplicitFlags {
|
|
8
|
+
useLocalLayoutConfig: boolean;
|
|
9
|
+
layoutsDir: boolean;
|
|
10
|
+
githubOwner: boolean;
|
|
11
|
+
githubRepo: boolean;
|
|
12
|
+
outputDir: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface CliOptions {
|
|
16
|
+
isBuild: boolean;
|
|
17
|
+
isServe: boolean;
|
|
18
|
+
mode: CliMode;
|
|
19
|
+
aiCommand?: string;
|
|
20
|
+
outputDir: string;
|
|
21
|
+
/** Standalone layouts home (repo-relative); local layouts are generated here. */
|
|
22
|
+
layoutsDir: string;
|
|
23
|
+
useLocalLayoutConfig: boolean;
|
|
24
|
+
shouldPush: boolean;
|
|
25
|
+
githubOwner: string;
|
|
26
|
+
githubRepo: string;
|
|
27
|
+
docsPath: string;
|
|
28
|
+
basePath: string;
|
|
29
|
+
repositorySearch?: boolean;
|
|
30
|
+
isInteractive: boolean;
|
|
31
|
+
hasArgs: boolean;
|
|
32
|
+
explicit: CliExplicitFlags;
|
|
33
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** A planned move from the legacy layouts folder to the standalone home. */
|
|
2
|
+
export interface LayoutsMigrationPlan {
|
|
3
|
+
required: boolean;
|
|
4
|
+
from: string;
|
|
5
|
+
to: string;
|
|
6
|
+
files: string[];
|
|
7
|
+
overwrites: string[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export declare function planLayoutsMigration(options: {
|
|
11
|
+
outputDir: string;
|
|
12
|
+
layoutsDir: string;
|
|
13
|
+
legacyFiles?: string[];
|
|
14
|
+
targetFiles?: string[];
|
|
15
|
+
}): LayoutsMigrationPlan;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legacy layouts migration — planning only.
|
|
3
|
+
*
|
|
4
|
+
* Deciding *what* should move is domain logic, so it stays free of prompts and
|
|
5
|
+
* filesystem writes: callers list the two folders, ask the user, and perform
|
|
6
|
+
* the move. That keeps the rule testable with plain arrays.
|
|
7
|
+
*/
|
|
8
|
+
import { legacyLayoutsDir, normalizeLayoutsDir } from "../../contracts/layouts-paths.mjs";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @typedef {Object} LayoutsMigrationPlan
|
|
12
|
+
* @property {boolean} required True when the legacy folder holds files to move.
|
|
13
|
+
* @property {string} from Repo-relative legacy folder.
|
|
14
|
+
* @property {string} to Repo-relative destination folder.
|
|
15
|
+
* @property {string[]} files Paths relative to `from`, sorted.
|
|
16
|
+
* @property {string[]} overwrites Subset of `files` already present at `to`.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Plan the move from the legacy layouts folder to the standalone home.
|
|
21
|
+
*
|
|
22
|
+
* @param {Object} options
|
|
23
|
+
* @param {string} options.outputDir Docs output dir (owns the legacy folder).
|
|
24
|
+
* @param {string} options.layoutsDir Destination layouts folder.
|
|
25
|
+
* @param {string[]} [options.legacyFiles] Paths relative to the legacy folder.
|
|
26
|
+
* @param {string[]} [options.targetFiles] Paths relative to the destination folder.
|
|
27
|
+
* @returns {LayoutsMigrationPlan}
|
|
28
|
+
*/
|
|
29
|
+
export function planLayoutsMigration(options = {}) {
|
|
30
|
+
const { outputDir, layoutsDir, legacyFiles, targetFiles } = options;
|
|
31
|
+
|
|
32
|
+
const from = legacyLayoutsDir(outputDir);
|
|
33
|
+
const to = normalizeLayoutsDir(layoutsDir);
|
|
34
|
+
|
|
35
|
+
const files = toSortedPaths(legacyFiles);
|
|
36
|
+
const present = new Set(toSortedPaths(targetFiles));
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
required: files.length > 0 && from !== to,
|
|
40
|
+
from,
|
|
41
|
+
to,
|
|
42
|
+
files,
|
|
43
|
+
overwrites: files.filter((file) => present.has(file)),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Normalize, de-duplicate and sort a list of relative paths so a plan is
|
|
49
|
+
* deterministic regardless of directory-read order.
|
|
50
|
+
*
|
|
51
|
+
* @param {unknown} paths
|
|
52
|
+
* @returns {string[]}
|
|
53
|
+
*/
|
|
54
|
+
function toSortedPaths(paths) {
|
|
55
|
+
if (!Array.isArray(paths)) return [];
|
|
56
|
+
const normalized = paths
|
|
57
|
+
.filter((entry) => typeof entry === "string" && entry.trim().length > 0)
|
|
58
|
+
.map((entry) => entry.replace(/[\\/]+/g, "/").replace(/^\/+/, ""));
|
|
59
|
+
return [...new Set(normalized)].sort(compareCodeUnits);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Plain UTF-16 code-unit order (what `sort()` does by default), spelled out so
|
|
64
|
+
* a plan never depends on the runtime locale.
|
|
65
|
+
*
|
|
66
|
+
* @param {string} a
|
|
67
|
+
* @param {string} b
|
|
68
|
+
* @returns {number}
|
|
69
|
+
*/
|
|
70
|
+
function compareCodeUnits(a, b) {
|
|
71
|
+
if (a < b) return -1;
|
|
72
|
+
if (a > b) return 1;
|
|
73
|
+
return 0;
|
|
74
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Write .env, Dockerfile, README to home output directory */
|
|
2
|
+
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
5
|
+
import { getEnvTemplate, getDockerfileTemplate, getReadmeTemplate } from "./templates.mjs";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @param {string} root
|
|
9
|
+
* @param {string} outputDir - e.g. gitpagedocshome or .
|
|
10
|
+
* @param {{ repositorySearch?: boolean; basePath?: string }} opts
|
|
11
|
+
*/
|
|
12
|
+
export async function writeHomeFiles(root, outputDir, opts = {}) {
|
|
13
|
+
const basePath = outputDir === "." || outputDir === "./" ? root : path.join(root, outputDir);
|
|
14
|
+
await mkdir(basePath, { recursive: true });
|
|
15
|
+
|
|
16
|
+
await writeFile(path.join(basePath, ".env"), getEnvTemplate(opts), "utf-8");
|
|
17
|
+
await writeFile(path.join(basePath, "Dockerfile"), getDockerfileTemplate(), "utf-8");
|
|
18
|
+
await writeFile(path.join(basePath, "README.md"), getReadmeTemplate(), "utf-8");
|
|
19
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** Template content for home distribution files */
|
|
2
|
+
|
|
3
|
+
export function getEnvTemplate({ repositorySearch = false, basePath = "" }) {
|
|
4
|
+
const pathLine = basePath
|
|
5
|
+
? `GITPAGEDOCS_PATH=${basePath}`
|
|
6
|
+
: `# GITPAGEDOCS_PATH=gi-page-docs`;
|
|
7
|
+
return `# GitPageDocs - Local development
|
|
8
|
+
# Set to "true" to enable the search aggregator home.
|
|
9
|
+
GITPAGEDOCS_REPOSITORY_SEARCH=${String(repositorySearch)}
|
|
10
|
+
|
|
11
|
+
# Base path (when GITPAGEDOCS_REPOSITORY_SEARCH=false).
|
|
12
|
+
# Example: localhost:3000/gi-page-docs
|
|
13
|
+
${pathLine}
|
|
14
|
+
`;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function getDockerfileTemplate() {
|
|
18
|
+
return `FROM nginx:alpine
|
|
19
|
+
COPY . /usr/share/nginx/html
|
|
20
|
+
EXPOSE 80
|
|
21
|
+
CMD ["nginx", "-g", "daemon off;"]
|
|
22
|
+
`;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* README shipped next to the static export. Every command runs from the
|
|
27
|
+
* folder the file lives in, so it never needs to know the output dir name.
|
|
28
|
+
*/
|
|
29
|
+
export function getReadmeTemplate() {
|
|
30
|
+
return `# GitPageDocs Home
|
|
31
|
+
|
|
32
|
+
Pre-built GitPageDocs static site by Vidigal-code.
|
|
33
|
+
|
|
34
|
+
## Quick start
|
|
35
|
+
|
|
36
|
+
\`\`\`bash
|
|
37
|
+
npx serve .
|
|
38
|
+
\`\`\`
|
|
39
|
+
|
|
40
|
+
## Docker
|
|
41
|
+
|
|
42
|
+
\`\`\`bash
|
|
43
|
+
docker build -t gitpagedocshome .
|
|
44
|
+
docker run -p 3000:80 gitpagedocshome
|
|
45
|
+
\`\`\`
|
|
46
|
+
|
|
47
|
+
## Credits
|
|
48
|
+
|
|
49
|
+
Powered by Vidigal-code - https://github.com/Vidigal-code/git-page-docs
|
|
50
|
+
`;
|
|
51
|
+
}
|