@zenithbuild/plugins 0.3.7 → 1.3.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/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.9] - 2026-01-26
9
+
10
+ ### 📝 Other Changes
11
+
12
+ - **** ()
13
+
8
14
  ## [0.3.1] - 2026-01-16
9
15
 
10
16
  ### 🐛 Bug Fixes
@@ -0,0 +1,24 @@
1
+ # 🚀 @zenithbuild/plugins v0.3.9
2
+
3
+ ## [0.3.9] - 2026-01-26
4
+
5
+ ### 📝 Other Changes
6
+
7
+ - **** ()
8
+
9
+
10
+
11
+ ## 📦 Installation
12
+
13
+ ```bash
14
+ bun add @zenithbuild/plugins@0.3.9
15
+ ```
16
+
17
+ *or with npm:*
18
+
19
+ ```bash
20
+ npm install @zenithbuild/plugins@0.3.9
21
+ ```
22
+
23
+ ---
24
+ *Generated by Zenith Automated Release*
package/content/index.ts CHANGED
@@ -107,14 +107,13 @@ export default function content(options: ContentPluginOptions = {}): ZenithPlugi
107
107
  name: 'zenith-content',
108
108
  config: options,
109
109
  setup(ctx: PluginContext) {
110
- console.log('[zenith:content] setup() starting...');
110
+
111
111
  let collections: Record<string, ContentItem[]> = {};
112
112
 
113
113
  if (options.sources && Object.keys(options.sources).length > 0) {
114
114
  // Use new sources configuration
115
- console.log('[zenith:content] Loading from sources...');
115
+ // Use new sources configuration
116
116
  collections = loadFromSources(options.sources, ctx.projectRoot);
117
- console.log('[zenith:content] loadFromSources completed');
118
117
  } else if (options.contentDir) {
119
118
  // Legacy: single content directory
120
119
  const contentPath = path.resolve(ctx.projectRoot, options.contentDir);
@@ -129,17 +128,16 @@ export default function content(options: ContentPluginOptions = {}): ZenithPlugi
129
128
  collections[collection].push(item);
130
129
  }
131
130
 
132
- console.log(`[zenith:content] Loaded ${items.length} items from ${options.contentDir}`);
131
+
133
132
  }
134
133
 
135
134
  // Pass to runtime using generic namespaced data store
136
135
  const allItems = Object.values(collections).flat();
137
- console.log('[zenith:content] Setting plugin data, items:', allItems.length);
138
136
  ctx.setPluginData('content', allItems);
139
137
 
140
138
  // Update legacy storage
141
139
  allContent = allItems;
142
- console.log('[zenith:content] setup() completed');
140
+
143
141
  },
144
142
 
