terminus-cloud-settings-sync-plus 0.0.0-stage → 1.0.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 (54) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +7 -0
  3. package/README.en.md +41 -0
  4. package/README.md +40 -2
  5. package/dist/index.js +2 -0
  6. package/dist/index.js.LICENSE.txt +7439 -0
  7. package/dist/src/components/change-logs/change-logs.component.d.ts +244 -0
  8. package/dist/src/components/checkbox.component.d.ts +13 -0
  9. package/dist/src/components/cloud-sync-settings.component.d.ts +431 -0
  10. package/dist/src/components/feeback-form/feeback.component.d.ts +242 -0
  11. package/dist/src/components/master-password/master-password.component.d.ts +244 -0
  12. package/dist/src/components/sub-components/about/about.component.d.ts +20 -0
  13. package/dist/src/components/sub-components/amazon/amazon-settings.component.d.ts +459 -0
  14. package/dist/src/components/sub-components/built-in/builtin-settings.component.d.ts +444 -0
  15. package/dist/src/components/sub-components/check-for-updates/check-for-updates.component.d.ts +267 -0
  16. package/dist/src/components/sub-components/dropbox/dropbox-encryption-secret-modal.component.d.ts +252 -0
  17. package/dist/src/components/sub-components/dropbox/dropbox-settings.component.d.ts +488 -0
  18. package/dist/src/components/sub-components/ftp/ftp-settings.component.d.ts +460 -0
  19. package/dist/src/components/sub-components/gist/gist-settings.component.d.ts +461 -0
  20. package/dist/src/components/sub-components/webdav/webdav-settings.component.d.ts +454 -0
  21. package/dist/src/components/toggle.component.d.ts +4 -0
  22. package/dist/src/data/lang.d.ts +245 -0
  23. package/dist/src/data/s3-data.d.ts +15 -0
  24. package/dist/src/data/setting-items.d.ts +198 -0
  25. package/dist/src/index.d.ts +47 -0
  26. package/dist/src/interface/index.d.ts +65 -0
  27. package/dist/src/providers/cloud-sync-actions.d.ts +15 -0
  28. package/dist/src/providers/cloud-sync-command.provider.d.ts +16 -0
  29. package/dist/src/providers/cloud-sync-toolbar.provider.d.ts +7 -0
  30. package/dist/src/services/dev-constants.d.ts +4 -0
  31. package/dist/src/services/tabby-sync-upgrade.d.ts +10 -0
  32. package/dist/src/services/toast.d.ts +61 -0
  33. package/dist/src/settings.d.ts +7 -0
  34. package/dist/src/utils/CloudSyncSettingsHelper.d.ts +8 -0
  35. package/dist/src/utils/Logger.d.ts +29 -0
  36. package/dist/src/utils/cloud-components/AmazonS3.d.ts +38 -0
  37. package/dist/src/utils/cloud-components/Dropbox.d.ts +50 -0
  38. package/dist/src/utils/cloud-components/FTP.d.ts +46 -0
  39. package/dist/src/utils/cloud-components/WebDav.d.ts +34 -0
  40. package/dist/src/utils/cloud-components/gist.d.ts +86 -0
  41. package/dist/src/utils/cloud-components/gists/gists.d.ts +15 -0
  42. package/dist/src/utils/cloud-components/gists/gitee.d.ts +16 -0
  43. package/dist/src/utils/cloud-components/gists/github.d.ts +16 -0
  44. package/dist/src/utils/cloud-components/gists/gitlab.d.ts +44 -0
  45. package/dist/src/utils/cloud-components/sync-utils.d.ts +90 -0
  46. package/dist/src/utils/config-hash.d.ts +21 -0
  47. package/dist/src/utils/dev-mock-data.d.ts +6 -0
  48. package/dist/src/utils/settings-crypto.d.ts +53 -0
  49. package/dist/src/utils/settings-helper.d.ts +177 -0
  50. package/dist/src/utils/settings-secret.d.ts +16 -0
  51. package/dist/src/utils/sync-lock.d.ts +44 -0
  52. package/dist/src/utils/sync-payload.d.ts +38 -0
  53. package/dist/src/utils/sync-state.d.ts +55 -0
  54. package/package.json +98 -6
