@zowe/zos-logs-for-zowe-sdk 6.37.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/README.md +45 -0
- package/lib/GetZosLog.d.ts +27 -0
- package/lib/GetZosLog.js +80 -0
- package/lib/GetZosLog.js.map +1 -0
- package/lib/GetZosLogValidator.d.ts +15 -0
- package/lib/GetZosLogValidator.js +33 -0
- package/lib/GetZosLogValidator.js.map +1 -0
- package/lib/ZosLogConstants.d.ts +11 -0
- package/lib/ZosLogConstants.js +28 -0
- package/lib/ZosLogConstants.js.map +1 -0
- package/lib/doc/IZosLogItemType.d.ts +73 -0
- package/lib/doc/IZosLogItemType.js +13 -0
- package/lib/doc/IZosLogItemType.js.map +1 -0
- package/lib/doc/IZosLogParms.d.ts +32 -0
- package/lib/doc/IZosLogParms.js +13 -0
- package/lib/doc/IZosLogParms.js.map +1 -0
- package/lib/doc/IZosLogType.d.ts +42 -0
- package/lib/doc/IZosLogType.js +13 -0
- package/lib/doc/IZosLogType.js.map +1 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +29 -0
- package/lib/index.js.map +1 -0
- package/package.json +60 -0
package/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# z/OS Console Package
|
|
2
|
+
|
|
3
|
+
Contains APIs to interact with logs on z/OS (using z/OSMF log REST endpoints).
|
|
4
|
+
z/OSMF version 2.4 or higher is required. Ensure that the [z/OSMF Operations Log Support is available via APAR and associated PTFs](https://www.ibm.com/support/pages/apar/PH35930).
|
|
5
|
+
## API Examples
|
|
6
|
+
|
|
7
|
+
**List z/OS logs**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { IProfile, Session, Logger, LoggingConfigurer, ImperativeError, CredentialManagerFactory } from "@zowe/imperative";
|
|
11
|
+
import { ZosmfSession } from "@zowe/zosmf-for-zowe-sdk";
|
|
12
|
+
import { getDefaultProfile } from "@zowe/core-for-zowe-sdk";
|
|
13
|
+
import { GetZosLog, IZosLogParms, IZosLogType } from "@zowe/zos-logs-for-zowe-sdk";
|
|
14
|
+
|
|
15
|
+
(async () => {
|
|
16
|
+
//Initialize the Imperative Credential Manager Factory and Logger
|
|
17
|
+
Logger.initLogger(LoggingConfigurer.configureLogger("lib", { name: "test" }));
|
|
18
|
+
// Uncommment the below line if the Secure Credential Store is in use
|
|
19
|
+
// await CredentialManagerFactory.initialize({service: "Zowe-Plugin"});
|
|
20
|
+
|
|
21
|
+
// Get the default z/OSMF profile and create a z/OSMF session with it
|
|
22
|
+
let defaultZosmfProfile: IProfile;
|
|
23
|
+
try {
|
|
24
|
+
defaultZosmfProfile = await getDefaultProfile("zosmf", true);
|
|
25
|
+
} catch (err) {
|
|
26
|
+
throw new ImperativeError({ msg: "Failed to get a profile." });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const session: Session = ZosmfSession.createBasicZosmfSession(defaultZosmfProfile);
|
|
30
|
+
|
|
31
|
+
const zosLogParms: IZosLogParms = {
|
|
32
|
+
startTime: "2021-09-08T07:27:03.000Z",
|
|
33
|
+
direction: "backward",
|
|
34
|
+
range: "1m"
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const response: IZosLogType = await GetZosLog.getZosLog(session, zosLogParms);
|
|
38
|
+
|
|
39
|
+
console.log(response);
|
|
40
|
+
process.exit(0);
|
|
41
|
+
})().catch((err) => {
|
|
42
|
+
console.error(err);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
});
|
|
45
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AbstractSession } from "@zowe/imperative";
|
|
2
|
+
import { IZosLogType } from "./doc/IZosLogType";
|
|
3
|
+
import { IZosLogParms } from "./doc/IZosLogParms";
|
|
4
|
+
/**
|
|
5
|
+
* Get zos log via z/OSMF restful api
|
|
6
|
+
* @export
|
|
7
|
+
* @class GetZosLog
|
|
8
|
+
*/
|
|
9
|
+
export declare class GetZosLog {
|
|
10
|
+
/**
|
|
11
|
+
* Issue an z/OSMF log command, returns "raw" z/OSMF response
|
|
12
|
+
* @static
|
|
13
|
+
* @param {AbstractSession} session representing connection to this api
|
|
14
|
+
* @param {IZosLogParms} commandParms log api parameters, @see {IZosLogParms}
|
|
15
|
+
* @return {Promise<IZosLogType>} command response , @see {IZosLogType}
|
|
16
|
+
* @memberof GetLog
|
|
17
|
+
*/
|
|
18
|
+
static getZosLog(session: AbstractSession, commandParms: IZosLogParms): Promise<IZosLogType>;
|
|
19
|
+
/**
|
|
20
|
+
* Get resource path for z/OSMF log restful api
|
|
21
|
+
* @static
|
|
22
|
+
* @param {IZosLogParms} commandParms params to compose the resource path
|
|
23
|
+
* @return {string} resource path
|
|
24
|
+
* @memberof GetCommand
|
|
25
|
+
*/
|
|
26
|
+
static getResourcePath(commandParms: IZosLogParms): string;
|
|
27
|
+
}
|
package/lib/GetZosLog.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This program and the accompanying materials are made available under the terms of the
|
|
4
|
+
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
|
|
5
|
+
* https://www.eclipse.org/legal/epl-v20.html
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
8
|
+
*
|
|
9
|
+
* Copyright Contributors to the Zowe Project.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.GetZosLog = void 0;
|
|
23
|
+
const core_for_zowe_sdk_1 = require("@zowe/core-for-zowe-sdk");
|
|
24
|
+
const GetZosLogValidator_1 = require("./GetZosLogValidator");
|
|
25
|
+
const ZosLogConstants_1 = require("./ZosLogConstants");
|
|
26
|
+
const util_1 = require("util");
|
|
27
|
+
/**
|
|
28
|
+
* Get zos log via z/OSMF restful api
|
|
29
|
+
* @export
|
|
30
|
+
* @class GetZosLog
|
|
31
|
+
*/
|
|
32
|
+
class GetZosLog {
|
|
33
|
+
/**
|
|
34
|
+
* Issue an z/OSMF log command, returns "raw" z/OSMF response
|
|
35
|
+
* @static
|
|
36
|
+
* @param {AbstractSession} session representing connection to this api
|
|
37
|
+
* @param {IZosLogParms} commandParms log api parameters, @see {IZosLogParms}
|
|
38
|
+
* @return {Promise<IZosLogType>} command response , @see {IZosLogType}
|
|
39
|
+
* @memberof GetLog
|
|
40
|
+
*/
|
|
41
|
+
static getZosLog(session, commandParms) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
GetZosLogValidator_1.GetZosLogValidator.validateSession(session);
|
|
44
|
+
let resp = yield core_for_zowe_sdk_1.ZosmfRestClient.getExpectJSON(session, GetZosLog.getResourcePath(commandParms), [core_for_zowe_sdk_1.ZosmfHeaders.X_CSRF_ZOSMF_HEADER]);
|
|
45
|
+
if (util_1.isNullOrUndefined(commandParms.processResponses) || commandParms.processResponses !== false) {
|
|
46
|
+
// the IBM responses sometimes have \r and sometimes \r\n, we will process them our here and hopefully
|
|
47
|
+
// return them with just \n.
|
|
48
|
+
resp = JSON.parse(JSON.stringify(resp).replace(/\\r\\n/g, "\\n").replace(/\\r/g, "\\n"));
|
|
49
|
+
}
|
|
50
|
+
return resp;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get resource path for z/OSMF log restful api
|
|
55
|
+
* @static
|
|
56
|
+
* @param {IZosLogParms} commandParms params to compose the resource path
|
|
57
|
+
* @return {string} resource path
|
|
58
|
+
* @memberof GetCommand
|
|
59
|
+
*/
|
|
60
|
+
static getResourcePath(commandParms) {
|
|
61
|
+
let path = ZosLogConstants_1.ZosLogConstants.RESOURCE;
|
|
62
|
+
if (commandParms.startTime !== undefined) {
|
|
63
|
+
let startTime = commandParms.startTime;
|
|
64
|
+
// in case the input is milliseconds format, which is a long number
|
|
65
|
+
if (!isNaN(commandParms.startTime)) {
|
|
66
|
+
startTime = new Date(+startTime).toISOString();
|
|
67
|
+
}
|
|
68
|
+
path += "time=" + startTime + "&";
|
|
69
|
+
}
|
|
70
|
+
if (commandParms.direction !== undefined) {
|
|
71
|
+
path += "direction=" + commandParms.direction + "&";
|
|
72
|
+
}
|
|
73
|
+
if (commandParms.range !== undefined) {
|
|
74
|
+
path += "timeRange=" + commandParms.range + "&";
|
|
75
|
+
}
|
|
76
|
+
return path;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.GetZosLog = GetZosLog;
|
|
80
|
+
//# sourceMappingURL=GetZosLog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetZosLog.js","sourceRoot":"","sources":["../src/GetZosLog.ts"],"names":[],"mappings":";AAAA;;;;;;;;;EASE;;;;;;;;;;;;AAGF,+DAAwE;AAGxE,6DAA0D;AAC1D,uDAAoD;AACpD,+BAAyC;AAGzC;;;;GAIG;AACH,MAAa,SAAS;IAClB;;;;;;;OAOG;IACI,MAAM,CAAO,SAAS,CAAC,OAAwB,EAAE,YAA0B;;YAC9E,uCAAkB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YAE5C,IAAI,IAAI,GAAgB,MAAM,mCAAe,CAAC,aAAa,CAAc,OAAO,EAC5E,SAAS,CAAC,eAAe,CAAC,YAAY,CAAC,EAAE,CAAC,gCAAY,CAAC,mBAAmB,CAAC,CAAC,CAAC;YACjF,IAAI,wBAAiB,CAAC,YAAY,CAAC,gBAAgB,CAAC,IAAI,YAAY,CAAC,gBAAgB,KAAK,KAAK,EAAE;gBAC7F,sGAAsG;gBACtG,4BAA4B;gBAC5B,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;aAC5F;YACD,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IAED;;;;;;OAMG;IACI,MAAM,CAAC,eAAe,CAAC,YAA0B;QACpD,IAAI,IAAI,GAAG,iCAAe,CAAC,QAAQ,CAAC;QACpC,IAAI,YAAY,CAAC,SAAS,KAAK,SAAS,EAAE;YACtC,IAAI,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC;YACvC,mEAAmE;YACnE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE;gBAChC,SAAS,GAAG,IAAI,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;aAClD;YACD,IAAI,IAAI,OAAO,GAAG,SAAS,GAAG,GAAG,CAAC;SACrC;QAED,IAAI,YAAY,CAAC,SAAS,KAAK,SAAS,EAAE;YACtC,IAAI,IAAI,YAAY,GAAG,YAAY,CAAC,SAAS,GAAG,GAAG,CAAC;SACvD;QACD,IAAI,YAAY,CAAC,KAAK,KAAK,SAAS,EAAE;YAClC,IAAI,IAAI,YAAY,GAAG,YAAY,CAAC,KAAK,GAAG,GAAG,CAAC;SACnD;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAjDD,8BAiDC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AbstractSession } from "@zowe/imperative";
|
|
2
|
+
/**
|
|
3
|
+
* Class validates parameters for GetZosLog
|
|
4
|
+
* @export
|
|
5
|
+
* @class GetZosLogValidator
|
|
6
|
+
*/
|
|
7
|
+
export declare class GetZosLogValidator {
|
|
8
|
+
/**
|
|
9
|
+
* Validate session
|
|
10
|
+
* @static
|
|
11
|
+
* @param {AbstractSession} session representing connection to this api
|
|
12
|
+
* @memberof GetZosLogValidator
|
|
13
|
+
*/
|
|
14
|
+
static validateSession(session: AbstractSession): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This program and the accompanying materials are made available under the terms of the
|
|
4
|
+
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
|
|
5
|
+
* https://www.eclipse.org/legal/epl-v20.html
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
8
|
+
*
|
|
9
|
+
* Copyright Contributors to the Zowe Project.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.GetZosLogValidator = void 0;
|
|
14
|
+
const imperative_1 = require("@zowe/imperative");
|
|
15
|
+
const core_for_zowe_sdk_1 = require("@zowe/core-for-zowe-sdk");
|
|
16
|
+
/**
|
|
17
|
+
* Class validates parameters for GetZosLog
|
|
18
|
+
* @export
|
|
19
|
+
* @class GetZosLogValidator
|
|
20
|
+
*/
|
|
21
|
+
class GetZosLogValidator {
|
|
22
|
+
/**
|
|
23
|
+
* Validate session
|
|
24
|
+
* @static
|
|
25
|
+
* @param {AbstractSession} session representing connection to this api
|
|
26
|
+
* @memberof GetZosLogValidator
|
|
27
|
+
*/
|
|
28
|
+
static validateSession(session) {
|
|
29
|
+
imperative_1.ImperativeExpect.toNotBeNullOrUndefined(session, imperative_1.TextUtils.formatMessage(core_for_zowe_sdk_1.noSession.message));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.GetZosLogValidator = GetZosLogValidator;
|
|
33
|
+
//# sourceMappingURL=GetZosLogValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetZosLogValidator.js","sourceRoot":"","sources":["../src/GetZosLogValidator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;EASE;;;AAEF,iDAAgF;AAChF,+DAAoD;AAEpD;;;;GAIG;AACH,MAAa,kBAAkB;IAC3B;;;;;OAKG;IACI,MAAM,CAAC,eAAe,CAAC,OAAwB;QAClD,6BAAgB,CAAC,sBAAsB,CAAC,OAAO,EAAE,sBAAS,CAAC,aAAa,CAAC,6BAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IACjG,CAAC;CACJ;AAVD,gDAUC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IMessageDefinition } from "@zowe/imperative";
|
|
2
|
+
export declare class ZosLogConstants {
|
|
3
|
+
static readonly RESOURCE: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Error message that no session provided.
|
|
7
|
+
* @static
|
|
8
|
+
* @type {IMessageDefinition}
|
|
9
|
+
* @memberof ZosLogConstants
|
|
10
|
+
*/
|
|
11
|
+
export declare const noSessionMessage: IMessageDefinition;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This program and the accompanying materials are made available under the terms of the
|
|
4
|
+
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
|
|
5
|
+
* https://www.eclipse.org/legal/epl-v20.html
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
8
|
+
*
|
|
9
|
+
* Copyright Contributors to the Zowe Project.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.noSessionMessage = exports.ZosLogConstants = void 0;
|
|
14
|
+
const imperative_1 = require("@zowe/imperative");
|
|
15
|
+
class ZosLogConstants {
|
|
16
|
+
}
|
|
17
|
+
exports.ZosLogConstants = ZosLogConstants;
|
|
18
|
+
ZosLogConstants.RESOURCE = "/zosmf/restconsoles/v1/log?";
|
|
19
|
+
/**
|
|
20
|
+
* Error message that no session provided.
|
|
21
|
+
* @static
|
|
22
|
+
* @type {IMessageDefinition}
|
|
23
|
+
* @memberof ZosLogConstants
|
|
24
|
+
*/
|
|
25
|
+
exports.noSessionMessage = {
|
|
26
|
+
message: imperative_1.apiErrorHeader.message + ` No session was supplied.`
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=ZosLogConstants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ZosLogConstants.js","sourceRoot":"","sources":["../src/ZosLogConstants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;EASE;;;AAEF,iDAAsE;AAEtE,MAAa,eAAe;;AAA5B,0CAEC;AAD0B,wBAAQ,GAAW,6BAA6B,CAAC;AAG5E;;;;;GAKG;AACU,QAAA,gBAAgB,GAAuB;IAChD,OAAO,EAAE,2BAAc,CAAC,OAAO,GAAG,2BAA2B;CAChE,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the details about one log item
|
|
3
|
+
* @export
|
|
4
|
+
* @interface IZosLogItemType
|
|
5
|
+
*/
|
|
6
|
+
export interface IZosLogItemType {
|
|
7
|
+
/**
|
|
8
|
+
* Eight character command and response token (CART).
|
|
9
|
+
* @type {string}
|
|
10
|
+
* @memberof IZosLogItemType
|
|
11
|
+
*/
|
|
12
|
+
cart: string;
|
|
13
|
+
/**
|
|
14
|
+
* The color of the message.
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof IZosLogItemType
|
|
17
|
+
*/
|
|
18
|
+
color: string;
|
|
19
|
+
/**
|
|
20
|
+
* The name of the job that generates the message.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof IZosLogItemType
|
|
23
|
+
*/
|
|
24
|
+
jobName: string;
|
|
25
|
+
/**
|
|
26
|
+
* The content of the message.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof IZosLogItemType
|
|
29
|
+
*/
|
|
30
|
+
message: string;
|
|
31
|
+
/**
|
|
32
|
+
* The message ID.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof IZosLogItemType
|
|
35
|
+
*/
|
|
36
|
+
messageId: string;
|
|
37
|
+
/**
|
|
38
|
+
* Reply ID, in decimal.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof IZosLogItemType
|
|
41
|
+
*/
|
|
42
|
+
replyId: string;
|
|
43
|
+
/**
|
|
44
|
+
* Original eight character system name.
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof IZosLogItemType
|
|
47
|
+
*/
|
|
48
|
+
system: string;
|
|
49
|
+
/**
|
|
50
|
+
* “HARDCOPY”.
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof IZosLogItemType
|
|
53
|
+
*/
|
|
54
|
+
type: string;
|
|
55
|
+
/**
|
|
56
|
+
* Indicate whether the message is a DOM, WTOR, or HOLD message.
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof IZosLogItemType
|
|
59
|
+
*/
|
|
60
|
+
subType: string;
|
|
61
|
+
/**
|
|
62
|
+
* For example, “Thu Feb 03 03:00 GMT 2021”.
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof IZosLogItemType
|
|
65
|
+
*/
|
|
66
|
+
time: string;
|
|
67
|
+
/**
|
|
68
|
+
* UNIX timestamp. For example, 1621920830109.
|
|
69
|
+
* @type {number}
|
|
70
|
+
* @memberof IZosLogItemType
|
|
71
|
+
*/
|
|
72
|
+
timestamp: number;
|
|
73
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This program and the accompanying materials are made available under the terms of the
|
|
4
|
+
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
|
|
5
|
+
* https://www.eclipse.org/legal/epl-v20.html
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
8
|
+
*
|
|
9
|
+
* Copyright Contributors to the Zowe Project.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
//# sourceMappingURL=IZosLogItemType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IZosLogItemType.js","sourceRoot":"","sources":["../../src/doc/IZosLogItemType.ts"],"names":[],"mappings":";AAAA;;;;;;;;;EASE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The z/OSMF log API parameters. See the z/OSMF REST API documentation for full details.
|
|
3
|
+
* @export
|
|
4
|
+
* @interface IZosLogParms
|
|
5
|
+
*/
|
|
6
|
+
export interface IZosLogParms {
|
|
7
|
+
/**
|
|
8
|
+
* The z/OS log api time param.
|
|
9
|
+
* @type {any]
|
|
10
|
+
* @memberof ILogParms
|
|
11
|
+
*/
|
|
12
|
+
startTime?: any;
|
|
13
|
+
/**
|
|
14
|
+
* The direction param.
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof ILogParms
|
|
17
|
+
*/
|
|
18
|
+
direction?: "forward" | "backward";
|
|
19
|
+
/**
|
|
20
|
+
* The timeRange param.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof ILogParms
|
|
23
|
+
*/
|
|
24
|
+
range?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The z/OSMF Console API returns '\r' or '\r\n' where line-breaks. Can attempt to replace these
|
|
27
|
+
* sequences with '\n', but there may be cases where that is not preferable. Specify false to prevent processing.
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof IConsoleParms
|
|
30
|
+
*/
|
|
31
|
+
processResponses?: boolean;
|
|
32
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This program and the accompanying materials are made available under the terms of the
|
|
4
|
+
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
|
|
5
|
+
* https://www.eclipse.org/legal/epl-v20.html
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
8
|
+
*
|
|
9
|
+
* Copyright Contributors to the Zowe Project.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
//# sourceMappingURL=IZosLogParms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IZosLogParms.js","sourceRoot":"","sources":["../../src/doc/IZosLogParms.ts"],"names":[],"mappings":";AAAA;;;;;;;;;EASE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { IZosLogItemType } from "./IZosLogItemType";
|
|
2
|
+
/**
|
|
3
|
+
* Standard log response document
|
|
4
|
+
* Represents the details about the messages and logs
|
|
5
|
+
* @export
|
|
6
|
+
* @interface IZosLogType
|
|
7
|
+
*/
|
|
8
|
+
export interface IZosLogType {
|
|
9
|
+
/**
|
|
10
|
+
* Specify the timezone of the z/OS system. Valid values for the timezone rangefrom -12 to 12.
|
|
11
|
+
* For example, "-3" means UTC-3 timezone.
|
|
12
|
+
* @type {number}
|
|
13
|
+
* @memberof IZosLogType
|
|
14
|
+
*/
|
|
15
|
+
timezone: number;
|
|
16
|
+
/**
|
|
17
|
+
* The UNIX timestamp. This value could be used in a subsequent request tospecify a starting timestamp.
|
|
18
|
+
* Logs in the “nextTimestamp” are not returned in the current response.
|
|
19
|
+
* @type {number}
|
|
20
|
+
* @memberof IZosLogType
|
|
21
|
+
*/
|
|
22
|
+
nextTimestamp: number;
|
|
23
|
+
/**
|
|
24
|
+
* Indicates the source of the log.
|
|
25
|
+
* Value "OPERLOG" indicates the operations log.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof IZosLogType
|
|
28
|
+
*/
|
|
29
|
+
source: string;
|
|
30
|
+
/**
|
|
31
|
+
* Total number of messages returned in the response.
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof IZosLogType
|
|
34
|
+
*/
|
|
35
|
+
totalitems: number;
|
|
36
|
+
/**
|
|
37
|
+
* JSON array of messages
|
|
38
|
+
* @type {IZosLogItemType[]}
|
|
39
|
+
* @memberof IZosLogType
|
|
40
|
+
*/
|
|
41
|
+
items: IZosLogItemType[];
|
|
42
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This program and the accompanying materials are made available under the terms of the
|
|
4
|
+
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
|
|
5
|
+
* https://www.eclipse.org/legal/epl-v20.html
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
8
|
+
*
|
|
9
|
+
* Copyright Contributors to the Zowe Project.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
//# sourceMappingURL=IZosLogType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IZosLogType.js","sourceRoot":"","sources":["../../src/doc/IZosLogType.ts"],"names":[],"mappings":";AAAA;;;;;;;;;EASE"}
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This program and the accompanying materials are made available under the terms of the
|
|
4
|
+
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
|
|
5
|
+
* https://www.eclipse.org/legal/epl-v20.html
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
8
|
+
*
|
|
9
|
+
* Copyright Contributors to the Zowe Project.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
20
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
__exportStar(require("./doc/IZosLogType"), exports);
|
|
24
|
+
__exportStar(require("./doc/IZosLogItemType"), exports);
|
|
25
|
+
__exportStar(require("./doc/IZosLogParms"), exports);
|
|
26
|
+
__exportStar(require("./ZosLogConstants"), exports);
|
|
27
|
+
__exportStar(require("./GetZosLogValidator"), exports);
|
|
28
|
+
__exportStar(require("./GetZosLog"), exports);
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;EASE;;;;;;;;;;;;AAEF,oDAAkC;AAClC,wDAAsC;AACtC,qDAAmC;AAEnC,oDAAkC;AAClC,uDAAqC;AACrC,8CAA4B"}
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zowe/zos-logs-for-zowe-sdk",
|
|
3
|
+
"version": "6.37.0",
|
|
4
|
+
"description": "Zowe SDK to interact with the z/OS logs",
|
|
5
|
+
"author": "Broadcom",
|
|
6
|
+
"license": "EPL-2.0",
|
|
7
|
+
"homepage": "https://github.com/zowe/zowe-cli/tree/master/packages/zoslogs#readme",
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://github.com/zowe/zowe-cli/issues"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/zowe/zowe-cli.git"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"zosmf",
|
|
17
|
+
"mainframe",
|
|
18
|
+
"CLI",
|
|
19
|
+
"zos",
|
|
20
|
+
"logs",
|
|
21
|
+
"z/OSMF",
|
|
22
|
+
"mvs",
|
|
23
|
+
"os390",
|
|
24
|
+
"z/OS",
|
|
25
|
+
"zowe"
|
|
26
|
+
],
|
|
27
|
+
"files": [
|
|
28
|
+
"lib"
|
|
29
|
+
],
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"registry": "https://registry.npmjs.org/"
|
|
32
|
+
},
|
|
33
|
+
"main": "lib/index.js",
|
|
34
|
+
"typings": "lib/index.d.ts",
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "tsc --pretty",
|
|
37
|
+
"watch": "tsc --pretty --watch",
|
|
38
|
+
"clean": "rimraf lib",
|
|
39
|
+
"lint": "eslint \"src/**/*.ts\" \"**/__tests__/**/*.ts\"",
|
|
40
|
+
"lint:packages": "eslint \"src/**/*.ts\" --ignore-pattern \"**/__tests__/**/*.ts\"",
|
|
41
|
+
"lint:tests": "eslint \"**/__tests__/**/*.ts\"",
|
|
42
|
+
"circularDependencyCheck": "madge -c lib",
|
|
43
|
+
"typedoc": "typedoc --options ./typedoc.json ./src/",
|
|
44
|
+
"typedocSpecifySrc": "typedoc --options ./typedoc.json"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/node": "^12.12.24",
|
|
48
|
+
"@zowe/core-for-zowe-sdk": "6.36.1",
|
|
49
|
+
"@zowe/imperative": "4.17.1",
|
|
50
|
+
"eslint": "^7.32.0",
|
|
51
|
+
"madge": "^4.0.1",
|
|
52
|
+
"rimraf": "^2.6.3",
|
|
53
|
+
"typedoc": "^0.16.0",
|
|
54
|
+
"typescript": "^3.8.0"
|
|
55
|
+
},
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"@zowe/core-for-zowe-sdk": "^6.24.1",
|
|
58
|
+
"@zowe/imperative": "^4.8.1"
|
|
59
|
+
}
|
|
60
|
+
}
|