@mdfriday/foundry 26.3.14 → 26.3.16
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 +39 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/application/identity.d.ts +2 -20
- package/dist/internal/domain/identity/entity/user.d.ts +24 -13
- package/dist/internal/domain/identity/index.d.ts +1 -1
- package/dist/internal/domain/identity/value-object/license.d.ts +1 -1
- package/dist/internal/interfaces/obsidian/auth.d.ts +11 -0
- package/dist/internal/interfaces/obsidian/index.d.ts +1 -1
- package/dist/internal/interfaces/obsidian/license.d.ts +1 -0
- package/package.json +7 -1
package/dist/cli.js
CHANGED
|
@@ -1945,7 +1945,7 @@ var init_license = __esm({
|
|
|
1945
1945
|
* 检查是否是试用 License
|
|
1946
1946
|
*/
|
|
1947
1947
|
isTrial() {
|
|
1948
|
-
return this.plan === "
|
|
1948
|
+
return this.plan === "free";
|
|
1949
1949
|
}
|
|
1950
1950
|
// ============================================================================
|
|
1951
1951
|
// Comparison
|
|
@@ -2471,20 +2471,38 @@ var init_user = __esm({
|
|
|
2471
2471
|
/**
|
|
2472
2472
|
* 获取认证状态信息
|
|
2473
2473
|
*/
|
|
2474
|
+
/**
|
|
2475
|
+
* 获取用户状态
|
|
2476
|
+
*
|
|
2477
|
+
* @returns 完整的用户状态信息,包括认证、License 和 Sync 配置
|
|
2478
|
+
*/
|
|
2474
2479
|
getStatus() {
|
|
2475
|
-
|
|
2480
|
+
const status = {
|
|
2476
2481
|
isAuthenticated: this.isAuthenticated(),
|
|
2477
2482
|
email: this.email.getValue(),
|
|
2478
2483
|
serverUrl: this.serverConfig.getApiUrl(),
|
|
2479
2484
|
tokenExpired: this.isTokenExpired(),
|
|
2480
2485
|
hasToken: this.token !== null,
|
|
2481
2486
|
hasLicense: this.license !== null,
|
|
2487
|
+
license: this.license?.getKey(),
|
|
2482
2488
|
licenseValid: this.hasValidLicense(),
|
|
2483
2489
|
isTrial: this.isTrialAccount(),
|
|
2484
2490
|
licensePlan: this.license?.getPlan(),
|
|
2485
2491
|
licenseExpires: this.license?.getFormattedExpiresAt(),
|
|
2486
|
-
licenseDaysRemaining: this.license?.getDaysRemaining()
|
|
2492
|
+
licenseDaysRemaining: this.license?.getDaysRemaining(),
|
|
2493
|
+
hasSyncConfig: this.syncConfig !== null
|
|
2487
2494
|
};
|
|
2495
|
+
if (this.syncConfig) {
|
|
2496
|
+
status.syncConfig = {
|
|
2497
|
+
dbEndpoint: this.syncConfig.getDbEndpoint(),
|
|
2498
|
+
dbName: this.syncConfig.getDbName(),
|
|
2499
|
+
email: this.syncConfig.getEmail(),
|
|
2500
|
+
userDir: this.syncConfig.getUserDir(),
|
|
2501
|
+
status: this.syncConfig.getStatus(),
|
|
2502
|
+
isActive: this.syncConfig.isActive()
|
|
2503
|
+
};
|
|
2504
|
+
}
|
|
2505
|
+
return status;
|
|
2488
2506
|
}
|
|
2489
2507
|
// ============================================================================
|
|
2490
2508
|
// Serialization
|
|
@@ -2796,7 +2814,7 @@ var init_user_factory = __esm({
|
|
|
2796
2814
|
}
|
|
2797
2815
|
const tempLicense = License.create(
|
|
2798
2816
|
licenseKey,
|
|
2799
|
-
"
|
|
2817
|
+
"free",
|
|
2800
2818
|
// 临时值,会在激活后更新
|
|
2801
2819
|
Date.now() + 864e5,
|
|
2802
2820
|
// 临时过期时间
|
|
@@ -4641,14 +4659,28 @@ var init_identity2 = __esm({
|
|
|
4641
4659
|
/**
|
|
4642
4660
|
* 获取认证状态
|
|
4643
4661
|
*/
|
|
4662
|
+
/**
|
|
4663
|
+
* 获取用户状态
|
|
4664
|
+
*
|
|
4665
|
+
* @returns 用户状态信息,包括认证、License 和 Sync 配置
|
|
4666
|
+
*/
|
|
4644
4667
|
getStatus() {
|
|
4645
4668
|
if (!this.currentUser) {
|
|
4646
4669
|
return {
|
|
4647
4670
|
isAuthenticated: false,
|
|
4648
|
-
email:
|
|
4671
|
+
email: "",
|
|
4649
4672
|
serverUrl: ServerConfig.createDefault().getApiUrl(),
|
|
4650
4673
|
tokenExpired: true,
|
|
4651
|
-
hasToken: false
|
|
4674
|
+
hasToken: false,
|
|
4675
|
+
hasLicense: false,
|
|
4676
|
+
license: void 0,
|
|
4677
|
+
licenseValid: false,
|
|
4678
|
+
isTrial: false,
|
|
4679
|
+
licensePlan: void 0,
|
|
4680
|
+
licenseExpires: void 0,
|
|
4681
|
+
licenseDaysRemaining: void 0,
|
|
4682
|
+
hasSyncConfig: false,
|
|
4683
|
+
syncConfig: void 0
|
|
4652
4684
|
};
|
|
4653
4685
|
}
|
|
4654
4686
|
return this.currentUser.getStatus();
|
|
@@ -55114,7 +55146,7 @@ For more information, visit: https://help.mdfriday.com
|
|
|
55114
55146
|
* Show version
|
|
55115
55147
|
*/
|
|
55116
55148
|
showVersion() {
|
|
55117
|
-
const version = "26.3.
|
|
55149
|
+
const version = "26.3.16";
|
|
55118
55150
|
return {
|
|
55119
55151
|
success: true,
|
|
55120
55152
|
message: `MDFriday CLI v${version}`
|
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ 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 { ObsidianWorkspaceService, createObsidianWorkspaceService, ObsidianWorkspaceInitOptions, ObsidianWorkspaceInfo, ObsidianWorkspaceResult, ObsidianProjectService, createObsidianProjectService, ObsidianProjectCreateOptions, ObsidianProjectInfo, ObsidianProjectResult, ObsidianBuildService, createObsidianBuildService, ObsidianBuildOptions, ObsidianBuildResult, ObsidianGlobalConfigService, ObsidianProjectConfigService, createObsidianGlobalConfigService, createObsidianProjectConfigService, ObsidianConfigResult, ConfigGetResult, ConfigListResult, ObsidianPublishService, createObsidianPublishService, ObsidianPublishMethod, ObsidianPublishOptions, ObsidianPublishProgress, ObsidianPublishResult, ObsidianTestConnectionResult, ObsidianServeService, createObsidianServeService, ObsidianServeOptions, ObsidianServeResult, ObsidianServeProgress, ObsidianLicenseService, createObsidianLicenseService, ObsidianLicenseInfo, ObsidianLicenseUsage, ObsidianLicenseResult, ObsidianAuthService, createObsidianAuthService, ObsidianAuthStatus, ObsidianServerConfig, ObsidianAuthResult, ObsidianDomainService, createObsidianDomainService, ObsidianDomainInfo, ObsidianSubdomainCheckResult, ObsidianSubdomainUpdateResult, ObsidianCustomDomainCheckResult, ObsidianCustomDomainAddResult, ObsidianHttpsCertificate, ObsidianHttpsStatusResult, ObsidianDomainResult, createWorkspaceAppService, createWorkspaceFactory, type PublishHttpClient, type PublishHttpResponse, type IdentityHttpClient, type IdentityHttpResponse, type AnyPublishConfig, type FTPConfig, type NetlifyConfig, type MDFridayConfig, type SyncConfig, type SyncConfigData, } from './internal/interfaces/obsidian';
|
|
6
|
+
export { ObsidianWorkspaceService, createObsidianWorkspaceService, ObsidianWorkspaceInitOptions, ObsidianWorkspaceInfo, ObsidianWorkspaceResult, ObsidianProjectService, createObsidianProjectService, ObsidianProjectCreateOptions, ObsidianProjectInfo, ObsidianProjectResult, ObsidianBuildService, createObsidianBuildService, ObsidianBuildOptions, ObsidianBuildResult, ObsidianGlobalConfigService, ObsidianProjectConfigService, createObsidianGlobalConfigService, createObsidianProjectConfigService, ObsidianConfigResult, ConfigGetResult, ConfigListResult, ObsidianPublishService, createObsidianPublishService, ObsidianPublishMethod, ObsidianPublishOptions, ObsidianPublishProgress, ObsidianPublishResult, ObsidianTestConnectionResult, ObsidianServeService, createObsidianServeService, ObsidianServeOptions, ObsidianServeResult, ObsidianServeProgress, ObsidianLicenseService, createObsidianLicenseService, ObsidianLicenseInfo, ObsidianLicenseUsage, ObsidianLicenseResult, ObsidianAuthService, createObsidianAuthService, ObsidianAuthStatus, ObsidianSyncConfig, ObsidianServerConfig, ObsidianAuthResult, ObsidianDomainService, createObsidianDomainService, ObsidianDomainInfo, ObsidianSubdomainCheckResult, ObsidianSubdomainUpdateResult, ObsidianCustomDomainCheckResult, ObsidianCustomDomainAddResult, ObsidianHttpsCertificate, ObsidianHttpsStatusResult, ObsidianDomainResult, createWorkspaceAppService, createWorkspaceFactory, type PublishHttpClient, type PublishHttpResponse, type IdentityHttpClient, type IdentityHttpResponse, type AnyPublishConfig, type FTPConfig, type NetlifyConfig, type MDFridayConfig, type SyncConfig, type SyncConfigData, } from './internal/interfaces/obsidian';
|