@@ -0,0 +1,459 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { ConfigService, PlatformService } from 'terminus-core';
3
+ interface formData {
4
+ endpointUrl: string;
5
+ appId: string;
6
+ appSecret: string;
7
+ bucket: string;
8
+ region: string;
9
+ location: string;
10
+ }
11
+ export declare class CloudSyncAmazonSettingsComponent implements OnInit {
12
+ private config;
13
+ private platform;
14
+ provider: string;
15
+ presetData: {
16
+ defaultSyncInterval: number;
17
+ syncSkewToleranceSeconds: number;
18
+ tabbySettingsFilename: string;
19
+ storedSettingsFilename: string;
20
+ syncStateFilename: string;
21
+ cloudSettingsFilename: string;
22
+ tabbyLocalEncryptedFile: string;
23
+ values: {
24
+ BUILT_IN: string;
25
+ S3: string;
26
+ WASABI: string;
27
+ DIGITAL_OCEAN: string;
28
+ BLACKBLAZE: string;
29
+ S3_COMPATIBLE: string;
30
+ WEBDAV: string;
31
+ FTP: string;
32
+ GIST: string;
33
+ DROPBOX: string;
34
+ };
35
+ amazonEndpoints: {
36
+ WASABI: string;
37
+ DIGITAL_OCEAN: string;
38
+ BLACKBLAZE: string;
39
+ S3_COMPATIBLE: string;
40
+ };
41
+ serviceProvidersList: {
42
+ name: string;
43
+ value: string;
44
+ }[];
45
+ BuiltinLoginMode: {
46
+ LOGIN: string;
47
+ RESET_PASSWORD: string;
48
+ };
49
+ availablePluginVersions: any[];
50
+ formData: {
51
+ [x: string]: {
52
+ email: string;
53
+ password: string;
54
+ reset_password_email: string;
55
+ appId?: undefined;
56
+ appSecret?: undefined;
57
+ location?: undefined;
58
+ bucket?: undefined;
59
+ region?: undefined;
60
+ endpointUrl?: undefined;
61
+ host?: undefined;
62
+ username?: undefined;
63
+ port?: undefined;
64
+ protocol?: undefined;
65
+ type?: undefined;
66
+ name?: undefined;
67
+ accessToken?: undefined;
68
+ id?: undefined;
69
+ apiKey?: undefined;
70
+ } | {
71
+ appId: string;
72
+ appSecret: string;
73
+ location: string;
74
+ bucket: string;
75
+ region: string;
76
+ email?: undefined;
77
+ password?: undefined;
78
+ reset_password_email?: undefined;
79
+ endpointUrl?: undefined;
80
+ host?: undefined;
81
+ username?: undefined;
82
+ port?: undefined;
83
+ protocol?: undefined;
84
+ type?: undefined;
85
+ name?: undefined;
86
+ accessToken?: undefined;
87
+ id?: undefined;
88
+ apiKey?: undefined;
89
+ } | {
90
+ endpointUrl: string;
91
+ appId: string;
92
+ appSecret: string;
93
+ location: string;
94
+ bucket: string;
95
+ region: string;
96
+ email?: undefined;
97
+ password?: undefined;
98
+ reset_password_email?: undefined;
99
+ host?: undefined;
100
+ username?: undefined;
101
+ port?: undefined;
102
+ protocol?: undefined;
103
+ type?: undefined;
104
+ name?: undefined;
105
+ accessToken?: undefined;
106
+ id?: undefined;
107
+ apiKey?: undefined;
108
+ } | {
109
+ host: string;
110
+ username: string;
111
+ password: string;
112
+ location: string;
113
+ port: string;
114
+ email?: undefined;
115
+ reset_password_email?: undefined;
116
+ appId?: undefined;
117
+ appSecret?: undefined;
118
+ bucket?: undefined;
119
+ region?: undefined;
120
+ endpointUrl?: undefined;
121
+ protocol?: undefined;
122
+ type?: undefined;
123
+ name?: undefined;
124
+ accessToken?: undefined;
125
+ id?: undefined;
126
+ apiKey?: undefined;
127
+ } | {
128
+ protocol: string;
129
+ host: string;
130
+ username: string;
131
+ password: string;
132
+ location: string;
133
+ port: number;
134
+ email?: undefined;
135
+ reset_password_email?: undefined;
136
+ appId?: undefined;
137
+ appSecret?: undefined;
138
+ bucket?: undefined;
139
+ region?: undefined;
140
+ endpointUrl?: undefined;
141
+ type?: undefined;
142
+ name?: undefined;
143
+ accessToken?: undefined;
144
+ id?: undefined;
145
+ apiKey?: undefined;
146
+ } | {
147
+ type: string;
148
+ name: string;
149
+ accessToken: string;
150
+ id: string;
151
+ email?: undefined;
152
+ password?: undefined;
153
+ reset_password_email?: undefined;
154
+ appId?: undefined;
155
+ appSecret?: undefined;
156
+ location?: undefined;
157
+ bucket?: undefined;
158
+ region?: undefined;
159
+ endpointUrl?: undefined;
160
+ host?: undefined;
161
+ username?: undefined;
162
+ port?: undefined;
163
+ protocol?: undefined;
164
+ apiKey?: undefined;
165
+ } | {
166
+ apiKey: string;
167
+ email?: undefined;
168
+ password?: undefined;
169
+ reset_password_email?: undefined;
170
+ appId?: undefined;
171
+ appSecret?: undefined;
172
+ location?: undefined;
173
+ bucket?: undefined;
174
+ region?: undefined;
175
+ endpointUrl?: undefined;
176
+ host?: undefined;
177
+ username?: undefined;
178
+ port?: undefined;
179
+ protocol?: undefined;
180
+ type?: undefined;
181
+ name?: undefined;
182
+ accessToken?: undefined;
183
+ id?: undefined;
184
+ };
185
+ };
186
+ external_urls: {
187
+ ApiUrl: string;
188
+ BlackBlazeHelp: string;
189
+ checkForUpdateUrl: string;
190
+ githubIssuesUrl: string;
191
+ };
192
+ isCloudStorageS3Compatibility(provider: string): boolean;
193
+ gistUrls: {
194
+ viewItems: {
195
+ github: string;
196
+ gitee: string;
197
+ gitlab: string;
198
+ };
199
+ github: string;
200
+ gitee: string;
201
+ gitlab: string;
202
+ };
203
+ donationUrl: string;
204
+ pluginUrl: string;
205
+ };
206
+ translate: {
207
+ lang: {
208
+ common: {
209
+ menu_title: string;
210
+ verifyConfigString: string;
211
+ config_inject_header: string;
212
+ errors: {
213
+ invalidServerConfig: string;
214
+ };
215
+ };
216
+ form: {
217
+ error: {
218
+ required_all: string;
219
+ };
220
+ };
221
+ tabs: {
222
+ general: string;
223
+ security: string;
224
+ feedback: string;
225
+ change_logs: string;
226
+ check_for_update: string;
227
+ };
228
+ alerts: {
229
+ debug_build: string;
230
+ update_available: string;
231
+ };
232
+ settings: {
233
+ title: string;
234
+ sub_title: string;
235
+ service_label: string;
236
+ service_hint: string;
237
+ sync_enabled_label: string;
238
+ sync_enabled_hint: string;
239
+ show_loader_label: string;
240
+ show_loader_hint: string;
241
+ interval_label: string;
242
+ interval_hint: string;
243
+ encryption_title: string;
244
+ encryption_hint: string;
245
+ encryption_secret_label: string;
246
+ encryption_secret_hint: string;
247
+ encryption_secret_placeholder: string;
248
+ encryption_confirm_label: string;
249
+ encryption_confirm_hint: string;
250
+ encryption_confirm_placeholder: string;
251
+ encryption_show_secret: string;
252
+ encryption_hide_secret: string;
253
+ encryption_show_confirmation: string;
254
+ encryption_hide_confirmation: string;
255
+ encryption_set: string;
256
+ encryption_configured: string;
257
+ encryption_configured_hint: string;
258
+ encryption_legacy_title: string;
259
+ encryption_legacy_warning: string;
260
+ encryption_recovery_warning: string;
261
+ encryption_mismatch: string;
262
+ encryption_saved: string;
263
+ encryption_failed: string;
264
+ encryption_already_configured: string;
265
+ amazon: {
266
+ connected: string;
267
+ save_settings_failed: string;
268
+ save_settings_success: string;
269
+ };
270
+ error_connection_timeout: string;
271
+ };
272
+ sync: {
273
+ loading_config: string;
274
+ sync_confirmation: string;
275
+ setting_valid: string;
276
+ error_setting_save_file: string;
277
+ error_connection: string;
278
+ error_invalid_setting: string;
279
+ error_invalid_setting_2: string;
280
+ error_save_setting: string;
281
+ need_to_save_config: string;
282
+ sync_success: string;
283
+ sync_error: string;
284
+ sync_server_failed: string;
285
+ sync_enabled: string;
286
+ sync_disabled: string;
287
+ loader_enabled: string;
288
+ loader_disabled: string;
289
+ confirm_remove_setting: string;
290
+ remove_setting_success: string;
291
+ remove_setting_error: string;
292
+ remove_secret_error: string;
293
+ setting_changes_saved: string;
294
+ confirm_push_local: string;
295
+ };
296
+ log: {
297
+ invalid_cloud_settings: string;
298
+ read_cloud_settings: string;
299
+ error_upload_settings: string;
300
+ error_test_connection: string;
301
+ };
302
+ s3: {
303
+ title: string;
304
+ title_blackblaze: string;
305
+ app_id_placeholder: string;
306
+ app_secret_placeholder: string;
307
+ blackblaze_key_placeholder: string;
308
+ blackblaze_app_key_placeholder: string;
309
+ bucket_placeholder: string;
310
+ region_placeholder: string;
311
+ blackblaze_region_placeholder: string;
312
+ endpoint_placeholder: string;
313
+ location_placeholder: string;
314
+ blackblaze_region_help: string;
315
+ };
316
+ ftp: {
317
+ title: string;
318
+ host_placeholder: string;
319
+ location_placeholder: string;
320
+ username_placeholder: string;
321
+ password_placeholder: string;
322
+ port_placeholder: string;
323
+ };
324
+ webdav: {
325
+ title: string;
326
+ host_placeholder: string;
327
+ username_placeholder: string;
328
+ password_placeholder: string;
329
+ port_placeholder: string;
330
+ location_placeholder: string;
331
+ };
332
+ gist: {
333
+ title: string;
334
+ name: string;
335
+ id: string;
336
+ token: string;
337
+ invalid_provider: string;
338
+ enter_id: string;
339
+ error_create_gist: string;
340
+ help_github: string;
341
+ help_gitee: string;
342
+ };
343
+ dropbox: {
344
+ title: string;
345
+ title_connecting: string;
346
+ callback_waiting: string;
347
+ callback_listener_unavailable: string;
348
+ callback_title: string;
349
+ callback_hint: string;
350
+ callback_invalid: string;
351
+ callback_timeout: string;
352
+ use_manual_callback: string;
353
+ obtain_token: string;
354
+ obtaining_token: string;
355
+ paste_from_clipboard: string;
356
+ connected: string;
357
+ last_sync_error: string;
358
+ disconnect_account: string;
359
+ confirm_disconnect: string;
360
+ encryption_secret_title: string;
361
+ encryption_secret_required: string;
362
+ encryption_secret_label: string;
363
+ encryption_secret_placeholder: string;
364
+ encryption_secret_invalid: string;
365
+ encryption_secret_saved: string;
366
+ encryption_unlock: string;
367
+ encryption_unlocking: string;
368
+ missing_app_credentials: string;
369
+ missing_callback_url: string;
370
+ connect_success: string;
371
+ clipboard_success: string;
372
+ clipboard_error: string;
373
+ };
374
+ builtin: {
375
+ login_title: string;
376
+ reset_title: string;
377
+ email_placeholder: string;
378
+ password_placeholder: string;
379
+ reset_notice: string;
380
+ };
381
+ vault: {
382
+ title: string;
383
+ description: string;
384
+ };
385
+ feedback: {
386
+ title: string;
387
+ description: string;
388
+ description_2: string;
389
+ open_issue_hint: string;
390
+ };
391
+ changelogs: {
392
+ title: string;
393
+ description: string;
394
+ column_version: string;
395
+ column_date: string;
396
+ column_description: string;
397
+ };
398
+ updates: {
399
+ title: string;
400
+ current_version: string;
401
+ check_hint: string;
402
+ latest_version: string;
403
+ whats_new: string;
404
+ up_to_date: string;
405
+ check_failed: string;
406
+ upgrade_success: string;
407
+ rollback_title: string;
408
+ rollback_warning_backup: string;
409
+ rollback_warning_risk: string;
410
+ confirm_rollback: string;
411
+ column_version: string;
412
+ column_action: string;
413
+ };
414
+ buttons: {
415
+ sync_from_cloud: string;
416
+ sync_from_local: string;
417
+ check_update: string;
418
+ yes: string;
419
+ cancel: string;
420
+ no: string;
421
+ ok: string;
422
+ view: string;
423
+ connect: string;
424
+ disconnect: string;
425
+ open_github_issue: string;
426
+ rollback: string;
427
+ update_to: string;
428
+ visit_plugin_page: string;
429
+ login: string;
430
+ reset_password: string;
431
+ send_reset_link: string;
432
+ test_connection: string;
433
+ processing: string;
434
+ save_settings: string;
435
+ upload_settings: string;
436
+ cloud_syncing_progress: string;
437
+ remove_saved_setting: string;
438
+ };
439
+ };
440
+ trans: (key: string, replacements?: Record<string, string | number>) => string;
441
+ };
442
+ isPreloadingSavedConfig: boolean;
443
+ isSettingSaved: boolean;
444
+ isServiceAccountCheckPassed: boolean;
445
+ isFormProcessing: boolean;
446
+ isSyncingProgress: boolean;
447
+ form: formData;
448
+ s3Regions: any[];
449
+ constructor(config: ConfigService, platform: PlatformService);
450
+ ngOnInit(): void;
451
+ validateFormInput(): boolean;
452
+ correctLocationPath(): void;
453
+ performLoginAmazonS3(): void;
454
+ saveAmazonS3Settings(): Promise<void>;
455
+ cancelSaveSettings(): void;
456
+ openBlackBlazeRegionHelp(): void;
457
+ removeSavedSettings(): Promise<void>;
458
+ }
459
+ export {};