@mdfriday/foundry 26.3.5 → 26.3.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
@@ -1319,6 +1319,24 @@ var init_project = __esm({
1319
1319
  isLinkedProject() {
1320
1320
  return this.hasSourceLinks();
1321
1321
  }
1322
+ /**
1323
+ * 获取所有链接的源路径(包括 fileLink 和 contentLinks)
1324
+ * Returns absolute paths to original source files/folders
1325
+ */
1326
+ getLinkDirs() {
1327
+ const linkDirs = [];
1328
+ const fileLink = this.getFileLink();
1329
+ if (fileLink) {
1330
+ linkDirs.push(fileLink.sourcePath);
1331
+ }
1332
+ const contentLinks = this.getContentLinks();
1333
+ for (const link of contentLinks) {
1334
+ if (!linkDirs.includes(link.sourcePath)) {
1335
+ linkDirs.push(link.sourcePath);
1336
+ }
1337
+ }
1338
+ return linkDirs;
1339
+ }
1322
1340
  };
1323
1341
  }
1324
1342
  });
@@ -3164,6 +3182,17 @@ var init_workspace_factory = __esm({
3164
3182
  };
3165
3183
  await this.workspaceRepo.saveWorkspaceMetadata(absolutePath, metadata.toJSON());
3166
3184
  await this.workspaceRepo.saveProjectRegistry(absolutePath, emptyRegistry);
3185
+ if (this.fileSystemRepo) {
3186
+ const mdfridayDir = import_path3.default.join(absolutePath, ".mdfriday");
3187
+ const configPath = import_path3.default.join(mdfridayDir, "config.json");
3188
+ await this.fileSystemRepo.writeFile(configPath, "{}", "utf-8");
3189
+ const userDataPath = import_path3.default.join(mdfridayDir, "user-data.json");
3190
+ await this.fileSystemRepo.writeFile(userDataPath, "{}", "utf-8");
3191
+ log5.debug("Initialized configuration files", {
3192
+ configPath,
3193
+ userDataPath
3194
+ });
3195
+ }
3167
3196
  const authentication = new Authentication(absolutePath, false);
3168
3197
  const workspace = new Workspace(
3169
3198
  absolutePath,
@@ -52553,7 +52582,8 @@ var ServeCommand = class {
52553
52582
  const host = options.host || "localhost";
52554
52583
  const livereloadPort = options.livereloadPort || 35729;
52555
52584
  const enableLivereload = options.livereload !== false;
52556
- const contentDirs = await project.getContentDirs();
52585
+ const projContentDirs = await project.getContentDirs();
52586
+ const contentDirs = project.getLinkDirs();
52557
52587
  const modulesDir = workspace.getModulesDir();
52558
52588
  const publicDir = await project.getPublishDir();
52559
52589
  const projectRoot = project.getPath();
@@ -52561,7 +52591,7 @@ var ServeCommand = class {
52561
52591
  projDir: projectRoot,
52562
52592
  modulesDir,
52563
52593
  contentDirs,
52564
- projContentDirs: contentDirs,
52594
+ projContentDirs,
52565
52595
  publicDir,
52566
52596
  enableWatching: true,
52567
52597
  batchDelay: 300,
@@ -54532,7 +54562,7 @@ For more information, visit: https://help.mdfriday.com
54532
54562
  * Show version
54533
54563
  */
54534
54564
  showVersion() {
54535
- const version = "26.3.5";
54565
+ const version = "26.3.7";
54536
54566
  return {
54537
54567
  success: true,
54538
54568
  message: `MDFriday CLI v${version}`