terminus-cloud-settings-sync-plus 0.0.0-stage → 1.0.1

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