@mdfriday/foundry 26.3.15 → 26.3.17
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 +49 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/application/identity.d.ts +2 -22
- package/dist/internal/domain/identity/entity/user.d.ts +24 -14
- package/dist/internal/domain/identity/index.d.ts +1 -1
- package/dist/internal/domain/workspace/entity/project.d.ts +1 -0
- package/dist/internal/interfaces/obsidian/auth.d.ts +10 -0
- package/dist/internal/interfaces/obsidian/config.d.ts +1 -0
- package/dist/internal/interfaces/obsidian/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UserFactory } from '@internal/domain/identity/factory/user-factory';
|
|
2
|
-
import { User } from '@internal/domain/identity/entity/user';
|
|
2
|
+
import { User, UserStatus } from '@internal/domain/identity/entity/user';
|
|
3
3
|
import { ServerConfig } from '@internal/domain/identity/value-object/server-config';
|
|
4
4
|
import { License } from '@internal/domain/identity/value-object/license';
|
|
5
5
|
import { Device } from '@internal/domain/identity/value-object/device';
|
|
@@ -17,27 +17,7 @@ export declare class IdentityAppService {
|
|
|
17
17
|
getCurrentUser(): User | null;
|
|
18
18
|
isAuthenticated(): boolean;
|
|
19
19
|
getToken(): string | null;
|
|
20
|
-
getStatus():
|
|
21
|
-
isAuthenticated: boolean;
|
|
22
|
-
email: string;
|
|
23
|
-
serverUrl: string;
|
|
24
|
-
tokenExpired: boolean;
|
|
25
|
-
hasToken: boolean;
|
|
26
|
-
hasLicense: boolean;
|
|
27
|
-
license: string | undefined;
|
|
28
|
-
licenseValid: boolean;
|
|
29
|
-
isTrial: boolean;
|
|
30
|
-
licensePlan: import("@internal/domain/identity/value-object/license").LicensePlan | undefined;
|
|
31
|
-
licenseExpires: string | undefined;
|
|
32
|
-
licenseDaysRemaining: number | undefined;
|
|
33
|
-
} | {
|
|
34
|
-
isAuthenticated: boolean;
|
|
35
|
-
email: undefined;
|
|
36
|
-
license: string;
|
|
37
|
-
serverUrl: string;
|
|
38
|
-
tokenExpired: boolean;
|
|
39
|
-
hasToken: boolean;
|
|
40
|
-
};
|
|
20
|
+
getStatus(): UserStatus;
|
|
41
21
|
getServerConfig(): ServerConfig;
|
|
42
22
|
updateServerConfig(updates: {
|
|
43
23
|
apiUrl?: string;
|
|
@@ -3,6 +3,29 @@ import { Token } from '../value-object/token';
|
|
|
3
3
|
import { ServerConfig } from '../value-object/server-config';
|
|
4
4
|
import { License } from '../value-object/license';
|
|
5
5
|
import { SyncConfig } from '../value-object/sync-config';
|
|
6
|
+
export interface UserStatus {
|
|
7
|
+
isAuthenticated: boolean;
|
|
8
|
+
email: string;
|
|
9
|
+
serverUrl: string;
|
|
10
|
+
tokenExpired: boolean;
|
|
11
|
+
hasToken: boolean;
|
|
12
|
+
hasLicense: boolean;
|
|
13
|
+
license?: string | undefined;
|
|
14
|
+
licenseValid: boolean;
|
|
15
|
+
isTrial: boolean;
|
|
16
|
+
licensePlan?: string | undefined;
|
|
17
|
+
licenseExpires?: string | undefined;
|
|
18
|
+
licenseDaysRemaining?: number | undefined;
|
|
19
|
+
hasSyncConfig: boolean;
|
|
20
|
+
syncConfig?: {
|
|
21
|
+
dbEndpoint: string;
|
|
22
|
+
dbName: string;
|
|
23
|
+
email: string;
|
|
24
|
+
userDir: string;
|
|
25
|
+
status: string;
|
|
26
|
+
isActive: boolean;
|
|
27
|
+
} | undefined;
|
|
28
|
+
}
|
|
6
29
|
export declare class User {
|
|
7
30
|
private readonly email;
|
|
8
31
|
private token;
|
|
@@ -26,20 +49,7 @@ export declare class User {
|
|
|
26
49
|
isTokenExpired(): boolean;
|
|
27
50
|
hasValidLicense(): boolean;
|
|
28
51
|
isTrialAccount(): boolean;
|
|
29
|
-
getStatus():
|
|
30
|
-
isAuthenticated: boolean;
|
|
31
|
-
email: string;
|
|
32
|
-
serverUrl: string;
|
|
33
|
-
tokenExpired: boolean;
|
|
34
|
-
hasToken: boolean;
|
|
35
|
-
hasLicense: boolean;
|
|
36
|
-
license: string | undefined;
|
|
37
|
-
licenseValid: boolean;
|
|
38
|
-
isTrial: boolean;
|
|
39
|
-
licensePlan: import("../value-object/license").LicensePlan | undefined;
|
|
40
|
-
licenseExpires: string | undefined;
|
|
41
|
-
licenseDaysRemaining: number | undefined;
|
|
42
|
-
};
|
|
52
|
+
getStatus(): UserStatus;
|
|
43
53
|
toJSON(): {
|
|
44
54
|
email: string;
|
|
45
55
|
token: {
|
|
@@ -4,7 +4,7 @@ export { ServerConfig } from './value-object/server-config';
|
|
|
4
4
|
export { License, LicenseFeatures, LicensePlan } from './value-object/license';
|
|
5
5
|
export { SyncConfig, SyncConfigData } from './value-object/sync-config';
|
|
6
6
|
export { Device, DeviceType } from './value-object/device';
|
|
7
|
-
export { User } from './entity/user';
|
|
7
|
+
export { User, UserStatus } from './entity/user';
|
|
8
8
|
export { UserFactory, UserFactoryOptions } from './factory/user-factory';
|
|
9
9
|
export type { IdentityStorageProvider, HttpClient, HttpResponse } from './repository/index';
|
|
10
10
|
export * from './type';
|
|
@@ -36,6 +36,7 @@ export declare class Project {
|
|
|
36
36
|
getConfigPath(): string;
|
|
37
37
|
getConfigValue(key: string): any;
|
|
38
38
|
setConfigValue(key: string, value: any): void;
|
|
39
|
+
setConfig(config: ProjectConfig): void;
|
|
39
40
|
unsetConfigValue(key: string): boolean;
|
|
40
41
|
saveConfig(): Promise<void>;
|
|
41
42
|
private getNestedValue;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { HttpClient } from '@internal/domain/identity';
|
|
2
|
+
export interface ObsidianSyncConfig {
|
|
3
|
+
dbEndpoint: string;
|
|
4
|
+
dbName: string;
|
|
5
|
+
email: string;
|
|
6
|
+
userDir: string;
|
|
7
|
+
status: string;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
}
|
|
2
10
|
export interface ObsidianAuthStatus {
|
|
3
11
|
isAuthenticated: boolean;
|
|
4
12
|
email?: string;
|
|
5
13
|
serverUrl: string;
|
|
6
14
|
token?: string;
|
|
7
15
|
license?: string;
|
|
16
|
+
hasSyncConfig: boolean;
|
|
17
|
+
syncConfig?: ObsidianSyncConfig;
|
|
8
18
|
}
|
|
9
19
|
export interface ObsidianServerConfig {
|
|
10
20
|
apiUrl: string;
|
|
@@ -33,6 +33,7 @@ export declare class ObsidianProjectConfigService {
|
|
|
33
33
|
constructor(workspaceAppService: WorkspaceAppService);
|
|
34
34
|
get(workspacePath: string, projectName: string, key: string): Promise<ObsidianConfigResult<ConfigGetResult>>;
|
|
35
35
|
set(workspacePath: string, projectName: string, key: string, value: any): Promise<ObsidianConfigResult<ConfigGetResult>>;
|
|
36
|
+
setAll(workspacePath: string, projectName: string, config: Record<string, any>): Promise<ObsidianConfigResult<ConfigListResult>>;
|
|
36
37
|
list(workspacePath: string, projectName: string): Promise<ObsidianConfigResult<ConfigListResult>>;
|
|
37
38
|
unset(workspacePath: string, projectName: string, key: string): Promise<ObsidianConfigResult<{
|
|
38
39
|
key: string;
|
|
@@ -5,7 +5,7 @@ export { ObsidianGlobalConfigService, ObsidianProjectConfigService, createObsidi
|
|
|
5
5
|
export { ObsidianPublishService, createObsidianPublishService, ObsidianPublishMethod, ObsidianPublishOptions, ObsidianPublishProgress, ObsidianPublishResult, ObsidianTestConnectionResult, } from './publish';
|
|
6
6
|
export { ObsidianServeService, createObsidianServeService, ObsidianServeOptions, ObsidianServeResult, ObsidianServeProgress, } from './serve';
|
|
7
7
|
export { ObsidianLicenseService, createObsidianLicenseService, ObsidianLicenseInfo, ObsidianLicenseUsage, ObsidianLicenseResult, } from './license';
|
|
8
|
-
export { ObsidianAuthService, createObsidianAuthService, ObsidianAuthStatus, ObsidianServerConfig, ObsidianAuthResult, } from './auth';
|
|
8
|
+
export { ObsidianAuthService, createObsidianAuthService, ObsidianAuthStatus, ObsidianSyncConfig, ObsidianServerConfig, ObsidianAuthResult, } from './auth';
|
|
9
9
|
export { ObsidianDomainService, createObsidianDomainService, ObsidianDomainInfo, ObsidianSubdomainCheckResult, ObsidianSubdomainUpdateResult, ObsidianCustomDomainCheckResult, ObsidianCustomDomainAddResult, ObsidianHttpsCertificate, ObsidianHttpsStatusResult, ObsidianDomainResult, } from './domain';
|
|
10
10
|
export { createWorkspaceAppService, createWorkspaceFactory, } from './container';
|
|
11
11
|
export type { HttpClient as PublishHttpClient, HttpResponse as PublishHttpResponse } from '@internal/domain/publish/repository/http-client';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mdfriday/foundry",
|
|
3
|
-
"version": "26.3.
|
|
3
|
+
"version": "26.3.17",
|
|
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",
|