@attlaz/client 1.78.0 → 1.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Model/Deployment/CodeSourceBuildStrategy.d.ts +2 -0
- package/dist/Model/Deployment/CodeSourceBuildStrategy.js +6 -0
- package/dist/Service/FlowRunEndpoint.d.ts +7 -0
- package/dist/Service/FlowRunEndpoint.js +18 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DataValueCollection } from '../DataValueCollection.js';
|
|
1
2
|
import { State } from '../State.js';
|
|
2
3
|
import { StateAware } from '../StateAware.js';
|
|
3
4
|
export declare class CodeSourceBuildStrategy implements StateAware {
|
|
@@ -6,5 +7,6 @@ export declare class CodeSourceBuildStrategy implements StateAware {
|
|
|
6
7
|
description: string;
|
|
7
8
|
languageId: string;
|
|
8
9
|
state: State;
|
|
10
|
+
data: DataValueCollection;
|
|
9
11
|
static parse(raw: any): CodeSourceBuildStrategy;
|
|
10
12
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DataValueCollection } from '../DataValueCollection.js';
|
|
1
2
|
import { State } from '../State.js';
|
|
2
3
|
export class CodeSourceBuildStrategy {
|
|
3
4
|
id;
|
|
@@ -5,6 +6,10 @@ export class CodeSourceBuildStrategy {
|
|
|
5
6
|
description;
|
|
6
7
|
languageId;
|
|
7
8
|
state = State.Active;
|
|
9
|
+
// The strategy's parameter bag. Today it holds `command` (the shell command run inside the
|
|
10
|
+
// platform build image). Kept as the whole bag so new keys need no model change. Read with
|
|
11
|
+
// `data.get('command')`. Mirrors CodeSourceRunStrategy.
|
|
12
|
+
data = new DataValueCollection();
|
|
8
13
|
static parse(raw) {
|
|
9
14
|
const codeDeployStrategy = new CodeSourceBuildStrategy();
|
|
10
15
|
codeDeployStrategy.id = raw.id;
|
|
@@ -12,6 +17,7 @@ export class CodeSourceBuildStrategy {
|
|
|
12
17
|
codeDeployStrategy.description = raw.description;
|
|
13
18
|
codeDeployStrategy.languageId = raw.language;
|
|
14
19
|
codeDeployStrategy.state = State.fromString(raw.state);
|
|
20
|
+
codeDeployStrategy.data = DataValueCollection.fromObject(raw.data);
|
|
15
21
|
return codeDeployStrategy;
|
|
16
22
|
}
|
|
17
23
|
}
|
|
@@ -10,6 +10,13 @@ export declare class FlowRunEndpoint extends Endpoint {
|
|
|
10
10
|
getFlowRuns(flowId: string): Promise<CollectionResult<FlowRun>>;
|
|
11
11
|
getFlowRunSummaries(flowId: string, flowRunStatuses?: FlowRunStatus[] | null, pagination?: CursorPagination | null, projectEnvironmentId?: string | null): Promise<CollectionResult<FlowRunSummary>>;
|
|
12
12
|
getFlowRunSummary(flowRunId: string): Promise<FlowRunSummary | null>;
|
|
13
|
+
/**
|
|
14
|
+
* Fetch a single flow run by id, including its `arguments` and `logStreamId`. Uses the same
|
|
15
|
+
* endpoint as {@link getFlowRunSummary} but parses the full {@link FlowRun} (the summary model
|
|
16
|
+
* only carries execution stats). Used by the flow-run runtime to resolve the real arguments
|
|
17
|
+
* and the log stream to write to.
|
|
18
|
+
*/
|
|
19
|
+
getFlowRun(flowRunId: string): Promise<FlowRun | null>;
|
|
13
20
|
getFlowRunHistory(flowRunId: string): Promise<CollectionResult<FlowRunHistory>>;
|
|
14
21
|
/**
|
|
15
22
|
* Authoritative lifecycle (status derived from history, first-terminal-wins). Prefer this over
|
|
@@ -59,6 +59,24 @@ export class FlowRunEndpoint extends Endpoint {
|
|
|
59
59
|
throw error;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Fetch a single flow run by id, including its `arguments` and `logStreamId`. Uses the same
|
|
64
|
+
* endpoint as {@link getFlowRunSummary} but parses the full {@link FlowRun} (the summary model
|
|
65
|
+
* only carries execution stats). Used by the flow-run runtime to resolve the real arguments
|
|
66
|
+
* and the log stream to write to.
|
|
67
|
+
*/
|
|
68
|
+
async getFlowRun(flowRunId) {
|
|
69
|
+
try {
|
|
70
|
+
const result = await this.requestObject('/flowruns/' + flowRunId + '/summaries', null, FlowRun.parse);
|
|
71
|
+
return result.getData();
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
75
|
+
console.error('Failed to load flow run: ' + error);
|
|
76
|
+
}
|
|
77
|
+
throw error;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
62
80
|
async getFlowRunHistory(flowRunId) {
|
|
63
81
|
const result = await this.requestCollection('/flowruns/' + flowRunId + '/history', FlowRunHistory.parse);
|
|
64
82
|
return result;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.80.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.
|
|
1
|
+
export const VERSION = "1.80.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@attlaz/client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.80.0",
|
|
4
4
|
"description": "Javascript Client to access Attlaz API",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/jest": "^30.0.0",
|
|
54
|
-
"@types/node": "^26.
|
|
54
|
+
"@types/node": "^26.1.1",
|
|
55
55
|
"@typescript-eslint/eslint-plugin": "^8.59.3",
|
|
56
56
|
"@typescript-eslint/parser": "^8.59.3",
|
|
57
57
|
"eslint": "^9.39.4",
|