@hpcc-js/comms 3.6.3 → 3.7.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/browser/index.js +15 -2
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.umd.cjs +2 -2
- package/dist/browser/index.umd.cjs.map +1 -1
- package/dist/node/index.cjs +110 -13
- package/dist/node/index.cjs.map +4 -4
- package/dist/node/index.js +110 -13
- package/dist/node/index.js.map +4 -4
- package/package.json +4 -4
- package/src/__package__.ts +2 -2
- package/src/clienttools/eclMeta.ts +2 -2
- package/src/clienttools/eclcc.ts +4 -4
- package/src/ecl/logicalFile.ts +4 -0
- package/src/ecl/scope.ts +0 -4
- package/src/index.node.ts +1 -1
- package/src/services/wsAccount.ts +1 -1
- package/src/services/wsDFU.ts +16 -0
- package/src/services/wsdl/ws_account/v1.07/ws_account.ts +114 -0
- package/types/__package__.d.ts +2 -2
- package/types/ecl/logicalFile.d.ts +1 -0
- package/types/services/wsAccount.d.ts +1 -1
- package/types/services/wsDFU.d.ts +4 -0
- package/types/services/wsdl/ws_account/{v1.06 → v1.07}/ws_account.d.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/comms",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "hpcc-js - Communications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/node/index.cjs",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"wsdl-all": "npm-run-all --aggregate-output -c --serial build --parallel wsdl-*"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@hpcc-js/util": "^3.3.
|
|
75
|
+
"@hpcc-js/util": "^3.3.3",
|
|
76
76
|
"@xmldom/xmldom": "0.9.8",
|
|
77
77
|
"abort-controller": "3.0.0",
|
|
78
78
|
"node-fetch": "3.3.2",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@hpcc-js/ddl-shim": "^3.0.0",
|
|
83
|
-
"@hpcc-js/esbuild-plugins": "^1.4.
|
|
83
|
+
"@hpcc-js/esbuild-plugins": "^1.4.3",
|
|
84
84
|
"@kubernetes/client-node": "1.0.0",
|
|
85
85
|
"@types/d3-request": "1.0.9",
|
|
86
86
|
"@types/d3-time-format": "2.3.4",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"esp",
|
|
113
113
|
"HPCC-Platform"
|
|
114
114
|
],
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "8afa398a6246f7f913bc2cb88402b776d65deb00"
|
|
116
116
|
}
|
package/src/__package__.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export const PKG_NAME = "@hpcc-js/comms";
|
|
2
|
-
export const PKG_VERSION = "3.
|
|
3
|
-
export const BUILD_VERSION = "3.
|
|
2
|
+
export const PKG_VERSION = "3.7.0";
|
|
3
|
+
export const BUILD_VERSION = "3.8.0";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as fs from "fs";
|
|
2
|
-
import * as path from "path";
|
|
1
|
+
import * as fs from "node:fs";
|
|
2
|
+
import * as path from "node:path";
|
|
3
3
|
|
|
4
4
|
import { Dictionary, DictionaryNoCase, find, SAXStackParser, scopedLogger, XMLNode } from "@hpcc-js/util";
|
|
5
5
|
import { ClientTools, locateClientTools } from "./eclcc.ts";
|
package/src/clienttools/eclcc.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as cp from "child_process";
|
|
2
|
-
import * as fs from "fs";
|
|
3
|
-
import * as os from "os";
|
|
4
|
-
import * as path from "path";
|
|
1
|
+
import * as cp from "node:child_process";
|
|
2
|
+
import * as fs from "node:fs";
|
|
3
|
+
import * as os from "node:os";
|
|
4
|
+
import * as path from "node:path";
|
|
5
5
|
import * as tmp from "tmp";
|
|
6
6
|
|
|
7
7
|
import { exists, scopedLogger, xml2json, XMLNode } from "@hpcc-js/util";
|
package/src/ecl/logicalFile.ts
CHANGED
|
@@ -176,6 +176,10 @@ export class LogicalFile extends StateObject<FileDetailEx, FileDetailEx> impleme
|
|
|
176
176
|
return this.connection.DFUFile({ Name: this.Name, Format: format });
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
+
fetchAllLogicalFiles(): Promise<string[]> {
|
|
180
|
+
return this.connection.recursiveFetchLogicalFiles([this]);
|
|
181
|
+
}
|
|
182
|
+
|
|
179
183
|
fetchListHistory(): Promise<WsDfu.Origin[]> {
|
|
180
184
|
return this.connection.ListHistory({ Name: this.Name }).then(response => {
|
|
181
185
|
return response?.History?.Origin || [];
|
package/src/ecl/scope.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { StateObject, StringAnyMap } from "@hpcc-js/util";
|
|
2
|
-
// import { utcFormat, utcParse } from "d3-time-format";
|
|
3
2
|
import { WsWorkunits } from "../services/wsWorkunits.ts";
|
|
4
3
|
import { Workunit } from "./workunit.ts";
|
|
5
4
|
|
|
6
|
-
// const formatter = utcFormat("%Y-%m-%dT%H:%M:%S.%LZ");
|
|
7
|
-
// const parser = utcParse("%Y-%m-%dT%H:%M:%S.%LZ");
|
|
8
|
-
|
|
9
5
|
export interface AttributeEx extends WsWorkunits.Property {
|
|
10
6
|
FormattedEnd?: string;
|
|
11
7
|
}
|
package/src/index.node.ts
CHANGED
|
@@ -6,7 +6,7 @@ root.DOMParser = DOMParser;
|
|
|
6
6
|
// fetch polyfill ---
|
|
7
7
|
import fetch, { Headers, Request, Response, } from "node-fetch";
|
|
8
8
|
|
|
9
|
-
import * as https from "https";
|
|
9
|
+
import * as https from "node:https";
|
|
10
10
|
import { Agent, setGlobalDispatcher } from "undici";
|
|
11
11
|
|
|
12
12
|
if (typeof root.fetch === "undefined") {
|
package/src/services/wsDFU.ts
CHANGED
|
@@ -15,4 +15,20 @@ export class DFUService extends DfuServiceBase {
|
|
|
15
15
|
return this._connection.send("DFUDefFile", request, "text");
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
async recursiveFetchLogicalFiles(superFiles: { NodeGroup: string, Name: string }[]): Promise<string[]> {
|
|
19
|
+
const childSuperFiles: WsDfu.DFULogicalFile[] = [];
|
|
20
|
+
const logicalFiles: string[] = [];
|
|
21
|
+
await Promise.all(superFiles.map(superFile => {
|
|
22
|
+
return this.DFUInfo({ Cluster: superFile.NodeGroup, Name: superFile.Name, IncludeJsonTypeInfo: false, IncludeBinTypeInfo: false, ForceIndexInfo: false })
|
|
23
|
+
.then(response => {
|
|
24
|
+
for (const child of response?.FileDetail?.Superfiles?.DFULogicalFile ?? []) {
|
|
25
|
+
childSuperFiles.push(child);
|
|
26
|
+
}
|
|
27
|
+
for (const child of response?.FileDetail?.subfiles?.Item ?? []) {
|
|
28
|
+
logicalFiles.push(child);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}));
|
|
32
|
+
return logicalFiles.concat(childSuperFiles.length ? await this.recursiveFetchLogicalFiles(childSuperFiles) : []);
|
|
33
|
+
}
|
|
18
34
|
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { IConnection, IOptions } from "../../../../connection.ts";
|
|
2
|
+
import { Service } from "../../../../espConnection.ts";
|
|
3
|
+
|
|
4
|
+
export namespace WsAccount {
|
|
5
|
+
|
|
6
|
+
export type int = number;
|
|
7
|
+
|
|
8
|
+
export interface MyAccountRequest {
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface Exception {
|
|
13
|
+
Code: string;
|
|
14
|
+
Audience: string;
|
|
15
|
+
Source: string;
|
|
16
|
+
Message: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface Exceptions {
|
|
20
|
+
Source: string;
|
|
21
|
+
Exception: Exception[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface Groups {
|
|
25
|
+
Group: string[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface MyAccountResponse {
|
|
29
|
+
Exceptions: Exceptions;
|
|
30
|
+
username: string;
|
|
31
|
+
firstName: string;
|
|
32
|
+
lastName: string;
|
|
33
|
+
passwordExpiration: string;
|
|
34
|
+
passwordDaysRemaining: int;
|
|
35
|
+
passwordExpirationWarningDays: int;
|
|
36
|
+
employeeID: string;
|
|
37
|
+
distinguishedName: string;
|
|
38
|
+
accountType: string;
|
|
39
|
+
passwordNeverExpires: boolean;
|
|
40
|
+
passwordIsExpired: boolean;
|
|
41
|
+
CanUpdatePassword: boolean;
|
|
42
|
+
accountStatus: int;
|
|
43
|
+
Groups: Groups;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface ws_accountPingRequest {
|
|
47
|
+
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface ws_accountPingResponse {
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface UpdateUserRequest {
|
|
55
|
+
username?: string;
|
|
56
|
+
oldpass?: string;
|
|
57
|
+
newpass1?: string;
|
|
58
|
+
newpass2?: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface UpdateUserResponse {
|
|
62
|
+
Exceptions: Exceptions;
|
|
63
|
+
retcode: int;
|
|
64
|
+
message: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface UpdateUserInputRequest {
|
|
68
|
+
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface UpdateUserInputResponse {
|
|
72
|
+
Exceptions: Exceptions;
|
|
73
|
+
username: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface VerifyUserRequest {
|
|
77
|
+
application?: string;
|
|
78
|
+
version?: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface VerifyUserResponse {
|
|
82
|
+
Exceptions: Exceptions;
|
|
83
|
+
retcode: int;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export class AccountServiceBase extends Service {
|
|
89
|
+
|
|
90
|
+
constructor(optsConnection: IOptions | IConnection) {
|
|
91
|
+
super(optsConnection, "ws_account", "1.07");
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
MyAccount(request: Partial<WsAccount.MyAccountRequest>): Promise<WsAccount.MyAccountResponse> {
|
|
95
|
+
return this._connection.send("MyAccount", request, "json", false, undefined, "MyAccountResponse");
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
Ping(request: Partial<WsAccount.ws_accountPingRequest>): Promise<WsAccount.ws_accountPingResponse> {
|
|
99
|
+
return this._connection.send("Ping", request, "json", false, undefined, "ws_accountPingResponse");
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
UpdateUser(request: Partial<WsAccount.UpdateUserRequest>): Promise<WsAccount.UpdateUserResponse> {
|
|
103
|
+
return this._connection.send("UpdateUser", request, "json", false, undefined, "UpdateUserResponse");
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
UpdateUserInput(request: Partial<WsAccount.UpdateUserInputRequest>): Promise<WsAccount.UpdateUserInputResponse> {
|
|
107
|
+
return this._connection.send("UpdateUserInput", request, "json", false, undefined, "UpdateUserInputResponse");
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
VerifyUser(request: Partial<WsAccount.VerifyUserRequest>): Promise<WsAccount.VerifyUserResponse> {
|
|
111
|
+
return this._connection.send("VerifyUser", request, "json", false, undefined, "VerifyUserResponse");
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
}
|
package/types/__package__.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const PKG_NAME = "@hpcc-js/comms";
|
|
2
|
-
export declare const PKG_VERSION = "3.6.
|
|
3
|
-
export declare const BUILD_VERSION = "3.7.
|
|
2
|
+
export declare const PKG_VERSION = "3.6.3";
|
|
3
|
+
export declare const BUILD_VERSION = "3.7.3";
|
|
@@ -85,6 +85,7 @@ export declare class LogicalFile extends StateObject<FileDetailEx, FileDetailEx>
|
|
|
85
85
|
update(request: Partial<WsDfu.DFUInfoRequest>): Promise<WsDfu.DFUInfoResponse>;
|
|
86
86
|
fetchInfo(): Promise<WsDfu.FileDetail>;
|
|
87
87
|
fetchDefFile(format: WsDfu.DFUDefFileFormat): Promise<string>;
|
|
88
|
+
fetchAllLogicalFiles(): Promise<string[]>;
|
|
88
89
|
fetchListHistory(): Promise<WsDfu.Origin[]>;
|
|
89
90
|
eraseHistory(): Promise<WsDfu.Origin[]>;
|
|
90
91
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountServiceBase, WsAccount } from "./wsdl/ws_account/v1.
|
|
1
|
+
import { AccountServiceBase, WsAccount } from "./wsdl/ws_account/v1.07/ws_account.ts";
|
|
2
2
|
export { type WsAccount };
|
|
3
3
|
export declare class AccountService extends AccountServiceBase {
|
|
4
4
|
VerifyUser(request: WsAccount.VerifyUserRequest): Promise<WsAccount.VerifyUserResponse>;
|
|
@@ -7,4 +7,8 @@ export declare const DFUChangeRestriction: typeof WsDfu.DFUChangeRestriction;
|
|
|
7
7
|
export type base64Binary = WsDfu.base64Binary;
|
|
8
8
|
export declare class DFUService extends DfuServiceBase {
|
|
9
9
|
DFUFile(request: WsDfu.DFUDefFileRequest): Promise<string>;
|
|
10
|
+
recursiveFetchLogicalFiles(superFiles: {
|
|
11
|
+
NodeGroup: string;
|
|
12
|
+
Name: string;
|
|
13
|
+
}[]): Promise<string[]>;
|
|
10
14
|
}
|
|
@@ -14,6 +14,9 @@ export declare namespace WsAccount {
|
|
|
14
14
|
Source: string;
|
|
15
15
|
Exception: Exception[];
|
|
16
16
|
}
|
|
17
|
+
interface Groups {
|
|
18
|
+
Group: string[];
|
|
19
|
+
}
|
|
17
20
|
interface MyAccountResponse {
|
|
18
21
|
Exceptions: Exceptions;
|
|
19
22
|
username: string;
|
|
@@ -29,6 +32,7 @@ export declare namespace WsAccount {
|
|
|
29
32
|
passwordIsExpired: boolean;
|
|
30
33
|
CanUpdatePassword: boolean;
|
|
31
34
|
accountStatus: int;
|
|
35
|
+
Groups: Groups;
|
|
32
36
|
}
|
|
33
37
|
interface ws_accountPingRequest {
|
|
34
38
|
}
|