@jumoo/processing 17.4.2 → 17.4.3-prerelease.10
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/index.js +1 -1
- package/dist/api/sdk.gen.d.ts +4 -1
- package/dist/api/sdk.gen.js +25 -0
- package/dist/api/types.gen.d.ts +197 -1
- package/dist/api/types.gen.js +17 -0
- package/dist/lang/files/en.d.ts +26 -0
- package/dist/lang/files/en.js +26 -0
- package/dist/pipeline/components/background.element.js +24 -23
- package/dist/pipeline/components/pipeline-list.element.js +29 -28
- package/dist/pipeline/components/pipeline-table.element.js +23 -23
- package/dist/pipeline/components/process-error.element.js +39 -39
- package/dist/pipeline/components/progress.element.js +122 -122
- package/dist/pipeline/components/progress.step.element.js +5 -5
- package/dist/pipeline/index.d.ts +1 -0
- package/dist/pipeline/index.js +1 -0
- package/dist/pipeline/modal/errors/error-modal.element.js +87 -87
- package/dist/pipeline/modal/pipeline-modal.element.js +34 -34
- package/dist/pipeline/pipeline-conflict.d.ts +31 -0
- package/dist/pipeline/pipeline-conflict.js +42 -0
- package/dist/pipeline/pipeline.context.d.ts +6 -1
- package/dist/pipeline/pipeline.context.js +43 -8
- package/dist/pipeline/pipeline.element.d.ts +11 -0
- package/dist/pipeline/pipeline.element.js +157 -27
- package/dist/pipeline/pipeline.repository.d.ts +26 -0
- package/dist/pipeline/pipeline.repository.js +22 -0
- package/dist/pipeline/pipeline.source.d.ts +19 -1
- package/dist/pipeline/pipeline.source.js +23 -4
- package/dist/pipeline/workspace/views/default-pipeline-view.js +18 -18
- package/dist/queue/components/queue-list.element.js +17 -17
- package/dist/queue/components/queue-table.element.js +15 -15
- package/package.json +58 -51
|
@@ -3,6 +3,10 @@ import { PipelineStatus } from '../api';
|
|
|
3
3
|
export declare class PipelineSource {
|
|
4
4
|
private readonly host;
|
|
5
5
|
constructor(host: UmbControllerHost);
|
|
6
|
+
/**
|
|
7
|
+
* @description a 409 (another pipeline holds this one's concurrency key, so it can't resume)
|
|
8
|
+
* is returned as the error without a notification - see getPipelineConflict.
|
|
9
|
+
*/
|
|
6
10
|
process(id: string, clientId: string | null): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
7
11
|
data: import("..").Pipeline;
|
|
8
12
|
request: Request;
|
|
@@ -19,6 +23,10 @@ export declare class PipelineSource {
|
|
|
19
23
|
request: Request;
|
|
20
24
|
response: Response;
|
|
21
25
|
}>>;
|
|
26
|
+
/**
|
|
27
|
+
* @description a 409 (the new options' concurrency key is held) is returned as the error
|
|
28
|
+
* without a notification - see getPipelineConflict.
|
|
29
|
+
*/
|
|
22
30
|
update(id: string, body: any): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
23
31
|
data: import("..").ProcessingOptionsResults;
|
|
24
32
|
request: Request;
|
|
@@ -42,7 +50,8 @@ export declare class PipelineSource {
|
|
|
42
50
|
/**
|
|
43
51
|
*
|
|
44
52
|
* @param strategy alias of the strategy to use for the pipeline
|
|
45
|
-
* @returns
|
|
53
|
+
* @returns the new pipeline's id. A 409 (another pipeline holds its concurrency key) is
|
|
54
|
+
* returned as the error without a notification - see getPipelineConflict.
|
|
46
55
|
*/
|
|
47
56
|
create(processor: string, strategy: string, options: any): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
48
57
|
data: string;
|
|
@@ -68,6 +77,15 @@ export declare class PipelineSource {
|
|
|
68
77
|
request: Request;
|
|
69
78
|
response: Response;
|
|
70
79
|
}>>;
|
|
80
|
+
/**
|
|
81
|
+
* @param id guid id of the pipeline
|
|
82
|
+
* @returns its run status, or an error (without a notification) if the user can't see it.
|
|
83
|
+
*/
|
|
84
|
+
getRunStatus(id: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
85
|
+
data: import("..").PipelineRunStatus;
|
|
86
|
+
request: Request;
|
|
87
|
+
response: Response;
|
|
88
|
+
}>>;
|
|
71
89
|
listPiplelines(status: PipelineStatus): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
72
90
|
data: import("..").Pipeline[];
|
|
73
91
|
request: Request;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { tryExecute } from '@umbraco-cms/backoffice/resources';
|
|
2
2
|
import { PipelinesService } from '../api';
|
|
3
|
+
import { tryExecuteAllowingConflict } from './pipeline-conflict.js';
|
|
3
4
|
export class PipelineSource {
|
|
4
5
|
constructor(host) {
|
|
5
6
|
this.host = host;
|
|
6
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* @description a 409 (another pipeline holds this one's concurrency key, so it can't resume)
|
|
10
|
+
* is returned as the error without a notification - see getPipelineConflict.
|
|
11
|
+
*/
|
|
7
12
|
async process(id, clientId) {
|
|
8
|
-
const result = await
|
|
13
|
+
const result = await tryExecuteAllowingConflict(this.host, PipelinesService.processPipeline({
|
|
9
14
|
path: { id: id },
|
|
10
15
|
query: { clientId: clientId ?? undefined },
|
|
11
16
|
}));
|
|
@@ -24,8 +29,12 @@ export class PipelineSource {
|
|
|
24
29
|
}));
|
|
25
30
|
return result;
|
|
26
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* @description a 409 (the new options' concurrency key is held) is returned as the error
|
|
34
|
+
* without a notification - see getPipelineConflict.
|
|
35
|
+
*/
|
|
27
36
|
async update(id, body) {
|
|
28
|
-
return await
|
|
37
|
+
return await tryExecuteAllowingConflict(this.host, PipelinesService.updatePipeline({
|
|
29
38
|
path: { id: id },
|
|
30
39
|
body: body,
|
|
31
40
|
}));
|
|
@@ -44,10 +53,11 @@ export class PipelineSource {
|
|
|
44
53
|
/**
|
|
45
54
|
*
|
|
46
55
|
* @param strategy alias of the strategy to use for the pipeline
|
|
47
|
-
* @returns
|
|
56
|
+
* @returns the new pipeline's id. A 409 (another pipeline holds its concurrency key) is
|
|
57
|
+
* returned as the error without a notification - see getPipelineConflict.
|
|
48
58
|
*/
|
|
49
59
|
async create(processor, strategy, options) {
|
|
50
|
-
return await
|
|
60
|
+
return await tryExecuteAllowingConflict(this.host, PipelinesService.createPipeline({
|
|
51
61
|
body: {
|
|
52
62
|
alias: processor,
|
|
53
63
|
strategy: strategy,
|
|
@@ -73,6 +83,15 @@ export class PipelineSource {
|
|
|
73
83
|
path: { id: id },
|
|
74
84
|
}));
|
|
75
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* @param id guid id of the pipeline
|
|
88
|
+
* @returns its run status, or an error (without a notification) if the user can't see it.
|
|
89
|
+
*/
|
|
90
|
+
async getRunStatus(id) {
|
|
91
|
+
return await tryExecute(this.host, PipelinesService.pipelineStatus({ path: { id: id } }), {
|
|
92
|
+
disableNotifications: true,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
76
95
|
async listPiplelines(status) {
|
|
77
96
|
return await tryExecute(this.host, PipelinesService.listPipelines({ path: { status: status } }));
|
|
78
97
|
}
|
|
@@ -50,30 +50,30 @@ let JumooProcessingPipelineWorkspaceDefaultViewElement = class JumooProcessingPi
|
|
|
50
50
|
this.progressLabel = this.localize.term('jumooProc_process');
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
|
-
return html `<umb-body-layout .headline=${this.headline}>
|
|
54
|
-
<jumoo-pipeline
|
|
55
|
-
.pipelineId=${this.pipeline?.id}
|
|
56
|
-
.setup=${this.pipeline?.options}
|
|
57
|
-
.debug=${false}
|
|
58
|
-
@pipeline-status=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onStatusChange)}
|
|
59
|
-
@pipeline-valid=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onSetValid)}
|
|
60
|
-
@pipeline-complete=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onComplete)}
|
|
61
|
-
@pipeline-modal-update=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onUpdateModal)}></jumoo-pipeline>
|
|
62
|
-
<div slot="actions">${this.renderActions()}</div>
|
|
53
|
+
return html `<umb-body-layout .headline=${this.headline}>
|
|
54
|
+
<jumoo-pipeline
|
|
55
|
+
.pipelineId=${this.pipeline?.id}
|
|
56
|
+
.setup=${this.pipeline?.options}
|
|
57
|
+
.debug=${false}
|
|
58
|
+
@pipeline-status=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onStatusChange)}
|
|
59
|
+
@pipeline-valid=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onSetValid)}
|
|
60
|
+
@pipeline-complete=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onComplete)}
|
|
61
|
+
@pipeline-modal-update=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onUpdateModal)}></jumoo-pipeline>
|
|
62
|
+
<div slot="actions">${this.renderActions()}</div>
|
|
63
63
|
</umb-body-layout>`;
|
|
64
64
|
}
|
|
65
65
|
renderActions() {
|
|
66
66
|
const actionButton = this._status === PipelineStatus.WAITING && this._isValid && !this._isLastAction
|
|
67
|
-
? html `<uui-button
|
|
68
|
-
@click=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onProcess)}
|
|
69
|
-
color="positive"
|
|
70
|
-
look="primary"
|
|
67
|
+
? html `<uui-button
|
|
68
|
+
@click=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onProcess)}
|
|
69
|
+
color="positive"
|
|
70
|
+
look="primary"
|
|
71
71
|
.label=${this.progressLabel}></uui-button>`
|
|
72
72
|
: nothing;
|
|
73
|
-
const closeButton = html `<uui-button
|
|
74
|
-
@click=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onClose)}
|
|
75
|
-
color="default"
|
|
76
|
-
look="default"
|
|
73
|
+
const closeButton = html `<uui-button
|
|
74
|
+
@click=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onClose)}
|
|
75
|
+
color="default"
|
|
76
|
+
look="default"
|
|
77
77
|
label=${this.closeLabel}></uui-button>`;
|
|
78
78
|
return html `${closeButton} ${actionButton}`;
|
|
79
79
|
}
|
|
@@ -27,34 +27,34 @@ let JumooQueueListElement = class JumooQueueListElement extends UmbLitElement {
|
|
|
27
27
|
this.loading = false;
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return html `<uui-box style="--uui-box-default-padding: 0;" .headline=${this.headline}>
|
|
31
|
-
<div slot="header-actions">
|
|
32
|
-
<uui-button label="refresh" @click=${this.onRefresh} compact
|
|
33
|
-
><uui-icon name="icon-refresh"></uui-icon
|
|
34
|
-
></uui-button>
|
|
35
|
-
</div>
|
|
36
|
-
${when(this.loading, () => html `<uui-loader-bar
|
|
37
|
-
animationDuration="1.5"
|
|
38
|
-
style="color: black"></uui-loader-bar>`, () => this.renderTable())}
|
|
30
|
+
return html `<uui-box style="--uui-box-default-padding: 0;" .headline=${this.headline}>
|
|
31
|
+
<div slot="header-actions">
|
|
32
|
+
<uui-button label="refresh" @click=${this.onRefresh} compact
|
|
33
|
+
><uui-icon name="icon-refresh"></uui-icon
|
|
34
|
+
></uui-button>
|
|
35
|
+
</div>
|
|
36
|
+
${when(this.loading, () => html `<uui-loader-bar
|
|
37
|
+
animationDuration="1.5"
|
|
38
|
+
style="color: black"></uui-loader-bar>`, () => this.renderTable())}
|
|
39
39
|
</uui-box>`;
|
|
40
40
|
}
|
|
41
41
|
renderTable() {
|
|
42
42
|
return !this.queue || !this.queue.items.length
|
|
43
43
|
? html `<div class="emtpy">Nothing in the queue</div>`
|
|
44
|
-
: html `<jumoo-queue-table
|
|
45
|
-
.items=${this.queue.items}
|
|
44
|
+
: html `<jumoo-queue-table
|
|
45
|
+
.items=${this.queue.items}
|
|
46
46
|
@process-queue-item=${this._onProcessQueueItem}></jumoo-queue-table>`;
|
|
47
47
|
}
|
|
48
48
|
async _onProcessQueueItem(e) {
|
|
49
49
|
await this._queueContext.process(e.detail.key);
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
JumooQueueListElement.styles = css `
|
|
53
|
-
.emtpy {
|
|
54
|
-
display: flex;
|
|
55
|
-
justify-content: center;
|
|
56
|
-
padding: var(--uui-size-space-5);
|
|
57
|
-
}
|
|
52
|
+
JumooQueueListElement.styles = css `
|
|
53
|
+
.emtpy {
|
|
54
|
+
display: flex;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
padding: var(--uui-size-space-5);
|
|
57
|
+
}
|
|
58
58
|
`;
|
|
59
59
|
__decorate([
|
|
60
60
|
property({ type: String })
|
|
@@ -93,24 +93,24 @@ let JumooQueueTableElement = class JumooQueueTableElement extends UmbLitElement
|
|
|
93
93
|
};
|
|
94
94
|
})
|
|
95
95
|
.filter((item) => item !== undefined);
|
|
96
|
-
return html ` <umb-table
|
|
97
|
-
.items=${items}
|
|
98
|
-
.config=${this.tableConfig}
|
|
99
|
-
.columns=${this.tableColumns}
|
|
96
|
+
return html ` <umb-table
|
|
97
|
+
.items=${items}
|
|
98
|
+
.config=${this.tableConfig}
|
|
99
|
+
.columns=${this.tableColumns}
|
|
100
100
|
.filter=${this.filter}></umb-table>`;
|
|
101
101
|
}
|
|
102
102
|
renderActions(item) {
|
|
103
|
-
return html ` <uui-button-group>
|
|
104
|
-
${when(this.showViewDetails, () => html ` <uui-button
|
|
105
|
-
label="Details"
|
|
106
|
-
color="default"
|
|
107
|
-
look="primary"
|
|
108
|
-
@click=${() => __classPrivateFieldGet(this, _JumooQueueTableElement_instances, "m", _JumooQueueTableElement_onViewDetails).call(this, item)}></uui-button>`)}
|
|
109
|
-
${when(!this.hideProcess, () => html ` <uui-button
|
|
110
|
-
label="Process"
|
|
111
|
-
color="positive"
|
|
112
|
-
look="outline"
|
|
113
|
-
@click=${() => __classPrivateFieldGet(this, _JumooQueueTableElement_instances, "m", _JumooQueueTableElement_onProcess).call(this, item)}></uui-button>`)}
|
|
103
|
+
return html ` <uui-button-group>
|
|
104
|
+
${when(this.showViewDetails, () => html ` <uui-button
|
|
105
|
+
label="Details"
|
|
106
|
+
color="default"
|
|
107
|
+
look="primary"
|
|
108
|
+
@click=${() => __classPrivateFieldGet(this, _JumooQueueTableElement_instances, "m", _JumooQueueTableElement_onViewDetails).call(this, item)}></uui-button>`)}
|
|
109
|
+
${when(!this.hideProcess, () => html ` <uui-button
|
|
110
|
+
label="Process"
|
|
111
|
+
color="positive"
|
|
112
|
+
look="outline"
|
|
113
|
+
@click=${() => __classPrivateFieldGet(this, _JumooQueueTableElement_instances, "m", _JumooQueueTableElement_onProcess).call(this, item)}></uui-button>`)}
|
|
114
114
|
</uui-button-group>`;
|
|
115
115
|
}
|
|
116
116
|
};
|
package/package.json
CHANGED
|
@@ -1,51 +1,58 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@jumoo/processing",
|
|
3
|
-
"licence": "custom",
|
|
4
|
-
"version": "17.4.
|
|
5
|
-
"type": "module",
|
|
6
|
-
"description": "Jumoo processing library",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": "./dist/index.js",
|
|
9
|
-
"./pipeline": "./dist/pipeline/index.js",
|
|
10
|
-
"./signalr": "./dist/signalr/index.js",
|
|
11
|
-
"./api": "./dist/api/index.js"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"./dist/**/*"
|
|
15
|
-
],
|
|
16
|
-
"author": {
|
|
17
|
-
"name": "Jumoo",
|
|
18
|
-
"email": "info@jumoo.co.uk",
|
|
19
|
-
"url": "https://jumoo.co.uk"
|
|
20
|
-
},
|
|
21
|
-
"publishConfig": {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"client:
|
|
26
|
-
"client:
|
|
27
|
-
"client:
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@jumoo/processing",
|
|
3
|
+
"licence": "custom",
|
|
4
|
+
"version": "17.4.3-prerelease.10",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Jumoo processing library",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./dist/index.js",
|
|
9
|
+
"./pipeline": "./dist/pipeline/index.js",
|
|
10
|
+
"./signalr": "./dist/signalr/index.js",
|
|
11
|
+
"./api": "./dist/api/index.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"./dist/**/*"
|
|
15
|
+
],
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "Jumoo",
|
|
18
|
+
"email": "info@jumoo.co.uk",
|
|
19
|
+
"url": "https://jumoo.co.uk"
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"client:build": "tsc --project ./tsconfig.dist.json",
|
|
26
|
+
"client:pack": "npm pack --pack-destination ./pack",
|
|
27
|
+
"client:publish": "npm publish -tag next",
|
|
28
|
+
"client:make": "npm run client:build && npm run client:pack && npm run client:publish",
|
|
29
|
+
"client:link": "npm link",
|
|
30
|
+
"generate": "openapi-ts",
|
|
31
|
+
"lint": "eslint .",
|
|
32
|
+
"lint:fix": "eslint . --fix",
|
|
33
|
+
"format:fix": "npm run format -- --write",
|
|
34
|
+
"format": "prettier \"src/**/*.ts\" --check",
|
|
35
|
+
"build": "tsc && vite build",
|
|
36
|
+
"watch": "vite build --watch",
|
|
37
|
+
"make": "npm run build && npm run client:make"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@eslint/js": "^10.0.1",
|
|
41
|
+
"@hey-api/openapi-ts": "^0.95.0",
|
|
42
|
+
"@microsoft/signalr": "^10.0.0",
|
|
43
|
+
"@umbraco-cms/backoffice": "^17.3.0",
|
|
44
|
+
"eslint": "^10.2.0",
|
|
45
|
+
"globals": "^17.8.0",
|
|
46
|
+
"lit": "^3.3.2",
|
|
47
|
+
"prettier": "^3.8.2",
|
|
48
|
+
"typescript": "^6.0.2",
|
|
49
|
+
"typescript-eslint": "^8.65.0",
|
|
50
|
+
"vite": "^8.0.8",
|
|
51
|
+
"vite-plugin-dts": "^4.5.4"
|
|
52
|
+
},
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "git+https://github.com/Jumoo/Jumoo.Processing.git",
|
|
56
|
+
"directory": "Jumoo.Processing.Client/jumoo-processing-assets"
|
|
57
|
+
}
|
|
58
|
+
}
|