@mdfriday/foundry 26.4.5 → 26.4.7

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/dist/cli.js CHANGED
@@ -4292,6 +4292,30 @@ var init_workspace_factory = __esm({
4292
4292
  };
4293
4293
  }
4294
4294
  // ============================================================================
4295
+ // Folder Structure Scanning
4296
+ // ============================================================================
4297
+ /**
4298
+ * Scan folder structure
4299
+ *
4300
+ * 扫描文件夹结构,识别 content、content.{lang}、static 文件夹
4301
+ * 用于在创建项目前预览文件夹结构
4302
+ */
4303
+ async scanFolderStructure(folderPath) {
4304
+ if (!this.fileSystemRepo) {
4305
+ throw new Error("FileSystemRepository is required to scan folder structure");
4306
+ }
4307
+ log5.info("Scanning folder structure", { path: folderPath });
4308
+ const structure = await this.fileSystemRepo.scanFolderStructure(folderPath);
4309
+ const folderStructure = FolderStructure.fromScanResult(structure);
4310
+ log5.debug("Folder structure scanned", {
4311
+ isStructured: folderStructure.getIsStructured(),
4312
+ contentFolders: folderStructure.getContentFolderCount(),
4313
+ hasStatic: folderStructure.hasStaticFolder(),
4314
+ languages: folderStructure.getSupportedLanguages()
4315
+ });
4316
+ return folderStructure;
4317
+ }
4318
+ // ============================================================================
4295
4319
  // Private Helpers
4296
4320
  // ============================================================================
4297
4321
  createSampleContent() {
@@ -4548,6 +4572,18 @@ Please specify a project name with --project <name>`);
4548
4572
  return this.workspaceFactory.findProjectRoot(startPath);
4549
4573
  }
4550
4574
  // ============================================================================
4575
+ // Folder Structure Scanning
4576
+ // ============================================================================
4577
+ /**
4578
+ * Scan folder structure
4579
+ *
4580
+ * 扫描文件夹结构,识别 content、content.{lang}、static 文件夹
4581
+ * 用于在创建项目前预览文件夹结构
4582
+ */
4583
+ async scanFolderStructure(folderPath) {
4584
+ return this.workspaceFactory.scanFolderStructure(folderPath);
4585
+ }
4586
+ // ============================================================================
4551
4587
  // Cross-Domain: Identity Storage Integration
4552
4588
  // ============================================================================
4553
4589
  /**
@@ -9750,17 +9786,17 @@ __export(container_exports, {
9750
9786
  createWorkspaceAppService: () => createWorkspaceAppService,
9751
9787
  createWorkspaceFactory: () => createWorkspaceFactory
9752
9788
  });
9753
- function createWorkspaceFactory() {
9789
+ function createWorkspaceFactory(repositories) {
9754
9790
  const options = {
9755
- workspaceRepo: new NodeWorkspaceRepository(),
9756
- projectRepo: new NodeProjectRepository(),
9757
- snapshotRepo: new NodeSnapshotRepository(),
9758
- fileSystemRepo: new NodeFileSystemRepository()
9791
+ workspaceRepo: repositories?.workspaceRepo ?? new NodeWorkspaceRepository(),
9792
+ projectRepo: repositories?.projectRepo ?? new NodeProjectRepository(),
9793
+ snapshotRepo: repositories?.snapshotRepo ?? new NodeSnapshotRepository(),
9794
+ fileSystemRepo: repositories?.fileSystemRepo ?? new NodeFileSystemRepository()
9759
9795
  };
9760
9796
  return new WorkspaceFactory(options);
9761
9797
  }
9762
- function createWorkspaceAppService() {
9763
- const workspaceFactory = createWorkspaceFactory();
9798
+ function createWorkspaceAppService(repositories) {
9799
+ const workspaceFactory = createWorkspaceFactory(repositories);
9764
9800
  return new WorkspaceAppService({
9765
9801
  workspaceFactory
9766
9802
  });
@@ -55324,7 +55360,7 @@ For more information, visit: https://help.mdfriday.com
55324
55360
  * Show version
55325
55361
  */
55326
55362
  showVersion() {
55327
- const version = "26.4.5";
55363
+ const version = "26.4.7";
55328
55364
  return {
55329
55365
  success: true,
55330
55366
  message: `MDFriday CLI v${version}`