seshat-scribe 0.9.1 → 2.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.
- package/README.md +47 -58
- package/dist/commands/generate.d.ts +1 -1
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +41 -86
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +73 -338
- package/dist/commands/init.js.map +1 -1
- package/dist/config.d.ts +10 -179
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +8 -112
- package/dist/config.js.map +1 -1
- package/dist/core/analyzer.d.ts +1 -1
- package/dist/core/analyzer.d.ts.map +1 -1
- package/dist/core/analyzer.js +2 -115
- package/dist/core/analyzer.js.map +1 -1
- package/dist/core/artist.d.ts +1 -2
- package/dist/core/artist.d.ts.map +1 -1
- package/dist/core/artist.js +2 -5
- package/dist/core/artist.js.map +1 -1
- package/dist/core/portable-writer.d.ts +2 -2
- package/dist/core/portable-writer.d.ts.map +1 -1
- package/dist/core/portable-writer.js +69 -51
- package/dist/core/portable-writer.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -8
- package/dist/core/writer.d.ts +0 -7
- package/dist/core/writer.d.ts.map +0 -1
- package/dist/core/writer.js +0 -126
- package/dist/core/writer.js.map +0 -1
- package/dist/lib/detection.d.ts +0 -13
- package/dist/lib/detection.d.ts.map +0 -1
- package/dist/lib/detection.js +0 -158
- package/dist/lib/detection.js.map +0 -1
- package/dist/lib/frontmatter.d.ts +0 -28
- package/dist/lib/frontmatter.d.ts.map +0 -1
- package/dist/lib/frontmatter.js +0 -114
- package/dist/lib/frontmatter.js.map +0 -1
package/dist/config.d.ts
CHANGED
|
@@ -1,27 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* Frontmatter configuration schema
|
|
4
|
-
*/
|
|
5
|
-
export declare const FrontmatterConfigSchema: z.ZodObject<{
|
|
6
|
-
dateField: z.ZodOptional<z.ZodString>;
|
|
7
|
-
dateFormat: z.ZodOptional<z.ZodString>;
|
|
8
|
-
imageField: z.ZodOptional<z.ZodString>;
|
|
9
|
-
taxonomyField: z.ZodOptional<z.ZodString>;
|
|
10
|
-
additionalFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
dateField?: string | undefined;
|
|
13
|
-
dateFormat?: string | undefined;
|
|
14
|
-
imageField?: string | undefined;
|
|
15
|
-
taxonomyField?: string | undefined;
|
|
16
|
-
additionalFields?: Record<string, any> | undefined;
|
|
17
|
-
}, {
|
|
18
|
-
dateField?: string | undefined;
|
|
19
|
-
dateFormat?: string | undefined;
|
|
20
|
-
imageField?: string | undefined;
|
|
21
|
-
taxonomyField?: string | undefined;
|
|
22
|
-
additionalFields?: Record<string, any> | undefined;
|
|
23
|
-
}>;
|
|
24
|
-
export type FrontmatterConfig = z.infer<typeof FrontmatterConfigSchema>;
|
|
25
2
|
/**
|
|
26
3
|
* Content generation options schema
|
|
27
4
|
*/
|
|
@@ -71,37 +48,11 @@ export type SanityConfig = z.infer<typeof SanityConfigSchema>;
|
|
|
71
48
|
/**
|
|
72
49
|
* Zod schema for Seshat configuration
|
|
73
50
|
*/
|
|
74
|
-
export declare const SeshatConfigSchema: z.
|
|
75
|
-
contentDir: z.ZodOptional<z.ZodString>;
|
|
76
|
-
assetsDir: z.ZodOptional<z.ZodString>;
|
|
77
|
-
publicAssetPath: z.ZodOptional<z.ZodString>;
|
|
51
|
+
export declare const SeshatConfigSchema: z.ZodObject<{
|
|
78
52
|
topic: z.ZodString;
|
|
79
53
|
tone: z.ZodString;
|
|
80
|
-
framework: z.ZodOptional<z.ZodEnum<["remix", "next", "astro", "custom"]>>;
|
|
81
54
|
schedule: z.ZodOptional<z.ZodString>;
|
|
82
|
-
fileExtension: z.ZodOptional<z.ZodEnum<["mdx", "md"]>>;
|
|
83
55
|
imageFormat: z.ZodOptional<z.ZodEnum<["png", "jpg", "svg"]>>;
|
|
84
|
-
fileNameTemplate: z.ZodOptional<z.ZodString>;
|
|
85
|
-
nestedDirectories: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
-
frontmatter: z.ZodOptional<z.ZodObject<{
|
|
87
|
-
dateField: z.ZodOptional<z.ZodString>;
|
|
88
|
-
dateFormat: z.ZodOptional<z.ZodString>;
|
|
89
|
-
imageField: z.ZodOptional<z.ZodString>;
|
|
90
|
-
taxonomyField: z.ZodOptional<z.ZodString>;
|
|
91
|
-
additionalFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
92
|
-
}, "strip", z.ZodTypeAny, {
|
|
93
|
-
dateField?: string | undefined;
|
|
94
|
-
dateFormat?: string | undefined;
|
|
95
|
-
imageField?: string | undefined;
|
|
96
|
-
taxonomyField?: string | undefined;
|
|
97
|
-
additionalFields?: Record<string, any> | undefined;
|
|
98
|
-
}, {
|
|
99
|
-
dateField?: string | undefined;
|
|
100
|
-
dateFormat?: string | undefined;
|
|
101
|
-
imageField?: string | undefined;
|
|
102
|
-
taxonomyField?: string | undefined;
|
|
103
|
-
additionalFields?: Record<string, any> | undefined;
|
|
104
|
-
}>>;
|
|
105
56
|
generation: z.ZodOptional<z.ZodObject<{
|
|
106
57
|
targetWordCount: z.ZodOptional<z.ZodNumber>;
|
|
107
58
|
includeCodeExamples: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -121,8 +72,7 @@ export declare const SeshatConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
121
72
|
customInstructions?: string | undefined;
|
|
122
73
|
enableImageGeneration?: boolean | undefined;
|
|
123
74
|
}>>;
|
|
124
|
-
|
|
125
|
-
sanity: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
sanity: z.ZodObject<{
|
|
126
76
|
projectId: z.ZodString;
|
|
127
77
|
dataset: z.ZodString;
|
|
128
78
|
token: z.ZodOptional<z.ZodString>;
|
|
@@ -140,60 +90,19 @@ export declare const SeshatConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
140
90
|
token?: string | undefined;
|
|
141
91
|
apiVersion?: string | undefined;
|
|
142
92
|
documentType?: string | undefined;
|
|
143
|
-
}
|
|
93
|
+
}>;
|
|
144
94
|
}, "strip", z.ZodTypeAny, {
|
|
145
95
|
topic: string;
|
|
146
96
|
tone: string;
|
|
147
|
-
|
|
148
|
-
assetsDir?: string | undefined;
|
|
149
|
-
publicAssetPath?: string | undefined;
|
|
150
|
-
framework?: "remix" | "next" | "astro" | "custom" | undefined;
|
|
151
|
-
schedule?: string | undefined;
|
|
152
|
-
fileExtension?: "mdx" | "md" | undefined;
|
|
153
|
-
imageFormat?: "png" | "jpg" | "svg" | undefined;
|
|
154
|
-
fileNameTemplate?: string | undefined;
|
|
155
|
-
nestedDirectories?: boolean | undefined;
|
|
156
|
-
frontmatter?: {
|
|
157
|
-
dateField?: string | undefined;
|
|
158
|
-
dateFormat?: string | undefined;
|
|
159
|
-
imageField?: string | undefined;
|
|
160
|
-
taxonomyField?: string | undefined;
|
|
161
|
-
additionalFields?: Record<string, any> | undefined;
|
|
162
|
-
} | undefined;
|
|
163
|
-
generation?: {
|
|
164
|
-
targetWordCount?: number | undefined;
|
|
165
|
-
includeCodeExamples?: boolean | undefined;
|
|
166
|
-
seoOptimized?: boolean | undefined;
|
|
167
|
-
customInstructions?: string | undefined;
|
|
168
|
-
enableImageGeneration?: boolean | undefined;
|
|
169
|
-
} | undefined;
|
|
170
|
-
sanity?: {
|
|
97
|
+
sanity: {
|
|
171
98
|
projectId: string;
|
|
172
99
|
dataset: string;
|
|
173
100
|
token?: string | undefined;
|
|
174
101
|
apiVersion?: string | undefined;
|
|
175
102
|
documentType?: string | undefined;
|
|
176
|
-
}
|
|
177
|
-
outputMode?: "local" | "sanity" | undefined;
|
|
178
|
-
}, {
|
|
179
|
-
topic: string;
|
|
180
|
-
tone: string;
|
|
181
|
-
contentDir?: string | undefined;
|
|
182
|
-
assetsDir?: string | undefined;
|
|
183
|
-
publicAssetPath?: string | undefined;
|
|
184
|
-
framework?: "remix" | "next" | "astro" | "custom" | undefined;
|
|
103
|
+
};
|
|
185
104
|
schedule?: string | undefined;
|
|
186
|
-
fileExtension?: "mdx" | "md" | undefined;
|
|
187
105
|
imageFormat?: "png" | "jpg" | "svg" | undefined;
|
|
188
|
-
fileNameTemplate?: string | undefined;
|
|
189
|
-
nestedDirectories?: boolean | undefined;
|
|
190
|
-
frontmatter?: {
|
|
191
|
-
dateField?: string | undefined;
|
|
192
|
-
dateFormat?: string | undefined;
|
|
193
|
-
imageField?: string | undefined;
|
|
194
|
-
taxonomyField?: string | undefined;
|
|
195
|
-
additionalFields?: Record<string, any> | undefined;
|
|
196
|
-
} | undefined;
|
|
197
106
|
generation?: {
|
|
198
107
|
targetWordCount?: number | undefined;
|
|
199
108
|
includeCodeExamples?: boolean | undefined;
|
|
@@ -201,67 +110,18 @@ export declare const SeshatConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
201
110
|
customInstructions?: string | undefined;
|
|
202
111
|
enableImageGeneration?: boolean | undefined;
|
|
203
112
|
} | undefined;
|
|
204
|
-
|
|
205
|
-
projectId: string;
|
|
206
|
-
dataset: string;
|
|
207
|
-
token?: string | undefined;
|
|
208
|
-
apiVersion?: string | undefined;
|
|
209
|
-
documentType?: string | undefined;
|
|
210
|
-
} | undefined;
|
|
211
|
-
outputMode?: "local" | "sanity" | undefined;
|
|
212
|
-
}>, {
|
|
113
|
+
}, {
|
|
213
114
|
topic: string;
|
|
214
115
|
tone: string;
|
|
215
|
-
|
|
216
|
-
assetsDir?: string | undefined;
|
|
217
|
-
publicAssetPath?: string | undefined;
|
|
218
|
-
framework?: "remix" | "next" | "astro" | "custom" | undefined;
|
|
219
|
-
schedule?: string | undefined;
|
|
220
|
-
fileExtension?: "mdx" | "md" | undefined;
|
|
221
|
-
imageFormat?: "png" | "jpg" | "svg" | undefined;
|
|
222
|
-
fileNameTemplate?: string | undefined;
|
|
223
|
-
nestedDirectories?: boolean | undefined;
|
|
224
|
-
frontmatter?: {
|
|
225
|
-
dateField?: string | undefined;
|
|
226
|
-
dateFormat?: string | undefined;
|
|
227
|
-
imageField?: string | undefined;
|
|
228
|
-
taxonomyField?: string | undefined;
|
|
229
|
-
additionalFields?: Record<string, any> | undefined;
|
|
230
|
-
} | undefined;
|
|
231
|
-
generation?: {
|
|
232
|
-
targetWordCount?: number | undefined;
|
|
233
|
-
includeCodeExamples?: boolean | undefined;
|
|
234
|
-
seoOptimized?: boolean | undefined;
|
|
235
|
-
customInstructions?: string | undefined;
|
|
236
|
-
enableImageGeneration?: boolean | undefined;
|
|
237
|
-
} | undefined;
|
|
238
|
-
sanity?: {
|
|
116
|
+
sanity: {
|
|
239
117
|
projectId: string;
|
|
240
118
|
dataset: string;
|
|
241
119
|
token?: string | undefined;
|
|
242
120
|
apiVersion?: string | undefined;
|
|
243
121
|
documentType?: string | undefined;
|
|
244
|
-
}
|
|
245
|
-
outputMode?: "local" | "sanity" | undefined;
|
|
246
|
-
}, {
|
|
247
|
-
topic: string;
|
|
248
|
-
tone: string;
|
|
249
|
-
contentDir?: string | undefined;
|
|
250
|
-
assetsDir?: string | undefined;
|
|
251
|
-
publicAssetPath?: string | undefined;
|
|
252
|
-
framework?: "remix" | "next" | "astro" | "custom" | undefined;
|
|
122
|
+
};
|
|
253
123
|
schedule?: string | undefined;
|
|
254
|
-
fileExtension?: "mdx" | "md" | undefined;
|
|
255
124
|
imageFormat?: "png" | "jpg" | "svg" | undefined;
|
|
256
|
-
fileNameTemplate?: string | undefined;
|
|
257
|
-
nestedDirectories?: boolean | undefined;
|
|
258
|
-
frontmatter?: {
|
|
259
|
-
dateField?: string | undefined;
|
|
260
|
-
dateFormat?: string | undefined;
|
|
261
|
-
imageField?: string | undefined;
|
|
262
|
-
taxonomyField?: string | undefined;
|
|
263
|
-
additionalFields?: Record<string, any> | undefined;
|
|
264
|
-
} | undefined;
|
|
265
125
|
generation?: {
|
|
266
126
|
targetWordCount?: number | undefined;
|
|
267
127
|
includeCodeExamples?: boolean | undefined;
|
|
@@ -269,41 +129,12 @@ export declare const SeshatConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
269
129
|
customInstructions?: string | undefined;
|
|
270
130
|
enableImageGeneration?: boolean | undefined;
|
|
271
131
|
} | undefined;
|
|
272
|
-
sanity?: {
|
|
273
|
-
projectId: string;
|
|
274
|
-
dataset: string;
|
|
275
|
-
token?: string | undefined;
|
|
276
|
-
apiVersion?: string | undefined;
|
|
277
|
-
documentType?: string | undefined;
|
|
278
|
-
} | undefined;
|
|
279
|
-
outputMode?: "local" | "sanity" | undefined;
|
|
280
132
|
}>;
|
|
281
133
|
export type SeshatConfig = z.infer<typeof SeshatConfigSchema>;
|
|
282
134
|
/**
|
|
283
|
-
*
|
|
284
|
-
* Note: 'custom' framework type has no preset and allows manual configuration
|
|
285
|
-
*/
|
|
286
|
-
export declare const FRAMEWORK_PRESETS: Record<'remix' | 'next' | 'astro', Partial<SeshatConfig>>;
|
|
287
|
-
/**
|
|
288
|
-
* Default configuration values (for local output mode)
|
|
289
|
-
*/
|
|
290
|
-
export declare const DEFAULT_CONFIG: {
|
|
291
|
-
contentDir: string;
|
|
292
|
-
assetsDir: string;
|
|
293
|
-
publicAssetPath: string;
|
|
294
|
-
topic: string;
|
|
295
|
-
tone: string;
|
|
296
|
-
framework: "remix";
|
|
297
|
-
fileExtension: "mdx";
|
|
298
|
-
imageFormat: "png";
|
|
299
|
-
fileNameTemplate: string;
|
|
300
|
-
nestedDirectories: boolean;
|
|
301
|
-
outputMode: "local";
|
|
302
|
-
};
|
|
303
|
-
/**
|
|
304
|
-
* Resolve configuration with framework presets and defaults
|
|
135
|
+
* Default image format
|
|
305
136
|
*/
|
|
306
|
-
export declare
|
|
137
|
+
export declare const DEFAULT_IMAGE_FORMAT: "png";
|
|
307
138
|
/**
|
|
308
139
|
* Load and validate configuration from file
|
|
309
140
|
*/
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;EAMjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;EAM7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAG,KAAc,CAAC;AAEnD;;GAEG;AACH,wBAAsB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAY1E"}
|
package/dist/config.js
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* Frontmatter configuration schema
|
|
4
|
-
*/
|
|
5
|
-
export const FrontmatterConfigSchema = z.object({
|
|
6
|
-
dateField: z.string().optional().describe('Field name for date (e.g., "date", "pubDate", "publishedAt")'),
|
|
7
|
-
dateFormat: z.string().optional().describe('Date format: "iso" (default), "date-only", or custom format'),
|
|
8
|
-
imageField: z.string().optional().describe('Field name for image (e.g., "image", "coverImage", "heroImage")'),
|
|
9
|
-
taxonomyField: z.string().optional().describe('Field name for primary taxonomy (e.g., "tag", "category")'),
|
|
10
|
-
additionalFields: z.record(z.any()).optional().describe('Additional custom frontmatter fields'),
|
|
11
|
-
});
|
|
12
2
|
/**
|
|
13
3
|
* Content generation options schema
|
|
14
4
|
*/
|
|
@@ -33,118 +23,20 @@ export const SanityConfigSchema = z.object({
|
|
|
33
23
|
* Zod schema for Seshat configuration
|
|
34
24
|
*/
|
|
35
25
|
export const SeshatConfigSchema = z.object({
|
|
36
|
-
contentDir: z.string().optional().describe('Directory containing blog MDX files (required for local/both output modes)'),
|
|
37
|
-
assetsDir: z.string().optional().describe('Directory for generated images (required for local/both output modes)'),
|
|
38
|
-
publicAssetPath: z.string().optional().describe('Public URL path for images (required for local/both output modes)'),
|
|
39
26
|
topic: z.string().describe('Global topic constraint for content generation'),
|
|
40
27
|
tone: z.string().describe('Writing tone (e.g., "Professional yet witty")'),
|
|
41
|
-
framework: z.enum(['remix', 'next', 'astro', 'custom']).optional().describe('Blog framework type (uses preset configuration, or custom for manual configuration)'),
|
|
42
28
|
schedule: z
|
|
43
29
|
.string()
|
|
44
30
|
.optional()
|
|
45
31
|
.describe('Cron expression for GitHub Actions (e.g. "0 9 * * *" for daily at 9 UTC)'),
|
|
46
|
-
// File structure options
|
|
47
|
-
fileExtension: z.enum(['mdx', 'md']).optional().describe('File extension for posts'),
|
|
48
32
|
imageFormat: z.enum(['png', 'jpg', 'svg']).optional().describe('Image format for generated images'),
|
|
49
|
-
fileNameTemplate: z.string().optional().describe('Template for file naming (e.g., "{{slug}}", "{{date}}-{{slug}}")'),
|
|
50
|
-
nestedDirectories: z.boolean().optional().describe('Use date-based nested directories (e.g., 2024/01/)'),
|
|
51
|
-
// Frontmatter customization
|
|
52
|
-
frontmatter: FrontmatterConfigSchema.optional().describe('Custom frontmatter configuration'),
|
|
53
|
-
// Content generation options
|
|
54
33
|
generation: GenerationConfigSchema.optional().describe('Content generation options'),
|
|
55
|
-
|
|
56
|
-
outputMode: z.enum(['local', 'sanity']).optional().describe('Output mode: local files or Sanity CMS (default: local)'),
|
|
57
|
-
sanity: SanityConfigSchema.optional().describe('Sanity CMS configuration (required when outputMode is "sanity")'),
|
|
58
|
-
}).refine((data) => {
|
|
59
|
-
const mode = data.outputMode || 'local';
|
|
60
|
-
// If using local mode, contentDir, assetsDir, and publicAssetPath are required
|
|
61
|
-
if (mode === 'local') {
|
|
62
|
-
return !!(data.contentDir && data.assetsDir && data.publicAssetPath);
|
|
63
|
-
}
|
|
64
|
-
return true;
|
|
65
|
-
}, {
|
|
66
|
-
message: 'contentDir, assetsDir, and publicAssetPath are required when outputMode is "local"',
|
|
34
|
+
sanity: SanityConfigSchema.describe('Sanity CMS configuration (required)'),
|
|
67
35
|
});
|
|
68
36
|
/**
|
|
69
|
-
*
|
|
70
|
-
* Note: 'custom' framework type has no preset and allows manual configuration
|
|
71
|
-
*/
|
|
72
|
-
export const FRAMEWORK_PRESETS = {
|
|
73
|
-
remix: {
|
|
74
|
-
fileExtension: 'mdx',
|
|
75
|
-
frontmatter: {
|
|
76
|
-
dateField: 'date',
|
|
77
|
-
dateFormat: 'iso',
|
|
78
|
-
imageField: 'image',
|
|
79
|
-
taxonomyField: 'tag',
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
next: {
|
|
83
|
-
fileExtension: 'mdx',
|
|
84
|
-
frontmatter: {
|
|
85
|
-
dateField: 'date',
|
|
86
|
-
dateFormat: 'iso',
|
|
87
|
-
imageField: 'coverImage',
|
|
88
|
-
taxonomyField: 'tag',
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
astro: {
|
|
92
|
-
fileExtension: 'mdx',
|
|
93
|
-
frontmatter: {
|
|
94
|
-
dateField: 'pubDate',
|
|
95
|
-
dateFormat: 'iso',
|
|
96
|
-
imageField: 'heroImage',
|
|
97
|
-
taxonomyField: 'tag',
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
};
|
|
101
|
-
/**
|
|
102
|
-
* Default configuration values (for local output mode)
|
|
37
|
+
* Default image format
|
|
103
38
|
*/
|
|
104
|
-
export const
|
|
105
|
-
contentDir: 'app/routes/blog',
|
|
106
|
-
assetsDir: 'public/images/generated',
|
|
107
|
-
publicAssetPath: '/images/generated',
|
|
108
|
-
topic: 'Software Engineering and Technology',
|
|
109
|
-
tone: 'Professional yet witty',
|
|
110
|
-
framework: 'remix',
|
|
111
|
-
fileExtension: 'mdx',
|
|
112
|
-
imageFormat: 'png',
|
|
113
|
-
fileNameTemplate: '{{slug}}',
|
|
114
|
-
nestedDirectories: false,
|
|
115
|
-
outputMode: 'local',
|
|
116
|
-
};
|
|
117
|
-
/**
|
|
118
|
-
* Resolve configuration with framework presets and defaults
|
|
119
|
-
*/
|
|
120
|
-
export function resolveConfig(config) {
|
|
121
|
-
// If framework is specified and not 'custom', merge with preset
|
|
122
|
-
let resolved = { ...config };
|
|
123
|
-
if (config.framework && config.framework !== 'custom' && FRAMEWORK_PRESETS[config.framework]) {
|
|
124
|
-
const preset = FRAMEWORK_PRESETS[config.framework];
|
|
125
|
-
// Apply preset values only if not explicitly set
|
|
126
|
-
if (!config.fileExtension)
|
|
127
|
-
resolved.fileExtension = preset.fileExtension;
|
|
128
|
-
if (!config.frontmatter)
|
|
129
|
-
resolved.frontmatter = preset.frontmatter;
|
|
130
|
-
}
|
|
131
|
-
// Apply remaining defaults
|
|
132
|
-
resolved.fileExtension = resolved.fileExtension || DEFAULT_CONFIG.fileExtension;
|
|
133
|
-
resolved.imageFormat = resolved.imageFormat || DEFAULT_CONFIG.imageFormat;
|
|
134
|
-
resolved.fileNameTemplate = resolved.fileNameTemplate || DEFAULT_CONFIG.fileNameTemplate;
|
|
135
|
-
resolved.nestedDirectories = resolved.nestedDirectories ?? DEFAULT_CONFIG.nestedDirectories;
|
|
136
|
-
resolved.outputMode = resolved.outputMode ?? 'local';
|
|
137
|
-
// Default frontmatter config if none provided
|
|
138
|
-
if (!resolved.frontmatter) {
|
|
139
|
-
resolved.frontmatter = {
|
|
140
|
-
dateField: 'date',
|
|
141
|
-
dateFormat: 'iso',
|
|
142
|
-
imageField: 'image',
|
|
143
|
-
taxonomyField: 'tag',
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
return resolved;
|
|
147
|
-
}
|
|
39
|
+
export const DEFAULT_IMAGE_FORMAT = 'png';
|
|
148
40
|
/**
|
|
149
41
|
* Load and validate configuration from file
|
|
150
42
|
*/
|
|
@@ -153,6 +45,10 @@ export async function loadConfig(configPath) {
|
|
|
153
45
|
const raw = await fs.readFile(configPath, 'utf-8');
|
|
154
46
|
const json = JSON.parse(raw);
|
|
155
47
|
const config = SeshatConfigSchema.parse(json);
|
|
156
|
-
|
|
48
|
+
// Apply default for imageFormat if not provided
|
|
49
|
+
if (!config.imageFormat) {
|
|
50
|
+
config.imageFormat = DEFAULT_IMAGE_FORMAT;
|
|
51
|
+
}
|
|
52
|
+
return config;
|
|
157
53
|
}
|
|
158
54
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,o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AAQ,EAAE;SACV,QAAQ,CAAC,0EAA0E,CAAC;IACvF,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACnG,UAAU,EAAE,sBAAsB,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IACpF,MAAM,EAAE,kBAAkB,CAAC,QAAQ,CAAC,qCAAqC,CAAC;CAC3E,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAc,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,UAAkB;IACjD,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;IACvC,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACnD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,MAAM,MAAM,GAAG,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAE9C,gDAAgD;IAChD,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QACxB,MAAM,CAAC,WAAW,GAAG,oBAAoB,CAAC;IAC5C,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/core/analyzer.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface RepositoryContext {
|
|
|
18
18
|
recentTopics: string[];
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Scan repository -
|
|
21
|
+
* Scan repository - fetches existing posts from Sanity CMS
|
|
22
22
|
*/
|
|
23
23
|
export declare function scanRepository(config: SeshatConfig): Promise<RepositoryContext>;
|
|
24
24
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../../src/core/analyzer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../../src/core/analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGjD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA0CrF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAQnE"}
|
package/dist/core/analyzer.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import fs from 'fs/promises';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import matter from 'gray-matter';
|
|
4
1
|
import { getSanityClient } from './sanity.js';
|
|
5
2
|
/**
|
|
6
|
-
*
|
|
3
|
+
* Scan repository - fetches existing posts from Sanity CMS
|
|
7
4
|
*/
|
|
8
|
-
async function
|
|
5
|
+
export async function scanRepository(config) {
|
|
9
6
|
const client = getSanityClient(config, { readOnly: true });
|
|
10
7
|
const documentType = config.sanity?.documentType || 'post';
|
|
11
8
|
// Query all posts from Sanity
|
|
@@ -44,116 +41,6 @@ async function scanSanityPosts(config) {
|
|
|
44
41
|
};
|
|
45
42
|
}
|
|
46
43
|
}
|
|
47
|
-
/**
|
|
48
|
-
* Scan the content directory and extract metadata from all MDX files
|
|
49
|
-
*/
|
|
50
|
-
async function scanLocalPosts(config) {
|
|
51
|
-
// Get frontmatter field names from config
|
|
52
|
-
const dateField = config.frontmatter?.dateField || 'date';
|
|
53
|
-
const taxonomyField = config.frontmatter?.taxonomyField || 'tag';
|
|
54
|
-
if (!config.contentDir) {
|
|
55
|
-
// If no contentDir, return empty context
|
|
56
|
-
return {
|
|
57
|
-
totalPosts: 0,
|
|
58
|
-
posts: [],
|
|
59
|
-
recentTopics: [],
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
const contentPath = path.resolve(process.cwd(), config.contentDir);
|
|
63
|
-
try {
|
|
64
|
-
await fs.access(contentPath);
|
|
65
|
-
}
|
|
66
|
-
catch {
|
|
67
|
-
// Directory doesn't exist yet, return empty context
|
|
68
|
-
return {
|
|
69
|
-
totalPosts: 0,
|
|
70
|
-
posts: [],
|
|
71
|
-
recentTopics: [],
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
const posts = [];
|
|
75
|
-
// Recursively scan for MD/MDX files (to support nested directories)
|
|
76
|
-
async function* findMarkdownFiles(dir) {
|
|
77
|
-
const entries = await fs.readdir(dir, { withFileTypes: true });
|
|
78
|
-
for (const entry of entries) {
|
|
79
|
-
const fullPath = path.join(dir, entry.name);
|
|
80
|
-
if (entry.isDirectory()) {
|
|
81
|
-
yield* findMarkdownFiles(fullPath);
|
|
82
|
-
}
|
|
83
|
-
else if (/\.(md|mdx)$/i.test(entry.name)) {
|
|
84
|
-
yield fullPath;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
for await (const filePath of findMarkdownFiles(contentPath)) {
|
|
89
|
-
const fileName = path.basename(filePath);
|
|
90
|
-
const slug = fileName.replace(/\.(md|mdx)$/i, '');
|
|
91
|
-
try {
|
|
92
|
-
const content = await fs.readFile(filePath, 'utf-8');
|
|
93
|
-
// Try gray-matter first
|
|
94
|
-
let data;
|
|
95
|
-
try {
|
|
96
|
-
const parsed = matter(content);
|
|
97
|
-
data = parsed.data;
|
|
98
|
-
}
|
|
99
|
-
catch (yamlError) {
|
|
100
|
-
// Fallback: manual YAML parsing for problematic frontmatter
|
|
101
|
-
const frontmatterMatch = content.match(/^---\n([\s\S]+?)\n---/);
|
|
102
|
-
if (!frontmatterMatch)
|
|
103
|
-
throw yamlError;
|
|
104
|
-
const fm = frontmatterMatch[1];
|
|
105
|
-
// Extract fields manually using configured field names
|
|
106
|
-
const titleMatch = fm.match(/^title:\s*['"](.+?)['"]?\s*$/m);
|
|
107
|
-
const descMatch = fm.match(/^description:\s*>-?\s*\n((?:\s+.+\n?)+)/m);
|
|
108
|
-
const tagMatch = fm.match(new RegExp(`^${taxonomyField}s?:\\s*(.+?)\\s*$`, 'm'));
|
|
109
|
-
const dateMatch = fm.match(new RegExp(`^${dateField}:\\s*(.+?)\\s*$`, 'm'));
|
|
110
|
-
data = {
|
|
111
|
-
title: titleMatch ? titleMatch[1] : slug,
|
|
112
|
-
description: descMatch ? descMatch[1].replace(/\n\s+/g, ' ').trim() : undefined,
|
|
113
|
-
tag: tagMatch ? tagMatch[1].trim() : undefined,
|
|
114
|
-
tags: undefined,
|
|
115
|
-
date: dateMatch ? dateMatch[1].trim() : undefined,
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
// Handle configured taxonomy field (singular or plural)
|
|
119
|
-
const taxonomyValue = data[taxonomyField] || data[`${taxonomyField}s`] || data.tags || data.tag;
|
|
120
|
-
const tags = Array.isArray(taxonomyValue) ? taxonomyValue : (taxonomyValue ? [taxonomyValue] : undefined);
|
|
121
|
-
// Get date from configured field
|
|
122
|
-
const dateValue = data[dateField] || data.date || data.pubDate;
|
|
123
|
-
posts.push({
|
|
124
|
-
title: data.title || slug,
|
|
125
|
-
description: data.description,
|
|
126
|
-
tags,
|
|
127
|
-
date: dateValue,
|
|
128
|
-
slug,
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
catch (err) {
|
|
132
|
-
// Skip files that can't be read or parsed
|
|
133
|
-
continue;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
// Extract unique topics from tags
|
|
137
|
-
const allTags = posts.flatMap((p) => p.tags || []);
|
|
138
|
-
const uniqueTags = [...new Set(allTags)];
|
|
139
|
-
return {
|
|
140
|
-
totalPosts: posts.length,
|
|
141
|
-
posts,
|
|
142
|
-
recentTopics: uniqueTags.slice(0, 20), // Limit to most recent topics
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Scan repository - chooses between local files or Sanity based on outputMode
|
|
147
|
-
*/
|
|
148
|
-
export async function scanRepository(config) {
|
|
149
|
-
const outputMode = config.outputMode || 'local';
|
|
150
|
-
// If using Sanity, fetch from Sanity
|
|
151
|
-
if (outputMode === 'sanity') {
|
|
152
|
-
return await scanSanityPosts(config);
|
|
153
|
-
}
|
|
154
|
-
// Otherwise, scan local files
|
|
155
|
-
return await scanLocalPosts(config);
|
|
156
|
-
}
|
|
157
44
|
/**
|
|
158
45
|
* Create a compact JSON summary for Gemini (minimize token usage)
|
|
159
46
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer.js","sourceRoot":"","sources":["../../src/core/analyzer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"analyzer.js","sourceRoot":"","sources":["../../src/core/analyzer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAsB9C;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAAoB;IACvD,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,IAAI,MAAM,CAAC;IAE3D,8BAA8B;IAC9B,MAAM,KAAK,GAAG,eAAe,YAAY;;;;;;IAMvC,CAAC;IAEH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E,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;QACzC,MAAM,EAAE,OAAO,CAAC,YAAY;KAC7B,CAAC;IAEF,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC1C,CAAC"}
|
package/dist/core/artist.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { SeshatConfig } from '../config.js';
|
|
2
1
|
/**
|
|
3
2
|
* Generate an image using Gemini's Imagen 4.0 model
|
|
4
3
|
*/
|
|
5
|
-
export declare function generateImage(
|
|
4
|
+
export declare function generateImage(imagePrompt: string, slug: string, assetsDir: string): Promise<string>;
|
|
6
5
|
//# sourceMappingURL=artist.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artist.d.ts","sourceRoot":"","sources":["../../src/core/artist.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"artist.d.ts","sourceRoot":"","sources":["../../src/core/artist.ts"],"names":[],"mappings":"AAoBA;;GAEG;AACH,wBAAsB,aAAa,CACjC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,CAwDjB"}
|
package/dist/core/artist.js
CHANGED
|
@@ -17,11 +17,8 @@ const STYLE_OVERLAYS = [
|
|
|
17
17
|
/**
|
|
18
18
|
* Generate an image using Gemini's Imagen 4.0 model
|
|
19
19
|
*/
|
|
20
|
-
export async function generateImage(
|
|
21
|
-
|
|
22
|
-
throw new Error('assetsDir is required for image generation');
|
|
23
|
-
}
|
|
24
|
-
const assetsPath = path.resolve(process.cwd(), config.assetsDir);
|
|
20
|
+
export async function generateImage(imagePrompt, slug, assetsDir) {
|
|
21
|
+
const assetsPath = path.resolve(process.cwd(), assetsDir);
|
|
25
22
|
const imagePath = path.join(assetsPath, `${slug}.png`);
|
|
26
23
|
// Ensure the assets directory exists
|
|
27
24
|
await fs.mkdir(assetsPath, { recursive: true });
|
package/dist/core/artist.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artist.js","sourceRoot":"","sources":["../../src/core/artist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"artist.js","sourceRoot":"","sources":["../../src/core/artist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,MAAM,WAAW,GAAG,yBAAyB,CAAC;AAE9C,SAAS,OAAO,CAAI,GAAQ;IAC1B,OAAO,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AACrD,CAAC;AAED,MAAM,cAAc,GAAa;IAC/B,oMAAoM;IACpM,6IAA6I;IAC7I,uIAAuI;IACvI,8GAA8G;IAC9G,6GAA6G;IAC7G,8HAA8H;CAC/H,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,WAAmB,EACnB,IAAY,EACZ,SAAiB;IAEjB,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,CAAC,CAAC;IAC1D,MAAM,SAAS,GAAG,IAAI,C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AC,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC5C,CAAC;QAED,oCAAoC;QACpC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC3E,MAAM,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QAE3C,QAAQ,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;QAExE,OAAO,SAAS,CAAC;IACnB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,wCAAwC;QACxC,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BlogPlan } from
|
|
2
|
-
import type { SeshatConfig } from
|
|
1
|
+
import type { BlogPlan } from "./planner.js";
|
|
2
|
+
import type { SeshatConfig } from "../config.js";
|
|
3
3
|
/**
|
|
4
4
|
* Use Gemini to write content as structured markdown that we'll parse into Portable Text
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portable-writer.d.ts","sourceRoot":"","sources":["../../src/core/portable-writer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"portable-writer.d.ts","sourceRoot":"","sources":["../../src/core/portable-writer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AA2CjD;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,GAAG,EAAE,CAAC,CAqFhB"}
|