Skip to content

Commit

Permalink
Merge branch 'main' into functional-ui-changes
Browse files Browse the repository at this point in the history
Signed-off-by: Chinmay Das <[email protected]>
  • Loading branch information
chinmdas committed Jan 9, 2025
2 parents 961f427 + 10fcac9 commit c9b4563
Show file tree
Hide file tree
Showing 68 changed files with 14,445 additions and 14,586 deletions.
25,735 changes: 12,866 additions & 12,869 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zowe/cics_monorepo",
"private": true,
"version": "6.2.2",
"version": "6.2.4",
"publishConfig": {
"registry": "https://zowe.jfrog.io/zowe/api/npm/npm-local-release/"
},
Expand Down Expand Up @@ -31,7 +31,7 @@
"@typescript-eslint/eslint-plugin": "^5.57.1",
"@typescript-eslint/parser": "^5.57.1",
"@zowe/cli-test-utils": "^8.0.0",
"@zowe/imperative": "^8.10.1",
"@zowe/imperative": "^8.10.3",
"@zowe/zowe-explorer-api": "^3.0.3",
"chalk": "^4.1.2",
"eslint": "^8.37.0",
Expand Down
6 changes: 5 additions & 1 deletion packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

All notable changes to the IBM® CICS® Plug-in for Zowe CLI will be documented in this file.

## `6.2.3`

