tabby-sync-selective 1.1.0

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.
Files changed (46) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +48 -0
  3. package/dist/index.js +2 -0
  4. package/dist/index.js.LICENSE.txt +7479 -0
  5. package/dist/src/components/change-logs/change-logs.component.d.ts +8 -0
  6. package/dist/src/components/checkbox.component.d.ts +13 -0
  7. package/dist/src/components/cloud-sync-settings.component.d.ts +317 -0
  8. package/dist/src/components/feeback-form/feeback.component.d.ts +36 -0
  9. package/dist/src/components/master-password/master-password.component.d.ts +8 -0
  10. package/dist/src/components/sub-components/about/about.component.d.ts +17 -0
  11. package/dist/src/components/sub-components/amazon/amazon-settings.component.d.ts +350 -0
  12. package/dist/src/components/sub-components/built-in/builtin-settings.component.d.ts +215 -0
  13. package/dist/src/components/sub-components/check-for-updates/check-for-updates.component.d.ts +26 -0
  14. package/dist/src/components/sub-components/dropbox/dropbox-settings.component.d.ts +348 -0
  15. package/dist/src/components/sub-components/ftp/ftp-settings.component.d.ts +351 -0
  16. package/dist/src/components/sub-components/gist/gist-settings.component.d.ts +352 -0
  17. package/dist/src/components/sub-components/plugin-logs/plugin-logs.component.d.ts +21 -0
  18. package/dist/src/components/sub-components/webdav/webdav-settings.component.d.ts +349 -0
  19. package/dist/src/components/support-us/support-us.component.d.ts +14 -0
  20. package/dist/src/components/sync-sections-dialog/sync-sections-dialog.component.d.ts +131 -0
  21. package/dist/src/components/toggle.component.d.ts +4 -0
  22. package/dist/src/data/lang.d.ts +119 -0
  23. package/dist/src/data/mockdata.json +7 -0
  24. package/dist/src/data/s3-data.d.ts +15 -0
  25. package/dist/src/data/setting-items.d.ts +197 -0
  26. package/dist/src/index.d.ts +15 -0
  27. package/dist/src/interface/index.d.ts +33 -0
  28. package/dist/src/services/dev-constants.d.ts +4 -0
  29. package/dist/src/services/sync-sections-dialog.service.d.ts +9 -0
  30. package/dist/src/services/tabby-sync-upgrade.d.ts +7 -0
  31. package/dist/src/settings.d.ts +7 -0
  32. package/dist/src/utils/CloudSyncSettingsHelper.d.ts +8 -0
  33. package/dist/src/utils/Logger.d.ts +9 -0
  34. package/dist/src/utils/cloud-components/AmazonS3.d.ts +30 -0
  35. package/dist/src/utils/cloud-components/Dropbox.d.ts +17 -0
  36. package/dist/src/utils/cloud-components/FTP.d.ts +15 -0
  37. package/dist/src/utils/cloud-components/WebDav.d.ts +13 -0
  38. package/dist/src/utils/cloud-components/gist.d.ts +12 -0
  39. package/dist/src/utils/cloud-components/gists/gists.d.ts +10 -0
  40. package/dist/src/utils/cloud-components/gists/gitee.d.ts +12 -0
  41. package/dist/src/utils/cloud-components/gists/github.d.ts +12 -0
  42. package/dist/src/utils/cloud-components/gists/gitlab.d.ts +12 -0
  43. package/dist/src/utils/config-merge.d.ts +40 -0
  44. package/dist/src/utils/dev-mock-data.d.ts +6 -0
  45. package/dist/src/utils/settings-helper.d.ts +49 -0
  46. package/package.json +101 -0
