@jumoo/usync 17.5.1 → 19.0.0-beta01

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 (44) hide show
  1. package/dist/api/client.gen.js +1 -2
  2. package/dist/api/index.d.ts +2 -3
  3. package/dist/api/index.js +1 -2
  4. package/dist/api/sdk.gen.d.ts +18 -30
  5. package/dist/api/sdk.gen.js +97 -145
  6. package/dist/api/types.gen.d.ts +132 -117
  7. package/dist/components/usync-action-box.js +15 -5
  8. package/dist/components/usync-progress-box.js +13 -5
  9. package/dist/components/usync-result-row.js +4 -0
  10. package/dist/components/usync-results-group-view.js +11 -3
  11. package/dist/components/usync-results-view.js +1 -0
  12. package/dist/conditions/new-section.condition.js +16 -2
  13. package/dist/constants.js +1 -1
  14. package/dist/dialogs/details-modal-element.js +16 -8
  15. package/dist/dialogs/error-modal-element.js +1 -0
  16. package/dist/dialogs/legacy-modal-element.d.ts +11 -5
  17. package/dist/dialogs/legacy-modal-element.js +79 -27
  18. package/dist/dialogs/single-import-modal.element.js +2 -1
  19. package/dist/index.js +9 -1
  20. package/dist/lang/files/da-dk.js +1 -1
  21. package/dist/lang/files/de-de.js +1 -1
  22. package/dist/lang/files/en-us.d.ts +1 -0
  23. package/dist/lang/files/en-us.js +2 -1
  24. package/dist/lang/files/es-es.js +1 -1
  25. package/dist/lang/files/fr-fr.js +1 -1
  26. package/dist/lang/files/nl-nl.js +1 -1
  27. package/dist/repository/SyncAction.respositoy.d.ts +36 -15
  28. package/dist/repository/SyncAction.respositoy.js +3 -2
  29. package/dist/repository/sources/SyncAction.source.d.ts +33 -13
  30. package/dist/repository/sources/SyncAction.source.js +9 -9
  31. package/dist/repository/sources/SyncMigration.source.d.ts +1 -1
  32. package/dist/repository/sources/SyncMigration.source.js +5 -5
  33. package/dist/repository/sources/SyncSettings.source.d.ts +16 -6
  34. package/dist/repository/sources/SyncSettings.source.js +5 -5
  35. package/dist/signalr/signalr.context.js +5 -5
  36. package/dist/workspace/components/usync-action-button.d.ts +3 -2
  37. package/dist/workspace/components/usync-action-button.js +35 -27
  38. package/dist/workspace/views/default/default.element.js +3 -3
  39. package/dist/workspace/views/legacy/legacy.element.js +6 -10
  40. package/dist/workspace/workspace.context.d.ts +11 -6
  41. package/dist/workspace/workspace.context.js +2 -2
  42. package/package.json +10 -3
  43. package/dist/hey-api.d.ts +0 -11
  44. package/dist/hey-api.js +0 -14
@@ -9,10 +9,11 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
9
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
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
- var _SyncNewSectionCondition_instances, _SyncNewSectionCondition_currentSection, _SyncNewSectionCondition_allSections, _SyncNewSectionCondition_checkPermission;
12
+ var _SyncNewSectionCondition_instances, _SyncNewSectionCondition_currentSection, _SyncNewSectionCondition_allSections, _SyncNewSectionCondition_userSections, _SyncNewSectionCondition_checkPermission;
13
13
  import { UmbExtensionsManifestInitializer, } from '@umbraco-cms/backoffice/extension-api';
14
14
  import { UmbConditionBase, umbExtensionsRegistry, } from '@umbraco-cms/backoffice/extension-registry';
15
15
  import { UMB_SECTION_CONTEXT } from '@umbraco-cms/backoffice/section';
16
+ import { UMB_CURRENT_USER_CONTEXT } from '@umbraco-cms/backoffice/current-user';
16
17
  import { USYNC_SECTION_ALIAS } from '../tree/constants';