- BugFix: Removed bundled dependencies from npm package. [#192](https://github.com/zowe/cics-for-zowe-client/pull/192)

## `6.2.2`

- BugFix: Removed bundled dependencies from npm package and restored the npm-shrinkwrap file. [#187](https://github.com/zowe/cics-for-zowe-client/pull/187)
- BugFix: Restored the npm-shrinkwrap file in npm package. [#187](https://github.com/zowe/cics-for-zowe-client/pull/187)

## `6.0.0`

Expand Down
7 changes: 2 additions & 5 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zowe/cics-for-zowe-cli",
"version": "6.2.2",
"version": "6.2.4",
"author": "Zowe",
"license": "EPL-2.0",
"description": "IBM CICS Plug-in for Zowe CLI",
Expand Down Expand Up @@ -49,14 +49,11 @@
"configurationModule": "lib/imperative.js"
},
"dependencies": {
"@zowe/cics-for-zowe-sdk": "6.2.1"
"@zowe/cics-for-zowe-sdk": "6.2.4"
},
"peerDependencies": {
"@zowe/imperative": "^8.0.0"
},
"bundledDependencies": [
"@zowe/cics-for-zowe-sdk"
],
"engines": {
"node": ">=18.12.0"
}
Expand Down
4 changes: 4 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the IBM® CICS® Plug-in for Zowe CLI will be documented in this file.

## `6.2.4`

- BugFix: URI encoding the region and cicsplex names. [#178](https://github.com/zowe/cics-for-zowe-client/issues/178)

## `6.2.1`

- BugFix: Change getResource criteria bracketing behaviour. [#180](https://github.com/zowe/cics-for-zowe-client/issues/180)
Expand Down
40 changes: 38 additions & 2 deletions packages/sdk/__tests__/__unit__/utils/Utils.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,40 @@ describe("Utils - getResourceUri", () => {
expect(response).toEqual("/CICSSystemManagement/resource1//region1");
});

it("should be able to get a resource uri with the region containing #", async () => {
try {
const options: IGetResourceUriOptions = {
"cicsPlex": "",
"regionName": "region#"
};

response = Utils.getResourceUri("resource1", options);
} catch (err) {
error = err;
}

expect(response).toBeDefined();
expect(error).toBeUndefined();
expect(response).toEqual("/CICSSystemManagement/resource1//region%23");
});

it("should be able to get a resource uri with the plex name containing #", async () => {
try {
const options: IGetResourceUriOptions = {
"cicsPlex": "cicsplex#",
"regionName": ""
};

response = Utils.getResourceUri("resource1", options);
} catch (err) {
error = err;
}

expect(response).toBeDefined();
expect(error).toBeUndefined();
expect(response).toEqual("/CICSSystemManagement/resource1/cicsplex%23/");
});

it("should be able to get a resource uri with the plex, region and resource names specified", async () => {
try {
const options: IGetResourceUriOptions = {
Expand Down Expand Up @@ -417,8 +451,10 @@ describe('Utils - enforceParentheses', () => {
});

it("should add appropriate brackets", () => {
const output = Utils.enforceParentheses("NOT (PROGRAM=CEE* OR PROGRAM=DFH* OR PROGRAM=CJ* OR PROGRAM=EYU* OR PROGRAM=CSQ* OR PROGRAM=CEL* OR PROGRAM=IGZ*)");
expect(output).toEqual("(NOT (PROGRAM=CEE* OR PROGRAM=DFH* OR PROGRAM=CJ* OR PROGRAM=EYU* OR PROGRAM=CSQ* OR PROGRAM=CEL* OR PROGRAM=IGZ*))");
const output = Utils.enforceParentheses(
"NOT (PROGRAM=CEE* OR PROGRAM=DFH* OR PROGRAM=CJ* OR PROGRAM=EYU* OR PROGRAM=CSQ* OR PROGRAM=CEL* OR PROGRAM=IGZ*)");
expect(output).toEqual(
"(NOT (PROGRAM=CEE* OR PROGRAM=DFH* OR PROGRAM=CJ* OR PROGRAM=EYU* OR PROGRAM=CSQ* OR PROGRAM=CEL* OR PROGRAM=IGZ*))");
});
});

Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zowe/cics-for-zowe-sdk",
"version": "6.2.1",
"version": "6.2.4",
"author": "Zowe",
"license": "EPL-2.0",
"description": "IBM CICS for Zowe SDK",
Expand Down
24 changes: 24 additions & 0 deletions packages/sdk/src/constants/CicsCmci.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,28 @@ export const CicsCmciConstants = {
*/
CICS_CMCI_EXTERNAL_RESOURCES: ["CICSLocalTransaction", "CICSRemoteTransaction", "CICSDefinitionTransaction", "CICSLocalFile"],

/**
* The CICS CMCI transaction definition
*/
CICS_CMCI_TRANSACTION_DEFINITION: "CICSDefinitionTransaction",

/**
* The CICS CMCI local transaction
*/
CICS_CMCI_LOCAL_TRANSACTION: "CICSLocalTransaction",

/**
* The CICS CMCI remote transaction
*/
CICS_CMCI_REMOTE_TRANSACTION: "CICSRemoteTransaction",

/**
* The CICS CMCI local file
*/
CICS_CMCI_LOCAL_FILE: "CICSLocalFile",

/**
* CICSTask parameter
*/
CICS_CMCI_TASK: "CICSTask"
};
18 changes: 9 additions & 9 deletions packages/sdk/src/utils/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,32 @@ export class Utils {

let delimiter = "?"; // initial delimiter

const cicsPlex = (options && options.cicsPlex) == null ? "" : `${options.cicsPlex}/`;
const region = (options && options.regionName) == null ? "" : options.regionName;
const cicsPlex = options?.cicsPlex == null ? "" : `${encodeURIComponent(options.cicsPlex)}/`;
const region = options?.regionName == null ? "" : encodeURIComponent(options.regionName);

let cmciResource = `/${CicsCmciConstants.CICS_SYSTEM_MANAGEMENT}/${resourceName}/${cicsPlex}${region}`;

if (options && options.criteria) {
if (options?.criteria) {
cmciResource += `${delimiter}${CicsCmciConstants.CRITERIA}=${this.enforceParentheses(encodeURIComponent(options.criteria))}`;
delimiter = "&";
}

if (options && options.parameter) {
if (options?.parameter) {
cmciResource += `${delimiter}PARAMETER=${encodeURIComponent(options.parameter)}`;
delimiter = "&";
}

if (options && options.queryParams && options.queryParams.summonly) {
if (options?.queryParams?.summonly) {
cmciResource += `${delimiter}${CicsCmciConstants.SUMM_ONLY}`;
delimiter = "&";
}

if (options && options.queryParams && options.queryParams.nodiscard) {
if (options?.queryParams?.nodiscard) {
cmciResource += `${delimiter}${CicsCmciConstants.NO_DISCARD}`;
delimiter = "&";
}

if (options && options.queryParams && options.queryParams.overrideWarningCount) {
if (options?.queryParams?.overrideWarningCount) {
cmciResource += `${delimiter}${CicsCmciConstants.OVERRIDE_WARNING_COUNT}`;
delimiter = "&";
}
Expand All @@ -69,7 +69,7 @@ export class Utils {

let cmciResource = `/${CicsCmciConstants.CICS_SYSTEM_MANAGEMENT}/${CicsCmciConstants.CICS_RESULT_CACHE}/${cacheToken}`;

if (options && options.startIndex) {
if (options?.startIndex) {
cmciResource += `/${options.startIndex}`;

if (options.count) {
Expand All @@ -85,7 +85,7 @@ export class Utils {
delimiter = "&";
}

if (options && options.summonly) {
if (options?.summonly) {
cmciResource += `${delimiter}${CicsCmciConstants.SUMM_ONLY}`;
}

Expand Down
Loading

0 comments on commit c9b4563

Please sign in to comment.