@mdfriday/foundry 26.4.12 → 26.4.14
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 +6 -62
- package/dist/index.d.ts +8 -1
- package/dist/index.js +2 -2
- package/dist/internal/domain/identity/repository/index.d.ts +0 -5
- package/dist/internal/interfaces/obsidian/adapters/identity-adapter.d.ts +5 -0
- package/dist/internal/interfaces/obsidian/adapters/index.d.ts +2 -0
- package/dist/internal/interfaces/obsidian/adapters/workspace-adapter.d.ts +8 -0
- package/dist/internal/interfaces/obsidian/desktop/adapters/identity-adapter.d.ts +6 -0
- package/dist/internal/interfaces/obsidian/desktop/adapters/index.d.ts +2 -0
- package/dist/internal/interfaces/obsidian/desktop/adapters/workspace-adapter.d.ts +12 -0
- package/dist/internal/interfaces/obsidian/{container.d.ts → desktop/container.d.ts} +2 -3
- package/dist/internal/interfaces/obsidian/desktop/index.d.ts +22 -0
- package/dist/internal/interfaces/obsidian/index.d.ts +2 -14
- package/dist/internal/interfaces/obsidian/mobile/adapters/identity-adapter.d.ts +9 -0
- package/dist/internal/interfaces/obsidian/mobile/adapters/index.d.ts +2 -0
- package/dist/internal/interfaces/obsidian/mobile/adapters/workspace-adapter.d.ts +13 -0
- package/dist/internal/interfaces/obsidian/{mobile-container.d.ts → mobile/container.d.ts} +1 -1
- package/dist/internal/interfaces/obsidian/mobile/index.d.ts +16 -0
- package/dist/internal/interfaces/obsidian/mobile.d.ts +2 -10
- package/dist/internal/interfaces/obsidian/services/auth.service.d.ts +11 -0
- package/dist/internal/interfaces/obsidian/services/build.service.d.ts +8 -0
- package/dist/internal/interfaces/obsidian/{config.d.ts → services/config.service.d.ts} +6 -24
- package/dist/internal/interfaces/obsidian/services/domain.service.d.ts +15 -0
- package/dist/internal/interfaces/obsidian/services/license.service.d.ts +22 -0
- package/dist/internal/interfaces/obsidian/services/project.service.d.ts +17 -0
- package/dist/internal/interfaces/obsidian/services/publish.service.d.ts +11 -0
- package/dist/internal/interfaces/obsidian/services/serve.service.d.ts +17 -0
- package/dist/internal/interfaces/obsidian/services/workspace.service.d.ts +10 -0
- package/dist/internal/interfaces/obsidian/types/auth.d.ts +27 -0
- package/dist/internal/interfaces/obsidian/{build.d.ts → types/build.d.ts} +0 -8
- package/dist/internal/interfaces/obsidian/types/config.d.ts +16 -0
- package/dist/internal/interfaces/obsidian/{domain.d.ts → types/domain.d.ts} +0 -13
- package/dist/internal/interfaces/obsidian/types/index.d.ts +9 -0
- package/dist/internal/interfaces/obsidian/{license.d.ts → types/license.d.ts} +0 -23
- package/dist/internal/interfaces/obsidian/{project.d.ts → types/project.d.ts} +0 -17
- package/dist/internal/interfaces/obsidian/{publish.d.ts → types/publish.d.ts} +0 -11
- package/dist/internal/interfaces/obsidian/{serve.d.ts → types/serve.d.ts} +1 -19
- package/dist/internal/interfaces/obsidian/types/workspace.d.ts +27 -0
- package/dist/obsidian/mobile.js +2 -5827
- package/package.json +1 -1
- package/dist/internal/interfaces/obsidian/auth.d.ts +0 -39
- package/dist/internal/interfaces/obsidian/config-types.d.ts +0 -20
- package/dist/internal/interfaces/obsidian/workspace.d.ts +0 -41
- /package/dist/internal/interfaces/obsidian/{mobile-config-types.d.ts → mobile/config-types.d.ts} +0 -0
package/dist/cli.js
CHANGED
|
@@ -2646,8 +2646,8 @@ var init_user_factory = __esm({
|
|
|
2646
2646
|
*/
|
|
2647
2647
|
async loadServerConfig() {
|
|
2648
2648
|
try {
|
|
2649
|
-
const
|
|
2650
|
-
return
|
|
2649
|
+
const userData = await this.storageProvider.loadUserData();
|
|
2650
|
+
return userData?.serverConfig || null;
|
|
2651
2651
|
} catch (error) {
|
|
2652
2652
|
log4.debug("No server config found in storage");
|
|
2653
2653
|
return null;
|
|
@@ -2739,7 +2739,7 @@ var init_user_factory = __esm({
|
|
|
2739
2739
|
*/
|
|
2740
2740
|
async logout() {
|
|
2741
2741
|
try {
|
|
2742
|
-
await this.storageProvider.
|
|
2742
|
+
await this.storageProvider.clearUserData();
|
|
2743
2743
|
log4.info("Logout successful");
|
|
2744
2744
|
} catch (error) {
|
|
2745
2745
|
log4.error("Logout failed", error);
|
|
@@ -4084,56 +4084,6 @@ var init_workspace_factory = __esm({
|
|
|
4084
4084
|
} catch {
|
|
4085
4085
|
}
|
|
4086
4086
|
authentication.markAuthDeleted();
|
|
4087
|
-
},
|
|
4088
|
-
// 保留旧方法以向后兼容
|
|
4089
|
-
async saveToken(token) {
|
|
4090
|
-
const authPath = fsRepo.join(workspacePath, ".mdfriday", "auth-token.json");
|
|
4091
|
-
await fsRepo.createDirectory(fsRepo.dirname(authPath), true);
|
|
4092
|
-
await fsRepo.writeFile(authPath, JSON.stringify(token.toJSON(), null, 2));
|
|
4093
|
-
authentication.markAuthExists();
|
|
4094
|
-
},
|
|
4095
|
-
async loadToken() {
|
|
4096
|
-
const userData = await this.loadUserData();
|
|
4097
|
-
if (userData?.token) {
|
|
4098
|
-
return userData.token;
|
|
4099
|
-
}
|
|
4100
|
-
const authPath = fsRepo.join(workspacePath, ".mdfriday", "auth-token.json");
|
|
4101
|
-
try {
|
|
4102
|
-
const content = await fsRepo.readFile(authPath, "utf-8");
|
|
4103
|
-
const data = JSON.parse(content);
|
|
4104
|
-
const { Token: Token3 } = await Promise.resolve().then(() => (init_identity(), identity_exports));
|
|
4105
|
-
return Token3.create(data.token, data.expiresAt);
|
|
4106
|
-
} catch {
|
|
4107
|
-
return null;
|
|
4108
|
-
}
|
|
4109
|
-
},
|
|
4110
|
-
async clearToken() {
|
|
4111
|
-
const authPath = fsRepo.join(workspacePath, ".mdfriday", "auth-token.json");
|
|
4112
|
-
try {
|
|
4113
|
-
await fsRepo.unlink(authPath);
|
|
4114
|
-
} catch {
|
|
4115
|
-
}
|
|
4116
|
-
authentication.markAuthDeleted();
|
|
4117
|
-
},
|
|
4118
|
-
async saveServerConfig(config) {
|
|
4119
|
-
const configPath = fsRepo.join(workspacePath, ".mdfriday", "auth-config.json");
|
|
4120
|
-
await fsRepo.createDirectory(fsRepo.dirname(configPath), true);
|
|
4121
|
-
await fsRepo.writeFile(configPath, JSON.stringify(config.toJSON(), null, 2));
|
|
4122
|
-
},
|
|
4123
|
-
async loadServerConfig() {
|
|
4124
|
-
const userData = await this.loadUserData();
|
|
4125
|
-
if (userData?.serverConfig) {
|
|
4126
|
-
return userData.serverConfig;
|
|
4127
|
-
}
|
|
4128
|
-
const configPath = fsRepo.join(workspacePath, ".mdfriday", "auth-config.json");
|
|
4129
|
-
try {
|
|
4130
|
-
const content = await fsRepo.readFile(configPath, "utf-8");
|
|
4131
|
-
const data = JSON.parse(content);
|
|
4132
|
-
const { ServerConfig: ServerConfig2 } = await Promise.resolve().then(() => (init_identity(), identity_exports));
|
|
4133
|
-
return ServerConfig2.create(data.apiUrl, data.websiteUrl);
|
|
4134
|
-
} catch {
|
|
4135
|
-
return null;
|
|
4136
|
-
}
|
|
4137
4087
|
}
|
|
4138
4088
|
};
|
|
4139
4089
|
}
|
|
@@ -4640,18 +4590,12 @@ var init_identity2 = __esm({
|
|
|
4640
4590
|
*/
|
|
4641
4591
|
async initialize() {
|
|
4642
4592
|
try {
|
|
4643
|
-
|
|
4644
|
-
this.userFactory.load(),
|
|
4645
|
-
this.userFactory.loadServerConfig()
|
|
4646
|
-
]);
|
|
4593
|
+
this.currentUser = await this.userFactory.load();
|
|
4647
4594
|
if (this.currentUser) {
|
|
4648
|
-
|
|
4595
|
+
this.cachedServerConfig = this.currentUser.getServerConfig();
|
|
4649
4596
|
} else {
|
|
4650
4597
|
log7.debug("No existing user session");
|
|
4651
4598
|
}
|
|
4652
|
-
if (this.cachedServerConfig) {
|
|
4653
|
-
log7.debug("Server config loaded from storage");
|
|
4654
|
-
}
|
|
4655
4599
|
} catch (error) {
|
|
4656
4600
|
log7.error("Failed to initialize identity service", error);
|
|
4657
4601
|
}
|
|
@@ -55371,7 +55315,7 @@ For more information, visit: https://help.mdfriday.com
|
|
|
55371
55315
|
* Show version
|
|
55372
55316
|
*/
|
|
55373
55317
|
showVersion() {
|
|
55374
|
-
const version = "26.4.
|
|
55318
|
+
const version = "26.4.14";
|
|
55375
55319
|
return {
|
|
55376
55320
|
success: true,
|
|
55377
55321
|
message: `MDFriday CLI v${version}`
|
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,11 @@ export { processSSGParallel, ParallelSSGStats } from './internal/application/ssg
|
|
|
3
3
|
export { startIncrementalBuild, IncrementalBuildConfig, IncrementalBuildCoordinator } from './internal/application/incremental-ssg';
|
|
4
4
|
export { MarkdownRenderer, AutoIDGenerator, ParsingResult, Header, TocFragments, Link, Paragraph } from './internal/domain/markdown';
|
|
5
5
|
export { PageTask } from './pkg/page-filter';
|
|
6
|
-
export {
|
|
6
|
+
export { createObsidianWorkspaceService, createObsidianAuthService, createObsidianLicenseService, createObsidianGlobalConfigService, createObsidianProjectConfigService, createObsidianProjectService, createObsidianBuildService, createObsidianServeService, createObsidianPublishService, createObsidianDomainService, createWorkspaceAppService, createWorkspaceFactory, createObsidianWorkspaceAppService, createObsidianIdentityService, getIdentityService, } from './internal/interfaces/obsidian/desktop';
|
|
7
|
+
export { type ObsidianWorkspaceInitOptions, type ObsidianWorkspaceInfo, type ObsidianWorkspaceResult, type ObsidianAuthStatus, type ObsidianSyncConfig, type ObsidianServerConfig, type ObsidianAuthResult, type ObsidianLicenseInfo, type ObsidianLicenseUsage, type ObsidianLicenseResult, type ObsidianConfigResult, type ConfigGetResult, type ConfigListResult, type WorkspaceRepository, type ProjectRepository, type SnapshotRepository, type FileSystemRepository, type WorkspaceMetadataData, type ProjectMetadataData, type ProjectRegistry, type ProjectEntry, type BuildHistoryEntry, type SnapshotMetadata, type FolderStructure, type FolderScanResult, type ContentFolderInfo, type StaticFolderInfo, type SymlinkResult, type PublishHttpClient, type PublishHttpResponse, type IdentityHttpClient, type IdentityHttpResponse, type AnyPublishConfig, type FTPConfig, type NetlifyConfig, type MDFridayConfig, type SyncConfig, type SyncConfigData, } from './internal/interfaces/obsidian';
|
|
8
|
+
export { type ObsidianProjectCreateOptions, type ObsidianProjectInfo, type ObsidianProjectResult, type ObsidianFolderStructureInfo, type ObsidianBuildOptions, type ObsidianBuildResult, type ObsidianServeOptions, type ObsidianServeResult, type ObsidianServeProgress, type ObsidianPublishMethod, type ObsidianPublishOptions, type ObsidianPublishProgress, type ObsidianPublishResult, type ObsidianTestConnectionResult, type ObsidianDomainInfo, type ObsidianSubdomainCheckResult, type ObsidianSubdomainUpdateResult, type ObsidianCustomDomainCheckResult, type ObsidianCustomDomainAddResult, type ObsidianHttpsCertificate, type ObsidianHttpsStatusResult, type ObsidianDomainResult, } from './internal/interfaces/obsidian/types';
|
|
9
|
+
export { ObsidianProjectService, } from './internal/interfaces/obsidian/services/project.service';
|
|
10
|
+
export { ObsidianBuildService, } from './internal/interfaces/obsidian/services/build.service';
|
|
11
|
+
export { ObsidianServeService, } from './internal/interfaces/obsidian/services/serve.service';
|
|
12
|
+
export { ObsidianPublishService, } from './internal/interfaces/obsidian/services/publish.service';
|
|
13
|
+
export { ObsidianDomainService, } from './internal/interfaces/obsidian/services/domain.service';
|