@broadcom/mat-analyze-for-zowe-cli 1.0.9 → 2.0.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/CHANGELOG.md +3 -35
- package/README.md +7 -3
- package/lib/api/MATRest.d.ts +1 -1
- package/lib/api/MATRest.js +3 -5
- package/lib/api/MATRest.js.map +1 -1
- package/lib/cli/monitor/Monitor.definition.js +12 -1
- package/lib/cli/monitor/Monitor.definition.js.map +1 -1
- package/lib/cli/monitor/codeview/Histogram/Histogram.definition.js +1 -1
- package/lib/cli/monitor/codeview/Histogram/Histogram.handler.js +38 -16
- package/lib/cli/monitor/codeview/Histogram/Histogram.handler.js.map +1 -1
- package/lib/cli/monitor/codeview/callerid/Callerid.definition.js +1 -1
- package/lib/cli/monitor/codeview/csect/Csect.definition.js +1 -1
- package/lib/cli/monitor/codeview/module/Module.definition.js +1 -1
- package/lib/cli/monitor/db2/db2view/DB2View.definition.js +1 -1
- package/lib/cli/monitor/db2/sqlview/SQLView.definition.js +1 -1
- package/lib/cli/monitor/delayview/address/Address.definition.js +1 -1
- package/lib/cli/monitor/delayview/delay/Delay.definition.js +1 -1
- package/lib/cli/monitor/history/History.definition.js +1 -1
- package/lib/cli/monitor/overview/Overview.definition.js +1 -1
- package/lib/cli/profile/Profile.definition.js +12 -1
- package/lib/cli/profile/Profile.definition.js.map +1 -1
- package/lib/cli/profile/create/CreateProfile.definition.js +1 -1
- package/lib/cli/profile/invoke/InvokeProfile.definition.js +1 -1
- package/lib/cli/profile/listprofile/ListProfile.definition.js +1 -1
- package/lib/cli/session/MATSession.d.ts +22 -3
- package/lib/cli/session/MATSession.js +88 -22
- package/lib/cli/session/MATSession.js.map +1 -1
- package/lib/handlers/AbstractRestHandler.js +12 -6
- package/lib/handlers/AbstractRestHandler.js.map +1 -1
- package/lib/imperative.js +7 -3
- package/lib/imperative.js.map +1 -1
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,38 +1,6 @@
|
|
|
1
1
|
# Change log
|
|
2
2
|
All notable changes to this project are documented in this file.
|
|
3
3
|
|
|
4
|
-
## `
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
## `1.0.8`
|
|
8
|
-
- Rebranding updates
|
|
9
|
-
|
|
10
|
-
## `1.0.7`
|
|
11
|
-
- Security updates
|
|
12
|
-
|
|
13
|
-
## `1.0.6`
|
|
14
|
-
- Issue resolution for correct boolean datatype for zowediscoverable/zdis parameter.
|
|
15
|
-
|
|
16
|
-
## `1.0.6`
|
|
17
|
-
- Issue resolution for correct boolean datatype for zowediscoverable/zdis parameter.
|
|
18
|
-
|
|
19
|
-
## `1.0.5`
|
|
20
|
-
- Program listing support enhancements: The `zowe mat profile invoke` command is enhanced with the `listing` option, which activates the automated retrieval of Cobol, C/C++, and Assembler program listings through CA Endevor® footprints and registers the listing with CA MAT after the measurement is completed. Optional parameter `listingDir` added to the MAT profile options. The parameter defines the local directory to store retrieved listings. The `zowe mat monitor codeview histogram` command is enhanced with the `listing` option that retrieves the program listing details pertaining to the specific statement and CSECT. Users of Visual Studio Code IDE can navigate from the command response in their IDE terminal directly to the specific line and column of the retrieved source code.
|
|
21
|
-
|
|
22
|
-
## `1.0.4`
|
|
23
|
-
- Issue resolution for unit test coverage and DB2view related details.
|
|
24
|
-
|
|
25
|
-
## `1.0.3`
|
|
26
|
-
- DB2View and SQL statement details added under the DB2 command group
|
|
27
|
-
- Removed overrides configuration form imperative.ts.
|
|
28
|
-
|
|
29
|
-
## `1.0.2`
|
|
30
|
-
- Enabled CodeView histogram and CodeView CallerID.
|
|
31
|
-
|
|
32
|
-
## `1.0.1`
|
|
33
|
-
- Updated License.
|
|
34
|
-
|
|
35
|
-
## `1.0.0`
|
|
36
|
-
- Initial release.
|
|
37
|
-
|
|
38
|
-
|
|
4
|
+
## `2.0.0`
|
|
5
|
+
- Release for Zowe v2
|
|
6
|
+
- Changed Endevor package to version 7.0.0
|
package/README.md
CHANGED
|
@@ -123,8 +123,12 @@ To enable the interaction of the MAT Analyze plug-in for Zowe CLI with MAT, you
|
|
|
123
123
|
`--password` | `--pass` *(string)*
|
|
124
124
|
Your mainframe password.
|
|
125
125
|
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
`--base-path` | `--bp` *(string)*
|
|
127
|
+
The base path for your API mediation layer instance. Specify this option to prepend the base path to all resources when making REST requests. Do not specify this option if you are not using an API mediation layer.
|
|
128
|
+
|
|
129
|
+
`--reject-unauthorized` | `--ru` *(boolean)*
|
|
130
|
+
Reject self-signed certificates.
|
|
131
|
+
Default value: true
|
|
128
132
|
|
|
129
133
|
`--listingDir` | `--ldir` *(string)*
|
|
130
134
|
Specifies the directory where you want to store the registered program listings (e.g. 'c:\listings') for your immediate source code inspection. You can use the advantage of automated listing registration with MAT and listing retrieval through Endevor® footprints for Cobol, C/C++, and Assembler programs. When a source program listing is registered with MAT, you can enhance the histogram analysis data with the program listing details that pertain to the specific CSECT and program statement. The listing is transfered to the specified directory, which enables you to navigate directly to the line of the source code in you VS Code IDE and inspect the program statement. To use the listing retrieval option through Endevor® footprints, you need to have the Endevor® Web Services installed and configured and specify the Endevor® web server details in the MAT database configuration. The `--listingDir` parameter is optional.
|
|
@@ -137,7 +141,7 @@ To enable the interaction of the MAT Analyze plug-in for Zowe CLI with MAT, you
|
|
|
137
141
|
**Examples**
|
|
138
142
|
* Create a MAT profile called 'matprofile' using your MAT configuration and REST API details, with the MAT REST API server integrated with the Zowe API Mediation Layer:
|
|
139
143
|
```
|
|
140
|
-
$ zowe profiles create mat-profile matprofile --prt http --hn localhost --pt 1234 --user johndoe --pass qwerty --
|
|
144
|
+
$ zowe profiles create mat-profile matprofile --prt http --hn localhost --pt 1234 --user johndoe --pass qwerty --base-path api/v1/camat
|
|
141
145
|
```
|
|
142
146
|
|
|
143
147
|
* Create a MAT profile called 'matprofile' using your MAT configuration and the details of the MAT REST API server without integration with the Zowe API Mediation Layer, and define the 'c:\listings' directory to store program listings for instant analysis from your VS Code IDE:
|
package/lib/api/MATRest.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare class MATRest {
|
|
|
21
21
|
static readonly ANALYSIS_CODEVIEW_CALLERID: string;
|
|
22
22
|
static readonly ANALYSIS_CODEVIEW_HISTOGRAM: string;
|
|
23
23
|
static readonly TOKEN_OFFSET = 25;
|
|
24
|
-
static GetAuth(session: AbstractSession,
|
|
24
|
+
static GetAuth(session: AbstractSession, endpoint: string): Promise<IAuth>;
|
|
25
25
|
static sendGetRequest<T extends IResponse>(session: AbstractSession, resource: string, headers?: any[], parameters?: Map<string, object>): Promise<T>;
|
|
26
26
|
static sendPostRequest<T extends IResponse>(session: AbstractSession, resource: string, headers?: any[], payload?: any): Promise<T>;
|
|
27
27
|
static sendPostRequestWithParm<T extends IResponse>(session: AbstractSession, resource: string, headers?: any[], parameters?: Map<string, object>, payload?: any): Promise<T>;
|
package/lib/api/MATRest.js
CHANGED
|
@@ -34,13 +34,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
34
34
|
exports.MATRest = void 0;
|
|
35
35
|
const imperative_1 = require("@zowe/imperative");
|
|
36
36
|
class MATRest {
|
|
37
|
-
static GetAuth(session, username, password, endpoint) {
|
|
37
|
+
// public static async GetAuth(session: AbstractSession, username: string, password: string, endpoint: string): Promise<IAuth> {
|
|
38
|
+
static GetAuth(session, endpoint) {
|
|
38
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
const auth = "Basic " + Buffer.from(username + ":" + password).toString("base64");
|
|
40
|
-
const header = { Authorization: auth };
|
|
41
40
|
const resource = endpoint + MATRest.AUTH;
|
|
42
|
-
const
|
|
43
|
-
const response = yield this.sendPostRequest(session, resource, headers);
|
|
41
|
+
const response = yield this.sendPostRequest(session, resource);
|
|
44
42
|
return response;
|
|
45
43
|
});
|
|
46
44
|
}
|
package/lib/api/MATRest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MATRest.js","sourceRoot":"","sources":["../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GAAG,qBAAqB,CAAC;AACvE,oBAAY,GAAG,EAAE,CAAC"}
|
|
@@ -39,12 +39,23 @@ const CodeviewDefinition = require("./codeview/Codeview.definition");
|
|
|
39
39
|
const DelayviewDefinition = require("./delayview/Delayview.definition");
|
|
40
40
|
const DB2Definition = require("./db2/DB2.definition");
|
|
41
41
|
const History_definition_1 = require("./history/History.definition");
|
|
42
|
+
const MATSession_1 = require("../session/MATSession");
|
|
42
43
|
const MonitorDefinition = {
|
|
43
44
|
name: "monitor",
|
|
44
45
|
summary: "Get monitor data",
|
|
45
46
|
description: "Get monitor history and measurement analysis data from MAT.",
|
|
46
47
|
type: "group",
|
|
47
|
-
children: [Overview_definition_1.OverviewDefinition, CodeviewDefinition, DelayviewDefinition, History_definition_1.HistoryDefinition, DB2Definition]
|
|
48
|
+
children: [Overview_definition_1.OverviewDefinition, CodeviewDefinition, DelayviewDefinition, History_definition_1.HistoryDefinition, DB2Definition],
|
|
49
|
+
passOn: [
|
|
50
|
+
{
|
|
51
|
+
property: "options",
|
|
52
|
+
value: MATSession_1.MATSession.PMA_CONNECTION_OPTIONS,
|
|
53
|
+
merge: true,
|
|
54
|
+
ignoreNodes: [
|
|
55
|
+
{ type: "group" }
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
]
|
|
48
59
|
};
|
|
49
60
|
module.exports = MonitorDefinition;
|
|
50
61
|
//# sourceMappingURL=Monitor.definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Monitor.definition.js","sourceRoot":"","sources":["../../../src/cli/monitor/Monitor.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH;;;;;;;;;;;;GAYG;AACH,wEAAoE;AACpE,qEAAsE;AACtE,wEAAyE;AACzE,sDAAuD;AAEvD,qEAAiE;AACjE,MAAM,iBAAiB,GAAuB;IAC1C,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,kBAAkB;IAC3B,WAAW,EAAE,6DAA6D;IAC1E,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,CAAC,wCAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,sCAAiB,EAAE,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Monitor.definition.js","sourceRoot":"","sources":["../../../src/cli/monitor/Monitor.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH;;;;;;;;;;;;GAYG;AACH,wEAAoE;AACpE,qEAAsE;AACtE,wEAAyE;AACzE,sDAAuD;AAEvD,qEAAiE;AACjE,sDAAmD;AACnD,MAAM,iBAAiB,GAAuB;IAC1C,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,kBAAkB;IAC3B,WAAW,EAAE,6DAA6D;IAC1E,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,CAAC,wCAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,sCAAiB,EAAE,aAAa,CAAC;IACzG,MAAM,EAAE;QACJ;YACI,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,uBAAU,CAAC,sBAAsB;YACxC,KAAK,EAAE,IAAI;YACX,WAAW,EAAE;gBACT,EAAC,IAAI,EAAE,OAAO,EAAC;aAClB;SACJ;KACJ;CACJ,CAAC;AAEF,iBAAS,iBAAiB,CAAC"}
|
|
@@ -34,7 +34,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
34
34
|
const AbstractAnalyzeHandler_1 = require("../../../../handlers/AbstractAnalyzeHandler");
|
|
35
35
|
const MATRest_1 = require("../../../../api/MATRest");
|
|
36
36
|
const imperative_1 = require("@zowe/imperative");
|
|
37
|
-
|
|
37
|
+
// import { PrintElementComponents, IElementBasicData } from "@broadcom/endevor-for-zowe-cli";
|
|
38
|
+
const api_1 = require("@broadcom/endevor-for-zowe-cli/lib/api");
|
|
38
39
|
class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
39
40
|
getAnalyzeURI() {
|
|
40
41
|
return MATRest_1.MATRest.ANALYSIS_CODEVIEW_HISTOGRAM;
|
|
@@ -54,19 +55,27 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
54
55
|
if (params.arguments.listing === true) {
|
|
55
56
|
if ("footprint" in json) {
|
|
56
57
|
const endconerror = "Endevor Connection Error";
|
|
57
|
-
const matProfile = params.profiles.get("mat", true);
|
|
58
|
+
// const matProfile = params.profiles.get("mat", true);
|
|
58
59
|
const endevorFootprint = json.footprint[0]; // 1. CLARIFY WITH GAS WHY THE JSON FOOTPRINT IS AN ARRAY, CAN WE HAVE MORE THAN 1 FOOTPRINT PER MODULE AND CSECT?
|
|
59
|
-
const elemDef = {
|
|
60
|
+
/* const elemDef: IElementBasicData = {
|
|
60
61
|
environment: endevorFootprint.environment.trim(),
|
|
61
62
|
stageNumber: endevorFootprint.stage.trim(),
|
|
62
63
|
system: endevorFootprint.system.trim(),
|
|
63
|
-
subsystem: endevorFootprint.subsystem.trim(),
|
|
64
|
+
subsystem: endevorFootprint.subsystem.trim(), // SUBSYSTEM IS COMING WITH WHITE SPACES IN THE END.
|
|
64
65
|
type: endevorFootprint.type.trim(),
|
|
65
66
|
element: endevorFootprint.element.trim(),
|
|
66
67
|
// instance: "ENDEVOR" // ON THE JSON RESPONSE IS MISSING THE CONTEXT.
|
|
67
68
|
instance: endevorFootprint.endevorContext.trim()
|
|
68
|
-
}
|
|
69
|
-
const
|
|
69
|
+
};*/
|
|
70
|
+
/* const elemDef: ElmSpecDictionary = {
|
|
71
|
+
environment: endevorFootprint.environment.trim(),
|
|
72
|
+
"stage-number": endevorFootprint.stage.trim(),
|
|
73
|
+
system: endevorFootprint.system.trim(),
|
|
74
|
+
subsystem: endevorFootprint.subsystem.trim(), // SUBSYSTEM IS COMING WITH WHITE SPACES IN THE END.
|
|
75
|
+
type: endevorFootprint.type.trim(),
|
|
76
|
+
element: endevorFootprint.element.trim(),
|
|
77
|
+
};*/
|
|
78
|
+
/* const requestBody: any = {
|
|
70
79
|
version: undefined,
|
|
71
80
|
level: undefined,
|
|
72
81
|
print: "listing",
|
|
@@ -78,6 +87,18 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
78
87
|
whereCcidCurrent: undefined,
|
|
79
88
|
whereCcidAll: undefined,
|
|
80
89
|
whereCcidRetrieve: undefined,
|
|
90
|
+
};*/
|
|
91
|
+
const requestBody = {
|
|
92
|
+
print: "listing",
|
|
93
|
+
};
|
|
94
|
+
const elemDef = {
|
|
95
|
+
"environment": endevorFootprint.environment.trim(),
|
|
96
|
+
"stage-number": endevorFootprint.stage.trim(),
|
|
97
|
+
"system": endevorFootprint.system.trim(),
|
|
98
|
+
"subsystem": endevorFootprint.subsystem.trim(),
|
|
99
|
+
"type": endevorFootprint.type.trim(),
|
|
100
|
+
"element": endevorFootprint.element.trim(),
|
|
101
|
+
"print": "listing",
|
|
81
102
|
};
|
|
82
103
|
let endevorSession;
|
|
83
104
|
if (!endevorFootprint.endevorHost.includes("http")) {
|
|
@@ -101,8 +122,8 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
101
122
|
hostname: endevorFootprint.endevorHost.substring(endevorFootprint.endevorHost.indexOf("//") + 2),
|
|
102
123
|
port: endevorFootprint.endevorPort,
|
|
103
124
|
protocol: endevorFootprint.endevorHost.substring(0, endevorFootprint.endevorHost.indexOf(":")),
|
|
104
|
-
user:
|
|
105
|
-
password:
|
|
125
|
+
user: params.arguments.user,
|
|
126
|
+
password: params.arguments.password,
|
|
106
127
|
basePath: endevorFootprint.endevorBasePath,
|
|
107
128
|
rejectUnauthorized: false,
|
|
108
129
|
type: "basic"
|
|
@@ -118,7 +139,8 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
118
139
|
}
|
|
119
140
|
let responseEndevor;
|
|
120
141
|
try {
|
|
121
|
-
responseEndevor = yield
|
|
142
|
+
responseEndevor = yield api_1.EndevorClient.printElement(endevorSession)(endevorFootprint.endevorContext.trim())(elemDef);
|
|
143
|
+
// responseEndevor = await EndevorClient.printElement(endevorSession, elemDef, requestBody, false);
|
|
122
144
|
}
|
|
123
145
|
catch (error) {
|
|
124
146
|
if (error instanceof imperative_1.RestClientError) {
|
|
@@ -138,8 +160,8 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
138
160
|
throw exception;
|
|
139
161
|
}
|
|
140
162
|
}
|
|
141
|
-
if (responseEndevor.data !== null && responseEndevor.data !== undefined) {
|
|
142
|
-
let tofileName =
|
|
163
|
+
if (responseEndevor.body.data !== null && responseEndevor.body.data !== undefined) {
|
|
164
|
+
let tofileName = params.arguments.listingDir === undefined ? "." : params.arguments.listingDir;
|
|
143
165
|
try {
|
|
144
166
|
const fs = require("fs");
|
|
145
167
|
if (!fs.existsSync(tofileName)) {
|
|
@@ -150,7 +172,7 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
150
172
|
});
|
|
151
173
|
}
|
|
152
174
|
tofileName += "\\" + endevorFootprint.element + "." + this.getExtension(endevorFootprint.type);
|
|
153
|
-
fs.writeFileSync(tofileName, responseEndevor.data[0], { encoding: "latin1" });
|
|
175
|
+
fs.writeFileSync(tofileName, responseEndevor.body.data[0], { encoding: "latin1" });
|
|
154
176
|
// THIS IS HOW YOU WRITE A FILE USING ENDEVOR
|
|
155
177
|
// EndevorUtils.generalWriteFile(tofileName, responseEndevor.data[0]);
|
|
156
178
|
}
|
|
@@ -163,7 +185,7 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
163
185
|
};
|
|
164
186
|
throw exception;
|
|
165
187
|
}
|
|
166
|
-
if (responseEndevor.data[0].length === 0) {
|
|
188
|
+
if (responseEndevor.body.data[0].length === 0) {
|
|
167
189
|
const exception = {
|
|
168
190
|
name: "HistogramException",
|
|
169
191
|
header: "Endevor Data Error",
|
|
@@ -171,8 +193,8 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
171
193
|
};
|
|
172
194
|
throw exception;
|
|
173
195
|
}
|
|
174
|
-
responseEndevor.data[0] = responseEndevor.data[0] + "";
|
|
175
|
-
const lines = responseEndevor.data[0].split("\n");
|
|
196
|
+
responseEndevor.body.data[0] = responseEndevor.body.data[0] + "";
|
|
197
|
+
const lines = responseEndevor.body.data[0].split("\n");
|
|
176
198
|
for (const histogram of json.histogram) {
|
|
177
199
|
histogram.listing = "not found";
|
|
178
200
|
for (let index = 0; index < lines.length; index++) {
|
|
@@ -192,7 +214,7 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
192
214
|
const exception = {
|
|
193
215
|
name: "HistogramException",
|
|
194
216
|
header: "Resource Access Error",
|
|
195
|
-
message: "Listing not found. Caused by: \n" + responseEndevor.messages
|
|
217
|
+
message: "Listing not found. Caused by: \n" + responseEndevor.body.messages
|
|
196
218
|
};
|
|
197
219
|
throw exception;
|
|
198
220
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Histogram.handler.js","sourceRoot":"","sources":["../../../../../src/cli/monitor/codeview/Histogram/Histogram.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAEH,wFAAiF;AACjF,qDAAkD;AAElD,iDAAgF;AAChF,
|
|
1
|
+
{"version":3,"file":"Histogram.handler.js","sourceRoot":"","sources":["../../../../../src/cli/monitor/codeview/Histogram/Histogram.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAEH,wFAAiF;AACjF,qDAAkD;AAElD,iDAAgF;AAChF,8FAA8F;AAC9F,gEAAkH;AAGlH,MAAqB,gBAAiB,SAAQ,gCAAkC;IAElE,aAAa;QACnB,OAAO,iBAAO,CAAC,2BAA2B,CAAC;IAC/C,CAAC;IAES,SAAS,CAAC,IAAS;QACzB,IAAI,MAAM,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC5D,I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C1B,MAAM,EAAE,uBAAuB;wBAC/B,OAAO,EAAE,qEAAqE;qBACjF,CAAC;oBACF,MAAM,SAAS,CAAC;iBACnB;aACJ;YACD,OAAO,IAAI,CAAC,SAAS,CAAC;QAC1B,CAAC;KAAA;IACS,iBAAiB;QACvB,OAAO,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IAC1D,CAAC;IAEO,YAAY,CAAC,QAAgB;QACjC,QAAQ,QAAQ,EAAE;YACd,KAAK,OAAO;gBACR,OAAO,KAAK,CAAC;YACjB,KAAK,QAAQ;gBACT,OAAO,KAAK,CAAC;YACjB,KAAK,KAAK;gBACN,OAAO,KAAK,CAAC;YACjB,KAAK,QAAQ;gBACT,OAAO,KAAK,CAAC;YACjB,KAAK,GAAG;gBACJ,OAAO,GAAG,CAAC;YACf,KAAK,KAAK;gBACN,OAAO,KAAK,CAAC;YACjB;gBACI,OAAO,KAAK,CAAC;SACpB;IACL,CAAC;CACJ;AA7ND,mCA6NC"}
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
* INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS
|
|
22
22
|
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
|
|
23
23
|
*/
|
|
24
|
+
const MATSession_1 = require("../session/MATSession");
|
|
24
25
|
/**
|
|
25
26
|
* [action] command definition for the [action] two group. The [action] is of imperative command definition type
|
|
26
27
|
* "group", which means it must have children.
|
|
@@ -42,7 +43,17 @@ const ProfileDefinition = {
|
|
|
42
43
|
summary: "Manage monitor profiles",
|
|
43
44
|
description: "Create, invoke, and list MAT monitor profiles.",
|
|
44
45
|
type: "group",
|
|
45
|
-
children: [InvokeProfile_definition_1.InvokeDefinition, CreateProfile_definition_1.CreateDefinition, ListProfile_definition_1.ListProfileDefinition]
|
|
46
|
+
children: [InvokeProfile_definition_1.InvokeDefinition, CreateProfile_definition_1.CreateDefinition, ListProfile_definition_1.ListProfileDefinition],
|
|
47
|
+
passOn: [
|
|
48
|
+
{
|
|
49
|
+
property: "options",
|
|
50
|
+
value: MATSession_1.MATSession.PMA_CONNECTION_OPTIONS,
|
|
51
|
+
merge: true,
|
|
52
|
+
ignoreNodes: [
|
|
53
|
+
{ type: "group" }
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
]
|
|
46
57
|
};
|
|
47
58
|
module.exports = ProfileDefinition;
|
|
48
59
|
//# sourceMappingURL=Profile.definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Profile.definition.js","sourceRoot":"","sources":["../../../src/cli/profile/Profile.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH;;;;;;;;;;;;GAYG;AACH,gFAAqE;AACrE,gFAAqE;AACrE,iFAA6E;AAC7E,MAAM,iBAAiB,GAAuB;IAC1C,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,yBAAyB;IAClC,WAAW,EAAE,gDAAgD;IAC7D,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,CAAC,2CAAgB,EAAE,2CAAgB,EAAE,8CAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"Profile.definition.js","sourceRoot":"","sources":["../../../src/cli/profile/Profile.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,sDAAmD;AACnD;;;;;;;;;;;;GAYG;AACH,gFAAqE;AACrE,gFAAqE;AACrE,iFAA6E;AAC7E,MAAM,iBAAiB,GAAuB;IAC1C,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,yBAAyB;IAClC,WAAW,EAAE,gDAAgD;IAC7D,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,CAAC,2CAAgB,EAAE,2CAAgB,EAAE,8CAAqB,CAAC;IACrE,MAAM,EAAE;QACJ;YACI,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,uBAAU,CAAC,sBAAsB;YACxC,KAAK,EAAE,IAAI;YACX,WAAW,EAAE;gBACT,EAAC,IAAI,EAAE,OAAO,EAAC;aAClB;SACJ;KACJ;CACJ,CAAC;AAEF,iBAAS,iBAAiB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICommandOptionDefinition } from "@zowe/imperative";
|
|
1
|
+
import { ICommandArguments, ICommandOptionDefinition, IHandlerParameters, Session } from "@zowe/imperative";
|
|
2
2
|
/**
|
|
3
3
|
* Utility Methods for the CLI
|
|
4
4
|
* @export
|
|
@@ -26,13 +26,32 @@ export declare class MATSession {
|
|
|
26
26
|
*/
|
|
27
27
|
static MAT_CLI_PASSWORD: ICommandOptionDefinition;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Option used in profile creation and commands for basePath setting for connecting to MAT
|
|
30
30
|
*/
|
|
31
|
-
static
|
|
31
|
+
static MAT_CLI_BASE_PATH: ICommandOptionDefinition;
|
|
32
|
+
/**
|
|
33
|
+
* Option used in profile creation and commands for rejectUnauthorized setting for connecting to MAT
|
|
34
|
+
*/
|
|
35
|
+
static MAT_CLI_REJECT_UNAUTHORIZED: ICommandOptionDefinition;
|
|
32
36
|
static MAT_CLI_LISTINGDIR: ICommandOptionDefinition;
|
|
33
37
|
/**
|
|
34
38
|
* Options related to connecting to MAT
|
|
35
39
|
* These options can be filled in if the user creates a profile
|
|
36
40
|
*/
|
|
37
41
|
static PMA_CONNECTION_OPTIONS: ICommandOptionDefinition[];
|
|
42
|
+
/**
|
|
43
|
+
* Given command line arguments, create a REST Client Session.
|
|
44
|
+
* @static
|
|
45
|
+
* @param {IProfile} args - The arguments specified by the user
|
|
46
|
+
* @returns {Session} - A session for usage in the CMCI REST Client
|
|
47
|
+
*/
|
|
48
|
+
static createBasicMatSessionFromArguments(args: ICommandArguments): Session;
|
|
49
|
+
/**
|
|
50
|
+
* Given command handler parameters, create a REST Client Session.
|
|
51
|
+
* @static
|
|
52
|
+
* @param {IHandlerParameters} params - Command parameters sent by imperative.
|
|
53
|
+
* @param {boolean} doPrompting - Whether to prompt for missing arguments (defaults to true)
|
|
54
|
+
* @returns {Session} - A session for usage in the CMCI REST Client
|
|
55
|
+
*/
|
|
56
|
+
static createSessCfgForHandler(params: IHandlerParameters, doPrompting?: boolean): Promise<Session>;
|
|
38
57
|
}
|
|
@@ -21,13 +21,68 @@
|
|
|
21
21
|
* INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS
|
|
22
22
|
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
|
|
23
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
|
+
};
|
|
24
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
34
|
exports.MATSession = void 0;
|
|
35
|
+
// import { ICommandArguments, ICommandOptionDefinition, IProfile, Logger, Session } from "@zowe/imperative";
|
|
36
|
+
const imperative_1 = require("@zowe/imperative");
|
|
26
37
|
/**
|
|
27
38
|
* Utility Methods for the CLI
|
|
28
39
|
* @export
|
|
29
40
|
*/
|
|
30
41
|
class MATSession {
|
|
42
|
+
/**
|
|
43
|
+
* Given command line arguments, create a REST Client Session.
|
|
44
|
+
* @static
|
|
45
|
+
* @param {IProfile} args - The arguments specified by the user
|
|
46
|
+
* @returns {Session} - A session for usage in the CMCI REST Client
|
|
47
|
+
*/
|
|
48
|
+
static createBasicMatSessionFromArguments(args) {
|
|
49
|
+
return new imperative_1.Session({
|
|
50
|
+
type: "basic",
|
|
51
|
+
hostname: args.host,
|
|
52
|
+
port: args.port,
|
|
53
|
+
user: args.user,
|
|
54
|
+
password: args.password,
|
|
55
|
+
basePath: args.basePath,
|
|
56
|
+
rejectUnauthorized: args.rejectUnauthorized,
|
|
57
|
+
protocol: args.protocol || "https",
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Given command handler parameters, create a REST Client Session.
|
|
62
|
+
* @static
|
|
63
|
+
* @param {IHandlerParameters} params - Command parameters sent by imperative.
|
|
64
|
+
* @param {boolean} doPrompting - Whether to prompt for missing arguments (defaults to true)
|
|
65
|
+
* @returns {Session} - A session for usage in the CMCI REST Client
|
|
66
|
+
*/
|
|
67
|
+
static createSessCfgForHandler(params, doPrompting = true) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const sessCfg = {
|
|
70
|
+
hostname: params.arguments.host,
|
|
71
|
+
port: params.arguments.port,
|
|
72
|
+
user: params.arguments.user,
|
|
73
|
+
password: params.arguments.password,
|
|
74
|
+
protocol: params.arguments.protocol || "https",
|
|
75
|
+
basePath: params.arguments.basePath,
|
|
76
|
+
rejectUnauthorized: params.arguments.rejectUnauthorized
|
|
77
|
+
};
|
|
78
|
+
const sessCfgWithCreds = yield imperative_1.ConnectionPropsForSessCfg.addPropsOrPrompt(sessCfg, params.arguments, { doPrompting, parms: params });
|
|
79
|
+
return new imperative_1.Session(sessCfgWithCreds);
|
|
80
|
+
/*
|
|
81
|
+
const sessCfg: ISession = {};
|
|
82
|
+
const sessCfgWithCreds = await ConnectionPropsForSessCfg.addPropsOrPrompt(sessCfg, params.arguments, { doPrompting: true, parms: params });
|
|
83
|
+
return new Session(sessCfgWithCreds);*/
|
|
84
|
+
});
|
|
85
|
+
}
|
|
31
86
|
}
|
|
32
87
|
exports.MATSession = MATSession;
|
|
33
88
|
MATSession.MAT_CONNECTION_OPTION_GROUP = "MAT Profile Options";
|
|
@@ -36,22 +91,23 @@ MATSession.MAT_CONNECTION_OPTION_GROUP = "MAT Profile Options";
|
|
|
36
91
|
*/
|
|
37
92
|
MATSession.MAT_REST_PROTOCOL = {
|
|
38
93
|
name: "protocol",
|
|
39
|
-
aliases: ["
|
|
94
|
+
aliases: ["o"],
|
|
40
95
|
description: "Specifies the protocol defined for the MAT REST API server (http or https).",
|
|
41
96
|
type: "string",
|
|
42
|
-
required: true,
|
|
97
|
+
// required: true,
|
|
43
98
|
allowableValues: { values: ["http", "https"] },
|
|
99
|
+
defaultValue: "https",
|
|
44
100
|
group: MATSession.MAT_CONNECTION_OPTION_GROUP
|
|
45
101
|
};
|
|
46
102
|
/**
|
|
47
103
|
* Defines the hostname option during MAT CLI profile creation.
|
|
48
104
|
*/
|
|
49
105
|
MATSession.MAT_REST_HOSTNAME = {
|
|
50
|
-
name: "
|
|
51
|
-
aliases: ["
|
|
106
|
+
name: "host",
|
|
107
|
+
aliases: ["H"],
|
|
52
108
|
description: "Specifies the hostname or IP address defined for the MAT REST API server (e.g. 127.0.0.0 or localhost).",
|
|
53
109
|
type: "string",
|
|
54
|
-
required: true,
|
|
110
|
+
// required: true,
|
|
55
111
|
group: MATSession.MAT_CONNECTION_OPTION_GROUP
|
|
56
112
|
};
|
|
57
113
|
/**
|
|
@@ -59,21 +115,21 @@ MATSession.MAT_REST_HOSTNAME = {
|
|
|
59
115
|
*/
|
|
60
116
|
MATSession.MAT_REST_PORT = {
|
|
61
117
|
name: "port",
|
|
62
|
-
aliases: ["
|
|
118
|
+
aliases: ["P"],
|
|
63
119
|
description: "Specifies the server port (e.g. 8080).",
|
|
64
120
|
type: "number",
|
|
65
|
-
required: true,
|
|
121
|
+
// required: true,
|
|
66
122
|
group: MATSession.MAT_CONNECTION_OPTION_GROUP
|
|
67
123
|
};
|
|
68
124
|
/**
|
|
69
125
|
* Defines the username option during MAT CLI profile creation.
|
|
70
126
|
*/
|
|
71
127
|
MATSession.MAT_CLI_USERNAME = {
|
|
72
|
-
name: "
|
|
73
|
-
aliases: ["
|
|
128
|
+
name: "user",
|
|
129
|
+
aliases: ["u"],
|
|
74
130
|
description: "Your mainframe username.",
|
|
75
131
|
type: "string",
|
|
76
|
-
required: true,
|
|
132
|
+
// required: true,
|
|
77
133
|
group: MATSession.MAT_CONNECTION_OPTION_GROUP
|
|
78
134
|
};
|
|
79
135
|
/**
|
|
@@ -81,24 +137,33 @@ MATSession.MAT_CLI_USERNAME = {
|
|
|
81
137
|
*/
|
|
82
138
|
MATSession.MAT_CLI_PASSWORD = {
|
|
83
139
|
name: "password",
|
|
84
|
-
aliases: ["
|
|
140
|
+
aliases: ["pw"],
|
|
85
141
|
description: "Your mainframe password.",
|
|
86
142
|
type: "string",
|
|
87
|
-
required: true,
|
|
143
|
+
// required: true,
|
|
144
|
+
group: MATSession.MAT_CONNECTION_OPTION_GROUP
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Option used in profile creation and commands for basePath setting for connecting to MAT
|
|
148
|
+
*/
|
|
149
|
+
MATSession.MAT_CLI_BASE_PATH = {
|
|
150
|
+
name: "base-path",
|
|
151
|
+
aliases: ["bp"],
|
|
152
|
+
description: "The base path for your API mediation layer instance." +
|
|
153
|
+
" Specify this option to prepend the base path to all resources when making REST requests." +
|
|
154
|
+
" Do not specify this option if you are not using an API mediation layer.",
|
|
155
|
+
type: "string",
|
|
88
156
|
group: MATSession.MAT_CONNECTION_OPTION_GROUP
|
|
89
157
|
};
|
|
90
158
|
/**
|
|
91
|
-
*
|
|
159
|
+
* Option used in profile creation and commands for rejectUnauthorized setting for connecting to MAT
|
|
92
160
|
*/
|
|
93
|
-
MATSession.
|
|
94
|
-
name: "
|
|
95
|
-
aliases: ["
|
|
96
|
-
description: "
|
|
97
|
-
"Set \'--zowediscoverable true\' only if you have configured the Zowe API Mediation Layer properties in your " +
|
|
98
|
-
"MAT REST API server settings.",
|
|
161
|
+
MATSession.MAT_CLI_REJECT_UNAUTHORIZED = {
|
|
162
|
+
name: "reject-unauthorized",
|
|
163
|
+
aliases: ["ru"],
|
|
164
|
+
description: "Reject self-signed certificates.",
|
|
99
165
|
type: "boolean",
|
|
100
|
-
|
|
101
|
-
allowableValues: { values: ["false", "true"] },
|
|
166
|
+
defaultValue: true,
|
|
102
167
|
group: MATSession.MAT_CONNECTION_OPTION_GROUP
|
|
103
168
|
};
|
|
104
169
|
MATSession.MAT_CLI_LISTINGDIR = {
|
|
@@ -127,7 +192,8 @@ MATSession.PMA_CONNECTION_OPTIONS = [
|
|
|
127
192
|
MATSession.MAT_REST_PORT,
|
|
128
193
|
MATSession.MAT_CLI_USERNAME,
|
|
129
194
|
MATSession.MAT_CLI_PASSWORD,
|
|
130
|
-
MATSession.
|
|
195
|
+
MATSession.MAT_CLI_BASE_PATH,
|
|
196
|
+
MATSession.MAT_CLI_REJECT_UNAUTHORIZED,
|
|
131
197
|
MATSession.MAT_CLI_LISTINGDIR
|
|
132
198
|
];
|
|
133
199
|
//# sourceMappingURL=MATSession.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MATSession.js","sourceRoot":"","sources":["../../../src/cli/session/MATSession.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;
|
|
1
|
+
{"version":3,"file":"MATSession.js","sourceRoot":"","sources":["../../../src/cli/session/MATSession.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,6GAA6G;AAC7G,iDAAiJ;AAEjJ;;;GAGG;AACH,MAAa,UAAU;IA0HrB;;;;;OAKG;IACI,MAAM,CAAC,kCAAkC,CAAC,IAAuB;QACtE,OAAO,IAAI,oBAAO,CAAC;YACf,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,IAAI,CAAC,IAAI;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ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AS;IACf,YAAY,EAAE,IAAI;IAClB,KAAK,EAAE,UAAU,CAAC,2BAA2B;CAC9C,CAAC;AAEY,6BAAkB,GAA6B;IAC3D,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,CAAC,MAAM,CAAC;IACjB,WAAW,EAAE,0GAA0G;QACvH,kHAAkH;QAClH,8FAA8F;QAC9F,+FAA+F;QAC/F,8GAA8G;QAC9G,kHAAkH;QAClH,oGAAoG;QACpG,2GAA2G;QAC3G,gEAAgE;IAChE,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,UAAU,CAAC,2BAA2B;CAC9C,CAAC;AAEF;;;GAGG;AACW,iCAAsB,GAA+B;IACjE,UAAU,CAAC,iBAAiB;IAC5B,UAAU,CAAC,iBAAiB;IAC5B,UAAU,CAAC,aAAa;IACxB,UAAU,CAAC,gBAAgB;IAC3B,UAAU,CAAC,gBAAgB;IAC3B,UAAU,CAAC,iBAAiB;IAC5B,UAAU,CAAC,2BAA2B;IACtC,UAAU,CAAC,kBAAkB;CAC9B,CAAC"}
|
|
@@ -33,6 +33,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
34
|
const imperative_1 = require("@zowe/imperative");
|
|
35
35
|
const __1 = require("..");
|
|
36
|
+
const MATSession_1 = require("../cli/session/MATSession");
|
|
36
37
|
class AbstractRestHandler {
|
|
37
38
|
process(params) {
|
|
38
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -59,8 +60,13 @@ class AbstractRestHandler {
|
|
|
59
60
|
}
|
|
60
61
|
try {
|
|
61
62
|
// Profile evaluation
|
|
62
|
-
const profile = params.profiles.get("mat", true);
|
|
63
|
-
const session = new
|
|
63
|
+
// const profile = params.profiles.get("mat", true);
|
|
64
|
+
// const session = new Session({ hostname: profile.hostname, port: profile.port, protocol: profile.protocol });
|
|
65
|
+
const session = yield MATSession_1.MATSession.createSessCfgForHandler(params);
|
|
66
|
+
// const session = await MATSession.createBasicMatSessionFromArguments(params.arguments);
|
|
67
|
+
// console.log(params.arguments);
|
|
68
|
+
// console.log(session);
|
|
69
|
+
// console.log(params);
|
|
64
70
|
// Retrieves access token
|
|
65
71
|
// const token = (await MATRest.GetAuth(session, profile.username, profile.password)).accessToken;
|
|
66
72
|
// const token = (await MATRest.GetAuth(session, profile.username, profile.password)).Cookie;
|
|
@@ -68,14 +74,14 @@ class AbstractRestHandler {
|
|
|
68
74
|
// params.response.console.log(JSON.stringify(await MATRest.GetAuthAml(session, profile.username, profile.password)));
|
|
69
75
|
// console.log("Profile type read: " + typeAuth);
|
|
70
76
|
let endpoint;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
endpoint =
|
|
77
|
+
if (params.arguments.basePath != null) {
|
|
78
|
+
// endpoint = MATRest.REST_ENDPOINT_AML;
|
|
79
|
+
endpoint = "/" + params.arguments.basePath;
|
|
74
80
|
}
|
|
75
81
|
else {
|
|
76
82
|
endpoint = __1.MATRest.REST_ENDPOINT;
|
|
77
83
|
}
|
|
78
|
-
const token = (yield __1.MATRest.GetAuth(session,
|
|
84
|
+
const token = (yield __1.MATRest.GetAuth(session, endpoint)).accessToken;
|
|
79
85
|
const bearer = "Bearer " + token;
|
|
80
86
|
const header = { Authorization: bearer };
|
|
81
87
|
const headers = [header];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractRestHandler.js","sourceRoot":"","sources":["../../src/handlers/AbstractRestHandler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAEH,iDAG0B;AAC1B,0BAA6B;
|
|
1
|
+
{"version":3,"file":"AbstractRestHandler.js","sourceRoot":"","sources":["../../src/handlers/AbstractRestHandler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAEH,iDAG0B;AAC1B,0BAA6B;AAE7B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AES,gBAAgB;QACtB,OAAO,EAAE,CAAC;IACd,CAAC;IAES,iBAAiB;QACvB,OAAO,EAAE,CAAC;IACd,CAAC;CAkBJ;AA1HD,sCA0HC"}
|
package/lib/imperative.js
CHANGED
|
@@ -61,8 +61,12 @@ const config = {
|
|
|
61
61
|
type: "string",
|
|
62
62
|
secure: true
|
|
63
63
|
},
|
|
64
|
-
|
|
65
|
-
optionDefinition: MATSession_1.MATSession.
|
|
64
|
+
basePath: {
|
|
65
|
+
optionDefinition: MATSession_1.MATSession.MAT_CLI_BASE_PATH,
|
|
66
|
+
type: "string"
|
|
67
|
+
},
|
|
68
|
+
rejectUnauthorized: {
|
|
69
|
+
optionDefinition: MATSession_1.MATSession.MAT_CLI_REJECT_UNAUTHORIZED,
|
|
66
70
|
type: "boolean"
|
|
67
71
|
},
|
|
68
72
|
listingDir: {
|
|
@@ -70,7 +74,7 @@ const config = {
|
|
|
70
74
|
type: "string"
|
|
71
75
|
},
|
|
72
76
|
},
|
|
73
|
-
required: [
|
|
77
|
+
required: [],
|
|
74
78
|
},
|
|
75
79
|
createProfileExamples: [
|
|
76
80
|
{
|
package/lib/imperative.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imperative.js","sourceRoot":"","sources":["../src/imperative.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,yDAAsD;AAEtD,MAAM,MAAM,GAAsB;IAC9B,kBAAkB,EAAE,CAAC,+BAA+B,CAAC;IACrD,iBAAiB,EAAE,SAAS,GAAG,sBAAsB;IACrD,aAAa,EAAE,oEAAoE;IACnF,aAAa,EAAE,CAAC,KAAK,CAAC;IACtB,sBAAsB,EAAE,8EAA8E;QACtG,+EAA+E;IAC/E,kBAAkB,EAAE,kCAAkC;IACtD,IAAI,EAAE,KAAK;IACX,QAAQ,EAAE;QACN;YACE,IAAI,EAAE,KAAK;YACX,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,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AC9C,IAAI,EAAE,QAAQ;qBACf;oBACD,QAAQ,EAAE;wBACR,gBAAgB,EAAE,uBAAU,CAAC,iBAAiB;wBAC9C,IAAI,EAAE,QAAQ;qBACf;oBACD,IAAI,EAAE;wBACJ,gBAAgB,EAAE,uBAAU,CAAC,aAAa;wBAC1C,IAAI,EAAE,QAAQ;qBACf;oBACD,QAAQ,EAAE;wBACR,gBAAgB,EAAE,uBAAU,CAAC,gBAAgB;wBAC7C,IAAI,EAAE,QAAQ;wBACd,MAAM,EAAE,IAAI;qBACb;oBACD,QAAQ,EAAE;wBACR,gBAAgB,EAAE,uBAAU,CAAC,gBAAgB;wBAC7C,IAAI,EAAE,QAAQ;wBACd,MAAM,EAAE,IAAI;qBACb;oBACD,QAAQ,EAAE;wBACR,gBAAgB,EAAE,uBAAU,CAAC,iBAAiB;wBAC9C,IAAI,EAAE,QAAQ;qBACf;oBACD,kBAAkB,EAAE;wBAClB,gBAAgB,EAAE,uBAAU,CAAC,2BAA2B;wBACxD,IAAI,EAAE,SAAS;qBAChB;oBACD,UAAU,EAAE;wBACV,gBAAgB,EAAE,uBAAU,CAAC,kBAAkB;wBAC/C,IAAI,EAAE,QAAQ;qBACf;iBACF;gBACD,QAAQ,EAAE,EAAE;aACb;YACD,qBAAqB,EAAE;gBACvB;oBACE,OAAO,EAAE,gGAAgG;oBACzG,WAAW,EAAE,gGAAgG;wBAC3G,2EAA2E;iBAC9E;gBACD;oBACE,OAAO,EAAE,+HAA+H;oBACxI,WAAW,EAAE,iGAAiG;wBAC5G,4EAA4E;wBAC5E,gHAAgH;iBACnH;aACA;SACF;KACJ;CACJ,CAAC;AAEF,iBAAS,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@broadcom/mat-analyze-for-zowe-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "MAT Analyze Plug-in for Zowe CLI",
|
|
5
|
+
"author": "Broadcom",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
5
7
|
"repository": "",
|
|
6
8
|
"main": "lib/index.js",
|
|
7
9
|
"files": [
|
|
@@ -27,12 +29,11 @@
|
|
|
27
29
|
"configurationModule": "lib/imperative.js"
|
|
28
30
|
},
|
|
29
31
|
"dependencies": {
|
|
30
|
-
"@broadcom/endevor-for-zowe-cli": "^
|
|
31
|
-
"@zowe/imperative": "^4.17.6",
|
|
32
|
+
"@broadcom/endevor-for-zowe-cli": "^7.0.0",
|
|
32
33
|
"object-mapper": "6.2.0"
|
|
33
34
|
},
|
|
34
35
|
"peerDependencies": {
|
|
35
|
-
"@zowe/
|
|
36
|
+
"@zowe/imperative": "^5.0.0"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
39
|
"@types/config": "0.0.34",
|
|
@@ -41,22 +42,23 @@
|
|
|
41
42
|
"@types/mustache": "^0.8.32",
|
|
42
43
|
"@types/node": "^14.0.1",
|
|
43
44
|
"@types/yargs": "8.0.2",
|
|
44
|
-
"@zowe/cli": "^6.
|
|
45
|
+
"@zowe/cli": "^6.40.1",
|
|
46
|
+
"@zowe/imperative": "^5.0.0",
|
|
45
47
|
"config": "^3.2.2",
|
|
46
48
|
"copyfiles": "2.2.0",
|
|
47
49
|
"env-cmd": "^8.0.2",
|
|
48
50
|
"fs-extra": "^5.0.0",
|
|
49
|
-
"jest": "^
|
|
50
|
-
"jest-cli": "^
|
|
51
|
-
"jest-environment-node": "^
|
|
51
|
+
"jest": "^27.5.1",
|
|
52
|
+
"jest-cli": "^27.5.1",
|
|
53
|
+
"jest-environment-node": "^27.0.1",
|
|
52
54
|
"jest-environment-node-debug": "^2.0.0",
|
|
53
|
-
"jest-html-reporter": "^
|
|
55
|
+
"jest-html-reporter": "^3.3.0",
|
|
54
56
|
"jest-junit": "^6.3.0",
|
|
55
|
-
"jest-stare": "^
|
|
57
|
+
"jest-stare": "^2.2.0",
|
|
56
58
|
"mockdate": "^2.0.5",
|
|
57
59
|
"mustache": "^3.2.1",
|
|
58
60
|
"rimraf": "^2.6.2",
|
|
59
|
-
"ts-jest": "^
|
|
61
|
+
"ts-jest": "^27.0.1",
|
|
60
62
|
"ts-node": "^8.10.1",
|
|
61
63
|
"tslint": "^5.0.0",
|
|
62
64
|
"typedoc": "^0.22.11",
|
|
@@ -69,7 +71,7 @@
|
|
|
69
71
|
],
|
|
70
72
|
"testResultsProcessor": "jest-stare",
|
|
71
73
|
"transform": {
|
|
72
|
-
".(ts)": "
|
|
74
|
+
".(ts)": "ts-jest"
|
|
73
75
|
},
|
|
74
76
|
"testRegex": "(test|spec)\\.ts$",
|
|
75
77
|
"moduleFileExtensions": [
|
|
@@ -111,8 +113,6 @@
|
|
|
111
113
|
"outputPath": "__tests__/__results__/results.html",
|
|
112
114
|
"includeFailureMsg": true
|
|
113
115
|
},
|
|
114
|
-
"author": "Darkside",
|
|
115
|
-
"license": "See License in License",
|
|
116
116
|
"directories": {
|
|
117
117
|
"doc": "docs",
|
|
118
118
|
"lib": "lib"
|