@jumoo/usync 0.0.0-stage → 17.5.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.
- package/LICENCE +373 -0
- package/README.md +10 -3
- package/dist/api/client/client.gen.d.ts +2 -0
- package/dist/api/client/client.gen.js +216 -0
- package/dist/api/client/index.d.ts +10 -0
- package/dist/api/client/index.js +6 -0
- package/dist/api/client/types.gen.d.ts +120 -0
- package/dist/api/client/types.gen.js +2 -0
- package/dist/api/client/utils.gen.d.ts +37 -0
- package/dist/api/client/utils.gen.js +230 -0
- package/dist/api/client.gen.d.ts +12 -0
- package/dist/api/client.gen.js +4 -0
- package/dist/api/core/auth.gen.d.ts +25 -0
- package/dist/api/core/auth.gen.js +14 -0
- package/dist/api/core/bodySerializer.gen.d.ts +25 -0
- package/dist/api/core/bodySerializer.gen.js +57 -0
- package/dist/api/core/params.gen.d.ts +43 -0
- package/dist/api/core/params.gen.js +109 -0
- package/dist/api/core/pathSerializer.gen.d.ts +33 -0
- package/dist/api/core/pathSerializer.gen.js +106 -0
- package/dist/api/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/api/core/queryKeySerializer.gen.js +92 -0
- package/dist/api/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/api/core/serverSentEvents.gen.js +132 -0
- package/dist/api/core/types.gen.d.ts +83 -0
- package/dist/api/core/types.gen.js +2 -0
- package/dist/api/core/utils.gen.d.ts +19 -0
- package/dist/api/core/utils.gen.js +87 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +4 -0
- package/dist/api/sdk.gen.d.ts +44 -0
- package/dist/api/sdk.gen.js +147 -0
- package/dist/api/types.gen.d.ts +567 -0
- package/dist/api/types.gen.js +47 -0
- package/dist/components/events.d.ts +11 -0
- package/dist/components/events.js +11 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.js +9 -0
- package/dist/components/usync-action-box.d.ts +22 -0
- package/dist/components/usync-action-box.js +119 -0
- package/dist/components/usync-change-detail.d.ts +31 -0
- package/dist/components/usync-change-detail.js +709 -0
- package/dist/components/usync-change-view.d.ts +22 -0
- package/dist/components/usync-change-view.js +125 -0
- package/dist/components/usync-progress-box.d.ts +20 -0
- package/dist/components/usync-progress-box.js +223 -0
- package/dist/components/usync-result-row.d.ts +15 -0
- package/dist/components/usync-result-row.js +133 -0
- package/dist/components/usync-results-group-view.d.ts +19 -0
- package/dist/components/usync-results-group-view.js +110 -0
- package/dist/components/usync-results-view.d.ts +17 -0
- package/dist/components/usync-results-view.js +176 -0
- package/dist/components/usync-sync-file-info-view.d.ts +15 -0
- package/dist/components/usync-sync-file-info-view.js +62 -0
- package/dist/conditions/constants.d.ts +1 -0
- package/dist/conditions/constants.js +1 -0
- package/dist/conditions/index.d.ts +2 -0
- package/dist/conditions/index.js +2 -0
- package/dist/conditions/legacy-files.condition.d.ts +10 -0
- package/dist/conditions/legacy-files.condition.js +16 -0
- package/dist/conditions/manifest.d.ts +1 -0
- package/dist/conditions/manifest.js +18 -0
- package/dist/conditions/new-section.condition.d.ts +8 -0
- package/dist/conditions/new-section.condition.js +48 -0
- package/dist/constants.d.ts +30 -0
- package/dist/constants.js +38 -0
- package/dist/dialogs/details-modal-element.d.ts +18 -0
- package/dist/dialogs/details-modal-element.js +98 -0
- package/dist/dialogs/details-modal-token.d.ts +10 -0
- package/dist/dialogs/details-modal-token.js +7 -0
- package/dist/dialogs/error-modal-element.d.ts +7 -0
- package/dist/dialogs/error-modal-element.js +54 -0
- package/dist/dialogs/error-modal-token.d.ts +9 -0
- package/dist/dialogs/error-modal-token.js +6 -0
- package/dist/dialogs/index.d.ts +6 -0
- package/dist/dialogs/index.js +6 -0
- package/dist/dialogs/legacy-modal-element.d.ts +13 -0
- package/dist/dialogs/legacy-modal-element.js +78 -0
- package/dist/dialogs/manifest.d.ts +1 -0
- package/dist/dialogs/manifest.js +25 -0
- package/dist/dialogs/single-import-modal.element.d.ts +13 -0
- package/dist/dialogs/single-import-modal.element.js +105 -0
- package/dist/dialogs/single-import-modal.token.d.ts +9 -0
- package/dist/dialogs/single-import-modal.token.js +6 -0
- package/dist/exports.d.ts +10 -0
- package/dist/exports.js +10 -0
- package/dist/external/signalr/index.d.ts +1 -0
- package/dist/external/signalr/index.js +1 -0
- package/dist/hey-api.d.ts +11 -0
- package/dist/hey-api.js +14 -0
- package/dist/icons/icons.d.ts +5 -0
- package/dist/icons/icons.js +6 -0
- package/dist/icons/manifest.d.ts +1 -0
- package/dist/icons/manifest.js +7 -0
- package/dist/icons/svg/logo.d.ts +2 -0
- package/dist/icons/svg/logo.js +21 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +11 -0
- package/dist/lang/files/da-dk.d.ts +130 -0
- package/dist/lang/files/da-dk.js +141 -0
- package/dist/lang/files/de-de.d.ts +130 -0
- package/dist/lang/files/de-de.js +141 -0
- package/dist/lang/files/en-us.d.ts +161 -0
- package/dist/lang/files/en-us.js +172 -0
- package/dist/lang/files/es-es.d.ts +130 -0
- package/dist/lang/files/es-es.js +141 -0
- package/dist/lang/files/fr-fr.d.ts +130 -0
- package/dist/lang/files/fr-fr.js +141 -0
- package/dist/lang/files/nl-nl.d.ts +130 -0
- package/dist/lang/files/nl-nl.js +141 -0
- package/dist/lang/manifest.d.ts +1 -0
- package/dist/lang/manifest.js +63 -0
- package/dist/manifests.d.ts +1 -0
- package/dist/manifests.js +14 -0
- package/dist/repository/SyncAction.respositoy.d.ts +101 -0
- package/dist/repository/SyncAction.respositoy.js +125 -0
- package/dist/repository/index.d.ts +4 -0
- package/dist/repository/index.js +4 -0
- package/dist/repository/sources/SyncAction.source.d.ts +37 -0
- package/dist/repository/sources/SyncAction.source.js +57 -0
- package/dist/repository/sources/SyncMigration.source.d.ts +13 -0
- package/dist/repository/sources/SyncMigration.source.js +30 -0
- package/dist/repository/sources/SyncSettings.source.d.ts +23 -0
- package/dist/repository/sources/SyncSettings.source.js +33 -0
- package/dist/signalr/index.d.ts +3 -0
- package/dist/signalr/index.js +3 -0
- package/dist/signalr/signalr-reconnect-policy.d.ts +11 -0
- package/dist/signalr/signalr-reconnect-policy.js +14 -0
- package/dist/signalr/signalr.context.d.ts +34 -0
- package/dist/signalr/signalr.context.js +110 -0
- package/dist/signalr/signalr.context.token.d.ts +3 -0
- package/dist/signalr/signalr.context.token.js +2 -0
- package/dist/signalr/types.d.ts +21 -0
- package/dist/signalr/types.js +1 -0
- package/dist/tree/constants.d.ts +1 -0
- package/dist/tree/constants.js +1 -0
- package/dist/tree/index.d.ts +2 -0
- package/dist/tree/index.js +2 -0
- package/dist/tree/manifest.d.ts +1 -0
- package/dist/tree/manifest.js +92 -0
- package/dist/tree/types.d.ts +14 -0
- package/dist/tree/types.js +1 -0
- package/dist/tree/usync.menu-element.d.ts +13 -0
- package/dist/tree/usync.menu-element.js +74 -0
- package/dist/utils/diff/change-name.d.ts +13 -0
- package/dist/utils/diff/change-name.js +30 -0
- package/dist/utils/diff/classify-change.d.ts +21 -0
- package/dist/utils/diff/classify-change.js +111 -0
- package/dist/utils/diff/deep-equal.d.ts +13 -0
- package/dist/utils/diff/deep-equal.js +57 -0
- package/dist/utils/diff/format-value.d.ts +36 -0
- package/dist/utils/diff/format-value.js +88 -0
- package/dist/utils/diff/index.d.ts +7 -0
- package/dist/utils/diff/index.js +7 -0
- package/dist/utils/diff/json-diff.d.ts +34 -0
- package/dist/utils/diff/json-diff.js +300 -0
- package/dist/utils/diff/line-diff.d.ts +16 -0
- package/dist/utils/diff/line-diff.js +199 -0
- package/dist/utils/diff/types.d.ts +62 -0
- package/dist/utils/diff/types.js +12 -0
- package/dist/workspace/components/events.d.ts +31 -0
- package/dist/workspace/components/events.js +54 -0
- package/dist/workspace/components/index.d.ts +3 -0
- package/dist/workspace/components/index.js +3 -0
- package/dist/workspace/components/usync-action-button.d.ts +19 -0
- package/dist/workspace/components/usync-action-button.js +113 -0
- package/dist/workspace/components/usync-file-picker.element.d.ts +23 -0
- package/dist/workspace/components/usync-file-picker.element.js +106 -0
- package/dist/workspace/components/usync-file-upload.element.d.ts +21 -0
- package/dist/workspace/components/usync-file-upload.element.js +121 -0
- package/dist/workspace/dialogs/import-modal.element.d.ts +11 -0
- package/dist/workspace/dialogs/import-modal.element.js +75 -0
- package/dist/workspace/dialogs/import-modal.token.d.ts +6 -0
- package/dist/workspace/dialogs/import-modal.token.js +6 -0
- package/dist/workspace/dialogs/index.d.ts +2 -0
- package/dist/workspace/dialogs/index.js +2 -0
- package/dist/workspace/dialogs/manifest.d.ts +1 -0
- package/dist/workspace/dialogs/manifest.js +7 -0
- package/dist/workspace/index.d.ts +3 -0
- package/dist/workspace/index.js +3 -0
- package/dist/workspace/manifest.d.ts +3 -0
- package/dist/workspace/manifest.js +112 -0
- package/dist/workspace/types.d.ts +12 -0
- package/dist/workspace/types.js +1 -0
- package/dist/workspace/views/addons/addons.element.d.ts +7 -0
- package/dist/workspace/views/addons/addons.element.js +117 -0
- package/dist/workspace/views/default/default.element.d.ts +31 -0
- package/dist/workspace/views/default/default.element.js +466 -0
- package/dist/workspace/views/legacy/legacy.element.d.ts +14 -0
- package/dist/workspace/views/legacy/legacy.element.js +187 -0
- package/dist/workspace/views/settings/components/usyncSettingItem.element.d.ts +15 -0
- package/dist/workspace/views/settings/components/usyncSettingItem.element.js +96 -0
- package/dist/workspace/views/settings/settings.element.d.ts +17 -0
- package/dist/workspace/views/settings/settings.element.js +174 -0
- package/dist/workspace/workspace.context.d.ts +74 -0
- package/dist/workspace/workspace.context.js +448 -0
- package/dist/workspace/workspace.element.d.ts +17 -0
- package/dist/workspace/workspace.element.js +69 -0
- package/package.json +70 -6
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _uSyncActionRepository_actionDataSource, _uSyncActionRepository_settingsDataSource, _uSyncActionRepository_migrartionDataSource;
|
|
13
|
+
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
|
14
|
+
import { uSyncActionDataSource, USyncSettingsDataSource, uSyncMigrationDataSource, } from '@jumoo/uSync';
|
|
15
|
+
/**
|
|
16
|
+
* Repository for all things actions.
|
|
17
|
+
*/
|
|
18
|
+
export class uSyncActionRepository extends UmbControllerBase {
|
|
19
|
+
constructor(host) {
|
|
20
|
+
super(host);
|
|
21
|
+
_uSyncActionRepository_actionDataSource.set(this, void 0);
|
|
22
|
+
_uSyncActionRepository_settingsDataSource.set(this, void 0);
|
|
23
|
+
_uSyncActionRepository_migrartionDataSource.set(this, void 0);
|
|
24
|
+
__classPrivateFieldSet(this, _uSyncActionRepository_actionDataSource, new uSyncActionDataSource(this), "f");
|
|
25
|
+
__classPrivateFieldSet(this, _uSyncActionRepository_settingsDataSource, new USyncSettingsDataSource(this), "f");
|
|
26
|
+
__classPrivateFieldSet(this, _uSyncActionRepository_migrartionDataSource, new uSyncMigrationDataSource(this), "f");
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get the list of possible actions from the server
|
|
30
|
+
* @returns Promise
|
|
31
|
+
*/
|
|
32
|
+
async getActions(setName) {
|
|
33
|
+
return __classPrivateFieldGet(this, _uSyncActionRepository_actionDataSource, "f").getActionsBySet(setName);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Request of the action to perform
|
|
37
|
+
* @returns PerformActionResponse.
|
|
38
|
+
*/
|
|
39
|
+
async performAction(request) {
|
|
40
|
+
return __classPrivateFieldGet(this, _uSyncActionRepository_actionDataSource, "f").performAction({
|
|
41
|
+
requestId: request.id,
|
|
42
|
+
action: request.action,
|
|
43
|
+
options: {
|
|
44
|
+
group: request.group,
|
|
45
|
+
force: request.force ?? false,
|
|
46
|
+
clean: request.clean ?? false,
|
|
47
|
+
files: request.file ?? false,
|
|
48
|
+
clientId: request.clientId,
|
|
49
|
+
set: request.set ?? 'Default',
|
|
50
|
+
},
|
|
51
|
+
stepNumber: request.step,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Retreives the current uSync settings
|
|
56
|
+
* @returns the current uSync settings
|
|
57
|
+
*/
|
|
58
|
+
async getSettings() {
|
|
59
|
+
return await __classPrivateFieldGet(this, _uSyncActionRepository_settingsDataSource, "f").getSettings();
|
|
60
|
+
}
|
|
61
|
+
async getAddons() {
|
|
62
|
+
return await __classPrivateFieldGet(this, _uSyncActionRepository_settingsDataSource, "f").getAddons();
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Get the handler settings based on the set.
|
|
66
|
+
* @param setName name of the handler set in the configuration
|
|
67
|
+
* @returns the settings for the named handler set.
|
|
68
|
+
*/
|
|
69
|
+
async getHandlerSettings(setName) {
|
|
70
|
+
return await __classPrivateFieldGet(this, _uSyncActionRepository_settingsDataSource, "f").getHandlerSettings(setName);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Checks to see if there are legacy datatypes on disk.
|
|
74
|
+
* @returns results of a check for legacy files
|
|
75
|
+
*/
|
|
76
|
+
async checkLegacy() {
|
|
77
|
+
return await __classPrivateFieldGet(this, _uSyncActionRepository_migrartionDataSource, "f").checkLegacy();
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* sets a .ignore folder in the legacy folder so we don't detect it next time.
|
|
81
|
+
* @returns true if the legacy folder is ignored.
|
|
82
|
+
*/
|
|
83
|
+
async ignoreLegacy() {
|
|
84
|
+
return await __classPrivateFieldGet(this, _uSyncActionRepository_migrartionDataSource, "f").ignoreLegacy();
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* copies the legacy folder to the new v14 folder.
|
|
88
|
+
* @returns true if the legacy folder is copied to the new folder.
|
|
89
|
+
*/
|
|
90
|
+
async copyLegacy() {
|
|
91
|
+
return await __classPrivateFieldGet(this, _uSyncActionRepository_migrartionDataSource, "f").copyLegacy();
|
|
92
|
+
}
|
|
93
|
+
async downloadFile() {
|
|
94
|
+
var result = await __classPrivateFieldGet(this, _uSyncActionRepository_actionDataSource, "f").downloadFile();
|
|
95
|
+
console.log('Download result', result);
|
|
96
|
+
return result.data;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Poll the status of a background operation.
|
|
100
|
+
* @param operationId the operation id returned from performAction when inBackground is true
|
|
101
|
+
*/
|
|
102
|
+
async getOperationStatus(operationId) {
|
|
103
|
+
return await __classPrivateFieldGet(this, _uSyncActionRepository_actionDataSource, "f").getOperationStatus(operationId);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Ask the server if there is a background run currently active -
|
|
107
|
+
* used to reattach to a run this client didn't itself start (e.g. after a reload).
|
|
108
|
+
*/
|
|
109
|
+
async getRunningOperation() {
|
|
110
|
+
return await __classPrivateFieldGet(this, _uSyncActionRepository_actionDataSource, "f").getRunningOperation();
|
|
111
|
+
}
|
|
112
|
+
async processUpload(fileId) {
|
|
113
|
+
return (await __classPrivateFieldGet(this, _uSyncActionRepository_actionDataSource, "f").processUpload(fileId)).data;
|
|
114
|
+
}
|
|
115
|
+
async getSets() {
|
|
116
|
+
return await __classPrivateFieldGet(this, _uSyncActionRepository_settingsDataSource, "f").getSets();
|
|
117
|
+
}
|
|
118
|
+
async importSingle(action) {
|
|
119
|
+
return await __classPrivateFieldGet(this, _uSyncActionRepository_actionDataSource, "f").importSingle(action);
|
|
120
|
+
}
|
|
121
|
+
async getSyncFileInfo() {
|
|
122
|
+
return await __classPrivateFieldGet(this, _uSyncActionRepository_actionDataSource, "f").getSyncFileInfo();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
_uSyncActionRepository_actionDataSource = new WeakMap(), _uSyncActionRepository_settingsDataSource = new WeakMap(), _uSyncActionRepository_migrartionDataSource = new WeakMap();
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
2
|
+
import { UmbDataSourceResponse } from '@umbraco-cms/backoffice/repository';
|
|
3
|
+
import { PerformActionRequest, PerformActionResponse, SyncActionGroup, SyncOperationStatusResponse, SyncRunningOperationResponse, USyncActionView } from '@jumoo/uSync';
|
|
4
|
+
export interface SyncActionDataSource {
|
|
5
|
+
getActionsBySet(setName: string): Promise<UmbDataSourceResponse<unknown>>;
|
|
6
|
+
performAction(request: PerformActionRequest): Promise<UmbDataSourceResponse<PerformActionResponse>>;
|
|
7
|
+
getOperationStatus(operationId: string): Promise<UmbDataSourceResponse<SyncOperationStatusResponse>>;
|
|
8
|
+
getRunningOperation(): Promise<UmbDataSourceResponse<SyncRunningOperationResponse>>;
|
|
9
|
+
}
|
|
10
|
+
export declare class uSyncActionDataSource implements SyncActionDataSource {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(host: UmbControllerHost);
|
|
13
|
+
getSyncFileInfo(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
14
|
+
data: import("@jumoo/uSync").SyncFileVersionCheckResult;
|
|
15
|
+
request: Request;
|
|
16
|
+
response: Response;
|
|
17
|
+
}>>;
|
|
18
|
+
getActionsBySet(setName: string): Promise<UmbDataSourceResponse<Array<SyncActionGroup>>>;
|
|
19
|
+
performAction(request: PerformActionRequest): Promise<UmbDataSourceResponse<PerformActionResponse>>;
|
|
20
|
+
downloadFile(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
21
|
+
data: Blob | File;
|
|
22
|
+
request: Request;
|
|
23
|
+
response: Response;
|
|
24
|
+
}>>;
|
|
25
|
+
getOperationStatus(operationId: string): Promise<UmbDataSourceResponse<SyncOperationStatusResponse>>;
|
|
26
|
+
getRunningOperation(): Promise<UmbDataSourceResponse<SyncRunningOperationResponse>>;
|
|
27
|
+
processUpload(fileId: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
28
|
+
data: import("@jumoo/uSync").UploadImportResult;
|
|
29
|
+
request: Request;
|
|
30
|
+
response: Response;
|
|
31
|
+
}>>;
|
|
32
|
+
importSingle(view: USyncActionView): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
33
|
+
data: USyncActionView;
|
|
34
|
+
request: Request;
|
|
35
|
+
response: Response;
|
|
36
|
+
}>>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _uSyncActionDataSource_host;
|
|
13
|
+
import { tryExecute } from '@umbraco-cms/backoffice/resources';
|
|
14
|
+
import { ActionsService, } from '@jumoo/uSync';
|
|
15
|
+
export class uSyncActionDataSource {
|
|
16
|
+
constructor(host) {
|
|
17
|
+
_uSyncActionDataSource_host.set(this, void 0);
|
|
18
|
+
__classPrivateFieldSet(this, _uSyncActionDataSource_host, host, "f");
|
|
19
|
+
}
|
|
20
|
+
async getSyncFileInfo() {
|
|
21
|
+
return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.getSyncFileInfo());
|
|
22
|
+
}
|
|
23
|
+
async getActionsBySet(setName) {
|
|
24
|
+
return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.getActionsBySet({
|
|
25
|
+
query: { setName: setName },
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
async performAction(request) {
|
|
29
|
+
return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.performAction({
|
|
30
|
+
body: request,
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
async downloadFile() {
|
|
34
|
+
return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.download());
|
|
35
|
+
}
|
|
36
|
+
async getOperationStatus(operationId) {
|
|
37
|
+
return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.status({
|
|
38
|
+
query: { operationId: operationId },
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
async getRunningOperation() {
|
|
42
|
+
return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.running());
|
|
43
|
+
}
|
|
44
|
+
async processUpload(fileId) {
|
|
45
|
+
return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.processUpload({
|
|
46
|
+
query: {
|
|
47
|
+
tempKey: fileId,
|
|
48
|
+
},
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
async importSingle(view) {
|
|
52
|
+
return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.importSingle({
|
|
53
|
+
body: view,
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
_uSyncActionDataSource_host = new WeakMap();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
2
|
+
import { UmbDataSourceResponse } from '@umbraco-cms/backoffice/repository';
|
|
3
|
+
import { SyncLegacyCheckResponse } from '@jumoo/uSync';
|
|
4
|
+
export interface SyncMigrationDataSource {
|
|
5
|
+
checkLegacy(): Promise<UmbDataSourceResponse<SyncLegacyCheckResponse>>;
|
|
6
|
+
}
|
|
7
|
+
export declare class uSyncMigrationDataSource {
|
|
8
|
+
#private;
|
|
9
|
+
constructor(host: UmbControllerHost);
|
|
10
|
+
checkLegacy(): Promise<UmbDataSourceResponse<SyncLegacyCheckResponse>>;
|
|
11
|
+
ignoreLegacy(): Promise<UmbDataSourceResponse<boolean>>;
|
|
12
|
+
copyLegacy(): Promise<UmbDataSourceResponse<boolean>>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _uSyncMigrationDataSource_host;
|
|
13
|
+
import { MigrationsService } from '@jumoo/uSync';
|
|
14
|
+
import { tryExecute } from '@umbraco-cms/backoffice/resources';
|
|
15
|
+
export class uSyncMigrationDataSource {
|
|
16
|
+
constructor(host) {
|
|
17
|
+
_uSyncMigrationDataSource_host.set(this, void 0);
|
|
18
|
+
__classPrivateFieldSet(this, _uSyncMigrationDataSource_host, host, "f");
|
|
19
|
+
}
|
|
20
|
+
async checkLegacy() {
|
|
21
|
+
return await tryExecute(__classPrivateFieldGet(this, _uSyncMigrationDataSource_host, "f"), MigrationsService.checkLegacy());
|
|
22
|
+
}
|
|
23
|
+
async ignoreLegacy() {
|
|
24
|
+
return await tryExecute(__classPrivateFieldGet(this, _uSyncMigrationDataSource_host, "f"), MigrationsService.ignoreLegacy());
|
|
25
|
+
}
|
|
26
|
+
async copyLegacy() {
|
|
27
|
+
return await tryExecute(__classPrivateFieldGet(this, _uSyncMigrationDataSource_host, "f"), MigrationsService.copyLegacy());
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
_uSyncMigrationDataSource_host = new WeakMap();
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { UmbDataSourceResponse } from '@umbraco-cms/backoffice/repository';
|
|
2
|
+
import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
3
|
+
import { USyncHandlerSetSettings, USyncSettings } from '@jumoo/uSync';
|
|
4
|
+
export interface SyncSettingsDataSource {
|
|
5
|
+
getSettings(): Promise<UmbDataSourceResponse<USyncSettings>>;
|
|
6
|
+
getHandlerSettings(setName: string): Promise<UmbDataSourceResponse<USyncHandlerSetSettings>>;
|
|
7
|
+
}
|
|
8
|
+
export declare class USyncSettingsDataSource implements SyncSettingsDataSource {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(host: UmbControllerHost);
|
|
11
|
+
getSettings(): Promise<UmbDataSourceResponse<USyncSettings>>;
|
|
12
|
+
getHandlerSettings(setName: string): Promise<UmbDataSourceResponse<USyncHandlerSetSettings>>;
|
|
13
|
+
getAddons(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
14
|
+
data: import("@jumoo/uSync").USyncAddonInfo;
|
|
15
|
+
request: Request;
|
|
16
|
+
response: Response;
|
|
17
|
+
}>>;
|
|
18
|
+
getSets(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
19
|
+
data: import("@jumoo/uSync").SyncSelectableSet[];
|
|
20
|
+
request: Request;
|
|
21
|
+
response: Response;
|
|
22
|
+
}>>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _USyncSettingsDataSource_host;
|
|
13
|
+
import { tryExecute } from '@umbraco-cms/backoffice/resources';
|
|
14
|
+
import { SettingsService } from '@jumoo/uSync';
|
|
15
|
+
export class USyncSettingsDataSource {
|
|
16
|
+
constructor(host) {
|
|
17
|
+
_USyncSettingsDataSource_host.set(this, void 0);
|
|
18
|
+
__classPrivateFieldSet(this, _USyncSettingsDataSource_host, host, "f");
|
|
19
|
+
}
|
|
20
|
+
async getSettings() {
|
|
21
|
+
return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"), SettingsService.getSettings());
|
|
22
|
+
}
|
|
23
|
+
async getHandlerSettings(setName) {
|
|
24
|
+
return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"), SettingsService.getHandlerSetSettings({ query: { id: setName } }));
|
|
25
|
+
}
|
|
26
|
+
async getAddons() {
|
|
27
|
+
return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"), SettingsService.getAddOns());
|
|
28
|
+
}
|
|
29
|
+
async getSets() {
|
|
30
|
+
return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"), SettingsService.getSets());
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
_USyncSettingsDataSource_host = new WeakMap();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IRetryPolicy, RetryContext } from '@jumoo/uSync/external/signalr';
|
|
2
|
+
/**
|
|
3
|
+
* Reconnects indefinitely with a capped backoff.
|
|
4
|
+
*
|
|
5
|
+
* Local copy of Umbraco's UmbSignalRReconnectPolicy (added in 17.8), because
|
|
6
|
+
* importing it from the backoffice breaks on 17.3 - 17.7. The default
|
|
7
|
+
* `withAutomaticReconnect()` policy gives up after ~40 seconds.
|
|
8
|
+
*/
|
|
9
|
+
export declare class uSyncSignalRReconnectPolicy implements IRetryPolicy {
|
|
10
|
+
nextRetryDelayInMilliseconds(retryContext: RetryContext): number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const RECONNECT_DELAYS_MS = [0, 2000, 5000, 10000];
|
|
2
|
+
const MAX_RECONNECT_DELAY_MS = 30000;
|
|
3
|
+
/**
|
|
4
|
+
* Reconnects indefinitely with a capped backoff.
|
|
5
|
+
*
|
|
6
|
+
* Local copy of Umbraco's UmbSignalRReconnectPolicy (added in 17.8), because
|
|
7
|
+
* importing it from the backoffice breaks on 17.3 - 17.7. The default
|
|
8
|
+
* `withAutomaticReconnect()` policy gives up after ~40 seconds.
|
|
9
|
+
*/
|
|
10
|
+
export class uSyncSignalRReconnectPolicy {
|
|
11
|
+
nextRetryDelayInMilliseconds(retryContext) {
|
|
12
|
+
return RECONNECT_DELAYS_MS[retryContext.previousRetryCount] ?? MAX_RECONNECT_DELAY_MS;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
|
2
|
+
import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
3
|
+
import { SyncUpdateMessage, SyncProgressSummary, SyncCompleteMessage } from '@jumoo/uSync';
|
|
4
|
+
export declare class uSyncSignalRContext extends UmbControllerBase {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(host: UmbControllerHost);
|
|
7
|
+
hostConnected(): void;
|
|
8
|
+
hostDisconnected(): void;
|
|
9
|
+
getClientId(): string | null;
|
|
10
|
+
/**
|
|
11
|
+
* Synchronous read of the current connection state - used by callers
|
|
12
|
+
* (e.g. status polling) that need to decide whether to fall back to a
|
|
13
|
+
* server round-trip right now, rather than subscribing to the observable.
|
|
14
|
+
*/
|
|
15
|
+
getConnected(): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Publish an update message sourced from status polling rather than a
|
|
18
|
+
* live SignalR push - shares the same `update` state/observable that
|
|
19
|
+
* `usync-progress-box` already renders, so a background run whose socket
|
|
20
|
+
* isn't delivering (e.g. pinned to a different server under a
|
|
21
|
+
* load-balanced backoffice) still shows *something* under the handler
|
|
22
|
+
* icons instead of leaving the message blank/stale for the whole run.
|
|
23
|
+
* Coarser than a real push - polling only knows the per-handler-step
|
|
24
|
+
* message ("Processing Import"/"Completed"), not per-item progress - so
|
|
25
|
+
* count/total are left at a fixed 0/1 rather than implying granularity
|
|
26
|
+
* we don't have.
|
|
27
|
+
*/
|
|
28
|
+
setPolledUpdate(message: string): void;
|
|
29
|
+
readonly connected: import("rxjs").Observable<boolean>;
|
|
30
|
+
readonly update: import("rxjs").Observable<SyncUpdateMessage | undefined>;
|
|
31
|
+
readonly add: import("rxjs").Observable<SyncProgressSummary | undefined>;
|
|
32
|
+
readonly complete: import("rxjs").Observable<SyncCompleteMessage | undefined>;
|
|
33
|
+
}
|
|
34
|
+
export default uSyncSignalRContext;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
7
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
10
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
|
+
};
|
|
12
|
+
var _uSyncSignalRContext_instances, _uSyncSignalRContext_connection, _uSyncSignalRContext_connected, _uSyncSignalRContext_update, _uSyncSignalRContext_add, _uSyncSignalRContext_complete, _uSyncSignalRContext_setupConnection;
|
|
13
|
+
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
|
14
|
+
import { UmbObjectState } from '@umbraco-cms/backoffice/observable-api';
|
|
15
|
+
import { USYNC_SIGNALR_CONTEXT_TOKEN, } from '@jumoo/uSync';
|
|
16
|
+
import { UMB_AUTH_CONTEXT } from '@umbraco-cms/backoffice/auth';
|
|
17
|
+
import * as signalR from '@jumoo/uSync/external/signalr';
|
|
18
|
+
import { uSyncSignalRReconnectPolicy } from './signalr-reconnect-policy.js';
|
|
19
|
+
export class uSyncSignalRContext extends UmbControllerBase {
|
|
20
|
+
constructor(host) {
|
|
21
|
+
super(host);
|
|
22
|
+
_uSyncSignalRContext_instances.add(this);
|
|
23
|
+
_uSyncSignalRContext_connection.set(this, void 0);
|
|
24
|
+
_uSyncSignalRContext_connected.set(this, new UmbObjectState(false));
|
|
25
|
+
this.connected = __classPrivateFieldGet(this, _uSyncSignalRContext_connected, "f").asObservable();
|
|
26
|
+
_uSyncSignalRContext_update.set(this, new UmbObjectState(undefined));
|
|
27
|
+
this.update = __classPrivateFieldGet(this, _uSyncSignalRContext_update, "f").asObservable();
|
|
28
|
+
_uSyncSignalRContext_add.set(this, new UmbObjectState(undefined));
|
|
29
|
+
this.add = __classPrivateFieldGet(this, _uSyncSignalRContext_add, "f").asObservable();
|
|
30
|
+
_uSyncSignalRContext_complete.set(this, new UmbObjectState(undefined));
|
|
31
|
+
this.complete = __classPrivateFieldGet(this, _uSyncSignalRContext_complete, "f").asObservable();
|
|
32
|
+
this.provideContext(USYNC_SIGNALR_CONTEXT_TOKEN, this);
|
|
33
|
+
this.consumeContext(UMB_AUTH_CONTEXT, (auth) => {
|
|
34
|
+
if (!auth)
|
|
35
|
+
return;
|
|
36
|
+
const authConfig = auth?.getOpenApiConfiguration();
|
|
37
|
+
if (!authConfig)
|
|
38
|
+
return;
|
|
39
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_instances, "m", _uSyncSignalRContext_setupConnection).call(this, '/umbraco/SyncHub', auth);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
hostConnected() {
|
|
43
|
+
super.hostConnected();
|
|
44
|
+
}
|
|
45
|
+
hostDisconnected() {
|
|
46
|
+
super.hostDisconnected();
|
|
47
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_connection, "f")?.stop().then(() => {
|
|
48
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_connected, "f").setValue(false);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
getClientId() {
|
|
52
|
+
return __classPrivateFieldGet(this, _uSyncSignalRContext_connection, "f")?.connectionId ?? null;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Synchronous read of the current connection state - used by callers
|
|
56
|
+
* (e.g. status polling) that need to decide whether to fall back to a
|
|
57
|
+
* server round-trip right now, rather than subscribing to the observable.
|
|
58
|
+
*/
|
|
59
|
+
getConnected() {
|
|
60
|
+
return __classPrivateFieldGet(this, _uSyncSignalRContext_connected, "f").getValue() ?? false;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Publish an update message sourced from status polling rather than a
|
|
64
|
+
* live SignalR push - shares the same `update` state/observable that
|
|
65
|
+
* `usync-progress-box` already renders, so a background run whose socket
|
|
66
|
+
* isn't delivering (e.g. pinned to a different server under a
|
|
67
|
+
* load-balanced backoffice) still shows *something* under the handler
|
|
68
|
+
* icons instead of leaving the message blank/stale for the whole run.
|
|
69
|
+
* Coarser than a real push - polling only knows the per-handler-step
|
|
70
|
+
* message ("Processing Import"/"Completed"), not per-item progress - so
|
|
71
|
+
* count/total are left at a fixed 0/1 rather than implying granularity
|
|
72
|
+
* we don't have.
|
|
73
|
+
*/
|
|
74
|
+
setPolledUpdate(message) {
|
|
75
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_update, "f").setValue({ message, count: 0, total: 1 });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
_uSyncSignalRContext_connection = new WeakMap(), _uSyncSignalRContext_connected = new WeakMap(), _uSyncSignalRContext_update = new WeakMap(), _uSyncSignalRContext_add = new WeakMap(), _uSyncSignalRContext_complete = new WeakMap(), _uSyncSignalRContext_instances = new WeakSet(), _uSyncSignalRContext_setupConnection = function _uSyncSignalRContext_setupConnection(url, auth) {
|
|
79
|
+
// the token is fetched on every (re)connect, so a reconnect after
|
|
80
|
+
// the original token has expired still authenticates.
|
|
81
|
+
__classPrivateFieldSet(this, _uSyncSignalRContext_connection, new signalR.HubConnectionBuilder()
|
|
82
|
+
.withUrl(url, { accessTokenFactory: () => auth.getLatestToken() })
|
|
83
|
+
.withAutomaticReconnect(new uSyncSignalRReconnectPolicy())
|
|
84
|
+
.configureLogging(signalR.LogLevel.Warning)
|
|
85
|
+
.build(), "f");
|
|
86
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_connection, "f").on('add', (data) => {
|
|
87
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_add, "f").setValue(data);
|
|
88
|
+
});
|
|
89
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_connection, "f").on('update', (data) => {
|
|
90
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_update, "f").setValue(data);
|
|
91
|
+
});
|
|
92
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_connection, "f").on('complete', (data) => {
|
|
93
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_complete, "f").setValue(data);
|
|
94
|
+
});
|
|
95
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_connection, "f").start().then(() => {
|
|
96
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_connected, "f").setValue(true);
|
|
97
|
+
});
|
|
98
|
+
// the client id changes on reconnect, requests made after this
|
|
99
|
+
// pick up the new one via getClientId().
|
|
100
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_connection, "f").onreconnecting(() => {
|
|
101
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_connected, "f").setValue(false);
|
|
102
|
+
});
|
|
103
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_connection, "f").onreconnected(() => {
|
|
104
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_connected, "f").setValue(true);
|
|
105
|
+
});
|
|
106
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_connection, "f").onclose(() => {
|
|
107
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_connected, "f").setValue(false);
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
export default uSyncSignalRContext;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SyncHandlerSummary, USyncActionView } from '../api';
|
|
2
|
+
/**
|
|
3
|
+
* @description format of the update message coming from uSync via SignalR.
|
|
4
|
+
*/
|
|
5
|
+
export type SyncUpdateMessage = {
|
|
6
|
+
message: string;
|
|
7
|
+
count: number;
|
|
8
|
+
total: number;
|
|
9
|
+
};
|
|
10
|
+
export type SyncProgressSummary = {
|
|
11
|
+
count: number;
|
|
12
|
+
total: number;
|
|
13
|
+
message: string;
|
|
14
|
+
handlers: Array<SyncHandlerSummary>;
|
|
15
|
+
};
|
|
16
|
+
export type SyncCompleteMessage = {
|
|
17
|
+
id: string;
|
|
18
|
+
success: boolean;
|
|
19
|
+
message: string;
|
|
20
|
+
actions?: Array<USyncActionView>;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const USYNC_SECTION_ALIAS = "usync.section";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const USYNC_SECTION_ALIAS = 'usync.section';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const manifests: (import("@umbraco-cms/backoffice/menu").ManifestMenu | import("@umbraco-cms/backoffice/menu").ManifestMenuItem | import("@umbraco-cms/backoffice/section").ManifestSectionSidebarApp)[];
|