@mdfriday/foundry 26.3.5 → 26.3.6
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
|
});
|
|
@@ -52553,7 +52571,8 @@ var ServeCommand = class {
|
|
|
52553
52571
|
const host = options.host || "localhost";
|
|
52554
52572
|
const livereloadPort = options.livereloadPort || 35729;
|
|
52555
52573
|
const enableLivereload = options.livereload !== false;
|
|
52556
|
-
const
|
|
52574
|
+
const projContentDirs = await project.getContentDirs();
|
|
52575
|
+
const contentDirs = project.getLinkDirs();
|
|
52557
52576
|
const modulesDir = workspace.getModulesDir();
|
|
52558
52577
|
const publicDir = await project.getPublishDir();
|
|
52559
52578
|
const projectRoot = project.getPath();
|
|
@@ -52561,7 +52580,7 @@ var ServeCommand = class {
|
|
|
52561
52580
|
projDir: projectRoot,
|
|
52562
52581
|
modulesDir,
|
|
52563
52582
|
contentDirs,
|
|
52564
|
-
projContentDirs
|
|
52583
|
+
projContentDirs,
|
|
52565
52584
|
publicDir,
|
|
52566
52585
|
enableWatching: true,
|
|
52567
52586
|
batchDelay: 300,
|
|
@@ -54532,7 +54551,7 @@ For more information, visit: https://help.mdfriday.com
|
|
|
54532
54551
|
* Show version
|
|
54533
54552
|
*/
|
|
54534
54553
|
showVersion() {
|
|
54535
|
-
const version = "26.3.
|
|
54554
|
+
const version = "26.3.6";
|
|
54536
54555
|
return {
|
|
54537
54556
|
success: true,
|
|
54538
54557
|
message: `MDFriday CLI v${version}`
|