meno-core 1.0.26 → 1.0.27

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 (2) hide show
  1. package/build-static.ts +13 -1
  2. package/package.json +1 -1
package/build-static.ts CHANGED
@@ -786,7 +786,19 @@ export async function buildStaticPages(): Promise<void> {
786
786
  process.exit(1);
787
787
  }
788
788
 
789
- const pageFiles = readdirSync(pagesDir).filter((f) => f.endsWith(".json"));
789
+ // Recursively collect all .json page files (supports nested folders like pages/a/b.json)
790
+ const pageFiles: string[] = [];
791
+ function scanPagesDir(dir: string, prefix: string): void {
792
+ const entries = readdirSync(dir, { withFileTypes: true });
793
+ for (const entry of entries) {
794
+ if (entry.isFile() && entry.name.endsWith('.json')) {
795
+ pageFiles.push(prefix ? `${prefix}/${entry.name}` : entry.name);
796
+ } else if (entry.isDirectory()) {
797
+ scanPagesDir(join(dir, entry.name), prefix ? `${prefix}/${entry.name}` : entry.name);
798
+ }
799
+ }
800
+ }
801
+ scanPagesDir(pagesDir, '');
790
802
 
791
803
  if (pageFiles.length === 0) {
792
804
  console.warn("⚠️ No pages found in ./pages directory");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meno-core",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "meno": "./bin/cli.ts"