@hpcc-js/comms 3.15.1 → 3.15.4
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/LICENSE +43 -43
- package/README.md +50 -50
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.umd.cjs +1 -1
- package/dist/browser/index.umd.cjs.map +1 -1
- package/dist/node/index.cjs +10 -10
- package/dist/node/index.cjs.map +3 -3
- package/dist/node/index.js +10 -10
- package/dist/node/index.js.map +3 -3
- package/package.json +8 -8
- package/src/__package__.ts +3 -3
- package/src/clienttools/eclMeta.ts +506 -506
- package/src/clienttools/eclcc.ts +628 -628
- package/src/connection.ts +288 -288
- package/src/ecl/activity.ts +82 -82
- package/src/ecl/dfuWorkunit.ts +363 -363
- package/src/ecl/graph.ts +196 -196
- package/src/ecl/logicalFile.ts +196 -196
- package/src/ecl/machine.ts +63 -63
- package/src/ecl/query.ts +265 -265
- package/src/ecl/queryGraph.ts +813 -813
- package/src/ecl/resource.ts +39 -39
- package/src/ecl/result.ts +245 -245
- package/src/ecl/scope.ts +188 -188
- package/src/ecl/sourceFile.ts +34 -34
- package/src/ecl/store.ts +154 -154
- package/src/ecl/targetCluster.ts +149 -149
- package/src/ecl/timer.ts +42 -42
- package/src/ecl/topology.ts +131 -131
- package/src/ecl/workunit.ts +1340 -1340
- package/src/ecl/xsdParser.ts +267 -267
- package/src/espConnection.ts +164 -164
- package/src/index.browser.ts +1 -1
- package/src/index.common.ts +40 -40
- package/src/index.node.ts +48 -48
- package/src/pem/trustwave.ts +909 -909
- package/src/services/fileSpray.ts +73 -73
- package/src/services/wsAccess.ts +8 -8
- package/src/services/wsAccount.ts +27 -27
- package/src/services/wsCloud.ts +73 -73
- package/src/services/wsCodesign.ts +18 -18
- package/src/services/wsDFU.ts +34 -34
- package/src/services/wsDFUXRef.ts +121 -121
- package/src/services/wsDali.ts +8 -8
- package/src/services/wsEcl.ts +123 -123
- package/src/services/wsElk.ts +8 -8
- package/src/services/wsLogaccess.ts +270 -267
- package/src/services/wsMachine.ts +89 -89
- package/src/services/wsPackageProcess.ts +8 -8
- package/src/services/wsResources.ts +8 -8
- package/src/services/wsSMC.ts +80 -80
- package/src/services/wsSasha.ts +7 -7
- package/src/services/wsStore.ts +32 -32
- package/src/services/wsTopology.ts +45 -45
- package/src/services/wsWorkunits.ts +151 -151
- package/src/services/wsdl/FileSpray/v1.23/FileSpray.ts +1008 -1008
- package/src/services/wsdl/FileSpray/v1.25/FileSpray.ts +1040 -1040
- package/src/services/wsdl/FileSpray/v1.26/FileSpray.ts +929 -929
- package/src/services/wsdl/FileSpray/v1.27/FileSpray.ts +930 -930
- package/src/services/wsdl/WsCloud/v1/WsCloud.ts +38 -38
- package/src/services/wsdl/WsCloud/v1.02/WsCloud.ts +77 -77
- package/src/services/wsdl/WsDFUXRef/v1.02/WsDFUXRef.ts +224 -224
- package/src/services/wsdl/WsDFUXRef/v1.04/WsDFUXRef.ts +227 -227
- package/src/services/wsdl/WsDali/v1.04/WsDali.ts +216 -216
- package/src/services/wsdl/WsDfu/v1.62/WsDfu.ts +1455 -1455
- package/src/services/wsdl/WsDfu/v1.63/WsDfu.ts +1465 -1465
- package/src/services/wsdl/WsDfu/v1.65/WsDfu.ts +1244 -1244
- package/src/services/wsdl/WsDfu/v1.66/WsDfu.ts +1267 -1267
- package/src/services/wsdl/WsDfu/v1.67/WsDfu.ts +1268 -1268
- package/src/services/wsdl/WsFileIO/v1.01/WsFileIO.ts +104 -104
- package/src/services/wsdl/WsPackageProcess/v1.04/WsPackageProcess.ts +519 -519
- package/src/services/wsdl/WsPackageProcess/v1.07/WsPackageProcess.ts +500 -500
- package/src/services/wsdl/WsResources/v1.01/WsResources.ts +119 -119
- package/src/services/wsdl/WsSMC/v1.24/WsSMC.ts +665 -665
- package/src/services/wsdl/WsSMC/v1.27/WsSMC.ts +591 -591
- package/src/services/wsdl/WsSMC/v1.28/WsSMC.ts +645 -645
- package/src/services/wsdl/WsSMC/v1.29/WsSMC.ts +660 -660
- package/src/services/wsdl/WsTopology/v1.31/WsTopology.ts +856 -856
- package/src/services/wsdl/WsTopology/v1.32/WsTopology.ts +786 -786
- package/src/services/wsdl/WsTopology/v1.33/WsTopology.ts +835 -835
- package/src/services/wsdl/WsWorkunits/v1.88/WsWorkunits.ts +2944 -2944
- package/src/services/wsdl/WsWorkunits/v1.94/WsWorkunits.ts +3072 -3072
- package/src/services/wsdl/WsWorkunits/v1.95/WsWorkunits.ts +3073 -3073
- package/src/services/wsdl/WsWorkunits/v1.97/WsWorkunits.ts +3134 -3134
- package/src/services/wsdl/WsWorkunits/v1.98/WsWorkunits.ts +3182 -3182
- package/src/services/wsdl/WsWorkunits/v1.99/WsWorkunits.ts +3162 -3162
- package/src/services/wsdl/WsWorkunits/v2/WsWorkunits.ts +3153 -3153
- package/src/services/wsdl/WsWorkunits/v2.02/WsWorkunits.ts +3162 -3162
- package/src/services/wsdl/WsWorkunits/v2.03/WsWorkunits.ts +3164 -3164
- package/src/services/wsdl/WsWorkunits/v2.04/WsWorkunits.ts +3171 -3171
- package/src/services/wsdl/ws_access/v1.16/ws_access.ts +1086 -1086
- package/src/services/wsdl/ws_access/v1.17/ws_access.ts +1023 -1023
- package/src/services/wsdl/ws_account/v1.05/ws_account.ts +111 -111
- package/src/services/wsdl/ws_account/v1.06/ws_account.ts +109 -109
- package/src/services/wsdl/ws_account/v1.07/ws_account.ts +114 -114
- package/src/services/wsdl/ws_codesign/v1.1/ws_codesign.ts +95 -95
- package/src/services/wsdl/ws_elk/v1/ws_elk.ts +47 -47
- package/src/services/wsdl/ws_logaccess/v1/ws_logaccess.ts +83 -83
- package/src/services/wsdl/ws_logaccess/v1.02/ws_logaccess.ts +161 -161
- package/src/services/wsdl/ws_logaccess/v1.03/ws_logaccess.ts +190 -190
- package/src/services/wsdl/ws_logaccess/v1.04/ws_logaccess.ts +215 -215
- package/src/services/wsdl/ws_logaccess/v1.05/ws_logaccess.ts +219 -219
- package/src/services/wsdl/ws_logaccess/v1.08/ws_logaccess.ts +267 -267
- package/src/services/wsdl/ws_machine/v1.17/ws_machine.ts +567 -567
- package/src/services/wsdl/ws_machine/v1.18/ws_machine.ts +497 -497
- package/src/services/wsdl/ws_machine/v1.19/ws_machine.ts +497 -497
- package/src/services/wsdl/wsstore/v1.02/wsstore.ts +239 -239
- package/types/services/wsLogaccess.d.ts +1 -0
package/src/espConnection.ts
CHANGED
|
@@ -1,164 +1,164 @@
|
|
|
1
|
-
import { join } from "@hpcc-js/util";
|
|
2
|
-
import { createConnection, IConnection, IOptions, ResponseType } from "./connection.ts";
|
|
3
|
-
|
|
4
|
-
export type ESPResponseType = ResponseType | "json2" | "xsd";
|
|
5
|
-
|
|
6
|
-
export function isArray(arg: any) {
|
|
7
|
-
return Object.prototype.toString.call(arg) === "[object Array]";
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface Exception {
|
|
11
|
-
Code: number;
|
|
12
|
-
Message: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface Exceptions {
|
|
16
|
-
Source: string;
|
|
17
|
-
Exception: Exception[];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export class ESPExceptions extends Error implements Exceptions {
|
|
21
|
-
isESPExceptions = true;
|
|
22
|
-
action: string;
|
|
23
|
-
request: string;
|
|
24
|
-
Source: string;
|
|
25
|
-
Exception: Exception[];
|
|
26
|
-
|
|
27
|
-
constructor(action: string, request: any, exceptions: Exceptions) {
|
|
28
|
-
super("ESPException: " + exceptions.Source);
|
|
29
|
-
this.action = action;
|
|
30
|
-
this.request = request;
|
|
31
|
-
this.Source = exceptions.Source;
|
|
32
|
-
this.Exception = exceptions.Exception;
|
|
33
|
-
if (exceptions.Exception.length) {
|
|
34
|
-
this.message = `${exceptions.Exception[0].Code}: ${exceptions.Exception[0].Message}`;
|
|
35
|
-
} else {
|
|
36
|
-
this.message = "";
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export function isExceptions(err: any): err is Exceptions {
|
|
42
|
-
return err instanceof ESPExceptions || (err.isESPExceptions && Array.isArray(err.Exception));
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function isConnection(optsConnection: IOptions | IConnection): optsConnection is IConnection {
|
|
46
|
-
return (optsConnection as IConnection).send !== undefined;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export class ESPConnection implements IConnection {
|
|
50
|
-
private _connection: IConnection;
|
|
51
|
-
get baseUrl() { return this._connection.opts().baseUrl; }
|
|
52
|
-
private _service: string;
|
|
53
|
-
private _version: string;
|
|
54
|
-
|
|
55
|
-
constructor(optsConnection: IOptions | IConnection, service: string, version: string) {
|
|
56
|
-
this._connection = isConnection(optsConnection) ? optsConnection : createConnection(optsConnection);
|
|
57
|
-
this._service = service;
|
|
58
|
-
this._version = version;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
service(): string;
|
|
62
|
-
service(_: string): ESPConnection;
|
|
63
|
-
service(_?: string): string | ESPConnection {
|
|
64
|
-
if (_ === void 0) return this._service;
|
|
65
|
-
this._service = _;
|
|
66
|
-
return this;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
version(): string;
|
|
70
|
-
version(_: string): ESPConnection;
|
|
71
|
-
version(_?: string): string | ESPConnection {
|
|
72
|
-
if (_ === void 0) return this._version;
|
|
73
|
-
this._version = _;
|
|
74
|
-
return this;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
toESPStringArray(target: any, arrayName: string): any {
|
|
78
|
-
if (isArray(target[arrayName])) {
|
|
79
|
-
for (let i = 0; i < target[arrayName].length; ++i) {
|
|
80
|
-
target[arrayName + "_i" + i] = target[arrayName][i];
|
|
81
|
-
}
|
|
82
|
-
delete target[arrayName];
|
|
83
|
-
}
|
|
84
|
-
return target;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// IConnection ---
|
|
88
|
-
opts(_: Partial<IOptions>): this;
|
|
89
|
-
opts(): IOptions;
|
|
90
|
-
opts(_?: Partial<IOptions>): this | IOptions {
|
|
91
|
-
if (_ === void 0) return this._connection.opts();
|
|
92
|
-
this._connection.opts(_);
|
|
93
|
-
return this;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
send(action: string, _request: any = {}, espResponseType: ESPResponseType = "json", largeUpload: boolean = false, abortSignal?: AbortSignal, espResponseField?: string): Promise<any> {
|
|
97
|
-
const request = { ..._request, ...{ ver_: this._version } };
|
|
98
|
-
if (largeUpload) {
|
|
99
|
-
request["upload_"] = true;
|
|
100
|
-
}
|
|
101
|
-
if (abortSignal) {
|
|
102
|
-
request["abortSignal_"] = abortSignal;
|
|
103
|
-
}
|
|
104
|
-
let serviceAction: string;
|
|
105
|
-
let responseType: ResponseType = "json";
|
|
106
|
-
switch (espResponseType) {
|
|
107
|
-
case "text":
|
|
108
|
-
serviceAction = join(this._service, action);
|
|
109
|
-
responseType = "text";
|
|
110
|
-
break;
|
|
111
|
-
case "xsd":
|
|
112
|
-
serviceAction = join(this._service, action + ".xsd");
|
|
113
|
-
responseType = "text";
|
|
114
|
-
break;
|
|
115
|
-
case "json2":
|
|
116
|
-
serviceAction = join(this._service, action + "/json");
|
|
117
|
-
espResponseType = "json";
|
|
118
|
-
const actionParts = action.split("/");
|
|
119
|
-
action = actionParts.pop()!;
|
|
120
|
-
break;
|
|
121
|
-
default:
|
|
122
|
-
serviceAction = join(this._service, action + ".json");
|
|
123
|
-
}
|
|
124
|
-
return this._connection.send(serviceAction, request, responseType).then((response) => {
|
|
125
|
-
if (espResponseType === "json") {
|
|
126
|
-
let retVal;
|
|
127
|
-
if (response && response.Exceptions) {
|
|
128
|
-
throw new ESPExceptions(action, request, response.Exceptions);
|
|
129
|
-
} else if (response) {
|
|
130
|
-
retVal = response[espResponseField || (action + "Response")];
|
|
131
|
-
}
|
|
132
|
-
if (!retVal) {
|
|
133
|
-
throw new ESPExceptions(action, request, {
|
|
134
|
-
Source: "ESPConnection.send",
|
|
135
|
-
Exception: [{ Code: 0, Message: "Missing Response" }]
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
return retVal;
|
|
139
|
-
}
|
|
140
|
-
return response;
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
clone() {
|
|
145
|
-
return new ESPConnection(this._connection.clone(), this._service, this._version);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export class Service {
|
|
150
|
-
protected _connection: ESPConnection;
|
|
151
|
-
get baseUrl() { return this._connection.opts().baseUrl; }
|
|
152
|
-
|
|
153
|
-
constructor(optsConnection: IOptions | IConnection, service: string, version: string) {
|
|
154
|
-
this._connection = new ESPConnection(optsConnection, service, version);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
opts() {
|
|
158
|
-
return this._connection.opts();
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
connection(): ESPConnection {
|
|
162
|
-
return this._connection.clone();
|
|
163
|
-
}
|
|
164
|
-
}
|
|
1
|
+
import { join } from "@hpcc-js/util";
|
|
2
|
+
import { createConnection, IConnection, IOptions, ResponseType } from "./connection.ts";
|
|
3
|
+
|
|
4
|
+
export type ESPResponseType = ResponseType | "json2" | "xsd";
|
|
5
|
+
|
|
6
|
+
export function isArray(arg: any) {
|
|
7
|
+
return Object.prototype.toString.call(arg) === "[object Array]";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface Exception {
|
|
11
|
+
Code: number;
|
|
12
|
+
Message: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface Exceptions {
|
|
16
|
+
Source: string;
|
|
17
|
+
Exception: Exception[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class ESPExceptions extends Error implements Exceptions {
|
|
21
|
+
isESPExceptions = true;
|
|
22
|
+
action: string;
|
|
23
|
+
request: string;
|
|
24
|
+
Source: string;
|
|
25
|
+
Exception: Exception[];
|
|
26
|
+
|
|
27
|
+
constructor(action: string, request: any, exceptions: Exceptions) {
|
|
28
|
+
super("ESPException: " + exceptions.Source);
|
|
29
|
+
this.action = action;
|
|
30
|
+
this.request = request;
|
|
31
|
+
this.Source = exceptions.Source;
|
|
32
|
+
this.Exception = exceptions.Exception;
|
|
33
|
+
if (exceptions.Exception.length) {
|
|
34
|
+
this.message = `${exceptions.Exception[0].Code}: ${exceptions.Exception[0].Message}`;
|
|
35
|
+
} else {
|
|
36
|
+
this.message = "";
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function isExceptions(err: any): err is Exceptions {
|
|
42
|
+
return err instanceof ESPExceptions || (err.isESPExceptions && Array.isArray(err.Exception));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function isConnection(optsConnection: IOptions | IConnection): optsConnection is IConnection {
|
|
46
|
+
return (optsConnection as IConnection).send !== undefined;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export class ESPConnection implements IConnection {
|
|
50
|
+
private _connection: IConnection;
|
|
51
|
+
get baseUrl() { return this._connection.opts().baseUrl; }
|
|
52
|
+
private _service: string;
|
|
53
|
+
private _version: string;
|
|
54
|
+
|
|
55
|
+
constructor(optsConnection: IOptions | IConnection, service: string, version: string) {
|
|
56
|
+
this._connection = isConnection(optsConnection) ? optsConnection : createConnection(optsConnection);
|
|
57
|
+
this._service = service;
|
|
58
|
+
this._version = version;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
service(): string;
|
|
62
|
+
service(_: string): ESPConnection;
|
|
63
|
+
service(_?: string): string | ESPConnection {
|
|
64
|
+
if (_ === void 0) return this._service;
|
|
65
|
+
this._service = _;
|
|
66
|
+
return this;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
version(): string;
|
|
70
|
+
version(_: string): ESPConnection;
|
|
71
|
+
version(_?: string): string | ESPConnection {
|
|
72
|
+
if (_ === void 0) return this._version;
|
|
73
|
+
this._version = _;
|
|
74
|
+
return this;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
toESPStringArray(target: any, arrayName: string): any {
|
|
78
|
+
if (isArray(target[arrayName])) {
|
|
79
|
+
for (let i = 0; i < target[arrayName].length; ++i) {
|
|
80
|
+
target[arrayName + "_i" + i] = target[arrayName][i];
|
|
81
|
+
}
|
|
82
|
+
delete target[arrayName];
|
|
83
|
+
}
|
|
84
|
+
return target;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// IConnection ---
|
|
88
|
+
opts(_: Partial<IOptions>): this;
|
|
89
|
+
opts(): IOptions;
|
|
90
|
+
opts(_?: Partial<IOptions>): this | IOptions {
|
|
91
|
+
if (_ === void 0) return this._connection.opts();
|
|
92
|
+
this._connection.opts(_);
|
|
93
|
+
return this;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
send(action: string, _request: any = {}, espResponseType: ESPResponseType = "json", largeUpload: boolean = false, abortSignal?: AbortSignal, espResponseField?: string): Promise<any> {
|
|
97
|
+
const request = { ..._request, ...{ ver_: this._version } };
|
|
98
|
+
if (largeUpload) {
|
|
99
|
+
request["upload_"] = true;
|
|
100
|
+
}
|
|
101
|
+
if (abortSignal) {
|
|
102
|
+
request["abortSignal_"] = abortSignal;
|
|
103
|
+
}
|
|
104
|
+
let serviceAction: string;
|
|
105
|
+
let responseType: ResponseType = "json";
|
|
106
|
+
switch (espResponseType) {
|
|
107
|
+
case "text":
|
|
108
|
+
serviceAction = join(this._service, action);
|
|
109
|
+
responseType = "text";
|
|
110
|
+
break;
|
|
111
|
+
case "xsd":
|
|
112
|
+
serviceAction = join(this._service, action + ".xsd");
|
|
113
|
+
responseType = "text";
|
|
114
|
+
break;
|
|
115
|
+
case "json2":
|
|
116
|
+
serviceAction = join(this._service, action + "/json");
|
|
117
|
+
espResponseType = "json";
|
|
118
|
+
const actionParts = action.split("/");
|
|
119
|
+
action = actionParts.pop()!;
|
|
120
|
+
break;
|
|
121
|
+
default:
|
|
122
|
+
serviceAction = join(this._service, action + ".json");
|
|
123
|
+
}
|
|
124
|
+
return this._connection.send(serviceAction, request, responseType).then((response) => {
|
|
125
|
+
if (espResponseType === "json") {
|
|
126
|
+
let retVal;
|
|
127
|
+
if (response && response.Exceptions) {
|
|
128
|
+
throw new ESPExceptions(action, request, response.Exceptions);
|
|
129
|
+
} else if (response) {
|
|
130
|
+
retVal = response[espResponseField || (action + "Response")];
|
|
131
|
+
}
|
|
132
|
+
if (!retVal) {
|
|
133
|
+
throw new ESPExceptions(action, request, {
|
|
134
|
+
Source: "ESPConnection.send",
|
|
135
|
+
Exception: [{ Code: 0, Message: "Missing Response" }]
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
return retVal;
|
|
139
|
+
}
|
|
140
|
+
return response;
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
clone() {
|
|
145
|
+
return new ESPConnection(this._connection.clone(), this._service, this._version);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export class Service {
|
|
150
|
+
protected _connection: ESPConnection;
|
|
151
|
+
get baseUrl() { return this._connection.opts().baseUrl; }
|
|
152
|
+
|
|
153
|
+
constructor(optsConnection: IOptions | IConnection, service: string, version: string) {
|
|
154
|
+
this._connection = new ESPConnection(optsConnection, service, version);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
opts() {
|
|
158
|
+
return this._connection.opts();
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
connection(): ESPConnection {
|
|
162
|
+
return this._connection.clone();
|
|
163
|
+
}
|
|
164
|
+
}
|
package/src/index.browser.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./index.common.ts";
|
|
1
|
+
export * from "./index.common.ts";
|
package/src/index.common.ts
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
export * from "./__package__.ts";
|
|
2
|
-
export * from "./services/fileSpray.ts";
|
|
3
|
-
export * from "./services/wsAccess.ts";
|
|
4
|
-
export * from "./services/wsAccount.ts";
|
|
5
|
-
export * from "./services/wsCloud.ts";
|
|
6
|
-
export * from "./services/wsCodesign.ts";
|
|
7
|
-
export * from "./services/wsDali.ts";
|
|
8
|
-
export * from "./services/wsDFU.ts";
|
|
9
|
-
export * from "./services/wsDFUXRef.ts";
|
|
10
|
-
export * from "./services/wsEcl.ts";
|
|
11
|
-
export * from "./services/wsElk.ts";
|
|
12
|
-
export * from "./services/wsLogaccess.ts";
|
|
13
|
-
export * from "./services/wsMachine.ts";
|
|
14
|
-
export * from "./services/wsPackageProcess.ts";
|
|
15
|
-
export * from "./services/wsResources.ts";
|
|
16
|
-
export * from "./services/wsSasha.ts";
|
|
17
|
-
export * from "./services/wsSMC.ts";
|
|
18
|
-
export * from "./services/wsStore.ts";
|
|
19
|
-
export * from "./services/wsTopology.ts";
|
|
20
|
-
export * from "./services/wsWorkunits.ts";
|
|
21
|
-
|
|
22
|
-
export * from "./ecl/activity.ts";
|
|
23
|
-
export * from "./ecl/graph.ts";
|
|
24
|
-
export * from "./ecl/logicalFile.ts";
|
|
25
|
-
export * from "./ecl/machine.ts";
|
|
26
|
-
export * from "./ecl/query.ts";
|
|
27
|
-
export * from "./ecl/resource.ts";
|
|
28
|
-
export * from "./ecl/result.ts";
|
|
29
|
-
export * from "./ecl/scope.ts";
|
|
30
|
-
export * from "./ecl/sourceFile.ts";
|
|
31
|
-
export * from "./ecl/store.ts";
|
|
32
|
-
export * from "./ecl/timer.ts";
|
|
33
|
-
export * from "./ecl/topology.ts";
|
|
34
|
-
export * from "./ecl/targetCluster.ts";
|
|
35
|
-
export * from "./ecl/dfuWorkunit.ts";
|
|
36
|
-
export * from "./ecl/workunit.ts";
|
|
37
|
-
export * from "./ecl/xsdParser.ts";
|
|
38
|
-
|
|
39
|
-
export * from "./connection.ts";
|
|
40
|
-
export * from "./espConnection.ts";
|
|
1
|
+
export * from "./__package__.ts";
|
|
2
|
+
export * from "./services/fileSpray.ts";
|
|
3
|
+
export * from "./services/wsAccess.ts";
|
|
4
|
+
export * from "./services/wsAccount.ts";
|
|
5
|
+
export * from "./services/wsCloud.ts";
|
|
6
|
+
export * from "./services/wsCodesign.ts";
|
|
7
|
+
export * from "./services/wsDali.ts";
|
|
8
|
+
export * from "./services/wsDFU.ts";
|
|
9
|
+
export * from "./services/wsDFUXRef.ts";
|
|
10
|
+
export * from "./services/wsEcl.ts";
|
|
11
|
+
export * from "./services/wsElk.ts";
|
|
12
|
+
export * from "./services/wsLogaccess.ts";
|
|
13
|
+
export * from "./services/wsMachine.ts";
|
|
14
|
+
export * from "./services/wsPackageProcess.ts";
|
|
15
|
+
export * from "./services/wsResources.ts";
|
|
16
|
+
export * from "./services/wsSasha.ts";
|
|
17
|
+
export * from "./services/wsSMC.ts";
|
|
18
|
+
export * from "./services/wsStore.ts";
|
|
19
|
+
export * from "./services/wsTopology.ts";
|
|
20
|
+
export * from "./services/wsWorkunits.ts";
|
|
21
|
+
|
|
22
|
+
export * from "./ecl/activity.ts";
|
|
23
|
+
export * from "./ecl/graph.ts";
|
|
24
|
+
export * from "./ecl/logicalFile.ts";
|
|
25
|
+
export * from "./ecl/machine.ts";
|
|
26
|
+
export * from "./ecl/query.ts";
|
|
27
|
+
export * from "./ecl/resource.ts";
|
|
28
|
+
export * from "./ecl/result.ts";
|
|
29
|
+
export * from "./ecl/scope.ts";
|
|
30
|
+
export * from "./ecl/sourceFile.ts";
|
|
31
|
+
export * from "./ecl/store.ts";
|
|
32
|
+
export * from "./ecl/timer.ts";
|
|
33
|
+
export * from "./ecl/topology.ts";
|
|
34
|
+
export * from "./ecl/targetCluster.ts";
|
|
35
|
+
export * from "./ecl/dfuWorkunit.ts";
|
|
36
|
+
export * from "./ecl/workunit.ts";
|
|
37
|
+
export * from "./ecl/xsdParser.ts";
|
|
38
|
+
|
|
39
|
+
export * from "./connection.ts";
|
|
40
|
+
export * from "./espConnection.ts";
|
package/src/index.node.ts
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
// DOM Parser polyfill ---
|
|
2
|
-
import { root } from "@hpcc-js/util";
|
|
3
|
-
import { DOMParser } from "@xmldom/xmldom";
|
|
4
|
-
root.DOMParser = DOMParser;
|
|
5
|
-
|
|
6
|
-
// fetch setup for Node.js ---
|
|
7
|
-
import * as https from "node:https";
|
|
8
|
-
import { Buffer } from "node:buffer";
|
|
9
|
-
import { fetch, Agent } from "undici";
|
|
10
|
-
|
|
11
|
-
// NodeJS >= v18 has native fetch ---
|
|
12
|
-
if (root.fetch === undefined) {
|
|
13
|
-
throw new Error("@hpcc-js/comms requires Node.js >= 18.0.0 for native fetch support");
|
|
14
|
-
}
|
|
15
|
-
root.__hpcc_undiciFetch = fetch;
|
|
16
|
-
root.__hpcc_rejectUnauthorizedAgent = new Agent({
|
|
17
|
-
connect: {
|
|
18
|
-
rejectUnauthorized: false
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
import { trustwave } from "./pem/trustwave.ts";
|
|
23
|
-
|
|
24
|
-
let globalCA = "";
|
|
25
|
-
if (https.globalAgent.options.ca !== undefined) {
|
|
26
|
-
if (Array.isArray(https.globalAgent.options.ca) && https.globalAgent.options.ca.length) {
|
|
27
|
-
if (typeof https.globalAgent.options.ca[0] === "string") {
|
|
28
|
-
globalCA = https.globalAgent.options.ca.join("\n");
|
|
29
|
-
} else if (https.globalAgent.options.ca[0] instanceof Buffer) {
|
|
30
|
-
globalCA = https.globalAgent.options.ca.map(row => row.toString()).join("\n");
|
|
31
|
-
}
|
|
32
|
-
} else if (typeof https.globalAgent.options.ca === "string") {
|
|
33
|
-
globalCA = https.globalAgent.options.ca;
|
|
34
|
-
} else if (https.globalAgent.options.ca instanceof Buffer) {
|
|
35
|
-
globalCA = https.globalAgent.options.ca.toString();
|
|
36
|
-
}
|
|
37
|
-
globalCA += "\n";
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
root.__hpcc_trustwaveAgent = new https.Agent({
|
|
41
|
-
ca: globalCA + trustwave
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
export * from "./index.common.ts";
|
|
45
|
-
|
|
46
|
-
// Client Tools ---
|
|
47
|
-
export * from "./clienttools/eclcc.ts";
|
|
48
|
-
export * from "./clienttools/eclMeta.ts";
|
|
1
|
+
// DOM Parser polyfill ---
|
|
2
|
+
import { root } from "@hpcc-js/util";
|
|
3
|
+
import { DOMParser } from "@xmldom/xmldom";
|
|
4
|
+
root.DOMParser = DOMParser;
|
|
5
|
+
|
|
6
|
+
// fetch setup for Node.js ---
|
|
7
|
+
import * as https from "node:https";
|
|
8
|
+
import { Buffer } from "node:buffer";
|
|
9
|
+
import { fetch, Agent } from "undici";
|
|
10
|
+
|
|
11
|
+
// NodeJS >= v18 has native fetch ---
|
|
12
|
+
if (root.fetch === undefined) {
|
|
13
|
+
throw new Error("@hpcc-js/comms requires Node.js >= 18.0.0 for native fetch support");
|
|
14
|
+
}
|
|
15
|
+
root.__hpcc_undiciFetch = fetch;
|
|
16
|
+
root.__hpcc_rejectUnauthorizedAgent = new Agent({
|
|
17
|
+
connect: {
|
|
18
|
+
rejectUnauthorized: false
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
import { trustwave } from "./pem/trustwave.ts";
|
|
23
|
+
|
|
24
|
+
let globalCA = "";
|
|
25
|
+
if (https.globalAgent.options.ca !== undefined) {
|
|
26
|
+
if (Array.isArray(https.globalAgent.options.ca) && https.globalAgent.options.ca.length) {
|
|
27
|
+
if (typeof https.globalAgent.options.ca[0] === "string") {
|
|
28
|
+
globalCA = https.globalAgent.options.ca.join("\n");
|
|
29
|
+
} else if (https.globalAgent.options.ca[0] instanceof Buffer) {
|
|
30
|
+
globalCA = https.globalAgent.options.ca.map(row => row.toString()).join("\n");
|
|
31
|
+
}
|
|
32
|
+
} else if (typeof https.globalAgent.options.ca === "string") {
|
|
33
|
+
globalCA = https.globalAgent.options.ca;
|
|
34
|
+
} else if (https.globalAgent.options.ca instanceof Buffer) {
|
|
35
|
+
globalCA = https.globalAgent.options.ca.toString();
|
|
36
|
+
}
|
|
37
|
+
globalCA += "\n";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
root.__hpcc_trustwaveAgent = new https.Agent({
|
|
41
|
+
ca: globalCA + trustwave
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export * from "./index.common.ts";
|
|
45
|
+
|
|
46
|
+
// Client Tools ---
|
|
47
|
+
export * from "./clienttools/eclcc.ts";
|
|
48
|
+
export * from "./clienttools/eclMeta.ts";
|