145
143
  /**
@@ -170,7 +168,7 @@ export default function content(options: ContentPluginOptions = {}): ZenithPlugi
170
168
  if (filename.startsWith('content') || filename.endsWith('.md') || filename.endsWith('.mdx')) {
171
169
  // Signal that content should be reloaded
172
170
  // The actual reload happens via plugin re-initialization
173
- console.log('[zenith:content] Content file changed:', filename);
171
+
174
172
  }
175
173
  });
176
174
  }
@@ -200,7 +198,7 @@ export const plugin: ZenithPlugin = {
200
198
  allContent = items;
201
199
  ctx.setPluginData('content', items);
202
200
 
203
- console.log(`[zenith:content] Loaded ${items.length} items from ${contentDir}`);
201
+
204
202
  },
205
203
 
206
204
  registerCLI(api: CLIBridgeAPI) {
package/content/loader.ts CHANGED
@@ -4,19 +4,15 @@ import type { ContentItem, ContentSourceConfig } from './types';
4
4
  import { compileMarkdown, vnodesToHtml } from './markdown';
5
5
 
6
6
  export function loadContent(contentDir: string): ContentItem[] {
7
- console.log(`[zenith:content:loadContent] Starting for: ${contentDir}`);
8
7
  if (!fs.existsSync(contentDir)) {
9
8
  console.warn(`Content directory ${contentDir} does not exist.`);
10
9
  return [];
11
10
  }
12
11
 
13
12
  const items: ContentItem[] = [];
14
- console.log('[zenith:content:loadContent] Getting all files...');
15
13
  const files = getAllFiles(contentDir);
16
- console.log(`[zenith:content:loadContent] Found ${files.length} files`);
17
14
 
18
15
  for (const filePath of files) {
19
- console.log(`[zenith:content:loadContent] Processing file: ${path.basename(filePath)}`);
20
16
  const ext = path.extname(filePath).toLowerCase();
21
17
  const relativePath = path.relative(contentDir, filePath);
22
18
  const collection = relativePath.split(path.sep)[0];
@@ -44,14 +40,10 @@ export function loadContent(contentDir: string): ContentItem[] {
44
40
  console.error(`Error parsing JSON file ${filePath}:`, e);
45
41
  }
46
42
  } else if (ext === '.md' || ext === '.mdx') {
47
- console.log(`[zenith:content:loadContent] Parsing markdown: ${path.basename(filePath)}`);
48
43
  const { metadata, content: markdownBody } = parseMarkdown(rawContent);
49
- console.log(`[zenith:content:loadContent] Compiling markdown...`);
50
44
  // Compile markdown to VNodes then to HTML for rendering
51
45
  const vnodes = compileMarkdown(markdownBody);
52
- console.log(`[zenith:content:loadContent] Converting vnodes to HTML...`);
53
46
  const compiledContent = vnodesToHtml(vnodes);
54
- console.log(`[zenith:content:loadContent] Done with: ${path.basename(filePath)}`);
55
47
  items.push({
56
48
  id,
57
49
  slug,
@@ -61,7 +53,6 @@ export function loadContent(contentDir: string): ContentItem[] {
61
53
  });
62
54
  }
63
55
  }
64
- console.log(`[zenith:content:loadContent] Finished, returning ${items.length} items`);
65
56
  return items;
66
57
  }
67
58
 
@@ -73,34 +64,27 @@ export function loadFromSources(
73
64
  sources: Record<string, ContentSourceConfig>,
74
65
  projectRoot: string
75
66
  ): Record<string, ContentItem[]> {
76
- console.log('[zenith:content:loader] loadFromSources called, sources:', Object.keys(sources));
77
67
  const collections: Record<string, ContentItem[]> = {};
78
68
 
79
69
  for (const [collectionName, config] of Object.entries(sources)) {
80
- console.log(`[zenith:content:loader] Processing collection: ${collectionName}`);
81
70
  const rootPath = path.resolve(projectRoot, config.root);
82
- console.log(`[zenith:content:loader] Root path: ${rootPath}`);
83
71
 
84
72
  if (!fs.existsSync(rootPath)) {
85
73
  console.warn(`[zenith:content] Source root "${rootPath}" does not exist for collection "${collectionName}"`);
86
74
  continue;
87
75
  }
88
- console.log('[zenith:content:loader] Root path exists, scanning folders...');
89
76
 
90
77
  // Get folders to scan
91
78
  let foldersToScan: string[] = [];
92
79
 
93
80
  if (config.include && config.include.length > 0) {
94
81
  // Explicit include list
95
- console.log('[zenith:content:loader] Using explicit include list:', config.include);
96
82
  foldersToScan = config.include;
97
83
  } else {
98
84
  // Scan all subdirectories if no include specified
99
85
  try {
100
- console.log('[zenith:content:loader] Reading subdirectories...');
101
86
  foldersToScan = fs.readdirSync(rootPath)
102
87
  .filter(f => fs.statSync(path.join(rootPath, f)).isDirectory());
103
- console.log('[zenith:content:loader] Found subdirectories:', foldersToScan);
104
88
  } catch {
105
89
  // If root is itself the content folder
106
90
  foldersToScan = ['.'];
@@ -110,12 +94,10 @@ export function loadFromSources(
110
94
  // Apply excludes
111
95
  const exclude = config.exclude || [];
112
96
  foldersToScan = foldersToScan.filter(f => !exclude.includes(f));
113
- console.log('[zenith:content:loader] Folders after exclude filter:', foldersToScan);
114
97
 
115
98
  // Load content from each folder
116
99
  const items: ContentItem[] = [];
117
100
  for (const folder of foldersToScan) {
118
- console.log(`[zenith:content:loader] Processing folder: ${folder}`);
119
101
  const folderPath = folder === '.' ? rootPath : path.join(rootPath, folder);
120
102
 
121
103
  if (!fs.existsSync(folderPath)) {
@@ -123,9 +105,7 @@ export function loadFromSources(
123
105
  continue;
124
106
  }
125
107
 
126
- console.log(`[zenith:content:loader] Calling loadContent for: ${folderPath}`);
127
108
  const folderItems = loadContent(folderPath);
128
- console.log(`[zenith:content:loader] loadContent returned ${folderItems.length} items`);
129
109
 
130
110
  // Override collection name to match the configured name
131
111
  items.push(...folderItems.map(item => ({
@@ -135,7 +115,6 @@ export function loadFromSources(
135
115
  }
136
116
 
137
117
  collections[collectionName] = items;
138
- console.log(`[zenith:content] Loaded ${items.length} items for collection "${collectionName}"`);
139
118
  }
140
119
 
141
120
  return collections;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenithbuild/plugins",
3
- "version": "0.3.7",
3
+ "version": "1.3.0",
4
4
  "description": "Plugin system for Zenith framework",
5
5
  "type": "module",
6
6
  "main": "content/index.ts",
@@ -279,9 +279,13 @@ function generateChangelog(
279
279
  changelog += `### ⚠️ BREAKING CHANGES\n\n`;
280
280
  for (const commit of breakingChanges) {
281
281
  const scope = commit.scope ? `**${commit.scope}**: ` : "";
282
- changelog += `- ${scope}${commit.subject} (${commit.hash.slice(0, 7)})\n`;
282
+ changelog += `#### ${scope}${commit.subject} (${commit.hash.slice(0, 7)})\n`;
283
+ if (commit.body) {
284
+ changelog += `\n${commit.body.split('\n').map(line => `> ${line}`).join('\n')}\n`;
285
+ }
286
+ changelog += "\n";
283
287
  }
284
- changelog += "\n";
288
+ changelog += "---\n\n";
285
289
  }
286
290
 
287
291
  // Regular changes by type
@@ -294,7 +298,14 @@ function generateChangelog(
294
298
  changelog += `### ${typeConfig.title}\n\n`;
295
299
  for (const commit of typeCommits) {
296
300
  const scope = commit.scope ? `**${commit.scope}**: ` : "";
297
- changelog += `- ${scope}${commit.subject} (${commit.hash.slice(0, 7)})\n`;
301
+ changelog += `- **${scope}${commit.subject}** (${commit.hash.slice(0, 7)})\n`;
302
+
303
+ // Include body if present
304
+ if (commit.body && commit.body.trim()) {
305
+ const cleanedBody = commit.body.trim();
306
+ // Indent body for better hierarchy
307
+ changelog += `${cleanedBody.split('\n').map(line => ` > ${line}`).join('\n')}\n`;
308
+ }
298
309
  }
299
310
  changelog += "\n";
300
311
  }
@@ -303,7 +314,10 @@ function generateChangelog(
303
314
  if (groupedCommits.other && groupedCommits.other.length > 0) {
304
315
  changelog += `### 📝 Other Changes\n\n`;
305
316
  for (const commit of groupedCommits.other) {
306
- changelog += `- ${commit.subject} (${commit.hash.slice(0, 7)})\n`;
317
+ changelog += `- **${commit.subject}** (${commit.hash.slice(0, 7)})\n`;
318
+ if (commit.body && commit.body.trim()) {
319
+ changelog += `${commit.body.trim().split('\n').map(line => ` > ${line}`).join('\n')}\n`;
320
+ }
307
321
  }
308
322
  changelog += "\n";
309
323
  }
@@ -319,21 +333,24 @@ function generateReleaseNotes(
319
333
  ): string {
320
334
  const changelog = generateChangelog(commits, newVersion, config);
321
335
 
322
- return `# ${packageName} v${newVersion}
336
+ return `# 🚀 ${packageName} v${newVersion}
323
337
 
324
338
  ${changelog}
325
339
 
326
- ## Installation
340
+ ## 📦 Installation
327
341
 
328
342
  \`\`\`bash
329
343
  bun add ${packageName}@${newVersion}
330
344
  \`\`\`
331
345
 
332
- or with npm:
346
+ *or with npm:*
333
347
 
334
348
  \`\`\`bash
335
349
  npm install ${packageName}@${newVersion}
336
350
  \`\`\`
351
+
352
+ ---
353
+ *Generated by Zenith Automated Release*
337
354
  `;
338
355
  }
339
356