Skip to content

Commit b5ec5b7

Browse files
committed
Merge remote-tracking branch 'upstream/candidate-2.x.x' into candidate-3.x.x
2 parents c863c60 + 755418c commit b5ec5b7

File tree

9 files changed

+868
-49
lines changed

9 files changed

+868
-49
lines changed

package-lock.json

Lines changed: 845 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"@vitest/coverage-v8": "2.1.4",
119119
"eslint": "8.57.1",
120120
"eslint-plugin-react-hooks": "4.6.2",
121-
"lerna": "8.1.9",
121+
"lerna": "8.1.8",
122122
"npm-check-updates": "16.14.20",
123123
"npm-run-all": "4.1.5",
124124
"playwright": "1.48.2",

packages/comms/src/ecl/activity.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ export class Activity extends StateObject<UActivityState, IActivityState> implem
4141
_activity = new Activity(optsConnection);
4242
}
4343
if (state) {
44-
_activity.set({
45-
...state
46-
});
44+
_activity.set(state);
4745
}
4846
return _activity;
4947
}

packages/comms/src/ecl/logicalFile.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,13 @@ export class LogicalFile extends StateObject<FileDetailEx, FileDetailEx> impleme
9191

9292
get properties(): FileDetailEx { return this.get(); }
9393

94-
static attach(optsConnection: IOptions | IConnection | DFUService, Cluster: string, Name: string): LogicalFile {
94+
static attach(optsConnection: IOptions | IConnection | DFUService, Cluster: string, Name: string, state?: FileDetailEx): LogicalFile {
9595
const retVal: LogicalFile = _store.get({ BaseUrl: optsConnection.baseUrl, Cluster, Name }, () => {
9696
return new LogicalFile(optsConnection, Cluster, Name);
9797
});
98+
if (state) {
99+
retVal.set(state);
100+
}
98101
return retVal;
99102
}
100103

packages/comms/src/ecl/query.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,13 @@ export class Query extends StateObject<QueryEx, QueryEx> implements QueryEx {
7878
} as QueryEx);
7979
}
8080

81-
static attach(optsConnection: IOptions | IConnection, querySet: string, queryId: string): Query {
81+
static attach(optsConnection: IOptions | IConnection, querySet: string, queryId: string, state?: QueryEx): Query {
8282
const retVal: Query = _queries.get({ BaseUrl: optsConnection.baseUrl, QuerySet: querySet, QueryId: queryId } as QueryEx, () => {
8383
return new Query(optsConnection, querySet, queryId);
8484
});
85+
if (state) {
86+
retVal.set(state);
87+
}
8588
return retVal;
8689
}
8790

packages/comms/src/ecl/targetCluster.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ export class TargetCluster extends StateObject<UTargetClusterState, ITargetClust
4343
return new TargetCluster(optsConnection, name);
4444
});
4545
if (state) {
46-
retVal.set({
47-
...state
48-
});
46+
retVal.set(state);
4947
}
5048
return retVal;
5149
}

packages/comms/src/ecl/topology.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,13 @@ export class Topology extends StateObject<TopologyStateEx, TopologyStateEx> impl
3030
get LogicalClusters(): WsTopology.TpLogicalCluster[] { return this.get("LogicalClusters"); }
3131
get Services(): WsTopology.ServiceList { return this.get("Services"); }
3232

33-
static attach(optsConnection: IOptions | IConnection | TopologyService) {
33+
static attach(optsConnection: IOptions | IConnection | TopologyService, state?: TopologyStateEx): Topology {
3434
const retVal: Topology = _topology.get({ BaseUrl: optsConnection.baseUrl }, () => {
3535
return new Topology(optsConnection);
3636
});
37+
if (state) {
38+
retVal.set(state);
39+
}
3740
return retVal;
3841
}
3942

packages/comms/src/espConnection.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,12 @@ export class Service {
161161
constructor(optsConnection: IOptions | IConnection, service: string, version: string) {
162162
this._connection = new ESPConnection(optsConnection, service, version);
163163
}
164+
165+
opts() {
166+
return this._connection.opts();
167+
}
168+
169+
connection(): ESPConnection {
170+
return this._connection.clone();
171+
}
164172
}

packages/comms/src/services/wsWorkunits.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,6 @@ export class WorkunitsService extends WorkunitsServiceBase {
6767
super(optsConnection);
6868
}
6969

70-
opts() {
71-
return this._connection.opts();
72-
}
73-
74-
connection(): ESPConnection {
75-
return this._connection.clone();
76-
}
77-
7870
Ping(): Promise<WsWorkunits.WsWorkunitsPingResponse> {
7971
return this._connection.send("Ping", {}, "json", false, undefined, "WsWorkunitsPingResponse").then((response) => {
8072
return { result: true };

0 commit comments

Comments
 (0)