@jumoo/usync-expansions 17.6.1-prerelease.40 → 17.6.1-prerelease.41
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/index.d.ts +1 -1
- package/dist/api/sdk.gen.d.ts +2 -1
- package/dist/api/sdk.gen.js +7 -0
- package/dist/api/types.gen.d.ts +38 -0
- package/dist/lang/en.d.ts +1 -0
- package/dist/lang/en.js +1 -0
- package/dist/restore/restore.repository.d.ts +5 -0
- package/dist/restore/restore.repository.js +7 -0
- package/dist/restore/steps/restore-report-element.d.ts +1 -0
- package/dist/restore/steps/restore-report-element.js +29 -1
- package/package.json +2 -2
package/dist/api/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { client, type CreateClientConfig } from './client.gen';
|
|
2
2
|
export { FilesService, ItemsService, LicenceService, type Options, RestoreService } from './sdk.gen';
|
|
3
|
-
export { type Assembly, type AssemblyWritable, CallingConventions, ChangeDetailType, ChangeType, type CheckLegacyData, type CheckLegacyErrors, type CheckLegacyResponse, type CheckLegacyResponses, type CleanData, type CleanErrors, type CleanResponses, type ClientOptions, type ConstructorInfo, type ConstructorInfoWritable, type CustomAttributeData, type CustomAttributeDataWritable, type CustomAttributeNamedArgument, type CustomAttributeNamedArgumentWritable, type CustomAttributeTypedArgument, type CustomAttributeTypedArgumentWritable, DependencyFlags, EventAttributes, type EventInfo, type EventInfoWritable, type Exception, type ExceptionWritable, FieldAttributes, type FieldInfo, type FieldInfoWritable, GenericParameterAttributes, type GetActionViewData, type GetActionViewErrors, type GetActionViewResponse, type GetActionViewResponses, type GetAllData, type GetAllErrors, type GetAllResponse, type GetAllResponses, type GetLicenceData, type GetLicenceErrors, type GetLicenceResponse, type GetLicenceResponses, type GetLicenceStatusData, type GetLicenceStatusErrors, type GetLicenceStatusResponse, type GetLicenceStatusResponses, type GetReportData, type GetReportErrors, type GetReportResponse, type GetReportResponses, type GetRestorePointData, type GetRestorePointErrors, type GetRestorePointResponse, type GetRestorePointResponses, type GetSyncItemData, type GetSyncItemErrors, type GetSyncItemResponse, type GetSyncItemResponses, type HasRootFilesData, type HasRootFilesErrors, type HasRootFilesResponse, type HasRootFilesResponses, type ICustomAttributeProvider, type IntPtr, type IsLicencedData, type IsLicencedErrors, type IsLicencedResponse, type IsLicencedResponses, LayoutKind, type Licence, type LicencedProduct, type LicenceInfo, LicenceStatus, type LicenceStatusView, LicenceType, type LicenceWritable, type MemberInfo, type MemberInfoWritable, MemberTypes, MethodAttributes, type MethodBase, type MethodBaseWritable, MethodImplAttributes, type MethodInfo, type MethodInfoWritable, type Module, type ModuleHandle, type ModuleWritable, ParameterAttributes, type ParameterInfo, type ParameterInfoWritable, PropertyAttributes, type PropertyInfo, type PropertyInfoWritable, type RemoveData, type RemoveErrors, type RemoveResponses, type RestorePoint, type RestorePointProcessingOptions, type RestorePointProcessingOptionsWritable, RestorePointStatus, type RuntimeFieldHandle, type RuntimeMethodHandle, type RuntimeTypeHandle, type SaveLicenceData, type SaveLicenceErrors, type SaveLicenceResponse, type SaveLicenceResponses, type ScanData, type ScanErrors, type ScanResponse, type ScanResponses, SecurityRuleSet, type StructLayoutAttribute, type StructLayoutAttributeWritable, type SyncEntity, type SyncEntityWritable, type SyncItem, type SyncItemWritable, type SyncPackAttributes, type SyncPackOptions, type Type, TypeAttributes, type TypeInfo, type TypeInfoWritable, type TypeWritable, type UdiModel, type USyncAction, type USyncActionView, type USyncActionWritable, type USyncChange } from './types.gen';
|
|
3
|
+
export { type Assembly, type AssemblyWritable, CallingConventions, ChangeDetailType, ChangeType, type CheckLegacyData, type CheckLegacyErrors, type CheckLegacyResponse, type CheckLegacyResponses, type CleanData, type CleanErrors, type CleanResponses, type ClientOptions, type ConstructorInfo, type ConstructorInfoWritable, type CustomAttributeData, type CustomAttributeDataWritable, type CustomAttributeNamedArgument, type CustomAttributeNamedArgumentWritable, type CustomAttributeTypedArgument, type CustomAttributeTypedArgumentWritable, DependencyFlags, EventAttributes, type EventInfo, type EventInfoWritable, type Exception, type ExceptionWritable, FieldAttributes, type FieldInfo, type FieldInfoWritable, GenericParameterAttributes, type GetActionViewData, type GetActionViewErrors, type GetActionViewResponse, type GetActionViewResponses, type GetAllData, type GetAllErrors, type GetAllResponse, type GetAllResponses, type GetLicenceData, type GetLicenceErrors, type GetLicenceResponse, type GetLicenceResponses, type GetLicenceStatusData, type GetLicenceStatusErrors, type GetLicenceStatusResponse, type GetLicenceStatusResponses, type GetPreviewData, type GetPreviewErrors, type GetPreviewResponse, type GetPreviewResponses, type GetReportData, type GetReportErrors, type GetReportResponse, type GetReportResponses, type GetRestorePointData, type GetRestorePointErrors, type GetRestorePointResponse, type GetRestorePointResponses, type GetSyncItemData, type GetSyncItemErrors, type GetSyncItemResponse, type GetSyncItemResponses, type HasRootFilesData, type HasRootFilesErrors, type HasRootFilesResponse, type HasRootFilesResponses, type ICustomAttributeProvider, type IntPtr, type IsLicencedData, type IsLicencedErrors, type IsLicencedResponse, type IsLicencedResponses, LayoutKind, type Licence, type LicencedProduct, type LicenceInfo, LicenceStatus, type LicenceStatusView, LicenceType, type LicenceWritable, type MemberInfo, type MemberInfoWritable, MemberTypes, MethodAttributes, type MethodBase, type MethodBaseWritable, MethodImplAttributes, type MethodInfo, type MethodInfoWritable, type Module, type ModuleHandle, type ModuleWritable, ParameterAttributes, type ParameterInfo, type ParameterInfoWritable, PropertyAttributes, type PropertyInfo, type PropertyInfoWritable, type RemoveData, type RemoveErrors, type RemoveResponses, type RestorePoint, type RestorePointProcessingOptions, type RestorePointProcessingOptionsWritable, RestorePointStatus, type RuntimeFieldHandle, type RuntimeMethodHandle, type RuntimeTypeHandle, type SaveLicenceData, type SaveLicenceErrors, type SaveLicenceResponse, type SaveLicenceResponses, type ScanData, type ScanErrors, type ScanResponse, type ScanResponses, SecurityRuleSet, type StructLayoutAttribute, type StructLayoutAttributeWritable, type SyncEntity, type SyncEntityWritable, type SyncItem, type SyncItemPreviewResponse, type SyncItemWritable, type SyncPackAttributes, type SyncPackOptions, type Type, TypeAttributes, type TypeInfo, type TypeInfoWritable, type TypeWritable, type UdiModel, type USyncAction, type USyncActionView, type USyncActionWritable, type USyncChange } from './types.gen';
|
package/dist/api/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client';
|
|
2
|
-
import type { CheckLegacyData, CheckLegacyErrors, CheckLegacyResponses, CleanData, CleanErrors, CleanResponses, GetActionViewData, GetActionViewErrors, GetActionViewResponses, GetAllData, GetAllErrors, GetAllResponses, GetLicenceData, GetLicenceErrors, GetLicenceResponses, GetLicenceStatusData, GetLicenceStatusErrors, GetLicenceStatusResponses, GetReportData, GetReportErrors, GetReportResponses, GetRestorePointData, GetRestorePointErrors, GetRestorePointResponses, GetSyncItemData, GetSyncItemErrors, GetSyncItemResponses, HasRootFilesData, HasRootFilesErrors, HasRootFilesResponses, IsLicencedData, IsLicencedErrors, IsLicencedResponses, RemoveData, RemoveErrors, RemoveResponses, SaveLicenceData, SaveLicenceErrors, SaveLicenceResponses, ScanData, ScanErrors, ScanResponses } from './types.gen';
|
|
2
|
+
import type { CheckLegacyData, CheckLegacyErrors, CheckLegacyResponses, CleanData, CleanErrors, CleanResponses, GetActionViewData, GetActionViewErrors, GetActionViewResponses, GetAllData, GetAllErrors, GetAllResponses, GetLicenceData, GetLicenceErrors, GetLicenceResponses, GetLicenceStatusData, GetLicenceStatusErrors, GetLicenceStatusResponses, GetPreviewData, GetPreviewErrors, GetPreviewResponses, GetReportData, GetReportErrors, GetReportResponses, GetRestorePointData, GetRestorePointErrors, GetRestorePointResponses, GetSyncItemData, GetSyncItemErrors, GetSyncItemResponses, HasRootFilesData, HasRootFilesErrors, HasRootFilesResponses, IsLicencedData, IsLicencedErrors, IsLicencedResponses, RemoveData, RemoveErrors, RemoveResponses, SaveLicenceData, SaveLicenceErrors, SaveLicenceResponses, ScanData, ScanErrors, ScanResponses } from './types.gen';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -32,6 +32,7 @@ export declare class RestoreService {
|
|
|
32
32
|
static getRestorePoint<ThrowOnError extends boolean = true>(options?: Options<GetRestorePointData, ThrowOnError>): RequestResult<GetRestorePointResponses, GetRestorePointErrors, ThrowOnError>;
|
|
33
33
|
static getAll<ThrowOnError extends boolean = true>(options?: Options<GetAllData, ThrowOnError>): RequestResult<GetAllResponses, GetAllErrors, ThrowOnError>;
|
|
34
34
|
static getReport<ThrowOnError extends boolean = true>(options?: Options<GetReportData, ThrowOnError>): RequestResult<GetReportResponses, GetReportErrors, ThrowOnError>;
|
|
35
|
+
static getPreview<ThrowOnError extends boolean = true>(options?: Options<GetPreviewData, ThrowOnError>): RequestResult<GetPreviewResponses, GetPreviewErrors, ThrowOnError>;
|
|
35
36
|
static remove<ThrowOnError extends boolean = true>(options?: Options<RemoveData, ThrowOnError>): RequestResult<RemoveResponses, RemoveErrors, ThrowOnError>;
|
|
36
37
|
static scan<ThrowOnError extends boolean = true>(options?: Options<ScanData, ThrowOnError>): RequestResult<ScanResponses, ScanErrors, ThrowOnError>;
|
|
37
38
|
}
|
package/dist/api/sdk.gen.js
CHANGED
|
@@ -95,6 +95,13 @@ export class RestoreService {
|
|
|
95
95
|
...options
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
+
static getPreview(options) {
|
|
99
|
+
return (options?.client ?? client).get({
|
|
100
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
101
|
+
url: '/umbraco/usync/api/v1/Complete/Preview',
|
|
102
|
+
...options
|
|
103
|
+
});
|
|
104
|
+
}
|
|
98
105
|
static remove(options) {
|
|
99
106
|
return (options?.client ?? client).get({
|
|
100
107
|
security: [{ scheme: 'bearer', type: 'http' }],
|
package/dist/api/types.gen.d.ts
CHANGED
|
@@ -568,6 +568,17 @@ export type SyncItem = {
|
|
|
568
568
|
flags: DependencyFlags;
|
|
569
569
|
change: ChangeType;
|
|
570
570
|
};
|
|
571
|
+
export type SyncItemPreviewResponse = {
|
|
572
|
+
key: string;
|
|
573
|
+
handler: string;
|
|
574
|
+
itemType: string;
|
|
575
|
+
entityType: string;
|
|
576
|
+
isDelete: boolean;
|
|
577
|
+
success: boolean;
|
|
578
|
+
message?: string | null;
|
|
579
|
+
preview?: unknown;
|
|
580
|
+
details: Array<USyncChange>;
|
|
581
|
+
};
|
|
571
582
|
export type SyncPackAttributes = {
|
|
572
583
|
orphanTypes: Array<string>;
|
|
573
584
|
allowRootClean: boolean;
|
|
@@ -1210,6 +1221,33 @@ export type GetReportResponses = {
|
|
|
1210
1221
|
200: Array<USyncAction>;
|
|
1211
1222
|
};
|
|
1212
1223
|
export type GetReportResponse = GetReportResponses[keyof GetReportResponses];
|
|
1224
|
+
export type GetPreviewData = {
|
|
1225
|
+
body?: never;
|
|
1226
|
+
path?: never;
|
|
1227
|
+
query?: {
|
|
1228
|
+
id?: string;
|
|
1229
|
+
handler?: string;
|
|
1230
|
+
key?: string;
|
|
1231
|
+
};
|
|
1232
|
+
url: '/umbraco/usync/api/v1/Complete/Preview';
|
|
1233
|
+
};
|
|
1234
|
+
export type GetPreviewErrors = {
|
|
1235
|
+
/**
|
|
1236
|
+
* The resource is protected and requires an authentication token
|
|
1237
|
+
*/
|
|
1238
|
+
401: unknown;
|
|
1239
|
+
/**
|
|
1240
|
+
* Not Found
|
|
1241
|
+
*/
|
|
1242
|
+
404: unknown;
|
|
1243
|
+
};
|
|
1244
|
+
export type GetPreviewResponses = {
|
|
1245
|
+
/**
|
|
1246
|
+
* OK
|
|
1247
|
+
*/
|
|
1248
|
+
200: SyncItemPreviewResponse;
|
|
1249
|
+
};
|
|
1250
|
+
export type GetPreviewResponse = GetPreviewResponses[keyof GetPreviewResponses];
|
|
1213
1251
|
export type RemoveData = {
|
|
1214
1252
|
body?: never;
|
|
1215
1253
|
path?: never;
|
package/dist/lang/en.d.ts
CHANGED
package/dist/lang/en.js
CHANGED
|
@@ -8,6 +8,11 @@ export declare class SyncRestoreRepository extends UmbControllerBase {
|
|
|
8
8
|
getAll(): Promise<import("..").RestorePoint[]>;
|
|
9
9
|
get(key: string): Promise<import("..").RestorePoint>;
|
|
10
10
|
getReport(id: string): Promise<import("..").USyncAction[]>;
|
|
11
|
+
/**
|
|
12
|
+
* what restoring an item from the restore point in a report would do to it.
|
|
13
|
+
* handlers that don't support previews return a 404, so there's no notification.
|
|
14
|
+
*/
|
|
15
|
+
getPreview(id: string, handler: string, key: string): Promise<import("..").SyncItemPreviewResponse>;
|
|
11
16
|
scan(): Promise<{
|
|
12
17
|
[key: string]: number;
|
|
13
18
|
}>;
|
|
@@ -35,6 +35,13 @@ export class SyncRestoreRepository extends UmbControllerBase {
|
|
|
35
35
|
return (await tryExecute(__classPrivateFieldGet(this, _SyncRestoreRepository_host, "f"), RestoreService.getReport({ query: { id } })))
|
|
36
36
|
.data;
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* what restoring an item from the restore point in a report would do to it.
|
|
40
|
+
* handlers that don't support previews return a 404, so there's no notification.
|
|
41
|
+
*/
|
|
42
|
+
async getPreview(id, handler, key) {
|
|
43
|
+
return (await tryExecute(__classPrivateFieldGet(this, _SyncRestoreRepository_host, "f"), RestoreService.getPreview({ query: { id, handler, key } }), { disableNotifications: true })).data;
|
|
44
|
+
}
|
|
38
45
|
async scan() {
|
|
39
46
|
return (await tryExecute(__classPrivateFieldGet(this, _SyncRestoreRepository_host, "f"), RestoreService.scan())).data;
|
|
40
47
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ProcessStepElement, ProcessStepElementBase } from '@jumoo/processing';
|
|
2
2
|
export declare class uSyncRestoreReportElement extends ProcessStepElementBase implements ProcessStepElement {
|
|
3
|
+
#private;
|
|
3
4
|
connectedCallback(): void;
|
|
4
5
|
render(): import("lit-html").TemplateResult<1>;
|
|
5
6
|
}
|
|
@@ -4,10 +4,31 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
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 _uSyncRestoreReportElement_repository, _uSyncRestoreReportElement_previewSource;
|
|
7
13
|
import { ProcessStepElementBase } from '@jumoo/processing';
|
|
8
14
|
import { uSyncRestore } from '@jumoo/usync-expansions';
|
|
9
15
|
import { customElement, html } from '@umbraco-cms/backoffice/external/lit';
|
|
16
|
+
import { SyncRestoreRepository } from '../restore.repository';
|
|
10
17
|
let uSyncRestoreReportElement = class uSyncRestoreReportElement extends ProcessStepElementBase {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
_uSyncRestoreReportElement_repository.set(this, new SyncRestoreRepository(this));
|
|
21
|
+
/**
|
|
22
|
+
* previews come from the restore point being reported on, not this site's uSync folders.
|
|
23
|
+
*/
|
|
24
|
+
_uSyncRestoreReportElement_previewSource.set(this, async (item) => {
|
|
25
|
+
if (!this.pipelineId)
|
|
26
|
+
return undefined;
|
|
27
|
+
const data = await __classPrivateFieldGet(this, _uSyncRestoreReportElement_repository, "f").getPreview(this.pipelineId, item.handler, item.key);
|
|
28
|
+
// the same response as uSync's own preview endpoint, generated in our api.
|
|
29
|
+
return data;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
11
32
|
connectedCallback() {
|
|
12
33
|
super.connectedCallback();
|
|
13
34
|
const changes = this.results?.results['changes'] ?? 0;
|
|
@@ -29,9 +50,16 @@ let uSyncRestoreReportElement = class uSyncRestoreReportElement extends ProcessS
|
|
|
29
50
|
}
|
|
30
51
|
render() {
|
|
31
52
|
const actions = this.results?.results['actions'];
|
|
32
|
-
return html `<usync-results
|
|
53
|
+
return html `<usync-results
|
|
54
|
+
.results=${actions}
|
|
55
|
+
.previewSource=${__classPrivateFieldGet(this, _uSyncRestoreReportElement_previewSource, "f")}
|
|
56
|
+
.previewLabels=${{
|
|
57
|
+
incoming: this.localize.termOrDefault('uSyncReport_previewIncoming', 'Incoming (restore point)'),
|
|
58
|
+
}}></usync-results>`;
|
|
33
59
|
}
|
|
34
60
|
};
|
|
61
|
+
_uSyncRestoreReportElement_repository = new WeakMap();
|
|
62
|
+
_uSyncRestoreReportElement_previewSource = new WeakMap();
|
|
35
63
|
uSyncRestoreReportElement = __decorate([
|
|
36
64
|
customElement(uSyncRestore.steps.restoreReportStep)
|
|
37
65
|
], uSyncRestoreReportElement);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jumoo/usync-expansions",
|
|
3
3
|
"license": "Custom",
|
|
4
|
-
"version": "17.6.1-prerelease.
|
|
4
|
+
"version": "17.6.1-prerelease.41",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "uSync.Expansions.Assets",
|
|
7
7
|
"repository": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
42
42
|
"@jumoo/processing": "https://registry.npmjs.org/@jumoo/processing/-/processing-17.5.2.tgz",
|
|
43
|
-
"@jumoo/usync": "^17.
|
|
43
|
+
"@jumoo/usync": "^17.6.1-prerelease.21",
|
|
44
44
|
"@umbraco-cms/backoffice": "^17.6.2",
|
|
45
45
|
"chalk": "^6.0.0",
|
|
46
46
|
"cross-env": "^10.1.0",
|