@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.
- package/dist/api/client.gen.js +1 -2
- package/dist/api/index.d.ts +2 -3
- package/dist/api/index.js +1 -2
- package/dist/api/sdk.gen.d.ts +18 -30
- package/dist/api/sdk.gen.js +97 -145
- package/dist/api/types.gen.d.ts +132 -117
- package/dist/components/usync-action-box.js +15 -5
- package/dist/components/usync-progress-box.js +13 -5
- package/dist/components/usync-result-row.js +4 -0
- package/dist/components/usync-results-group-view.js +11 -3
- package/dist/components/usync-results-view.js +1 -0
- package/dist/conditions/new-section.condition.js +16 -2
- package/dist/constants.js +1 -1
- package/dist/dialogs/details-modal-element.js +16 -8
- package/dist/dialogs/error-modal-element.js +1 -0
- package/dist/dialogs/legacy-modal-element.d.ts +11 -5
- package/dist/dialogs/legacy-modal-element.js +79 -27
- package/dist/dialogs/single-import-modal.element.js +2 -1
- package/dist/index.js +9 -1
- package/dist/lang/files/da-dk.js +1 -1
- package/dist/lang/files/de-de.js +1 -1
- package/dist/lang/files/en-us.d.ts +1 -0
- package/dist/lang/files/en-us.js +2 -1
- package/dist/lang/files/es-es.js +1 -1
- package/dist/lang/files/fr-fr.js +1 -1
- package/dist/lang/files/nl-nl.js +1 -1
- package/dist/repository/SyncAction.respositoy.d.ts +36 -15
- package/dist/repository/SyncAction.respositoy.js +3 -2
- package/dist/repository/sources/SyncAction.source.d.ts +33 -13
- package/dist/repository/sources/SyncAction.source.js +9 -9
- package/dist/repository/sources/SyncMigration.source.d.ts +1 -1
- package/dist/repository/sources/SyncMigration.source.js +5 -5
- package/dist/repository/sources/SyncSettings.source.d.ts +16 -6
- package/dist/repository/sources/SyncSettings.source.js +5 -5
- package/dist/signalr/signalr.context.js +5 -5
- package/dist/workspace/components/usync-action-button.d.ts +3 -2
- package/dist/workspace/components/usync-action-button.js +35 -27
- package/dist/workspace/views/default/default.element.js +3 -3
- package/dist/workspace/views/legacy/legacy.element.js +6 -10
- package/dist/workspace/workspace.context.d.ts +11 -6
- package/dist/workspace/workspace.context.js +2 -2
- package/package.json +10 -3
- package/dist/hey-api.d.ts +0 -11
- package/dist/hey-api.js +0 -14
|
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
12
|
var _uSyncMigrationDataSource_host;
|
|
13
|
-
import {
|
|
13
|
+
import { getCheckLegacy, postCopyLegacy, postIgnoreLegacy, } from '@jumoo/uSync';
|
|
14
14
|
import { tryExecute } from '@umbraco-cms/backoffice/resources';
|
|
15
15
|
export class uSyncMigrationDataSource {
|
|
16
16
|
constructor(host) {
|
|
@@ -18,13 +18,13 @@ export class uSyncMigrationDataSource {
|
|
|
18
18
|
__classPrivateFieldSet(this, _uSyncMigrationDataSource_host, host, "f");
|
|
19
19
|
}
|
|
20
20
|
async checkLegacy() {
|
|
21
|
-
return await tryExecute(__classPrivateFieldGet(this, _uSyncMigrationDataSource_host, "f"),
|
|
21
|
+
return await tryExecute(__classPrivateFieldGet(this, _uSyncMigrationDataSource_host, "f"), getCheckLegacy());
|
|
22
22
|
}
|
|
23
23
|
async ignoreLegacy() {
|
|
24
|
-
return await tryExecute(__classPrivateFieldGet(this, _uSyncMigrationDataSource_host, "f"),
|
|
24
|
+
return await tryExecute(__classPrivateFieldGet(this, _uSyncMigrationDataSource_host, "f"), postIgnoreLegacy());
|
|
25
25
|
}
|
|
26
|
-
async copyLegacy() {
|
|
27
|
-
return await tryExecute(__classPrivateFieldGet(this, _uSyncMigrationDataSource_host, "f"),
|
|
26
|
+
async copyLegacy(migrations = []) {
|
|
27
|
+
return await tryExecute(__classPrivateFieldGet(this, _uSyncMigrationDataSource_host, "f"), postCopyLegacy({ body: { migrations } }));
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
_uSyncMigrationDataSource_host = new WeakMap();
|
|
@@ -10,14 +10,24 @@ export declare class USyncSettingsDataSource implements SyncSettingsDataSource {
|
|
|
10
10
|
constructor(host: UmbControllerHost);
|
|
11
11
|
getSettings(): Promise<UmbDataSourceResponse<USyncSettings>>;
|
|
12
12
|
getHandlerSettings(setName: string): Promise<UmbDataSourceResponse<USyncHandlerSetSettings>>;
|
|
13
|
-
getAddons(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
13
|
+
getAddons(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
|
|
14
14
|
data: import("@jumoo/uSync").USyncAddonInfo;
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
error: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
data: undefined;
|
|
18
|
+
error: unknown;
|
|
19
|
+
}) & {
|
|
20
|
+
request?: Request;
|
|
21
|
+
response?: Response;
|
|
17
22
|
}>>;
|
|
18
|
-
getSets(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
23
|
+
getSets(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
|
|
19
24
|
data: import("@jumoo/uSync").SyncSelectableSet[];
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
error: undefined;
|
|
26
|
+
} | {
|
|
27
|
+
data: undefined;
|
|
28
|
+
error: unknown;
|
|
29
|
+
}) & {
|
|
30
|
+
request?: Request;
|
|
31
|
+
response?: Response;
|
|
22
32
|
}>>;
|
|
23
33
|
}
|
|
@@ -11,23 +11,23 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
11
11
|
};
|
|
12
12
|
var _USyncSettingsDataSource_host;
|
|
13
13
|
import { tryExecute } from '@umbraco-cms/backoffice/resources';
|
|
14
|
-
import {
|
|
14
|
+
import { getAddOns, getHandlerSettings, getSets, getSettings, } from '@jumoo/uSync';
|
|
15
15
|
export class USyncSettingsDataSource {
|
|
16
16
|
constructor(host) {
|
|
17
17
|
_USyncSettingsDataSource_host.set(this, void 0);
|
|
18
18
|
__classPrivateFieldSet(this, _USyncSettingsDataSource_host, host, "f");
|
|
19
19
|
}
|
|
20
20
|
async getSettings() {
|
|
21
|
-
return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"),
|
|
21
|
+
return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"), getSettings());
|
|
22
22
|
}
|
|
23
23
|
async getHandlerSettings(setName) {
|
|
24
|
-
return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"),
|
|
24
|
+
return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"), getHandlerSettings({ query: { id: setName } }));
|
|
25
25
|
}
|
|
26
26
|
async getAddons() {
|
|
27
|
-
return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"),
|
|
27
|
+
return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"), getAddOns());
|
|
28
28
|
}
|
|
29
29
|
async getSets() {
|
|
30
|
-
return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"),
|
|
30
|
+
return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"), getSets());
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
_USyncSettingsDataSource_host = new WeakMap();
|
|
@@ -36,7 +36,7 @@ export class uSyncSignalRContext extends UmbControllerBase {
|
|
|
36
36
|
const authConfig = auth?.getOpenApiConfiguration();
|
|
37
37
|
if (!authConfig)
|
|
38
38
|
return;
|
|
39
|
-
__classPrivateFieldGet(this, _uSyncSignalRContext_instances, "m", _uSyncSignalRContext_setupConnection).call(this, '/umbraco/SyncHub'
|
|
39
|
+
__classPrivateFieldGet(this, _uSyncSignalRContext_instances, "m", _uSyncSignalRContext_setupConnection).call(this, '/umbraco/SyncHub');
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
hostConnected() {
|
|
@@ -75,11 +75,11 @@ export class uSyncSignalRContext extends UmbControllerBase {
|
|
|
75
75
|
__classPrivateFieldGet(this, _uSyncSignalRContext_update, "f").setValue({ message, count: 0, total: 1 });
|
|
76
76
|
}
|
|
77
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
|
|
79
|
-
//
|
|
80
|
-
//
|
|
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) {
|
|
79
|
+
// backoffice auth is cookie-only (Umbraco 19): the httpOnly auth cookie
|
|
80
|
+
// is sent with every (re)connect, so there is no token to supply.
|
|
81
81
|
__classPrivateFieldSet(this, _uSyncSignalRContext_connection, new signalR.HubConnectionBuilder()
|
|
82
|
-
.withUrl(url, {
|
|
82
|
+
.withUrl(url, { withCredentials: true })
|
|
83
83
|
.withAutomaticReconnect(new uSyncSignalRReconnectPolicy())
|
|
84
84
|
.configureLogging(signalR.LogLevel.Warning)
|
|
85
85
|
.build(), "f");
|
|
@@ -8,8 +8,9 @@ export declare class SyncActionButtonElement extends UmbLitElement {
|
|
|
8
8
|
state?: UUIButtonState;
|
|
9
9
|
disabled: boolean;
|
|
10
10
|
_popoverOpen: boolean;
|
|
11
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
12
|
-
|
|
11
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
12
|
+
renderSingleAction(): import("lit-html").TemplateResult<1>;
|
|
13
|
+
renderMultipleActions(parent?: SyncActionButton): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
13
14
|
static styles: import("lit").CSSResult;
|
|
14
15
|
}
|
|
15
16
|
declare global {
|
|
@@ -21,22 +21,21 @@ let SyncActionButtonElement = class SyncActionButtonElement extends UmbLitElemen
|
|
|
21
21
|
this._popoverOpen = false;
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
`;
|
|
24
|
+
return (this.button?.children?.length ?? 0) > 0
|
|
25
|
+
? this.renderMultipleActions(this.button)
|
|
26
|
+
: this.renderSingleAction();
|
|
27
|
+
}
|
|
28
|
+
renderSingleAction() {
|
|
29
|
+
return html ` <uui-button
|
|
30
|
+
class="action-button"
|
|
31
|
+
.disabled=${this.disabled}
|
|
32
|
+
label=${this.localize.termOrDefault(`uSync_${this.button?.label}`, this.button?.label ?? '')}
|
|
33
|
+
color=${this.button?.color}
|
|
34
|
+
look=${this.button?.look}
|
|
35
|
+
state=${ifDefined(this.state)}
|
|
36
|
+
@click=${() => __classPrivateFieldGet(this, _SyncActionButtonElement_instances, "m", _SyncActionButtonElement_onClick).call(this, this.button)}></uui-button>`;
|
|
38
37
|
}
|
|
39
|
-
|
|
38
|
+
renderMultipleActions(parent) {
|
|
40
39
|
if (!this.button?.children)
|
|
41
40
|
return nothing;
|
|
42
41
|
const buttons = this.button?.children.map((item) => {
|
|
@@ -49,21 +48,30 @@ let SyncActionButtonElement = class SyncActionButtonElement extends UmbLitElemen
|
|
|
49
48
|
return nothing;
|
|
50
49
|
const popoverId = `popover_${parent?.key}`;
|
|
51
50
|
return html `
|
|
52
|
-
<uui-button
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
51
|
+
<uui-button-group class="action-button">
|
|
52
|
+
<uui-button
|
|
53
|
+
.disabled=${this.disabled}
|
|
54
|
+
.label=${this.button.label}
|
|
55
|
+
color=${parent?.color}
|
|
56
|
+
look=${parent?.look}
|
|
57
|
+
@click=${() => __classPrivateFieldGet(this, _SyncActionButtonElement_instances, "m", _SyncActionButtonElement_onClick).call(this, this.button)}>
|
|
58
|
+
${this.localize.termOrDefault(`uSync_${this.button?.label}`, this.button?.label ?? '')}
|
|
59
|
+
</uui-button>
|
|
60
|
+
<uui-button
|
|
61
|
+
.disabled=${this.disabled}
|
|
62
|
+
popovertarget=${popoverId}
|
|
63
|
+
.label=${this.button.label}
|
|
64
|
+
color=${parent?.color}
|
|
65
|
+
look=${parent?.look}
|
|
66
|
+
compact>
|
|
67
|
+
<uui-symbol-expand
|
|
68
|
+
class="expand-symbol"
|
|
69
|
+
.open=${this._popoverOpen}></uui-symbol-expand>
|
|
70
|
+
</uui-button>
|
|
71
|
+
</uui-button-group>
|
|
63
72
|
|
|
64
73
|
<uui-popover-container
|
|
65
74
|
id=${popoverId}
|
|
66
|
-
margin="6"
|
|
67
75
|
placement="bottom-end"
|
|
68
76
|
@toggle=${__classPrivateFieldGet(this, _SyncActionButtonElement_instances, "m", _SyncActionButtonElement_onPopoverToggle)}>
|
|
69
77
|
<umb-popover-layout>
|
|
@@ -201,7 +201,7 @@ _uSyncDefaultViewElement_renderLegacyBanner = function _uSyncDefaultViewElement_
|
|
|
201
201
|
: html `
|
|
202
202
|
<div class="legacy-banner">
|
|
203
203
|
<umb-icon name="icon-alert"></umb-icon>
|
|
204
|
-
${this.localize.termOrDefault('uSync_legacyBanner', 'This site contains files from a previous version of uSync, view the details in the
|
|
204
|
+
${this.localize.termOrDefault('uSync_legacyBanner', 'This site contains files from a previous version of uSync, view the details in the Migrate tab.')}
|
|
205
205
|
</div>
|
|
206
206
|
`;
|
|
207
207
|
};
|
|
@@ -323,9 +323,9 @@ uSyncDefaultViewElement.styles = [
|
|
|
323
323
|
|
|
324
324
|
.action-buttons-box {
|
|
325
325
|
display: grid;
|
|
326
|
-
grid-template-columns: repeat(auto-fit, minmax(
|
|
326
|
+
grid-template-columns: repeat(auto-fit, minmax(370px, 1fr));
|
|
327
327
|
position: relative;
|
|
328
|
-
gap: var(--uui-size-space-
|
|
328
|
+
gap: var(--uui-size-space-4);
|
|
329
329
|
flex-wrap: wrap;
|
|
330
330
|
align-content: stretch;
|
|
331
331
|
z-index: 1;
|
|
@@ -19,6 +19,7 @@ var _SyncLegacyFilesElement_instances, _SyncLegacyFilesElement_actionContext, _S
|
|
|
19
19
|
import { css, customElement, html, nothing, state, } from '@umbraco-cms/backoffice/external/lit';
|
|
20
20
|
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
|
21
21
|
import { UMB_CONFIRM_MODAL, UMB_MODAL_MANAGER_CONTEXT, } from '@umbraco-cms/backoffice/modal';
|
|
22
|
+
import { USYNC_LEGACY_MODAL } from '../../../dialogs/legacy-modal-element.js';
|
|
22
23
|
import { USYNC_CORE_CONTEXT_TOKEN, } from '@jumoo/uSync';
|
|
23
24
|
let SyncLegacyFilesElement = class SyncLegacyFilesElement extends UmbLitElement {
|
|
24
25
|
constructor() {
|
|
@@ -114,18 +115,13 @@ _SyncLegacyFilesElement_actionContext = new WeakMap();
|
|
|
114
115
|
_SyncLegacyFilesElement_instances = new WeakSet();
|
|
115
116
|
_SyncLegacyFilesElement_onCopy = async function _SyncLegacyFilesElement_onCopy() {
|
|
116
117
|
const modalContext = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
|
|
117
|
-
const
|
|
118
|
-
data:
|
|
119
|
-
headline: this.localize.termOrDefault('uSync_legacyCopyTitle', 'Overwrite files', this._legacy?.latestVersion),
|
|
120
|
-
content: html `${this.localize.termOrDefault('uSync_legacyCopyContent', 'Are you sure you want to overwrite the contents of the folder with the legacy uSync folder files?', this._legacy?.latestFolder)}`,
|
|
121
|
-
color: 'danger',
|
|
122
|
-
confirmLabel: 'Copy',
|
|
123
|
-
},
|
|
118
|
+
const copyModal = modalContext?.open(this, USYNC_LEGACY_MODAL, {
|
|
119
|
+
data: this._legacy,
|
|
124
120
|
});
|
|
125
|
-
|
|
121
|
+
copyModal
|
|
126
122
|
?.onSubmit()
|
|
127
|
-
.then(async () => {
|
|
128
|
-
await __classPrivateFieldGet(this, _SyncLegacyFilesElement_actionContext, "f")?.copyLegacy();
|
|
123
|
+
.then(async (value) => {
|
|
124
|
+
await __classPrivateFieldGet(this, _SyncLegacyFilesElement_actionContext, "f")?.copyLegacy(value?.migrations ?? []);
|
|
129
125
|
window.location.reload();
|
|
130
126
|
})
|
|
131
127
|
.catch(() => {
|
|
@@ -33,14 +33,14 @@ export declare class uSyncWorkspaceContext extends UmbControllerBase implements
|
|
|
33
33
|
* Get the current uSync settings
|
|
34
34
|
*/
|
|
35
35
|
getSettings(): Promise<USyncSettings | undefined>;
|
|
36
|
-
getAddons(): Promise<import("@jumoo/uSync").USyncAddonInfo>;
|
|
37
|
-
getSyncFileInfo(): Promise<SyncFileVersionCheckResult>;
|
|
36
|
+
getAddons(): Promise<import("@jumoo/uSync").USyncAddonInfo | undefined>;
|
|
37
|
+
getSyncFileInfo(): Promise<SyncFileVersionCheckResult | undefined>;
|
|
38
38
|
/**
|
|
39
39
|
* Check to see if there is a legacy uSync folder on disk.
|
|
40
40
|
*/
|
|
41
41
|
checkLegacy(): Promise<SyncLegacyCheckResponse | undefined>;
|
|
42
42
|
ignoreLegacy(): Promise<boolean>;
|
|
43
|
-
copyLegacy(): Promise<boolean>;
|
|
43
|
+
copyLegacy(migrations?: Array<string>): Promise<boolean>;
|
|
44
44
|
/**
|
|
45
45
|
* Get handler defaults.
|
|
46
46
|
*/
|
|
@@ -64,10 +64,15 @@ export declare class uSyncWorkspaceContext extends UmbControllerBase implements
|
|
|
64
64
|
dismissBackgroundRun(): void;
|
|
65
65
|
uploadFile(): Promise<boolean | undefined>;
|
|
66
66
|
downloadFile(): Promise<void>;
|
|
67
|
-
importSingle(item: USyncActionView): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
67
|
+
importSingle(item: USyncActionView): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
|
|
68
68
|
data: USyncActionView;
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
error: undefined;
|
|
70
|
+
} | {
|
|
71
|
+
data: undefined;
|
|
72
|
+
error: unknown;
|
|
73
|
+
}) & {
|
|
74
|
+
request?: Request;
|
|
75
|
+
response?: Response;
|
|
71
76
|
}> | undefined>;
|
|
72
77
|
}
|
|
73
78
|
export default uSyncWorkspaceContext;
|
|
@@ -206,8 +206,8 @@ export class uSyncWorkspaceContext extends UmbControllerBase {
|
|
|
206
206
|
const { data } = await __classPrivateFieldGet(this, _uSyncWorkspaceContext_repository, "f").ignoreLegacy();
|
|
207
207
|
return data ?? false;
|
|
208
208
|
}
|
|
209
|
-
async copyLegacy() {
|
|
210
|
-
const { data } = await __classPrivateFieldGet(this, _uSyncWorkspaceContext_repository, "f").copyLegacy();
|
|
209
|
+
async copyLegacy(migrations = []) {
|
|
210
|
+
const { data } = await __classPrivateFieldGet(this, _uSyncWorkspaceContext_repository, "f").copyLegacy(migrations);
|
|
211
211
|
return data ?? false;
|
|
212
212
|
}
|
|
213
213
|
/**
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"homepage": "https://jumoo.co.uk/uSync",
|
|
9
9
|
"license": "MPL-2.0",
|
|
10
10
|
"type": "module",
|
|
11
|
-
"version": "
|
|
11
|
+
"version": "19.0.0-beta01",
|
|
12
12
|
"main": "./dist/usync.js",
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
14
14
|
"module": "./dist/usync.js",
|
|
@@ -39,13 +39,17 @@
|
|
|
39
39
|
"email": "info@jumoo.co.uk",
|
|
40
40
|
"url": "https://jumoo.co.uk"
|
|
41
41
|
},
|
|
42
|
+
"site": {
|
|
43
|
+
"port": "16903",
|
|
44
|
+
"api": "uSync"
|
|
45
|
+
},
|
|
42
46
|
"scripts": {
|
|
43
47
|
"client:build": "tsc --project ./tsconfig.dist.json",
|
|
44
48
|
"client:pack": "npm pack --pack-destination ./pack",
|
|
45
49
|
"client:publish": "npm publish --tag next",
|
|
46
50
|
"client:make": "npm run client:build && npm run client:pack && npm run client:publish",
|
|
47
51
|
"client:link": "npm link",
|
|
48
|
-
"generate": "openapi
|
|
52
|
+
"generate-client": "node scripts/generate-openapi.js https://localhost:44304/umbraco/openapi/uSync.json",
|
|
49
53
|
"format:fix": "npm run format -- --write",
|
|
50
54
|
"format": "prettier \"src/**/*.ts\" --check",
|
|
51
55
|
"build": "tsc && vite build",
|
|
@@ -56,9 +60,12 @@
|
|
|
56
60
|
"devDependencies": {
|
|
57
61
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
58
62
|
"@microsoft/signalr": "^10.0.11",
|
|
59
|
-
"@umbraco-cms/backoffice": "^
|
|
63
|
+
"@umbraco-cms/backoffice": "^19.0.0-beta1",
|
|
64
|
+
"chalk": "^6.0.0",
|
|
65
|
+
"cross-env": "^10.1.0",
|
|
60
66
|
"eslint": "^10.13.0",
|
|
61
67
|
"lit": "^3.3.3",
|
|
68
|
+
"node-fetch": "^3.3.2",
|
|
62
69
|
"prettier": "^3.9.10",
|
|
63
70
|
"typescript": "^5.9.3",
|
|
64
71
|
"vite": "^8.3.4",
|
package/dist/hey-api.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { CreateClientConfig } from './api/client.gen';
|
|
2
|
-
/**
|
|
3
|
-
* Pre-configure the generated client by copying the Umbraco HTTP client's config.
|
|
4
|
-
*
|
|
5
|
-
* Called automatically by the generated client during initialization (via runtimeConfigPath).
|
|
6
|
-
* Inherits baseUrl, credentials, auth, and headers from umbHttpClient — which is already
|
|
7
|
-
* configured by the backoffice before extensions load.
|
|
8
|
-
*
|
|
9
|
-
* @see https://heyapi.dev/openapi-ts/clients/fetch#configuration
|
|
10
|
-
*/
|
|
11
|
-
export declare const createClientConfig: CreateClientConfig;
|
package/dist/hey-api.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { umbHttpClient } from '@umbraco-cms/backoffice/http-client';
|
|
2
|
-
/**
|
|
3
|
-
* Pre-configure the generated client by copying the Umbraco HTTP client's config.
|
|
4
|
-
*
|
|
5
|
-
* Called automatically by the generated client during initialization (via runtimeConfigPath).
|
|
6
|
-
* Inherits baseUrl, credentials, auth, and headers from umbHttpClient — which is already
|
|
7
|
-
* configured by the backoffice before extensions load.
|
|
8
|
-
*
|
|
9
|
-
* @see https://heyapi.dev/openapi-ts/clients/fetch#configuration
|
|
10
|
-
*/
|
|
11
|
-
export const createClientConfig = (config) => ({
|
|
12
|
-
...config,
|
|
13
|
-
...umbHttpClient.getConfig(),
|
|
14
|
-
});
|