@@ -0,0 +1,197 @@
1
+ declare const CloudSyncSettingsData: {
2
+ defaultSyncInterval: number;
3
+ tabbySettingsFilename: string;
4
+ storedSettingsFilename: string;
5
+ cloudSettingsFilename: string;
6
+ syncHashFilename: string;
7
+ tabbyLocalEncryptedFile: string;
8
+ values: {
9
+ BUILT_IN: string;
10
+ S3: string;
11
+ WASABI: string;
12
+ DIGITAL_OCEAN: string;
13
+ BLACKBLAZE: string;
14
+ S3_COMPATIBLE: string;
15
+ WEBDAV: string;
16
+ FTP: string;
17
+ GIST: string;
18
+ DROPBOX: string;
19
+ };
20
+ amazonEndpoints: {
21
+ WASABI: string;
22
+ DIGITAL_OCEAN: string;
23
+ BLACKBLAZE: string;
24
+ S3_COMPATIBLE: string;
25
+ };
26
+ serviceProvidersList: {
27
+ name: string;
28
+ value: string;
29
+ }[];
30
+ BuiltinLoginMode: {
31
+ LOGIN: string;
32
+ RESET_PASSWORD: string;
33
+ };
34
+ availablePluginVersions: string[];
35
+ formData: {
36
+ [x: string]: {
37
+ email: string;
38
+ password: string;
39
+ reset_password_email: string;
40
+ appId?: undefined;
41
+ appSecret?: undefined;
42
+ location?: undefined;
43
+ bucket?: undefined;
44
+ region?: undefined;
45
+ endpointUrl?: undefined;
46
+ host?: undefined;
47
+ username?: undefined;
48
+ port?: undefined;
49
+ protocol?: undefined;
50
+ type?: undefined;
51
+ name?: undefined;
52
+ accessToken?: undefined;
53
+ id?: undefined;
54
+ apiKey?: undefined;
55
+ apiSecret?: undefined;
56
+ } | {
57
+ appId: string;
58
+ appSecret: string;
59
+ location: string;
60
+ bucket: string;
61
+ region: string;
62
+ email?: undefined;
63
+ password?: undefined;
64
+ reset_password_email?: undefined;
65
+ endpointUrl?: undefined;
66
+ host?: undefined;
67
+ username?: undefined;
68
+ port?: undefined;
69
+ protocol?: undefined;
70
+ type?: undefined;
71
+ name?: undefined;
72
+ accessToken?: undefined;
73
+ id?: undefined;
74
+ apiKey?: undefined;
75
+ apiSecret?: undefined;
76
+ } | {
77
+ endpointUrl: string;
78
+ appId: string;
79
+ appSecret: string;
80
+ location: string;
81
+ bucket: string;
82
+ region: string;
83
+ email?: undefined;
84
+ password?: undefined;
85
+ reset_password_email?: undefined;
86
+ host?: undefined;
87
+ username?: undefined;
88
+ port?: undefined;
89
+ protocol?: undefined;
90
+ type?: undefined;
91
+ name?: undefined;
92
+ accessToken?: undefined;
93
+ id?: undefined;
94
+ apiKey?: undefined;
95
+ apiSecret?: undefined;
96
+ } | {
97
+ host: string;
98
+ username: string;
99
+ password: string;
100
+ location: string;
101
+ port: string;
102
+ email?: undefined;
103
+ reset_password_email?: undefined;
104
+ appId?: undefined;
105
+ appSecret?: undefined;
106
+ bucket?: undefined;
107
+ region?: undefined;
108
+ endpointUrl?: undefined;
109
+ protocol?: undefined;
110
+ type?: undefined;
111
+ name?: undefined;
112
+ accessToken?: undefined;
113
+ id?: undefined;
114
+ apiKey?: undefined;
115
+ apiSecret?: undefined;
116
+ } | {
117
+ protocol: string;
118
+ host: string;
119
+ username: string;
120
+ password: string;
121
+ location: string;
122
+ port: number;
123
+ email?: undefined;
124
+ reset_password_email?: undefined;
125
+ appId?: undefined;
126
+ appSecret?: undefined;
127
+ bucket?: undefined;
128
+ region?: undefined;
129
+ endpointUrl?: undefined;
130
+ type?: undefined;
131
+ name?: undefined;
132
+ accessToken?: undefined;
133
+ id?: undefined;
134
+ apiKey?: undefined;
135
+ apiSecret?: undefined;
136
+ } | {
137
+ type: string;
138
+ name: string;
139
+ accessToken: string;
140
+ id: string;
141
+ email?: undefined;
142
+ password?: undefined;
143
+ reset_password_email?: undefined;
144
+ appId?: undefined;
145
+ appSecret?: undefined;
146
+ location?: undefined;
147
+ bucket?: undefined;
148
+ region?: undefined;
149
+ endpointUrl?: undefined;
150
+ host?: undefined;
151
+ username?: undefined;
152
+ port?: undefined;
153
+ protocol?: undefined;
154
+ apiKey?: undefined;
155
+ apiSecret?: undefined;
156
+ } | {
157
+ apiKey: string;
158
+ apiSecret: string;
159
+ email?: undefined;
160
+ password?: undefined;
161
+ reset_password_email?: undefined;
162
+ appId?: undefined;
163
+ appSecret?: undefined;
164
+ location?: undefined;
165
+ bucket?: undefined;
166
+ region?: undefined;
167
+ endpointUrl?: undefined;
168
+ host?: undefined;
169
+ username?: undefined;
170
+ port?: undefined;
171
+ protocol?: undefined;
172
+ type?: undefined;
173
+ name?: undefined;
174
+ accessToken?: undefined;
175
+ id?: undefined;
176
+ };
177
+ };
178
+ external_urls: {
179
+ ApiUrl: string;
180
+ BlackBlazeHelp: string;
181
+ checkForUpdateUrl: string;
182
+ };
183
+ isCloudStorageS3Compatibility(provider: string): boolean;
184
+ gistUrls: {
185
+ viewItems: {
186
+ github: string;
187
+ gitee: string;
188
+ gitlab: string;
189
+ };
190
+ github: string;
191
+ gitee: string;
192
+ gitlab: string;
193
+ };
194
+ donationUrl: string;
195
+ pluginUrl: string;
196
+ };
197
+ export default CloudSyncSettingsData;
@@ -0,0 +1,15 @@
1
+ import { AppService, ConfigService, PlatformService } from 'terminus-core';
2
+ import { ToastrService } from 'ngx-toastr';
3
+ export default class CloudSyncSettingsModule {
4
+ private app;
5
+ private platform;
6
+ private toast;
7
+ private configService;
8
+ constructor(app: AppService, platform: PlatformService, toast: ToastrService, configService: ConfigService);
9
+ subscribeToAutoSyncEvent(): void;
10
+ subscribeToConfigChangeEvent(): void;
11
+ syncCloudSettings(): Promise<void>;
12
+ injectLoaderIndicator(): void;
13
+ showLoaderIndicator(): void;
14
+ hideLoaderIndicator(): void;
15
+ }
@@ -0,0 +1,33 @@
1
+ export interface AmazonParams {
2
+ endpointUrl: string;
3
+ appId: string;
4
+ appSecret: string;
5
+ bucket: string;
6
+ region: string;
7
+ location: string;
8
+ }
9
+ export interface FtpParams {
10
+ protocol: string;
11
+ host: string;
12
+ username: string;
13
+ password: string;
14
+ location: string;
15
+ }
16
+ export interface GistParams {
17
+ type: string;
18
+ name: string;
19
+ id: string;
20
+ accessToken: string;
21
+ }
22
+ export interface WebDavParams {
23
+ host: string;
24
+ username: string;
25
+ password: string;
26
+ location: string;
27
+ port: string;
28
+ }
29
+ export interface ConnectionGroup {
30
+ name: string;
31
+ collapsed: boolean;
32
+ type: string;
33
+ }
@@ -0,0 +1,4 @@
1
+ declare const DevEnvConstants: {
2
+ ENABLE_DEBUG: boolean;
3
+ };
4
+ export default DevEnvConstants;
@@ -0,0 +1,9 @@
1
+ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
2
+ import { SyncOptions } from '../utils/settings-helper';
3
+ import { PlatformService } from 'terminus-core';
4
+ export declare class SyncSectionsDialogService {
5
+ private modalService;
6
+ private platform;
7
+ constructor(modalService: NgbModal, platform: PlatformService);
8
+ prompt(override?: SyncOptions): Promise<SyncOptions | null>;
9
+ }
@@ -0,0 +1,7 @@
1
+ import { Logger } from 'terminus-core';
2
+ export declare class TabbySyncUpgradeService {
3
+ private platform;
4
+ logger: Logger;
5
+ private constructor();
6
+ installPlugin(version: string): Promise<void>;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { SettingsTabProvider } from 'terminus-settings';
2
+ export declare class SyncConfigSettingsTabProvider extends SettingsTabProvider {
3
+ id: string;
4
+ icon: string;
5
+ title: string;
6
+ getComponentType(): any;
7
+ }
@@ -0,0 +1,8 @@
1
+ declare class CloudSyncSettingsHelper {
2
+ getS3regionsList: (provider: string) => {
3
+ text: string;
4
+ value: string;
5
+ }[];
6
+ }
7
+ declare const cloudSyncSettingsHelper: CloudSyncSettingsHelper;
8
+ export default cloudSyncSettingsHelper;
@@ -0,0 +1,9 @@
1
+ import { PlatformService } from 'terminus-core';
2
+ export default class Logger {
3
+ private platform;
4
+ private logger;
5
+ constructor(platform: PlatformService);
6
+ getCurrentLoggerFile(): string;
7
+ getLogContents(callback: any, date?: string, limit?: number): any;
8
+ log(content: any, level?: string): void;
9
+ }
@@ -0,0 +1,30 @@
1
+ import { ConfigService, PlatformService } from 'terminus-core';
2
+ import { ToastrService } from 'ngx-toastr';
3
+ import { SyncOptions } from '../settings-helper';
4
+ import { AmazonParams } from '../../interface';
5
+ declare class AmazonS3Class {
6
+ private provider;
7
+ private appId;
8
+ private appSecret;
9
+ private bucket;
10
+ private region;
11
+ private path;
12
+ private PERMISSIONS;
13
+ private TEST_FILE;
14
+ setProvider(provider: string): void;
15
+ setConfig(appId: any, appSecret: any, bucket: any, region: any, inputPath: any): void;
16
+ /**
17
+ * Test the connection to Amazon S3 configurators
18
+ *
19
+ * @return Object
20
+ * */
21
+ testConnection: (platform: PlatformService, s3_params: any) => Promise<any>;
22
+ sync(config: ConfigService, platform: PlatformService, toast: ToastrService, params: AmazonParams, firstInit?: boolean, _emitter?: any, syncOptions?: SyncOptions): Promise<{
23
+ result: boolean;
24
+ message: string;
25
+ }>;
26
+ syncLocalSettingsToCloud(platform: PlatformService, toast: ToastrService, syncOptions?: SyncOptions): Promise<void>;
27
+ private createClient;
28
+ }
29
+ declare const _default: AmazonS3Class;
30
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import { SyncOptions } from '../settings-helper';
2
+ import { ConfigService, PlatformService } from 'terminus-core';
3
+ import { ToastrService } from 'ngx-toastr';
4
+ import { EventEmitter } from "@angular/core";
5
+ declare class DropboxSync {
6
+ private _isFirstInit;
7
+ private _emitter;
8
+ private emitterActions;
9
+ internalEmitterHandler(): void;
10
+ sync(config: ConfigService, platform: PlatformService, toast: ToastrService, params: any, firstInit?: boolean, emitter?: EventEmitter<any>, syncOptions?: SyncOptions): Promise<{
11
+ result: boolean;
12
+ message: string;
13
+ }>;
14
+ syncLocalSettingsToCloud(platform: PlatformService, toast: ToastrService, syncOptions?: SyncOptions): Promise<void>;
15
+ }
16
+ declare const _default: DropboxSync;
17
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { SyncOptions } from '../settings-helper';
2
+ import { ConfigService, PlatformService } from 'terminus-core';
3
+ import { ToastrService } from 'ngx-toastr';
4
+ declare class FTP {
5
+ private ftpClient;
6
+ sync(config: ConfigService, platform: PlatformService, toast: ToastrService, params: any, firstInit?: boolean, _emitter?: any, syncOptions?: SyncOptions): Promise<{
7
+ result: boolean;
8
+ message: string;
9
+ }>;
10
+ private uploadLocalSettings;
11
+ syncLocalSettingsToCloud(platform: PlatformService, toast: ToastrService, syncOptions?: SyncOptions): Promise<boolean>;
12
+ private static createClient;
13
+ }
14
+ declare const _default: FTP;
15
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import { SyncOptions } from '../settings-helper';
2
+ import { ConfigService, PlatformService } from 'terminus-core';
3
+ import { ToastrService } from 'ngx-toastr';
4
+ declare class WebDav {
5
+ sync(config: ConfigService, platform: PlatformService, toast: ToastrService, params: any, firstInit?: boolean, _emitter?: any, syncOptions?: SyncOptions): Promise<{
6
+ result: boolean;
7
+ message: string;
8
+ }>;
9
+ syncLocalSettingsToCloud(platform: PlatformService, toast: ToastrService, syncOptions?: SyncOptions): Promise<boolean>;
10
+ private static createClient;
11
+ }
12
+ declare const _default: WebDav;
13
+ export default _default;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Root class for the Gist
3
+ */
4
+ declare class Gist {
5
+ protected baseRequestUrl: string;
6
+ protected id: string;
7
+ protected accessToken: string;
8
+ constructor(url: string, id: string, accessToken: string);
9
+ getSyncTextDateTime(): string;
10
+ getDummyContent(): string;
11
+ }
12
+ export default Gist;
@@ -0,0 +1,10 @@
1
+ import { ConfigService, PlatformService } from 'terminus-core';
2
+ import { ToastrService } from 'ngx-toastr';
3
+ import { GistParams } from '../../../interface';
4
+ import { SyncOptions } from '../../settings-helper';
5
+ declare class Gists {
6
+ sync: (config: ConfigService, platform: PlatformService, toast: ToastrService, params: GistParams, firstInit?: boolean, emitter?: any, syncOptions?: SyncOptions) => Promise<any>;
7
+ syncLocalSettingsToCloud: (platform: PlatformService, toast: ToastrService, syncOptions?: SyncOptions) => Promise<any>;
8
+ }
9
+ declare const _default: Gists;
10
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import { ConfigService, PlatformService } from 'terminus-core';
2
+ import Gist from '../gist';
3
+ import { ToastrService } from 'ngx-toastr';
4
+ import { GistParams } from '../../../interface';
5
+ import { SyncOptions } from '../../settings-helper';
6
+ declare class Gitee extends Gist {
7
+ constructor(id: string, accessToken: string);
8
+ testConnection: (platform: PlatformService) => Promise<any>;
9
+ sync: (config: ConfigService, platform: PlatformService, toast: ToastrService, params: GistParams, firstInit?: boolean, _emitter?: any, syncOptions?: SyncOptions) => Promise<any>;
10
+ syncLocalSettingsToCloud(platform: PlatformService, toast: ToastrService, gistFiles: any, syncOptions?: SyncOptions): Promise<any>;
11
+ }
12
+ export default Gitee;
@@ -0,0 +1,12 @@
1
+ import { ConfigService, PlatformService } from 'terminus-core';
2
+ import Gist from '../gist';
3
+ import { ToastrService } from 'ngx-toastr';
4
+ import { GistParams } from '../../../interface';
5
+ import { SyncOptions } from '../../settings-helper';
6
+ declare class Github extends Gist {
7
+ constructor(id: string, accessToken: string);
8
+ testConnection: (platform: PlatformService) => Promise<any>;
9
+ sync: (config: ConfigService, platform: PlatformService, toast: ToastrService, params: GistParams, firstInit?: boolean, _emitter?: any, syncOptions?: SyncOptions) => Promise<any>;
10
+ syncLocalSettingsToCloud(platform: PlatformService, toast: ToastrService, gistFiles: any, syncOptions?: SyncOptions): Promise<any>;
11
+ }
12
+ export default Github;
@@ -0,0 +1,12 @@
1
+ import { ConfigService, PlatformService } from 'terminus-core';
2
+ import Gist from '../gist';
3
+ import { ToastrService } from 'ngx-toastr';
4
+ import { GistParams } from '../../../interface';
5
+ import { SyncOptions } from '../../settings-helper';
6
+ declare class Gitlab extends Gist {
7
+ constructor(id: string, accessToken: string);
8
+ testConnection: (platform: PlatformService) => Promise<any>;
9
+ sync: (config: ConfigService, platform: PlatformService, toast: ToastrService, params: GistParams, firstInit?: boolean, _emitter?: any, syncOptions?: SyncOptions) => Promise<any>;
10
+ syncLocalSettingsToCloud(platform: PlatformService, toast: ToastrService, syncOptions?: SyncOptions): Promise<any>;
11
+ }
12
+ export default Gitlab;
@@ -0,0 +1,40 @@
1
+ export type SyncMode = 'full' | 'platform_safe' | 'custom';
2
+ export interface SyncFieldGroupDef {
3
+ id: string;
4
+ label: string;
5
+ labelZh: string;
6
+ }
7
+ export interface SyncFieldDef {
8
+ id: string;
9
+ path: string;
10
+ group: string;
11
+ label: string;
12
+ labelZh: string;
13
+ platformSpecific: boolean;
14
+ defaultCustom: boolean;
15
+ }
16
+ export interface SyncOptions {
17
+ ignoreEnabled?: boolean;
18
+ syncMode?: SyncMode;
19
+ syncFields?: Record<string, boolean>;
20
+ /** @deprecated use syncFields */
21
+ syncSections?: Record<string, boolean>;
22
+ }
23
+ export declare const SYNC_FIELD_GROUPS: SyncFieldGroupDef[];
24
+ export declare const SYNC_FIELDS: SyncFieldDef[];
25
+ /** @deprecated use SYNC_FIELDS */
26
+ export declare const SYNC_SECTIONS: {
27
+ id: string;
28
+ label: string;
29
+ labelZh: string;
30
+ keys: string[];
31
+ defaultEnabled: boolean;
32
+ }[];
33
+ export declare function getDefaultSyncFields(): Record<string, boolean>;
34
+ /** @deprecated use getDefaultSyncFields */
35
+ export declare function getDefaultSyncSections(): Record<string, boolean>;
36
+ export declare function getFieldsByGroup(groupId: string): SyncFieldDef[];
37
+ export declare function resolveSyncOptions(saved: any, override?: SyncOptions): SyncOptions;
38
+ export declare function mergeForDownload(localRaw: string, remoteRaw: string, options: SyncOptions): string;
39
+ export declare function mergeForUpload(localRaw: string, remoteRaw: string | null, options: SyncOptions): string;
40
+ export declare function buildCanonicalSyncPayload(yamlRaw: string, options: SyncOptions): string;
@@ -0,0 +1,6 @@
1
+ import { WebDavParams } from '../interface';
2
+ export declare class DevMockDataClass {
3
+ getWebDavMockData(): WebDavParams;
4
+ }
5
+ declare const _default: DevMockDataClass;
6
+ export default _default;
@@ -0,0 +1,49 @@
1
+ import { ConfigService, PlatformService } from 'terminus-core';
2
+ import { ToastrService } from 'ngx-toastr';
3
+ import { EventEmitter } from "@angular/core";
4
+ import { SyncOptions } from './config-merge';
5
+ export type { SyncOptions } from './config-merge';
6
+ export declare class SettingsHelperClass {
7
+ private adapterHandler;
8
+ private generatedCryptoHash;
9
+ getSyncOptions(platform: PlatformService, override?: SyncOptions): SyncOptions;
10
+ encryptConfigContent(content: string): string;
11
+ prepareConfigForUpload(platform: PlatformService, remoteDecrypted: string | null, options: SyncOptions): string;
12
+ applyConfigFromCloud(config: ConfigService, platform: PlatformService, remoteDecrypted: string, options: SyncOptions): string;
13
+ calculateSyncHash(content: string, options: SyncOptions): string;
14
+ saveSettingsToFile(platform: PlatformService, adapter: string, params: any): Promise<any>;
15
+ saveSyncSectionSettings(platform: PlatformService, toast: ToastrService, syncMode: string, syncFields: Record<string, boolean>): Promise<boolean>;
16
+ generateEncryptedTabbyFileForUpload(platform: PlatformService, remoteDecrypted?: string | null, options?: SyncOptions): Promise<any>;
17
+ syncWithCloud(config: ConfigService, platform: PlatformService, toast: ToastrService, firstInit?: boolean, emitter?: EventEmitter<any>, syncOptions?: SyncOptions): Promise<any>;
18
+ syncWithCloudSettings(platform: PlatformService, toast: ToastrService, syncOptions?: SyncOptions): Promise<void>;
19
+ syncLocalSettingsToCloud(platform: PlatformService, toast: ToastrService, syncOptions?: SyncOptions): Promise<void>;
20
+ readConfigFile(platform: PlatformService, isRaw?: boolean): any;
21
+ readTabbyConfigFile(platform: PlatformService, isRaw?: boolean, isEncrypt?: boolean): any;
22
+ backupTabbyConfigFile(platform: PlatformService): Promise<any>;
23
+ saveIntervalSync(value: number, platform: PlatformService, toast: ToastrService): Promise<any>;
24
+ toggleEnabledPlugin(value: boolean, platform: PlatformService, toast: ToastrService): Promise<any>;
25
+ toggleEnabledShowLoader(value: boolean, platform: PlatformService, toast: ToastrService): Promise<any>;
26
+ removeConfirmFile(platform: PlatformService, toast: ToastrService, needConfirm?: boolean): Promise<boolean>;
27
+ _removeSavedConfig(platform: PlatformService, toast: ToastrService): boolean;
28
+ /**
29
+ * 计算内容的 SHA256 哈希值
30
+ * Calculate SHA256 hash of content
31
+ */
32
+ calculateHash(content: string): string;
33
+ /**
34
+ * 读取上次同步成功时保存的哈希值
35
+ * Read last synced hash from local storage
36
+ */
37
+ readLastSyncedHash(platform: PlatformService): string | null;
38
+ /**
39
+ * 保存同步成功后的哈希值到本地
40
+ * Save last synced hash to local storage
41
+ */
42
+ saveLastSyncedHash(platform: PlatformService, hash: string): void;
43
+ doDescryption(content: string): string;
44
+ verifyServerConfigIsValid(configRawData: string): boolean;
45
+ clearLastErrorMessage(platform: PlatformService, adapter: string, params: any): void;
46
+ loadPluginSettings(platform: PlatformService): void;
47
+ }
48
+ declare const _default: SettingsHelperClass;
49
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,101 @@
1
+ {
2
+ "name": "tabby-sync-selective",
3
+ "version": "1.1.0",
4
+ "date": "6th July 2026",
5
+ "description": "Selectively sync Tabby config across devices via WebDAV and other cloud services. Merge appearance, profiles, and more without overwriting platform-specific settings.",
6
+ "keywords": [
7
+ "tabby-plugin",
8
+ "terminus-plugin"
9
+ ],
10
+ "main": "dist/index.js",
11
+ "typings": "dist/index.d.ts",
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "author": "kentxxq",
16
+ "support_url": "https://github.com/kentxxq/tabby-cloud-sync-settings",
17
+ "github_url": "https://github.com/kentxxq/tabby-cloud-sync-settings",
18
+ "license": "MIT",
19
+ "devDependencies": {
20
+ "@angular/animations": "^7.2.8",
21
+ "@angular/common": "^7.2.8",
22
+ "@angular/core": "^7.2.8",
23
+ "@angular/forms": "^7.2.8",
24
+ "@angular/platform-browser": "^7.2.8",
25
+ "@ng-bootstrap/ng-bootstrap": "^2.2.0",
26
+ "@types/jest": "^26.0.23",
27
+ "@types/js-yaml": "^4.0.0",
28
+ "@types/webpack-env": "^1.16.0",
29
+ "@typescript-eslint/eslint-plugin": "^4.33.0",
30
+ "@typescript-eslint/parser": "^4.33.0",
31
+ "acorn-import-assertions": "^1.8.0",
32
+ "apply-loader": "^2.0.0",
33
+ "aws-sdk": "niceit/aws-sdk-js",
34
+ "axios": "^0.21.1",
35
+ "basic-ftp": "^4.6.6",
36
+ "byte-length": "^1.0.2",
37
+ "clean-webpack-plugin": "^0.1.19",
38
+ "css-loader": "^5.1.1",
39
+ "electron": "^14.2.7",
40
+ "eslint": "^7.32.0",
41
+ "glob-to-regexp": "^0.4.1",
42
+ "is-stream": "^4.0.1",
43
+ "isomorphic-form-data": "^2.0.0",
44
+ "jest": "^27.0.6",
45
+ "js-yaml": "^4.1.0",
46
+ "json-parse-even-better-errors": "^6.0.0",
47
+ "keytar": "^7.6.0",
48
+ "md5": "^2.3.0",
49
+ "micromatch": "^4.0.8",
50
+ "moment": "^2.29.3",
51
+ "ngx-toastr": "^8.8.0",
52
+ "pug": "^3.0.2",
53
+ "pug-loader": "^2.4.0",
54
+ "rxjs": "^6.2.1",
55
+ "safe-stable-stringify": "^2.5.0",
56
+ "sass": "1.77.8",
57
+ "sass-loader": "^11.0.1",
58
+ "semver": "^7.3.8",
59
+ "strip-ansi": "^5.0.0",
60
+ "style-loader": "^2.0.0",
61
+ "terminus-core": "^1.0.140",
62
+ "terminus-settings": "^1.0.140",
63
+ "terminus-terminal": "^1.0.140",
64
+ "terser-webpack-plugin": "^5.6.1",
65
+ "to-string-loader": "^1.1.6",
66
+ "triple-beam": "^1.4.1",
67
+ "ts-jest": "^27.0.3",
68
+ "ts-loader": "^9.2.3",
69
+ "typescript": "^4.3.5",
70
+ "webdav": "^4.6.0",
71
+ "webpack": "^5.88.2",
72
+ "webpack-cli": "^4.5.0",
73
+ "winston": "^3.3.3",
74
+ "winston-transport": "^4.9.0"
75
+ },
76
+ "peerDependencies": {
77
+ "@angular/core": "^4.0.1"
78
+ },
79
+ "repository": {
80
+ "type": "git",
81
+ "url": "git+https://github.com/kentxxq/tabby-cloud-sync-settings.git"
82
+ },
83
+ "dependencies": {
84
+ "crypto-js": "^4.0.0",
85
+ "dropbox": "^10.34.0"
86
+ },
87
+ "publishConfig": {
88
+ "registry": "https://registry.npmjs.org"
89
+ },
90
+ "bugs": {
91
+ "url": "https://github.com/kentxxq/tabby-cloud-sync-settings/issues"
92
+ },
93
+ "homepage": "https://github.com/kentxxq/tabby-cloud-sync-settings",
94
+ "scripts": {
95
+ "build": "webpack --progress --color --mode=production && npm run postbuild",
96
+ "watch": "webpack --progress --color --watch",
97
+ "lint": "eslint --ext ts */src */lib",
98
+ "test": "jest",
99
+ "postbuild": "cp src/data/mockdata.json dist/src/data/mockdata.json"
100
+ }
101
+ }