@mdfriday/foundry 26.3.9 → 26.3.10
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 +176 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/domain/identity/entity/user.d.ts +7 -1
- package/dist/internal/domain/identity/factory/user-factory.d.ts +6 -0
- package/dist/internal/domain/identity/index.d.ts +1 -0
- package/dist/internal/domain/identity/repository/index.d.ts +2 -0
- package/dist/internal/domain/identity/value-object/sync-config.d.ts +35 -0
- package/dist/internal/interfaces/obsidian/index.d.ts +1 -0
- package/dist/internal/interfaces/obsidian/license.d.ts +22 -0
- package/package.json +1 -1
|
@@ -2,21 +2,26 @@ import { Email } from '../value-object/email';
|
|
|
2
2
|
import { Token } from '../value-object/token';
|
|
3
3
|
import { ServerConfig } from '../value-object/server-config';
|
|
4
4
|
import { License } from '../value-object/license';
|
|
5
|
+
import { SyncConfig } from '../value-object/sync-config';
|
|
5
6
|
export declare class User {
|
|
6
7
|
private readonly email;
|
|
7
8
|
private token;
|
|
8
9
|
private serverConfig;
|
|
9
10
|
private license;
|
|
10
|
-
|
|
11
|
+
private syncConfig;
|
|
12
|
+
constructor(email: Email, token: Token | null, serverConfig: ServerConfig, license?: License | null, syncConfig?: SyncConfig | null);
|
|
11
13
|
getEmail(): Email;
|
|
12
14
|
getToken(): Token | null;
|
|
13
15
|
getServerConfig(): ServerConfig;
|
|
14
16
|
getLicense(): License | null;
|
|
17
|
+
getSyncConfig(): SyncConfig | null;
|
|
15
18
|
setToken(token: Token): void;
|
|
16
19
|
clearToken(): void;
|
|
17
20
|
updateServerConfig(config: ServerConfig): void;
|
|
18
21
|
setLicense(license: License): void;
|
|
19
22
|
clearLicense(): void;
|
|
23
|
+
setSyncConfig(syncConfig: SyncConfig): void;
|
|
24
|
+
clearSyncConfig(): void;
|
|
20
25
|
isAuthenticated(): boolean;
|
|
21
26
|
isTokenExpired(): boolean;
|
|
22
27
|
hasValidLicense(): boolean;
|
|
@@ -51,5 +56,6 @@ export declare class User {
|
|
|
51
56
|
features: import("../value-object/license").LicenseFeatures;
|
|
52
57
|
activatedAt: number;
|
|
53
58
|
} | null;
|
|
59
|
+
syncConfig: import("../value-object/sync-config").SyncConfigData | null;
|
|
54
60
|
};
|
|
55
61
|
}
|
|
@@ -33,6 +33,12 @@ export interface LicenseActivationResponse {
|
|
|
33
33
|
email: string;
|
|
34
34
|
user_dir: string;
|
|
35
35
|
};
|
|
36
|
+
sync?: {
|
|
37
|
+
db_endpoint: string;
|
|
38
|
+
db_name: string;
|
|
39
|
+
email: string;
|
|
40
|
+
db_password: string;
|
|
41
|
+
};
|
|
36
42
|
}
|
|
37
43
|
export interface DomainInfo {
|
|
38
44
|
subdomain: string;
|
|
@@ -2,6 +2,7 @@ export { Email } from './value-object/email';
|
|
|
2
2
|
export { Token } from './value-object/token';
|
|
3
3
|
export { ServerConfig } from './value-object/server-config';
|
|
4
4
|
export { License, LicenseFeatures, LicensePlan } from './value-object/license';
|
|
5
|
+
export { SyncConfig, SyncConfigData } from './value-object/sync-config';
|
|
5
6
|
export { Device, DeviceType } from './value-object/device';
|
|
6
7
|
export { User } from './entity/user';
|
|
7
8
|
export { UserFactory, UserFactoryOptions } from './factory/user-factory';
|
|
@@ -13,12 +13,14 @@ export interface IdentityStorageProvider {
|
|
|
13
13
|
saveUserData(data: {
|
|
14
14
|
token?: any;
|
|
15
15
|
license?: any;
|
|
16
|
+
syncConfig?: any;
|
|
16
17
|
serverConfig: any;
|
|
17
18
|
email?: string;
|
|
18
19
|
}): Promise<void>;
|
|
19
20
|
loadUserData(): Promise<{
|
|
20
21
|
token?: any;
|
|
21
22
|
license?: any;
|
|
23
|
+
syncConfig?: any;
|
|
22
24
|
serverConfig?: any;
|
|
23
25
|
email?: string;
|
|
24
26
|
} | null>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface SyncConfigData {
|
|
2
|
+
dbEndpoint: string;
|
|
3
|
+
dbName: string;
|
|
4
|
+
email: string;
|
|
5
|
+
dbPassword: string;
|
|
6
|
+
userDir: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class SyncConfig {
|
|
9
|
+
private readonly dbEndpoint;
|
|
10
|
+
private readonly dbName;
|
|
11
|
+
private readonly email;
|
|
12
|
+
private readonly dbPassword;
|
|
13
|
+
private readonly userDir;
|
|
14
|
+
private constructor();
|
|
15
|
+
static create(data: SyncConfigData): SyncConfig;
|
|
16
|
+
static fromJSON(data: SyncConfigData): SyncConfig;
|
|
17
|
+
getDbEndpoint(): string;
|
|
18
|
+
getDbName(): string;
|
|
19
|
+
getEmail(): string;
|
|
20
|
+
getDbPassword(): string;
|
|
21
|
+
getUserDir(): string;
|
|
22
|
+
getCouchDbUri(): string;
|
|
23
|
+
toJSON(): SyncConfigData;
|
|
24
|
+
toObsidianLiveSyncFormat(): {
|
|
25
|
+
couchDB_URI: string;
|
|
26
|
+
couchDB_DBNAME: string;
|
|
27
|
+
couchDB_USER: string;
|
|
28
|
+
couchDB_PASSWORD: string;
|
|
29
|
+
encrypt: boolean;
|
|
30
|
+
syncOnStart: boolean;
|
|
31
|
+
syncOnSave: boolean;
|
|
32
|
+
liveSync: boolean;
|
|
33
|
+
};
|
|
34
|
+
equals(other: SyncConfig): boolean;
|
|
35
|
+
}
|
|
@@ -11,3 +11,4 @@ export { createWorkspaceAppService, createWorkspaceFactory, } from './container'
|
|
|
11
11
|
export type { HttpClient as PublishHttpClient, HttpResponse as PublishHttpResponse } from '@internal/domain/publish/repository/http-client';
|
|
12
12
|
export type { HttpClient as IdentityHttpClient, HttpResponse as IdentityHttpResponse } from '@internal/domain/identity';
|
|
13
13
|
export type { AnyPublishConfig, FTPConfig, NetlifyConfig, MDFridayConfig, } from '@internal/domain/publish';
|
|
14
|
+
export type { SyncConfig, SyncConfigData, } from '@internal/domain/identity';
|
|
@@ -18,6 +18,28 @@ export interface ObsidianLicenseInfo {
|
|
|
18
18
|
customDomain: boolean;
|
|
19
19
|
customSubDomain: boolean;
|
|
20
20
|
};
|
|
21
|
+
user?: {
|
|
22
|
+
email: string;
|
|
23
|
+
userDir: string;
|
|
24
|
+
};
|
|
25
|
+
sync?: {
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
dbEndpoint: string;
|
|
28
|
+
dbName: string;
|
|
29
|
+
email: string;
|
|
30
|
+
dbPassword: string;
|
|
31
|
+
userDir: string;
|
|
32
|
+
liveSyncConfig: {
|
|
33
|
+
couchDB_URI: string;
|
|
34
|
+
couchDB_DBNAME: string;
|
|
35
|
+
couchDB_USER: string;
|
|
36
|
+
couchDB_PASSWORD: string;
|
|
37
|
+
encrypt: boolean;
|
|
38
|
+
syncOnStart: boolean;
|
|
39
|
+
syncOnSave: boolean;
|
|
40
|
+
liveSync: boolean;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
21
43
|
}
|
|
22
44
|
export interface ObsidianLicenseUsage {
|
|
23
45
|
licenseKey: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mdfriday/foundry",
|
|
3
|
-
"version": "26.3.
|
|
3
|
+
"version": "26.3.10",
|
|
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",
|