Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/candidate-2.x.x' into candidat…
Browse files Browse the repository at this point in the history
…e-3.x.x
  • Loading branch information
GordonSmith committed Nov 14, 2024
2 parents c863c60 + 755418c commit b5ec5b7
Show file tree
Hide file tree
Showing 9 changed files with 868 additions and 49 deletions.
876 changes: 845 additions & 31 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"@vitest/coverage-v8": "2.1.4",
"eslint": "8.57.1",
"eslint-plugin-react-hooks": "4.6.2",
"lerna": "8.1.9",
"lerna": "8.1.8",
"npm-check-updates": "16.14.20",
"npm-run-all": "4.1.5",
"playwright": "1.48.2",
Expand Down
4 changes: 1 addition & 3 deletions packages/comms/src/ecl/activity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ export class Activity extends StateObject<UActivityState, IActivityState> implem
_activity = new Activity(optsConnection);
}
if (state) {
_activity.set({
...state
});
_activity.set(state);
}
return _activity;
}
Expand Down
5 changes: 4 additions & 1 deletion packages/comms/src/ecl/logicalFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,13 @@ export class LogicalFile extends StateObject<FileDetailEx, FileDetailEx> impleme

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

static attach(optsConnection: IOptions | IConnection | DFUService, Cluster: string, Name: string): LogicalFile {
static attach(optsConnection: IOptions | IConnection | DFUService, Cluster: string, Name: string, state?: FileDetailEx): LogicalFile {
const retVal: LogicalFile = _store.get({ BaseUrl: optsConnection.baseUrl, Cluster, Name }, () => {
return new LogicalFile(optsConnection, Cluster, Name);
});
if (state) {
retVal.set(state);
}
return retVal;
}

Expand Down
5 changes: 4 additions & 1 deletion packages/comms/src/ecl/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,13 @@ export class Query extends StateObject<QueryEx, QueryEx> implements QueryEx {
} as QueryEx);
}

static attach(optsConnection: IOptions | IConnection, querySet: string, queryId: string): Query {
static attach(optsConnection: IOptions | IConnection, querySet: string, queryId: string, state?: QueryEx): Query {
const retVal: Query = _queries.get({ BaseUrl: optsConnection.baseUrl, QuerySet: querySet, QueryId: queryId } as QueryEx, () => {
return new Query(optsConnection, querySet, queryId);
});
if (state) {
retVal.set(state);
}
return retVal;
}

Expand Down
4 changes: 1 addition & 3 deletions packages/comms/src/ecl/targetCluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ export class TargetCluster extends StateObject<UTargetClusterState, ITargetClust
return new TargetCluster(optsConnection, name);
});
if (state) {
retVal.set({
...state
});
retVal.set(state);
}
return retVal;
}
Expand Down
5 changes: 4 additions & 1 deletion packages/comms/src/ecl/topology.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ export class Topology extends StateObject<TopologyStateEx, TopologyStateEx> impl
get LogicalClusters(): WsTopology.TpLogicalCluster[] { return this.get("LogicalClusters"); }
get Services(): WsTopology.ServiceList { return this.get("Services"); }

static attach(optsConnection: IOptions | IConnection | TopologyService) {
static attach(optsConnection: IOptions | IConnection | TopologyService, state?: TopologyStateEx): Topology {
const retVal: Topology = _topology.get({ BaseUrl: optsConnection.baseUrl }, () => {
return new Topology(optsConnection);
});
if (state) {
retVal.set(state);
}
return retVal;
}

Expand Down
8 changes: 8 additions & 0 deletions packages/comms/src/espConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,12 @@ export class Service {
constructor(optsConnection: IOptions | IConnection, service: string, version: string) {
this._connection = new ESPConnection(optsConnection, service, version);
}

opts() {
return this._connection.opts();
}

connection(): ESPConnection {
return this._connection.clone();
}
}
8 changes: 0 additions & 8 deletions packages/comms/src/services/wsWorkunits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@ export class WorkunitsService extends WorkunitsServiceBase {
super(optsConnection);
}

opts() {
return this._connection.opts();
}

connection(): ESPConnection {
return this._connection.clone();
}

Ping(): Promise<WsWorkunits.WsWorkunitsPingResponse> {
return this._connection.send("Ping", {}, "json", false, undefined, "WsWorkunitsPingResponse").then((response) => {
return { result: true };
Expand Down

0 comments on commit b5ec5b7

Please sign in to comment.