@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
|
@@ -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,25 +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
|
-
licenseValid: boolean;
|
|
28
|
-
isTrial: boolean;
|
|
29
|
-
licensePlan: import("@internal/domain/identity/value-object/license").LicensePlan | undefined;
|
|
30
|
-
licenseExpires: string | undefined;
|
|
31
|
-
licenseDaysRemaining: number | undefined;
|
|
32
|
-
} | {
|
|
33
|
-
isAuthenticated: boolean;
|
|
34
|
-
email: undefined;
|
|
35
|
-
serverUrl: string;
|
|
36
|
-
tokenExpired: boolean;
|
|
37
|
-
hasToken: boolean;
|
|
38
|
-
};
|
|
20
|
+
getStatus(): UserStatus;
|
|
39
21
|
getServerConfig(): ServerConfig;
|
|
40
22
|
updateServerConfig(updates: {
|
|
41
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,19 +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
|
-
licenseValid: boolean;
|
|
37
|
-
isTrial: boolean;
|
|
38
|
-
licensePlan: import("../value-object/license").LicensePlan | undefined;
|
|
39
|
-
licenseExpires: string | undefined;
|
|
40
|
-
licenseDaysRemaining: number | undefined;
|
|
41
|
-
};
|
|
52
|
+
getStatus(): UserStatus;
|
|
42
53
|
toJSON(): {
|
|
43
54
|
email: string;
|
|
44
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';
|
|
@@ -10,7 +10,7 @@ export interface LicenseFeatures {
|
|
|
10
10
|
customSubDomain: boolean;
|
|
11
11
|
validityDays: number;
|
|
12
12
|
}
|
|
13
|
-
export type LicensePlan = '
|
|
13
|
+
export type LicensePlan = 'free' | 'starter' | 'enjoy' | 'creator' | 'pro' | 'enterprise';
|
|
14
14
|
export declare class License {
|
|
15
15
|
private readonly key;
|
|
16
16
|
private readonly plan;
|
|
@@ -1,9 +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;
|
|
15
|
+
license?: string;
|
|
16
|
+
hasSyncConfig: boolean;
|
|
17
|
+
syncConfig?: ObsidianSyncConfig;
|
|
7
18
|
}
|
|
8
19
|
export interface ObsidianServerConfig {
|
|
9
20
|
apiUrl: 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.16",
|
|
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",
|
|
@@ -19,6 +19,12 @@
|
|
|
19
19
|
"test": "jest",
|
|
20
20
|
"test:watch": "jest --watch",
|
|
21
21
|
"test:coverage": "jest --coverage",
|
|
22
|
+
"test:integration": "jest tests/obsidian.integration.test.ts",
|
|
23
|
+
"test:integration:verbose": "jest tests/obsidian.integration.test.ts --verbose",
|
|
24
|
+
"test:integration:project": "jest tests/obsidian-project-build.integration.test.ts",
|
|
25
|
+
"test:integration:project:verbose": "jest tests/obsidian-project-build.integration.test.ts --verbose",
|
|
26
|
+
"test:integration:domain": "jest tests/obsidian-domain.integration.test.ts",
|
|
27
|
+
"test:integration:domain:verbose": "jest tests/obsidian-domain.integration.test.ts --verbose",
|
|
22
28
|
"lint": "eslint . --ext .ts",
|
|
23
29
|
"lint:fix": "eslint . --ext .ts --fix",
|
|
24
30
|
"clean": "rimraf dist",
|