From 94c52d3e2fa14751c34522b3f74c46b6cf88347a Mon Sep 17 00:00:00 2001 From: jace-roell Date: Mon, 9 Dec 2024 11:04:53 -0500 Subject: [PATCH 01/52] initial commit Signed-off-by: jace-roell --- file.ts | 17 +++++++++++++++++ .../imperative/src/config/src/ProfileInfo.ts | 4 ++++ 2 files changed, 21 insertions(+) create mode 100644 file.ts diff --git a/file.ts b/file.ts new file mode 100644 index 0000000000..f490ca01a2 --- /dev/null +++ b/file.ts @@ -0,0 +1,17 @@ +import { ProfileInfo } from "@zowe/imperative"; +import { GetJobs } from "@zowe/zos-jobs-for-zowe-sdk"; +(async () => { + // Load connection info from default z/OSMF profile + const profInfo = new ProfileInfo("zowe"); + await profInfo.readProfilesFromDisk(); + const zosmfProfAttrs = profInfo.getDefaultProfile("zosmf"); + const zosmfMergedArgs = profInfo.mergeArgsForProfile(zosmfProfAttrs!, { getSecureVals: true }); + const session = ProfileInfo.createSession(zosmfMergedArgs.knownArgs); + const owner: string | undefined = session.ISession.user; + // This may take awhile... + const response = await GetJobs.getJobsByOwner(session, owner!); + console.log(response); +})().catch((err) => { + console.error(err); + process.exit(1); +}); \ No newline at end of file diff --git a/packages/imperative/src/config/src/ProfileInfo.ts b/packages/imperative/src/config/src/ProfileInfo.ts index 27119a92b9..dd0c771161 100644 --- a/packages/imperative/src/config/src/ProfileInfo.ts +++ b/packages/imperative/src/config/src/ProfileInfo.ts @@ -597,6 +597,10 @@ export class ProfileInfo { if (osLoc?.global) { layerProperties = this.mLoadedConfig.findLayer(osLoc.user, osLoc.global)?.properties; realBaseProfileName = layerProperties?.defaults.base; + if (!realBaseProfileName && osLoc.user) { + layerProperties = this.mLoadedConfig.findLayer(false, osLoc.global)?.properties; + realBaseProfileName = layerProperties?.defaults.base; + } if (realBaseProfileName) baseProfile = this.mLoadedConfig.api.profiles.buildProfile(realBaseProfileName, layerProperties?.profiles); else baseProfile = null; } From 95fe387c1e807bede0c309559907ae634115a424 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Mon, 9 Dec 2024 16:38:45 -0500 Subject: [PATCH 02/52] apiResponse Signed-off-by: jace-roell --- .../methods/upload/Upload.unit.test.ts | 2 ++ .../zosfiles/src/methods/upload/Upload.ts | 24 +++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts b/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts index 28812678c8..284301aecd 100644 --- a/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts +++ b/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts @@ -392,6 +392,7 @@ describe("z/OS Files - Upload", () => { expect(error).toBeUndefined(); expect(response).toBeDefined(); + expect(response.apiResponse).toMatchObject({"from": "Buffer<>", "success": true, "to": dsName}); expect(zosmfPutFullSpy).toHaveBeenCalledTimes(1); expect(zosmfPutFullSpy).toHaveBeenCalledWith(dummySession, {resource: endpoint, @@ -1755,6 +1756,7 @@ describe("z/OS Files - Upload", () => { expect(error).toBeUndefined(); expect(USSresponse).toBeDefined(); + expect(USSresponse.apiResponse).toMatchObject({"from": "Buffer<>", "success": true, "to": dsName}); const normalizedData = ZosFilesUtils.normalizeNewline(data); expect(data.length).not.toBe(normalizedData.length); diff --git a/packages/zosfiles/src/methods/upload/Upload.ts b/packages/zosfiles/src/methods/upload/Upload.ts index 2f984ededa..527b1a3c3b 100644 --- a/packages/zosfiles/src/methods/upload/Upload.ts +++ b/packages/zosfiles/src/methods/upload/Upload.ts @@ -184,7 +184,11 @@ export class Upload { const uploadRequest: IRestClientResponse = await ZosmfRestClient.putExpectFullResponse(session, requestOptions); // By default, apiResponse is empty when uploading - const apiResponse: any = {}; + const apiResponse: any = { + success: true, + from: "Buffer<>", + to: dataSetName + }; // Return Etag in apiResponse, if requested if (options.returnEtag) { @@ -242,7 +246,11 @@ export class Upload { const uploadRequest: IRestClientResponse = await ZosmfRestClient.putExpectFullResponse(session, requestOptions); // By default, apiResponse is empty when uploading - const apiResponse: any = {}; + const apiResponse: any = { + success: true, + from: "Stream<>", + to: dataSetName + }; // Return Etag in apiResponse, if requested if (options.returnEtag) { @@ -481,7 +489,11 @@ export class Upload { const uploadRequest: IRestClientResponse = await ZosmfRestClient.putExpectFullResponse(session, requestOptions); // By default, apiResponse is empty when uploading - const apiResponse: any = {}; + const apiResponse: any = { + success: true, + from: "Buffer<>", + to: ussname + }; // Return Etag in apiResponse, if requested if (options.returnEtag) { @@ -541,7 +553,11 @@ export class Upload { } // By default, apiResponse is empty when uploading - const apiResponse: any = {}; + const apiResponse: any = { + success: true, + from: "Stream<>", + to: ussname + }; // Return Etag in apiResponse, if requested if (options.returnEtag) { From 5153819cea96b347b47a2a24ef6841d809b36ead Mon Sep 17 00:00:00 2001 From: jace-roell Date: Tue, 10 Dec 2024 09:04:29 -0500 Subject: [PATCH 03/52] modify unit tests Signed-off-by: jace-roell --- .../__tests__/__unit__/methods/upload/Upload.unit.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts b/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts index 284301aecd..69420591e3 100644 --- a/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts +++ b/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts @@ -749,6 +749,7 @@ describe("z/OS Files - Upload", () => { expect(error).toBeUndefined(); expect(response).toBeDefined(); + expect(response.apiResponse).toMatchObject({"from": "Stream<>", "success": true, "to": dsName}); expect(zosmfPutFullSpy).toHaveBeenCalledTimes(1); expect(zosmfPutFullSpy).toHaveBeenCalledWith(dummySession, {resource: endpoint, @@ -1832,6 +1833,7 @@ describe("z/OS Files - Upload", () => { expect(error).toBeUndefined(); expect(USSresponse).toBeDefined(); + expect(USSresponse.apiResponse).toMatchObject({"from": "Stream<>", "success": true, "to": dsName}); expect(USSresponse.success).toBeTruthy(); expect(zosmfExpectFullSpy).toHaveBeenCalledTimes(1); From 981acaaaa3ca600ebb85401a7ad604f8dcdd2e86 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Tue, 10 Dec 2024 10:30:36 -0500 Subject: [PATCH 04/52] system test implementation Signed-off-by: jace-roell --- .../methods/upload/Upload.system.test.ts | 72 ++++++++++++++++++- .../zosfiles/src/methods/upload/Upload.ts | 7 +- 2 files changed, 75 insertions(+), 4 deletions(-) diff --git a/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts b/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts index 158729d6ce..121fa142ca 100644 --- a/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts +++ b/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts @@ -19,6 +19,7 @@ import { deleteFiles, getUniqueDatasetName, stripNewLines, wait, waitTime } from import * as fs from "fs"; import { ITestEnvironment } from "../../../../../../__tests__/__src__/environment/ITestEnvironment"; import { runCliScript } from "../../../../../../__tests__/__packages__/cli-test-utils/src"; +import { Readable } from "stream"; let REAL_SESSION: Session; let testEnvironment: ITestEnvironment; @@ -309,6 +310,51 @@ describe("Upload Data Set", () => { } }); + it("should upload a PDS file - bufferToDataSet()", async () => { + let error; + let uploadResponse; + let getResponse; + const data: Buffer = Buffer.from(testdata); + dsname = dsname+("(TEST)"); + + try { + uploadResponse = await Upload.bufferToDataSet(REAL_SESSION, data, dsname); + getResponse = await Get.dataSet(REAL_SESSION, dsname); + } catch (err) { + error = err; + Imperative.console.info("Error: " + inspect(error)); + } + + expect(error).toBeFalsy(); + + expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "Buffer<>","to": dsname}); + expect(Buffer.from(getResponse.toString().trim())).toEqual(data); + }); + + it("should upload a PDS file - streamToDataSet()", async () => { + let error; + let uploadResponse; + let getResponse; + + const inputStream = new Readable(); + inputStream.push(testdata); + inputStream.push(null); + dsname = dsname+("(TEST)"); + + try { + uploadResponse = await Upload.streamToDataSet(REAL_SESSION, inputStream, dsname); + getResponse = await Get.dataSet(REAL_SESSION, dsname); + } catch (err) { + error = err; + Imperative.console.info("Error: " + inspect(error)); + } + + expect(error).toBeFalsy(); + + expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "Stream<>","to": dsname}); + expect(getResponse.toString().trim()).toEqual(testdata); + }); + it("should upload a file to a partitioned data set member using full path", async () => { let error; let response: IZosFilesResponse; @@ -733,7 +779,7 @@ describe("Upload USS file", () => { await deleteFiles(REAL_SESSION, ussname); }); - it("should upload a USS file", async () => { + it("should upload a USS file - bufferToUssFile()", async () => { let error; let uploadResponse; let getResponse; @@ -748,9 +794,33 @@ describe("Upload USS file", () => { } expect(error).toBeFalsy(); + + expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "Buffer<>","to": ussname}); expect(getResponse).toEqual(Buffer.from(data.toString())); + }); + it("should upload a USS file - streamToUssFile()", async () => { + let error; + let uploadResponse; + let getResponse; + const inputStream = new Readable(); + inputStream.push(testdata); + inputStream.push(null); + + try { + uploadResponse = await Upload.streamToUssFile(REAL_SESSION, ussname, inputStream); + getResponse = await Get.USSFile(REAL_SESSION, ussname); + } catch (err) { + error = err; + Imperative.console.info("Error: " + inspect(error)); + } + + expect(error).toBeFalsy(); + + expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "Stream<>","to": ussname}); + expect(getResponse).toEqual(Buffer.from(testdata)); }); + it("should upload a USS file in binary mode", async () => { let error; let uploadResponse; diff --git a/packages/zosfiles/src/methods/upload/Upload.ts b/packages/zosfiles/src/methods/upload/Upload.ts index 527b1a3c3b..7285e91633 100644 --- a/packages/zosfiles/src/methods/upload/Upload.ts +++ b/packages/zosfiles/src/methods/upload/Upload.ts @@ -489,10 +489,11 @@ export class Upload { const uploadRequest: IRestClientResponse = await ZosmfRestClient.putExpectFullResponse(session, requestOptions); // By default, apiResponse is empty when uploading - const apiResponse: any = { + const apiResponse: any = + { success: true, from: "Buffer<>", - to: ussname + to: origUssname }; // Return Etag in apiResponse, if requested @@ -556,7 +557,7 @@ export class Upload { const apiResponse: any = { success: true, from: "Stream<>", - to: ussname + to: origUssname }; // Return Etag in apiResponse, if requested From 4c650d95482c9aa8dd92a0839ba93f5d3a1af5c8 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Tue, 10 Dec 2024 10:59:53 -0500 Subject: [PATCH 05/52] changelog and fix system tests Signed-off-by: jace-roell --- packages/zosfiles/CHANGELOG.md | 1 + .../methods/upload/Upload.system.test.ts | 14 ++++++-------- packages/zosfiles/src/methods/upload/Upload.ts | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/zosfiles/CHANGELOG.md b/packages/zosfiles/CHANGELOG.md index e9715b05ad..33cdb9b9b7 100644 --- a/packages/zosfiles/CHANGELOG.md +++ b/packages/zosfiles/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to the Zowe z/OS files SDK package will be documented in thi ## Recent Changes +- BugFix: Corrected the `apiResponse` response value from `streamToDataSet()`,`streamToUss()`,`bufferToUss()` and `bufferToDataSet()` on the Upload SDK. [#2381](https://github.com/zowe/zowe-cli/pull/2381) - BugFix: Corrected the `Upload.BufferToUssFile()` SDK function to properly tag uploaded files. [#2378](https://github.com/zowe/zowe-cli/pull/2378) ## `8.9.0` diff --git a/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts b/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts index 121fa142ca..adeaa4f699 100644 --- a/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts +++ b/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts @@ -315,11 +315,10 @@ describe("Upload Data Set", () => { let uploadResponse; let getResponse; const data: Buffer = Buffer.from(testdata); - dsname = dsname+("(TEST)"); try { - uploadResponse = await Upload.bufferToDataSet(REAL_SESSION, data, dsname); - getResponse = await Get.dataSet(REAL_SESSION, dsname); + uploadResponse = await Upload.bufferToDataSet(REAL_SESSION, data, dsname+"(TEST)"); + getResponse = await Get.dataSet(REAL_SESSION, dsname+"(TEST)"); } catch (err) { error = err; Imperative.console.info("Error: " + inspect(error)); @@ -327,7 +326,7 @@ describe("Upload Data Set", () => { expect(error).toBeFalsy(); - expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "Buffer<>","to": dsname}); + expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "Buffer<>","to": dsname+"(TEST)"}); expect(Buffer.from(getResponse.toString().trim())).toEqual(data); }); @@ -339,11 +338,10 @@ describe("Upload Data Set", () => { const inputStream = new Readable(); inputStream.push(testdata); inputStream.push(null); - dsname = dsname+("(TEST)"); try { - uploadResponse = await Upload.streamToDataSet(REAL_SESSION, inputStream, dsname); - getResponse = await Get.dataSet(REAL_SESSION, dsname); + uploadResponse = await Upload.streamToDataSet(REAL_SESSION, inputStream, dsname+"(TEST)"); + getResponse = await Get.dataSet(REAL_SESSION, dsname+"(TEST)"); } catch (err) { error = err; Imperative.console.info("Error: " + inspect(error)); @@ -351,7 +349,7 @@ describe("Upload Data Set", () => { expect(error).toBeFalsy(); - expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "Stream<>","to": dsname}); + expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "Stream<>","to": dsname+"(TEST)"}); expect(getResponse.toString().trim()).toEqual(testdata); }); diff --git a/packages/zosfiles/src/methods/upload/Upload.ts b/packages/zosfiles/src/methods/upload/Upload.ts index 7285e91633..4280d80e41 100644 --- a/packages/zosfiles/src/methods/upload/Upload.ts +++ b/packages/zosfiles/src/methods/upload/Upload.ts @@ -489,7 +489,7 @@ export class Upload { const uploadRequest: IRestClientResponse = await ZosmfRestClient.putExpectFullResponse(session, requestOptions); // By default, apiResponse is empty when uploading - const apiResponse: any = + const apiResponse: any = { success: true, from: "Buffer<>", From 00df0a3dd2b002c23af8a4266d631b3d73da85ac Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:10:57 -0500 Subject: [PATCH 06/52] Attach authentication header to proxy agent Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- .../src/rest/src/client/AbstractRestClient.ts | 3 --- .../src/rest/src/client/ProxySettings.ts | 22 +++++++++++++++---- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/packages/imperative/src/rest/src/client/AbstractRestClient.ts b/packages/imperative/src/rest/src/client/AbstractRestClient.ts index 9da363a5cd..c4f908709c 100644 --- a/packages/imperative/src/rest/src/client/AbstractRestClient.ts +++ b/packages/imperative/src/rest/src/client/AbstractRestClient.ts @@ -476,9 +476,6 @@ export abstract class AbstractRestClient { this.mLogger.info(`Proxy setting "${proxyUrl.href}" will not be used as hostname was found listed under "no_proxy" setting.`); } else { this.mLogger.info(`Using the following proxy setting for the request: ${proxyUrl.href}`); - if (this.session.ISession.proxy?.proxy_authorization) { - reqHeaders.push({ 'Proxy-Authorization': this.session.ISession.proxy.proxy_authorization}); - } options.agent = ProxySettings.getProxyAgent(this.session.ISession); } } diff --git a/packages/imperative/src/rest/src/client/ProxySettings.ts b/packages/imperative/src/rest/src/client/ProxySettings.ts index c414003a64..ab0d3ae6d6 100644 --- a/packages/imperative/src/rest/src/client/ProxySettings.ts +++ b/packages/imperative/src/rest/src/client/ProxySettings.ts @@ -45,12 +45,20 @@ export class ProxySettings { */ public static getProxyAgent(session: ISession): Agent | undefined { const proxySetting = this.getProxySettings(session); + const proxyUrl = proxySetting.proxyUrl; + const proxyAuthorizationHeader = proxySetting.authSetting; if (proxySetting?.protocol === HTTP_PROTOCOL) { - return new HttpProxyAgent(proxySetting.proxyUrl); + const proxyAgentOptions = proxyAuthorizationHeader + ? { headers: { 'Proxy-Authorization': proxyAuthorizationHeader } } + : undefined; + return new HttpProxyAgent(proxyUrl, proxyAgentOptions); } if (proxySetting?.protocol === HTTPS_PROTOCOL) { - return new HttpsProxyAgent(proxySetting.proxyUrl, - { rejectUnauthorized: session.rejectUnauthorized ?? true }); + const proxyAgentOptions = { + rejectUnauthorized: session.rejectUnauthorized ?? true, + headers: { 'Proxy-Authorization': proxyAuthorizationHeader } + }; + return new HttpsProxyAgent(proxyUrl, proxyAgentOptions); } } @@ -109,6 +117,11 @@ export class ProxySettings { envVariable = session.proxy?.https_proxy ?? this.getHttpsEnvVariables(); } const proxyUrl = this.checkUrl(envVariable); + + const authSetting = session.proxy?.proxy_authorization; + if (authSetting) { + return {proxyUrl, protocol, authSetting}; + } if (proxyUrl) { return {proxyUrl, protocol}; } @@ -174,5 +187,6 @@ export class ProxySettings { */ interface ProxySetting { proxyUrl: URL, - protocol: HTTP_PROTOCOL_CHOICES + protocol: HTTP_PROTOCOL_CHOICES, + authSetting?: string } From bf6db6be16b14cf136273796e41e229fdca10286 Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:28:04 -0500 Subject: [PATCH 07/52] Code cleanup Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- .../src/rest/src/client/ProxySettings.ts | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/packages/imperative/src/rest/src/client/ProxySettings.ts b/packages/imperative/src/rest/src/client/ProxySettings.ts index ab0d3ae6d6..6132e9e20b 100644 --- a/packages/imperative/src/rest/src/client/ProxySettings.ts +++ b/packages/imperative/src/rest/src/client/ProxySettings.ts @@ -45,20 +45,17 @@ export class ProxySettings { */ public static getProxyAgent(session: ISession): Agent | undefined { const proxySetting = this.getProxySettings(session); - const proxyUrl = proxySetting.proxyUrl; - const proxyAuthorizationHeader = proxySetting.authSetting; + const proxyOptions = {} as ProxyOptions; + const authHeader = ProxySettings.getProxyAuthHeader(proxySetting); + if(authHeader) { + proxyOptions.headers = authHeader; + } if (proxySetting?.protocol === HTTP_PROTOCOL) { - const proxyAgentOptions = proxyAuthorizationHeader - ? { headers: { 'Proxy-Authorization': proxyAuthorizationHeader } } - : undefined; - return new HttpProxyAgent(proxyUrl, proxyAgentOptions); + return new HttpProxyAgent(proxySetting.proxyUrl, proxyOptions); } if (proxySetting?.protocol === HTTPS_PROTOCOL) { - const proxyAgentOptions = { - rejectUnauthorized: session.rejectUnauthorized ?? true, - headers: { 'Proxy-Authorization': proxyAuthorizationHeader } - }; - return new HttpsProxyAgent(proxyUrl, proxyAgentOptions); + proxyOptions.rejectUnauthorized = session.rejectUnauthorized ?? true; + return new HttpsProxyAgent(proxySetting.proxyUrl, proxyOptions); } } @@ -96,6 +93,12 @@ export class ProxySettings { return false; } + private static getProxyAuthHeader(proxySetting: ProxySetting): { [key: string]: string } | undefined { + return proxySetting.authSetting + ? { 'Proxy-Authorization': proxySetting.authSetting } + : undefined; + } + /** * Parses environment variables for proxy servers. * @private @@ -190,3 +193,8 @@ interface ProxySetting { protocol: HTTP_PROTOCOL_CHOICES, authSetting?: string } + +interface ProxyOptions { + headers?: { [key: string]: string }, + rejectUnauthorized?: boolean +} From ad13b8b9f3260414135ff56dd638bcbe0f563069 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Tue, 10 Dec 2024 14:09:03 -0500 Subject: [PATCH 08/52] changelog Signed-off-by: jace-roell --- packages/imperative/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/imperative/CHANGELOG.md b/packages/imperative/CHANGELOG.md index ded21b7c84..6a407cb842 100644 --- a/packages/imperative/CHANGELOG.md +++ b/packages/imperative/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the Imperative package will be documented in this file. +## Recent Changes + +- BugFix: Resolved issue where team config base profiles were being overwritten if a user config did not have a base profile. + ## `8.8.3` - BugFix: Modified 8.8.2 bugfix to correct web help alias. [#2361](https://github.com/zowe/zowe-cli/pull/2361) From 1314ffa52cc5fd56061c6a8f4093bdc2c7f86bdd Mon Sep 17 00:00:00 2001 From: jace-roell Date: Tue, 10 Dec 2024 14:13:19 -0500 Subject: [PATCH 09/52] removed test file and changelog fix Signed-off-by: jace-roell --- file.ts | 17 ----------------- packages/imperative/CHANGELOG.md | 2 +- 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 file.ts diff --git a/file.ts b/file.ts deleted file mode 100644 index f490ca01a2..0000000000 --- a/file.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ProfileInfo } from "@zowe/imperative"; -import { GetJobs } from "@zowe/zos-jobs-for-zowe-sdk"; -(async () => { - // Load connection info from default z/OSMF profile - const profInfo = new ProfileInfo("zowe"); - await profInfo.readProfilesFromDisk(); - const zosmfProfAttrs = profInfo.getDefaultProfile("zosmf"); - const zosmfMergedArgs = profInfo.mergeArgsForProfile(zosmfProfAttrs!, { getSecureVals: true }); - const session = ProfileInfo.createSession(zosmfMergedArgs.knownArgs); - const owner: string | undefined = session.ISession.user; - // This may take awhile... - const response = await GetJobs.getJobsByOwner(session, owner!); - console.log(response); -})().catch((err) => { - console.error(err); - process.exit(1); -}); \ No newline at end of file diff --git a/packages/imperative/CHANGELOG.md b/packages/imperative/CHANGELOG.md index 6a407cb842..52045f1d05 100644 --- a/packages/imperative/CHANGELOG.md +++ b/packages/imperative/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to the Imperative package will be documented in this file. ## Recent Changes -- BugFix: Resolved issue where team config base profiles were being overwritten if a user config did not have a base profile. +- BugFix: Resolved issue where team config base profiles were being overwritten if a user config did not have a base profile. [#2383](https://github.com/zowe/zowe-cli/pull/2383) ## `8.8.3` From ba9e5dca58bada99509a5d82e6c2b63d38d7bea5 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Wed, 11 Dec 2024 14:19:43 -0500 Subject: [PATCH 10/52] unit test Signed-off-by: jace-roell --- .../ProfileInfo.TeamConfig.unit.test.ts | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts b/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts index d4f2aeaf6f..4f0d2b9cac 100644 --- a/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts +++ b/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts @@ -38,6 +38,7 @@ const testEnvPrefix = testAppNm.toUpperCase(); const profileTypes = ["zosmf", "tso", "base", "dummy"]; const testDir = path.join(__dirname, "__resources__"); const teamProjDir = path.join(testDir, testAppNm + "_team_config_proj"); +const teamProjBaseTest = path.join(testDir, testAppNm + "_team_config_proj_base"); function createNewProfInfo(newDir: string, opts?: IProfOpts): ProfileInfo { // create a new ProfileInfo in the desired directory @@ -956,6 +957,37 @@ describe("TeamConfig ProfileInfo tests", () => { expect(caughtError).toBeDefined(); expect(caughtError.message).toContain("Profile attributes must be defined"); }); + it("should fall back to layerProperties when realBaseProfileName is undefined", async () => { + const profInfo = createNewProfInfo(teamProjDir); + await profInfo.readProfilesFromDisk(); + + // Simulate the condition where the active layer has no `defaults.base` but global and user layers exist + const layerActive = profInfo.getTeamConfig().layerActive(); + delete layerActive.properties.defaults.base; + + const globalLayer = profInfo.getTeamConfig().findLayer(false, true); + globalLayer.properties.defaults.base = "globalBaseProfile"; + + const userLayer = profInfo.getTeamConfig().findLayer(true, true); + userLayer.properties.defaults.base = ""; + + const profAttrs = profInfo.getDefaultProfile("zosmf") as IProfAttrs; + + // Merge args to trigger the logic + const mergedArgs = profInfo.mergeArgsForProfile(profAttrs); + + // Expected args should include those from the global base profile + const expectedArgs = [ + {argName: 'host', dataType: 'string', argValue: 'LPAR1.your.domain.net', secure: false}, + {argName: 'port', dataType: 'number', argValue: 1234, secure: false}, + {argName: 'responseFormatHeader', dataType: 'boolean', argValue: true, secure: false} + ]; + + expect(mergedArgs.knownArgs.length).toBeGreaterThanOrEqual(expectedArgs.length); + for (const [idx, arg] of expectedArgs.entries()) { + expect(mergedArgs.knownArgs[idx]).toMatchObject(arg); + } + }); }); describe("mergeArgsForProfileType", () => { From 2e55508d219b4c97584b5959a982e5618b3ec8ca Mon Sep 17 00:00:00 2001 From: anaxceron Date: Wed, 11 Dec 2024 14:50:11 -0500 Subject: [PATCH 11/52] first edits to ReadMe Signed-off-by: anaxceron --- README.md | 137 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 75 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index 1cdeba5a02..1f3e72a83b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# **Zowe CLI** +# Zowe CLI [![codecov](https://codecov.io/gh/zowe/zowe-cli/branch/master/graph/badge.svg)](https://codecov.io/gh/zowe/zowe-cli) [![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/7204/badge)](https://bestpractices.coreinfrastructure.org/projects/7204) @@ -8,49 +8,53 @@ This repository also contains the Zowe Node Client SDK. The SDK lets you leverag
-## **Contents** +## Content - [Documentation](#documentation) - - [Contribution Guidelines](#contribution-guidelines) - - [Building Zowe CLI From Source](#building-zowe-cli-from-source) - - [Installing Zowe CLI From Source](#installing-zowe-cli-from-source) + - [Contribution guidelines](#contribution-guidelines) + - [Building Zowe CLI from source](#building-zowe-cli-from-source) + - [Installing Zowe CLI from source](#installing-zowe-cli-from-source) - [Uninstalling Zowe CLI](#uninstalling-zowe-cli) - [Configuring Zowe CLI](#configuring-zowe-cli) - [Zowe Node Client SDK](#zowe-node-client-sdk) - - [Running System Tests](#running-system-tests) + - [Running system tests](#running-system-tests) - [FAQs](#frequently-asked-questions) - - [Project Structure and Governance](#project-structure-and-governance) + - [Project structure and governance](#project-structure-and-governance)
-## **Documentation** -For information about how to install, configure, and use Zowe CLI, see [Zowe CLI Quick Start Documentation](https://docs.zowe.org/stable/getting-started/cli-getting-started/). For more detailed instructions, see [Zowe CLI Documentation](https://docs.zowe.org/stable/user-guide/cli-using-usingcli/), which also includes examples and tutorials for how to contribute to Zowe CLI and develop CLI plug-ins. +## Documentation +For information about how to install, configure, and use Zowe CLI, see [Zowe CLI Quick Start](https://docs.zowe.org/stable/getting-started/cli-getting-started/) documentation. For more detailed instructions, see [Zowe CLI](https://docs.zowe.org/stable/user-guide/cli-using-usingcli/) documentation, which also includes examples and tutorials for how to contribute to Zowe CLI and develop CLI plug-ins. -Engineering design documentation is contained in the 'docs' directory in this repository. To view the Web Help for all Zowe CLI commands and contributed plug-ins, see the [Zowe CLI Web Help](https://docs.zowe.org/stable/web_help/index.html). To view all locally accessible commands, run `zowe --help-web`. For more use cases and tutorials visit [Medium.com/zowe](https://medium.com/zowe). +Engineering design documentation is contained in the `docs` directory in this repository. To view the Web Help for all Zowe CLI commands and contributed plug-ins, see the [Zowe CLI Web Help](https://docs.zowe.org/stable/web_help/index.html). To view all locally accessible commands, run `zowe --help-web`. For more use cases and tutorials visit [Medium.com/zowe](https://medium.com/zowe).
-## **Contribution Guidelines** +## Contribution guidelines The following information is critical to working with the code, running/writing/maintaining automated tests, developing consistent syntax in your plug-in, and ensuring that your plug-in integrates with Zowe CLI properly: -| For more information about ... | See: | +| For more information about | Go to | | ------------------------------ | ----- | -| General guidelines that apply to contributing to Zowe CLI and Plug-ins | [Contribution Guidelines](./CONTRIBUTING.md) | -| Conventions and best practices for creating packages and plug-ins for Zowe CLI | [Package and Plug-in Guidelines](./docs/PackagesAndPluginGuidelines.md)| -Guidelines for contributing to Zowe SDKs| [SDK Guidelines](./docs/SDKGuidelines.md) | -| Guidelines for running tests on Zowe CLI | [Testing Guidelines](./docs/TESTING.md) | -| Guidelines for running tests on the plug-ins that you build| [Plug-in Testing Guidelines](./docs/PluginTESTINGGuidelines.md) | +| General guidelines that apply to contributing to Zowe CLI and Plug-ins | [Contribution guidelines](./CONTRIBUTING.md) | +| Conventions and best practices for creating packages and plug-ins for Zowe CLI | [Package and plug-in guidelines](./docs/PackagesAndPluginGuidelines.md)| +Guidelines for contributing to Zowe SDKs| [SDK guidelines](./docs/SDKGuidelines.md) | +| Guidelines for running tests on Zowe CLI | [Testing guidelines](./docs/TESTING.md) | +| Guidelines for running tests on the plug-ins that you build| [Plug-in testing guidelines](./docs/PluginTESTINGGuidelines.md) | | Documentation that describes the features of the Imperative CLI Framework | [About Imperative CLI Framework](https://github.com/zowe/imperative/wiki) | -| Naming CLI commands and developing syntax | [Command Format Standards](./docs/CommandFormatStandards.md) | -Versioning conventions for Zowe CLI and Plug-ins| [Versioning Guidelines](./docs/MaintainerVersioning.md) | -| Miscellaneous tips for development | [Development Tips](./docs/DevelopmentTips.md) +| Naming CLI commands and developing syntax | [Command format standards](./docs/CommandFormatStandards.md) | +Versioning conventions for Zowe CLI and Plug-ins| [Versioning guidelines](./docs/MaintainerVersioning.md) | +| Miscellaneous tips for development | [Development tips](./docs/DevelopmentTips.md) -**Tip:** -- Visit our [Sample Plug-in repository](https://github.com/zowe/zowe-cli-sample-plugin) for example plug-in code. You can follow developer tutorials [here](https://docs.zowe.org/stable/extend/extend-cli/cli-devTutorials.html). +**Tip:** Visit our [Sample plug-in repository](https://github.com/zowe/zowe-cli-sample-plugin) for example plug-in code. Follow the [developer tutorials](https://docs.zowe.org/stable/extend/extend-cli/cli-devTutorials.html) for more tips.
-## **Building Zowe CLI From Source** -Zowe CLI requires NPM version 8 and Cargo version 1.72.0 (or newer) to build from source. Before proceeding, check your NPM version with `npm --version` and if it's older than 8.x, update with `npm install -g npm`. To check your version of Cargo, run `cargo --version`. Cargo can be installed using rustup: [https://rustup.rs/](https://rustup.rs/). To update Cargo, run the `rustup update` command. +## Building Zowe CLI from source + +Zowe CLI requires NPM version 8 and Cargo version 1.72.0 (or newer) to build from source. + +Check your NPM version with `npm --version` and if it's older than 8.x, update with `npm install -g npm`. + +Check your vCargo version with `cargo --version`. Cargo can be installed using [rustup](https://rustup.rs/). To update Cargo, run the `rustup update` command. For developers using Linux, the following packages are required to build Zowe CLI from source: @@ -80,13 +84,13 @@ When you update `package.json` to include new dependencies, or when you pull cha npm update ``` -**Tip:** -- When necessary, you can run the install command again to update dependencies changed in `package.json`. +**Tip:** When necessary, run the install command again to update dependencies changed in `package.json`.
-## **Installing Zowe CLI From Source** -From your copy of this repository, after a build, navigate to the `packages/cli` directory, then issue the following command to install Zowe CLI from source: +## Installing Zowe CLI from source + +From your copy of this repository, after a build, navigate to the `packages/cli` directory, then install Zowe CLI from source: ``` npm install -g @@ -98,8 +102,8 @@ npm install -g
-## **Uninstalling Zowe CLI** -From your local copy of this repository, issue the following command to uninstall Zowe CLI: +## Uninstalling Zowe CLI +From your local copy of this repository, to uninstall Zowe CLI: ``` npm uninstall --global @zowe/cli @@ -107,49 +111,52 @@ npm uninstall --global @zowe/cli
-## **Configuring Zowe CLI** +## Configuring Zowe CLI -Zowe CLI configuration is made up of different **profiles**. The profiles contain the information that Zowe CLI needs to communicate with the mainframe system. For example, credentials and z/OSMF host name. If you try to use Zowe CLI functionality and you get an error message that Zowe CLI failed to load any profiles, see the `zowe profiles create --help` command for the group of commands that you are trying to use (if any) to initialize your configuration. +Zowe CLI team configuration is made up of different **profiles**. Each profile contains the information that Zowe CLI needs to communicate with the mainframe system, such as credentials and host name. -The most fundamental Zowe CLI profile is a `zosmf` profile. Issue the following command to understand how to create a `zosmf` profile in Zowe CLI: - -``` -zowe profiles create zosmf-profile --help -``` +The most fundamental Zowe CLI profile is a `zosmf` profile, and it is included when Zowe CLI initializes your team configuration. However, you must still add your specific connection information to complete the `zosmf` profile. To do so, update your `~/.zowe/zowe.config.json` configuration file with a text editor or an IDE (such as Visual Studio Code) on your computer. -After you create your profile, you can confirm that the properties of your profile can connect to and communicate with your mainframe system successfully by issuing the following command: +After you create and/or finalize your profile, confirm that the properties of your profile can connect to and communicate with your mainframe system successfully: ``` zowe zosmf check status ``` -For detailed information about creating service profiles, creating base profiles, or integrating with Zowe API ML, see [Using Zowe CLI](https://docs.zowe.org/stable/user-guide/cli-using-usingcli/). +For detailed information about creating profiles, or integrating with Zowe API ML, see the documentation in the [Using Zowe CLI](https://docs.zowe.org/stable/user-guide/cli-using-usingcli/) section of Zowe Docs. -**Tip:** -- When you confirm that your profile connects to and communicates with your mainframe system successfully, you can issue the same command at any time to verify the availability and status of the z/OSMF subsystem on your mainframe. +**Tip:** When you confirm that your profile connects to and communicates with your mainframe system successfully, issue the same command at any time to verify the availability and status of the z/OSMF subsystem on your mainframe.
-## **Zowe Node Client SDK** +## Troubleshooting Zowe CLI + +If you try to use Zowe CLI functionality and you get an error message that Zowe CLI failed to load any profiles, try issuing the following commands: + +- `zowe config edit` to open your `~/.zowe/zowe.config.json` configuration file in your system's default text editor. Fix any properties with incorrect values. +- `zowe config secure` to have Zowe CLI prompt for your secure configuration properties in case your secure values are incorrect in your configuration. +- `zowe config report-env` to generate a report on the status of the key areas in your working environment. Address any problems indicated in the report. + +## Zowe Node Client SDK The Zowe Node Client SDK consists of APIs that enable you to build client applications that interface with the mainframe. Use the APIs to build your own client applications or automation scripts, independent of Zowe CLI. -For information about downloading and getting started with the SDK, see the [Zowe Docs](https://docs.zowe.org/stable/user-guide/sdks-using). To view the Zowe Node.js SDK doc, see [Zowe SDK Docs](https://docs.zowe.org/stable/typedoc/index.html). +For information about downloading and getting started with the SDK, see the [Zowe Docs](https://docs.zowe.org/stable/user-guide/sdks-using). To view the Zowe Node.js SDK doc, see [Using Zowe SDKs](https://docs.zowe.org/stable/typedoc/index.html). -**Tip:** -- Alternatively, you can import Zowe CLI into your project to call the Node APIs. However, importing all of Zowe CLI will increase the size of your project. For example, use the following statement to import packages from Zowe CLI: +Alternatively, import Zowe CLI into your project to call the Node APIs. However, importing all of Zowe CLI increases the size of your project. For example, use the following statement to import packages from Zowe CLI: ``` import { } from @zowe/cli ``` - Where `` is the name of an interface that you populate (i.e. `IIssueParms`) or a function that submits requests (i.e `IssueCommand`). + `` + - Name of an interface that you populate (i.e. `IIssueParms`), or a function that submits requests (i.e `IssueCommand`)
-### Example API Usage +### Example API usage -For example usage syntax, see the readme for each API package in this repository: +For example usage syntax, see the ReadMe for each API package in this repository: - [Provisioning](https://github.com/zowe/zowe-cli/tree/master/packages/provisioning): Provision middleware and resources such as IBM CICS, IBM Db2, IBM MQ, and more. - [z/OS Console](https://github.com/zowe/zowe-cli/tree/master/packages/zosconsole): Perform z/OS console operations. @@ -163,9 +170,11 @@ For example usage syntax, see the readme for each API package in this repository
-## **Running System Tests** +## Running system tests -In addition to Node.js, you must have a means to execute `.sh` (bash) scripts, which are required for running integration tests. On Windows, you can install "Git Bash" (bundled with the standard [Git](https://git-scm.com/downloads) installation - check "Use Git and Unix Tools from Windows Command Prompt" installation option). +In addition to Node.js, you must have a means to execute `.sh` (bash) scripts, which are required for running integration tests. + +On Windows, install "Git Bash", which is bundled with the standard [Git](https://git-scm.com/downloads) installation. Select the installation option **Use Git and Unix Tools from Windows Command Prompt**. After downloading/installing the prerequisites, ensure that you can execute the following commands and receive success responses: @@ -175,11 +184,11 @@ After downloading/installing the prerequisites, ensure that you can execute the 3. On Windows: `where sh` ``` -To run Zowe CLI system tests, you need a configured properties file with proper system information present. +To run Zowe CLI system tests, you need a configured properties file populated with proper system information. -A dummy properties file is present in the `__tests__/__resources__/properties folder`, `default_properties.yaml`. Using this file as a template, you should create a `custom_properties.yaml` file within the same directory. Git is configured to ignore all properties files in the properties folder, except for the `default_properties.yaml` file. If the `custom_properties.yaml` file cannot be found or loaded, an error with relevant details will be thrown when attempting to run tests. +A dummy properties file is available in the `default_properties.yaml` file **[is this correct? I couldn't find it in the repo]** in the `__tests__/__resources__/properties` folder. Using this file as a template, you should create a `custom_properties.yaml` file within the same directory. Git is configured to ignore all properties files in the properties folder, except for the `default_properties.yaml` **[is this correct? I couldn't find it in the repo]** file. If the `custom_properties.yaml` file cannot be found or loaded, an error with relevant details displays when attempting to run tests. -You can then run the system tests by issuing the following command: +Run the system tests: ``` npm run test:system @@ -187,34 +196,38 @@ npm run test:system
-**IMPORTANT!** Do not commit configured properties files because they contain security principles and other critical information. +**IMPORTANT!** Do not commit configured properties files to your repository **[is "to your repo" correct here?]** because they contain security principles and other critical information.
-## **Frequently Asked Questions** +## **Frequently asked questions** -**How can I install Zowe CLI as a root user on Mac/Linux?** +### How can I install Zowe CLI as a root user on Mac/Linux? - - You can install the CLI as root so that all users can access the CLI without installing it individually on their user account. As the root user on Mac/Linux, issue the following command: + - Install the CLI as root so that all users can access the CLI without installing it individually on their user account. As the root user on Mac/Linux, issue the following command: ``` npm i -g @zowe/cli@latest --ignore-scripts ``` **WARNING!** If you use this method, plug-ins that are installed as root can only be accessed as root. Users must install plug-ins on their user account or share all profiles/plugins/settings/logs with root. You also might encounter npm errors if you install as root. We recommend that Linux administrators implement a user/group environment where permissions can be more carefully controlled. -**What is the difference between V1 and V2?** +### What is the difference between Zowe V2 and V3? + + - V3 deprecates support for Zowe V1 profiles. + + - To updgrade from an older Zowe release, see [Migrating from Zowe Vx to Zowe V3](https://docs.zowe.org/stable/whats-new/zowe-v3-migratio3). - - V2 uses **team profiles** and **deprecates the Secure Credential Store** (SCS) plug-in. + - V2 uses **team profiles** and **deprecates the Secure Credential Store** (SCS) plug-in used in Zowe V1. - Connection details can be managed efficiently within one file, promoting a global configuration that can be shared across teams and mainframe services. For more information on how to use profiles, visit [Zowe Docs](https://docs.zowe.org/stable/user-guide/cli-using-using-team-profiles/). + - Connection details can be managed efficiently within one file, promoting a global configuration that can be shared across teams and mainframe services. For more information on how to use profiles, see [Team configurations](https://docs.zowe.org/stable/user-guide/cli-using-using-team-profiles/) in Zowe Docs. - Secure credential encryption is included in the core CLI. + - Secure credential encryption is included in the core CLI.
Don't see what you're looking for? Browse questions from the community or ask your own in the [Q&A section](https://github.com/zowe/zowe-cli/discussions/categories/q-a) of our repo. -## **Project Structure and Governance** +## **Project structure and governance** Zowe CLI is a component of the Zowe Open Mainframe Project, part of the Linux Foundation. From 2c8783c596060fc772120a7981bf9a7ca57222ed Mon Sep 17 00:00:00 2001 From: Pujal Date: Wed, 11 Dec 2024 16:09:42 -0500 Subject: [PATCH 12/52] updated copy pds functionality and system tests Signed-off-by: Pujal --- .../methods/copy/Copy.system.test.ts | 58 ++++++++++++- .../__unit__/methods/copy/Copy.unit.test.ts | 71 ++++++++++++++- packages/zosfiles/src/methods/copy/Copy.ts | 86 ++++++++++++++++++- 3 files changed, 208 insertions(+), 7 deletions(-) diff --git a/packages/zosfiles/__tests__/__system__/methods/copy/Copy.system.test.ts b/packages/zosfiles/__tests__/__system__/methods/copy/Copy.system.test.ts index 312fd5dd0b..3b7c47bc42 100644 --- a/packages/zosfiles/__tests__/__system__/methods/copy/Copy.system.test.ts +++ b/packages/zosfiles/__tests__/__system__/methods/copy/Copy.system.test.ts @@ -10,14 +10,18 @@ */ import { Create, Upload, Delete, CreateDataSetTypeEnum, Copy, ZosFilesMessages, Get, IDataSet, - ICrossLparCopyDatasetOptions, IGetOptions, IZosFilesResponse } from "../../../../src"; -import { Imperative, Session } from "@zowe/imperative"; + ICrossLparCopyDatasetOptions, IGetOptions, IZosFilesResponse, + ZosFilesUtils} from "../../../../src"; +import { Imperative, IO, Session } from "@zowe/imperative"; import { inspect } from "util"; import { TestEnvironment } from "../../../../../../__tests__/__src__/environment/TestEnvironment"; import { ITestPropertiesSchema } from "../../../../../../__tests__/__src__/properties/ITestPropertiesSchema"; import { join } from "path"; import { readFileSync } from "fs"; import { ITestEnvironment } from "../../../../../../__tests__/__src__/environment/ITestEnvironment"; +import { tmpdir } from "os"; +import path = require("path"); +import * as fs from "fs"; let REAL_SESSION: Session; let REAL_TARGET_SESSION: Session; @@ -98,6 +102,56 @@ describe("Copy", () => { expect(contents1.toString()).toEqual(contents2.toString()); }); }); + describe("Partioned > Partioned", () => { + beforeEach(async () => { + try { + const downloadDir = path.join(tmpdir(), fromDataSetName); + fs.mkdirSync(downloadDir, { recursive: true }); + const mockFile = path.join(downloadDir, "mockFile.txt"); + fs.writeFileSync(mockFile, "test file content"); + + const uploadFileList: string[] = ZosFilesUtils.getFileListFromPath(downloadDir); + const stream = IO.createReadStream(uploadFileList[0]); + await Create.dataSet(REAL_SESSION, CreateDataSetTypeEnum.DATA_SET_SEQUENTIAL, fromDataSetName); + await Create.dataSet(REAL_SESSION, CreateDataSetTypeEnum.DATA_SET_SEQUENTIAL, toDataSetName); + await Upload.streamToDataSet(REAL_SESSION, stream, fromDataSetName); + } catch (err) { + Imperative.console.info(`Error: ${inspect(err)}`); + } + }); + it("Should copy a partitioned data set", async () => { + let error; + let response; + let contents1; + let contents2; + + try { + response = await Copy.dataSet( + REAL_SESSION, + {dsn: toDataSetName}, + {"from-dataset": { + dsn:fromDataSetName + }} + ); + contents1 = await Get.dataSet(REAL_SESSION, fromDataSetName); + contents2 = await Get.dataSet(REAL_SESSION, toDataSetName); + Imperative.console.info(`Response: ${inspect(response)}`); + } catch (err) { + error = err; + Imperative.console.info(`Error: ${inspect(err)}`); + } + + expect(error).toBeFalsy(); + + expect(response).toBeTruthy(); + expect(response.success).toBe(true); + expect(response.commandResponse).toContain(ZosFilesMessages.datasetCopiedSuccessfully.message); + + expect(contents1).toBeTruthy(); + expect(contents2).toBeTruthy(); + expect(contents1.toString()).toEqual(contents2.toString()); + }); + }); describe("Member > Member", () => { beforeEach(async () => { try { diff --git a/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts b/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts index d3413f7860..938a36e9c4 100644 --- a/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts +++ b/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts @@ -11,11 +11,13 @@ import { Session, ImperativeError } from "@zowe/imperative"; import { posix } from "path"; - +import * as fs from "fs"; import { error } from "console"; -import { Copy, Create, Get, List, Upload, ZosFilesConstants, ZosFilesMessages, IZosFilesResponse } from "../../../../src"; +import { Copy, Create, Get, List, Upload, ZosFilesConstants, ZosFilesMessages, IZosFilesResponse, Download, ZosFilesUtils } from "../../../../src"; import { ZosmfHeaders, ZosmfRestClient } from "@zowe/core-for-zowe-sdk"; +import { tmpdir } from "os"; +import path = require("path"); describe("Copy", () => { const dummySession = new Session({ @@ -29,6 +31,8 @@ describe("Copy", () => { describe("Data Set", () => { const copyExpectStringSpy = jest.spyOn(ZosmfRestClient, "putExpectString"); + let copyPDSSpy = jest.spyOn(Copy, "copyPDS"); + let isPDSSpy: jest.SpyInstance; const fromDataSetName = "USER.DATA.FROM"; const fromMemberName = "mem1"; const toDataSetName = "USER.DATA.TO"; @@ -39,6 +43,12 @@ describe("Copy", () => { copyExpectStringSpy.mockImplementation(async () => { return ""; }); + copyPDSSpy.mockClear(); + copyPDSSpy = jest.spyOn(Copy, "copyPDS").mockResolvedValue({ + success:true, + commandResponse: ZosFilesMessages.datasetCopiedSuccessfully.message, + }); + isPDSSpy = jest.spyOn(Copy as any, "isPDS").mockResolvedValue(true); }); describe("Success Scenarios", () => { @@ -438,6 +448,28 @@ describe("Copy", () => { expect(lastArgumentOfCall).toHaveProperty("replace", false); }); }); + describe("Partitioned > Partitioned", () => { + it("should call copyPDS to copy members of source PDS to target PDS", async () => { + const response = await Copy.dataSet( + dummySession, + {dsn: toDataSetName}, + {"from-dataset": { + dsn:fromDataSetName + }} + ); + expect(isPDSSpy).toHaveBeenCalledTimes(2); + expect(isPDSSpy).toHaveBeenNthCalledWith(1, dummySession, fromDataSetName); + expect(isPDSSpy).toHaveBeenNthCalledWith(2, dummySession, toDataSetName); + + expect(copyPDSSpy).toHaveBeenCalledTimes(1); + expect(copyPDSSpy).toHaveBeenCalledWith(dummySession, fromDataSetName, toDataSetName); + + expect(response).toEqual({ + success: true, + commandResponse: ZosFilesMessages.datasetCopiedSuccessfully.message + }); + }); + }); }); describe("Failure Scenarios", () => { it("should fail if the zOSMF REST client fails", async () => { @@ -515,6 +547,41 @@ describe("Copy", () => { }); }); + describe("Copy Partitioned Data Set", () => { + const listAllMembersSpy = jest.spyOn(List, "allMembers"); + const downloadAllMembersSpy = jest.spyOn(Download, "allMembers"); + const uploadSpy = jest.spyOn(Upload, "streamToDataSet"); + const fileListPathSpy = jest.spyOn(ZosFilesUtils, "getFileListFromPath"); + const fromDataSetName = "USER.DATA.FROM"; + const toDataSetName = "USER.DATA.TO"; + it("should successfully copy members from source to target PDS", async () => { + // listAllMembersSpy.mockImplementation(async (): Promise => ({ + // apiResponse: { + // items: [ + // {member: "mem1"}, + // {member: "mem2"} + // ] + // } + // })); + // downloadAllMembersSpy.mockImplementation(async (): Promise => undefined); + + // uploadSpy.mockImplementation(async (): Promise => undefined); + + // const response = await Copy.copyPDS(dummySession, fromDataSetName, toDataSetName); + // // const downloadDir = path.join(tmpdir(), fromDataSetName); + // expect(listAllMembersSpy).toHaveBeenCalledWith(dummySession, fromDataSetName); + // expect(downloadAllMembersSpy).toHaveBeenCalled(); + // // expect(fileListPathSpy).toHaveBeenCalledWith(path.join(tmpdir(), fromDataSetName)); + // expect(uploadSpy).toHaveBeenCalledTimes(2); + + // // expect(fs.rmSync).toHaveBeenCalled(); + // expect(response).toEqual({ + // success: true, + // commandResponse: ZosFilesMessages.datasetCopiedSuccessfully.message, + // }); + }); + }); + describe("Data Set Cross LPAR", () => { const getDatasetSpy = jest.spyOn(Get, "dataSet"); const listDatasetSpy = jest.spyOn(List, "dataSet"); diff --git a/packages/zosfiles/src/methods/copy/Copy.ts b/packages/zosfiles/src/methods/copy/Copy.ts index 2f29a329c0..0b7e9f84f9 100644 --- a/packages/zosfiles/src/methods/copy/Copy.ts +++ b/packages/zosfiles/src/methods/copy/Copy.ts @@ -9,10 +9,10 @@ * */ -import { AbstractSession, ImperativeError, ImperativeExpect, ITaskWithStatus, Logger, Headers, - IHeaderContent, TaskStage } from "@zowe/imperative"; +import { AbstractSession, ImperativeError, ImperativeExpect, ITaskWithStatus, + Logger, Headers, IHeaderContent, TaskStage, IO} from "@zowe/imperative"; import { posix } from "path"; - +import * as fs from "fs"; import { Create, CreateDataSetTypeEnum, ICreateDataSetOptions } from "../create"; import { Get } from "../get"; import { Upload } from "../upload"; @@ -26,6 +26,10 @@ import { IZosmfListResponse } from "../list/doc/IZosmfListResponse"; import { IDataSet } from "../../doc/IDataSet"; import { ICopyDatasetOptions } from "./doc/ICopyDatasetOptions"; import { ICrossLparCopyDatasetOptions } from "./doc/ICrossLparCopyDatasetOptions"; +import { Download } from "../download"; +import { ZosFilesUtils } from "../../utils/ZosFilesUtils"; +import { tmpdir } from "os"; +import path = require("path"); /** * This class holds helper functions that are used to copy the contents of datasets through the * z/OSMF APIs. @@ -53,6 +57,12 @@ export class Copy { ImperativeExpect.toBeDefinedAndNonBlank(options["from-dataset"].dsn, "fromDataSetName"); ImperativeExpect.toBeDefinedAndNonBlank(toDataSetName, "toDataSetName"); + const sourceIsPds = await Copy.isPDS(session, options["from-dataset"].dsn); + const targetIsPds = await Copy.isPDS(session, toDataSetName); + + if(sourceIsPds && targetIsPds) { + return await Copy.copyPDS(session, options["from-dataset"].dsn, toDataSetName); + } const endpoint: string = posix.join( ZosFilesConstants.RESOURCE, ZosFilesConstants.RES_DS_FILES, @@ -93,6 +103,76 @@ export class Copy { } } + /** + * Private function that checks if a dataset is type PDS + **/ + private static async isPDS( + session: AbstractSession, + dataSetName: string + ): Promise { + try { + const response = await List.dataSet(session, dataSetName, {attributes: true}); + const dsntp = response.apiResponse.items[0].dsntp; + const dsorg = response.apiResponse.items[0].dsorg; + return dsntp === "PDS" && dsorg === "PO"; + } + catch(error) { + Logger.getAppLogger().error(error); + throw error; + } + } + + /** + * Copy the members of a Partitioned dataset into another Partitioned dataset + * + * @param {AbstractSession} session - z/OSMF connection info + * @param {IDataSet} toDataSet - The data set to copy to + * @param {IDataSetOptions} options - Options + * + * @returns {Promise} A response indicating the status of the copying + * + * @throws {ImperativeError} Data set name must be specified as a non-empty string + * @throws {Error} When the {@link ZosmfRestClient} throws an error + * + * @see https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.izua700/IZUHPINFO_API_PutDataSetMemberUtilities.htm + */ + + public static async copyPDS ( + session: AbstractSession, + fromPds: string, + toPds: string + ): Promise { + try { + const sourceResponse = await List.allMembers(session, fromPds); + const sourceMemberList: Array<{ member: string }> = sourceResponse.apiResponse.items; + + if(sourceMemberList.length == 0) { + return { + success: false, + commandResponse: `Source dataset (${fromPds}) - ` + ZosFilesMessages.noMembersFound.message + }; + } + + const downloadDir = path.join(tmpdir(), fromPds); + await Download.allMembers(session, fromPds, {directory:downloadDir}); + const uploadFileList: string[] = ZosFilesUtils.getFileListFromPath(downloadDir); + + for (const file of uploadFileList) { + const uploadingDsn = `${toPds}(${ZosFilesUtils.generateMemberName(file)})`; + const uploadStream = IO.createReadStream(file); + await Upload.streamToDataSet(session, uploadStream, uploadingDsn); + } + fs.rmSync(downloadDir, {recursive: true}); + return { + success:true, + commandResponse: ZosFilesMessages.datasetCopiedSuccessfully.message + }; + } + catch (error) { + Logger.getAppLogger().error(error); + throw error; + } + } /** * Copy the contents of a dataset from one LPAR to another LPAR From cd8057014b12d72c94cebd3262be1b1f21b871d5 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Thu, 12 Dec 2024 07:30:48 -0500 Subject: [PATCH 13/52] unused var Signed-off-by: jace-roell --- .../src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts b/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts index 4f0d2b9cac..f6c599ee2e 100644 --- a/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts +++ b/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts @@ -38,7 +38,6 @@ const testEnvPrefix = testAppNm.toUpperCase(); const profileTypes = ["zosmf", "tso", "base", "dummy"]; const testDir = path.join(__dirname, "__resources__"); const teamProjDir = path.join(testDir, testAppNm + "_team_config_proj"); -const teamProjBaseTest = path.join(testDir, testAppNm + "_team_config_proj_base"); function createNewProfInfo(newDir: string, opts?: IProfOpts): ProfileInfo { // create a new ProfileInfo in the desired directory From a24a5511b8928e9ba265ab5b67bca162dc4e671e Mon Sep 17 00:00:00 2001 From: jace-roell Date: Thu, 12 Dec 2024 08:59:20 -0500 Subject: [PATCH 14/52] coverage and proper mocking Signed-off-by: jace-roell --- .../config/__tests__/ProfileInfo.TeamConfig.unit.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts b/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts index f6c599ee2e..b28ccd720f 100644 --- a/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts +++ b/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts @@ -32,6 +32,7 @@ import { ConfigProfiles } from "../src/api"; import { IExtendersJsonOpts } from "../src/doc/IExtenderOpts"; import { ConfigSchema } from "../src/ConfigSchema"; import { Logger } from "../../logger/src/Logger"; +import { IProfLocOsLoc } from "@zowe/imperative"; const testAppNm = "ProfInfoApp"; const testEnvPrefix = testAppNm.toUpperCase(); @@ -960,6 +961,14 @@ describe("TeamConfig ProfileInfo tests", () => { const profInfo = createNewProfInfo(teamProjDir); await profInfo.readProfilesFromDisk(); + const mockResp: IProfLocOsLoc[] = [{ + global: true, + name: "LPAR1", + path: "/mocked/path/xyz", + user: true + }]; + jest.spyOn(ProfileInfo.prototype, "getOsLocInfo").mockReturnValue(mockResp); + // Simulate the condition where the active layer has no `defaults.base` but global and user layers exist const layerActive = profInfo.getTeamConfig().layerActive(); delete layerActive.properties.defaults.base; From 4c7779452e8fbf8d41a83b9b4f95a427161e4ce7 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Thu, 12 Dec 2024 09:29:11 -0500 Subject: [PATCH 15/52] consolidated code Signed-off-by: jace-roell --- .../config/__tests__/ProfileInfo.TeamConfig.unit.test.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts b/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts index b28ccd720f..1ed8dd659d 100644 --- a/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts +++ b/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts @@ -32,7 +32,6 @@ import { ConfigProfiles } from "../src/api"; import { IExtendersJsonOpts } from "../src/doc/IExtenderOpts"; import { ConfigSchema } from "../src/ConfigSchema"; import { Logger } from "../../logger/src/Logger"; -import { IProfLocOsLoc } from "@zowe/imperative"; const testAppNm = "ProfInfoApp"; const testEnvPrefix = testAppNm.toUpperCase(); @@ -961,13 +960,12 @@ describe("TeamConfig ProfileInfo tests", () => { const profInfo = createNewProfInfo(teamProjDir); await profInfo.readProfilesFromDisk(); - const mockResp: IProfLocOsLoc[] = [{ + jest.spyOn(ProfileInfo.prototype, "getOsLocInfo").mockReturnValue([{ global: true, name: "LPAR1", path: "/mocked/path/xyz", user: true - }]; - jest.spyOn(ProfileInfo.prototype, "getOsLocInfo").mockReturnValue(mockResp); + }]); // Simulate the condition where the active layer has no `defaults.base` but global and user layers exist const layerActive = profInfo.getTeamConfig().layerActive(); From 236d3813ec21cedcac64b903319a6ad4f0ef977c Mon Sep 17 00:00:00 2001 From: Pujal Date: Thu, 12 Dec 2024 10:05:11 -0500 Subject: [PATCH 16/52] updated system tests + unit test Signed-off-by: Pujal --- packages/zosfiles/CHANGELOG.md | 1 + .../__unit__/methods/copy/Copy.unit.test.ts | 68 +++++++++---------- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/packages/zosfiles/CHANGELOG.md b/packages/zosfiles/CHANGELOG.md index 3dff530c4f..788db8adb1 100644 --- a/packages/zosfiles/CHANGELOG.md +++ b/packages/zosfiles/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to the Zowe z/OS files SDK package will be documented in this file. ## Recent Changes +-Enhancement: `Copy.dataset` method now recognizes Partioned data sets and can copy members of source PDS into an existing target PDS. - Enhancement: Added a `List.membersMatchingPattern` method to download all members that match a specific pattern.[#2359](https://github.com/zowe/zowe-cli/pull/2359) diff --git a/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts b/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts index 938a36e9c4..aafe4f956d 100644 --- a/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts +++ b/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts @@ -547,40 +547,40 @@ describe("Copy", () => { }); }); - describe("Copy Partitioned Data Set", () => { - const listAllMembersSpy = jest.spyOn(List, "allMembers"); - const downloadAllMembersSpy = jest.spyOn(Download, "allMembers"); - const uploadSpy = jest.spyOn(Upload, "streamToDataSet"); - const fileListPathSpy = jest.spyOn(ZosFilesUtils, "getFileListFromPath"); - const fromDataSetName = "USER.DATA.FROM"; - const toDataSetName = "USER.DATA.TO"; - it("should successfully copy members from source to target PDS", async () => { - // listAllMembersSpy.mockImplementation(async (): Promise => ({ - // apiResponse: { - // items: [ - // {member: "mem1"}, - // {member: "mem2"} - // ] - // } - // })); - // downloadAllMembersSpy.mockImplementation(async (): Promise => undefined); - - // uploadSpy.mockImplementation(async (): Promise => undefined); - - // const response = await Copy.copyPDS(dummySession, fromDataSetName, toDataSetName); - // // const downloadDir = path.join(tmpdir(), fromDataSetName); - // expect(listAllMembersSpy).toHaveBeenCalledWith(dummySession, fromDataSetName); - // expect(downloadAllMembersSpy).toHaveBeenCalled(); - // // expect(fileListPathSpy).toHaveBeenCalledWith(path.join(tmpdir(), fromDataSetName)); - // expect(uploadSpy).toHaveBeenCalledTimes(2); - - // // expect(fs.rmSync).toHaveBeenCalled(); - // expect(response).toEqual({ - // success: true, - // commandResponse: ZosFilesMessages.datasetCopiedSuccessfully.message, - // }); - }); - }); + // describe("Copy Partitioned Data Set", () => { + // const listAllMembersSpy = jest.spyOn(List, "allMembers"); + // const downloadAllMembersSpy = jest.spyOn(Download, "allMembers"); + // const uploadSpy = jest.spyOn(Upload, "streamToDataSet"); + // const fileListPathSpy = jest.spyOn(ZosFilesUtils, "getFileListFromPath"); + // const fromDataSetName = "USER.DATA.FROM"; + // const toDataSetName = "USER.DATA.TO"; + // it("should successfully copy members from source to target PDS", async () => { + // listAllMembersSpy.mockImplementation(async (): Promise => ({ + // apiResponse: { + // items: [ + // {member: "mem1"}, + // {member: "mem2"} + // ] + // } + // })); + // downloadAllMembersSpy.mockImplementation(async (): Promise => undefined); + + // uploadSpy.mockImplementation(async (): Promise => undefined); + + // const response = await Copy.copyPDS(dummySession, fromDataSetName, toDataSetName); + // // const downloadDir = path.join(tmpdir(), fromDataSetName); + // expect(listAllMembersSpy).toHaveBeenCalledWith(dummySession, fromDataSetName); + // expect(downloadAllMembersSpy).toHaveBeenCalled(); + // // expect(fileListPathSpy).toHaveBeenCalledWith(path.join(tmpdir(), fromDataSetName)); + // expect(uploadSpy).toHaveBeenCalledTimes(2); + + // // expect(fs.rmSync).toHaveBeenCalled(); + // expect(response).toEqual({ + // success: true, + // commandResponse: ZosFilesMessages.datasetCopiedSuccessfully.message, + // }); + // }); + // }); describe("Data Set Cross LPAR", () => { const getDatasetSpy = jest.spyOn(Get, "dataSet"); From f189856573aab00bc02dc1c97307f6d7af6927e2 Mon Sep 17 00:00:00 2001 From: Pujal Date: Thu, 12 Dec 2024 10:06:41 -0500 Subject: [PATCH 17/52] updated changelog Signed-off-by: Pujal --- packages/zosfiles/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zosfiles/CHANGELOG.md b/packages/zosfiles/CHANGELOG.md index 788db8adb1..2c6e2ad594 100644 --- a/packages/zosfiles/CHANGELOG.md +++ b/packages/zosfiles/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to the Zowe z/OS files SDK package will be documented in this file. ## Recent Changes --Enhancement: `Copy.dataset` method now recognizes Partioned data sets and can copy members of source PDS into an existing target PDS. +-Enhancement: `Copy.dataset` method now recognizes Partioned data sets and can copy members of source PDS into an existing target PDS. [#2386](https://github.com/zowe/zowe-cli/pull/2386) - Enhancement: Added a `List.membersMatchingPattern` method to download all members that match a specific pattern.[#2359](https://github.com/zowe/zowe-cli/pull/2359) From 4687ae8e40374bf42aba68955a01ec508813388d Mon Sep 17 00:00:00 2001 From: anaxceron Date: Thu, 12 Dec 2024 14:16:22 -0500 Subject: [PATCH 18/52] removing file name question Signed-off-by: anaxceron --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f3e72a83b..9e650b2d4f 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,7 @@ Alternatively, import Zowe CLI into your project to call the Node APIs. However, ``` `` + - Name of an interface that you populate (i.e. `IIssueParms`), or a function that submits requests (i.e `IssueCommand`)
@@ -186,7 +187,7 @@ After downloading/installing the prerequisites, ensure that you can execute the To run Zowe CLI system tests, you need a configured properties file populated with proper system information. -A dummy properties file is available in the `default_properties.yaml` file **[is this correct? I couldn't find it in the repo]** in the `__tests__/__resources__/properties` folder. Using this file as a template, you should create a `custom_properties.yaml` file within the same directory. Git is configured to ignore all properties files in the properties folder, except for the `default_properties.yaml` **[is this correct? I couldn't find it in the repo]** file. If the `custom_properties.yaml` file cannot be found or loaded, an error with relevant details displays when attempting to run tests. +A dummy properties file is available in the `default_properties.yaml` file in the `__tests__/__resources__/properties` folder. Using this file as a template, you should create a `custom_properties.yaml` file within the same directory. Git is configured to ignore all properties files in the properties folder, except for the `default_properties.yaml` file. If the `custom_properties.yaml` file cannot be found or loaded, an error with relevant details displays when attempting to run tests. Run the system tests: @@ -209,6 +210,7 @@ npm run test:system ``` npm i -g @zowe/cli@latest --ignore-scripts ``` + **WARNING!** If you use this method, plug-ins that are installed as root can only be accessed as root. Users must install plug-ins on their user account or share all profiles/plugins/settings/logs with root. You also might encounter npm errors if you install as root. We recommend that Linux administrators implement a user/group environment where permissions can be more carefully controlled. ### What is the difference between Zowe V2 and V3? From 8760c26c19653b549e476960390a6d06f768d39b Mon Sep 17 00:00:00 2001 From: anaxceron Date: Thu, 12 Dec 2024 14:19:42 -0500 Subject: [PATCH 19/52] fixing formatting Signed-off-by: anaxceron --- README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9e650b2d4f..dc751cc189 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Zowe CLI + [![codecov](https://codecov.io/gh/zowe/zowe-cli/branch/master/graph/badge.svg)](https://codecov.io/gh/zowe/zowe-cli) [![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/7204/badge)](https://bestpractices.coreinfrastructure.org/projects/7204) @@ -9,6 +10,7 @@ This repository also contains the Zowe Node Client SDK. The SDK lets you leverag
## Content + - [Documentation](#documentation) - [Contribution guidelines](#contribution-guidelines) - [Building Zowe CLI from source](#building-zowe-cli-from-source) @@ -23,6 +25,7 @@ This repository also contains the Zowe Node Client SDK. The SDK lets you leverag
## Documentation + For information about how to install, configure, and use Zowe CLI, see [Zowe CLI Quick Start](https://docs.zowe.org/stable/getting-started/cli-getting-started/) documentation. For more detailed instructions, see [Zowe CLI](https://docs.zowe.org/stable/user-guide/cli-using-usingcli/) documentation, which also includes examples and tutorials for how to contribute to Zowe CLI and develop CLI plug-ins. Engineering design documentation is contained in the `docs` directory in this repository. To view the Web Help for all Zowe CLI commands and contributed plug-ins, see the [Zowe CLI Web Help](https://docs.zowe.org/stable/web_help/index.html). To view all locally accessible commands, run `zowe --help-web`. For more use cases and tutorials visit [Medium.com/zowe](https://medium.com/zowe). @@ -30,6 +33,7 @@ Engineering design documentation is contained in the `docs` directory in this re
## Contribution guidelines + The following information is critical to working with the code, running/writing/maintaining automated tests, developing consistent syntax in your plug-in, and ensuring that your plug-in integrates with Zowe CLI properly: | For more information about | Go to | @@ -96,13 +100,15 @@ From your copy of this repository, after a build, navigate to the `packages/cli` npm install -g ``` -**Notes:** +**Notes:** + - Depending on how you configured npm on Linux or Mac, you might need to prefix the `npm install -g` command or the `npm uninstall -g` command with `sudo` to let npm have write access to the installation directory. - On Windows, the `npm install -g` command might fail several times due to an `EPERM` error. This appears to be a bug that npm documented in their GitHub issues. This behaviour does not appear to be specific to installing the Zowe CLI package. Unfortunately, the only solution that we know of is to issue the `npm cache clean` command and the `npm install -g` command repeatedly until it works.
## Uninstalling Zowe CLI + From your local copy of this repository, to uninstall Zowe CLI: ``` @@ -150,7 +156,7 @@ Alternatively, import Zowe CLI into your project to call the Node APIs. However, ``` `` - + - Name of an interface that you populate (i.e. `IIssueParms`), or a function that submits requests (i.e `IssueCommand`)
@@ -201,7 +207,7 @@ npm run test:system
-## **Frequently asked questions** +## Frequently asked questions ### How can I install Zowe CLI as a root user on Mac/Linux? @@ -229,7 +235,7 @@ npm run test:system Don't see what you're looking for? Browse questions from the community or ask your own in the [Q&A section](https://github.com/zowe/zowe-cli/discussions/categories/q-a) of our repo. -## **Project structure and governance** +## Project structure and governance Zowe CLI is a component of the Zowe Open Mainframe Project, part of the Linux Foundation. From 39b8da2d8cbfcaf002c74e38de0202a673997720 Mon Sep 17 00:00:00 2001 From: anaxceron Date: Thu, 12 Dec 2024 14:23:32 -0500 Subject: [PATCH 20/52] editing "important" message per review feedback Signed-off-by: anaxceron --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dc751cc189..ca07245ec6 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ npm run test:system
-**IMPORTANT!** Do not commit configured properties files to your repository **[is "to your repo" correct here?]** because they contain security principles and other critical information. +**IMPORTANT!** Do not commit configured properties files to this repository because they contain security principles and other critical information.
From 5e1b416a43a12f0a04a0eb4509b94bda7974ac5d Mon Sep 17 00:00:00 2001 From: Pujal Date: Thu, 12 Dec 2024 15:01:18 -0500 Subject: [PATCH 21/52] updated unit tests Signed-off-by: Pujal --- .../methods/copy/Copy.system.test.ts | 6 +- .../__unit__/methods/copy/Copy.unit.test.ts | 101 ++++++++++-------- packages/zosfiles/src/methods/copy/Copy.ts | 11 +- 3 files changed, 68 insertions(+), 50 deletions(-) diff --git a/packages/zosfiles/__tests__/__system__/methods/copy/Copy.system.test.ts b/packages/zosfiles/__tests__/__system__/methods/copy/Copy.system.test.ts index 3b7c47bc42..a91ee75683 100644 --- a/packages/zosfiles/__tests__/__system__/methods/copy/Copy.system.test.ts +++ b/packages/zosfiles/__tests__/__system__/methods/copy/Copy.system.test.ts @@ -103,9 +103,10 @@ describe("Copy", () => { }); }); describe("Partioned > Partioned", () => { + let downloadDir: string; beforeEach(async () => { try { - const downloadDir = path.join(tmpdir(), fromDataSetName); + downloadDir = path.join(tmpdir(), fromDataSetName); fs.mkdirSync(downloadDir, { recursive: true }); const mockFile = path.join(downloadDir, "mockFile.txt"); fs.writeFileSync(mockFile, "test file content"); @@ -151,6 +152,9 @@ describe("Copy", () => { expect(contents2).toBeTruthy(); expect(contents1.toString()).toEqual(contents2.toString()); }); + afterEach(() => { + fs.rmSync(downloadDir, { recursive: true, force: true }); + }); }); describe("Member > Member", () => { beforeEach(async () => { diff --git a/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts b/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts index aafe4f956d..df53897966 100644 --- a/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts +++ b/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts @@ -9,7 +9,7 @@ * */ -import { Session, ImperativeError } from "@zowe/imperative"; +import { Session, ImperativeError, IO } from "@zowe/imperative"; import { posix } from "path"; import * as fs from "fs"; import { error } from "console"; @@ -31,24 +31,18 @@ describe("Copy", () => { describe("Data Set", () => { const copyExpectStringSpy = jest.spyOn(ZosmfRestClient, "putExpectString"); - let copyPDSSpy = jest.spyOn(Copy, "copyPDS"); - let isPDSSpy: jest.SpyInstance; const fromDataSetName = "USER.DATA.FROM"; const fromMemberName = "mem1"; const toDataSetName = "USER.DATA.TO"; const toMemberName = "mem2"; + let isPDSSpy: jest.SpyInstance; beforeEach(() => { copyExpectStringSpy.mockClear(); copyExpectStringSpy.mockImplementation(async () => { return ""; }); - copyPDSSpy.mockClear(); - copyPDSSpy = jest.spyOn(Copy, "copyPDS").mockResolvedValue({ - success:true, - commandResponse: ZosFilesMessages.datasetCopiedSuccessfully.message, - }); - isPDSSpy = jest.spyOn(Copy as any, "isPDS").mockResolvedValue(true); + isPDSSpy = jest.spyOn(Copy as any, "isPDS").mockResolvedValue(false); }); describe("Success Scenarios", () => { @@ -449,6 +443,18 @@ describe("Copy", () => { }); }); describe("Partitioned > Partitioned", () => { + let copyPDSSpy = jest.spyOn(Copy, "copyPDS"); + beforeEach(() => { + copyPDSSpy.mockClear(); + copyPDSSpy = jest.spyOn(Copy, "copyPDS").mockResolvedValue({ + success:true, + commandResponse: ZosFilesMessages.datasetCopiedSuccessfully.message, + }); + isPDSSpy = jest.spyOn(Copy as any, "isPDS").mockResolvedValue(true); + }); + afterEach(() => { + copyPDSSpy.mockRestore(); + }) it("should call copyPDS to copy members of source PDS to target PDS", async () => { const response = await Copy.dataSet( dummySession, @@ -457,7 +463,6 @@ describe("Copy", () => { dsn:fromDataSetName }} ); - expect(isPDSSpy).toHaveBeenCalledTimes(2); expect(isPDSSpy).toHaveBeenNthCalledWith(1, dummySession, fromDataSetName); expect(isPDSSpy).toHaveBeenNthCalledWith(2, dummySession, toDataSetName); @@ -547,40 +552,48 @@ describe("Copy", () => { }); }); - // describe("Copy Partitioned Data Set", () => { - // const listAllMembersSpy = jest.spyOn(List, "allMembers"); - // const downloadAllMembersSpy = jest.spyOn(Download, "allMembers"); - // const uploadSpy = jest.spyOn(Upload, "streamToDataSet"); - // const fileListPathSpy = jest.spyOn(ZosFilesUtils, "getFileListFromPath"); - // const fromDataSetName = "USER.DATA.FROM"; - // const toDataSetName = "USER.DATA.TO"; - // it("should successfully copy members from source to target PDS", async () => { - // listAllMembersSpy.mockImplementation(async (): Promise => ({ - // apiResponse: { - // items: [ - // {member: "mem1"}, - // {member: "mem2"} - // ] - // } - // })); - // downloadAllMembersSpy.mockImplementation(async (): Promise => undefined); - - // uploadSpy.mockImplementation(async (): Promise => undefined); - - // const response = await Copy.copyPDS(dummySession, fromDataSetName, toDataSetName); - // // const downloadDir = path.join(tmpdir(), fromDataSetName); - // expect(listAllMembersSpy).toHaveBeenCalledWith(dummySession, fromDataSetName); - // expect(downloadAllMembersSpy).toHaveBeenCalled(); - // // expect(fileListPathSpy).toHaveBeenCalledWith(path.join(tmpdir(), fromDataSetName)); - // expect(uploadSpy).toHaveBeenCalledTimes(2); - - // // expect(fs.rmSync).toHaveBeenCalled(); - // expect(response).toEqual({ - // success: true, - // commandResponse: ZosFilesMessages.datasetCopiedSuccessfully.message, - // }); - // }); - // }); + describe("Copy Partitioned Data Set", () => { + const listAllMembersSpy = jest.spyOn(List, "allMembers"); + const downloadAllMembersSpy = jest.spyOn(Download, "allMembers"); + const uploadSpy = jest.spyOn(Upload, "streamToDataSet"); + const fileListPathSpy = jest.spyOn(ZosFilesUtils, "getFileListFromPath"); + const generateMemName = jest.spyOn(ZosFilesUtils, "generateMemberName"); + const fromDataSetName = "USER.DATA.FROM"; + const toDataSetName = "USER.DATA.TO"; + const readStream = jest.spyOn(IO, "createReadStream"); + const rmSync = jest.spyOn(fs, "rmSync"); + + it("should successfully copy members from source to target PDS", async () => { + const sourceResponse = { + apiResponse: { + items: [ + { member: "mem1" }, + { member: "mem2" }, + ] + } + }; + const fileList = ["mem1", "mem2"]; + + listAllMembersSpy.mockImplementation(async (): Promise => (sourceResponse)); + downloadAllMembersSpy.mockImplementation(async (): Promise => (undefined)); + fileListPathSpy.mockReturnValue(fileList); + generateMemName.mockReturnValue("mem1"); + readStream.mockReturnValue("test" as any); + uploadSpy.mockResolvedValue(undefined); + rmSync.mockImplementation(jest.fn()); + + const response = await Copy.copyPDS(dummySession, fromDataSetName, toDataSetName); + expect(listAllMembersSpy).toHaveBeenCalledWith(dummySession, fromDataSetName); + expect(downloadAllMembersSpy).toHaveBeenCalledWith(dummySession, fromDataSetName, expect.any(Object)); + expect(fileListPathSpy).toHaveBeenCalled(); + expect(uploadSpy).toHaveBeenCalledTimes(fileList.length); + expect(rmSync).toHaveBeenCalled(); + expect(response).toEqual({ + success: true, + commandResponse: ZosFilesMessages.datasetCopiedSuccessfully.message, + }); + }); + }); describe("Data Set Cross LPAR", () => { const getDatasetSpy = jest.spyOn(Get, "dataSet"); diff --git a/packages/zosfiles/src/methods/copy/Copy.ts b/packages/zosfiles/src/methods/copy/Copy.ts index 0b7e9f84f9..98ad3e22d6 100644 --- a/packages/zosfiles/src/methods/copy/Copy.ts +++ b/packages/zosfiles/src/methods/copy/Copy.ts @@ -57,12 +57,12 @@ export class Copy { ImperativeExpect.toBeDefinedAndNonBlank(options["from-dataset"].dsn, "fromDataSetName"); ImperativeExpect.toBeDefinedAndNonBlank(toDataSetName, "toDataSetName"); - const sourceIsPds = await Copy.isPDS(session, options["from-dataset"].dsn); - const targetIsPds = await Copy.isPDS(session, toDataSetName); - - if(sourceIsPds && targetIsPds) { - return await Copy.copyPDS(session, options["from-dataset"].dsn, toDataSetName); + const sourceIsPds = await this.isPDS(session, options["from-dataset"].dsn); + const targetIsPds = await this.isPDS(session, toDataSetName); + if (sourceIsPds && targetIsPds) { + return await this.copyPDS(session, options["from-dataset"].dsn, toDataSetName); } + const endpoint: string = posix.join( ZosFilesConstants.RESOURCE, ZosFilesConstants.RES_DS_FILES, @@ -115,6 +115,7 @@ export class Copy { const dsntp = response.apiResponse.items[0].dsntp; const dsorg = response.apiResponse.items[0].dsorg; return dsntp === "PDS" && dsorg === "PO"; + // return response; } catch(error) { Logger.getAppLogger().error(error); From 8e1a82810e98b8496689967345aca0bd9308e432 Mon Sep 17 00:00:00 2001 From: Pujal Date: Thu, 12 Dec 2024 15:11:14 -0500 Subject: [PATCH 22/52] fixed lint errors Signed-off-by: Pujal --- .../__system__/methods/copy/Copy.system.test.ts | 2 +- .../__unit__/methods/copy/Copy.unit.test.ts | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/zosfiles/__tests__/__system__/methods/copy/Copy.system.test.ts b/packages/zosfiles/__tests__/__system__/methods/copy/Copy.system.test.ts index a91ee75683..893b40f268 100644 --- a/packages/zosfiles/__tests__/__system__/methods/copy/Copy.system.test.ts +++ b/packages/zosfiles/__tests__/__system__/methods/copy/Copy.system.test.ts @@ -10,7 +10,7 @@ */ import { Create, Upload, Delete, CreateDataSetTypeEnum, Copy, ZosFilesMessages, Get, IDataSet, - ICrossLparCopyDatasetOptions, IGetOptions, IZosFilesResponse, + ICrossLparCopyDatasetOptions, IGetOptions, IZosFilesResponse, ZosFilesUtils} from "../../../../src"; import { Imperative, IO, Session } from "@zowe/imperative"; import { inspect } from "util"; diff --git a/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts b/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts index df53897966..b3e4f9fc46 100644 --- a/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts +++ b/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts @@ -16,7 +16,6 @@ import { error } from "console"; import { Copy, Create, Get, List, Upload, ZosFilesConstants, ZosFilesMessages, IZosFilesResponse, Download, ZosFilesUtils } from "../../../../src"; import { ZosmfHeaders, ZosmfRestClient } from "@zowe/core-for-zowe-sdk"; -import { tmpdir } from "os"; import path = require("path"); describe("Copy", () => { @@ -454,7 +453,7 @@ describe("Copy", () => { }); afterEach(() => { copyPDSSpy.mockRestore(); - }) + }); it("should call copyPDS to copy members of source PDS to target PDS", async () => { const response = await Copy.dataSet( dummySession, @@ -566,16 +565,16 @@ describe("Copy", () => { it("should successfully copy members from source to target PDS", async () => { const sourceResponse = { apiResponse: { - items: [ - { member: "mem1" }, - { member: "mem2" }, - ] + items: [ + { member: "mem1" }, + { member: "mem2" }, + ] } }; const fileList = ["mem1", "mem2"]; - listAllMembersSpy.mockImplementation(async (): Promise => (sourceResponse)); - downloadAllMembersSpy.mockImplementation(async (): Promise => (undefined)); + listAllMembersSpy.mockImplementation(async (): Promise => sourceResponse); + downloadAllMembersSpy.mockImplementation(async (): Promise => undefined); fileListPathSpy.mockReturnValue(fileList); generateMemName.mockReturnValue("mem1"); readStream.mockReturnValue("test" as any); From a4972b1c01201f80fa91126511aee0d44659917c Mon Sep 17 00:00:00 2001 From: Pujal Date: Thu, 12 Dec 2024 16:50:06 -0500 Subject: [PATCH 23/52] updates for code coverage Signed-off-by: Pujal --- .../__unit__/methods/copy/Copy.unit.test.ts | 43 ++++++++++++++++++- packages/zosfiles/src/methods/copy/Copy.ts | 6 +-- 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts b/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts index b3e4f9fc46..6568444356 100644 --- a/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts +++ b/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts @@ -43,7 +43,9 @@ describe("Copy", () => { }); isPDSSpy = jest.spyOn(Copy as any, "isPDS").mockResolvedValue(false); }); - + afterAll(() => { + isPDSSpy.mockRestore(); + }); describe("Success Scenarios", () => { describe("Sequential > Sequential", () => { it("should send a request", async () => { @@ -451,8 +453,9 @@ describe("Copy", () => { }); isPDSSpy = jest.spyOn(Copy as any, "isPDS").mockResolvedValue(true); }); - afterEach(() => { + afterAll(() => { copyPDSSpy.mockRestore(); + isPDSSpy.mockRestore(); }); it("should call copyPDS to copy members of source PDS to target PDS", async () => { const response = await Copy.dataSet( @@ -561,6 +564,42 @@ describe("Copy", () => { const toDataSetName = "USER.DATA.TO"; const readStream = jest.spyOn(IO, "createReadStream"); const rmSync = jest.spyOn(fs, "rmSync"); + const listDatasetSpy = jest.spyOn(List, "dataSet"); + + const dsPO = { + dsname: fromDataSetName, + dsorg: "PO", + }; + const dsPS = { + dsname: fromDataSetName, + dsorg: "PS", + }; + + it("should detect PDS datasets correctly during copy", async () => { + listDatasetSpy.mockImplementation(async (): Promise => { + return { + apiResponse: { + items: [dsPO] + } + }; + }); + const response = await Copy.isPDS(dummySession, dsPO.dsname); + expect(response).toEqual(true); + expect(listDatasetSpy).toHaveBeenCalledWith(dummySession, dsPO.dsname, { attributes: true }); + }); + + it("should return false if the data set is not partitioned", async () => { + listDatasetSpy.mockImplementation(async (): Promise => { + return { + apiResponse: { + items: [dsPS] + } + }; + }); + const response = await Copy.isPDS(dummySession, dsPS.dsname); + expect(response).toEqual(false); + expect(listDatasetSpy).toHaveBeenCalledWith(dummySession, dsPS.dsname, { attributes: true }); + }); it("should successfully copy members from source to target PDS", async () => { const sourceResponse = { diff --git a/packages/zosfiles/src/methods/copy/Copy.ts b/packages/zosfiles/src/methods/copy/Copy.ts index 98ad3e22d6..61b8e07fd0 100644 --- a/packages/zosfiles/src/methods/copy/Copy.ts +++ b/packages/zosfiles/src/methods/copy/Copy.ts @@ -106,16 +106,14 @@ export class Copy { /** * Private function that checks if a dataset is type PDS **/ - private static async isPDS( + public static async isPDS( session: AbstractSession, dataSetName: string ): Promise { try { const response = await List.dataSet(session, dataSetName, {attributes: true}); - const dsntp = response.apiResponse.items[0].dsntp; const dsorg = response.apiResponse.items[0].dsorg; - return dsntp === "PDS" && dsorg === "PO"; - // return response; + return dsorg === "POE" || dsorg === "PO"; } catch(error) { Logger.getAppLogger().error(error); From fcde3f12f6f0cb2c5b2eab929e056d53f1580a62 Mon Sep 17 00:00:00 2001 From: Pujal Date: Fri, 13 Dec 2024 09:07:38 -0500 Subject: [PATCH 24/52] removed unused import Signed-off-by: Pujal --- .../zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts b/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts index 6568444356..e7c27b5aa1 100644 --- a/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts +++ b/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts @@ -16,7 +16,6 @@ import { error } from "console"; import { Copy, Create, Get, List, Upload, ZosFilesConstants, ZosFilesMessages, IZosFilesResponse, Download, ZosFilesUtils } from "../../../../src"; import { ZosmfHeaders, ZosmfRestClient } from "@zowe/core-for-zowe-sdk"; -import path = require("path"); describe("Copy", () => { const dummySession = new Session({ From 85611f5ab564b0bb11d18b7e80810cddb44d92c6 Mon Sep 17 00:00:00 2001 From: Pujal Date: Fri, 13 Dec 2024 09:44:05 -0500 Subject: [PATCH 25/52] updated code coverage Signed-off-by: Pujal --- .../__unit__/methods/copy/Copy.unit.test.ts | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts b/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts index e7c27b5aa1..767b66a118 100644 --- a/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts +++ b/packages/zosfiles/__tests__/__unit__/methods/copy/Copy.unit.test.ts @@ -575,6 +575,8 @@ describe("Copy", () => { }; it("should detect PDS datasets correctly during copy", async () => { + let caughtError; + let response; listDatasetSpy.mockImplementation(async (): Promise => { return { apiResponse: { @@ -582,12 +584,19 @@ describe("Copy", () => { } }; }); - const response = await Copy.isPDS(dummySession, dsPO.dsname); + try { + response = await Copy.isPDS(dummySession, dsPO.dsname); + } + catch(e) { + caughtError = e; + } expect(response).toEqual(true); expect(listDatasetSpy).toHaveBeenCalledWith(dummySession, dsPO.dsname, { attributes: true }); }); it("should return false if the data set is not partitioned", async () => { + let response; + let caughtError; listDatasetSpy.mockImplementation(async (): Promise => { return { apiResponse: { @@ -595,12 +604,19 @@ describe("Copy", () => { } }; }); - const response = await Copy.isPDS(dummySession, dsPS.dsname); + try { + response = await Copy.isPDS(dummySession, dsPS.dsname); + } + catch(e) { + caughtError = e; + } expect(response).toEqual(false); expect(listDatasetSpy).toHaveBeenCalledWith(dummySession, dsPS.dsname, { attributes: true }); }); it("should successfully copy members from source to target PDS", async () => { + let caughtError; + let response; const sourceResponse = { apiResponse: { items: [ @@ -619,7 +635,13 @@ describe("Copy", () => { uploadSpy.mockResolvedValue(undefined); rmSync.mockImplementation(jest.fn()); - const response = await Copy.copyPDS(dummySession, fromDataSetName, toDataSetName); + + try{ + response = await Copy.copyPDS(dummySession, fromDataSetName, toDataSetName); + } + catch(e) { + caughtError = e; + } expect(listAllMembersSpy).toHaveBeenCalledWith(dummySession, fromDataSetName); expect(downloadAllMembersSpy).toHaveBeenCalledWith(dummySession, fromDataSetName, expect.any(Object)); expect(fileListPathSpy).toHaveBeenCalled(); From 4eb68d89932cc01d90201cabac72e6606d18c4cd Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Fri, 13 Dec 2024 12:53:38 -0500 Subject: [PATCH 26/52] Add CHANGELOG.md Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- packages/imperative/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/imperative/CHANGELOG.md b/packages/imperative/CHANGELOG.md index ded21b7c84..52915b7f41 100644 --- a/packages/imperative/CHANGELOG.md +++ b/packages/imperative/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to the Imperative package will be documented in this file. - BugFix: Modified 8.8.2 bugfix to correct web help alias. [#2361](https://github.com/zowe/zowe-cli/pull/2361) - BugFix: Resolved issue where special characters could be corrupted when downloading a large file. [#2366](https://github.com/zowe/zowe-cli/pull/2366) +- BugFix: Modified location of Proxy-Authorization header to be located in the agent instead of the request. ## `8.8.2` From ecfea278987c11274c94fd3c0b7ed886a23e5c07 Mon Sep 17 00:00:00 2001 From: Pujal Date: Fri, 13 Dec 2024 14:27:53 -0500 Subject: [PATCH 27/52] updated with PR comments Signed-off-by: Pujal --- packages/cli/src/zosfiles/-strings-/en.ts | 7 ++++--- packages/zosfiles/src/methods/copy/Copy.ts | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/cli/src/zosfiles/-strings-/en.ts b/packages/cli/src/zosfiles/-strings-/en.ts index bd65b59d95..803eb27554 100644 --- a/packages/cli/src/zosfiles/-strings-/en.ts +++ b/packages/cli/src/zosfiles/-strings-/en.ts @@ -188,8 +188,8 @@ export default { DESCRIPTION: "Copy a data set.", ACTIONS: { DATA_SET: { - SUMMARY: "Copy a data set to another data set", - DESCRIPTION: "Copy a data set to another data set.", + SUMMARY: "Copy a data set/partitioned data set to another data set/partitioned data set", + DESCRIPTION: "Copy a data set/partitioned data set to another data set/partitioned data set.", POSITIONALS: { FROMDSNAME: "The name of the data set that you want to copy from", TODSNAME: "The name of the data set that you want to copy to (data set must be preallocated)" @@ -202,7 +202,8 @@ export default { EX2: "Copy the data set member named 'USER.FROM.SET(MEM1)' to the data set member named 'USER.TO.SET(MEM2)'", EX3: "Copy the data set named 'USER.FROM.SET' to the data set member named 'USER.TO.SET(MEM2)'", EX4: "Copy the data set member named 'USER.FROM.SET(MEM1)' to the data set named 'USER.TO.SET'", - EX5: "Copy the data set named 'USER.FROM.SET' to the data set named 'USER.TO.SET' and replace like-named members" + EX5: "Copy the data set named 'USER.FROM.SET' to the data set named 'USER.TO.SET' and replace like-named members", + EX6: "Copy the partitioned data set named 'TEST.PDS1' to the partitioned data set named 'TEST.PDS2'" } }, DATA_SET_CROSS_LPAR: { diff --git a/packages/zosfiles/src/methods/copy/Copy.ts b/packages/zosfiles/src/methods/copy/Copy.ts index 61b8e07fd0..704b18aeb8 100644 --- a/packages/zosfiles/src/methods/copy/Copy.ts +++ b/packages/zosfiles/src/methods/copy/Copy.ts @@ -113,7 +113,7 @@ export class Copy { try { const response = await List.dataSet(session, dataSetName, {attributes: true}); const dsorg = response.apiResponse.items[0].dsorg; - return dsorg === "POE" || dsorg === "PO"; + return dsorg.startsWith("PO"); } catch(error) { Logger.getAppLogger().error(error); From d54f1fe0f9f2bf6beb81cf1fa2abdd4cabee492c Mon Sep 17 00:00:00 2001 From: Pujal Date: Fri, 13 Dec 2024 14:31:53 -0500 Subject: [PATCH 28/52] updated to changelog Signed-off-by: Pujal --- packages/cli/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 6779cd3d06..daf67ad989 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -2,6 +2,7 @@ All notable changes to the Zowe CLI package will be documented in this file. ## Recent Changes +-Enhancement: Updated the help text with PDS enhancement of `zowe zos-files copy data-set` command.[#2386](https://github.com/zowe/zowe-cli/pull/2386) -Enhancement: Added new command zowe zos-files download all-members-matching, (zowe files dl amm), to download members matching specified pattern(s). The success message for the Download.allMembers API was changed from originally "Data set downloaded successfully" to "Member(s) downloaded successfully." The change also alters the commandResponse when using the --rfj flag. [#2359](https://github.com/zowe/zowe-cli/pull/2359) From 6d17adbb179324b6bc09654986f4945b1f523586 Mon Sep 17 00:00:00 2001 From: Pujal Date: Fri, 13 Dec 2024 14:45:04 -0500 Subject: [PATCH 29/52] updates for PR comments Signed-off-by: Pujal --- packages/zosfiles/src/methods/copy/Copy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zosfiles/src/methods/copy/Copy.ts b/packages/zosfiles/src/methods/copy/Copy.ts index 704b18aeb8..fc419ca27e 100644 --- a/packages/zosfiles/src/methods/copy/Copy.ts +++ b/packages/zosfiles/src/methods/copy/Copy.ts @@ -147,7 +147,7 @@ export class Copy { if(sourceMemberList.length == 0) { return { - success: false, + success: true, commandResponse: `Source dataset (${fromPds}) - ` + ZosFilesMessages.noMembersFound.message }; } From cd5b2cf6437c978dd3738b1ca284c5b5217f38df Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:25:26 -0500 Subject: [PATCH 30/52] Fix broken unit tests Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- .../client/AbstractRestClient.unit.test.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/packages/imperative/src/rest/__tests__/client/AbstractRestClient.unit.test.ts b/packages/imperative/src/rest/__tests__/client/AbstractRestClient.unit.test.ts index fcd7669552..98005ccff5 100644 --- a/packages/imperative/src/rest/__tests__/client/AbstractRestClient.unit.test.ts +++ b/packages/imperative/src/rest/__tests__/client/AbstractRestClient.unit.test.ts @@ -1502,22 +1502,6 @@ describe("AbstractRestClient tests", () => { const result = privateRestClient.buildOptions(resource, request, reqHeaders); expect(Object.keys(result)).toContain('agent'); }); - - it('Should use session proxy options over env vars for proxy agent', () => { - restSession.ISession.proxy = { proxy_authorization: 'proxy_auth_string'}; - const resource = '/resource'; - const request = ''; - const reqHeaders: any[] = []; - const url = new URL('https://www.zowe.com'); - const proxyAgent = new HttpsProxyAgent(url, { rejectUnauthorized: true }); - getSystemProxyUrlSpy.mockReturnValue(url); - getProxyAgentSpy.mockReturnValue(proxyAgent); - setCertPemAuthSpy.mockReturnValue(true); - const headerSpy = jest.spyOn(privateRestClient, "appendHeaders"); - const result = privateRestClient.buildOptions(resource, request, reqHeaders); - expect(Object.keys(result)).toContain('agent'); - expect(headerSpy).toHaveBeenCalledWith([{'Proxy-Authorization': restSession.ISession.proxy.proxy_authorization}]); - }); }); }); }); From ac0338e558b0c169c11bd9b969e64557bf136ac8 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Mon, 16 Dec 2024 09:09:06 -0500 Subject: [PATCH 31/52] added buffer and stream inspect Signed-off-by: jace-roell --- .../methods/upload/Upload.unit.test.ts | 32 +++++++++++++++---- .../zosfiles/src/methods/upload/Upload.ts | 15 +++++---- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts b/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts index 69420591e3..c0f92eb905 100644 --- a/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts +++ b/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts @@ -22,7 +22,7 @@ import { IUploadOptions } from "../../../../src/methods/upload/doc/IUploadOption import { Upload } from "../../../../src/methods/upload/Upload"; import { List } from "../../../../src/methods/list/List"; import { Utilities } from "../../../../src/methods/utilities/Utilities"; - +import { inspect } from "util"; import { ZosFilesUtils } from "../../../../src/utils/ZosFilesUtils"; import { stripNewLines } from "../../../../../../__tests__/__src__/TestUtils"; import { Create } from "../../../../src/methods/create"; @@ -379,7 +379,7 @@ describe("z/OS Files - Upload", () => { expect(error).toBeDefined(); expect(error).toBe(testError); }); - it("should return with proper response when upload buffer to a data set", async () => { + it("should return with proper response when upload buffer to a data set - buffer less than 10 chars", async () => { const buffer: Buffer = Buffer.from("testing"); const endpoint = path.posix.join(ZosFilesConstants.RESOURCE, ZosFilesConstants.RES_DS_FILES, dsName); const reqHeaders = [ZosmfHeaders.X_IBM_TEXT, ZosmfHeaders.ACCEPT_ENCODING]; @@ -392,7 +392,27 @@ describe("z/OS Files - Upload", () => { expect(error).toBeUndefined(); expect(response).toBeDefined(); - expect(response.apiResponse).toMatchObject({"from": "Buffer<>", "success": true, "to": dsName}); + expect(response.apiResponse).toMatchObject({"from": "", "success": true, "to": dsName}); + + expect(zosmfPutFullSpy).toHaveBeenCalledTimes(1); + expect(zosmfPutFullSpy).toHaveBeenCalledWith(dummySession, {resource: endpoint, + reqHeaders, + writeData: buffer}); + }); + it("should return with proper response when upload buffer to a data set - buffer more than 10 chars", async () => { + const buffer: Buffer = Buffer.from("bufferLargerThan10Chars"); + const endpoint = path.posix.join(ZosFilesConstants.RESOURCE, ZosFilesConstants.RES_DS_FILES, dsName); + const reqHeaders = [ZosmfHeaders.X_IBM_TEXT, ZosmfHeaders.ACCEPT_ENCODING]; + + try { + response = await Upload.bufferToDataSet(dummySession, buffer, dsName); + } catch (err) { + error = err; + } + + expect(error).toBeUndefined(); + expect(response).toBeDefined(); + expect(response.apiResponse).toMatchObject({"from": "", "success": true, "to": dsName}); expect(zosmfPutFullSpy).toHaveBeenCalledTimes(1); expect(zosmfPutFullSpy).toHaveBeenCalledWith(dummySession, {resource: endpoint, @@ -749,7 +769,7 @@ describe("z/OS Files - Upload", () => { expect(error).toBeUndefined(); expect(response).toBeDefined(); - expect(response.apiResponse).toMatchObject({"from": "Stream<>", "success": true, "to": dsName}); + expect(response.apiResponse).toMatchObject({"from": "[Readable]", "success": true, "to": dsName}); expect(zosmfPutFullSpy).toHaveBeenCalledTimes(1); expect(zosmfPutFullSpy).toHaveBeenCalledWith(dummySession, {resource: endpoint, @@ -1757,7 +1777,7 @@ describe("z/OS Files - Upload", () => { expect(error).toBeUndefined(); expect(USSresponse).toBeDefined(); - expect(USSresponse.apiResponse).toMatchObject({"from": "Buffer<>", "success": true, "to": dsName}); + expect(USSresponse.apiResponse).toMatchObject({"from": "", "success": true, "to": dsName}); const normalizedData = ZosFilesUtils.normalizeNewline(data); expect(data.length).not.toBe(normalizedData.length); @@ -1833,7 +1853,7 @@ describe("z/OS Files - Upload", () => { expect(error).toBeUndefined(); expect(USSresponse).toBeDefined(); - expect(USSresponse.apiResponse).toMatchObject({"from": "Stream<>", "success": true, "to": dsName}); + expect(USSresponse.apiResponse).toMatchObject({"from": "[Readable]", "success": true, "to": dsName}); expect(USSresponse.success).toBeTruthy(); expect(zosmfExpectFullSpy).toHaveBeenCalledTimes(1); diff --git a/packages/zosfiles/src/methods/upload/Upload.ts b/packages/zosfiles/src/methods/upload/Upload.ts index 4280d80e41..9301c81bfc 100644 --- a/packages/zosfiles/src/methods/upload/Upload.ts +++ b/packages/zosfiles/src/methods/upload/Upload.ts @@ -30,7 +30,7 @@ import { Utilities, Tag } from "../utilities"; import { Readable } from "stream"; import { CLIENT_PROPERTY } from "../../doc/types/ZosmfRestClientProperties"; import { TransferMode } from "../../utils/ZosFilesAttributes"; - +import { inspect } from "util"; export class Upload { @@ -183,10 +183,11 @@ export class Upload { } const uploadRequest: IRestClientResponse = await ZosmfRestClient.putExpectFullResponse(session, requestOptions); + const maxBufferPreviewSize = 10; // By default, apiResponse is empty when uploading const apiResponse: any = { success: true, - from: "Buffer<>", + from: fileBuffer.length > maxBufferPreviewSize ? inspect(fileBuffer.subarray(0, maxBufferPreviewSize)).slice(0, -1) + "...>" : inspect(fileBuffer), to: dataSetName }; @@ -248,7 +249,7 @@ export class Upload { // By default, apiResponse is empty when uploading const apiResponse: any = { success: true, - from: "Stream<>", + from: inspect(fileStream, { showHidden: false, depth: -1}), to: dataSetName }; @@ -488,11 +489,11 @@ export class Upload { } const uploadRequest: IRestClientResponse = await ZosmfRestClient.putExpectFullResponse(session, requestOptions); + const maxBufferPreviewSize = 10; // By default, apiResponse is empty when uploading - const apiResponse: any = - { + const apiResponse: any = { success: true, - from: "Buffer<>", + from: fileBuffer.length > maxBufferPreviewSize ? inspect(fileBuffer.subarray(0, maxBufferPreviewSize)).slice(0, -1) + "...>" : inspect(fileBuffer), to: origUssname }; @@ -556,7 +557,7 @@ export class Upload { // By default, apiResponse is empty when uploading const apiResponse: any = { success: true, - from: "Stream<>", + from: inspect(uploadStream, { showHidden: false, depth: -1}), to: origUssname }; From abd1044035d3e4aab5a0003262408cbfbe2f2294 Mon Sep 17 00:00:00 2001 From: Pujal Date: Mon, 16 Dec 2024 10:25:17 -0500 Subject: [PATCH 32/52] updated snapshots Signed-off-by: Pujal --- ...imperative.secure.integration.test.ts.snap | 98 ++----------------- ...cli.files.copy.ds.integration.test.ts.snap | 6 +- 2 files changed, 10 insertions(+), 94 deletions(-) diff --git a/__tests__/__integration__/__snapshots__/imperative.secure.integration.test.ts.snap b/__tests__/__integration__/__snapshots__/imperative.secure.integration.test.ts.snap index 1500ca567e..81f10fdf84 100644 --- a/__tests__/__integration__/__snapshots__/imperative.secure.integration.test.ts.snap +++ b/__tests__/__integration__/__snapshots__/imperative.secure.integration.test.ts.snap @@ -16,100 +16,16 @@ Use \\"imperative-test-cli config import --help\\" to view command description, " `; -exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the configuration 1`] = ` -"profiles: - secured: - type: secured - properties: - info: - secure: - (empty array) - project_base: - type: base - properties: - secure: - - secret - global_base: - type: base - properties: - secure: - - secret -defaults: - secured: secured - base: project_base -autoStore: true -" -`; +exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the configuration 1`] = `""`; -exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the configuration without showing secure values 1`] = ` -"profiles: - secured: - type: secured - properties: - info: - secure: - (empty array) - project_base: - type: base - properties: - secret: (secure value) - secure: - - secret - global_base: - type: base - properties: - secure: - - secret -defaults: - secured: secured - base: project_base -autoStore: true -" -`; +exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the configuration without showing secure values 1`] = `""`; -exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the defaults configuration property 1`] = ` -"secured: secured -base: project_base -" -`; +exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the defaults configuration property 1`] = `""`; -exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the profiles configuration property 1`] = ` -"secured: - type: secured - properties: - info: - secure: - (empty array) -project_base: - type: base - properties: - secure: - - secret -global_base: - type: base - properties: - secure: - - secret -" -`; +exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the profiles configuration property 1`] = `""`; -exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the root level property names only 1 1`] = ` -"profiles -defaults -autoStore -" -`; +exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the root level property names only 1 1`] = `""`; -exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the root level property names only 2 1`] = ` -"profiles -defaults -autoStore -" -`; +exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the root level property names only 2 1`] = `""`; -exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config profiles should list profiles 1`] = ` -"secured -project_base -global_base -" -`; +exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config profiles should list profiles 1`] = `""`; diff --git a/packages/cli/__tests__/zosfiles/__integration__/copy/ds/__snapshots__/cli.files.copy.ds.integration.test.ts.snap b/packages/cli/__tests__/zosfiles/__integration__/copy/ds/__snapshots__/cli.files.copy.ds.integration.test.ts.snap index abf6986543..6a4e1020b7 100644 --- a/packages/cli/__tests__/zosfiles/__integration__/copy/ds/__snapshots__/cli.files.copy.ds.integration.test.ts.snap +++ b/packages/cli/__tests__/zosfiles/__integration__/copy/ds/__snapshots__/cli.files.copy.ds.integration.test.ts.snap @@ -11,7 +11,7 @@ exports[`Copy Data Set should display the help 1`] = ` DESCRIPTION ----------- - Copy a data set to another data set. + Copy a data set/partitioned data set to another data set/partitioned data set. USAGE ----- @@ -171,8 +171,8 @@ exports[`Copy Data Set should display the help in json format 1`] = ` \\"success\\": true, \\"exitCode\\": 0, \\"message\\": \\"The help was constructed for command: data-set.\\", - \\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n data-set | ds\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Copy a data set to another data set.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-files copy data-set [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n fromDataSetName\\\\t\\\\t (string)\\\\n\\\\n The name of the data set that you want to copy from\\\\n\\\\n toDataSetName\\\\t\\\\t (string)\\\\n\\\\n The name of the data set that you want to copy to (data set must be\\\\n preallocated)\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --replace | --rep (boolean)\\\\n\\\\n Specify this option as true if you wish to replace like-named members in the\\\\n target data set\\\\n\\\\n --response-timeout | --rto (number)\\\\n\\\\n The maximum amount of time in seconds the z/OSMF Files TSO servlet should run\\\\n before returning a response. Any request exceeding this amount of time will be\\\\n terminated and return an error. Allowed values: 5 - 600\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Copy the data set named 'USER.FROM.SET' to the data set\\\\n named 'USER.TO.SET':\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET\\\\\\" \\\\\\"USER.TO.SET\\\\\\"\\\\n\\\\n - Copy the data set member named 'USER.FROM.SET(MEM1)' to the\\\\n data set member named 'USER.TO.SET(MEM2)':\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET(mem1)\\\\\\" \\\\\\"USER.TO.SET(mem2)\\\\\\"\\\\n\\\\n - Copy the data set named 'USER.FROM.SET' to the data set\\\\n member named 'USER.TO.SET(MEM2)':\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET\\\\\\" \\\\\\"USER.TO.SET(mem2)\\\\\\"\\\\n\\\\n - Copy the data set member named 'USER.FROM.SET(MEM1)' to the\\\\n data set named 'USER.TO.SET':\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET(mem1)\\\\\\" \\\\\\"USER.TO.SET\\\\\\"\\\\n\\\\n - Copy the data set named 'USER.FROM.SET' to the data set\\\\n named 'USER.TO.SET' and replace like-named members:\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET\\\\\\" \\\\\\"USER.TO.SET\\\\\\" --replace\\\\n\\\\n\\", + \\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n data-set | ds\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Copy a data set/partitioned data set to another data set/partitioned data set.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-files copy data-set [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n fromDataSetName\\\\t\\\\t (string)\\\\n\\\\n The name of the data set that you want to copy from\\\\n\\\\n toDataSetName\\\\t\\\\t (string)\\\\n\\\\n The name of the data set that you want to copy to (data set must be\\\\n preallocated)\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --replace | --rep (boolean)\\\\n\\\\n Specify this option as true if you wish to replace like-named members in the\\\\n target data set\\\\n\\\\n --response-timeout | --rto (number)\\\\n\\\\n The maximum amount of time in seconds the z/OSMF Files TSO servlet should run\\\\n before returning a response. Any request exceeding this amount of time will be\\\\n terminated and return an error. Allowed values: 5 - 600\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Copy the data set named 'USER.FROM.SET' to the data set\\\\n named 'USER.TO.SET':\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET\\\\\\" \\\\\\"USER.TO.SET\\\\\\"\\\\n\\\\n - Copy the data set member named 'USER.FROM.SET(MEM1)' to the\\\\n data set member named 'USER.TO.SET(MEM2)':\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET(mem1)\\\\\\" \\\\\\"USER.TO.SET(mem2)\\\\\\"\\\\n\\\\n - Copy the data set named 'USER.FROM.SET' to the data set\\\\n member named 'USER.TO.SET(MEM2)':\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET\\\\\\" \\\\\\"USER.TO.SET(mem2)\\\\\\"\\\\n\\\\n - Copy the data set member named 'USER.FROM.SET(MEM1)' to the\\\\n data set named 'USER.TO.SET':\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET(mem1)\\\\\\" \\\\\\"USER.TO.SET\\\\\\"\\\\n\\\\n - Copy the data set named 'USER.FROM.SET' to the data set\\\\n named 'USER.TO.SET' and replace like-named members:\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET\\\\\\" \\\\\\"USER.TO.SET\\\\\\" --replace\\\\n\\\\n\\", \\"stderr\\": \\"\\", - \\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n data-set | ds\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Copy a data set to another data set.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-files copy data-set [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n fromDataSetName\\\\t\\\\t (string)\\\\n\\\\n The name of the data set that you want to copy from\\\\n\\\\n toDataSetName\\\\t\\\\t (string)\\\\n\\\\n The name of the data set that you want to copy to (data set must be\\\\n preallocated)\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --replace | --rep (boolean)\\\\n\\\\n Specify this option as true if you wish to replace like-named members in the\\\\n target data set\\\\n\\\\n --response-timeout | --rto (number)\\\\n\\\\n The maximum amount of time in seconds the z/OSMF Files TSO servlet should run\\\\n before returning a response. Any request exceeding this amount of time will be\\\\n terminated and return an error. Allowed values: 5 - 600\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Copy the data set named 'USER.FROM.SET' to the data set\\\\n named 'USER.TO.SET':\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET\\\\\\" \\\\\\"USER.TO.SET\\\\\\"\\\\n\\\\n - Copy the data set member named 'USER.FROM.SET(MEM1)' to the\\\\n data set member named 'USER.TO.SET(MEM2)':\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET(mem1)\\\\\\" \\\\\\"USER.TO.SET(mem2)\\\\\\"\\\\n\\\\n - Copy the data set named 'USER.FROM.SET' to the data set\\\\n member named 'USER.TO.SET(MEM2)':\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET\\\\\\" \\\\\\"USER.TO.SET(mem2)\\\\\\"\\\\n\\\\n - Copy the data set member named 'USER.FROM.SET(MEM1)' to the\\\\n data set named 'USER.TO.SET':\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET(mem1)\\\\\\" \\\\\\"USER.TO.SET\\\\\\"\\\\n\\\\n - Copy the data set named 'USER.FROM.SET' to the data set\\\\n named 'USER.TO.SET' and replace like-named members:\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET\\\\\\" \\\\\\"USER.TO.SET\\\\\\" --replace\\\\n\\\\n\\" + \\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n data-set | ds\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Copy a data set/partitioned data set to another data set/partitioned data set.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-files copy data-set [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n fromDataSetName\\\\t\\\\t (string)\\\\n\\\\n The name of the data set that you want to copy from\\\\n\\\\n toDataSetName\\\\t\\\\t (string)\\\\n\\\\n The name of the data set that you want to copy to (data set must be\\\\n preallocated)\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --replace | --rep (boolean)\\\\n\\\\n Specify this option as true if you wish to replace like-named members in the\\\\n target data set\\\\n\\\\n --response-timeout | --rto (number)\\\\n\\\\n The maximum amount of time in seconds the z/OSMF Files TSO servlet should run\\\\n before returning a response. Any request exceeding this amount of time will be\\\\n terminated and return an error. Allowed values: 5 - 600\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Copy the data set named 'USER.FROM.SET' to the data set\\\\n named 'USER.TO.SET':\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET\\\\\\" \\\\\\"USER.TO.SET\\\\\\"\\\\n\\\\n - Copy the data set member named 'USER.FROM.SET(MEM1)' to the\\\\n data set member named 'USER.TO.SET(MEM2)':\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET(mem1)\\\\\\" \\\\\\"USER.TO.SET(mem2)\\\\\\"\\\\n\\\\n - Copy the data set named 'USER.FROM.SET' to the data set\\\\n member named 'USER.TO.SET(MEM2)':\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET\\\\\\" \\\\\\"USER.TO.SET(mem2)\\\\\\"\\\\n\\\\n - Copy the data set member named 'USER.FROM.SET(MEM1)' to the\\\\n data set named 'USER.TO.SET':\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET(mem1)\\\\\\" \\\\\\"USER.TO.SET\\\\\\"\\\\n\\\\n - Copy the data set named 'USER.FROM.SET' to the data set\\\\n named 'USER.TO.SET' and replace like-named members:\\\\n\\\\n $ zowe zos-files copy data-set \\\\\\"USER.FROM.SET\\\\\\" \\\\\\"USER.TO.SET\\\\\\" --replace\\\\n\\\\n\\" }" `; From c3edfd6951ae2d30dbfce27c45a8c68b3e538b06 Mon Sep 17 00:00:00 2001 From: anaxceron Date: Mon, 16 Dec 2024 10:33:24 -0500 Subject: [PATCH 33/52] addressing Fernando feedback Signed-off-by: anaxceron --- README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ca07245ec6..b8a9c0c926 100644 --- a/README.md +++ b/README.md @@ -54,11 +54,11 @@ Versioning conventions for Zowe CLI and Plug-ins| [Versioning guidelines](./docs ## Building Zowe CLI from source -Zowe CLI requires NPM version 8 and Cargo version 1.72.0 (or newer) to build from source. +Zowe CLI requires the NPM version bundled with the active LTS versions of NodeJS and Cargo version 1.72.0 (or newer) to build from source. Check your NPM version with `npm --version` and if it's older than 8.x, update with `npm install -g npm`. -Check your vCargo version with `cargo --version`. Cargo can be installed using [rustup](https://rustup.rs/). To update Cargo, run the `rustup update` command. +Check your Cargo version with `cargo --version`. Cargo can be installed using [rustup](https://rustup.rs/). To update Cargo, run the `rustup update` command. For developers using Linux, the following packages are required to build Zowe CLI from source: @@ -139,9 +139,11 @@ For detailed information about creating profiles, or integrating with Zowe API M If you try to use Zowe CLI functionality and you get an error message that Zowe CLI failed to load any profiles, try issuing the following commands: +- `zowe config report-env` to generate a report on the status of the key areas in your working environment. Address any problems indicated in the report. - `zowe config edit` to open your `~/.zowe/zowe.config.json` configuration file in your system's default text editor. Fix any properties with incorrect values. - `zowe config secure` to have Zowe CLI prompt for your secure configuration properties in case your secure values are incorrect in your configuration. -- `zowe config report-env` to generate a report on the status of the key areas in your working environment. Address any problems indicated in the report. + +**Note:** For these commands, use the `--global-config` option to update your global configuration or `--user-config` for your user configuration. ## Zowe Node Client SDK @@ -163,7 +165,7 @@ Alternatively, import Zowe CLI into your project to call the Node APIs. However, ### Example API usage -For example usage syntax, see the ReadMe for each API package in this repository: +For example usage syntax, see the README for each API package in this repository: - [Provisioning](https://github.com/zowe/zowe-cli/tree/master/packages/provisioning): Provision middleware and resources such as IBM CICS, IBM Db2, IBM MQ, and more. - [z/OS Console](https://github.com/zowe/zowe-cli/tree/master/packages/zosconsole): Perform z/OS console operations. @@ -221,16 +223,16 @@ npm run test:system ### What is the difference between Zowe V2 and V3? - - V3 deprecates support for Zowe V1 profiles. - - - To updgrade from an older Zowe release, see [Migrating from Zowe Vx to Zowe V3](https://docs.zowe.org/stable/whats-new/zowe-v3-migratio3). - - - V2 uses **team profiles** and **deprecates the Secure Credential Store** (SCS) plug-in used in Zowe V1. + - V2 introduces **team profiles** and **deprecates the Secure Credential Store** (SCS) plug-in used in Zowe V1. - Connection details can be managed efficiently within one file, promoting a global configuration that can be shared across teams and mainframe services. For more information on how to use profiles, see [Team configurations](https://docs.zowe.org/stable/user-guide/cli-using-using-team-profiles/) in Zowe Docs. - Secure credential encryption is included in the core CLI. + - V3 includes the preceding features. Additionally, deprecates support for Zowe V1 profiles. + + - To upgrade from an older Zowe release, see [Migrating from Zowe Vx to Zowe V3](https://docs.zowe.org/stable/whats-new/zowe-v3-migratio3). +
Don't see what you're looking for? Browse questions from the community or ask your own in the [Q&A section](https://github.com/zowe/zowe-cli/discussions/categories/q-a) of our repo. From 14986b155d573b376f23b9604d686f1c981ea9ee Mon Sep 17 00:00:00 2001 From: zowe-robot Date: Mon, 16 Dec 2024 16:59:40 +0000 Subject: [PATCH 34/52] Bump version to 8.9.1 [ci skip] Signed-off-by: zowe-robot --- lerna.json | 2 +- npm-shrinkwrap.json | 18 +++++++++--------- packages/cli/package.json | 8 ++++---- packages/workflows/package.json | 4 ++-- packages/zosfiles/CHANGELOG.md | 2 +- packages/zosfiles/package.json | 2 +- packages/zosjobs/package.json | 4 ++-- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lerna.json b/lerna.json index daa5c34cf9..8d7b46ef3a 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "8.9.0", + "version": "8.9.1", "command": { "publish": { "ignoreChanges": [ diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 52e37e5113..2579acc821 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -16269,7 +16269,7 @@ }, "packages/cli": { "name": "@zowe/cli", - "version": "8.9.0", + "version": "8.9.1", "hasInstallScript": true, "license": "EPL-2.0", "dependencies": { @@ -16277,12 +16277,12 @@ "@zowe/imperative": "8.8.3", "@zowe/provisioning-for-zowe-sdk": "8.8.3", "@zowe/zos-console-for-zowe-sdk": "8.8.3", - "@zowe/zos-files-for-zowe-sdk": "8.9.0", - "@zowe/zos-jobs-for-zowe-sdk": "8.9.0", + "@zowe/zos-files-for-zowe-sdk": "8.9.1", + "@zowe/zos-jobs-for-zowe-sdk": "8.9.1", "@zowe/zos-logs-for-zowe-sdk": "8.8.3", "@zowe/zos-tso-for-zowe-sdk": "8.8.3", "@zowe/zos-uss-for-zowe-sdk": "8.8.3", - "@zowe/zos-workflows-for-zowe-sdk": "8.9.0", + "@zowe/zos-workflows-for-zowe-sdk": "8.9.1", "@zowe/zosmf-for-zowe-sdk": "8.8.3", "find-process": "1.4.7", "lodash": "4.17.21", @@ -16599,10 +16599,10 @@ }, "packages/workflows": { "name": "@zowe/zos-workflows-for-zowe-sdk", - "version": "8.9.0", + "version": "8.9.1", "license": "EPL-2.0", "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.9.0" + "@zowe/zos-files-for-zowe-sdk": "8.9.1" }, "devDependencies": { "@zowe/cli-test-utils": "8.8.3", @@ -16636,7 +16636,7 @@ }, "packages/zosfiles": { "name": "@zowe/zos-files-for-zowe-sdk", - "version": "8.9.0", + "version": "8.9.1", "license": "EPL-2.0", "dependencies": { "lodash": "^4.17.21", @@ -16678,10 +16678,10 @@ }, "packages/zosjobs": { "name": "@zowe/zos-jobs-for-zowe-sdk", - "version": "8.9.0", + "version": "8.9.1", "license": "EPL-2.0", "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.9.0" + "@zowe/zos-files-for-zowe-sdk": "8.9.1" }, "devDependencies": { "@zowe/cli-test-utils": "8.8.3", diff --git a/packages/cli/package.json b/packages/cli/package.json index bfa9205e32..8e49ec1c10 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/cli", - "version": "8.9.0", + "version": "8.9.1", "zoweVersion": "v3.0.0", "description": "Zowe CLI is a command line interface (CLI) that provides a simple and streamlined way to interact with IBM z/OS.", "author": "Zowe", @@ -62,12 +62,12 @@ "@zowe/imperative": "8.8.3", "@zowe/provisioning-for-zowe-sdk": "8.8.3", "@zowe/zos-console-for-zowe-sdk": "8.8.3", - "@zowe/zos-files-for-zowe-sdk": "8.9.0", - "@zowe/zos-jobs-for-zowe-sdk": "8.9.0", + "@zowe/zos-files-for-zowe-sdk": "8.9.1", + "@zowe/zos-jobs-for-zowe-sdk": "8.9.1", "@zowe/zos-logs-for-zowe-sdk": "8.8.3", "@zowe/zos-tso-for-zowe-sdk": "8.8.3", "@zowe/zos-uss-for-zowe-sdk": "8.8.3", - "@zowe/zos-workflows-for-zowe-sdk": "8.9.0", + "@zowe/zos-workflows-for-zowe-sdk": "8.9.1", "@zowe/zosmf-for-zowe-sdk": "8.8.3", "find-process": "1.4.7", "lodash": "4.17.21", diff --git a/packages/workflows/package.json b/packages/workflows/package.json index c32bf129ff..6bccd466ac 100644 --- a/packages/workflows/package.json +++ b/packages/workflows/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-workflows-for-zowe-sdk", - "version": "8.9.0", + "version": "8.9.1", "description": "Zowe SDK to interact with the z/OS workflows APIs", "author": "Zowe", "license": "EPL-2.0", @@ -45,7 +45,7 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.9.0" + "@zowe/zos-files-for-zowe-sdk": "8.9.1" }, "devDependencies": { "@zowe/cli-test-utils": "8.8.3", diff --git a/packages/zosfiles/CHANGELOG.md b/packages/zosfiles/CHANGELOG.md index 33cdb9b9b7..3d8b3f6d79 100644 --- a/packages/zosfiles/CHANGELOG.md +++ b/packages/zosfiles/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to the Zowe z/OS files SDK package will be documented in this file. -## Recent Changes +## `8.9.1` - BugFix: Corrected the `apiResponse` response value from `streamToDataSet()`,`streamToUss()`,`bufferToUss()` and `bufferToDataSet()` on the Upload SDK. [#2381](https://github.com/zowe/zowe-cli/pull/2381) - BugFix: Corrected the `Upload.BufferToUssFile()` SDK function to properly tag uploaded files. [#2378](https://github.com/zowe/zowe-cli/pull/2378) diff --git a/packages/zosfiles/package.json b/packages/zosfiles/package.json index c5c305e508..d04f8d8499 100644 --- a/packages/zosfiles/package.json +++ b/packages/zosfiles/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-files-for-zowe-sdk", - "version": "8.9.0", + "version": "8.9.1", "description": "Zowe SDK to interact with files and data sets on z/OS", "author": "Zowe", "license": "EPL-2.0", diff --git a/packages/zosjobs/package.json b/packages/zosjobs/package.json index 97b4a89bf0..17db41fd33 100644 --- a/packages/zosjobs/package.json +++ b/packages/zosjobs/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-jobs-for-zowe-sdk", - "version": "8.9.0", + "version": "8.9.1", "description": "Zowe SDK to interact with jobs on z/OS", "author": "Zowe", "license": "EPL-2.0", @@ -46,7 +46,7 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.9.0" + "@zowe/zos-files-for-zowe-sdk": "8.9.1" }, "devDependencies": { "@zowe/cli-test-utils": "8.8.3", From 04fe3808657ceeb804143955e40d636e1041e580 Mon Sep 17 00:00:00 2001 From: Pujal Date: Mon, 16 Dec 2024 12:30:11 -0500 Subject: [PATCH 35/52] updated snapshots Signed-off-by: Pujal --- packages/cli/CHANGELOG.md | 5 +++-- packages/zosfiles/CHANGELOG.md | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index daf67ad989..f98bd7f182 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -2,9 +2,10 @@ All notable changes to the Zowe CLI package will be documented in this file. ## Recent Changes --Enhancement: Updated the help text with PDS enhancement of `zowe zos-files copy data-set` command.[#2386](https://github.com/zowe/zowe-cli/pull/2386) +-Enhancement: The `zowe zos-files copy data-set` command now copies members from a source partitioned data set to an existing target partitioned data set.[#2386](https://github.com/zowe/zowe-cli/pull/2386) --Enhancement: Added new command zowe zos-files download all-members-matching, (zowe files dl amm), to download members matching specified pattern(s). The success message for the Download.allMembers API was changed from originally "Data set downloaded successfully" to "Member(s) downloaded successfully." The change also alters the commandResponse when using the --rfj flag. [#2359](https://github.com/zowe/zowe-cli/pull/2359) +## Recent Changes +- Enhancement: Added new command zowe zos-files download all-members-matching, (zowe files dl amm), to download members matching specified pattern(s). The success message for the Download.allMembers API was changed from originally "Data set downloaded successfully" to "Member(s) downloaded successfully." The change also alters the commandResponse when using the --rfj flag. [#2359](https://github.com/zowe/zowe-cli/pull/2359) ## `8.8.0` diff --git a/packages/zosfiles/CHANGELOG.md b/packages/zosfiles/CHANGELOG.md index 2c6e2ad594..41566769a6 100644 --- a/packages/zosfiles/CHANGELOG.md +++ b/packages/zosfiles/CHANGELOG.md @@ -3,8 +3,9 @@ All notable changes to the Zowe z/OS files SDK package will be documented in this file. ## Recent Changes --Enhancement: `Copy.dataset` method now recognizes Partioned data sets and can copy members of source PDS into an existing target PDS. [#2386](https://github.com/zowe/zowe-cli/pull/2386) +- Enhancement: The `Copy.dataset` method now recognizes partioned data sets and can copy members of a source PDS into an existing target PDS. [#2386](https://github.com/zowe/zowe-cli/pull/2386) +## Recent Changes - Enhancement: Added a `List.membersMatchingPattern` method to download all members that match a specific pattern.[#2359](https://github.com/zowe/zowe-cli/pull/2359) ## `8.8.4` From 73296b44d178365d5b438a047f9c54ba583eaecc Mon Sep 17 00:00:00 2001 From: jace-roell Date: Mon, 16 Dec 2024 12:39:12 -0500 Subject: [PATCH 36/52] system test fix Signed-off-by: jace-roell --- .../__system__/methods/upload/Upload.system.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts b/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts index adeaa4f699..744a2d4542 100644 --- a/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts +++ b/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts @@ -326,7 +326,7 @@ describe("Upload Data Set", () => { expect(error).toBeFalsy(); - expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "Buffer<>","to": dsname+"(TEST)"}); + expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "","to": dsname+"(TEST)"}); expect(Buffer.from(getResponse.toString().trim())).toEqual(data); }); @@ -349,7 +349,7 @@ describe("Upload Data Set", () => { expect(error).toBeFalsy(); - expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "Stream<>","to": dsname+"(TEST)"}); + expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "[Readable]","to": dsname+"(TEST)"}); expect(getResponse.toString().trim()).toEqual(testdata); }); @@ -793,7 +793,7 @@ describe("Upload USS file", () => { expect(error).toBeFalsy(); - expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "Buffer<>","to": ussname}); + expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "","to": ussname}); expect(getResponse).toEqual(Buffer.from(data.toString())); }); @@ -815,7 +815,7 @@ describe("Upload USS file", () => { expect(error).toBeFalsy(); - expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "Stream<>","to": ussname}); + expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "[Readable]","to": ussname}); expect(getResponse).toEqual(Buffer.from(testdata)); }); From 16f6ed9ace2fcc86b6f7d4e0e2de773fe04922b2 Mon Sep 17 00:00:00 2001 From: Pujal Date: Mon, 16 Dec 2024 13:03:25 -0500 Subject: [PATCH 37/52] updated snapshots Signed-off-by: Pujal --- .../Cmd.cli.invalid.no-handler.integration.test.ts.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/invalid/__snapshots__/Cmd.cli.invalid.no-handler.integration.test.ts.snap b/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/invalid/__snapshots__/Cmd.cli.invalid.no-handler.integration.test.ts.snap index 47f5a32dec..dc2db46c51 100644 --- a/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/invalid/__snapshots__/Cmd.cli.invalid.no-handler.integration.test.ts.snap +++ b/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/invalid/__snapshots__/Cmd.cli.invalid.no-handler.integration.test.ts.snap @@ -1,8 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`cmd-cli invalid no-handler should fail the command with a message if the command definition of type command omits a handler 1`] = ` -"Internal Command Error: -Expect Error: Command Processor Error: The definition supplied is of type \\"command\\", but no handler was specified. +"/Users/pujalgandhi/Documents/ZOWE/zowe-cli/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/invalid/__scripts__/no-handler.sh: line 2: /Users/pujalgandhi/Documents/ZOWE/zowe-cli/.npm-global/bin/cmd-cli: Permission denied +/Users/pujalgandhi/Documents/ZOWE/zowe-cli/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/invalid/__scripts__/no-handler.sh: line 3: /Users/pujalgandhi/Documents/ZOWE/zowe-cli/.npm-global/bin/cmd-cli: Permission denied " `; From 4dfe07f24c26632ac381cfd81c7ab567ce13081d Mon Sep 17 00:00:00 2001 From: Pujal Date: Mon, 16 Dec 2024 13:27:05 -0500 Subject: [PATCH 38/52] updated snapshots Signed-off-by: Pujal --- .../Cmd.cli.invalid.no-handler.integration.test.ts.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/invalid/__snapshots__/Cmd.cli.invalid.no-handler.integration.test.ts.snap b/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/invalid/__snapshots__/Cmd.cli.invalid.no-handler.integration.test.ts.snap index dc2db46c51..47f5a32dec 100644 --- a/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/invalid/__snapshots__/Cmd.cli.invalid.no-handler.integration.test.ts.snap +++ b/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/invalid/__snapshots__/Cmd.cli.invalid.no-handler.integration.test.ts.snap @@ -1,8 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`cmd-cli invalid no-handler should fail the command with a message if the command definition of type command omits a handler 1`] = ` -"/Users/pujalgandhi/Documents/ZOWE/zowe-cli/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/invalid/__scripts__/no-handler.sh: line 2: /Users/pujalgandhi/Documents/ZOWE/zowe-cli/.npm-global/bin/cmd-cli: Permission denied -/Users/pujalgandhi/Documents/ZOWE/zowe-cli/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/invalid/__scripts__/no-handler.sh: line 3: /Users/pujalgandhi/Documents/ZOWE/zowe-cli/.npm-global/bin/cmd-cli: Permission denied +"Internal Command Error: +Expect Error: Command Processor Error: The definition supplied is of type \\"command\\", but no handler was specified. " `; From 48fb141b05109eb714ea3d65902c176506e14064 Mon Sep 17 00:00:00 2001 From: Pujal Date: Mon, 16 Dec 2024 13:28:11 -0500 Subject: [PATCH 39/52] updated snapshots Signed-off-by: Pujal --- ...imperative.secure.integration.test.ts.snap | 98 +++++++++++++++++-- 1 file changed, 91 insertions(+), 7 deletions(-) diff --git a/__tests__/__integration__/__snapshots__/imperative.secure.integration.test.ts.snap b/__tests__/__integration__/__snapshots__/imperative.secure.integration.test.ts.snap index 81f10fdf84..1500ca567e 100644 --- a/__tests__/__integration__/__snapshots__/imperative.secure.integration.test.ts.snap +++ b/__tests__/__integration__/__snapshots__/imperative.secure.integration.test.ts.snap @@ -16,16 +16,100 @@ Use \\"imperative-test-cli config import --help\\" to view command description, " `; -exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the configuration 1`] = `""`; +exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the configuration 1`] = ` +"profiles: + secured: + type: secured + properties: + info: + secure: + (empty array) + project_base: + type: base + properties: + secure: + - secret + global_base: + type: base + properties: + secure: + - secret +defaults: + secured: secured + base: project_base +autoStore: true +" +`; -exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the configuration without showing secure values 1`] = `""`; +exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the configuration without showing secure values 1`] = ` +"profiles: + secured: + type: secured + properties: + info: + secure: + (empty array) + project_base: + type: base + properties: + secret: (secure value) + secure: + - secret + global_base: + type: base + properties: + secure: + - secret +defaults: + secured: secured + base: project_base +autoStore: true +" +`; -exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the defaults configuration property 1`] = `""`; +exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the defaults configuration property 1`] = ` +"secured: secured +base: project_base +" +`; -exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the profiles configuration property 1`] = `""`; +exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the profiles configuration property 1`] = ` +"secured: + type: secured + properties: + info: + secure: + (empty array) +project_base: + type: base + properties: + secure: + - secret +global_base: + type: base + properties: + secure: + - secret +" +`; -exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the root level property names only 1 1`] = `""`; +exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the root level property names only 1 1`] = ` +"profiles +defaults +autoStore +" +`; -exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the root level property names only 2 1`] = `""`; +exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config list should list the root level property names only 2 1`] = ` +"profiles +defaults +autoStore +" +`; -exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config profiles should list profiles 1`] = `""`; +exports[`Imperative Secure Tests Imperative Test CLI Secure Tests imperative-test-cli config profiles should list profiles 1`] = ` +"secured +project_base +global_base +" +`; From 312c16c381930b34c70ea2e6431e6b7db8f1692f Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:17:56 -0500 Subject: [PATCH 40/52] Add code coverage Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- .../client/ProxySettings.unit.test.ts | 155 ++++++++++++++---- .../src/rest/src/client/ProxySettings.ts | 93 ++++++----- 2 files changed, 180 insertions(+), 68 deletions(-) diff --git a/packages/imperative/src/rest/__tests__/client/ProxySettings.unit.test.ts b/packages/imperative/src/rest/__tests__/client/ProxySettings.unit.test.ts index 952b9e298f..9aeb24ca7b 100644 --- a/packages/imperative/src/rest/__tests__/client/ProxySettings.unit.test.ts +++ b/packages/imperative/src/rest/__tests__/client/ProxySettings.unit.test.ts @@ -1,13 +1,13 @@ /* -* This program and the accompanying materials are made available under the terms of the -* Eclipse Public License v2.0 which accompanies this distribution, and is available at -* https://www.eclipse.org/legal/epl-v20.html -* -* SPDX-License-Identifier: EPL-2.0 -* -* Copyright Contributors to the Zowe Project. -* -*/ + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ import * as process from "process"; @@ -23,7 +23,7 @@ describe("Proxy tests", () => { const session = { hostname: "fake.com", port: 443, - rejectUnauthorized: false + rejectUnauthorized: false, } as ISession; const privateProxy = ProxySettings as any; const httpUrl = "http://www.zowe.com"; @@ -31,7 +31,9 @@ describe("Proxy tests", () => { const noProxyList = "www.zowe.com, fake.com,ibm.com,broadcom.com "; const passedUrl = "passedurl.com"; let getProxySettingsSpy: jest.SpyInstance; + let getProxyAuthSettingSpy: jest.SpyInstance; let checkUrlSpy: jest.SpyInstance; + let matchesNoProxySettingsSpy: jest.SpyInstance; describe("recognise passed proxy values in session", () => { const noProxySpy = jest.spyOn(privateProxy, "matchesNoProxySettings"); @@ -40,7 +42,7 @@ describe("Proxy tests", () => { checkUrlSpy = jest.spyOn(privateProxy, "checkUrl"); const expected = { proxyUrl: passedUrl, - protocol: HTTPS_PROTOCOL + protocol: HTTPS_PROTOCOL, }; beforeEach(() => { @@ -55,7 +57,9 @@ describe("Proxy tests", () => { expect(httpEnvVarSpy).not.toHaveBeenCalled(); expect(httpsEnvVarSpy).not.toHaveBeenCalled(); checkUrlSpy.mockReturnValueOnce(passedUrl); - expect(JSON.stringify(ProxySettings["getProxySettings"](session))).toEqual(JSON.stringify(expected)); + expect( + JSON.stringify(ProxySettings["getProxySettings"](session)) + ).toEqual(JSON.stringify(expected)); noProxySpy.mockClear(); checkUrlSpy.mockClear(); }); @@ -67,34 +71,89 @@ describe("Proxy tests", () => { expect(httpEnvVarSpy).not.toHaveBeenCalled(); expect(httpsEnvVarSpy).not.toHaveBeenCalled(); checkUrlSpy.mockReturnValueOnce(passedUrl); - expect(JSON.stringify(ProxySettings["getProxySettings"](session))).toEqual(JSON.stringify(expected)); + expect( + JSON.stringify(ProxySettings["getProxySettings"](session)) + ).toEqual(JSON.stringify(expected)); noProxySpy.mockClear(); checkUrlSpy.mockClear(); }); }); describe("getProxyAgent", () => { + const headers = { + "Proxy-Authorization": "Basic ==ThisIsATest123", + }; + beforeEach(() => { jest.clearAllMocks(); + jest.restoreAllMocks(); + jest.resetModules(); + jest.resetAllMocks(); getProxySettingsSpy = jest.spyOn(privateProxy, "getProxySettings"); + getProxyAuthSettingSpy = jest.spyOn( + privateProxy, + "getProxyAuthHeader" + ); }); it("Should retrieve the HTTP proxy agent", () => { - const expected = new HttpProxyAgent(httpUrl); + const expected = new HttpProxyAgent(httpUrl, { headers }); getProxySettingsSpy.mockReturnValue({ proxyUrl: httpUrl, - protocol: HTTP_PROTOCOL + protocol: HTTP_PROTOCOL, }); - expect(JSON.stringify(ProxySettings.getProxyAgent(session))).toEqual(JSON.stringify(expected)); + getProxyAuthSettingSpy.mockReturnValue(headers); + expect( + JSON.stringify(ProxySettings.getProxyAgent(session)) + ).toEqual(JSON.stringify(expected)); }); it("Should retrieve the HTTPS proxy agent", () => { - const expected = new HttpsProxyAgent(httpsUrl, { rejectUnauthorized: false }); + const expected = new HttpsProxyAgent(httpsUrl, { + rejectUnauthorized: false, + }); getProxySettingsSpy.mockReturnValue({ proxyUrl: httpsUrl, - protocol: HTTPS_PROTOCOL + protocol: HTTPS_PROTOCOL, }); - expect(JSON.stringify(ProxySettings.getProxyAgent(session))).toEqual(JSON.stringify(expected)); + expect( + JSON.stringify(ProxySettings.getProxyAgent(session)) + ).toEqual(JSON.stringify(expected)); + }); + + it("Should return undefined when a protocol is not defined in the session", () => { + const noProtocolSession = { ...session }; + noProtocolSession.protocol = undefined; + expect(ProxySettings.getProxyAgent(session)).toEqual(undefined); + }); + }); + + describe("getProxyAuthHeader", () => { + beforeEach(() => { + jest.clearAllMocks(); + jest.restoreAllMocks(); + jest.resetModules(); + jest.resetAllMocks(); + }); + + it("Should retrieve the auth header from the proxy settings", () => { + const proxyAuthSetting = "Basic ==ThisIsATest123"; + expect( + ProxySettings["getProxyAuthHeader"]({ + authSetting: proxyAuthSetting, + proxyUrl: new URL("https://www.google.com/"), + protocol: HTTPS_PROTOCOL, + }) + ).toEqual({ "Proxy-Authorization": proxyAuthSetting }); + }); + + it("Should return undefined if the proxy auth setting is not in the proxy settings", () => { + expect( + ProxySettings["getProxyAuthHeader"]({ + proxyUrl: new URL("https://www.google.com/"), + protocol: HTTPS_PROTOCOL, + }) + ).toEqual(undefined); }); }); @@ -107,7 +166,7 @@ describe("Proxy tests", () => { it("Should retrieve the system proxy URL", () => { getProxySettingsSpy.mockReturnValue({ proxyUrl: httpsUrl, - protocol: HTTPS_PROTOCOL + protocol: HTTPS_PROTOCOL, }); expect(ProxySettings.getSystemProxyUrl(session)).toEqual(httpsUrl); }); @@ -116,16 +175,36 @@ describe("Proxy tests", () => { describe("getProxySettings", () => { beforeEach(() => { jest.clearAllMocks(); + jest.restoreAllMocks(); + jest.resetModules(); + jest.resetAllMocks(); checkUrlSpy = jest.spyOn(privateProxy, "checkUrl"); + matchesNoProxySettingsSpy = jest.spyOn( + privateProxy, + "matchesNoProxySettings" + ); }); it("Should return proxy settings from session", () => { const expected = { proxyUrl: httpsUrl, - protocol: HTTPS_PROTOCOL + protocol: HTTPS_PROTOCOL, + authSetting: "Basic ==ThisIsATest123", }; checkUrlSpy.mockReturnValue(httpsUrl); - expect(ProxySettings["getProxySettings"](session)).toEqual(expected); + session.proxy = { + proxy_authorization: "Basic ==ThisIsATest123", + }; + expect(ProxySettings["getProxySettings"](session)).toEqual( + expected + ); + }); + + it("Should return undefined proxy url matchesNoProxySettings", () => { + matchesNoProxySettingsSpy.mockReturnValue(true); + expect(ProxySettings["getProxySettings"](session)).toEqual( + undefined + ); }); }); @@ -143,28 +222,46 @@ describe("Proxy tests", () => { }); describe("matchesNoProxySettings", () => { - it("Should match session hostname with no_proxy", () => { + beforeEach(() => { + jest.clearAllMocks(); + jest.restoreAllMocks(); + jest.resetModules(); + jest.resetAllMocks(); + }); + + it("Should match session hostname with no_proxy", () => { const expected = true; process.env["NO_PROXY"] = noProxyList; - expect(ProxySettings["matchesNoProxySettings"](session)).toEqual(expected); + expect(ProxySettings["matchesNoProxySettings"](session)).toEqual( + expected + ); process.env["NO_PROXY"] = undefined; }); it("Should return true for match with no_proxy passed with session proxy", () => { session.proxy = { http_proxy: passedUrl, no_proxy: ["fake.com"] }; session.protocol = HTTP_PROTOCOL; - expect(ProxySettings["matchesNoProxySettings"](session)).toEqual(true); + expect(ProxySettings["matchesNoProxySettings"](session)).toEqual( + true + ); }); - it("Should not match session hostname with no_proxy", () => { + it("Should not match session hostname with no_proxy", () => { const expected = false; process.env["NO_PROXY"] = noProxyList; session.hostname = "microsoft.com"; - expect(ProxySettings["matchesNoProxySettings"](session)).toEqual(expected); + expect(ProxySettings["matchesNoProxySettings"](session)).toEqual( + expected + ); process.env["NO_PROXY"] = undefined; }); it("Should return false for match with no_proxy passed with session proxy", () => { - session.proxy = { http_proxy: passedUrl, no_proxy: ["false.com", "blah.com"] }; + session.proxy = { + http_proxy: passedUrl, + no_proxy: ["false.com", "blah.com"], + }; session.protocol = HTTP_PROTOCOL; - expect(ProxySettings["matchesNoProxySettings"](session)).toEqual(false); + expect(ProxySettings["matchesNoProxySettings"](session)).toEqual( + false + ); }); }); }); diff --git a/packages/imperative/src/rest/src/client/ProxySettings.ts b/packages/imperative/src/rest/src/client/ProxySettings.ts index 6132e9e20b..c9cc78aaab 100644 --- a/packages/imperative/src/rest/src/client/ProxySettings.ts +++ b/packages/imperative/src/rest/src/client/ProxySettings.ts @@ -1,22 +1,26 @@ /* -* This program and the accompanying materials are made available under the terms of the -* Eclipse Public License v2.0 which accompanies this distribution, and is available at -* https://www.eclipse.org/legal/epl-v20.html -* -* SPDX-License-Identifier: EPL-2.0 -* -* Copyright Contributors to the Zowe Project. -* -*/ + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ -import { env } from 'process'; -import { URL } from 'url'; -import { Agent } from 'https'; -import { HttpProxyAgent } from 'http-proxy-agent'; -import { HttpsProxyAgent } from 'https-proxy-agent'; +import { env } from "process"; +import { URL } from "url"; +import { Agent } from "https"; +import { HttpProxyAgent } from "http-proxy-agent"; +import { HttpsProxyAgent } from "https-proxy-agent"; -import { HTTP_PROTOCOL_CHOICES, HTTP_PROTOCOL, HTTPS_PROTOCOL } from '../session/SessConstants'; -import { ISession } from '../session/doc/ISession'; +import { + HTTP_PROTOCOL_CHOICES, + HTTP_PROTOCOL, + HTTPS_PROTOCOL, +} from "../session/SessConstants"; +import { ISession } from "../session/doc/ISession"; /** * Utility class to provide an http agent to REST APIs that is configured for @@ -33,7 +37,6 @@ import { ISession } from '../session/doc/ISession'; * to match with the hostname of the Zowe profile. */ export class ProxySettings { - /** * Retrieve an appropriate http.agent instance if proxy environment variables can be found. * @static @@ -47,14 +50,18 @@ export class ProxySettings { const proxySetting = this.getProxySettings(session); const proxyOptions = {} as ProxyOptions; const authHeader = ProxySettings.getProxyAuthHeader(proxySetting); - if(authHeader) { + if (authHeader) { proxyOptions.headers = authHeader; } - if (proxySetting?.protocol === HTTP_PROTOCOL) { + if (!proxySetting?.protocol) { + return; + } + if (proxySetting.protocol === HTTP_PROTOCOL) { return new HttpProxyAgent(proxySetting.proxyUrl, proxyOptions); } - if (proxySetting?.protocol === HTTPS_PROTOCOL) { - proxyOptions.rejectUnauthorized = session.rejectUnauthorized ?? true; + if (proxySetting.protocol === HTTPS_PROTOCOL) { + proxyOptions.rejectUnauthorized = + session.rejectUnauthorized ?? true; return new HttpsProxyAgent(proxySetting.proxyUrl, proxyOptions); } } @@ -83,7 +90,8 @@ export class ProxySettings { * @memberof ProxySettings */ public static matchesNoProxySettings(session: ISession): boolean { - const noProxyValues = session.proxy?.no_proxy ?? this.getNoProxyEnvVariables(); + const noProxyValues = + session.proxy?.no_proxy ?? this.getNoProxyEnvVariables(); if (!noProxyValues) { return false; } @@ -93,10 +101,12 @@ export class ProxySettings { return false; } - private static getProxyAuthHeader(proxySetting: ProxySetting): { [key: string]: string } | undefined { - return proxySetting.authSetting - ? { 'Proxy-Authorization': proxySetting.authSetting } - : undefined; + private static getProxyAuthHeader( + proxySetting: ProxySetting + ): { [key: string]: string } | undefined { + return proxySetting?.authSetting + ? { "Proxy-Authorization": proxySetting.authSetting } + : undefined; } /** @@ -107,26 +117,29 @@ export class ProxySettings { * @returns instance of private `ProxySetting` or `undefined` * @memberof ProxySettings */ - private static getProxySettings(session: ISession): ProxySetting | undefined { + private static getProxySettings( + session: ISession + ): ProxySetting | undefined { if (this.matchesNoProxySettings(session)) { return; } const protocol = session.protocol ?? HTTPS_PROTOCOL; let envVariable: string | undefined; if (protocol === HTTP_PROTOCOL) { - envVariable = session.proxy?.http_proxy ?? this.getHttpEnvVariables(); - } - else if (protocol === HTTPS_PROTOCOL) { - envVariable = session.proxy?.https_proxy ?? this.getHttpsEnvVariables(); + envVariable = + session.proxy?.http_proxy ?? this.getHttpEnvVariables(); + } else if (protocol === HTTPS_PROTOCOL) { + envVariable = + session.proxy?.https_proxy ?? this.getHttpsEnvVariables(); } const proxyUrl = this.checkUrl(envVariable); const authSetting = session.proxy?.proxy_authorization; if (authSetting) { - return {proxyUrl, protocol, authSetting}; + return { proxyUrl, protocol, authSetting }; } if (proxyUrl) { - return {proxyUrl, protocol}; + return { proxyUrl, protocol }; } } @@ -165,7 +178,9 @@ export class ProxySettings { if (!noProxyValue) { return; } - return noProxyValue.split(',').map(entry => entry.trim().toLocaleLowerCase()); + return noProxyValue + .split(",") + .map((entry) => entry.trim().toLocaleLowerCase()); } /** @@ -189,12 +204,12 @@ export class ProxySettings { * Internal interface to group proxy settings */ interface ProxySetting { - proxyUrl: URL, - protocol: HTTP_PROTOCOL_CHOICES, - authSetting?: string + proxyUrl: URL; + protocol: HTTP_PROTOCOL_CHOICES; + authSetting?: string; } interface ProxyOptions { - headers?: { [key: string]: string }, - rejectUnauthorized?: boolean + headers?: { [key: string]: string }; + rejectUnauthorized?: boolean; } From d90f8c05aae04fe06407b2089c1de206721d937b Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:19:12 -0500 Subject: [PATCH 41/52] Update code formatting Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- .../client/ProxySettings.unit.test.ts | 18 +++++++++--------- .../src/rest/src/client/ProxySettings.ts | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/imperative/src/rest/__tests__/client/ProxySettings.unit.test.ts b/packages/imperative/src/rest/__tests__/client/ProxySettings.unit.test.ts index 9aeb24ca7b..f6ff5aac4c 100644 --- a/packages/imperative/src/rest/__tests__/client/ProxySettings.unit.test.ts +++ b/packages/imperative/src/rest/__tests__/client/ProxySettings.unit.test.ts @@ -1,13 +1,13 @@ /* - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-v20.html - * - * SPDX-License-Identifier: EPL-2.0 - * - * Copyright Contributors to the Zowe Project. - * - */ +* This program and the accompanying materials are made available under the terms of the +* Eclipse Public License v2.0 which accompanies this distribution, and is available at +* https://www.eclipse.org/legal/epl-v20.html +* +* SPDX-License-Identifier: EPL-2.0 +* +* Copyright Contributors to the Zowe Project. +* +*/ import * as process from "process"; diff --git a/packages/imperative/src/rest/src/client/ProxySettings.ts b/packages/imperative/src/rest/src/client/ProxySettings.ts index c9cc78aaab..56b8438d3f 100644 --- a/packages/imperative/src/rest/src/client/ProxySettings.ts +++ b/packages/imperative/src/rest/src/client/ProxySettings.ts @@ -1,13 +1,13 @@ /* - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-v20.html - * - * SPDX-License-Identifier: EPL-2.0 - * - * Copyright Contributors to the Zowe Project. - * - */ +* This program and the accompanying materials are made available under the terms of the +* Eclipse Public License v2.0 which accompanies this distribution, and is available at +* https://www.eclipse.org/legal/epl-v20.html +* +* SPDX-License-Identifier: EPL-2.0 +* +* Copyright Contributors to the Zowe Project. +* +*/ import { env } from "process"; import { URL } from "url"; From dbee8155d630754433e4081a3851518d4abf3230 Mon Sep 17 00:00:00 2001 From: anaxceron Date: Mon, 16 Dec 2024 14:20:32 -0500 Subject: [PATCH 42/52] edit per adam feedback Signed-off-by: anaxceron --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b8a9c0c926..96ffb1047c 100644 --- a/README.md +++ b/README.md @@ -229,7 +229,7 @@ npm run test:system - Secure credential encryption is included in the core CLI. - - V3 includes the preceding features. Additionally, deprecates support for Zowe V1 profiles. + - V3 includes the preceding features. Additionally, removes support for Zowe V1 profiles. - To upgrade from an older Zowe release, see [Migrating from Zowe Vx to Zowe V3](https://docs.zowe.org/stable/whats-new/zowe-v3-migratio3). From b7a9da3bc941f028b854b71d276ed09932597433 Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:25:26 -0500 Subject: [PATCH 43/52] Update CHANGELOG.md Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- packages/imperative/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/imperative/CHANGELOG.md b/packages/imperative/CHANGELOG.md index 52915b7f41..e2a4a0c96f 100644 --- a/packages/imperative/CHANGELOG.md +++ b/packages/imperative/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes to the Imperative package will be documented in this file. - BugFix: Modified 8.8.2 bugfix to correct web help alias. [#2361](https://github.com/zowe/zowe-cli/pull/2361) - BugFix: Resolved issue where special characters could be corrupted when downloading a large file. [#2366](https://github.com/zowe/zowe-cli/pull/2366) -- BugFix: Modified location of Proxy-Authorization header to be located in the agent instead of the request. +- BugFix: Modified location of Proxy-Authorization header to be located in the agent instead of the request. [#2389](https://github.com/zowe/zowe-cli/issues/2389) ## `8.8.2` From c0c27c135179fe979a3efa48447bdf50d946231a Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:34:37 -0500 Subject: [PATCH 44/52] Update CHANGELOG.md Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- packages/imperative/CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/imperative/CHANGELOG.md b/packages/imperative/CHANGELOG.md index e2a4a0c96f..2e6f0212a5 100644 --- a/packages/imperative/CHANGELOG.md +++ b/packages/imperative/CHANGELOG.md @@ -2,11 +2,14 @@ All notable changes to the Imperative package will be documented in this file. +## Recent Changes + +- BugFix: Modified location of Proxy-Authorization header to be located in the agent instead of the request. [#2389](https://github.com/zowe/zowe-cli/issues/2389) + ## `8.8.3` - BugFix: Modified 8.8.2 bugfix to correct web help alias. [#2361](https://github.com/zowe/zowe-cli/pull/2361) - BugFix: Resolved issue where special characters could be corrupted when downloading a large file. [#2366](https://github.com/zowe/zowe-cli/pull/2366) -- BugFix: Modified location of Proxy-Authorization header to be located in the agent instead of the request. [#2389](https://github.com/zowe/zowe-cli/issues/2389) ## `8.8.2` From 903fa3055e19417fc0102e52e02bbab0efb025d7 Mon Sep 17 00:00:00 2001 From: Pujal Gandhi <71276682+pujal0909@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:50:14 -0500 Subject: [PATCH 45/52] Update packages/zosfiles/CHANGELOG.md Co-authored-by: Trae Yelovich Signed-off-by: Pujal Gandhi <71276682+pujal0909@users.noreply.github.com> --- packages/zosfiles/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zosfiles/CHANGELOG.md b/packages/zosfiles/CHANGELOG.md index 52ed872de6..50a6326d17 100644 --- a/packages/zosfiles/CHANGELOG.md +++ b/packages/zosfiles/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to the Zowe z/OS files SDK package will be documented in this file. ## Recent Changes -- Enhancement: The `Copy.dataset` method now recognizes partioned data sets and can copy members of a source PDS into an existing target PDS. [#2386](https://github.com/zowe/zowe-cli/pull/2386) +- Enhancement: The `Copy.dataset` method now recognizes partitioned data sets and can copy members of a source PDS into an existing target PDS. [#2386](https://github.com/zowe/zowe-cli/pull/2386) ## `8.9.1` From 1ae21230fabf8580cd842f263f2b8146ac776f2c Mon Sep 17 00:00:00 2001 From: jace-roell Date: Mon, 16 Dec 2024 15:55:06 -0500 Subject: [PATCH 46/52] changelog Signed-off-by: jace-roell --- packages/imperative/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/imperative/CHANGELOG.md b/packages/imperative/CHANGELOG.md index 52045f1d05..8531bdc5ca 100644 --- a/packages/imperative/CHANGELOG.md +++ b/packages/imperative/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to the Imperative package will be documented in this file. ## Recent Changes -- BugFix: Resolved issue where team config base profiles were being overwritten if a user config did not have a base profile. [#2383](https://github.com/zowe/zowe-cli/pull/2383) +- BugFix: Resolved an issue where base profiles in a team configuration file were overwritten when a user configuration file did not include a base profile. [#2383](https://github.com/zowe/zowe-cli/pull/2383) ## `8.8.3` From c2a618cb5c245ba2d9d7f92678bcdbb4d4acf234 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Mon, 16 Dec 2024 15:57:24 -0500 Subject: [PATCH 47/52] linting Signed-off-by: jace-roell --- .../methods/upload/Upload.system.test.ts | 6 +++++- .../methods/upload/Upload.unit.test.ts | 1 - packages/zosfiles/src/methods/upload/Upload.ts | 18 ++++++++++++++---- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts b/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts index 744a2d4542..b93d74db4c 100644 --- a/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts +++ b/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts @@ -326,7 +326,11 @@ describe("Upload Data Set", () => { expect(error).toBeFalsy(); - expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "","to": dsname+"(TEST)"}); + expect(uploadResponse.apiResponse).toMatchObject({ + success: true, + from: "", + to: dsname + "(TEST)", + }); expect(Buffer.from(getResponse.toString().trim())).toEqual(data); }); diff --git a/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts b/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts index c0f92eb905..3e758ae690 100644 --- a/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts +++ b/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts @@ -22,7 +22,6 @@ import { IUploadOptions } from "../../../../src/methods/upload/doc/IUploadOption import { Upload } from "../../../../src/methods/upload/Upload"; import { List } from "../../../../src/methods/list/List"; import { Utilities } from "../../../../src/methods/utilities/Utilities"; -import { inspect } from "util"; import { ZosFilesUtils } from "../../../../src/utils/ZosFilesUtils"; import { stripNewLines } from "../../../../../../__tests__/__src__/TestUtils"; import { Create } from "../../../../src/methods/create"; diff --git a/packages/zosfiles/src/methods/upload/Upload.ts b/packages/zosfiles/src/methods/upload/Upload.ts index 9301c81bfc..af363ef988 100644 --- a/packages/zosfiles/src/methods/upload/Upload.ts +++ b/packages/zosfiles/src/methods/upload/Upload.ts @@ -187,8 +187,13 @@ export class Upload { // By default, apiResponse is empty when uploading const apiResponse: any = { success: true, - from: fileBuffer.length > maxBufferPreviewSize ? inspect(fileBuffer.subarray(0, maxBufferPreviewSize)).slice(0, -1) + "...>" : inspect(fileBuffer), - to: dataSetName + from: + fileBuffer.length > maxBufferPreviewSize + ? inspect( + fileBuffer.subarray(0, maxBufferPreviewSize) + ).slice(0, -1) + "...>" + : inspect(fileBuffer), + to: dataSetName, }; // Return Etag in apiResponse, if requested @@ -493,8 +498,13 @@ export class Upload { // By default, apiResponse is empty when uploading const apiResponse: any = { success: true, - from: fileBuffer.length > maxBufferPreviewSize ? inspect(fileBuffer.subarray(0, maxBufferPreviewSize)).slice(0, -1) + "...>" : inspect(fileBuffer), - to: origUssname + from: + fileBuffer.length > maxBufferPreviewSize + ? inspect( + fileBuffer.subarray(0, maxBufferPreviewSize) + ).slice(0, -1) + "...>" + : inspect(fileBuffer), + to: origUssname, }; // Return Etag in apiResponse, if requested From 5b85f223c3ed69efd26983b722a3b2eedd5c28e7 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Tue, 17 Dec 2024 15:54:03 -0500 Subject: [PATCH 48/52] user config osLoc fix and unit test Signed-off-by: jace-roell --- .../config/__tests__/ProfileInfo.TeamConfig.unit.test.ts | 9 ++++++++- packages/imperative/src/config/src/ProfileInfo.ts | 4 ---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts b/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts index 1ed8dd659d..8732ef1399 100644 --- a/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts +++ b/packages/imperative/src/config/__tests__/ProfileInfo.TeamConfig.unit.test.ts @@ -677,7 +677,14 @@ describe("TeamConfig ProfileInfo tests", () => { expect(arg.argValue).toEqual(expectedArgs[idx].argValue); expect(arg.argLoc.locType).toBe(ProfLocType.TEAM_CONFIG); expect(arg.argLoc.jsonLoc).toMatch(/^profiles\.(base_glob|LPAR2_home)\.properties\./); - expect(arg.argLoc.osLoc[0]).toEqual(path.normalize(path.join(teamHomeProjDir, `${testAppNm}.config.json`))); + expect([ + path.normalize( + path.join(teamHomeProjDir, `${testAppNm}.config.json`) + ), + path.normalize( + path.join(teamProjDir, `${testAppNm}.config.json`) + ), + ]).toContain(arg.argLoc.osLoc[0]); } }); diff --git a/packages/imperative/src/config/src/ProfileInfo.ts b/packages/imperative/src/config/src/ProfileInfo.ts index dd0c771161..e65a079e28 100644 --- a/packages/imperative/src/config/src/ProfileInfo.ts +++ b/packages/imperative/src/config/src/ProfileInfo.ts @@ -1654,16 +1654,12 @@ export class ProfileInfo { }; let filePath: string; - if (_isPropInLayer(opts.configProperties) && opts.osLocInfo) { - filePath = opts.osLocInfo.path; - } else { for (const layer of this.mLoadedConfig.mLayers) { // Find the first layer that includes the JSON path if (_isPropInLayer(layer.properties)) { filePath = layer.path; break; } - } } return [{ From 9220a1020a5b1cb9974a3f4ea4bb3a1d38a481aa Mon Sep 17 00:00:00 2001 From: zowe-robot Date: Tue, 17 Dec 2024 21:48:50 +0000 Subject: [PATCH 49/52] Bump version to 8.10.0 [ci skip] Signed-off-by: zowe-robot --- .../__packages__/cli-test-utils/package.json | 4 +- lerna.json | 2 +- npm-shrinkwrap.json | 116 +++++++++--------- packages/cli/CHANGELOG.md | 2 +- packages/cli/package.json | 26 ++-- packages/core/package.json | 6 +- packages/imperative/CHANGELOG.md | 2 +- packages/imperative/package.json | 2 +- packages/provisioning/package.json | 8 +- packages/workflows/package.json | 10 +- packages/zosconsole/package.json | 8 +- packages/zosfiles/CHANGELOG.md | 2 +- packages/zosfiles/package.json | 10 +- packages/zosjobs/package.json | 10 +- packages/zoslogs/package.json | 8 +- packages/zosmf/package.json | 8 +- packages/zostso/package.json | 10 +- packages/zosuss/package.json | 6 +- 18 files changed, 120 insertions(+), 120 deletions(-) diff --git a/__tests__/__packages__/cli-test-utils/package.json b/__tests__/__packages__/cli-test-utils/package.json index 955e3b2ebc..e9f85b05d8 100644 --- a/__tests__/__packages__/cli-test-utils/package.json +++ b/__tests__/__packages__/cli-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/cli-test-utils", - "version": "8.8.3", + "version": "8.10.0", "description": "Test utilities package for Zowe CLI plug-ins", "author": "Zowe", "license": "EPL-2.0", @@ -43,7 +43,7 @@ "devDependencies": { "@types/js-yaml": "^4.0.9", "@types/uuid": "^10.0.0", - "@zowe/imperative": "8.8.3" + "@zowe/imperative": "8.10.0" }, "peerDependencies": { "@zowe/imperative": "^8.0.0" diff --git a/lerna.json b/lerna.json index 8d7b46ef3a..20d40cb3b5 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "8.9.1", + "version": "8.10.0", "command": { "publish": { "ignoreChanges": [ diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 2579acc821..486f42b2ad 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -52,7 +52,7 @@ }, "__tests__/__packages__/cli-test-utils": { "name": "@zowe/cli-test-utils", - "version": "8.8.3", + "version": "8.10.0", "license": "EPL-2.0", "dependencies": { "find-up": "^5.0.0", @@ -63,7 +63,7 @@ "devDependencies": { "@types/js-yaml": "^4.0.9", "@types/uuid": "^10.0.0", - "@zowe/imperative": "8.8.3" + "@zowe/imperative": "8.10.0" }, "peerDependencies": { "@zowe/imperative": "^8.0.0" @@ -16269,21 +16269,21 @@ }, "packages/cli": { "name": "@zowe/cli", - "version": "8.9.1", + "version": "8.10.0", "hasInstallScript": true, "license": "EPL-2.0", "dependencies": { - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3", - "@zowe/provisioning-for-zowe-sdk": "8.8.3", - "@zowe/zos-console-for-zowe-sdk": "8.8.3", - "@zowe/zos-files-for-zowe-sdk": "8.9.1", - "@zowe/zos-jobs-for-zowe-sdk": "8.9.1", - "@zowe/zos-logs-for-zowe-sdk": "8.8.3", - "@zowe/zos-tso-for-zowe-sdk": "8.8.3", - "@zowe/zos-uss-for-zowe-sdk": "8.8.3", - "@zowe/zos-workflows-for-zowe-sdk": "8.9.1", - "@zowe/zosmf-for-zowe-sdk": "8.8.3", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0", + "@zowe/provisioning-for-zowe-sdk": "8.10.0", + "@zowe/zos-console-for-zowe-sdk": "8.10.0", + "@zowe/zos-files-for-zowe-sdk": "8.10.0", + "@zowe/zos-jobs-for-zowe-sdk": "8.10.0", + "@zowe/zos-logs-for-zowe-sdk": "8.10.0", + "@zowe/zos-tso-for-zowe-sdk": "8.10.0", + "@zowe/zos-uss-for-zowe-sdk": "8.10.0", + "@zowe/zos-workflows-for-zowe-sdk": "8.10.0", + "@zowe/zosmf-for-zowe-sdk": "8.10.0", "find-process": "1.4.7", "lodash": "4.17.21", "minimatch": "9.0.5", @@ -16296,7 +16296,7 @@ "@types/diff": "^5.0.9", "@types/lodash": "^4.17.6", "@types/tar": "^6.1.11", - "@zowe/cli-test-utils": "8.8.3", + "@zowe/cli-test-utils": "8.10.0", "comment-json": "^4.2.3", "strip-ansi": "^6.0.1", "which": "^4.0.0" @@ -16352,15 +16352,15 @@ }, "packages/core": { "name": "@zowe/core-for-zowe-sdk", - "version": "8.8.3", + "version": "8.10.0", "license": "EPL-2.0", "dependencies": { "comment-json": "~4.2.3", "string-width": "^4.2.3" }, "devDependencies": { - "@zowe/cli-test-utils": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/imperative": "8.10.0" }, "engines": { "node": ">=18.12.0" @@ -16371,7 +16371,7 @@ }, "packages/imperative": { "name": "@zowe/imperative", - "version": "8.8.3", + "version": "8.10.0", "license": "EPL-2.0", "dependencies": { "@types/yargs": "^17.0.32", @@ -16565,16 +16565,16 @@ }, "packages/provisioning": { "name": "@zowe/provisioning-for-zowe-sdk", - "version": "8.8.3", + "version": "8.10.0", "license": "EPL-2.0", "dependencies": { "js-yaml": "^4.1.0" }, "devDependencies": { "@types/js-yaml": "^4.0.9", - "@zowe/cli-test-utils": "8.8.3", - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0" }, "engines": { "node": ">=18.12.0" @@ -16599,15 +16599,15 @@ }, "packages/workflows": { "name": "@zowe/zos-workflows-for-zowe-sdk", - "version": "8.9.1", + "version": "8.10.0", "license": "EPL-2.0", "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.9.1" + "@zowe/zos-files-for-zowe-sdk": "8.10.0" }, "devDependencies": { - "@zowe/cli-test-utils": "8.8.3", - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0" }, "engines": { "node": ">=18.12.0" @@ -16619,12 +16619,12 @@ }, "packages/zosconsole": { "name": "@zowe/zos-console-for-zowe-sdk", - "version": "8.8.3", + "version": "8.10.0", "license": "EPL-2.0", "devDependencies": { - "@zowe/cli-test-utils": "8.8.3", - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0" }, "engines": { "node": ">=18.12.0" @@ -16636,17 +16636,17 @@ }, "packages/zosfiles": { "name": "@zowe/zos-files-for-zowe-sdk", - "version": "8.9.1", + "version": "8.10.0", "license": "EPL-2.0", "dependencies": { "lodash": "^4.17.21", "minimatch": "^9.0.5" }, "devDependencies": { - "@zowe/cli-test-utils": "8.8.3", - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3", - "@zowe/zos-uss-for-zowe-sdk": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0", + "@zowe/zos-uss-for-zowe-sdk": "8.10.0" }, "engines": { "node": ">=18.12.0" @@ -16678,15 +16678,15 @@ }, "packages/zosjobs": { "name": "@zowe/zos-jobs-for-zowe-sdk", - "version": "8.9.1", + "version": "8.10.0", "license": "EPL-2.0", "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.9.1" + "@zowe/zos-files-for-zowe-sdk": "8.10.0" }, "devDependencies": { - "@zowe/cli-test-utils": "8.8.3", - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0" }, "engines": { "node": ">=18.12.0" @@ -16698,12 +16698,12 @@ }, "packages/zoslogs": { "name": "@zowe/zos-logs-for-zowe-sdk", - "version": "8.8.3", + "version": "8.10.0", "license": "EPL-2.0", "devDependencies": { - "@zowe/cli-test-utils": "8.8.3", - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0" }, "engines": { "node": ">=18.12.0" @@ -16715,12 +16715,12 @@ }, "packages/zosmf": { "name": "@zowe/zosmf-for-zowe-sdk", - "version": "8.8.3", + "version": "8.10.0", "license": "EPL-2.0", "devDependencies": { - "@zowe/cli-test-utils": "8.8.3", - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0" }, "engines": { "node": ">=18.12.0" @@ -16732,15 +16732,15 @@ }, "packages/zostso": { "name": "@zowe/zos-tso-for-zowe-sdk", - "version": "8.8.3", + "version": "8.10.0", "license": "EPL-2.0", "dependencies": { - "@zowe/zosmf-for-zowe-sdk": "8.8.3" + "@zowe/zosmf-for-zowe-sdk": "8.10.0" }, "devDependencies": { - "@zowe/cli-test-utils": "8.8.3", - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0" }, "engines": { "node": ">=18.12.0" @@ -16752,15 +16752,15 @@ }, "packages/zosuss": { "name": "@zowe/zos-uss-for-zowe-sdk", - "version": "8.8.3", + "version": "8.10.0", "license": "EPL-2.0", "dependencies": { "ssh2": "^1.15.0" }, "devDependencies": { "@types/ssh2": "^1.11.19", - "@zowe/cli-test-utils": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/imperative": "8.10.0" }, "engines": { "node": ">=18.12.0" diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 979fb828ea..0533d487e2 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,7 +1,7 @@ # Change Log All notable changes to the Zowe CLI package will be documented in this file. -## Recent Changes +## `8.10.0` -Enhancement: The `zowe zos-files copy data-set` command now copies members from a source partitioned data set to an existing target partitioned data set.[#2386](https://github.com/zowe/zowe-cli/pull/2386) ## `8.9.0` diff --git a/packages/cli/package.json b/packages/cli/package.json index 8e49ec1c10..6f4a7fec69 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/cli", - "version": "8.9.1", + "version": "8.10.0", "zoweVersion": "v3.0.0", "description": "Zowe CLI is a command line interface (CLI) that provides a simple and streamlined way to interact with IBM z/OS.", "author": "Zowe", @@ -58,17 +58,17 @@ "preshrinkwrap": "node ../../scripts/rewriteShrinkwrap.js" }, "dependencies": { - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3", - "@zowe/provisioning-for-zowe-sdk": "8.8.3", - "@zowe/zos-console-for-zowe-sdk": "8.8.3", - "@zowe/zos-files-for-zowe-sdk": "8.9.1", - "@zowe/zos-jobs-for-zowe-sdk": "8.9.1", - "@zowe/zos-logs-for-zowe-sdk": "8.8.3", - "@zowe/zos-tso-for-zowe-sdk": "8.8.3", - "@zowe/zos-uss-for-zowe-sdk": "8.8.3", - "@zowe/zos-workflows-for-zowe-sdk": "8.9.1", - "@zowe/zosmf-for-zowe-sdk": "8.8.3", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0", + "@zowe/provisioning-for-zowe-sdk": "8.10.0", + "@zowe/zos-console-for-zowe-sdk": "8.10.0", + "@zowe/zos-files-for-zowe-sdk": "8.10.0", + "@zowe/zos-jobs-for-zowe-sdk": "8.10.0", + "@zowe/zos-logs-for-zowe-sdk": "8.10.0", + "@zowe/zos-tso-for-zowe-sdk": "8.10.0", + "@zowe/zos-uss-for-zowe-sdk": "8.10.0", + "@zowe/zos-workflows-for-zowe-sdk": "8.10.0", + "@zowe/zosmf-for-zowe-sdk": "8.10.0", "find-process": "1.4.7", "lodash": "4.17.21", "minimatch": "9.0.5", @@ -78,7 +78,7 @@ "@types/diff": "^5.0.9", "@types/lodash": "^4.17.6", "@types/tar": "^6.1.11", - "@zowe/cli-test-utils": "8.8.3", + "@zowe/cli-test-utils": "8.10.0", "comment-json": "^4.2.3", "strip-ansi": "^6.0.1", "which": "^4.0.0" diff --git a/packages/core/package.json b/packages/core/package.json index abc273e430..bd4db2f727 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/core-for-zowe-sdk", - "version": "8.8.3", + "version": "8.10.0", "description": "Core libraries shared by Zowe SDK packages", "author": "Zowe", "license": "EPL-2.0", @@ -49,8 +49,8 @@ "string-width": "^4.2.3" }, "devDependencies": { - "@zowe/cli-test-utils": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/imperative": "8.10.0" }, "peerDependencies": { "@zowe/imperative": "^8.0.0" diff --git a/packages/imperative/CHANGELOG.md b/packages/imperative/CHANGELOG.md index 2e6f0212a5..06395afdc1 100644 --- a/packages/imperative/CHANGELOG.md +++ b/packages/imperative/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to the Imperative package will be documented in this file. -## Recent Changes +## `8.10.0` - BugFix: Modified location of Proxy-Authorization header to be located in the agent instead of the request. [#2389](https://github.com/zowe/zowe-cli/issues/2389) diff --git a/packages/imperative/package.json b/packages/imperative/package.json index 6b197330b6..addb75bd41 100644 --- a/packages/imperative/package.json +++ b/packages/imperative/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/imperative", - "version": "8.8.3", + "version": "8.10.0", "description": "framework for building configurable CLIs", "author": "Zowe", "license": "EPL-2.0", diff --git a/packages/provisioning/package.json b/packages/provisioning/package.json index 74ba89c9c2..2453327ebf 100644 --- a/packages/provisioning/package.json +++ b/packages/provisioning/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/provisioning-for-zowe-sdk", - "version": "8.8.3", + "version": "8.10.0", "description": "Zowe SDK to interact with the z/OS provisioning APIs", "author": "Zowe", "license": "EPL-2.0", @@ -49,9 +49,9 @@ }, "devDependencies": { "@types/js-yaml": "^4.0.9", - "@zowe/cli-test-utils": "8.8.3", - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/workflows/package.json b/packages/workflows/package.json index 6bccd466ac..696c7bf8b8 100644 --- a/packages/workflows/package.json +++ b/packages/workflows/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-workflows-for-zowe-sdk", - "version": "8.9.1", + "version": "8.10.0", "description": "Zowe SDK to interact with the z/OS workflows APIs", "author": "Zowe", "license": "EPL-2.0", @@ -45,12 +45,12 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.9.1" + "@zowe/zos-files-for-zowe-sdk": "8.10.0" }, "devDependencies": { - "@zowe/cli-test-utils": "8.8.3", - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zosconsole/package.json b/packages/zosconsole/package.json index cd8be18e9c..1f0e7d4dad 100644 --- a/packages/zosconsole/package.json +++ b/packages/zosconsole/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-console-for-zowe-sdk", - "version": "8.8.3", + "version": "8.10.0", "description": "Zowe SDK to interact with the z/OS console", "author": "Zowe", "license": "EPL-2.0", @@ -45,9 +45,9 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "devDependencies": { - "@zowe/cli-test-utils": "8.8.3", - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zosfiles/CHANGELOG.md b/packages/zosfiles/CHANGELOG.md index 50a6326d17..739c33feaa 100644 --- a/packages/zosfiles/CHANGELOG.md +++ b/packages/zosfiles/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to the Zowe z/OS files SDK package will be documented in this file. -## Recent Changes +## `8.10.0` - Enhancement: The `Copy.dataset` method now recognizes partitioned data sets and can copy members of a source PDS into an existing target PDS. [#2386](https://github.com/zowe/zowe-cli/pull/2386) ## `8.9.1` diff --git a/packages/zosfiles/package.json b/packages/zosfiles/package.json index d04f8d8499..27302db5f8 100644 --- a/packages/zosfiles/package.json +++ b/packages/zosfiles/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-files-for-zowe-sdk", - "version": "8.9.1", + "version": "8.10.0", "description": "Zowe SDK to interact with files and data sets on z/OS", "author": "Zowe", "license": "EPL-2.0", @@ -50,10 +50,10 @@ "minimatch": "^9.0.5" }, "devDependencies": { - "@zowe/cli-test-utils": "8.8.3", - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3", - "@zowe/zos-uss-for-zowe-sdk": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0", + "@zowe/zos-uss-for-zowe-sdk": "8.10.0" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zosjobs/package.json b/packages/zosjobs/package.json index 17db41fd33..d403fdb683 100644 --- a/packages/zosjobs/package.json +++ b/packages/zosjobs/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-jobs-for-zowe-sdk", - "version": "8.9.1", + "version": "8.10.0", "description": "Zowe SDK to interact with jobs on z/OS", "author": "Zowe", "license": "EPL-2.0", @@ -46,12 +46,12 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.9.1" + "@zowe/zos-files-for-zowe-sdk": "8.10.0" }, "devDependencies": { - "@zowe/cli-test-utils": "8.8.3", - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zoslogs/package.json b/packages/zoslogs/package.json index 954d6aa8cb..4d5cce70e9 100644 --- a/packages/zoslogs/package.json +++ b/packages/zoslogs/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-logs-for-zowe-sdk", - "version": "8.8.3", + "version": "8.10.0", "description": "Zowe SDK to interact with the z/OS logs", "author": "Zowe", "license": "EPL-2.0", @@ -45,9 +45,9 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "devDependencies": { - "@zowe/cli-test-utils": "8.8.3", - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zosmf/package.json b/packages/zosmf/package.json index 1dee4b9536..fa09136aa6 100644 --- a/packages/zosmf/package.json +++ b/packages/zosmf/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zosmf-for-zowe-sdk", - "version": "8.8.3", + "version": "8.10.0", "description": "Zowe SDK to interact with the z/OS Management Facility", "author": "Zowe", "license": "EPL-2.0", @@ -44,9 +44,9 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "devDependencies": { - "@zowe/cli-test-utils": "8.8.3", - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zostso/package.json b/packages/zostso/package.json index 92baabc181..41a72be750 100644 --- a/packages/zostso/package.json +++ b/packages/zostso/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-tso-for-zowe-sdk", - "version": "8.8.3", + "version": "8.10.0", "description": "Zowe SDK to interact with TSO on z/OS", "author": "Zowe", "license": "EPL-2.0", @@ -45,12 +45,12 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "dependencies": { - "@zowe/zosmf-for-zowe-sdk": "8.8.3" + "@zowe/zosmf-for-zowe-sdk": "8.10.0" }, "devDependencies": { - "@zowe/cli-test-utils": "8.8.3", - "@zowe/core-for-zowe-sdk": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.0", + "@zowe/imperative": "8.10.0" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zosuss/package.json b/packages/zosuss/package.json index 70da59fb65..60e7ffbd0a 100644 --- a/packages/zosuss/package.json +++ b/packages/zosuss/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-uss-for-zowe-sdk", - "version": "8.8.3", + "version": "8.10.0", "description": "Zowe SDK to interact with USS on z/OS", "author": "Zowe", "license": "EPL-2.0", @@ -49,8 +49,8 @@ }, "devDependencies": { "@types/ssh2": "^1.11.19", - "@zowe/cli-test-utils": "8.8.3", - "@zowe/imperative": "8.8.3" + "@zowe/cli-test-utils": "8.10.0", + "@zowe/imperative": "8.10.0" }, "peerDependencies": { "@zowe/imperative": "^8.0.0" From e2f465cdf5cd6cf8122257cb6273e65ee0cb1464 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Wed, 18 Dec 2024 09:57:24 -0500 Subject: [PATCH 50/52] linting warnings Signed-off-by: jace-roell --- file.ts | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 file.ts diff --git a/file.ts b/file.ts new file mode 100644 index 0000000000..70ab34a41b --- /dev/null +++ b/file.ts @@ -0,0 +1,8 @@ +const { ProfileInfo } = require("@zowe/imperative"); +(async () => { + const profInfo = new ProfileInfo("zowe"); + await profInfo.readProfilesFromDisk(); + const upd = { profileName: "lpar1.test", profileType: "zosmf" }; + await profInfo.updateProperty({ ...upd, property: "user", value: "abc", setSecure: false }); + await profInfo.updateProperty({ ...upd, property: "password", value: "aa", setSecure: false }); +})(); \ No newline at end of file From 95a3fdd83a4ed39a97c9f426fcdba505218b136c Mon Sep 17 00:00:00 2001 From: jace-roell Date: Wed, 18 Dec 2024 09:59:06 -0500 Subject: [PATCH 51/52] rm dummy file and fix linting Signed-off-by: jace-roell --- file.ts | 8 -------- packages/imperative/src/config/src/ProfileInfo.ts | 12 ++++++------ 2 files changed, 6 insertions(+), 14 deletions(-) delete mode 100644 file.ts diff --git a/file.ts b/file.ts deleted file mode 100644 index 70ab34a41b..0000000000 --- a/file.ts +++ /dev/null @@ -1,8 +0,0 @@ -const { ProfileInfo } = require("@zowe/imperative"); -(async () => { - const profInfo = new ProfileInfo("zowe"); - await profInfo.readProfilesFromDisk(); - const upd = { profileName: "lpar1.test", profileType: "zosmf" }; - await profInfo.updateProperty({ ...upd, property: "user", value: "abc", setSecure: false }); - await profInfo.updateProperty({ ...upd, property: "password", value: "aa", setSecure: false }); -})(); \ No newline at end of file diff --git a/packages/imperative/src/config/src/ProfileInfo.ts b/packages/imperative/src/config/src/ProfileInfo.ts index e65a079e28..978a34cd9b 100644 --- a/packages/imperative/src/config/src/ProfileInfo.ts +++ b/packages/imperative/src/config/src/ProfileInfo.ts @@ -1654,12 +1654,12 @@ export class ProfileInfo { }; let filePath: string; - for (const layer of this.mLoadedConfig.mLayers) { - // Find the first layer that includes the JSON path - if (_isPropInLayer(layer.properties)) { - filePath = layer.path; - break; - } + for (const layer of this.mLoadedConfig.mLayers) { + // Find the first layer that includes the JSON path + if (_isPropInLayer(layer.properties)) { + filePath = layer.path; + break; + } } return [{ From 70213e1d9f4ca00b639cb75078dc7a18306dc83b Mon Sep 17 00:00:00 2001 From: zowe-robot Date: Wed, 18 Dec 2024 16:07:32 +0000 Subject: [PATCH 52/52] Bump version to 8.10.1 [ci skip] Signed-off-by: zowe-robot --- .../__packages__/cli-test-utils/package.json | 4 +- lerna.json | 2 +- npm-shrinkwrap.json | 116 +++++++++--------- packages/cli/package.json | 26 ++-- packages/core/package.json | 6 +- packages/imperative/CHANGELOG.md | 2 +- packages/imperative/package.json | 2 +- packages/provisioning/package.json | 8 +- packages/workflows/package.json | 10 +- packages/zosconsole/package.json | 8 +- packages/zosfiles/package.json | 10 +- packages/zosjobs/package.json | 10 +- packages/zoslogs/package.json | 8 +- packages/zosmf/package.json | 8 +- packages/zostso/package.json | 10 +- packages/zosuss/package.json | 6 +- 16 files changed, 118 insertions(+), 118 deletions(-) diff --git a/__tests__/__packages__/cli-test-utils/package.json b/__tests__/__packages__/cli-test-utils/package.json index e9f85b05d8..41c25d94fe 100644 --- a/__tests__/__packages__/cli-test-utils/package.json +++ b/__tests__/__packages__/cli-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/cli-test-utils", - "version": "8.10.0", + "version": "8.10.1", "description": "Test utilities package for Zowe CLI plug-ins", "author": "Zowe", "license": "EPL-2.0", @@ -43,7 +43,7 @@ "devDependencies": { "@types/js-yaml": "^4.0.9", "@types/uuid": "^10.0.0", - "@zowe/imperative": "8.10.0" + "@zowe/imperative": "8.10.1" }, "peerDependencies": { "@zowe/imperative": "^8.0.0" diff --git a/lerna.json b/lerna.json index 20d40cb3b5..1df9859d41 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "8.10.0", + "version": "8.10.1", "command": { "publish": { "ignoreChanges": [ diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 486f42b2ad..62f8db5971 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -52,7 +52,7 @@ }, "__tests__/__packages__/cli-test-utils": { "name": "@zowe/cli-test-utils", - "version": "8.10.0", + "version": "8.10.1", "license": "EPL-2.0", "dependencies": { "find-up": "^5.0.0", @@ -63,7 +63,7 @@ "devDependencies": { "@types/js-yaml": "^4.0.9", "@types/uuid": "^10.0.0", - "@zowe/imperative": "8.10.0" + "@zowe/imperative": "8.10.1" }, "peerDependencies": { "@zowe/imperative": "^8.0.0" @@ -16269,21 +16269,21 @@ }, "packages/cli": { "name": "@zowe/cli", - "version": "8.10.0", + "version": "8.10.1", "hasInstallScript": true, "license": "EPL-2.0", "dependencies": { - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0", - "@zowe/provisioning-for-zowe-sdk": "8.10.0", - "@zowe/zos-console-for-zowe-sdk": "8.10.0", - "@zowe/zos-files-for-zowe-sdk": "8.10.0", - "@zowe/zos-jobs-for-zowe-sdk": "8.10.0", - "@zowe/zos-logs-for-zowe-sdk": "8.10.0", - "@zowe/zos-tso-for-zowe-sdk": "8.10.0", - "@zowe/zos-uss-for-zowe-sdk": "8.10.0", - "@zowe/zos-workflows-for-zowe-sdk": "8.10.0", - "@zowe/zosmf-for-zowe-sdk": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1", + "@zowe/provisioning-for-zowe-sdk": "8.10.1", + "@zowe/zos-console-for-zowe-sdk": "8.10.1", + "@zowe/zos-files-for-zowe-sdk": "8.10.1", + "@zowe/zos-jobs-for-zowe-sdk": "8.10.1", + "@zowe/zos-logs-for-zowe-sdk": "8.10.1", + "@zowe/zos-tso-for-zowe-sdk": "8.10.1", + "@zowe/zos-uss-for-zowe-sdk": "8.10.1", + "@zowe/zos-workflows-for-zowe-sdk": "8.10.1", + "@zowe/zosmf-for-zowe-sdk": "8.10.1", "find-process": "1.4.7", "lodash": "4.17.21", "minimatch": "9.0.5", @@ -16296,7 +16296,7 @@ "@types/diff": "^5.0.9", "@types/lodash": "^4.17.6", "@types/tar": "^6.1.11", - "@zowe/cli-test-utils": "8.10.0", + "@zowe/cli-test-utils": "8.10.1", "comment-json": "^4.2.3", "strip-ansi": "^6.0.1", "which": "^4.0.0" @@ -16352,15 +16352,15 @@ }, "packages/core": { "name": "@zowe/core-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "license": "EPL-2.0", "dependencies": { "comment-json": "~4.2.3", "string-width": "^4.2.3" }, "devDependencies": { - "@zowe/cli-test-utils": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/imperative": "8.10.1" }, "engines": { "node": ">=18.12.0" @@ -16371,7 +16371,7 @@ }, "packages/imperative": { "name": "@zowe/imperative", - "version": "8.10.0", + "version": "8.10.1", "license": "EPL-2.0", "dependencies": { "@types/yargs": "^17.0.32", @@ -16565,16 +16565,16 @@ }, "packages/provisioning": { "name": "@zowe/provisioning-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "license": "EPL-2.0", "dependencies": { "js-yaml": "^4.1.0" }, "devDependencies": { "@types/js-yaml": "^4.0.9", - "@zowe/cli-test-utils": "8.10.0", - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1" }, "engines": { "node": ">=18.12.0" @@ -16599,15 +16599,15 @@ }, "packages/workflows": { "name": "@zowe/zos-workflows-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "license": "EPL-2.0", "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.10.0" + "@zowe/zos-files-for-zowe-sdk": "8.10.1" }, "devDependencies": { - "@zowe/cli-test-utils": "8.10.0", - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1" }, "engines": { "node": ">=18.12.0" @@ -16619,12 +16619,12 @@ }, "packages/zosconsole": { "name": "@zowe/zos-console-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "license": "EPL-2.0", "devDependencies": { - "@zowe/cli-test-utils": "8.10.0", - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1" }, "engines": { "node": ">=18.12.0" @@ -16636,17 +16636,17 @@ }, "packages/zosfiles": { "name": "@zowe/zos-files-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "license": "EPL-2.0", "dependencies": { "lodash": "^4.17.21", "minimatch": "^9.0.5" }, "devDependencies": { - "@zowe/cli-test-utils": "8.10.0", - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0", - "@zowe/zos-uss-for-zowe-sdk": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1", + "@zowe/zos-uss-for-zowe-sdk": "8.10.1" }, "engines": { "node": ">=18.12.0" @@ -16678,15 +16678,15 @@ }, "packages/zosjobs": { "name": "@zowe/zos-jobs-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "license": "EPL-2.0", "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.10.0" + "@zowe/zos-files-for-zowe-sdk": "8.10.1" }, "devDependencies": { - "@zowe/cli-test-utils": "8.10.0", - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1" }, "engines": { "node": ">=18.12.0" @@ -16698,12 +16698,12 @@ }, "packages/zoslogs": { "name": "@zowe/zos-logs-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "license": "EPL-2.0", "devDependencies": { - "@zowe/cli-test-utils": "8.10.0", - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1" }, "engines": { "node": ">=18.12.0" @@ -16715,12 +16715,12 @@ }, "packages/zosmf": { "name": "@zowe/zosmf-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "license": "EPL-2.0", "devDependencies": { - "@zowe/cli-test-utils": "8.10.0", - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1" }, "engines": { "node": ">=18.12.0" @@ -16732,15 +16732,15 @@ }, "packages/zostso": { "name": "@zowe/zos-tso-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "license": "EPL-2.0", "dependencies": { - "@zowe/zosmf-for-zowe-sdk": "8.10.0" + "@zowe/zosmf-for-zowe-sdk": "8.10.1" }, "devDependencies": { - "@zowe/cli-test-utils": "8.10.0", - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1" }, "engines": { "node": ">=18.12.0" @@ -16752,15 +16752,15 @@ }, "packages/zosuss": { "name": "@zowe/zos-uss-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "license": "EPL-2.0", "dependencies": { "ssh2": "^1.15.0" }, "devDependencies": { "@types/ssh2": "^1.11.19", - "@zowe/cli-test-utils": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/imperative": "8.10.1" }, "engines": { "node": ">=18.12.0" diff --git a/packages/cli/package.json b/packages/cli/package.json index 6f4a7fec69..cf52e04915 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/cli", - "version": "8.10.0", + "version": "8.10.1", "zoweVersion": "v3.0.0", "description": "Zowe CLI is a command line interface (CLI) that provides a simple and streamlined way to interact with IBM z/OS.", "author": "Zowe", @@ -58,17 +58,17 @@ "preshrinkwrap": "node ../../scripts/rewriteShrinkwrap.js" }, "dependencies": { - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0", - "@zowe/provisioning-for-zowe-sdk": "8.10.0", - "@zowe/zos-console-for-zowe-sdk": "8.10.0", - "@zowe/zos-files-for-zowe-sdk": "8.10.0", - "@zowe/zos-jobs-for-zowe-sdk": "8.10.0", - "@zowe/zos-logs-for-zowe-sdk": "8.10.0", - "@zowe/zos-tso-for-zowe-sdk": "8.10.0", - "@zowe/zos-uss-for-zowe-sdk": "8.10.0", - "@zowe/zos-workflows-for-zowe-sdk": "8.10.0", - "@zowe/zosmf-for-zowe-sdk": "8.10.0", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1", + "@zowe/provisioning-for-zowe-sdk": "8.10.1", + "@zowe/zos-console-for-zowe-sdk": "8.10.1", + "@zowe/zos-files-for-zowe-sdk": "8.10.1", + "@zowe/zos-jobs-for-zowe-sdk": "8.10.1", + "@zowe/zos-logs-for-zowe-sdk": "8.10.1", + "@zowe/zos-tso-for-zowe-sdk": "8.10.1", + "@zowe/zos-uss-for-zowe-sdk": "8.10.1", + "@zowe/zos-workflows-for-zowe-sdk": "8.10.1", + "@zowe/zosmf-for-zowe-sdk": "8.10.1", "find-process": "1.4.7", "lodash": "4.17.21", "minimatch": "9.0.5", @@ -78,7 +78,7 @@ "@types/diff": "^5.0.9", "@types/lodash": "^4.17.6", "@types/tar": "^6.1.11", - "@zowe/cli-test-utils": "8.10.0", + "@zowe/cli-test-utils": "8.10.1", "comment-json": "^4.2.3", "strip-ansi": "^6.0.1", "which": "^4.0.0" diff --git a/packages/core/package.json b/packages/core/package.json index bd4db2f727..91a8be1c76 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/core-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "description": "Core libraries shared by Zowe SDK packages", "author": "Zowe", "license": "EPL-2.0", @@ -49,8 +49,8 @@ "string-width": "^4.2.3" }, "devDependencies": { - "@zowe/cli-test-utils": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/imperative": "8.10.1" }, "peerDependencies": { "@zowe/imperative": "^8.0.0" diff --git a/packages/imperative/CHANGELOG.md b/packages/imperative/CHANGELOG.md index 31d5b27ac3..0ba57c37bf 100644 --- a/packages/imperative/CHANGELOG.md +++ b/packages/imperative/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to the Imperative package will be documented in this file. -## Recent Changes +## `8.10.1` - BugFix: Resolved an issue where base profiles in a team configuration file were overwritten when a user configuration file did not include a base profile. [#2383](https://github.com/zowe/zowe-cli/pull/2383) diff --git a/packages/imperative/package.json b/packages/imperative/package.json index addb75bd41..1f79f56d67 100644 --- a/packages/imperative/package.json +++ b/packages/imperative/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/imperative", - "version": "8.10.0", + "version": "8.10.1", "description": "framework for building configurable CLIs", "author": "Zowe", "license": "EPL-2.0", diff --git a/packages/provisioning/package.json b/packages/provisioning/package.json index 2453327ebf..d73cca706d 100644 --- a/packages/provisioning/package.json +++ b/packages/provisioning/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/provisioning-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "description": "Zowe SDK to interact with the z/OS provisioning APIs", "author": "Zowe", "license": "EPL-2.0", @@ -49,9 +49,9 @@ }, "devDependencies": { "@types/js-yaml": "^4.0.9", - "@zowe/cli-test-utils": "8.10.0", - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/workflows/package.json b/packages/workflows/package.json index 696c7bf8b8..83e62ab6ef 100644 --- a/packages/workflows/package.json +++ b/packages/workflows/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-workflows-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "description": "Zowe SDK to interact with the z/OS workflows APIs", "author": "Zowe", "license": "EPL-2.0", @@ -45,12 +45,12 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.10.0" + "@zowe/zos-files-for-zowe-sdk": "8.10.1" }, "devDependencies": { - "@zowe/cli-test-utils": "8.10.0", - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zosconsole/package.json b/packages/zosconsole/package.json index 1f0e7d4dad..a8bb679910 100644 --- a/packages/zosconsole/package.json +++ b/packages/zosconsole/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-console-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "description": "Zowe SDK to interact with the z/OS console", "author": "Zowe", "license": "EPL-2.0", @@ -45,9 +45,9 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "devDependencies": { - "@zowe/cli-test-utils": "8.10.0", - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zosfiles/package.json b/packages/zosfiles/package.json index 27302db5f8..a3d961cdec 100644 --- a/packages/zosfiles/package.json +++ b/packages/zosfiles/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-files-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "description": "Zowe SDK to interact with files and data sets on z/OS", "author": "Zowe", "license": "EPL-2.0", @@ -50,10 +50,10 @@ "minimatch": "^9.0.5" }, "devDependencies": { - "@zowe/cli-test-utils": "8.10.0", - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0", - "@zowe/zos-uss-for-zowe-sdk": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1", + "@zowe/zos-uss-for-zowe-sdk": "8.10.1" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zosjobs/package.json b/packages/zosjobs/package.json index d403fdb683..cdd98b4ab8 100644 --- a/packages/zosjobs/package.json +++ b/packages/zosjobs/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-jobs-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "description": "Zowe SDK to interact with jobs on z/OS", "author": "Zowe", "license": "EPL-2.0", @@ -46,12 +46,12 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.10.0" + "@zowe/zos-files-for-zowe-sdk": "8.10.1" }, "devDependencies": { - "@zowe/cli-test-utils": "8.10.0", - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zoslogs/package.json b/packages/zoslogs/package.json index 4d5cce70e9..df452cd7ca 100644 --- a/packages/zoslogs/package.json +++ b/packages/zoslogs/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-logs-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "description": "Zowe SDK to interact with the z/OS logs", "author": "Zowe", "license": "EPL-2.0", @@ -45,9 +45,9 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "devDependencies": { - "@zowe/cli-test-utils": "8.10.0", - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zosmf/package.json b/packages/zosmf/package.json index fa09136aa6..e25ea44139 100644 --- a/packages/zosmf/package.json +++ b/packages/zosmf/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zosmf-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "description": "Zowe SDK to interact with the z/OS Management Facility", "author": "Zowe", "license": "EPL-2.0", @@ -44,9 +44,9 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "devDependencies": { - "@zowe/cli-test-utils": "8.10.0", - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zostso/package.json b/packages/zostso/package.json index 41a72be750..e9bb16f105 100644 --- a/packages/zostso/package.json +++ b/packages/zostso/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-tso-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "description": "Zowe SDK to interact with TSO on z/OS", "author": "Zowe", "license": "EPL-2.0", @@ -45,12 +45,12 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "dependencies": { - "@zowe/zosmf-for-zowe-sdk": "8.10.0" + "@zowe/zosmf-for-zowe-sdk": "8.10.1" }, "devDependencies": { - "@zowe/cli-test-utils": "8.10.0", - "@zowe/core-for-zowe-sdk": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/core-for-zowe-sdk": "8.10.1", + "@zowe/imperative": "8.10.1" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zosuss/package.json b/packages/zosuss/package.json index 60e7ffbd0a..2b5821dfe7 100644 --- a/packages/zosuss/package.json +++ b/packages/zosuss/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-uss-for-zowe-sdk", - "version": "8.10.0", + "version": "8.10.1", "description": "Zowe SDK to interact with USS on z/OS", "author": "Zowe", "license": "EPL-2.0", @@ -49,8 +49,8 @@ }, "devDependencies": { "@types/ssh2": "^1.11.19", - "@zowe/cli-test-utils": "8.10.0", - "@zowe/imperative": "8.10.0" + "@zowe/cli-test-utils": "8.10.1", + "@zowe/imperative": "8.10.1" }, "peerDependencies": { "@zowe/imperative": "^8.0.0"