@broadcom/ops-for-zowe-cli 4.0.7 → 4.1.2
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 +1 -1
- package/imgs/zowe-conformant-zowev2-cli-color.png +0 -0
- package/lib/api/OpsProfilesConfig.js +8 -10
- package/lib/api/OpsProfilesConfig.js.map +1 -1
- package/lib/api/{methods/show/Show.d.ts → Show.d.ts} +2 -2
- package/lib/api/{methods/show/Show.js → Show.js} +8 -7
- package/lib/api/Show.js.map +1 -0
- package/lib/api/{methods/update/Update.d.ts → Update.d.ts} +0 -0
- package/lib/api/{methods/update/Update.js → Update.js} +15 -12
- package/lib/api/Update.js.map +1 -0
- package/lib/api/constants/PluginConstants.d.ts +14 -0
- package/lib/api/{methods/show/index.js → constants/PluginConstants.js} +17 -12
- package/lib/api/constants/PluginConstants.js.map +1 -0
- package/lib/api/index.d.ts +4 -1
- package/lib/api/index.js +4 -1
- package/lib/api/index.js.map +1 -1
- package/lib/api/utils/OpsRestClient.d.ts +15 -0
- package/lib/api/utils/OpsRestClient.js +66 -0
- package/lib/api/utils/OpsRestClient.js.map +1 -0
- package/lib/api/utils/OpsRestUtils.d.ts +1 -10
- package/lib/api/utils/OpsRestUtils.js +4 -61
- package/lib/api/utils/OpsRestUtils.js.map +1 -1
- package/lib/api/utils/RuleUtils.js +4 -5
- package/lib/api/utils/RuleUtils.js.map +1 -1
- package/lib/api/utils/SSMUtils.js +7 -8
- package/lib/api/utils/SSMUtils.js.map +1 -1
- package/lib/cli/OpsBaseHandler.d.ts +11 -2
- package/lib/cli/OpsBaseHandler.js +22 -8
- package/lib/cli/OpsBaseHandler.js.map +1 -1
- package/lib/cli/disable/Disable.definition.js +2 -2
- package/lib/cli/disable/Disable.definition.js.map +1 -1
- package/lib/cli/enable/Enable.definition.js +2 -2
- package/lib/cli/enable/Enable.definition.js.map +1 -1
- package/lib/cli/show/Show.definition.js +2 -2
- package/lib/cli/show/Show.definition.js.map +1 -1
- package/lib/cli/show/rule/Rule.handler.js +4 -3
- package/lib/cli/show/rule/Rule.handler.js.map +1 -1
- package/lib/cli/start/Start.definition.js +2 -2
- package/lib/cli/start/Start.definition.js.map +1 -1
- package/lib/cli/start/resource/Resource.handler.js +4 -3
- package/lib/cli/start/resource/Resource.handler.js.map +1 -1
- package/lib/cli/stop/Stop.definition.js +2 -2
- package/lib/cli/stop/Stop.definition.js.map +1 -1
- package/lib/cli/stop/resource/Resource.handler.js +4 -3
- package/lib/cli/stop/resource/Resource.handler.js.map +1 -1
- package/lib/healthCheck.handler.js.map +1 -1
- package/lib/imperative.js +19 -3
- package/lib/imperative.js.map +1 -1
- package/package.json +16 -19
- package/lib/api/methods/index.d.ts +0 -2
- package/lib/api/methods/index.js +0 -37
- package/lib/api/methods/index.js.map +0 -1
- package/lib/api/methods/show/Show.js.map +0 -1
- package/lib/api/methods/show/index.d.ts +0 -1
- package/lib/api/methods/show/index.js.map +0 -1
- package/lib/api/methods/update/Update.js.map +0 -1
- package/lib/api/methods/update/index.d.ts +0 -1
- package/lib/api/methods/update/index.js +0 -36
- package/lib/api/methods/update/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OPS/MVS® Plug-in for Zowe CLI
|
|
2
2
|
|
|
3
|
-
<img src="imgs/zowe-conformant-
|
|
3
|
+
<img src="imgs/zowe-conformant-zowev2-cli-color.png" width=25% alt="Zowe v2 CLI Conformance Badge"/>
|
|
4
4
|
|
|
5
5
|
This repository contains the OPS/MVS® Plug-in for Zowe CLI (OPS).
|
|
6
6
|
|
|
Binary file
|
|
@@ -23,9 +23,7 @@
|
|
|
23
23
|
*/
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.OpsProfilesConfig = void 0;
|
|
26
|
-
const
|
|
27
|
-
// const CCID_MAX_LEN = 12;
|
|
28
|
-
// const COMMENT_MAX_LEN = 40;
|
|
26
|
+
const OpsRestUtils_1 = require("./utils/OpsRestUtils");
|
|
29
27
|
exports.OpsProfilesConfig = [
|
|
30
28
|
{
|
|
31
29
|
type: "ops",
|
|
@@ -35,33 +33,33 @@ exports.OpsProfilesConfig = [
|
|
|
35
33
|
description: "The OPS Web Services session profile schema, where you specify your session information and credentials",
|
|
36
34
|
properties: {
|
|
37
35
|
host: {
|
|
38
|
-
optionDefinition:
|
|
36
|
+
optionDefinition: OpsRestUtils_1.OpsRestUtils.HOST_OPTION,
|
|
39
37
|
type: "string",
|
|
40
38
|
},
|
|
41
39
|
port: {
|
|
42
|
-
optionDefinition:
|
|
40
|
+
optionDefinition: OpsRestUtils_1.OpsRestUtils.PORT_OPTION,
|
|
43
41
|
type: "number",
|
|
44
42
|
},
|
|
45
43
|
user: {
|
|
46
|
-
optionDefinition:
|
|
44
|
+
optionDefinition: OpsRestUtils_1.OpsRestUtils.USER_OPTION,
|
|
47
45
|
secure: true,
|
|
48
46
|
type: "string",
|
|
49
47
|
},
|
|
50
48
|
password: {
|
|
51
|
-
optionDefinition:
|
|
49
|
+
optionDefinition: OpsRestUtils_1.OpsRestUtils.PASSWORD_OPTION,
|
|
52
50
|
secure: true,
|
|
53
51
|
type: "string",
|
|
54
52
|
},
|
|
55
53
|
protocol: {
|
|
56
|
-
optionDefinition:
|
|
54
|
+
optionDefinition: OpsRestUtils_1.OpsRestUtils.PROTOCOL_OPTION,
|
|
57
55
|
type: "string"
|
|
58
56
|
},
|
|
59
57
|
rejectUnauthorized: {
|
|
60
|
-
optionDefinition:
|
|
58
|
+
optionDefinition: OpsRestUtils_1.OpsRestUtils.REJECT_UNAUTHORIZED_OPTION,
|
|
61
59
|
type: "boolean"
|
|
62
60
|
},
|
|
63
61
|
subsystem: {
|
|
64
|
-
optionDefinition:
|
|
62
|
+
optionDefinition: OpsRestUtils_1.OpsRestUtils.SUBSYSTEM_OPTION,
|
|
65
63
|
type: "string"
|
|
66
64
|
}
|
|
67
65
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpsProfilesConfig.js","sourceRoot":"","sources":["../../src/api/OpsProfilesConfig.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAGH,
|
|
1
|
+
{"version":3,"file":"OpsProfilesConfig.js","sourceRoot":"","sources":["../../src/api/OpsProfilesConfig.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAGH,uDAAoD;AAEvC,QAAA,iBAAiB,GAAuC;IACjE;QACI,IAAI,EAAE,KAAK;QACX,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,kCAAkC;YACzC,WAAW,EAAE,yGAAyG;YACtH,UAAU,EAAE;gBACR,IAAI,EAAE;oBACF,gBAAgB,EAAE,2BAAY,CAAC,WAAW;oBAC1C,IAAI,EAAE,QAAQ;iBACjB;gBACD,IAAI,EAAE;oBACF,gBAAgB,EAAE,2BAAY,CAAC,WAAW;oBAC1C,IAAI,EAAE,QAAQ;iBACjB;gBACD,IAAI,EAAE;oBACF,gBAAgB,EAAE,2BAAY,CAAC,WAAW;oBAC1C,MAAM,EAAE,IAAI;oBACZ,IAAI,EAAE,QAAQ;iBACjB;gBACD,QAAQ,EAAE;oBACN,gBAAgB,EAAE,2BAAY,CAAC,eAAe;oBAC9C,MAAM,EAAE,IAAI;oBACZ,IAAI,EAAE,QAAQ;iBACjB;gBACD,QAAQ,EAAE;oBACN,gBAAgB,EAAE,2BAAY,CAAC,eAAe;oBAC9C,IAAI,EAAE,QAAQ;iBACjB;gBACD,kBAAkB,EAAE;oBAChB,gBAAgB,EAAE,2BAAY,CAAC,0BAA0B;oBACzD,IAAI,EAAE,SAAS;iBAClB;gBACD,SAAS,EAAE;oBACP,gBAAgB,EAAE,2BAAY,CAAC,gBAAgB;oBAC/C,IAAI,EAAE,QAAQ;iBACjB;aACJ;SAEJ;QACD,iEAAiE;QACjE,qBAAqB,EAAE;YACnB;gBACI,OAAO,EAAE,2GAA2G;gBACpH,WAAW,EAAE,sGAAsG;oBAC/G,wDAAwD;aAC/D;SACJ;QACD,qBAAqB,EAAE;YACnB;gBACI,OAAO,EAAE,uBAAuB;gBAChC,WAAW,EAAE,sFAAsF;aACtG;YACD;gBACI,OAAO,EAAE,0CAA0C;gBACnD,WAAW,EAAE,sFAAsF;aACtG;SACJ;KACJ;CACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Session } from "@zowe/imperative";
|
|
2
|
-
import { IShowRuleResponse } from "
|
|
3
|
-
import { IShowResourceResponse } from "
|
|
2
|
+
import { IShowRuleResponse } from "./doc/IShowRuleResponse";
|
|
3
|
+
import { IShowResourceResponse } from "./doc/IShowResourceResponse";
|
|
4
4
|
export declare function showRule(session: Session, ruleSetName: string, ruleName: string, subSystem: string): Promise<IShowRuleResponse>;
|
|
5
5
|
export declare function showResource(session: Session, resourceName: string, table: string, subsystem: string): Promise<IShowResourceResponse>;
|
|
@@ -32,20 +32,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
34
|
exports.showResource = exports.showRule = void 0;
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const constants_1 = require("
|
|
35
|
+
const RuleUtils_1 = require("./utils/RuleUtils");
|
|
36
|
+
const SSMUtils_1 = require("./utils/SSMUtils");
|
|
37
|
+
const constants_1 = require("./constants");
|
|
38
|
+
const OpsRestClient_1 = require("./utils/OpsRestClient");
|
|
38
39
|
function showRule(session, ruleSetName, ruleName, subSystem) {
|
|
39
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
const ruleUrl =
|
|
41
|
-
return
|
|
41
|
+
const ruleUrl = RuleUtils_1.RuleUtils.getRuleURL(session, ruleSetName, ruleName, subSystem);
|
|
42
|
+
return OpsRestClient_1.OpsRestClient.getExpectJSON(session, ruleUrl, constants_1.OpsConstants.headers);
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
45
|
exports.showRule = showRule;
|
|
45
46
|
function showResource(session, resourceName, table, subsystem) {
|
|
46
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
const resourceUrl =
|
|
48
|
-
return
|
|
48
|
+
const resourceUrl = SSMUtils_1.SSMUtils.getResourceURL(session, resourceName, table, subsystem);
|
|
49
|
+
return OpsRestClient_1.OpsRestClient.getExpectJSON(session, resourceUrl, constants_1.OpsConstants.headers);
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
52
|
exports.showResource = showResource;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Show.js","sourceRoot":"","sources":["../../src/api/Show.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAGH,iDAA8C;AAC9C,+CAA4C;AAC5C,2CAA2C;AAG3C,yDAAsD;AAEtD,SAAsB,QAAQ,CAAC,OAAgB,EAAE,WAAmB,EAAE,QAAgB,EAAE,SAAiB;;QACrG,MAAM,OAAO,GAAG,qBAAS,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;QAChF,OAAO,6BAAa,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,wBAAY,CAAC,OAAO,CAAC,CAAC;IAC/E,CAAC;CAAA;AAHD,4BAGC;AAED,SAAsB,YAAY,CAAC,OAAgB,EAAE,YAAoB,EAAE,KAAa,EAAE,SAAiB;;QACvG,MAAM,WAAW,GAAG,mBAAQ,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QACrF,OAAO,6BAAa,CAAC,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,wBAAY,CAAC,OAAO,CAAC,CAAC;IACnF,CAAC;CAAA;AAHD,oCAGC"}
|
|
File without changes
|
|
@@ -33,18 +33,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
34
|
exports.updateResource = exports.updateRule = void 0;
|
|
35
35
|
const imperative_1 = require("@zowe/imperative");
|
|
36
|
-
const constants_1 = require("
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const
|
|
36
|
+
const constants_1 = require("./constants");
|
|
37
|
+
const RuleUtils_1 = require("./utils/RuleUtils");
|
|
38
|
+
const SSMUtils_1 = require("./utils/SSMUtils");
|
|
39
|
+
const ResourceParameterDefinitions_1 = require("../cli/ResourceParameterDefinitions");
|
|
40
|
+
const Show_1 = require("./Show");
|
|
41
|
+
const OpsRestClient_1 = require("./utils/OpsRestClient");
|
|
40
42
|
function updateRule(session, ruleSetName, ruleName, newStatus, // eslint-disable-line
|
|
41
43
|
subSystem) {
|
|
42
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
const ruleUrl =
|
|
45
|
+
const ruleUrl = RuleUtils_1.RuleUtils.getRuleURL(session, ruleSetName, ruleName, subSystem);
|
|
44
46
|
const postBody = {
|
|
45
47
|
status: newStatus
|
|
46
48
|
};
|
|
47
|
-
return
|
|
49
|
+
return OpsRestClient_1.OpsRestClient.postExpectJSON(session, ruleUrl, constants_1.OpsConstants.headers, postBody);
|
|
48
50
|
});
|
|
49
51
|
}
|
|
50
52
|
exports.updateRule = updateRule;
|
|
@@ -58,11 +60,11 @@ table, wait) {
|
|
|
58
60
|
imperative_1.ImperativeExpect.toBeEqual(wait > 0 && wait <= ResourceParameterDefinitions_1.ResourceParameterDefinitions.ONE_DAY, true, "Wait value must be between 0 and " + ResourceParameterDefinitions_1.ResourceParameterDefinitions.ONE_DAY + "(inclusive) if specified. " +
|
|
59
61
|
"You specified: " + wait);
|
|
60
62
|
}
|
|
61
|
-
const resourceUrl =
|
|
63
|
+
const resourceUrl = SSMUtils_1.SSMUtils.getResourceURL(session, resource, table, subsystem);
|
|
62
64
|
const postBody = {
|
|
63
65
|
desired: desiredState
|
|
64
66
|
};
|
|
65
|
-
const response = yield
|
|
67
|
+
const response = yield OpsRestClient_1.OpsRestClient.postExpectJSON(session, resourceUrl, constants_1.OpsConstants.headers, postBody);
|
|
66
68
|
if (wait == null) {
|
|
67
69
|
// if we're not waiting, just return immediately
|
|
68
70
|
return response;
|
|
@@ -74,13 +76,14 @@ table, wait) {
|
|
|
74
76
|
return response;
|
|
75
77
|
}
|
|
76
78
|
// otherwise we have to poll
|
|
77
|
-
let pollAttempts = 0;
|
|
78
79
|
let pollResponse;
|
|
79
80
|
let currentState = response.ssmresource[0].current;
|
|
80
81
|
const ONE_SECOND = 1000;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
const start = new Date().getTime();
|
|
83
|
+
// looping with 'wait' value as max was taking approximately twice the requested time
|
|
84
|
+
// so use the actual time to calculate when the 'wait' time is exceeded
|
|
85
|
+
while (((new Date().getTime() - start) / ONE_SECOND) < wait) {
|
|
86
|
+
pollResponse = yield Show_1.showResource(session, resource, table, subsystem);
|
|
84
87
|
currentState = pollResponse.ssmresource[0].current;
|
|
85
88
|
if (currentState.toUpperCase() === desiredState.toUpperCase()) {
|
|
86
89
|
// successfully waited until the desired state equaled the current state
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Update.js","sourceRoot":"","sources":["../../src/api/Update.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAA8E;AAC9E,2CAA2C;AAC3C,iDAA8C;AAC9C,+CAA4C;AAC5C,sFAAmF;AACnF,iCAAsC;AACtC,yDAAsD;AAEtD,SAAsB,UAAU,CAAC,OAAgB,EAAE,WAAmB,EACrC,QAAgB,EAAE,SAAiB,EAAG,sBAAsB;AAC5D,SAAkB;;QAE/C,MAAM,OAAO,GAAG,qBAAS,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC,C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,CAAC;YACnD,MAAM,UAAU,GAAG,IAAI,CAAC;YACxB,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;YACnC,qFAAqF;YACrF,uEAAuE;YACvE,OAAO,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,GAAG,UAAU,CAAC,GAAG,IAAI,EAAE;gBACzD,YAAY,GAAG,MAAM,mBAAY,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;gBACvE,YAAY,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;gBACnD,IAAI,YAAY,CAAC,WAAW,EAAE,KAAK,YAAY,CAAC,WAAW,EAAE,EAAE;oBAC3D,wEAAwE;oBACxE,OAAO,YAAY,CAAC;iBACvB;qBAAM;oBACH,mDAAmD;oBACnD,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;wBAC1B,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;oBACpC,CAAC,CAAC,CAAC;iBACN;aACJ;YAED,4CAA4C;YAC5C,MAAM,IAAI,4BAAe,CAAC;gBACtB,GAAG,EAAE,8BAA8B,IAAI,UAAU,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,qCAAqC;oBACrG,iBAAiB,QAAQ,cAAc,YAAY,GAAG;aAC7D,CAAC,CAAC;SACN;IACL,CAAC;CAAA;AAnDD,wCAmDC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class PluginConstants {
|
|
2
|
+
/**
|
|
3
|
+
* The name of this plug-in
|
|
4
|
+
*/
|
|
5
|
+
static readonly PLUGIN_NAME = "Zowe CLI Plug-in for OPS/MVS\u00AE";
|
|
6
|
+
/**
|
|
7
|
+
* The description of the group exposed by this plug-in
|
|
8
|
+
*/
|
|
9
|
+
static readonly PLUGIN_DESCRIPTION = "Interact with OPS/MVS\u00AE for automation administration and resource management.";
|
|
10
|
+
/**
|
|
11
|
+
* The name of the command group exposed by this plug-in
|
|
12
|
+
*/
|
|
13
|
+
static readonly PLUGIN_GROUP_NAME = "ops";
|
|
14
|
+
}
|
|
@@ -21,16 +21,21 @@
|
|
|
21
21
|
* INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS
|
|
22
22
|
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
|
|
23
23
|
*/
|
|
24
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
27
|
-
}) : (function(o, m, k, k2) {
|
|
28
|
-
if (k2 === undefined) k2 = k;
|
|
29
|
-
o[k2] = m[k];
|
|
30
|
-
}));
|
|
31
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
32
|
-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
33
|
-
};
|
|
34
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
exports.PluginConstants = void 0;
|
|
26
|
+
class PluginConstants {
|
|
27
|
+
}
|
|
28
|
+
exports.PluginConstants = PluginConstants;
|
|
29
|
+
/**
|
|
30
|
+
* The name of this plug-in
|
|
31
|
+
*/
|
|
32
|
+
PluginConstants.PLUGIN_NAME = "Zowe CLI Plug-in for OPS/MVS®";
|
|
33
|
+
/**
|
|
34
|
+
* The description of the group exposed by this plug-in
|
|
35
|
+
*/
|
|
36
|
+
PluginConstants.PLUGIN_DESCRIPTION = "Interact with OPS/MVS® for automation administration and resource management.";
|
|
37
|
+
/**
|
|
38
|
+
* The name of the command group exposed by this plug-in
|
|
39
|
+
*/
|
|
40
|
+
PluginConstants.PLUGIN_GROUP_NAME = "ops";
|
|
41
|
+
//# sourceMappingURL=PluginConstants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PluginConstants.js","sourceRoot":"","sources":["../../../src/api/constants/PluginConstants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH,MAAa,eAAe;;AAA5B,0CAgBC;AAdG;;GAEG;AACoB,2BAAW,GAAG,+BAA+B,CAAC;AAErE;;GAEG;AACoB,kCAAkB,GAAG,+EAA+E,CAAC;AAE5H;;GAEG;AACoB,iCAAiB,GAAG,KAAK,CAAC"}
|
package/lib/api/index.d.ts
CHANGED
package/lib/api/index.js
CHANGED
|
@@ -32,7 +32,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
32
32
|
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
__exportStar(require("./
|
|
35
|
+
__exportStar(require("./Show"), exports);
|
|
36
|
+
__exportStar(require("./Update"), exports);
|
|
36
37
|
__exportStar(require("./constants"), exports);
|
|
37
38
|
__exportStar(require("./utils"), exports);
|
|
39
|
+
__exportStar(require("./doc/IShowResourceResponse"), exports);
|
|
40
|
+
__exportStar(require("./doc/IShowRuleResponse"), exports);
|
|
38
41
|
//# sourceMappingURL=index.js.map
|
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,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,yCAAuB;AACvB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,8DAA4C;AAC5C,0DAAwC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IImperativeError, Logger, RestClient } from "@zowe/imperative";
|
|
2
|
+
export declare class OpsRestClient extends RestClient {
|
|
3
|
+
/**
|
|
4
|
+
* Use the Zowe logger instead of the imperative logger
|
|
5
|
+
* @type {Logger}
|
|
6
|
+
*/
|
|
7
|
+
get log(): Logger;
|
|
8
|
+
/**
|
|
9
|
+
* Process an error encountered in the rest client
|
|
10
|
+
* @param {IImperativeError} original - the original error automatically built by the abstract rest client
|
|
11
|
+
* @returns {IImperativeError} - the processed error with details added
|
|
12
|
+
* @memberof ZosmfRestClient
|
|
13
|
+
*/
|
|
14
|
+
protected processError(original: IImperativeError): IImperativeError;
|
|
15
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2019 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
|
+
exports.OpsRestClient = void 0;
|
|
26
|
+
const imperative_1 = require("@zowe/imperative");
|
|
27
|
+
class OpsRestClient extends imperative_1.RestClient {
|
|
28
|
+
/**
|
|
29
|
+
* Use the Zowe logger instead of the imperative logger
|
|
30
|
+
* @type {Logger}
|
|
31
|
+
*/
|
|
32
|
+
get log() {
|
|
33
|
+
return imperative_1.Logger.getAppLogger();
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Process an error encountered in the rest client
|
|
37
|
+
* @param {IImperativeError} original - the original error automatically built by the abstract rest client
|
|
38
|
+
* @returns {IImperativeError} - the processed error with details added
|
|
39
|
+
* @memberof ZosmfRestClient
|
|
40
|
+
*/
|
|
41
|
+
processError(original) {
|
|
42
|
+
original.msg = "OPS REST API Error:\n" + original.msg;
|
|
43
|
+
let details = original.causeErrors;
|
|
44
|
+
try {
|
|
45
|
+
const json = JSON.parse(details);
|
|
46
|
+
// if we didn't get an error trying to parse json, check if there is a stack
|
|
47
|
+
// on the JSON error and delete it
|
|
48
|
+
if (json.stack != null) {
|
|
49
|
+
this.log.error("An error was encountered in OPS with a stack." +
|
|
50
|
+
" Here is the full error before deleting the stack:\n%s", JSON.stringify(json));
|
|
51
|
+
this.log.error("The stack has been deleted from the error before displaying the error to the user");
|
|
52
|
+
delete json.stack; // remove the stack field
|
|
53
|
+
}
|
|
54
|
+
// if we didn't get an error, make the parsed details part of the error
|
|
55
|
+
details = imperative_1.TextUtils.prettyJson(json, undefined, false);
|
|
56
|
+
}
|
|
57
|
+
catch (e) {
|
|
58
|
+
// if there's an error, the causeErrors text is not json
|
|
59
|
+
this.log.debug("Encountered an error trying to parse causeErrors as JSON - causeErrors is likely not JSON format");
|
|
60
|
+
}
|
|
61
|
+
original.msg += "\n" + details; // add the data string which is the original error
|
|
62
|
+
return original;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.OpsRestClient = OpsRestClient;
|
|
66
|
+
//# sourceMappingURL=OpsRestClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpsRestClient.js","sourceRoot":"","sources":["../../../src/api/utils/OpsRestClient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH,iDAAmF;AAEnF,MAAa,aAAc,SAAQ,uBAAU;IACzC;;;OAGG;IACH,IAAW,GAAG;QACV,OAAO,mBAAM,CAAC,YAAY,EAAE,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACO,YAAY,CAAC,QAA0B;QAC7C,QAAQ,CAAC,GAAG,GAAG,uBAAuB,GAAG,QAAQ,CAAC,GAAG,CAAC;QACtD,IAAI,OAAO,GAAG,QAAQ,CAAC,WAAW,CAAC;QACnC,IAAI;YACA,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACjC,4EAA4E;YAC5E,kCAAkC;YAClC,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE;gBACpB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,+CAA+C;oBAC1D,wDAAwD,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;gBACpF,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mFAAmF,CAAC,CAAC;gBACpG,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,yBAAyB;aAC/C;YAED,uEAAuE;YACvE,OAAO,GAAG,sBAAS,CAAC,UAAU,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;SAC1D;QAAC,OAAO,CAAC,EAAE;YACR,wDAAwD;YACxD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mGAAmG,CAAC,CAAC;SACvH;QACD,QAAQ,CAAC,GAAG,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC,kDAAkD;QAClF,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ;AAtCD,sCAsCC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ICommandDefinitionPassOn, ICommandOptionDefinition } from "@zowe/imperative";
|
|
2
2
|
/**
|
|
3
3
|
* Class to hold APIs related to OPS Web Services
|
|
4
4
|
* @export
|
|
@@ -23,13 +23,4 @@ export declare class OpsRestUtils {
|
|
|
23
23
|
*
|
|
24
24
|
*/
|
|
25
25
|
static OPS_CONNECTION_PASS_ON: ICommandDefinitionPassOn[];
|
|
26
|
-
/**
|
|
27
|
-
* Setup Ops Web Services session
|
|
28
|
-
*
|
|
29
|
-
* @static
|
|
30
|
-
* @param {ICommandArguments} args - command line arguments passed to the command handler
|
|
31
|
-
* @returns {Session} - the completed session to be used with OPS typescript APIs
|
|
32
|
-
* @memberof OpsRestUtils
|
|
33
|
-
*/
|
|
34
|
-
static setupOpsSession(args: ICommandArguments): Session;
|
|
35
26
|
}
|
|
@@ -23,69 +23,12 @@
|
|
|
23
23
|
*/
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.OpsRestUtils = void 0;
|
|
26
|
-
const imperative_1 = require("@zowe/imperative");
|
|
27
|
-
const util_1 = require("util");
|
|
28
26
|
/**
|
|
29
27
|
* Class to hold APIs related to OPS Web Services
|
|
30
28
|
* @export
|
|
31
29
|
* @class OpsRestUtils
|
|
32
30
|
*/
|
|
33
31
|
class OpsRestUtils {
|
|
34
|
-
/**
|
|
35
|
-
* Setup Ops Web Services session
|
|
36
|
-
*
|
|
37
|
-
* @static
|
|
38
|
-
* @param {ICommandArguments} args - command line arguments passed to the command handler
|
|
39
|
-
* @returns {Session} - the completed session to be used with OPS typescript APIs
|
|
40
|
-
* @memberof OpsRestUtils
|
|
41
|
-
*/
|
|
42
|
-
static setupOpsSession(args) {
|
|
43
|
-
let sessionHost = "";
|
|
44
|
-
let sessionPort = "";
|
|
45
|
-
let sessionUser = "";
|
|
46
|
-
let sessionPassword = "";
|
|
47
|
-
let sessionProtocol;
|
|
48
|
-
let sessionRejectUnauthorized = true;
|
|
49
|
-
// Imperative framework takes care of the precedence of
|
|
50
|
-
// CLI args > environmental variables > profile fields
|
|
51
|
-
// so we can just check the args
|
|
52
|
-
sessionProtocol = args.protocol.toLowerCase(); // eslint-disable-line
|
|
53
|
-
sessionRejectUnauthorized = args.rejectUnauthorized;
|
|
54
|
-
sessionHost = args.host;
|
|
55
|
-
sessionPort = args.port;
|
|
56
|
-
sessionUser = args.user;
|
|
57
|
-
sessionPassword = args.password;
|
|
58
|
-
const errorStack = [];
|
|
59
|
-
if (util_1.isNullOrUndefined(sessionHost)) {
|
|
60
|
-
errorStack.push("host");
|
|
61
|
-
}
|
|
62
|
-
if (util_1.isNullOrUndefined(sessionPort)) {
|
|
63
|
-
errorStack.push("port");
|
|
64
|
-
}
|
|
65
|
-
if (util_1.isNullOrUndefined(sessionUser)) {
|
|
66
|
-
errorStack.push("user");
|
|
67
|
-
}
|
|
68
|
-
if (util_1.isNullOrUndefined(sessionPassword)) {
|
|
69
|
-
errorStack.push("password");
|
|
70
|
-
}
|
|
71
|
-
if (util_1.isNullOrUndefined(sessionRejectUnauthorized)) {
|
|
72
|
-
errorStack.push("reject-unauthorized");
|
|
73
|
-
}
|
|
74
|
-
if (errorStack.length > 0) {
|
|
75
|
-
throw new imperative_1.ImperativeError({
|
|
76
|
-
msg: "Missing arguments or ops profile specification for " + errorStack.join(", "),
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
return new imperative_1.Session({
|
|
80
|
-
hostname: sessionHost,
|
|
81
|
-
port: Number(sessionPort),
|
|
82
|
-
protocol: sessionProtocol,
|
|
83
|
-
type: "basic",
|
|
84
|
-
user: sessionUser,
|
|
85
|
-
password: sessionPassword,
|
|
86
|
-
rejectUnauthorized: sessionRejectUnauthorized
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
32
|
}
|
|
90
33
|
exports.OpsRestUtils = OpsRestUtils;
|
|
91
34
|
OpsRestUtils.APP_URL = "/opsmvs/api";
|
|
@@ -98,28 +41,28 @@ OpsRestUtils.HOST_OPTION = {
|
|
|
98
41
|
description: "The hostname of the server where OPS Web Services is running.",
|
|
99
42
|
type: "string",
|
|
100
43
|
name: "host",
|
|
101
|
-
required:
|
|
44
|
+
required: false,
|
|
102
45
|
group: OpsRestUtils.OPS_CONNECTION_GROUP
|
|
103
46
|
};
|
|
104
47
|
OpsRestUtils.PORT_OPTION = {
|
|
105
48
|
description: "The port number for OPS Web Services.",
|
|
106
49
|
type: "number",
|
|
107
50
|
name: "port", aliases: ["p"],
|
|
108
|
-
required:
|
|
51
|
+
required: false,
|
|
109
52
|
group: OpsRestUtils.OPS_CONNECTION_GROUP
|
|
110
53
|
};
|
|
111
54
|
OpsRestUtils.USER_OPTION = {
|
|
112
55
|
description: "Your z/OS user name used to authenticate to OPS Web Services",
|
|
113
56
|
type: "string",
|
|
114
57
|
name: "user",
|
|
115
|
-
required:
|
|
58
|
+
required: false,
|
|
116
59
|
group: OpsRestUtils.OPS_CONNECTION_GROUP
|
|
117
60
|
};
|
|
118
61
|
OpsRestUtils.PASSWORD_OPTION = {
|
|
119
62
|
description: "Your z/OS password used to authenticate to OPS Web Services",
|
|
120
63
|
type: "string",
|
|
121
64
|
name: "password", aliases: ["pass"],
|
|
122
|
-
required:
|
|
65
|
+
required: false,
|
|
123
66
|
group: OpsRestUtils.OPS_CONNECTION_GROUP
|
|
124
67
|
};
|
|
125
68
|
OpsRestUtils.PROTOCOL_OPTION = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpsRestUtils.js","sourceRoot":"","sources":["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aiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
34
|
exports.RuleUtils = void 0;
|
|
35
|
-
const imperative_1 = require("@zowe/imperative");
|
|
36
35
|
const constants_1 = require("../constants");
|
|
36
|
+
const OpsRestClient_1 = require("./OpsRestClient");
|
|
37
37
|
const OpsTextUtils_1 = require("./OpsTextUtils");
|
|
38
|
-
const util_1 = require("util");
|
|
39
38
|
class RuleUtils {
|
|
40
39
|
// public static readonly RULESET_URL: string = OpsRestUtils.AOF_URL + "/rulesets";
|
|
41
40
|
// public static readonly RULE_URL: string = "/rules";
|
|
@@ -50,20 +49,20 @@ class RuleUtils {
|
|
|
50
49
|
const postBody = {
|
|
51
50
|
status: newState
|
|
52
51
|
};
|
|
53
|
-
return
|
|
52
|
+
return OpsRestClient_1.OpsRestClient.postExpectJSON(session, ruleUrl, constants_1.OpsConstants.headers, postBody);
|
|
54
53
|
});
|
|
55
54
|
}
|
|
56
55
|
static showRuleStatus(session, ruleSetName, ruleName, subSystem) {
|
|
57
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
57
|
const ruleUrl = this.getRuleURL(session, ruleSetName, ruleName, subSystem);
|
|
59
|
-
return
|
|
58
|
+
return OpsRestClient_1.OpsRestClient.getExpectJSON(session, ruleUrl, constants_1.OpsConstants.headers);
|
|
60
59
|
});
|
|
61
60
|
}
|
|
62
61
|
static getRuleURL(session, ruleSetName, ruleName, subSystem) {
|
|
63
62
|
ruleSetName = encodeURIComponent(ruleSetName);
|
|
64
63
|
ruleName = encodeURIComponent(ruleName);
|
|
65
64
|
let subsystemQueryString = "";
|
|
66
|
-
if (
|
|
65
|
+
if (subSystem != null) {
|
|
67
66
|
subsystemQueryString = "?sub=" + encodeURIComponent(subSystem);
|
|
68
67
|
}
|
|
69
68
|
return constants_1.OpsConstants.RULESET_URL + "/" + ruleSetName + constants_1.OpsConstants.RULE_URL + "/" +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuleUtils.js","sourceRoot":"","sources":["../../../src/api/utils/RuleUtils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"RuleUtils.js","sourceRoot":"","sources":["../../../src/api/utils/RuleUtils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAGH,4CAA4C;AAC5C,mDAAgD;AAChD,iDAA8C;AAE9C,MAAa,SAAS;IAElB,mFAAmF;IACnF,sDAAsD;IACtD,yDAAyD;IACzD,0GAA0G;IAC1G;;OAEG;IACI,MAAM,CAAO,aAAa,CAAC,OAAgB,EAAE,WAAmB,EAAE,QAAgB,EAAE,QAAgB,EAAE,SAAkB;;YAE3H,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;YAC3E,MAAM,QAAQ,GAAG;gBACb,MAAM,EAAE,QAAQ;aACnB,CAAC;YAEF,OAAO,6BAAa,CAAC,cAAc,CAAK,OAAO,EAAE,OAAO,EAAE,wBAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC9F,CAAC;KAAA;IAEM,MAAM,CAAO,cAAc,CAAC,OAAgB,EAAE,WAAmB,EAAE,QAAgB,EAAE,SAAkB;;YAE1G,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;YAC3E,OAAO,6BAAa,CAAC,aAAa,CAAK,OAAO,EAAE,OAAO,EAAE,wBAAY,CAAC,OAAO,CAAC,CAAC;QACnF,CAAC;KAAA;IAEM,MAAM,CAAC,UAAU,CAAC,OAAgB,EAAE,WAAmB,EAAE,QAAgB,EAAE,SAAiB;QAE/F,WAAW,GAAG,kBAAkB,CAAC,WAAW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G,2BAAY,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;SAC/C;QAED,MAAM,eAAe,GAAG,2BAAY,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;QAEnE,OAAO,eAAe,GAAG,MAAM,CAAC;IACpC,CAAC;CACJ;AAtED,8BAsEC"}
|
|
@@ -32,10 +32,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
34
|
exports.SSMUtils = void 0;
|
|
35
|
-
const
|
|
35
|
+
const OpsRestClient_1 = require("./OpsRestClient");
|
|
36
36
|
const OpsRestUtils_1 = require("./OpsRestUtils");
|
|
37
37
|
const OpsTextUtils_1 = require("./OpsTextUtils");
|
|
38
|
-
const util_1 = require("util");
|
|
39
38
|
class SSMUtils {
|
|
40
39
|
/**
|
|
41
40
|
* setResourceState
|
|
@@ -46,13 +45,13 @@ class SSMUtils {
|
|
|
46
45
|
const postBody = {
|
|
47
46
|
desired: desiredState
|
|
48
47
|
};
|
|
49
|
-
return
|
|
48
|
+
return OpsRestClient_1.OpsRestClient.postExpectJSON(session, resourceUrl, SSMUtils.headers, postBody);
|
|
50
49
|
});
|
|
51
50
|
}
|
|
52
51
|
static showResourceState(session, resourceName, subsystem, table) {
|
|
53
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
53
|
const resourceUrl = this.getResourceURL(session, resourceName, table, subsystem);
|
|
55
|
-
return
|
|
54
|
+
return OpsRestClient_1.OpsRestClient.getExpectJSON(session, resourceUrl, SSMUtils.headers);
|
|
56
55
|
});
|
|
57
56
|
}
|
|
58
57
|
static getResourceURL(session, resourceName, table, subSystem) {
|
|
@@ -60,16 +59,16 @@ class SSMUtils {
|
|
|
60
59
|
let tableQueryString = "";
|
|
61
60
|
let subsystemQueryString = "";
|
|
62
61
|
let resourceURL = this.RESOURCES_URL + "/" + resourceName + this.STATE_URL;
|
|
63
|
-
if (
|
|
62
|
+
if (table != null) {
|
|
64
63
|
tableQueryString = "table=" + encodeURIComponent(table);
|
|
65
64
|
}
|
|
66
|
-
if (
|
|
65
|
+
if (subSystem != null) {
|
|
67
66
|
subsystemQueryString = "sub=" + encodeURIComponent(subSystem);
|
|
68
67
|
}
|
|
69
|
-
if ((
|
|
68
|
+
if ((table != null) && (subSystem != null)) {
|
|
70
69
|
resourceURL += "?" + tableQueryString + "&" + subsystemQueryString;
|
|
71
70
|
}
|
|
72
|
-
else if ((
|
|
71
|
+
else if ((table != null) || (subSystem != null)) {
|
|
73
72
|
resourceURL += "?" + tableQueryString + subsystemQueryString;
|
|
74
73
|
}
|
|
75
74
|
return resourceURL;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SSMUtils.js","sourceRoot":"","sources":["../../../src/api/utils/SSMUtils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SSMUtils.js","sourceRoot":"","sources":["../../../src/api/utils/SSMUtils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAGH,mDAAgD;AAChD,iDAA8C;AAC9C,iDAA8C;AAE9C,MAAa,QAAQ;IAMjB;;OAEG;IACI,MAAM,CAAO,gBAAgB,CAAC,OAAgB,EAAE,QAAgB,EAAE,YAAoB,EAAE,SAAkB,EAAE,KAAc;;YAE7H,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;YAC7E,MAAM,QAAQ,GAAG;gBACb,OAAO,EAAE,YAAY;aACxB,CAAC;YAEF,OAAO,6BAAa,CAAC,cAAc,CAAK,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC9F,CAAC;KAAA;IAEM,MAAM,CAAO,iBAAiB,CAAC,OAAg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AC,CAAC;QACtD,OAAO,IAAI,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG,GAAG,YAAY,CAAC;IACnD,CAAC;IAEM,MAAM,CAAC,mBAAmB,CAAC,OAAe,EAAE,OAAe;QAE9D,IAAI,YAAY,GAAG,OAAO,CAAC;QAC3B,IAAI,YAAY,GAAG,OAAO,CAAC;QAC3B,IAAI,YAAY,KAAK,YAAY,EAAE;YAC/B,YAAY,GAAG,2BAAY,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;YACrD,YAAY,GAAG,2BAAY,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;SACxD;aAAM;YACH,YAAY,GAAG,2BAAY,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;YACxD,YAAY,GAAG,2BAAY,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;SAC3D;QAED,MAAM,gBAAgB,GAAG,2BAAY,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACrE,MAAM,gBAAgB,GAAG,2BAAY,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAErE,OAAO,gBAAgB,GAAG,YAAY,GAAG,GAAG,GAAG,gBAAgB,GAAG,YAAY,CAAC;IACnF,CAAC;;AAtEL,4BAuEC;AArE0B,gBAAO,GAAW,2BAAY,CAAC,QAAQ,GAAG,MAAM,CAAC;AACjD,sBAAa,GAAW,QAAQ,CAAC,OAAO,GAAG,YAAY,CAAC;AACxD,kBAAS,GAAW,QAAQ,CAAC;AAC7B,gBAAO,GAAG,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAE,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AbstractSession, ICommandHandler, IHandlerParameters } from "@zowe/imperative";
|
|
2
|
-
export declare class OpsBaseHandler implements ICommandHandler {
|
|
2
|
+
export declare abstract class OpsBaseHandler implements ICommandHandler {
|
|
3
|
+
private mParams;
|
|
3
4
|
protected session: AbstractSession;
|
|
4
5
|
/**
|
|
5
6
|
* Set up things like the session to reduce code duplication
|
|
@@ -11,5 +12,13 @@ export declare class OpsBaseHandler implements ICommandHandler {
|
|
|
11
12
|
* to do the work of your command
|
|
12
13
|
* @param params - the params passed from imperative to our command handler
|
|
13
14
|
*/
|
|
14
|
-
processOps(params: IHandlerParameters): Promise<void>;
|
|
15
|
+
abstract processOps(params: IHandlerParameters): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Given command line arguments, create a REST Client Session.
|
|
18
|
+
* @static
|
|
19
|
+
* @param {ICommandArguments} args - The arguments specified by the user
|
|
20
|
+
* @param {boolean} doPrompting - Whether to prompt for missing arguments (defaults to true)
|
|
21
|
+
* @returns {Session} - A session for usage with the sample API
|
|
22
|
+
*/
|
|
23
|
+
private createSessCfgFromArgs;
|
|
15
24
|
}
|
|
@@ -32,7 +32,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
34
|
exports.OpsBaseHandler = void 0;
|
|
35
|
-
const
|
|
35
|
+
const imperative_1 = require("@zowe/imperative");
|
|
36
|
+
const OpsTextUtils_1 = require("../api/utils/OpsTextUtils");
|
|
36
37
|
class OpsBaseHandler {
|
|
37
38
|
/**
|
|
38
39
|
* Set up things like the session to reduce code duplication
|
|
@@ -40,24 +41,37 @@ class OpsBaseHandler {
|
|
|
40
41
|
*/
|
|
41
42
|
process(params) {
|
|
42
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
this.
|
|
44
|
+
this.mParams = params;
|
|
45
|
+
this.session = yield this.createSessCfgFromArgs(params.arguments);
|
|
44
46
|
try {
|
|
45
47
|
yield this.processOps(params);
|
|
46
48
|
}
|
|
47
49
|
catch (e) {
|
|
48
|
-
|
|
50
|
+
OpsTextUtils_1.OpsTextUtils.handleOpsError(e, params);
|
|
49
51
|
throw e;
|
|
50
52
|
}
|
|
51
53
|
});
|
|
52
54
|
}
|
|
53
55
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* @param
|
|
56
|
+
* Given command line arguments, create a REST Client Session.
|
|
57
|
+
* @static
|
|
58
|
+
* @param {ICommandArguments} args - The arguments specified by the user
|
|
59
|
+
* @param {boolean} doPrompting - Whether to prompt for missing arguments (defaults to true)
|
|
60
|
+
* @returns {Session} - A session for usage with the sample API
|
|
57
61
|
*/
|
|
58
|
-
|
|
62
|
+
createSessCfgFromArgs(args, doPrompting = true) {
|
|
59
63
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
//
|
|
64
|
+
// Create session config with connection info to access service
|
|
65
|
+
const sessCfg = {
|
|
66
|
+
hostname: args.host,
|
|
67
|
+
port: args.port,
|
|
68
|
+
basePath: args.basePath,
|
|
69
|
+
rejectUnauthorized: args.rejectUnauthorized,
|
|
70
|
+
protocol: args.protocol || "https"
|
|
71
|
+
};
|
|
72
|
+
// Add credentials to session config and prompt the user for any missing arguments
|
|
73
|
+
const sessCfgWithCreds = yield imperative_1.ConnectionPropsForSessCfg.addPropsOrPrompt(sessCfg, args, { doPrompting, parms: this.mParams });
|
|
74
|
+
return new imperative_1.Session(sessCfgWithCreds);
|
|
61
75
|
});
|
|
62
76
|
}
|
|
63
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpsBaseHandler.js","sourceRoot":"","sources":["../../src/cli/OpsBaseHandler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"OpsBaseHandler.js","sourceRoot":"","sources":["../../src/cli/OpsBaseHandler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAQ0B;AAC1B,4DAAyD;AAEzD,MAAsB,cAAc;IAKhC;;;OAGG;IACU,OAAO,CAAC,MAA0B;;YAC3C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;YACtB,IAAI,CAAC,OAAO,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAClE,IAAI;gBACA,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;aACjC;YAAC,OAAO,CAAC,EAAE;gBACR,2BAAY,CAAC,cAAc,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;gBACvC,MAAM,CAAC,CAAC;aACX;QACL,CAAC;KAAA;IASD;;;;;;OAMG;IACW,qBAAqB,CAAC,IAAuB,EAAE,WAAW,GAAG,IAAI;;YAC3E,+DAA+D;YAC/D,MAAM,OAAO,GAAa;gBACtB,QAAQ,EAAE,IAAI,CAAC,IAAI;gBACnB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;gBAC3C,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,OAAO;aACrC,CAAC;YAEF,kFAAkF;YAClF,MAAM,gBAAgB,GAAG,MAAM,sCAAyB,CAAC,gBAAgB,CAAW,OAAO,EAAE,IAAI,EAC7F,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;YAC1C,OAAO,IAAI,oBAAO,CAAC,gBAAgB,CAAC,CAAC;QACzC,CAAC;KAAA;CACJ;AAjDD,wCAiDC"}
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
|
|
23
23
|
*/
|
|
24
24
|
const Rule_definition_1 = require("./rule/Rule.definition");
|
|
25
|
-
const
|
|
25
|
+
const OpsRestUtils_1 = require("../../api/utils/OpsRestUtils");
|
|
26
26
|
const DisableDefinition = {
|
|
27
27
|
name: "disable",
|
|
28
28
|
summary: "Disable OPS/MVS rules.",
|
|
29
29
|
description: "Disable OPS/MVS rules.",
|
|
30
30
|
type: "group",
|
|
31
31
|
children: [Rule_definition_1.RuleDefinition],
|
|
32
|
-
passOn:
|
|
32
|
+
passOn: OpsRestUtils_1.OpsRestUtils.OPS_CONNECTION_PASS_ON
|
|
33
33
|
};
|
|
34
34
|
module.exports = DisableDefinition;
|
|
35
35
|
//# sourceMappingURL=Disable.definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Disable.definition.js","sourceRoot":"","sources":["../../../src/cli/disable/Disable.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,
|
|
1
|
+
{"version":3,"file":"Disable.definition.js","sourceRoot":"","sources":["../../../src/cli/disable/Disable.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,4DAAwD;AACxD,+DAA4D;AAE5D,MAAM,iBAAiB,GAAuB;IAC1C,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,wBAAwB;IACjC,WAAW,EAAE,wBAAwB;IACrC,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,CAAC,gCAAc,CAAC;IAC1B,MAAM,EAAE,2BAAY,CAAC,sBAAsB;CAC9C,CAAC;AAEF,iBAAS,iBAAiB,CAAC"}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
|
|
23
23
|
*/
|
|
24
24
|
const Rule_definition_1 = require("./rule/Rule.definition");
|
|
25
|
-
const
|
|
25
|
+
const OpsRestUtils_1 = require("../../api/utils/OpsRestUtils");
|
|
26
26
|
const EnableDefinition = {
|
|
27
27
|
name: "enable",
|
|
28
28
|
summary: "Enables OPS/MVS rules.",
|
|
@@ -30,7 +30,7 @@ const EnableDefinition = {
|
|
|
30
30
|
"This will cause SSM to take the necessary action to enable that rule.",
|
|
31
31
|
type: "group",
|
|
32
32
|
children: [Rule_definition_1.RuleDefinition],
|
|
33
|
-
passOn:
|
|
33
|
+
passOn: OpsRestUtils_1.OpsRestUtils.OPS_CONNECTION_PASS_ON
|
|
34
34
|
};
|
|
35
35
|
module.exports = EnableDefinition;
|
|
36
36
|
//# sourceMappingURL=Enable.definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Enable.definition.js","sourceRoot":"","sources":["../../../src/cli/enable/Enable.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,4DAAwD;AACxD
|
|
1
|
+
{"version":3,"file":"Enable.definition.js","sourceRoot":"","sources":["../../../src/cli/enable/Enable.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,4DAAwD;AACxD,+DAA4D;AAE5D,MAAM,gBAAgB,GAAuB;IACzC,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,wBAAwB;IACjC,WAAW,EAAE,wBAAwB;QACjC,uEAAuE;IAC3E,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,CAAC,gCAAc,CAAC;IAC1B,MAAM,EAAE,2BAAY,CAAC,sBAAsB;CAC9C,CAAC;AAEF,iBAAS,gBAAgB,CAAC"}
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
*/
|
|
24
24
|
const Resource_definition_1 = require("./resource/Resource.definition");
|
|
25
25
|
const Rule_definition_1 = require("./rule/Rule.definition");
|
|
26
|
-
const
|
|
26
|
+
const OpsRestUtils_1 = require("../../api/utils/OpsRestUtils");
|
|
27
27
|
const ShowDefinition = {
|
|
28
28
|
name: "show",
|
|
29
29
|
summary: "Display data associated with OPS/MVS automation elements (for example, rules or SSM resources).",
|
|
30
30
|
description: "Display data associated with OPS/MVS automation elements (for example, rules or SSM resources).",
|
|
31
31
|
type: "group",
|
|
32
32
|
children: [Resource_definition_1.ResourceDefinition, Rule_definition_1.RuleDefinition],
|
|
33
|
-
passOn:
|
|
33
|
+
passOn: OpsRestUtils_1.OpsRestUtils.OPS_CONNECTION_PASS_ON
|
|
34
34
|
};
|
|
35
35
|
module.exports = ShowDefinition;
|
|
36
36
|
//# sourceMappingURL=Show.definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Show.definition.js","sourceRoot":"","sources":["../../../src/cli/show/Show.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,wEAAoE;AACpE,4DAAwD;AACxD
|
|
1
|
+
{"version":3,"file":"Show.definition.js","sourceRoot":"","sources":["../../../src/cli/show/Show.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,wEAAoE;AACpE,4DAAwD;AACxD,+DAA4D;AAE5D,MAAM,cAAc,GAAuB;IACvC,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,iGAAiG;IAC1G,WAAW,EAAE,iGAAiG;IAC9G,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,CAAC,wCAAkB,EAAE,gCAAc,CAAC;IAC9C,MAAM,EAAE,2BAAY,CAAC,sBAAsB;CAC9C,CAAC;AAEF,iBAAS,cAAc,CAAC"}
|
|
@@ -31,14 +31,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
const RuleListUtils_1 = require("../../../api/utils/RuleListUtils");
|
|
35
|
+
const Show_1 = require("../../../api/Show");
|
|
34
36
|
const OpsBaseHandler_1 = require("../../OpsBaseHandler");
|
|
35
|
-
const index_1 = require("../../../index");
|
|
36
37
|
class RuleHandler extends OpsBaseHandler_1.OpsBaseHandler {
|
|
37
38
|
processOps(params) {
|
|
38
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
const response = yield
|
|
40
|
+
const response = yield Show_1.showRule(this.session, params.arguments.ruleset, params.arguments.rule, params.arguments.subsystem);
|
|
40
41
|
params.response.data.setObj(response);
|
|
41
|
-
|
|
42
|
+
RuleListUtils_1.RuleListUtils.printShowRuleResponse(response, params);
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rule.handler.js","sourceRoot":"","sources":["../../../../src/cli/show/rule/Rule.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAGH,
|
|
1
|
+
{"version":3,"file":"Rule.handler.js","sourceRoot":"","sources":["../../../../src/cli/show/rule/Rule.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAGH,oEAAiE;AACjE,4CAA6C;AAC7C,yDAAsD;AAEtD,MAAqB,WAAY,SAAQ,+BAAc;IAEtC,UAAU,CAAC,MAA0B;;YAE9C,MAAM,QAAQ,GAAQ,MAAM,eAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,OAAO,EACvE,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;YACvD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACtC,6BAAa,CAAC,qBAAqB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC1D,CAAC;KAAA;CACJ;AATD,8BASC"}
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
|
|
23
23
|
*/
|
|
24
24
|
const Resource_definition_1 = require("./resource/Resource.definition");
|
|
25
|
-
const
|
|
25
|
+
const OpsRestUtils_1 = require("../../api/utils/OpsRestUtils");
|
|
26
26
|
const StartDefinition = {
|
|
27
27
|
name: "start",
|
|
28
28
|
summary: "Starts an ssm resource in OPS/MVS",
|
|
29
29
|
description: "Start OPS/MVS resources.",
|
|
30
30
|
type: "group",
|
|
31
31
|
children: [Resource_definition_1.ResourceDefinition],
|
|
32
|
-
passOn:
|
|
32
|
+
passOn: OpsRestUtils_1.OpsRestUtils.OPS_CONNECTION_PASS_ON
|
|
33
33
|
};
|
|
34
34
|
module.exports = StartDefinition;
|
|
35
35
|
//# sourceMappingURL=Start.definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Start.definition.js","sourceRoot":"","sources":["../../../src/cli/start/Start.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,wEAAoE;AACpE
|
|
1
|
+
{"version":3,"file":"Start.definition.js","sourceRoot":"","sources":["../../../src/cli/start/Start.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,wEAAoE;AACpE,+DAA4D;AAE5D,MAAM,eAAe,GAAuB;IACxC,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,mCAAmC;IAC5C,WAAW,EAAE,0BAA0B;IACvC,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,CAAC,wCAAkB,CAAC;IAC9B,MAAM,EAAE,2BAAY,CAAC,sBAAsB;CAC9C,CAAC;AAEF,iBAAS,eAAe,CAAC"}
|
|
@@ -31,14 +31,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
-
const
|
|
34
|
+
const SSMResourceListUtils_1 = require("../../../api/utils/SSMResourceListUtils");
|
|
35
|
+
const Update_1 = require("../../../api/Update");
|
|
35
36
|
const OpsBaseHandler_1 = require("../../OpsBaseHandler");
|
|
36
37
|
class ResourceHandler extends OpsBaseHandler_1.OpsBaseHandler {
|
|
37
38
|
processOps(params) {
|
|
38
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
const response = yield
|
|
40
|
+
const response = yield Update_1.updateResource(this.session, params.arguments.resourcename, "UP", params.arguments.subsystem, params.arguments.tablename, params.arguments.wait);
|
|
40
41
|
params.response.data.setObj(response);
|
|
41
|
-
|
|
42
|
+
SSMResourceListUtils_1.SSMResourceListUtils.printResourceList(response, params);
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Resource.handler.js","sourceRoot":"","sources":["../../../../src/cli/start/resource/Resource.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAGH,
|
|
1
|
+
{"version":3,"file":"Resource.handler.js","sourceRoot":"","sources":["../../../../src/cli/start/resource/Resource.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAGH,kFAA+E;AAC/E,gDAAqD;AACrD,yDAAoD;AAEpD,MAAqB,eAAgB,SAAQ,+BAAc;IAE1C,UAAU,CAAC,MAA0B;;YAE9C,MAAM,QAAQ,GAAQ,MAAM,uBAAc,CAAC,IAAI,CAAC,OAAO,EACnD,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EACnC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACnF,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACtC,2CAAoB,CAAC,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC7D,CAAC;KAAA;CACJ;AAVD,kCAUC"}
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
|
|
23
23
|
*/
|
|
24
24
|
const Resource_definition_1 = require("./resource/Resource.definition");
|
|
25
|
-
const
|
|
25
|
+
const OpsRestUtils_1 = require("../../api/utils/OpsRestUtils");
|
|
26
26
|
const StopDefinition = {
|
|
27
27
|
name: "stop",
|
|
28
28
|
summary: "Stop OPS/MVS resources.",
|
|
29
29
|
description: "Stop OPS/MVS resources.",
|
|
30
30
|
type: "group",
|
|
31
31
|
children: [Resource_definition_1.ResourceDefinition],
|
|
32
|
-
passOn:
|
|
32
|
+
passOn: OpsRestUtils_1.OpsRestUtils.OPS_CONNECTION_PASS_ON
|
|
33
33
|
};
|
|
34
34
|
module.exports = StopDefinition;
|
|
35
35
|
//# sourceMappingURL=Stop.definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stop.definition.js","sourceRoot":"","sources":["../../../src/cli/stop/Stop.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,
|
|
1
|
+
{"version":3,"file":"Stop.definition.js","sourceRoot":"","sources":["../../../src/cli/stop/Stop.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,wEAAoE;AACpE,+DAA4D;AAE5D,MAAM,cAAc,GAAuB;IACvC,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,yBAAyB;IAClC,WAAW,EAAE,yBAAyB;IACtC,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,CAAC,wCAAkB,CAAC;IAC9B,MAAM,EAAE,2BAAY,CAAC,sBAAsB;CAC9C,CAAC;AAEF,iBAAS,cAAc,CAAC"}
|
|
@@ -31,14 +31,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
const SSMResourceListUtils_1 = require("../../../api/utils/SSMResourceListUtils");
|
|
35
|
+
const Update_1 = require("../../../api/Update");
|
|
34
36
|
const OpsBaseHandler_1 = require("../../OpsBaseHandler");
|
|
35
|
-
const index_1 = require("../../../index");
|
|
36
37
|
class ResourceHandler extends OpsBaseHandler_1.OpsBaseHandler {
|
|
37
38
|
processOps(params) {
|
|
38
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
const response = yield
|
|
40
|
+
const response = yield Update_1.updateResource(this.session, params.arguments.resourcename, "DOWN", params.arguments.subsystem, params.arguments.tablename, params.arguments.wait);
|
|
40
41
|
params.response.data.setObj(response);
|
|
41
|
-
|
|
42
|
+
SSMResourceListUtils_1.SSMResourceListUtils.printResourceList(response, params);
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Resource.handler.js","sourceRoot":"","sources":["../../../../src/cli/stop/resource/Resource.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAGH,
|
|
1
|
+
{"version":3,"file":"Resource.handler.js","sourceRoot":"","sources":["../../../../src/cli/stop/resource/Resource.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAGH,kFAA+E;AAC/E,gDAAqD;AACrD,yDAAsD;AAEtD,MAAqB,eAAgB,SAAQ,+BAAc;IAE1C,UAAU,CAAC,MAA0B;;YAE9C,MAAM,QAAQ,GAAG,MAAM,uBAAc,CAAC,IAAI,CAAC,OAAO,EAC9C,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,MAAM,EACrC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACnF,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACtC,2CAAoB,CAAC,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC7D,CAAC;KAAA;CACJ;AAVD,kCAUC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"healthCheck.handler.js","sourceRoot":"","sources":["../src/healthCheck.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAEH,
|
|
1
|
+
{"version":3,"file":"healthCheck.handler.js","sourceRoot":"","sources":["../src/healthCheck.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAEH,iDAA8D;AAC9D,yDAAsD;AAEtD,MAAqB,kBAAmB,SAAQ,+BAAc;IAC7C,UAAU,CAAC,MAA0B;;YAC9C,mBAAM,CAAC,mBAAmB,EAAE,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;YACnE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,wDAAwD;gBAChF,2DAA2D;gBAC3D,4DAA4D,CAC/D,CAAC;QACN,CAAC;KAAA;CACJ;AARD,qCAQC"}
|
package/lib/imperative.js
CHANGED
|
@@ -21,14 +21,30 @@
|
|
|
21
21
|
* INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS
|
|
22
22
|
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
|
|
23
23
|
*/
|
|
24
|
+
const PluginConstants_1 = require("./api/constants/PluginConstants");
|
|
24
25
|
const OpsProfilesConfig_1 = require("./api/OpsProfilesConfig");
|
|
25
26
|
const config = {
|
|
26
27
|
commandModuleGlobs: ["**/cli/*/*.definition!(.d).*s"],
|
|
28
|
+
rootCommandDescription: PluginConstants_1.PluginConstants.PLUGIN_DESCRIPTION,
|
|
29
|
+
productDisplayName: PluginConstants_1.PluginConstants.PLUGIN_NAME,
|
|
27
30
|
pluginHealthCheck: __dirname + "/healthCheck.handler",
|
|
28
31
|
pluginSummary: "Zowe CLI Plug-in for OPS/MVS®",
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
name: PluginConstants_1.PluginConstants.PLUGIN_GROUP_NAME,
|
|
33
|
+
// TODO - when the plugin moves to using the OPS/MVS REST API (APIML conformant) then enable
|
|
34
|
+
//Per Timothy Johnson: You are correct that those Zowe v2 conformance criteria are not currently applicable to the
|
|
35
|
+
// OPS plug-in for Zowe CLI, as long as it is intended to be used with the old OPS API.
|
|
36
|
+
//I would suggest removing the apimlConnLookup definition until you support base paths.
|
|
37
|
+
// Otherwise, someone who has the new OPS API on APIML and runs "zowe config auto-init" would get an invalid
|
|
38
|
+
// OPS profile with a basePath property auto-created in their zowe.config.json.
|
|
39
|
+
//Whenever you update the OPS plug-in to support the new APIML-conformant OPS API, you should address those
|
|
40
|
+
// conformance criteria and add the apimlConnLookup property.
|
|
41
|
+
// apimlConnLookup: [
|
|
42
|
+
// {
|
|
43
|
+
// apiId: "bcm.opsmvs",
|
|
44
|
+
// gatewayUrl: "api/v1",
|
|
45
|
+
// connProfType: "ops"
|
|
46
|
+
// }
|
|
47
|
+
// ],
|
|
32
48
|
profiles: OpsProfilesConfig_1.OpsProfilesConfig
|
|
33
49
|
};
|
|
34
50
|
module.exports = config;
|
package/lib/imperative.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imperative.js","sourceRoot":"","sources":["../src/imperative.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,+DAA4D;AAE5D,MAAM,MAAM,GAAsB;IAC9B,kBAAkB,EAAE,CAAC,+BAA+B,CAAC;IACrD,iBAAiB,EAAE,SAAS,GAAG,sBAAsB;IACrD,aAAa,EAAE,+BAA+B;IAC9C,
|
|
1
|
+
{"version":3,"file":"imperative.js","sourceRoot":"","sources":["../src/imperative.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,qEAAkE;AAClE,+DAA4D;AAE5D,MAAM,MAAM,GAAsB;IAC9B,kBAAkB,EAAE,CAAC,+BAA+B,CAAC;IACrD,sBAAsB,EAAE,iCAAe,CAAC,kBAAkB;IAC1D,kBAAkB,EAAE,iCAAe,CAAC,WAAW;IAC/C,iBAAiB,EAAE,SAAS,GAAG,sBAAsB;IACrD,aAAa,EAAE,+BAA+B;IAC9C,IAAI,EAAE,iCAAe,CAAC,iBAAiB;IACvC,4FAA4F;IAC5F,kHAAkH;IAClH,uFAAuF;IACvF,uFAAuF;IACvF,4GAA4G;IAC5G,+EAA+E;IAC/E,2GAA2G;IAC3G,6DAA6D;IAC7D,qBAAqB;IACrB,QAAQ;IACR,+BAA+B;IAC/B,gCAAgC;IAChC,8BAA8B;IAC9B,QAAQ;IACR,KAAK;IACL,QAAQ,EAAE,qCAAiB;CAC9B,CAAC;AAEF,iBAAS,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@broadcom/ops-for-zowe-cli",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.2",
|
|
4
4
|
"description": "OPS/MVS® Plug-in for Zowe CLI",
|
|
5
5
|
"author": "Broadcom",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
"zowe",
|
|
9
9
|
"cli",
|
|
10
10
|
"ops",
|
|
11
|
+
"zos",
|
|
12
|
+
"zowe-cli",
|
|
13
|
+
"mainframe",
|
|
11
14
|
"plugin"
|
|
12
15
|
],
|
|
13
16
|
"repository": "",
|
|
@@ -20,7 +23,7 @@
|
|
|
20
23
|
"registry": "https://registry.npmjs.org/"
|
|
21
24
|
},
|
|
22
25
|
"scripts": {
|
|
23
|
-
"build": "node scripts/updateLicense.js && tsc --pretty && madge -c lib",
|
|
26
|
+
"build": "node scripts/updateLicense.js && tsc --pretty && madge -c lib && npm run checkTestsCompile",
|
|
24
27
|
"checkTestsCompile": "echo \"Checking that test source compiles...\" && tsc --project __tests__/test-tsconfig.json --noEmit ",
|
|
25
28
|
"prebuild": "npm run clean && npm run lint && echo Using TypeScript && tsc --version",
|
|
26
29
|
"clean": "rimraf lib",
|
|
@@ -40,32 +43,32 @@
|
|
|
40
43
|
},
|
|
41
44
|
"dependencies": {},
|
|
42
45
|
"peerDependencies": {
|
|
43
|
-
"@zowe/
|
|
44
|
-
"@zowe/imperative": "^4.0.0"
|
|
46
|
+
"@zowe/imperative": "^5.1.0"
|
|
45
47
|
},
|
|
46
48
|
"devDependencies": {
|
|
47
49
|
"@types/fs-extra": "^8.0.0",
|
|
48
|
-
"@types/jest": "^
|
|
50
|
+
"@types/jest": "^26.0.0",
|
|
49
51
|
"@types/node": "^12.12.24",
|
|
50
52
|
"@types/yargs": "^15.0.0",
|
|
51
53
|
"@typescript-eslint/eslint-plugin": "^4.29.0",
|
|
52
54
|
"@typescript-eslint/parser": "^4.29.0",
|
|
53
|
-
"@zowe/
|
|
55
|
+
"@zowe/cli-test-utils": "^7.1.0",
|
|
56
|
+
"@zowe/core-for-zowe-sdk": "^7.1.0",
|
|
57
|
+
"@zowe/imperative": "5.5.4",
|
|
58
|
+
"@zowe/zosmf-for-zowe-sdk": "^7.1.0",
|
|
54
59
|
"env-cmd": "^8.0.2",
|
|
55
60
|
"eslint": "^7.32.0",
|
|
56
61
|
"eslint-plugin-jest": "^24.4.0",
|
|
57
62
|
"eslint-plugin-unused-imports": "^1.1.2",
|
|
58
63
|
"fs-extra": "^8.1.0",
|
|
59
|
-
"jest": "^
|
|
60
|
-
"jest-
|
|
61
|
-
"jest-environment-node": "^25.0.0",
|
|
64
|
+
"jest": "^26.1.0",
|
|
65
|
+
"jest-environment-node": "^26.1.0",
|
|
62
66
|
"jest-environment-node-debug": "^2.0.0",
|
|
63
|
-
"jest-
|
|
64
|
-
"jest-junit": "^3.6.0",
|
|
67
|
+
"jest-junit": "^6.3.0",
|
|
65
68
|
"jest-stare": "^1.0.5",
|
|
66
69
|
"madge": "^5.0.1",
|
|
67
70
|
"rimraf": "^2.7.1",
|
|
68
|
-
"ts-jest": "^
|
|
71
|
+
"ts-jest": "^26.5.1",
|
|
69
72
|
"ts-node": "^7.0.1",
|
|
70
73
|
"typedoc": "^0.20.0",
|
|
71
74
|
"typescript": "^3.8.0",
|
|
@@ -119,17 +122,11 @@
|
|
|
119
122
|
"jest-stare": {
|
|
120
123
|
"resultDir": "__tests__/__results__/jest-stare",
|
|
121
124
|
"additionalResultsProcessors": [
|
|
122
|
-
"jest-junit"
|
|
123
|
-
"jest-html-reporter"
|
|
125
|
+
"jest-junit"
|
|
124
126
|
],
|
|
125
127
|
"coverageLink": "../coverage/lcov-report/index.html"
|
|
126
128
|
},
|
|
127
129
|
"jest-junit": {
|
|
128
130
|
"output": "__tests__/__results__/junit.xml"
|
|
129
|
-
},
|
|
130
|
-
"jest-html-reporter": {
|
|
131
|
-
"pageTitle": "Zowe OPS/MVS Plug-in Test Results",
|
|
132
|
-
"outputPath": "__tests__/__results__/results.html",
|
|
133
|
-
"includeFailureMsg": true
|
|
134
131
|
}
|
|
135
132
|
}
|
package/lib/api/methods/index.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2019 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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
27
|
-
}) : (function(o, m, k, k2) {
|
|
28
|
-
if (k2 === undefined) k2 = k;
|
|
29
|
-
o[k2] = m[k];
|
|
30
|
-
}));
|
|
31
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
32
|
-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
__exportStar(require("./show"), exports);
|
|
36
|
-
__exportStar(require("./update"), exports);
|
|
37
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/methods/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,yCAAuB;AACvB,2CAAyB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Show.js","sourceRoot":"","sources":["../../../../src/api/methods/show/Show.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAAqD;AACrD,uCAAgD;AAChD,+CAA6C;AAI7C,SAAsB,QAAQ,CAAC,OAAgB,EAAE,WAAmB,EAAE,QAAgB,EAAE,SAAiB;;QACrG,MAAM,OAAO,GAAG,iBAAS,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;QAChF,OAAO,uBAAU,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,wBAAY,CAAC,OAAO,CAAC,CAAC;IAC5E,CAAC;CAAA;AAHD,4BAGC;AAED,SAAsB,YAAY,CAAC,OAAgB,EAAE,YAAoB,EAAE,KAAa,EAAE,SAAiB;;QACvG,MAAM,WAAW,GAAG,gBAAQ,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QACrF,OAAO,uBAAU,CAAC,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,wBAAY,CAAC,OAAO,CAAC,CAAC;IAChF,CAAC;CAAA;AAHD,oCAGC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Show";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/methods/show/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,yCAAuB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../../src/api/methods/update/Update.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAA0F;AAC1F,+CAA+C;AAC/C,uCAAkD;AAClD,4FAAyF;AACzF,kCAAuC;AAEvC,SAAsB,UAAU,CAAC,OAAgB,EAAE,WAAmB,EACrC,QAAgB,EAAE,SAAiB,EAAG,sBAAsB;AAC5D,SAAkB;;QAE/C,MAAM,OAAO,GAAG,iBAAS,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS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,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;YACnD,MAAM,UAAU,GAAG,IAAI,CAAC;YACxB,OAAO,YAAY,GAAG,IAAI,EAAE;gBACxB,YAAY,EAAE,CAAC;gBACf,YAAY,GAAG,MAAM,mBAAY,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;gBACvE,YAAY,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;gBACnD,IAAI,YAAY,CAAC,WAAW,EAAE,KAAK,YAAY,CAAC,WAAW,EAAE,EAAE;oBAC3D,wEAAwE;oBACxE,OAAO,YAAY,CAAC;iBACvB;qBAAM;oBACH,mDAAmD;oBACnD,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;wBAC1B,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;oBACpC,CAAC,CAAC,CAAC;iBACN;aACJ;YAED,4CAA4C;YAC5C,MAAM,IAAI,4BAAe,CAAC;gBACtB,GAAG,EAAE,8BAA8B,IAAI,UAAU,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,qCAAqC;oBACrG,iBAAiB,QAAQ,cAAc,YAAY,GAAG;aAC7D,CAAC,CAAC;SACN;IACL,CAAC;CAAA;AAlDD,wCAkDC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Update";
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2019 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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
27
|
-
}) : (function(o, m, k, k2) {
|
|
28
|
-
if (k2 === undefined) k2 = k;
|
|
29
|
-
o[k2] = m[k];
|
|
30
|
-
}));
|
|
31
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
32
|
-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
__exportStar(require("./Update"), exports);
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/methods/update/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,2CAAyB"}
|