17
18
  export class SyncNewSectionCondition extends UmbConditionBase {
18
19
  constructor(host, args) {
@@ -20,10 +21,19 @@ export class SyncNewSectionCondition extends UmbConditionBase {
20
21
  _SyncNewSectionCondition_instances.add(this);
21
22
  _SyncNewSectionCondition_currentSection.set(this, void 0);
22
23
  _SyncNewSectionCondition_allSections.set(this, void 0);
24
+ _SyncNewSectionCondition_userSections.set(this, void 0);
23
25
  new UmbExtensionsManifestInitializer(this, umbExtensionsRegistry, 'section', () => true, async (sections) => {
24
26
  __classPrivateFieldSet(this, _SyncNewSectionCondition_allSections, sections.map((section) => section.alias), "f");
25
27
  this.permitted = __classPrivateFieldGet(this, _SyncNewSectionCondition_instances, "m", _SyncNewSectionCondition_checkPermission).call(this);
26
28
  }, 'uSyncAllSectionsManifestFilter');
29
+ this.consumeContext(UMB_CURRENT_USER_CONTEXT, (_context) => {
30
+ if (!_context)
31
+ return;
32
+ this.observe(_context.allowedSections, (_sections) => {
33
+ __classPrivateFieldSet(this, _SyncNewSectionCondition_userSections, _sections, "f");
34
+ this.permitted = __classPrivateFieldGet(this, _SyncNewSectionCondition_instances, "m", _SyncNewSectionCondition_checkPermission).call(this);
35
+ });
36
+ });
27
37
  this.consumeContext(UMB_SECTION_CONTEXT, (_context) => {
28
38
  if (!_context)
29
39
  return;
@@ -34,7 +44,7 @@ export class SyncNewSectionCondition extends UmbConditionBase {
34
44
  });
35
45
  }
36
46
  }
37
- _SyncNewSectionCondition_currentSection = new WeakMap(), _SyncNewSectionCondition_allSections = new WeakMap(), _SyncNewSectionCondition_instances = new WeakSet(), _SyncNewSectionCondition_checkPermission = function _SyncNewSectionCondition_checkPermission() {
47
+ _SyncNewSectionCondition_currentSection = new WeakMap(), _SyncNewSectionCondition_allSections = new WeakMap(), _SyncNewSectionCondition_userSections = new WeakMap(), _SyncNewSectionCondition_instances = new WeakSet(), _SyncNewSectionCondition_checkPermission = function _SyncNewSectionCondition_checkPermission() {
38
48
  if (!__classPrivateFieldGet(this, _SyncNewSectionCondition_currentSection, "f"))
39
49
  return false;
40
50
  if (!__classPrivateFieldGet(this, _SyncNewSectionCondition_allSections, "f"))
@@ -44,5 +54,9 @@ _SyncNewSectionCondition_currentSection = new WeakMap(), _SyncNewSectionConditio
44
54
  return true;
45
55
  if (__classPrivateFieldGet(this, _SyncNewSectionCondition_currentSection, "f") === USYNC_SECTION_ALIAS)
46
56
  return true;
57
+ // the section exists, but this user hasn't been given it, so keep
58
+ // showing uSync in settings (the api allows settings or usync access).
59
+ if (__classPrivateFieldGet(this, _SyncNewSectionCondition_userSections, "f") && !__classPrivateFieldGet(this, _SyncNewSectionCondition_userSections, "f").includes(USYNC_SECTION_ALIAS))
60
+ return true;
47
61
  return false;
48
62
  };
package/dist/constants.js CHANGED
@@ -4,7 +4,7 @@ const _constants = {
4
4
  icon: 'icon-infinity',
5
5
  menuName: 'Syncronisation',
6
6
  menuAlias: 'usync.menu',
7
- version: '17.x',
7
+ version: '18.x',
8
8
  conditions: {
9
9
  legacy: 'usync.legacy.condition',
10
10
  },
@@ -27,20 +27,21 @@ let uSyncDetailsModalElement = class uSyncDetailsModalElement extends UmbModalBa
27
27
  <umb-body-layout headline="Changes : ${this.data?.item.name ?? ''}">
28
28
  <div class="layout">
29
29
  <uui-box style="--uui-box-default-padding: 0;">
30
- <div slot="header" id="header">
31
- <h3><umb-localize key="uSync_detailHeadline"></umb-localize></h3>
32
- <umb-localize key="uSync_detailHeader"></umb-localize>
30
+ <div class="headline">
31
+ <div>
32
+ <h3><umb-localize key="uSync_detailHeadline"></umb-localize></h3>
33
+ <umb-localize key="uSync_detailHeader"></umb-localize>
34
+ </div>
35
+ <div>${this.renderActions()}</div>
33
36
  </div>
34
- <div slot="header-actions">${this.renderActions()}</div>
35
- </uui-box>
36
- <uui-box style="--uui-box-default-padding: 0;">
37
- <usync-change-view .item=${this.data?.item}></usync-change-view>
38
37
  </uui-box>
38
+ <usync-change-view .item=${this.data?.item}></usync-change-view>
39
39
  </div>
40
40
  <div slot="actions">
41
41
  <uui-button
42
42
  id="cancel"
43
43
  .label=${this.localize.term('general_close')}
44
+ look="outline"
44
45
  @click="${__classPrivateFieldGet(this, _uSyncDetailsModalElement_instances, "m", _uSyncDetailsModalElement_onClose)}"></uui-button>
45
46
  </div>
46
47
  </umb-body-layout>
@@ -84,7 +85,14 @@ uSyncDetailsModalElement.styles = css `
84
85
  gap: var(--uui-size-space-4);
85
86
  }
86
87
 
87
- #header h3 {
88
+ .headline {
89
+ display: flex;
90
+ justify-content: space-between;
91
+ padding: var(--uui-size-space-4);
92
+ align-items: center;
93
+ }
94
+
95
+ .headline h3 {
88
96
  margin: 0;
89
97
  }
90
98
  `;
@@ -27,6 +27,7 @@ let uSyncErrorModalElement = class uSyncErrorModalElement extends UmbModalBaseEl
27
27
  <div slot="actions">
28
28
  <uui-button
29
29
  id="cancel"
30
+ look="outline"
30
31
  .label=${this.localize.term('general_close')}
31
32
  @click="${__classPrivateFieldGet(this, _uSyncErrorModalElement_instances, "m", _uSyncErrorModalElement_onClose)}"></uui-button>
32
33
  </div>
@@ -1,13 +1,19 @@
1
1
  import { nothing } from '@umbraco-cms/backoffice/external/lit';
2
2
  import { UmbModalBaseElement, UmbModalToken } from '@umbraco-cms/backoffice/modal';
3
3
  import { SyncLegacyCheckResponse } from '@jumoo/uSync';
4
- export declare class uSyncLegacyModalElement extends UmbModalBaseElement<SyncLegacyCheckResponse, string> {
4
+ export interface uSyncLegacyModalValue {
5
+ /** ids of the migrations to run as the legacy folder is copied. */
6
+ migrations: Array<string>;
7
+ }
8
+ /**
9
+ * confirms copying the legacy folder, and lets the user choose which migrations to run on the files.
10
+ */
11
+ export declare class uSyncLegacyModalElement extends UmbModalBaseElement<SyncLegacyCheckResponse, uSyncLegacyModalValue> {
5
12
  #private;
13
+ _skipped: Set<string>;
6
14
  render(): import("lit-html").TemplateResult<1>;
7
- renderLegacyFolder(folder: string | null | undefined): typeof nothing | import("lit-html").TemplateResult<1>;
8
- renderLegacyTypes(legacyTypes: Array<string> | undefined): typeof nothing | import("lit-html").TemplateResult<1>;
9
- renderCopy(): import("lit-html").TemplateResult<1>;
15
+ renderMigrations(migrations: SyncLegacyCheckResponse['migrations']): typeof nothing | import("lit-html").TemplateResult<1>;
10
16
  static styles: import("lit").CSSResult;
11
17
  }
12
18
  export default uSyncLegacyModalElement;
13
- export declare const USYNC_LEGACY_MODAL: UmbModalToken<SyncLegacyCheckResponse, string>;
19
+ export declare const USYNC_LEGACY_MODAL: UmbModalToken<SyncLegacyCheckResponse, uSyncLegacyModalValue>;
@@ -9,62 +9,114 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
9
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
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
- var _uSyncLegacyModalElement_instances, _uSyncLegacyModalElement_onClose;
13
- import { css, customElement, html, nothing } from '@umbraco-cms/backoffice/external/lit';
12
+ var _uSyncLegacyModalElement_instances, _uSyncLegacyModalElement_onClose, _uSyncLegacyModalElement_onCopy, _uSyncLegacyModalElement_onToggleMigration;
13
+ import { css, customElement, html, nothing, state } from '@umbraco-cms/backoffice/external/lit';
14
14
  import { UmbModalBaseElement, UmbModalToken } from '@umbraco-cms/backoffice/modal';
15
+ /**
16
+ * confirms copying the legacy folder, and lets the user choose which migrations to run on the files.
17
+ */
15
18
  let uSyncLegacyModalElement = class uSyncLegacyModalElement extends UmbModalBaseElement {
16
19
  constructor() {
17
20
  super(...arguments);
18
21
  _uSyncLegacyModalElement_instances.add(this);
22
+ // migrations are all on until the user turns one off.
23
+ this._skipped = new Set();
19
24
  }
20
25
  render() {
26
+ const version = this.data?.latestVersion;
27
+ const migrations = this.data?.migrations ?? [];
21
28
  return html `
22
- <umb-body-layout headline="Legacy uSync folder detected">
29
+ <umb-body-layout
30
+ .headline=${this.localize.termOrDefault('uSync_legacyCopyTitle', 'Overwrite files', version)}>
23
31
  <div class="content">
24
- ${this.renderLegacyFolder(this.data?.legacyFolder)}
25
- ${this.renderLegacyTypes(this.data?.legacyTypes)} ${this.renderCopy()}
32
+ <p>
33
+ ${this.localize.termOrDefault('uSync_legacyCopyContent', 'Are you sure you want to overwrite the contents of the folder with the legacy uSync folder files?', this.data?.latestFolder)}
34
+ </p>
35
+ ${this.renderMigrations(migrations)}
26
36
  </div>
27
37
  <div slot="actions">
28
- <uui-button id="cancel" label="close" @click=${__classPrivateFieldGet(this, _uSyncLegacyModalElement_instances, "m", _uSyncLegacyModalElement_onClose)}>
29
- ${this.localize.term('general_close')}
30
- </uui-button>
38
+ <uui-button
39
+ id="cancel"
40
+ label="cancel"
41
+ @click=${__classPrivateFieldGet(this, _uSyncLegacyModalElement_instances, "m", _uSyncLegacyModalElement_onClose)}>${this.localize.term('general_cancel')}</uui-button>
42
+ <uui-button id="copy" label="copy" look="primary" color="danger" @click=${__classPrivateFieldGet(this, _uSyncLegacyModalElement_instances, "m", _uSyncLegacyModalElement_onCopy)}
43
+ >${migrations.length > 0 && migrations.some((m) => !this._skipped.has(m.id))
44
+ ? 'Migrate and copy'
45
+ : 'Copy'}</uui-button
46
+ >
31
47
  </div>
32
48
  </umb-body-layout>
33
49
  `;
34
50
  }
35
- renderLegacyFolder(folder) {
36
- return folder === undefined || folder === null
37
- ? nothing
38
- : html `${this.localize.termOrDefault('uSync.legacyInfo', 'uSync has found a legacy uSync folder', folder)}`;
39
- }
40
- renderLegacyTypes(legacyTypes) {
41
- if (legacyTypes == undefined || legacyTypes.length == 0) {
51
+ renderMigrations(migrations) {
52
+ if (migrations.length == 0) {
42
53
  return nothing;
43
54
  }
44
- const legacyTypeHtml = this.data?.legacyTypes.map((datatype) => {
45
- return html `<li>${datatype}</li>`;
46
- });
47
- return html `<div>
48
- ${this.localize.termOrDefault('uSync.legacyObsolete', 'Obsolete DataTypes', legacyTypeHtml)}
49
- </div>`;
50
- }
51
- renderCopy() {
52
- return html `${this.localize.termOrDefault('uSync.legacyCopy', 'Copy to uSync folder', this.data?.legacyFolder ?? 'uSync/v15')} `;
55
+ return html `
56
+ <uui-box headline="Migrations">
57
+ <p>
58
+ These changes can be made to the files as they are copied, so the import that
59
+ follows uses the current editors.
60
+ </p>
61
+ ${migrations.map((migration) => html `
62
+ <div class="migration">
63
+ <uui-checkbox
64
+ label=${migration.name}
65
+ ?checked=${!this._skipped.has(migration.id)}
66
+ @change=${(e) => __classPrivateFieldGet(this, _uSyncLegacyModalElement_instances, "m", _uSyncLegacyModalElement_onToggleMigration).call(this, migration.id, e.target.checked)}
67
+ >${migration.name} (${migration.count})</uui-checkbox
68
+ >
69
+ <div class="migration-description">${migration.description}</div>
70
+ ${migration.notice
71
+ ? html `<div class="migration-notice">${migration.notice}</div>`
72
+ : nothing}
73
+ </div>
74
+ `)}
75
+ </uui-box>
76
+ `;
53
77
  }
54
78
  };
55
79
  _uSyncLegacyModalElement_instances = new WeakSet();
56
80
  _uSyncLegacyModalElement_onClose = function _uSyncLegacyModalElement_onClose() {
57
81
  this.modalContext?.reject();
58
82
  };
83
+ _uSyncLegacyModalElement_onCopy = function _uSyncLegacyModalElement_onCopy() {
84
+ const migrations = (this.data?.migrations ?? [])
85
+ .map((migration) => migration.id)
86
+ .filter((id) => !this._skipped.has(id));
87
+ this.modalContext?.setValue({ migrations });
88
+ this.modalContext?.submit();
89
+ };
90
+ _uSyncLegacyModalElement_onToggleMigration = function _uSyncLegacyModalElement_onToggleMigration(id, checked) {
91
+ const skipped = new Set(this._skipped);
92
+ if (checked)
93
+ skipped.delete(id);
94
+ else
95
+ skipped.add(id);
96
+ this._skipped = skipped;
97
+ };
59
98
  uSyncLegacyModalElement.styles = css `
60
99
  .content {
61
- margin: -10px 0;
100
+ max-width: 520px;
101
+ }
102
+
103
+ .migration {
104
+ margin-bottom: var(--uui-size-space-3);
105
+ }
106
+
107
+ .migration-description,
108
+ .migration-notice {
109
+ margin-left: var(--uui-size-space-6);
62
110
  }
63
111
 
64
- em {
65
- color: var(--uui-color-positive);
112
+ .migration-notice {
113
+ color: var(--uui-color-text-alt);
114
+ font-size: var(--uui-type-small-size);
66
115
  }
67
116
  `;
117
+ __decorate([
118
+ state()
119
+ ], uSyncLegacyModalElement.prototype, "_skipped", void 0);
68
120
  uSyncLegacyModalElement = __decorate([
69
121
  customElement('usync-legacy-modal')
70
122
  ], uSyncLegacyModalElement);
@@ -39,6 +39,7 @@ let SyncImportSingleModalElement = class SyncImportSingleModalElement extends Um
39
39
  <div slot="actions">
40
40
  <uui-button
41
41
  id="cancel"
42
+ look="outline"
42
43
  .label=${this.localize.term('general_close')}
43
44
  @click="${__classPrivateFieldGet(this, _SyncImportSingleModalElement_instances, "m", _SyncImportSingleModalElement_onClose)}"></uui-button>
44
45
  ${when(!this.result, () => html ` <uui-button
@@ -82,7 +83,7 @@ _SyncImportSingleModalElement_doImport = async function _SyncImportSingleModalEl
82
83
  this.importState = 'waiting';
83
84
  const result = await __classPrivateFieldGet(this, _SyncImportSingleModalElement_actionContext, "f")?.importSingle(this.data.action);
84
85
  this.result = result?.data;
85
- if (result?.data.success)
86
+ if (result?.data?.success)
86
87
  this.importState = 'success';
87
88
  else
88
89
  this.importState = 'failed';
package/dist/index.js CHANGED
@@ -5,7 +5,15 @@ import './external/signalr/index.js';
5
5
  import './api/index.js';
6
6
  export * from './exports.js';
7
7
  import { manifests } from './manifests.js';
8
- export const onInit = (_host, extensionRegistry) => {
8
+ import { UMB_AUTH_CONTEXT } from '@umbraco-cms/backoffice/auth';
9
+ import { client } from './api/client.gen.js';
10
+ export const onInit = async (host, extensionRegistry) => {
9
11
  // register the manifests
10
12
  extensionRegistry.registerMany(manifests);
13
+ const authContext = await host.getContext(UMB_AUTH_CONTEXT);
14
+ if (!authContext) {
15
+ console.warn('UMB_AUTH_CONTEXT not available — extension API client will not be authenticated');
16
+ return;
17
+ }
18
+ authContext.configureClient(client);
11
19
  };
@@ -63,7 +63,7 @@ export default {
63
63
  <ul><li>Du kan aktivere "HMAC-mapping" i uSync,</li>
64
64
  <li>eller du kan sikre, at HMAC-værdien i indstillingen <code>Imaging:HMAC</code> stemmer overens med den værdi, der bruges til at generere filerne i uSync-mappen</li></ul>`,
65
65
  formatMismatch: 'Synkroniseringsfilformatversionen stemmer ikke overens med den forventede version. Dette kan indikere et potentielt kompatibilitetsproblem.',
66
- legacyBanner: 'Dette websted indeholder filer fra en tidligere version af uSync. Se detaljerne under fanen Ældre.',
66
+ legacyBanner: 'Dette websted indeholder filer fra en tidligere version af uSync. Se detaljerne under fanen Migrer.',
67
67
  legacyCopyTitle: 'Overskriv v%0%-filer',
68
68
  legacyCopyContent: 'Er du sikker på, at du vil overskrive indholdet af mappen %0% med de ældre uSync-mappefilerne?',
69
69
  legacyIgnoreTitle: 'Ignorer ældre filer',
@@ -63,7 +63,7 @@ export default {
63
63
  <ul><li>Sie können die "HMAC-Zuordnung" in uSync aktivieren,</li>
64
64
  <li>oder Sie können sicherstellen, dass der HMAC-Wert in der <code>Imaging:HMAC</code>-Einstellung mit dem Wert übereinstimmt, der zum Generieren der Dateien im uSync-Ordner verwendet wurde</li></ul>`,
65
65
  formatMismatch: 'Die Formatversion der Synchronisierungsdatei stimmt nicht mit der erwarteten Version überein. Dies kann auf ein potenzielles Kompatibilitätsproblem hinweisen.',
66
- legacyBanner: 'Diese Website enthält Dateien einer früheren Version von uSync. Details finden Sie auf der Registerkarte Legacy.',
66
+ legacyBanner: 'Diese Website enthält Dateien einer früheren Version von uSync. Details finden Sie auf der Registerkarte Migrieren.',
67
67
  legacyCopyTitle: 'v%0%-Dateien überschreiben',
68
68
  legacyCopyContent: 'Möchten Sie den Inhalt des Ordners %0% wirklich mit den Legacy-uSync-Ordnerdateien überschreiben?',
69
69
  legacyIgnoreTitle: 'Legacy-Dateien ignorieren',
@@ -98,6 +98,7 @@ declare const _default: {
98
98
  IContentType: string;
99
99
  IMediaType: string;
100
100
  IMemberType: string;
101
+ IElement: string;
101
102
  IContent: string;
102
103
  IMedia: string;
103
104
  IDomain: string;
@@ -94,7 +94,7 @@ export default {
94
94
  <ul><li>You can turn on "HMAC mapping" in uSync,</li>
95
95
  <li>or you can ensure the HMAC value in the <code>Imaging:HMAC</code> setting matches the value used to generate the files in the uSync folder</li></ul>`,
96
96
  formatMismatch: 'The sync file format version does not match the expected version. This may indicate a potential compatibility issue.',
97
- legacyBanner: 'This site contains files from a previous version of uSync, view the details in the legacy tab.',
97
+ legacyBanner: 'This site contains files from a previous version of uSync, view the details in the Migrate tab.',
98
98
  legacyCopyTitle: 'Overwrite v%0% files',
99
99
  legacyCopyContent: 'Are you sure you want to overwrite the contents of the %0% folder with the legacy uSync folder files?',
100
100
  legacyIgnoreTitle: 'Ignore legacy files',
@@ -110,6 +110,7 @@ export default {
110
110
  IContentType: 'Content Types',
111
111
  IMediaType: 'Media Types',
112
112
  IMemberType: 'Member Types',
113
+ IElement: 'Library',
113
114
  IContent: 'Content',
114
115
  IMedia: 'Media',
115
116
  IDomain: 'Domains',
@@ -63,7 +63,7 @@ export default {
63
63
  <ul><li>Puede activar el "mapeo HMAC" en uSync,</li>
64
64
  <li>o puede asegurarse de que el valor HMAC en la configuración <code>Imaging:HMAC</code> coincida con el valor utilizado para generar los archivos en la carpeta uSync</li></ul>`,
65
65
  formatMismatch: 'La versión del formato del archivo de sincronización no coincide con la versión esperada. Esto puede indicar un posible problema de compatibilidad.',
66
- legacyBanner: 'Este sitio contiene archivos de una versión anterior de uSync. Consulte los detalles en la pestaña Heredado.',
66
+ legacyBanner: 'Este sitio contiene archivos de una versión anterior de uSync. Consulte los detalles en la pestaña Migrar.',
67
67
  legacyCopyTitle: 'Sobrescribir archivos v%0%',
68
68
  legacyCopyContent: '¿Está seguro de que desea sobrescribir el contenido de la carpeta %0% con los archivos de la carpeta uSync heredada?',
69
69
  legacyIgnoreTitle: 'Ignorar archivos heredados',
@@ -63,7 +63,7 @@ export default {
63
63
  <ul><li>Vous pouvez activer le "mappage HMAC" dans uSync,</li>
64
64
  <li>ou vous pouvez vous assurer que la valeur HMAC dans le paramètre <code>Imaging:HMAC</code> correspond à la valeur utilisée pour générer les fichiers dans le dossier uSync</li></ul>`,
65
65
  formatMismatch: 'La version du format du fichier de synchronisation ne correspond pas à la version attendue. Cela peut indiquer un problème de compatibilité potentiel.',
66
- legacyBanner: 'Ce site contient des fichiers d\'une version précédente d\'uSync. Consultez les détails dans l\'onglet Héritage.',
66
+ legacyBanner: 'Ce site contient des fichiers d\'une version précédente d\'uSync. Consultez les détails dans l\'onglet Migrer.',
67
67
  legacyCopyTitle: 'Écraser les fichiers v%0%',
68
68
  legacyCopyContent: 'Êtes-vous sûr de vouloir écraser le contenu du dossier %0% avec les fichiers du dossier uSync hérité ?',
69
69
  legacyIgnoreTitle: 'Ignorer les fichiers hérités',
@@ -63,7 +63,7 @@ export default {
63
63
  <ul><li>U kunt "HMAC-mapping" inschakelen in uSync,</li>
64
64
  <li>of u kunt ervoor zorgen dat de HMAC-waarde in de <code>Imaging:HMAC</code>-instelling overeenkomt met de waarde die werd gebruikt om de bestanden in de uSync-map te genereren</li></ul>`,
65
65
  formatMismatch: 'De versie van het synchronisatiebestandsformaat komt niet overeen met de verwachte versie. Dit kan wijzen op een mogelijk compatibiliteitsprobleem.',
66
- legacyBanner: 'Deze site bevat bestanden van een eerdere versie van uSync. Bekijk de details op het tabblad Verouderd.',
66
+ legacyBanner: 'Deze site bevat bestanden van een eerdere versie van uSync. Bekijk de details op het tabblad Migreren.',
67
67
  legacyCopyTitle: 'v%0%-bestanden overschrijven',
68
68
  legacyCopyContent: 'Weet u zeker dat u de inhoud van de map %0% wilt overschrijven met de verouderde uSync-mapbestanden?',
69
69
  legacyIgnoreTitle: 'Verouderde bestanden negeren',
@@ -45,10 +45,15 @@ export declare class uSyncActionRepository extends UmbControllerBase {
45
45
  * @returns the current uSync settings
46
46
  */
47
47
  getSettings(): Promise<import("@umbraco-cms/backoffice/repository").UmbDataSourceResponse<import("@jumoo/uSync").USyncSettings>>;
48
- getAddons(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
48
+ getAddons(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
49
49
  data: import("@jumoo/uSync").USyncAddonInfo;
50
- request: Request;
51
- response: Response;
50
+ error: undefined;
51
+ } | {
52
+ data: undefined;
53
+ error: unknown;
54
+ }) & {
55
+ request?: Request;
56
+ response?: Response;
52
57
  }>>;
53
58
  /**
54
59
  * Get the handler settings based on the set.
@@ -68,10 +73,11 @@ export declare class uSyncActionRepository extends UmbControllerBase {
68
73
  ignoreLegacy(): Promise<import("@umbraco-cms/backoffice/repository").UmbDataSourceResponse<boolean>>;
69
74
  /**
70
75
  * copies the legacy folder to the new v14 folder.
76
+ * @param migrations ids of the migrations to run on the files as they are copied.
71
77
  * @returns true if the legacy folder is copied to the new folder.
72
78
  */
73
- copyLegacy(): Promise<import("@umbraco-cms/backoffice/repository").UmbDataSourceResponse<boolean>>;
74
- downloadFile(): Promise<Blob | File>;
79
+ copyLegacy(migrations?: Array<string>): Promise<import("@umbraco-cms/backoffice/repository").UmbDataSourceResponse<boolean>>;
80
+ downloadFile(): Promise<import("@jumoo/uSync").FileContentResult | undefined>;
75
81
  /**
76
82
  * Poll the status of a background operation.
77
83
  * @param operationId the operation id returned from performAction when inBackground is true
@@ -82,20 +88,35 @@ export declare class uSyncActionRepository extends UmbControllerBase {
82
88
  * used to reattach to a run this client didn't itself start (e.g. after a reload).
83
89
  */
84
90
  getRunningOperation(): Promise<import("@umbraco-cms/backoffice/repository").UmbDataSourceResponse<import("@jumoo/uSync").SyncRunningOperationResponse>>;
85
- processUpload(fileId: string): Promise<import("@jumoo/uSync").UploadImportResult>;
86
- getSets(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
91
+ processUpload(fileId: string): Promise<import("@jumoo/uSync").UploadImportResult | undefined>;
92
+ getSets(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
87
93
  data: import("@jumoo/uSync").SyncSelectableSet[];
88
- request: Request;
89
- response: Response;
94
+ error: undefined;
95
+ } | {
96
+ data: undefined;
97
+ error: unknown;
98
+ }) & {
99
+ request?: Request;
100
+ response?: Response;
90
101
  }>>;
91
- importSingle(action: USyncActionView): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
102
+ importSingle(action: USyncActionView): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
92
103
  data: USyncActionView;
93
- request: Request;
94
- response: Response;
104
+ error: undefined;
105
+ } | {
106
+ data: undefined;
107
+ error: unknown;
108
+ }) & {
109
+ request?: Request;
110
+ response?: Response;
95
111
  }>>;
96
- getSyncFileInfo(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
112
+ getSyncFileInfo(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
97
113
  data: import("@jumoo/uSync").SyncFileVersionCheckResult;
98
- request: Request;
99
- response: Response;
114
+ error: undefined;
115
+ } | {
116
+ data: undefined;
117
+ error: unknown;
118
+ }) & {
119
+ request?: Request;
120
+ response?: Response;
100
121
  }>>;
101
122
  }
@@ -85,10 +85,11 @@ export class uSyncActionRepository extends UmbControllerBase {
85
85
  }
86
86
  /**
87
87
  * copies the legacy folder to the new v14 folder.
88
+ * @param migrations ids of the migrations to run on the files as they are copied.
88
89
  * @returns true if the legacy folder is copied to the new folder.
89
90
  */
90
- async copyLegacy() {
91
- return await __classPrivateFieldGet(this, _uSyncActionRepository_migrartionDataSource, "f").copyLegacy();
91
+ async copyLegacy(migrations = []) {
92
+ return await __classPrivateFieldGet(this, _uSyncActionRepository_migrartionDataSource, "f").copyLegacy(migrations);
92
93
  }
93
94
  async downloadFile() {
94
95
  var result = await __classPrivateFieldGet(this, _uSyncActionRepository_actionDataSource, "f").downloadFile();
@@ -10,28 +10,48 @@ export interface SyncActionDataSource {
10
10
  export declare class uSyncActionDataSource implements SyncActionDataSource {
11
11
  #private;
12
12
  constructor(host: UmbControllerHost);
13
- getSyncFileInfo(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
13
+ getSyncFileInfo(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
14
14
  data: import("@jumoo/uSync").SyncFileVersionCheckResult;
15
- request: Request;
16
- response: Response;
15
+ error: undefined;
16
+ } | {
17
+ data: undefined;
18
+ error: unknown;
19
+ }) & {
20
+ request?: Request;
21
+ response?: Response;
17
22
  }>>;
18
23
  getActionsBySet(setName: string): Promise<UmbDataSourceResponse<Array<SyncActionGroup>>>;
19
24
  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;
25
+ downloadFile(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
26
+ data: import("@jumoo/uSync").FileContentResult;
27
+ error: undefined;
28
+ } | {
29
+ data: undefined;
30
+ error: unknown;
31
+ }) & {
32
+ request?: Request;
33
+ response?: Response;
24
34
  }>>;
25
35
  getOperationStatus(operationId: string): Promise<UmbDataSourceResponse<SyncOperationStatusResponse>>;
26
36
  getRunningOperation(): Promise<UmbDataSourceResponse<SyncRunningOperationResponse>>;
27
- processUpload(fileId: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
37
+ processUpload(fileId: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
28
38
  data: import("@jumoo/uSync").UploadImportResult;
29
- request: Request;
30
- response: Response;
39
+ error: undefined;
40
+ } | {
41
+ data: undefined;
42
+ error: unknown;
43
+ }) & {
44
+ request?: Request;
45
+ response?: Response;
31
46
  }>>;
32
- importSingle(view: USyncActionView): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
47
+ importSingle(view: USyncActionView): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
33
48
  data: USyncActionView;
34
- request: Request;
35
- response: Response;
49
+ error: undefined;
50
+ } | {
51
+ data: undefined;
52
+ error: unknown;
53
+ }) & {
54
+ request?: Request;
55
+ response?: Response;
36
56
  }>>;
37
57
  }
@@ -11,45 +11,45 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
11
11
  };
12
12
  var _uSyncActionDataSource_host;
13
13
  import { tryExecute } from '@umbraco-cms/backoffice/resources';
14
- import { ActionsService, } from '@jumoo/uSync';
14
+ import { getActionsBySet, getRunning, getStatus, getSyncFileInfo, postDownload, postImport, postPerform, postProcessUpload, } from '@jumoo/uSync';
15
15
  export class uSyncActionDataSource {
16
16
  constructor(host) {
17
17
  _uSyncActionDataSource_host.set(this, void 0);
18
18
  __classPrivateFieldSet(this, _uSyncActionDataSource_host, host, "f");
19
19
  }
20
20
  async getSyncFileInfo() {
21
- return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.getSyncFileInfo());
21
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), getSyncFileInfo());
22
22
  }
23
23
  async getActionsBySet(setName) {
24
- return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.getActionsBySet({
24
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), getActionsBySet({
25
25
  query: { setName: setName },
26
26
  }));
27
27
  }
28
28
  async performAction(request) {
29
- return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.performAction({
29
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), postPerform({
30
30
  body: request,
31
31
  }));
32
32
  }
33
33
  async downloadFile() {
34
- return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.download());
34
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), postDownload());
35
35
  }
36
36
  async getOperationStatus(operationId) {
37
- return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.status({
37
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), getStatus({
38
38
  query: { operationId: operationId },
39
39
  }));
40
40
  }
41
41
  async getRunningOperation() {
42
- return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.running());
42
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), getRunning());
43
43
  }
44
44
  async processUpload(fileId) {
45
- return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.processUpload({
45
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), postProcessUpload({
46
46
  query: {
47
47
  tempKey: fileId,
48
48
  },
49
49
  }));
50
50
  }
51
51
  async importSingle(view) {
52
- return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.importSingle({
52
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), postImport({
53
53
  body: view,
54
54
  }));
55
55
  }
@@ -9,5 +9,5 @@ export declare class uSyncMigrationDataSource {
9
9
  constructor(host: UmbControllerHost);
10
10
  checkLegacy(): Promise<UmbDataSourceResponse<SyncLegacyCheckResponse>>;
11
11
  ignoreLegacy(): Promise<UmbDataSourceResponse<boolean>>;
12
- copyLegacy(): Promise<UmbDataSourceResponse<boolean>>;
12
+ copyLegacy(migrations?: Array<string>): Promise<UmbDataSourceResponse<boolean>>;
13
13
  }