@broadcom/ops-for-zowe-cli 5.0.0-next.202408061338 → 5.0.0-next.202409201250
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/README.md +7 -1
- package/lib/api/Create.d.ts +2 -0
- package/lib/api/Create.js +59 -0
- package/lib/api/Create.js.map +1 -0
- package/lib/api/Execute.d.ts +3 -1
- package/lib/api/Execute.js +127 -11
- package/lib/api/Execute.js.map +1 -1
- package/lib/api/Show.d.ts +2 -6
- package/lib/api/Show.js +18 -3
- package/lib/api/Show.js.map +1 -1
- package/lib/api/constants/Ops.constants.d.ts +2 -2
- package/lib/api/constants/Ops.constants.js +6 -2
- package/lib/api/constants/Ops.constants.js.map +1 -1
- package/lib/api/doc/IExecuteCommandResponse.d.ts +9 -0
- package/lib/api/doc/IExecuteCommandResponse.js +25 -0
- package/lib/api/doc/IExecuteCommandResponse.js.map +1 -0
- package/lib/api/index.d.ts +2 -0
- package/lib/api/index.js +2 -0
- package/lib/api/index.js.map +1 -1
- package/lib/api/utils/CommandListUtils.d.ts +9 -0
- package/lib/api/utils/CommandListUtils.js +124 -0
- package/lib/api/utils/CommandListUtils.js.map +1 -0
- package/lib/api/utils/CommandUtils.d.ts +4 -0
- package/lib/api/utils/CommandUtils.js +41 -0
- package/lib/api/utils/CommandUtils.js.map +1 -0
- package/lib/api/utils/EventListUtils.d.ts +4 -0
- package/lib/api/utils/EventListUtils.js +33 -0
- package/lib/api/utils/EventListUtils.js.map +1 -0
- package/lib/api/utils/EventUtils.d.ts +4 -0
- package/lib/api/utils/EventUtils.js +41 -0
- package/lib/api/utils/EventUtils.js.map +1 -0
- package/lib/api/utils/OpsRestUtils.js +3 -3
- package/lib/api/utils/OpsRestUtils.js.map +1 -1
- package/lib/api/utils/RuleUtils.js +1 -0
- package/lib/api/utils/RuleUtils.js.map +1 -1
- package/lib/api/utils/TableListUtils.d.ts +10 -0
- package/lib/api/utils/TableListUtils.js +87 -0
- package/lib/api/utils/TableListUtils.js.map +1 -0
- package/lib/api/utils/TableUtils.d.ts +4 -0
- package/lib/api/utils/TableUtils.js +49 -0
- package/lib/api/utils/TableUtils.js.map +1 -0
- package/lib/api/utils/index.d.ts +7 -1
- package/lib/api/utils/index.js +7 -1
- package/lib/api/utils/index.js.map +1 -1
- package/lib/cli/CommandParameterDefinitions.d.ts +28 -0
- package/lib/cli/CommandParameterDefinitions.js +326 -0
- package/lib/cli/CommandParameterDefinitions.js.map +1 -0
- package/lib/cli/EventParameterDefinitions.d.ts +7 -0
- package/lib/cli/EventParameterDefinitions.js +45 -0
- package/lib/cli/EventParameterDefinitions.js.map +1 -0
- package/lib/cli/RexxParameterDefinitions.js +7 -8
- package/lib/cli/RexxParameterDefinitions.js.map +1 -1
- package/lib/cli/TableParameterDefinitions.d.ts +6 -0
- package/lib/cli/TableParameterDefinitions.js +52 -0
- package/lib/cli/TableParameterDefinitions.js.map +1 -0
- package/lib/cli/create/Create.definition.d.ts +3 -0
- package/lib/cli/create/Create.definition.js +35 -0
- package/lib/cli/create/Create.definition.js.map +1 -0
- package/lib/cli/create/event/Event.definition.d.ts +2 -0
- package/lib/cli/create/event/Event.definition.js +46 -0
- package/lib/cli/create/event/Event.definition.js.map +1 -0
- package/lib/cli/create/event/Event.handler.d.ts +5 -0
- package/lib/cli/create/event/Event.handler.js +45 -0
- package/lib/cli/create/event/Event.handler.js.map +1 -0
- package/lib/cli/disable/rule/Rule.definition.js +2 -2
- package/lib/cli/disable/rule/Rule.definition.js.map +1 -1
- package/lib/cli/enable/rule/Rule.definition.js +2 -2
- package/lib/cli/enable/rule/Rule.definition.js.map +1 -1
- package/lib/cli/execute/Execute.definition.js +4 -3
- package/lib/cli/execute/Execute.definition.js.map +1 -1
- package/lib/cli/execute/command/Command.definition.d.ts +2 -0
- package/lib/cli/execute/command/Command.definition.js +69 -0
- package/lib/cli/execute/command/Command.definition.js.map +1 -0
- package/lib/cli/execute/command/Command.handler.d.ts +5 -0
- package/lib/cli/execute/command/Command.handler.js +49 -0
- package/lib/cli/execute/command/Command.handler.js.map +1 -0
- package/lib/cli/execute/rexx/Rexx.definition.js +6 -2
- package/lib/cli/execute/rexx/Rexx.definition.js.map +1 -1
- package/lib/cli/show/Show.definition.js +4 -3
- package/lib/cli/show/Show.definition.js.map +1 -1
- package/lib/cli/show/logname/Logname.definition.js +2 -2
- package/lib/cli/show/logname/Logname.definition.js.map +1 -1
- package/lib/cli/show/resource/Resource.definition.js +6 -6
- package/lib/cli/show/resource/Resource.definition.js.map +1 -1
- package/lib/cli/show/rule/Rule.definition.js +6 -6
- package/lib/cli/show/rule/Rule.definition.js.map +1 -1
- package/lib/cli/show/ruleset/Ruleset.definition.js +6 -6
- package/lib/cli/show/ruleset/Ruleset.definition.js.map +1 -1
- package/lib/cli/show/status/Status.definition.js +2 -2
- package/lib/cli/show/status/Status.definition.js.map +1 -1
- package/lib/cli/show/subsystem/Subsystem.definition.js +3 -3
- package/lib/cli/show/subsystem/Subsystem.definition.js.map +1 -1
- package/lib/cli/show/table/Table.definition.d.ts +17 -0
- package/lib/cli/show/table/Table.definition.js +67 -0
- package/lib/cli/show/table/Table.definition.js.map +1 -0
- package/lib/cli/show/table/Table.handler.d.ts +5 -0
- package/lib/cli/show/table/Table.handler.js +49 -0
- package/lib/cli/show/table/Table.handler.js.map +1 -0
- package/lib/cli/start/resource/Resource.definition.js +5 -5
- package/lib/cli/start/resource/Resource.definition.js.map +1 -1
- package/lib/cli/stop/resource/Resource.definition.js +5 -5
- package/lib/cli/stop/resource/Resource.definition.js.map +1 -1
- package/lib/imperative.js +0 -9
- package/lib/imperative.js.map +1 -1
- package/lib/index.d.ts +4 -0
- package/lib/index.js +4 -0
- package/lib/index.js.map +1 -1
- package/package.json +20 -14
package/README.md
CHANGED
|
@@ -11,7 +11,10 @@ Using the plug-in, you can benefit from the following OPS/MVS features:
|
|
|
11
11
|
- *Display the status of a REST API server.
|
|
12
12
|
- *Display the log names.
|
|
13
13
|
- *Display the subsystems.
|
|
14
|
+
- *Display RDF tables.
|
|
14
15
|
- *Execute a REXX program.
|
|
16
|
+
- *Execute a operator command.
|
|
17
|
+
- *Create a generic AOF event for API rules processing.
|
|
15
18
|
|
|
16
19
|
Note: * Indicates only available if you are using the plug-in with the OPS/MVS REST API.
|
|
17
20
|
|
|
@@ -141,7 +144,7 @@ In a breaking change, `tablename` is now a required positional argument.
|
|
|
141
144
|
|
|
142
145
|
### New Commands
|
|
143
146
|
|
|
144
|
-
**Note:** The following new
|
|
147
|
+
**Note:** The following new commands are only available when you use the OPS/MVS plug-in for Zowe CLI with the OPS/MVS REST API.
|
|
145
148
|
|
|
146
149
|
**show ruleset**
|
|
147
150
|
|
|
@@ -163,6 +166,9 @@ Use the new `show subsystem` command to display the subsystems running on an OPS
|
|
|
163
166
|
|
|
164
167
|
Use the new `execute rexx` command to execute the specified OPS/MVS REXX program.
|
|
165
168
|
|
|
169
|
+
**Note:** There is a bug in @zowe/cli v2 that strips the single quotes when specifying a program name that requires single quotes to delimit the fully qualified dataset name.
|
|
170
|
+
The work-around is to specify two single quotes. Example: "''fully.qualified.dataset(member)''"
|
|
171
|
+
|
|
166
172
|
### Enhanced Commands
|
|
167
173
|
|
|
168
174
|
**Note:** The following enhanced commands are only available when you use the OPS/MVS plug-in for Zowe CLI with the OPS/MVS REST API.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2024 Broadcom. All Rights Reserved. The term
|
|
4
|
+
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
|
+
*
|
|
6
|
+
* This software and all information contained therein is
|
|
7
|
+
* confidential and proprietary and shall not be duplicated,
|
|
8
|
+
* used, disclosed, or disseminated in any way except as
|
|
9
|
+
* authorized by the applicable license agreement, without the
|
|
10
|
+
* express written permission of Broadcom. All authorized
|
|
11
|
+
* reproductions must be marked with this language.
|
|
12
|
+
*
|
|
13
|
+
* EXCEPT AS SET FORTH IN THE APPLICABLE LICENSE AGREEMENT, TO
|
|
14
|
+
* THE EXTENT PERMITTED BY APPLICABLE LAW, BROADCOM PROVIDES THIS
|
|
15
|
+
* SOFTWARE WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT
|
|
16
|
+
* LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL BROADCOM
|
|
18
|
+
* BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR
|
|
19
|
+
* DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS SOFTWARE,
|
|
20
|
+
* INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS
|
|
21
|
+
* INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS
|
|
22
|
+
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
|
|
23
|
+
*/
|
|
24
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
25
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
26
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
27
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
28
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
29
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
30
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
exports.createEvent = void 0;
|
|
35
|
+
const utils_1 = require("./utils");
|
|
36
|
+
const constants_1 = require("./constants");
|
|
37
|
+
const OpsRestClient_1 = require("./utils/OpsRestClient");
|
|
38
|
+
function createEvent(session, eventCode, eventText, restApi, subSystem, params) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
const createEventUrl = utils_1.EventUtils.getCreateEventURL(session, subSystem);
|
|
41
|
+
const commandBody = {
|
|
42
|
+
eventCode: eventCode,
|
|
43
|
+
eventText: eventText
|
|
44
|
+
};
|
|
45
|
+
if (restApi) {
|
|
46
|
+
return OpsRestClient_1.OpsRestClient.postExpectJSON(session, createEventUrl, constants_1.OpsConstants.headers, commandBody);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
/* istanbul ignore next */
|
|
50
|
+
// Display message indicating 'execute rexx' not supported with web services
|
|
51
|
+
params.response.console.log("Command 'create event' is only supported with the OPS/MVS REST API server");
|
|
52
|
+
}
|
|
53
|
+
/* istanbul ignore next */
|
|
54
|
+
return null;
|
|
55
|
+
// avoid code smell
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
exports.createEvent = createEvent;
|
|
59
|
+
//# sourceMappingURL=Create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Create.js","sourceRoot":"","sources":["../../src/api/Create.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAGH,mCAAqC;AACrC,2CAA2C;AAC3C,yDAAsD;AAEtD,SAAsB,WAAW,CAAC,OAAgB,EAAE,SAAiB,EAAE,SAAiB,EAAE,OAAgB,EACxE,SAAiB,EAAE,MAA0B;;QAE3E,MAAM,cAAc,GAAG,kBAAU,CAAC,iBAAiB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAOxE,MAAM,WAAW,GAAgB;YAC7B,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,SAAS;SACvB,CAAC;QAEF,IAAI,OAAO,EAAE;YACT,OAAO,6BAAa,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,wBAAY,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;SACnG;aAAM;YACH,0BAA0B;YAC1B,4EAA4E;YAC5E,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,2EAA2E,CAAC,CAAC;SAC5G;QACD,0BAA0B;QAC1B,OAAO,IAAI,CAAC;QACZ,mBAAmB;IACvB,CAAC;CAAA;AAzBD,kCAyBC"}
|
package/lib/api/Execute.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IHandlerParameters, Session } from "@zowe/imperative";
|
|
2
2
|
import { IExecuteRexxResponse } from "./doc/IExecuteRexxResponse";
|
|
3
|
+
import { IExecuteCommandResponse } from "./doc/IExecuteCommandResponse";
|
|
3
4
|
export declare function executeRexx(session: Session, program: string, restApi: boolean, subSystem: string, params: IHandlerParameters, arg?: string, maxQueue?: string, workspace?: string, timeout?: string, outputLimit?: string, wait?: number, debug?: string): Promise<IExecuteRexxResponse>;
|
|
4
5
|
export declare function retrieveRexx(session: Session, instanceToken: string, restApi: boolean, params: IHandlerParameters): Promise<IExecuteRexxResponse>;
|
|
5
|
-
export declare function
|
|
6
|
+
export declare function executeCommand(session: Session, command: string, restApi: boolean, subSystem: string, params: IHandlerParameters, bmpCmdOut?: string, capture?: string, cart?: string, cmdEcho?: string, cmdLog?: string, cmdWait?: string, conName?: string, conType?: string, imsId?: string, imsPlex?: string, imsReply?: string, interval?: string, localOnly?: string, log?: string, maxCmdOut?: string, output?: string, stopEnd?: string, stopMsg?: string, stopResp?: string, wait?: string, debug?: string): Promise<IExecuteCommandResponse>;
|
|
7
|
+
export declare function processWait(session: Session, program: string, instanceToken: string, restApi: boolean, wait?: number): Promise<{}>;
|
package/lib/api/Execute.js
CHANGED
|
@@ -31,48 +31,49 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
-
exports.processWait = exports.retrieveRexx = exports.executeRexx = void 0;
|
|
34
|
+
exports.processWait = exports.executeCommand = exports.retrieveRexx = exports.executeRexx = void 0;
|
|
35
35
|
const imperative_1 = require("@zowe/imperative");
|
|
36
36
|
const utils_1 = require("./utils");
|
|
37
37
|
const constants_1 = require("./constants");
|
|
38
38
|
const OpsRestClient_1 = require("./utils/OpsRestClient");
|
|
39
39
|
const RexxParameterDefinitions_1 = require("../cli/RexxParameterDefinitions");
|
|
40
|
+
const CommandParameterDefinitions_1 = require("../cli/CommandParameterDefinitions");
|
|
40
41
|
function executeRexx(session, program, restApi, subSystem, params, arg, maxQueue, workspace, timeout, outputLimit, wait, debug) {
|
|
41
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
43
|
if (wait != null) {
|
|
43
44
|
imperative_1.ImperativeExpect.toBeEqual(wait > 0 && wait <= RexxParameterDefinitions_1.RexxParameterDefinitions.WAIT_TIME, true, `Wait value must be between 1 and ${RexxParameterDefinitions_1.RexxParameterDefinitions.WAIT_TIME} (inclusive), if specified. You specified: ${wait}`);
|
|
44
45
|
}
|
|
45
46
|
const executeRexxUrl = utils_1.RexxUtils.getExecuteRexxURL(session, subSystem);
|
|
46
|
-
const
|
|
47
|
+
const commandBody = {
|
|
47
48
|
program: program //"'" + program + "'"
|
|
48
49
|
};
|
|
49
50
|
if (arg !== "" && arg !== undefined) {
|
|
50
|
-
|
|
51
|
+
commandBody.arg = arg;
|
|
51
52
|
}
|
|
52
53
|
if (maxQueue !== "" && maxQueue !== undefined) {
|
|
53
|
-
|
|
54
|
+
commandBody.maxQueue = maxQueue;
|
|
54
55
|
}
|
|
55
56
|
if (workspace !== "" && workspace !== undefined) {
|
|
56
|
-
|
|
57
|
+
commandBody.workspace = workspace;
|
|
57
58
|
}
|
|
58
59
|
if (timeout !== "" && timeout !== undefined) {
|
|
59
|
-
|
|
60
|
+
commandBody.timeout = timeout;
|
|
60
61
|
}
|
|
61
62
|
if (outputLimit !== "" && outputLimit !== undefined) {
|
|
62
|
-
|
|
63
|
+
commandBody.outputLimit = outputLimit;
|
|
63
64
|
}
|
|
64
65
|
if (debug !== "" && debug !== undefined) {
|
|
65
|
-
|
|
66
|
+
commandBody.debug = debug;
|
|
66
67
|
}
|
|
67
68
|
let response;
|
|
68
69
|
if (restApi) {
|
|
69
|
-
response = yield OpsRestClient_1.OpsRestClient.postExpectJSON(session, executeRexxUrl, constants_1.OpsConstants.headers,
|
|
70
|
+
response = yield OpsRestClient_1.OpsRestClient.postExpectJSON(session, executeRexxUrl, constants_1.OpsConstants.headers, commandBody);
|
|
70
71
|
if (wait == null) {
|
|
71
72
|
return response;
|
|
72
73
|
}
|
|
73
74
|
else {
|
|
74
75
|
// retrieve the result of the REXX program execution
|
|
75
|
-
response = yield processWait(
|
|
76
|
+
response = yield processWait(session, program, response.instanceToken, restApi, wait);
|
|
76
77
|
return response;
|
|
77
78
|
}
|
|
78
79
|
}
|
|
@@ -105,7 +106,122 @@ function retrieveRexx(session, instanceToken, restApi, params) {
|
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
108
|
exports.retrieveRexx = retrieveRexx;
|
|
108
|
-
function
|
|
109
|
+
function executeCommand(session, command, restApi, subSystem, params, bmpCmdOut, capture, cart, cmdEcho, cmdLog, cmdWait, conName, conType, imsId, imsPlex, imsReply, interval, localOnly, log, maxCmdOut, output, stopEnd, stopMsg, stopResp, wait, debug) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
if (!restApi) {
|
|
112
|
+
// Display message indicating 'execute command' not supported with web services
|
|
113
|
+
params.response.console.log("Command 'execute command' is only supported with the OPS/MVS REST API server");
|
|
114
|
+
/* istanbul ignore next */
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
if (wait != null) {
|
|
118
|
+
imperative_1.ImperativeExpect.toBeEqual(Number(wait) > 0 && Number(wait) <= CommandParameterDefinitions_1.CommandParameterDefinitions.WAIT_TIME, true, `Wait value must be between 1 and ${RexxParameterDefinitions_1.RexxParameterDefinitions.WAIT_TIME} (inclusive), if specified. You specified: ${wait}`);
|
|
119
|
+
}
|
|
120
|
+
// Validation
|
|
121
|
+
// 1. mutually exclusive - cmdWait and wait
|
|
122
|
+
// $ zowe ops execute command "D T" --ops-p "ops11restapi" --cmdWait "30" --wait "30"
|
|
123
|
+
// Parameters 'cmdWait' and 'wait' are mutually exclusive.
|
|
124
|
+
// 2. mutually exclusive - conName and conType
|
|
125
|
+
// $ zowe ops execute command "D T" --ops-p "ops11restapi" --output "NO" --wait "30"
|
|
126
|
+
// Parameters 'cmdWait' and 'wait' are mutually exclusive.
|
|
127
|
+
// 3. mutually exclusive - output = No and wait
|
|
128
|
+
// $ zowe ops execute command "D T" --ops-p "ops11restapi" --conType "NO" --conName "30"
|
|
129
|
+
// Parameters 'conType' and 'conName' are mutually exclusive.
|
|
130
|
+
// 4. mutually exclusive - stopMsg and stopResp
|
|
131
|
+
// $ zowe ops execute command "D T" --ops-p "ops11restapi" --stopMsg "NO" --stopResp "30"
|
|
132
|
+
// Parameters 'stopMsg' and 'stopResp' are mutually exclusive.
|
|
133
|
+
if ((cmdWait !== "" && cmdWait !== undefined) && (wait !== "" && wait !== undefined)) {
|
|
134
|
+
params.response.console.log("Parameters 'cmdWait' and 'wait' are mutually exclusive.");
|
|
135
|
+
/* istanbul ignore next */
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
if ((output === "NO") && (wait !== "" && wait !== undefined)) {
|
|
139
|
+
params.response.console.log("Parameters 'output = \"NO\"' and 'wait' = " + wait + " are mutually exclusive.");
|
|
140
|
+
/* istanbul ignore next */
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
143
|
+
if ((conType !== "" && conType !== undefined) && (conName !== "" && conName !== undefined)) {
|
|
144
|
+
params.response.console.log("Parameters 'conType' and 'conName' are mutually exclusive.");
|
|
145
|
+
/* istanbul ignore next */
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
if ((stopMsg !== "" && stopMsg !== undefined) && (stopResp !== "" && stopResp !== undefined)) {
|
|
149
|
+
params.response.console.log("Parameters 'stopMsg' and 'stopResp' are mutually exclusive.");
|
|
150
|
+
/* istanbul ignore next */
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
const executeCommandUrl = utils_1.CommandUtils.getExecuteCommandURL(session, subSystem);
|
|
154
|
+
const commandBody = {
|
|
155
|
+
command: command
|
|
156
|
+
};
|
|
157
|
+
if (bmpCmdOut !== "" && bmpCmdOut !== undefined) {
|
|
158
|
+
commandBody.bmpCmdOut = bmpCmdOut;
|
|
159
|
+
}
|
|
160
|
+
if (capture !== "" && capture !== undefined) {
|
|
161
|
+
commandBody.capture = capture;
|
|
162
|
+
}
|
|
163
|
+
if (cart !== "" && cart !== undefined) {
|
|
164
|
+
commandBody.cart = cart;
|
|
165
|
+
}
|
|
166
|
+
if (cmdEcho !== "" && cmdEcho !== undefined) {
|
|
167
|
+
commandBody.cmdEcho = cmdEcho;
|
|
168
|
+
}
|
|
169
|
+
if (cmdLog !== "" && cmdLog !== undefined) {
|
|
170
|
+
commandBody.cmdLog = cmdLog;
|
|
171
|
+
}
|
|
172
|
+
if (cmdWait !== "" && cmdWait !== undefined) {
|
|
173
|
+
commandBody.cmdWait = cmdWait;
|
|
174
|
+
}
|
|
175
|
+
if (conName !== "" && conName !== undefined) {
|
|
176
|
+
commandBody.conName = conName;
|
|
177
|
+
}
|
|
178
|
+
if (conType !== "" && conType !== undefined) {
|
|
179
|
+
commandBody.conType = conType;
|
|
180
|
+
}
|
|
181
|
+
if (imsId !== "" && imsId !== undefined) {
|
|
182
|
+
commandBody.imsId = imsId;
|
|
183
|
+
}
|
|
184
|
+
if (imsPlex !== "" && imsPlex !== undefined) {
|
|
185
|
+
commandBody.imsPlex = imsPlex;
|
|
186
|
+
}
|
|
187
|
+
if (imsReply !== "" && imsReply !== undefined) {
|
|
188
|
+
commandBody.imsReply = imsReply;
|
|
189
|
+
}
|
|
190
|
+
if (interval !== "" && interval !== undefined) {
|
|
191
|
+
commandBody.interval = interval;
|
|
192
|
+
}
|
|
193
|
+
if (localOnly !== "" && localOnly !== undefined) {
|
|
194
|
+
commandBody.localOnly = localOnly;
|
|
195
|
+
}
|
|
196
|
+
if (log !== "" && log !== undefined) {
|
|
197
|
+
commandBody.log = log;
|
|
198
|
+
}
|
|
199
|
+
if (maxCmdOut !== "" && maxCmdOut !== undefined) {
|
|
200
|
+
commandBody.maxCmdOut = maxCmdOut;
|
|
201
|
+
}
|
|
202
|
+
if (output !== "" && output !== undefined) {
|
|
203
|
+
commandBody.output = output;
|
|
204
|
+
}
|
|
205
|
+
if (stopEnd !== "" && stopEnd !== undefined) {
|
|
206
|
+
commandBody.stopEnd = stopEnd;
|
|
207
|
+
}
|
|
208
|
+
if (stopMsg !== "" && stopMsg !== undefined) {
|
|
209
|
+
commandBody.stopMsg = stopMsg;
|
|
210
|
+
}
|
|
211
|
+
if (stopResp !== "" && stopResp !== undefined) {
|
|
212
|
+
commandBody.stopResp = stopResp;
|
|
213
|
+
}
|
|
214
|
+
if (wait !== "" && wait !== undefined) {
|
|
215
|
+
commandBody.wait = wait;
|
|
216
|
+
}
|
|
217
|
+
if (debug !== "" && debug !== undefined) {
|
|
218
|
+
commandBody.debug = debug;
|
|
219
|
+
}
|
|
220
|
+
return OpsRestClient_1.OpsRestClient.postExpectJSON(session, executeCommandUrl, constants_1.OpsConstants.headers, commandBody);
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
exports.executeCommand = executeCommand;
|
|
224
|
+
function processWait(session, program, instanceToken, restApi, wait) {
|
|
109
225
|
return __awaiter(this, void 0, void 0, function* () {
|
|
110
226
|
// otherwise we have to poll
|
|
111
227
|
let pollResponse;
|
package/lib/api/Execute.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Execute.js","sourceRoot":"","sources":["../../src/api/Execute.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAAkG;AAClG,
|
|
1
|
+
{"version":3,"file":"Execute.js","sourceRoot":"","sources":["../../src/api/Execute.ts"],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AG,UAAU,CAAC,GAAG,IAAI,EAAE;YACzD,YAAY,GAAG,MAAM,YAAY,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;YACzE,wBAAwB;YACxB,IAAI,YAAY,CAAC,UAAU,KAAK,SAAS,EAAE;gBACvC,wDAAwD;gBACxD,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;oBAC1B,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;gBACpC,CAAC,CAAC,CAAC;aACN,CAAE,0BAA0B;iBACxB;gBACD,OAAO,YAAY,CAAC;aACvB;SACJ;QACD,4CAA4C;QAC5C,0BAA0B;QAC1B,MAAM,IAAI,4BAAe,CAAC;YACtB,GAAG,EAAE,8BAA8B,IAAI,UAAU,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,iCAAiC;gBACjG,KAAK,OAAO,uBAAuB;SAC1C,CAAC,CAAC;IACP,CAAC;CAAA;AA7BD,kCA6BC"}
|
package/lib/api/Show.d.ts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { IHandlerParameters, Session } from "@zowe/imperative";
|
|
2
|
-
import { IShowRuleResponse } from "
|
|
3
|
-
import { IShowRulesetResponse } from "./doc/IShowRulesetResponse";
|
|
4
|
-
import { IShowResourceResponse } from "./doc/IShowResourceResponse";
|
|
5
|
-
import { IShowStatusResponse } from "./doc/IShowStatusResponse";
|
|
6
|
-
import { IShowLognameResponse } from "./doc/IShowLognameResponse";
|
|
7
|
-
import { IShowSubsystemResponse } from "./doc/IShowSubsystemsResponse";
|
|
2
|
+
import { IShowLognameResponse, IShowResourceResponse, IShowRuleResponse, IShowRulesetResponse, IShowStatusResponse, IShowSubsystemResponse } from ".";
|
|
8
3
|
export declare function showRule(session: Session, ruleSetName: string, ruleName: string, restApi: boolean, subSystem: string): Promise<IShowRuleResponse>;
|
|
9
4
|
export declare function showResource(session: Session, resourceName: string, restApi: boolean, table: string, subsystem: string): Promise<IShowResourceResponse>;
|
|
10
5
|
export declare function showRuleset(session: Session, ruleSetName: string, restApi: boolean, subSystem: string, params: IHandlerParameters): Promise<IShowRulesetResponse>;
|
|
11
6
|
export declare function showStatus(session: Session, restApi: boolean, params: IHandlerParameters): Promise<IShowStatusResponse>;
|
|
12
7
|
export declare function showLogname(session: Session, restApi: boolean, subSystem: string, params: IHandlerParameters): Promise<IShowLognameResponse>;
|
|
13
8
|
export declare function showSubsystem(session: Session, restApi: boolean, params: IHandlerParameters): Promise<IShowSubsystemResponse>;
|
|
9
|
+
export declare function showTable(session: Session, restApi: boolean, subSystem: string, table: string, params: IHandlerParameters): Promise<IShowLognameResponse>;
|
package/lib/api/Show.js
CHANGED
|
@@ -31,11 +31,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
-
exports.showSubsystem = exports.showLogname = exports.showStatus = exports.showRuleset = exports.showResource = exports.showRule = void 0;
|
|
34
|
+
exports.showTable = exports.showSubsystem = exports.showLogname = exports.showStatus = exports.showRuleset = exports.showResource = exports.showRule = void 0;
|
|
35
35
|
const utils_1 = require("./utils");
|
|
36
36
|
const constants_1 = require("./constants");
|
|
37
37
|
const OpsRestClient_1 = require("./utils/OpsRestClient");
|
|
38
|
-
const SubsystemUtils_1 = require("./utils/SubsystemUtils");
|
|
39
38
|
function showRule(session, ruleSetName, ruleName, restApi, subSystem) {
|
|
40
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
40
|
const ruleUrl = utils_1.RuleUtils.getRuleURL(session, ruleSetName, ruleName, restApi, subSystem);
|
|
@@ -101,7 +100,7 @@ exports.showLogname = showLogname;
|
|
|
101
100
|
function showSubsystem(session, restApi, params) {
|
|
102
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
103
102
|
if (restApi) {
|
|
104
|
-
const subsystemsURL =
|
|
103
|
+
const subsystemsURL = utils_1.SubsystemsUtils.getSubsystemsURL(session);
|
|
105
104
|
return OpsRestClient_1.OpsRestClient.getExpectJSON(session, subsystemsURL, constants_1.OpsConstants.headers);
|
|
106
105
|
}
|
|
107
106
|
else {
|
|
@@ -114,4 +113,20 @@ function showSubsystem(session, restApi, params) {
|
|
|
114
113
|
});
|
|
115
114
|
}
|
|
116
115
|
exports.showSubsystem = showSubsystem;
|
|
116
|
+
function showTable(session, restApi, subSystem, table, params) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
if (restApi) {
|
|
119
|
+
const tableUrl = utils_1.TableUtils.getTableURL(session, subSystem, table);
|
|
120
|
+
return OpsRestClient_1.OpsRestClient.getExpectJSON(session, tableUrl, constants_1.OpsConstants.headers);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
/* istanbul ignore next */
|
|
124
|
+
// Display message indicating 'show log' not supported with web services
|
|
125
|
+
params.response.console.log("Command 'show table' is only supported with the OPS/MVS REST API server");
|
|
126
|
+
}
|
|
127
|
+
/* istanbul ignore next */
|
|
128
|
+
return null; // avoid code smell
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
exports.showTable = showTable;
|
|
117
132
|
//# sourceMappingURL=Show.js.map
|
package/lib/api/Show.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Show.js","sourceRoot":"","sources":["../../src/api/Show.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAGH,
|
|
1
|
+
{"version":3,"file":"Show.js","sourceRoot":"","sources":["../../src/api/Show.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAGH,mCAA4H;AAC5H,2CAA2C;AAG3C,yDAAsD;AAEtD,SAAsB,QAAQ,CAAC,OAAgB,EAAE,WAAmB,EAAE,QAAgB,EAAE,OAAgB,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AAA;AAbD,sCAaC;AAED,SAAsB,SAAS,CAAC,OAAgB,EAAE,OAAgB,EAClC,SAAiB,EAAE,KAAa,EAAE,MAA0B;;QAExF,IAAI,OAAO,EAAE;YACT,MAAM,QAAQ,GAAG,kBAAU,CAAC,WAAW,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;YACnE,OAAO,6BAAa,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,wBAAY,CAAC,OAAO,CAAC,CAAC;SAC/E;aAAM;YACH,0BAA0B;YAC1B,wEAAwE;YACxE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,yEAAyE,CAAC,CAAC;SAC1G;QACD,0BAA0B;QAC1B,OAAO,IAAI,CAAC,CAAE,mBAAmB;IACrC,CAAC;CAAA;AAbD,8BAaC"}
|
|
@@ -23,17 +23,21 @@
|
|
|
23
23
|
*/
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.OpsConstants = void 0;
|
|
26
|
-
/**
|
|
27
|
-
* Constants to be used by the API
|
|
26
|
+
/**"
|
|
27
|
+
* Constants to be used by the API"
|
|
28
28
|
*/
|
|
29
29
|
exports.OpsConstants = {
|
|
30
30
|
AOF_URL: "/aof",
|
|
31
31
|
APP_URL: "/opsmvs/api",
|
|
32
32
|
BASE_URL: "/opsmvs/api/v1",
|
|
33
33
|
DEFAULT_BASEPATH: "/api/v1",
|
|
34
|
+
EVENT_URL: "/aof/event",
|
|
34
35
|
LOGNAMES_URL: "/lognames",
|
|
36
|
+
OPSCMD_URL: "/opscmd",
|
|
35
37
|
OPSLOG_URL: "/opslog",
|
|
36
38
|
OPSMVS_URL: "/opsmvs",
|
|
39
|
+
RDF_TABLES_URL: "/rdf/tables",
|
|
40
|
+
RECORDS_SEARCH_URL: "/records/search",
|
|
37
41
|
RESOURCES_URL: "/ssm/resources",
|
|
38
42
|
REXX_URL: "/opsrexx",
|
|
39
43
|
RULE_URL: "/rules",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ops.constants.js","sourceRoot":"","sources":["../../../src/api/constants/Ops.constants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH;;GAEG;AACU,QAAA,YAAY,GAA2B;IAChD,OAAO,EAAE,MAAM;IACf,OAAO,EAAE,aAAa;IACtB,QAAQ,EAAE,gBAAgB;IAC1B,gBAAgB,EAAE,SAAS;IAC3B,YAAY,EAAE,WAAW;IACzB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,aAAa,EAAE,gBAAgB;IAC/B,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,YAAY;IACvB,WAAW,EAAE,eAAe;IAC5B,OAAO,EAAE,MAAM;IACf,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,SAAS;IACrB,cAAc,EAAE,aAAa;IAC7B,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,CAAC,EAAC,cAAc,EAAE,kBAAkB,EAAC,EAAE,EAAC,MAAM,EAAG,kBAAkB,EAAC,CAAC;IAC9E,SAAS,EAAE,WAAW;IACtB,cAAc,EAAE,gBAAgB;IAChC,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACf,CAAC"}
|
|
1
|
+
{"version":3,"file":"Ops.constants.js","sourceRoot":"","sources":["../../../src/api/constants/Ops.constants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH;;GAEG;AACU,QAAA,YAAY,GAA2B;IAChD,OAAO,EAAE,MAAM;IACf,OAAO,EAAE,aAAa;IACtB,QAAQ,EAAE,gBAAgB;IAC1B,gBAAgB,EAAE,SAAS;IAC3B,SAAS,EAAE,YAAY;IACvB,YAAY,EAAE,WAAW;IACzB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,cAAc,EAAE,aAAa;IAC7B,kBAAkB,EAAE,iBAAiB;IACrC,aAAa,EAAE,gBAAgB;IAC/B,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,YAAY;IACvB,WAAW,EAAE,eAAe;IAC5B,OAAO,EAAE,MAAM;IACf,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,SAAS;IACrB,cAAc,EAAE,aAAa;IAC7B,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,CAAC,EAAC,cAAc,EAAE,kBAAkB,EAAC,EAAE,EAAC,MAAM,EAAG,kBAAkB,EAAC,CAAC;IAC9E,SAAS,EAAE,WAAW;IACtB,cAAc,EAAE,gBAAgB;IAChC,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACf,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2024 Broadcom. All Rights Reserved. The term
|
|
4
|
+
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
|
+
*
|
|
6
|
+
* This software and all information contained therein is
|
|
7
|
+
* confidential and proprietary and shall not be duplicated,
|
|
8
|
+
* used, disclosed, or disseminated in any way except as
|
|
9
|
+
* authorized by the applicable license agreement, without the
|
|
10
|
+
* express written permission of Broadcom. All authorized
|
|
11
|
+
* reproductions must be marked with this language.
|
|
12
|
+
*
|
|
13
|
+
* EXCEPT AS SET FORTH IN THE APPLICABLE LICENSE AGREEMENT, TO
|
|
14
|
+
* THE EXTENT PERMITTED BY APPLICABLE LAW, BROADCOM PROVIDES THIS
|
|
15
|
+
* SOFTWARE WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT
|
|
16
|
+
* LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL BROADCOM
|
|
18
|
+
* BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR
|
|
19
|
+
* DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS SOFTWARE,
|
|
20
|
+
* INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS
|
|
21
|
+
* INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS
|
|
22
|
+
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
|
|
23
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
//# sourceMappingURL=IExecuteCommandResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IExecuteCommandResponse.js","sourceRoot":"","sources":["../../../src/api/doc/IExecuteCommandResponse.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
|
package/lib/api/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
export * from "./Create";
|
|
1
2
|
export * from "./Execute";
|
|
2
3
|
export * from "./Show";
|
|
3
4
|
export * from "./Update";
|
|
4
5
|
export * from "./constants";
|
|
5
6
|
export * from "./utils";
|
|
7
|
+
export * from "./doc/IExecuteCommandResponse";
|
|
6
8
|
export * from "./doc/IExecuteRexxResponse";
|
|
7
9
|
export * from "./doc/IShowLognameResponse";
|
|
8
10
|
export * from "./doc/IShowResourceResponse";
|
package/lib/api/index.js
CHANGED
|
@@ -36,11 +36,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
__exportStar(require("./Create"), exports);
|
|
39
40
|
__exportStar(require("./Execute"), exports);
|
|
40
41
|
__exportStar(require("./Show"), exports);
|
|
41
42
|
__exportStar(require("./Update"), exports);
|
|
42
43
|
__exportStar(require("./constants"), exports);
|
|
43
44
|
__exportStar(require("./utils"), exports);
|
|
45
|
+
__exportStar(require("./doc/IExecuteCommandResponse"), exports);
|
|
44
46
|
__exportStar(require("./doc/IExecuteRexxResponse"), exports);
|
|
45
47
|
__exportStar(require("./doc/IShowLognameResponse"), exports);
|
|
46
48
|
__exportStar(require("./doc/IShowResourceResponse"), exports);
|
package/lib/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;;;;;AAEH,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,6DAA2C;AAC3C,6DAA2C;AAC3C,8DAA4C;AAC5C,0DAAwC;AACxC,6DAA2C;AAC3C,4DAA0C;AAC1C,gEAA8C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,gEAA8C;AAC9C,6DAA2C;AAC3C,6DAA2C;AAC3C,8DAA4C;AAC5C,0DAAwC;AACxC,6DAA2C;AAC3C,4DAA0C;AAC1C,gEAA8C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IHandlerParameters } from "@zowe/imperative";
|
|
2
|
+
export declare class CommandListUtils {
|
|
3
|
+
static printExecuteCommandResponse(commandList: any, params: IHandlerParameters): string;
|
|
4
|
+
static formatNameValueDataResponse(commandList: any): string;
|
|
5
|
+
static formatNameValueColorDataResponse(commandList: any): string;
|
|
6
|
+
static formatJsonDataResponse(commandList: any): string;
|
|
7
|
+
static formatCsvHeaderResponse(arg: string, outputLength: number): string;
|
|
8
|
+
static formatCsvDataResponse(commandList: any): string;
|
|
9
|
+
}
|