@mdfriday/foundry 26.3.7 → 26.3.8

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.
@@ -26,4 +26,15 @@ export declare class WorkspaceAppService {
26
26
  saveProject(project: Project): Promise<void>;
27
27
  findProjectRoot(startPath: string): Promise<string | null>;
28
28
  createIdentityStorage(workspace: Workspace): import("../domain/identity").IdentityStorageProvider;
29
+ setupProjectBaseURLStructure(project: Project): Promise<{
30
+ serverRoot: string;
31
+ baseURL: string;
32
+ symlinkCreated: boolean;
33
+ }>;
34
+ cleanProjectBaseURLStructure(project: Project): Promise<void>;
35
+ ensureProjectBaseURLStructure(project: Project): Promise<{
36
+ serverRoot: string;
37
+ baseURL: string;
38
+ recreated: boolean;
39
+ }>;
29
40
  }
@@ -80,4 +80,23 @@ export declare class Project {
80
80
  getSupportedLanguagesFromLinks(): string[];
81
81
  isLinkedProject(): boolean;
82
82
  getLinkDirs(): string[];
83
+ getBaseURL(): Promise<string>;
84
+ setBaseURL(baseURL: string): Promise<void>;
85
+ parseBaseURLPath(baseURL: string): {
86
+ isRoot: boolean;
87
+ pathParts: string[];
88
+ parentParts: string[];
89
+ finalDirName: string;
90
+ relativeToPublic: string;
91
+ };
92
+ getBaseURLStructure(): {
93
+ baseURL: string;
94
+ createdAt: number;
95
+ pathParts: string[];
96
+ } | null;
97
+ updateBaseURLStructure(info: {
98
+ baseURL: string;
99
+ createdAt: number;
100
+ pathParts: string[];
101
+ } | null): void;
83
102
  }
@@ -32,6 +32,7 @@ export declare class WorkspaceFactory {
32
32
  contentDir?: string;
33
33
  staticDir?: string;
34
34
  publishDir?: string;
35
+ baseURL?: string;
35
36
  }): Promise<Project>;
36
37
  deleteProject(workspace: Workspace, projectIdOrName: string, options?: {
37
38
  deleteFiles?: boolean;
@@ -53,5 +54,16 @@ export declare class WorkspaceFactory {
53
54
  deleteSnapshot(project: Project, snapshotId: string): Promise<void>;
54
55
  getSnapshot(project: Project, snapshotId: string): Promise<SnapshotMetadata>;
55
56
  createIdentityStorage(workspace: Workspace): IdentityStorageProvider;
57
+ setupBaseURLStructure(project: Project): Promise<{
58
+ serverRoot: string;
59
+ baseURL: string;
60
+ symlinkCreated: boolean;
61
+ }>;
62
+ cleanBaseURLStructure(project: Project): Promise<void>;
63
+ ensureBaseURLStructure(project: Project): Promise<{
64
+ serverRoot: string;
65
+ baseURL: string;
66
+ recreated: boolean;
67
+ }>;
56
68
  private createSampleContent;
57
69
  }
@@ -53,6 +53,7 @@ export interface FileSystemRepository {
53
53
  unlink(path: string): Promise<void>;
54
54
  access(path: string): Promise<void>;
55
55
  resolvePath(path: string): Promise<string>;
56
+ remove(targetPath: string, recursive?: boolean): Promise<void>;
56
57
  basename(path: string): string;
57
58
  dirname(path: string): string;
58
59
  join(...paths: string[]): string;
@@ -37,6 +37,11 @@ export declare class ProjectMetadata {
37
37
  readonly contentLinks: ContentLink[];
38
38
  readonly staticLink: StaticLink | null;
39
39
  readonly fileLink: FileLink | null;
40
+ readonly baseURLStructure: {
41
+ baseURL: string;
42
+ createdAt: number;
43
+ pathParts: string[];
44
+ } | null;
40
45
  private constructor();
41
46
  static create(data: {
42
47
  id: string;
@@ -57,6 +62,11 @@ export declare class ProjectMetadata {
57
62
  contentLinks: ContentLink[];
58
63
  staticLink: StaticLink | null;
59
64
  fileLink: FileLink | null;
65
+ baseURLStructure: {
66
+ baseURL: string;
67
+ createdAt: number;
68
+ pathParts: string[];
69
+ } | null;
60
70
  }>): ProjectMetadata;
61
71
  toJSON(): any;
62
72
  }
@@ -23,6 +23,7 @@ export interface ProjectCreateOptions {
23
23
  path?: string;
24
24
  source?: string;
25
25
  sourceFile?: string;
26
+ baseUrl?: string;
26
27
  noSample?: boolean;
27
28
  interactive?: boolean;
28
29
  }
@@ -24,6 +24,8 @@ export interface ObsidianServeResult {
24
24
  url: string;
25
25
  port: number;
26
26
  host: string;
27
+ baseURL?: string;
28
+ serverRoot?: string;
27
29
  livereloadPort?: number;
28
30
  autoPublish?: string;
29
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mdfriday/foundry",
3
- "version": "26.3.7",
3
+ "version": "26.3.8",
4
4
  "description": "The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",