From 84df7ca64874230fb1570eb6a5a252e77d27de65 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Wed, 30 Oct 2024 13:59:22 -0400 Subject: [PATCH 01/12] fix encoding not being used on upload file to uss, system test fix Signed-off-by: jace-roell --- .../zosfiles/upload/ftu/FileToUSS.handler.ts | 1 + .../upload/testfiles/encodingCheck.txt | 2 +- .../methods/upload/Upload.unit.test.ts | 8 +++--- .../zosfiles/src/methods/upload/Upload.ts | 28 ++++++++----------- 4 files changed, 18 insertions(+), 21 deletions(-) diff --git a/packages/cli/src/zosfiles/upload/ftu/FileToUSS.handler.ts b/packages/cli/src/zosfiles/upload/ftu/FileToUSS.handler.ts index 654553ee6f..57047f97c4 100644 --- a/packages/cli/src/zosfiles/upload/ftu/FileToUSS.handler.ts +++ b/packages/cli/src/zosfiles/upload/ftu/FileToUSS.handler.ts @@ -37,6 +37,7 @@ export default class FileToUSSHandler extends ZosFilesBaseHandler { const uploadOptions: IUploadOptions = { binary: commandParameters.arguments.binary, + encoding: commandParameters.arguments.encoding, maxConcurrentRequests: commandParameters.arguments.maxConcurrentRequests, task: task, diff --git a/packages/zosfiles/__tests__/__system__/methods/upload/testfiles/encodingCheck.txt b/packages/zosfiles/__tests__/__system__/methods/upload/testfiles/encodingCheck.txt index ae3e63ebb9..7038873a47 100644 --- a/packages/zosfiles/__tests__/__system__/methods/upload/testfiles/encodingCheck.txt +++ b/packages/zosfiles/__tests__/__system__/methods/upload/testfiles/encodingCheck.txt @@ -1 +1 @@ -á é í ó ú ñ Ç ß 12345 !@#$% ^ [ ] $ £ € \ No newline at end of file +á é í ó ú ñ Ç ß 12345 !@#$% ^ [ ] $ £ \ No newline at end of file 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 9f232a790e..4fbf1a2628 100644 --- a/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts +++ b/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts @@ -2475,7 +2475,7 @@ describe("z/OS Files - Upload", () => { expect(fileToUssFileSpy).toHaveBeenCalledTimes(1); expect(fileToUssFileSpy).toHaveBeenCalledWith(dummySession, path.normalize(path.join(testPath, "uploadme")), - `${dsName}/uploadme`, { binary: true }); + `${dsName}/uploadme`, { binary: true, attributes: attributesMock, recursive: false }); }); it("should not upload ignored directories", async () => { @@ -2518,7 +2518,7 @@ describe("z/OS Files - Upload", () => { expect(fileToUssFileSpy).toHaveBeenCalledTimes(1); expect(fileToUssFileSpy).toHaveBeenCalledWith(dummySession, path.normalize(path.join(testPath, "uploaddir", "uploadedfile")), - `${dsName}/uploaddir/uploadedfile`, { binary: true }); + `${dsName}/uploaddir/uploadedfile`, { binary: true, attributes: attributesMock }); }); it("should upload files in text or binary according to attributes", async () => { getFileListFromPathSpy.mockReturnValue(["textfile", "binaryfile"]); @@ -2532,10 +2532,10 @@ describe("z/OS Files - Upload", () => { expect(fileToUssFileSpy).toHaveBeenCalledWith(dummySession, path.normalize(path.join(testPath, "textfile")), `${dsName}/textfile`, - { binary: false, encoding: "ISO8859-1", localEncoding: "ISO8859-1" }); + { binary: false, encoding: "ISO8859-1", localEncoding: "ISO8859-1", attributes: attributesMock, recursive: false }); expect(fileToUssFileSpy).toHaveBeenCalledWith(dummySession, path.normalize(path.join(testPath, "binaryfile")), - `${dsName}/binaryfile`, { binary: true }); + `${dsName}/binaryfile`, { binary: true, attributes: attributesMock, recursive: false }); }); it("should call API to tag files according to remote encoding", async () => { diff --git a/packages/zosfiles/src/methods/upload/Upload.ts b/packages/zosfiles/src/methods/upload/Upload.ts index f13f4eb4bb..b7c2f5c397 100644 --- a/packages/zosfiles/src/methods/upload/Upload.ts +++ b/packages/zosfiles/src/methods/upload/Upload.ts @@ -854,37 +854,33 @@ export class Upload { }; } - public static async uploadFile(session: AbstractSession, localPath: string, ussPath: string, - options: IUploadOptions): Promise { - const tempOptions: Partial = {}; - + public static async uploadFile( + session: AbstractSession, + localPath: string, + ussPath: string, + options: IUploadOptions + ): Promise { if (options.attributes) { if (!options.attributes.fileShouldBeUploaded(localPath)) { return; } - tempOptions.binary = options.attributes.getFileTransferMode(localPath, options.binary) === TransferMode.BINARY; + options.binary = options.attributes.getFileTransferMode(localPath, options.binary) === TransferMode.BINARY; const remoteEncoding = options.attributes.getRemoteEncoding(localPath); if (remoteEncoding != null && remoteEncoding !== Tag.BINARY) { - tempOptions.encoding = remoteEncoding; + options.encoding = remoteEncoding; } - if (!tempOptions.binary) { - tempOptions.localEncoding = options.attributes.getLocalEncoding(localPath); + if (!options.binary) { + options.localEncoding = options.attributes.getLocalEncoding(localPath); } } else { if (options.filesMap) { if (options.filesMap.fileNames.indexOf(path.basename(localPath)) > -1) { - tempOptions.binary = options.filesMap.binary; - } else { - tempOptions.binary = options.binary; + options.binary = options.filesMap.binary; } - } else { - tempOptions.binary = options.binary; } } - - return await this.fileToUssFile(session, localPath, ussPath, tempOptions); + return await this.fileToUssFile(session, localPath, ussPath, options); } - /** * Get Log * @returns {Logger} applicationLogger. From bc3598f57bd9b14d13ccad7fa4fb642deeba7f8a Mon Sep 17 00:00:00 2001 From: jace-roell Date: Wed, 30 Oct 2024 14:22:44 -0400 Subject: [PATCH 02/12] reinstated temp options to avoid option conflicts Signed-off-by: jace-roell --- .../methods/upload/Upload.unit.test.ts | 2 +- packages/zosfiles/src/methods/upload/Upload.ts | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 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 4fbf1a2628..df341ffe35 100644 --- a/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts +++ b/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts @@ -2535,7 +2535,7 @@ describe("z/OS Files - Upload", () => { { binary: false, encoding: "ISO8859-1", localEncoding: "ISO8859-1", attributes: attributesMock, recursive: false }); expect(fileToUssFileSpy).toHaveBeenCalledWith(dummySession, path.normalize(path.join(testPath, "binaryfile")), - `${dsName}/binaryfile`, { binary: true, attributes: attributesMock, recursive: false }); + `${dsName}/binaryfile`, { binary: true, recursive: false, attributes: attributesMock }); }); it("should call API to tag files according to remote encoding", async () => { diff --git a/packages/zosfiles/src/methods/upload/Upload.ts b/packages/zosfiles/src/methods/upload/Upload.ts index b7c2f5c397..5d52ec4b8b 100644 --- a/packages/zosfiles/src/methods/upload/Upload.ts +++ b/packages/zosfiles/src/methods/upload/Upload.ts @@ -860,27 +860,33 @@ export class Upload { ussPath: string, options: IUploadOptions ): Promise { + const tempOptions: Partial = { ...options }; if (options.attributes) { if (!options.attributes.fileShouldBeUploaded(localPath)) { return; } - options.binary = options.attributes.getFileTransferMode(localPath, options.binary) === TransferMode.BINARY; + tempOptions.binary = options.attributes.getFileTransferMode(localPath, options.binary) === TransferMode.BINARY; const remoteEncoding = options.attributes.getRemoteEncoding(localPath); if (remoteEncoding != null && remoteEncoding !== Tag.BINARY) { - options.encoding = remoteEncoding; + tempOptions.encoding = remoteEncoding; } - if (!options.binary) { - options.localEncoding = options.attributes.getLocalEncoding(localPath); + if (!tempOptions.binary) { + tempOptions.localEncoding = options.attributes.getLocalEncoding(localPath); } } else { if (options.filesMap) { if (options.filesMap.fileNames.indexOf(path.basename(localPath)) > -1) { - options.binary = options.filesMap.binary; + tempOptions.binary = options.filesMap.binary; + } else { + tempOptions.binary = options.binary; } + } else { + tempOptions.binary = options.binary; } } - return await this.fileToUssFile(session, localPath, ussPath, options); + return await this.fileToUssFile(session, localPath, ussPath, tempOptions); } + /** * Get Log * @returns {Logger} applicationLogger. From e0a653bcf73f87266339e93aa74f36356e3469d9 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Wed, 30 Oct 2024 16:21:54 -0400 Subject: [PATCH 03/12] encoding fix Signed-off-by: jace-roell --- .../ussdir/__resources__/.zosattributes | 2 +- .../zosfiles/src/methods/upload/Upload.ts | 25 ++++++++----------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/packages/cli/__tests__/zosfiles/__system__/download/ussdir/__resources__/.zosattributes b/packages/cli/__tests__/zosfiles/__system__/download/ussdir/__resources__/.zosattributes index a121e51700..3134e437c5 100644 --- a/packages/cli/__tests__/zosfiles/__system__/download/ussdir/__resources__/.zosattributes +++ b/packages/cli/__tests__/zosfiles/__system__/download/ussdir/__resources__/.zosattributes @@ -2,4 +2,4 @@ *.bin binary binary *.jcl IBM-1047 IBM-1047 *.md UTF-8 UTF-8 -*.txt UTF-8 IBM-1047 +*.txt UTF-8 IBM-1147 diff --git a/packages/zosfiles/src/methods/upload/Upload.ts b/packages/zosfiles/src/methods/upload/Upload.ts index 5d52ec4b8b..54390c352e 100644 --- a/packages/zosfiles/src/methods/upload/Upload.ts +++ b/packages/zosfiles/src/methods/upload/Upload.ts @@ -860,30 +860,27 @@ export class Upload { ussPath: string, options: IUploadOptions ): Promise { - const tempOptions: Partial = { ...options }; + const tempOptions: IUploadOptions = { ...options }; if (options.attributes) { if (!options.attributes.fileShouldBeUploaded(localPath)) { return; } tempOptions.binary = options.attributes.getFileTransferMode(localPath, options.binary) === TransferMode.BINARY; const remoteEncoding = options.attributes.getRemoteEncoding(localPath); - if (remoteEncoding != null && remoteEncoding !== Tag.BINARY) { - tempOptions.encoding = remoteEncoding; - } + + if(remoteEncoding === Tag.BINARY) tempOptions.encoding = undefined; + else if(remoteEncoding !== null) tempOptions.encoding = remoteEncoding + if (!tempOptions.binary) { tempOptions.localEncoding = options.attributes.getLocalEncoding(localPath); } - } else { - if (options.filesMap) { - if (options.filesMap.fileNames.indexOf(path.basename(localPath)) > -1) { - tempOptions.binary = options.filesMap.binary; - } else { - tempOptions.binary = options.binary; - } - } else { - tempOptions.binary = options.binary; - } + } else if(options.filesMap && options.filesMap.fileNames.indexOf(path.basename(localPath)) > -1) { + tempOptions.binary = options.filesMap.binary; + + // Reset encoding to undefined if binary is true to avoid file tagging issues + if(tempOptions.binary) tempOptions.encoding = undefined; } + return await this.fileToUssFile(session, localPath, ussPath, tempOptions); } From 603ee40c8d44fdfb656db812ef75a9975388f923 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Thu, 31 Oct 2024 10:40:03 -0400 Subject: [PATCH 04/12] .zosattributes fix Signed-off-by: jace-roell --- .../__system__/download/ussdir/__resources__/.zosattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/__tests__/zosfiles/__system__/download/ussdir/__resources__/.zosattributes b/packages/cli/__tests__/zosfiles/__system__/download/ussdir/__resources__/.zosattributes index 3134e437c5..a121e51700 100644 --- a/packages/cli/__tests__/zosfiles/__system__/download/ussdir/__resources__/.zosattributes +++ b/packages/cli/__tests__/zosfiles/__system__/download/ussdir/__resources__/.zosattributes @@ -2,4 +2,4 @@ *.bin binary binary *.jcl IBM-1047 IBM-1047 *.md UTF-8 UTF-8 -*.txt UTF-8 IBM-1147 +*.txt UTF-8 IBM-1047 From 2d593d867ba693c076baa80d739c0e9594b1bac8 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Thu, 31 Oct 2024 10:45:02 -0400 Subject: [PATCH 05/12] semi colon Signed-off-by: jace-roell --- packages/zosfiles/src/methods/upload/Upload.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zosfiles/src/methods/upload/Upload.ts b/packages/zosfiles/src/methods/upload/Upload.ts index 54390c352e..02871fc740 100644 --- a/packages/zosfiles/src/methods/upload/Upload.ts +++ b/packages/zosfiles/src/methods/upload/Upload.ts @@ -869,7 +869,7 @@ export class Upload { const remoteEncoding = options.attributes.getRemoteEncoding(localPath); if(remoteEncoding === Tag.BINARY) tempOptions.encoding = undefined; - else if(remoteEncoding !== null) tempOptions.encoding = remoteEncoding + else if(remoteEncoding !== null) tempOptions.encoding = remoteEncoding; if (!tempOptions.binary) { tempOptions.localEncoding = options.attributes.getLocalEncoding(localPath); From 9ec1ca8191109915ecc0441d6e435d3ab25739da Mon Sep 17 00:00:00 2001 From: jace-roell Date: Thu, 31 Oct 2024 14:38:38 -0400 Subject: [PATCH 06/12] added tests Signed-off-by: jace-roell --- .../upload/ftu/FileToUSS.handler.unit.test.ts | 90 +++++++++++++++++++ .../FileToUSS.handler.unit.test.ts.snap | 27 ++++++ .../methods/upload/Upload.system.test.ts | 57 ++++++++++++ .../__resources__/.zosattributes-binary | 5 ++ .../__resources__/view_file_uss_binary.sh | 12 +++ .../upload/testfiles/encodingCheckBinary.txt | 1 + 6 files changed, 192 insertions(+) create mode 100644 packages/zosfiles/__tests__/__system__/methods/upload/__resources__/.zosattributes-binary create mode 100755 packages/zosfiles/__tests__/__system__/methods/upload/__resources__/view_file_uss_binary.sh create mode 100644 packages/zosfiles/__tests__/__system__/methods/upload/testfiles/encodingCheckBinary.txt diff --git a/packages/cli/__tests__/zosfiles/__unit__/upload/ftu/FileToUSS.handler.unit.test.ts b/packages/cli/__tests__/zosfiles/__unit__/upload/ftu/FileToUSS.handler.unit.test.ts index e4a6582d25..5956179949 100644 --- a/packages/cli/__tests__/zosfiles/__unit__/upload/ftu/FileToUSS.handler.unit.test.ts +++ b/packages/cli/__tests__/zosfiles/__unit__/upload/ftu/FileToUSS.handler.unit.test.ts @@ -185,5 +185,95 @@ describe("Upload file-to-uss handler", () => { expect(apiMessage).toMatchSnapshot(); expect(logMessage).toMatchSnapshot(); }); + it("should upload a file to a USS if requested - zosattributes file - binary", async () => { + // Require the handler and create a new instance + const handlerReq = require("../../../../../src/zosfiles/upload/ftu/FileToUSS.handler"); + const handler = new handlerReq.default(); + const inputfile = "test-file"; + const USSFileName = "testing"; + let zosAttributes: any; + + let error; + let apiMessage = ""; + let jsonObj; + let logMessage = ""; + let fakeSession = null; + + jest.spyOn(ZosFilesAttributes, "loadFromFile").mockImplementation(() => { + zosAttributes = Object.create(ZosFilesAttributes.prototype); + zosAttributes.attributes = new Map([ + ['*.json', { ignore: true }], + ['*.bin', { ignore: false, localEncoding: 'binary', remoteEncoding: 'binary' }], + ['*.jcl', { ignore: false, localEncoding: 'IBM-1047', remoteEncoding: 'IBM-1047' }], + ['*.md', { ignore: false, localEncoding: 'UTF-8', remoteEncoding: 'UTF-8' }], + ['*.txt', { ignore: false, localEncoding: 'binary', remoteEncoding: 'binary' }] + ]); + zosAttributes.basePath = undefined; + return zosAttributes; + }); + Upload.uploadFile = jest.fn(async (session, file, name, options = {}) => { + fakeSession = session; + return { + success: true, + commandResponse: "uploaded", + apiResponse: [ + { success: true, from: inputfile, to: USSFileName } + ] + }; + }); + try { + await handler.process({ + arguments: { + $0: "fake", + _: ["fake"], + inputfile, + USSFileName, + ...UNIT_TEST_ZOSMF_PROF_OPTS + }, + response: { + data: { + setMessage: jest.fn((setMsgArgs) => { + apiMessage = setMsgArgs; + }), + setObj: jest.fn((setObjArgs) => { + jsonObj = setObjArgs; + }) + }, + console: { + log: jest.fn((logArgs) => { + logMessage += "\n" + logArgs; + }) + }, + progress: { + startBar: jest.fn(() => { + // do nothing + }), + endBar: jest.fn(() => { + // do nothing + }) + } + } + } as any); + } catch (e) { + error = e; + } + expect(error).toBeUndefined(); + expect(Upload.uploadFile).toHaveBeenCalledTimes(1); + expect(Upload.uploadFile).toHaveBeenCalledWith(fakeSession, inputfile, USSFileName, { + attributes: zosAttributes, + binary: undefined, + includeHidden: undefined, + maxConcurrentRequests: undefined, + responseTimeout: undefined, + task: { + percentComplete: 0, + stageName: 0, + statusMessage: "Uploading USS file" + } + }); + expect(jsonObj).toMatchSnapshot(); + expect(apiMessage).toMatchSnapshot(); + expect(logMessage).toMatchSnapshot(); + }); }); }); diff --git a/packages/cli/__tests__/zosfiles/__unit__/upload/ftu/__snapshots__/FileToUSS.handler.unit.test.ts.snap b/packages/cli/__tests__/zosfiles/__unit__/upload/ftu/__snapshots__/FileToUSS.handler.unit.test.ts.snap index f13e49cc22..f6a4e0d87a 100644 --- a/packages/cli/__tests__/zosfiles/__unit__/upload/ftu/__snapshots__/FileToUSS.handler.unit.test.ts.snap +++ b/packages/cli/__tests__/zosfiles/__unit__/upload/ftu/__snapshots__/FileToUSS.handler.unit.test.ts.snap @@ -1,5 +1,32 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`Upload file-to-uss handler process method should upload a file to a USS if requested - zosattributes file - binary 1`] = ` +Object { + "apiResponse": Array [ + Object { + "from": "test-file", + "success": true, + "to": "testing", + }, + ], + "commandResponse": "uploaded", + "success": true, +} +`; + +exports[`Upload file-to-uss handler process method should upload a file to a USS if requested - zosattributes file - binary 2`] = `""`; + +exports[`Upload file-to-uss handler process method should upload a file to a USS if requested - zosattributes file - binary 3`] = ` +" +-  + success: true + from:  test-file + to:  testing + + +uploaded" +`; + exports[`Upload file-to-uss handler process method should upload a file to a USS if requested - zosattributes file 1`] = ` Object { "apiResponse": Array [ 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 a4c33cfd7e..ebaeec623e 100644 --- a/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts +++ b/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts @@ -851,6 +851,7 @@ describe("Upload USS file", () => { let readResponseGood: any; let readResponseBad: any; try { + // Upload file response = runCliScript(__dirname + "/__resources__/upload_file_to_uss.sh", testEnvironment,[ defaultSystem.tso.account, defaultSystem.zosmf.host, @@ -903,6 +904,62 @@ describe("Upload USS file", () => { // Compare file view with matching upload and view encoding (1047). expect(readResponseGood.stdout.toString()).toContain(fileContents); }); + it("should upload local file to USS using .zosattributes file - binary", async () => { + let response: any; + let error; + let readResponseGood: any; + let readResponseBad: any; + try { + // Upload file + response = runCliScript(__dirname + "/__resources__/upload_file_to_uss.sh", testEnvironment,[ + defaultSystem.tso.account, + defaultSystem.zosmf.host, + defaultSystem.zosmf.port, + defaultSystem.zosmf.user, + defaultSystem.zosmf.password, + defaultSystem.zosmf.rejectUnauthorized, + __dirname + "/testfiles/encodingCheckBinary.txt", + ussname, + __dirname + "/__resources__/.zosattributes-binary", + ]); + // View file with .txt binary encoding in .zosattributes + readResponseGood = runCliScript(__dirname + "/__resources__/view_file_uss_binary.sh", testEnvironment,[ + defaultSystem.tso.account, + defaultSystem.zosmf.host, + defaultSystem.zosmf.port, + defaultSystem.zosmf.user, + defaultSystem.zosmf.password, + defaultSystem.zosmf.rejectUnauthorized, + ussname, + true + ]); + readResponseBad = runCliScript(__dirname + "/__resources__/view_file_uss.sh", testEnvironment,[ + defaultSystem.tso.account, + defaultSystem.zosmf.host, + defaultSystem.zosmf.port, + defaultSystem.zosmf.user, + defaultSystem.zosmf.password, + defaultSystem.zosmf.rejectUnauthorized, + ussname, + "1047" + ]); + } + catch (err) { + error = err; + Imperative.console.info("Error: " + inspect(error)); + } + const fileContents = fs.readFileSync(__dirname + "/testfiles/encodingCheckBinary.txt").toString(); + + expect(response.stderr.toString()).toBe(""); + expect(response.stdout.toString()).toBeDefined(); + expect(response.stdout.toString()).toContain("USS file uploaded successfully."); + + // Compare file view with not matching upload and view encoding (1047 vs 1147). + expect(readResponseBad.stdout.toString()).not.toContain(fileContents); + + // Compare file view with matching upload and view encoding (1047). + expect(readResponseGood.stdout.toString()).toContain(fileContents) + }); }); }); diff --git a/packages/zosfiles/__tests__/__system__/methods/upload/__resources__/.zosattributes-binary b/packages/zosfiles/__tests__/__system__/methods/upload/__resources__/.zosattributes-binary new file mode 100644 index 0000000000..0f79a06bc2 --- /dev/null +++ b/packages/zosfiles/__tests__/__system__/methods/upload/__resources__/.zosattributes-binary @@ -0,0 +1,5 @@ +*.json - +*.bin binary binary +*.jcl IBM-1047 IBM-1047 +*.md UTF-8 UTF-8 +*.txt binary binary \ No newline at end of file diff --git a/packages/zosfiles/__tests__/__system__/methods/upload/__resources__/view_file_uss_binary.sh b/packages/zosfiles/__tests__/__system__/methods/upload/__resources__/view_file_uss_binary.sh new file mode 100755 index 0000000000..3eabe90a6f --- /dev/null +++ b/packages/zosfiles/__tests__/__system__/methods/upload/__resources__/view_file_uss_binary.sh @@ -0,0 +1,12 @@ +#!/bin/bash +account=$1 +host=$2 +port=$3 +user=$4 +password=$5 +ru=$6 +ussName=$7 +encoding=$8 + +zowe zos-files view uf $ussName --binary $binary --host $host --port $port --user $user --password $password --ru $ru +exit $? \ No newline at end of file diff --git a/packages/zosfiles/__tests__/__system__/methods/upload/testfiles/encodingCheckBinary.txt b/packages/zosfiles/__tests__/__system__/methods/upload/testfiles/encodingCheckBinary.txt new file mode 100644 index 0000000000..385781092d --- /dev/null +++ b/packages/zosfiles/__tests__/__system__/methods/upload/testfiles/encodingCheckBinary.txt @@ -0,0 +1 @@ +[][][] \ No newline at end of file From 9dccac1f4d03a365d07afb584f4c4f3756dc2057 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Thu, 31 Oct 2024 14:52:07 -0400 Subject: [PATCH 07/12] semicolon Signed-off-by: jace-roell --- .../__tests__/__system__/methods/upload/Upload.system.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ebaeec623e..d9a1e0597e 100644 --- a/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts +++ b/packages/zosfiles/__tests__/__system__/methods/upload/Upload.system.test.ts @@ -958,7 +958,7 @@ describe("Upload USS file", () => { expect(readResponseBad.stdout.toString()).not.toContain(fileContents); // Compare file view with matching upload and view encoding (1047). - expect(readResponseGood.stdout.toString()).toContain(fileContents) + expect(readResponseGood.stdout.toString()).toContain(fileContents); }); }); }); From af735f24f32766f4406b8e55a878e75e56dc8857 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Fri, 1 Nov 2024 09:14:32 -0400 Subject: [PATCH 08/12] unit test for code coverage Signed-off-by: jace-roell --- .../__unit__/methods/upload/Upload.unit.test.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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 df341ffe35..7e7e8bf363 100644 --- a/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts +++ b/packages/zosfiles/__tests__/__unit__/methods/upload/Upload.unit.test.ts @@ -199,7 +199,6 @@ describe("z/OS Files - Upload", () => { expect(error).toBeDefined(); expect(error.message).toContain(ZosFilesMessages.missingDatasetName.message); }); - it("should throw underlying fs error", async () => { const rootError = { code: "test", @@ -226,6 +225,22 @@ describe("z/OS Files - Upload", () => { expect(error.additionalDetails).toEqual(rootError.toString()); expect(error.causeErrors).toBe(rootError); }); + it("should throw error if error is null and stats.isFile() is true", async () => { + const testPath = "test/path"; + lstatSpy.mockImplementationOnce((somePath, callback: any) => { + callback(null, {isFile: () => true}); + }); + + try { + response = await Upload.dirToPds(dummySession, testPath, dsName); + } catch (err) { + error = err; + } + + expect(response).toBeUndefined(); + expect(error).toBeDefined(); + expect(error.message).toContain(ZosFilesMessages.pathIsNotDirectory.message); + }); it("should return with proper message when path is pointing to a file", async () => { lstatSpy.mockImplementationOnce((somePath, callback: any) => { From b68916891f70cc5b3acd90c5851b1b779858e9f9 Mon Sep 17 00:00:00 2001 From: Jace Roell <111985297+jace-roell@users.noreply.github.com> Date: Fri, 1 Nov 2024 11:31:42 -0400 Subject: [PATCH 09/12] Update packages/zosfiles/src/methods/upload/Upload.ts Co-authored-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com> Signed-off-by: Jace Roell <111985297+jace-roell@users.noreply.github.com> --- packages/zosfiles/src/methods/upload/Upload.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zosfiles/src/methods/upload/Upload.ts b/packages/zosfiles/src/methods/upload/Upload.ts index 02871fc740..13a53abef4 100644 --- a/packages/zosfiles/src/methods/upload/Upload.ts +++ b/packages/zosfiles/src/methods/upload/Upload.ts @@ -874,7 +874,7 @@ export class Upload { if (!tempOptions.binary) { tempOptions.localEncoding = options.attributes.getLocalEncoding(localPath); } - } else if(options.filesMap && options.filesMap.fileNames.indexOf(path.basename(localPath)) > -1) { + } else if(options.filesMap?.fileNames.indexOf(path.basename(localPath)) > -1) { tempOptions.binary = options.filesMap.binary; // Reset encoding to undefined if binary is true to avoid file tagging issues From 6122c84229fc626fa30cd2314e2c5363260c4ea5 Mon Sep 17 00:00:00 2001 From: jace-roell Date: Fri, 1 Nov 2024 11:54:32 -0400 Subject: [PATCH 10/12] changelog Signed-off-by: jace-roell --- packages/cli/CHANGELOG.md | 4 ++++ packages/zosfiles/CHANGELOG.md | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 9e57df0fef..cbd09ba7bb 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the Zowe CLI package will be documented in this file. +## Recent Changes + +- BugFix: Resolved issue where `zowe zos-files upload file-to-uss` was not properly handling command flags. [#2234](https://github.com/zowe/zowe-cli/pull/2334) + ## `8.6.0` - Enhancement: Added support for running applications on TSO/E address spaces. Start applications and receive/transmit messages using the new `tso start`, `tso receive` and `tso send` commands. [#2280](https://github.com/zowe/zowe-cli/pull/2280) diff --git a/packages/zosfiles/CHANGELOG.md b/packages/zosfiles/CHANGELOG.md index 3c53654b69..4407123388 100644 --- a/packages/zosfiles/CHANGELOG.md +++ b/packages/zosfiles/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to the Zowe z/OS files SDK package will be documented in this file. +## Recent Changes + +- BugFix: Resolved issue where encoding argument was missing from `FileToUss.handler.ts` options object. [#2234](https://github.com/zowe/zowe-cli/pull/2334) +- BugFix: Resolved issue where `FileToUss.handler.ts` options object was not properly passed through subsequent command calls. [#2234](https://github.com/zowe/zowe-cli/pull/2334) + ## `8.4.0` - Enhancement: Added optional `--attributes` flag to `zowe zos-files upload file-to-uss` to allow passing a .zosattributes file path for upload encoding format. [#2319] (https://github.com/zowe/zowe-cli/pull/2319) From d68b6257350c724a3eb831edd373567e598b5806 Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Fri, 1 Nov 2024 15:57:41 -0400 Subject: [PATCH 11/12] Fix imports failing to resolve in TSO SDK Signed-off-by: Timothy Johnson --- .eslintrc.js | 6 ++++++ packages/imperative/src/cmd/src/doc/ICommandDefinition.ts | 2 +- .../cmd/src/doc/handler/ICommandHandlerResponseValidator.ts | 2 +- .../src/doc/response/api/handler/IHandlerFormatOutputApi.ts | 2 +- .../imperative/src/cmd/src/help/DefaultHelpGenerator.ts | 2 +- packages/imperative/src/cmd/src/response/CommandResponse.ts | 2 +- .../imperative/src/cmd/src/yargs/AbstractCommandYargs.ts | 2 +- packages/imperative/src/cmd/src/yargs/CommandYargs.ts | 6 +++--- packages/imperative/src/cmd/src/yargs/doc/IYargsResponse.ts | 2 +- .../src/imperative/src/plugins/PluginManagementFacility.ts | 4 ++-- packages/zostso/CHANGELOG.md | 4 ++++ packages/zostso/src/AddressSpaceApps.ts | 2 +- packages/zostso/src/doc/IASAppResponse.ts | 2 +- packages/zostso/src/doc/IIssueResponse.ts | 2 +- 14 files changed, 25 insertions(+), 15 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 2e3218d37f..20b722d1da 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,6 +25,7 @@ module.exports = { ], "rules": { "@typescript-eslint/no-magic-numbers": "off", + "@typescript-eslint/no-restricted-imports": "off", "jest/expect-expect": ["warn", { "assertFunctionNames": ["expect*", "**.*expect*"] }], @@ -64,6 +65,11 @@ module.exports = { "ignoreEnums": true, "ignoreReadonlyClassProperties": true }], + "@typescript-eslint/no-restricted-imports": ["error", { + "patterns": [{ + "group": ["**/../lib", "**/../src"] + }] + }], "@typescript-eslint/no-unused-vars": "off", "@typescript-eslint/no-var-requires": "off", "@typescript-eslint/semi": "warn", diff --git a/packages/imperative/src/cmd/src/doc/ICommandDefinition.ts b/packages/imperative/src/cmd/src/doc/ICommandDefinition.ts index 3d8294934d..8a750b165d 100644 --- a/packages/imperative/src/cmd/src/doc/ICommandDefinition.ts +++ b/packages/imperative/src/cmd/src/doc/ICommandDefinition.ts @@ -14,7 +14,7 @@ import { IChainedHandlerEntry } from "./handler/IChainedHandlerEntry"; import { ICommandOptionDefinition } from "./option/ICommandOptionDefinition"; import { ICommandPositionalDefinition } from "./option/ICommandPositionalDefinition"; import { ICommandDefinitionPassOn } from "./ICommandDefinitionPassOn"; -import { ICommandProfile } from "../../src/doc/profiles/definition/ICommandProfile"; +import { ICommandProfile } from "../doc/profiles/definition/ICommandProfile"; /** * Command Segment type - either "group" or "command". * diff --git a/packages/imperative/src/cmd/src/doc/handler/ICommandHandlerResponseValidator.ts b/packages/imperative/src/cmd/src/doc/handler/ICommandHandlerResponseValidator.ts index 6ec47d051c..581bef3595 100644 --- a/packages/imperative/src/cmd/src/doc/handler/ICommandHandlerResponseValidator.ts +++ b/packages/imperative/src/cmd/src/doc/handler/ICommandHandlerResponseValidator.ts @@ -9,7 +9,7 @@ * */ -import { ICommandResponse } from "../../../src/doc/response/response/ICommandResponse"; +import { ICommandResponse } from "../../doc/response/response/ICommandResponse"; import { CommandResponse } from "../../response/CommandResponse"; export interface ICommandHandlerResponseValidator { diff --git a/packages/imperative/src/cmd/src/doc/response/api/handler/IHandlerFormatOutputApi.ts b/packages/imperative/src/cmd/src/doc/response/api/handler/IHandlerFormatOutputApi.ts index f52555ee6d..4ab25a36e9 100644 --- a/packages/imperative/src/cmd/src/doc/response/api/handler/IHandlerFormatOutputApi.ts +++ b/packages/imperative/src/cmd/src/doc/response/api/handler/IHandlerFormatOutputApi.ts @@ -9,7 +9,7 @@ * */ -import { ICommandOutputFormat } from "../../../../../src/doc/response/response/ICommandOutputFormat"; +import { ICommandOutputFormat } from "../../../../doc/response/response/ICommandOutputFormat"; export interface IHandlerFormatOutputApi { output: (format: ICommandOutputFormat) => void; diff --git a/packages/imperative/src/cmd/src/help/DefaultHelpGenerator.ts b/packages/imperative/src/cmd/src/help/DefaultHelpGenerator.ts index 59387adb23..19d1dd2e1a 100644 --- a/packages/imperative/src/cmd/src/help/DefaultHelpGenerator.ts +++ b/packages/imperative/src/cmd/src/help/DefaultHelpGenerator.ts @@ -17,7 +17,7 @@ import { CommandUtils } from "../utils/CommandUtils"; import { ImperativeError } from "../../../error"; import { IHelpGeneratorParms } from "./doc/IHelpGeneratorParms"; import { IHelpGeneratorFactoryParms } from "./doc/IHelpGeneratorFactoryParms"; -import { compareCommands, ICommandDefinition } from "../../src/doc/ICommandDefinition"; +import { compareCommands, ICommandDefinition } from "../doc/ICommandDefinition"; import stripAnsi = require("strip-ansi"); import { CliUtils } from "../../../utilities/src/CliUtils"; diff --git a/packages/imperative/src/cmd/src/response/CommandResponse.ts b/packages/imperative/src/cmd/src/response/CommandResponse.ts index 17470952f2..62c44037ef 100644 --- a/packages/imperative/src/cmd/src/response/CommandResponse.ts +++ b/packages/imperative/src/cmd/src/response/CommandResponse.ts @@ -24,7 +24,7 @@ import { ImperativeExpect } from "../../../expect"; import { IHandlerFormatOutputApi } from "../doc/response/api/handler/IHandlerFormatOutputApi"; import { ICommandOutputFormat, OUTPUT_FORMAT } from "../doc/response/response/ICommandOutputFormat"; import { Arguments } from "yargs"; -import { ICommandDefinition } from "../../src/doc/ICommandDefinition"; +import { ICommandDefinition } from "../doc/ICommandDefinition"; import { OptionConstants } from "../constants/OptionConstants"; import { inspect } from "util"; import * as DeepMerge from "deepmerge"; diff --git a/packages/imperative/src/cmd/src/yargs/AbstractCommandYargs.ts b/packages/imperative/src/cmd/src/yargs/AbstractCommandYargs.ts index a179f2786b..d0a5381066 100644 --- a/packages/imperative/src/cmd/src/yargs/AbstractCommandYargs.ts +++ b/packages/imperative/src/cmd/src/yargs/AbstractCommandYargs.ts @@ -21,7 +21,7 @@ import { ImperativeYargsCommandAction, IYargsResponse } from "./doc/IYargsRespon import { GroupCommandYargs } from "./GroupCommandYargs"; import { IHelpGeneratorFactory } from "../help/doc/IHelpGeneratorFactory"; import { CommandResponse } from "../response/CommandResponse"; -import { ICommandResponse } from "../../src/doc/response/response/ICommandResponse"; +import { ICommandResponse } from "../doc/response/response/ICommandResponse"; import { ICommandExampleDefinition } from "../.."; import { ImperativeConfig } from "../../../utilities/src/ImperativeConfig"; diff --git a/packages/imperative/src/cmd/src/yargs/CommandYargs.ts b/packages/imperative/src/cmd/src/yargs/CommandYargs.ts index 637e8389d3..3b22542ec0 100644 --- a/packages/imperative/src/cmd/src/yargs/CommandYargs.ts +++ b/packages/imperative/src/cmd/src/yargs/CommandYargs.ts @@ -14,11 +14,11 @@ import { inspect } from "util"; import { Constants } from "../../../constants"; import { IYargsResponse } from "./doc/IYargsResponse"; import { AbstractCommandYargs, YargsCommandCompleted } from "./AbstractCommandYargs"; -import { ICommandOptionDefinition } from "../../src/doc/option/ICommandOptionDefinition"; +import { ICommandOptionDefinition } from "../doc/option/ICommandOptionDefinition"; import { ICommandDefinition } from "../doc/ICommandDefinition"; import { CommandProcessor } from "../CommandProcessor"; -import { ICommandResponse } from "../../src/doc/response/response/ICommandResponse"; -import { CommandResponse } from "../../src/response/CommandResponse"; +import { ICommandResponse } from "../doc/response/response/ICommandResponse"; +import { CommandResponse } from "../response/CommandResponse"; import { ImperativeConfig } from "../../../utilities"; /** diff --git a/packages/imperative/src/cmd/src/yargs/doc/IYargsResponse.ts b/packages/imperative/src/cmd/src/yargs/doc/IYargsResponse.ts index 6d3337007f..97c5b922b5 100644 --- a/packages/imperative/src/cmd/src/yargs/doc/IYargsResponse.ts +++ b/packages/imperative/src/cmd/src/yargs/doc/IYargsResponse.ts @@ -9,7 +9,7 @@ * */ -import { ICommandResponse } from "../../../src/doc/response/response/ICommandResponse"; +import { ICommandResponse } from "../../doc/response/response/ICommandResponse"; /** * Indicates the action performed. */ diff --git a/packages/imperative/src/imperative/src/plugins/PluginManagementFacility.ts b/packages/imperative/src/imperative/src/plugins/PluginManagementFacility.ts index 58094e46a5..bb152f156b 100644 --- a/packages/imperative/src/imperative/src/plugins/PluginManagementFacility.ts +++ b/packages/imperative/src/imperative/src/plugins/PluginManagementFacility.ts @@ -9,8 +9,8 @@ * */ -import { IImperativeConfig } from "../../src/doc/IImperativeConfig"; -import { UpdateImpConfig } from "../../src/UpdateImpConfig"; +import { IImperativeConfig } from "../doc/IImperativeConfig"; +import { UpdateImpConfig } from "../UpdateImpConfig"; import { isAbsolute, join } from "path"; import { ImperativeConfig, JsUtils } from "../../../utilities"; import { Logger } from "../../../logger"; diff --git a/packages/zostso/CHANGELOG.md b/packages/zostso/CHANGELOG.md index 63188b9bea..65a0667e54 100644 --- a/packages/zostso/CHANGELOG.md +++ b/packages/zostso/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the Zowe z/OS TSO SDK package will be documented in this file. +## Recent Changes + +- BugFix: Fixed imports that failed to resolve. [#2343](https://github.com/zowe/zowe-cli/pull/2343) + ## `8.6.0` - Enhancement: Issue `app` commands to better target communication with a TSO/E application. The `app` command is now included in the `start`/`send` command group and the new `receive` command group, diff --git a/packages/zostso/src/AddressSpaceApps.ts b/packages/zostso/src/AddressSpaceApps.ts index 3169d464c2..b79a93d8b9 100644 --- a/packages/zostso/src/AddressSpaceApps.ts +++ b/packages/zostso/src/AddressSpaceApps.ts @@ -18,7 +18,7 @@ import { IStartTsoParms } from "./doc/input/IStartTsoParms"; import { TsoValidator } from "./TsoValidator"; import { IStartTsoAppParms } from "./doc/input/IStartTsoAppParms"; import { StartTso } from "./StartTso"; -import { IIssueResponse } from "../src"; +import { IIssueResponse } from "./doc/IIssueResponse"; export class AddressSpaceApps { /** diff --git a/packages/zostso/src/doc/IASAppResponse.ts b/packages/zostso/src/doc/IASAppResponse.ts index 5b43b31526..d9afd33f2f 100644 --- a/packages/zostso/src/doc/IASAppResponse.ts +++ b/packages/zostso/src/doc/IASAppResponse.ts @@ -9,7 +9,7 @@ * */ -import { ITsoMessage } from "../../src"; +import { ITsoMessage } from "./zosmf/ITsoMessage"; export interface IASAppResponse { /** diff --git a/packages/zostso/src/doc/IIssueResponse.ts b/packages/zostso/src/doc/IIssueResponse.ts index b54ab48062..6d40d95287 100644 --- a/packages/zostso/src/doc/IIssueResponse.ts +++ b/packages/zostso/src/doc/IIssueResponse.ts @@ -33,7 +33,7 @@ export interface IIssueResponse { startResponse?: IStartStopResponses; /** - * Indicates if started TSO containes "READY " message + * Indicates if started TSO contains "READY" message * @type {boolean} * @memberof IIssueResponse */ From 3e439377fb3673fc91683d8cd454cb8fbc1bb12b Mon Sep 17 00:00:00 2001 From: zowe-robot Date: Mon, 4 Nov 2024 16:04:50 +0000 Subject: [PATCH 12/12] Bump version to 8.6.2 [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/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/CHANGELOG.md | 2 +- 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 40a1cfb090..56cf637de5 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.6.1", + "version": "8.6.2", "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.6.1" + "@zowe/imperative": "8.6.2" }, "peerDependencies": { "@zowe/imperative": "^8.0.0" diff --git a/lerna.json b/lerna.json index 7d52575206..4f3a18280a 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "8.6.1", + "version": "8.6.2", "command": { "publish": { "ignoreChanges": [ diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index face8cd51d..698b56ff0e 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.6.1", + "version": "8.6.2", "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.6.1" + "@zowe/imperative": "8.6.2" }, "peerDependencies": { "@zowe/imperative": "^8.0.0" @@ -16267,21 +16267,21 @@ }, "packages/cli": { "name": "@zowe/cli", - "version": "8.6.1", + "version": "8.6.2", "hasInstallScript": true, "license": "EPL-2.0", "dependencies": { - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1", - "@zowe/provisioning-for-zowe-sdk": "8.6.1", - "@zowe/zos-console-for-zowe-sdk": "8.6.1", - "@zowe/zos-files-for-zowe-sdk": "8.6.1", - "@zowe/zos-jobs-for-zowe-sdk": "8.6.1", - "@zowe/zos-logs-for-zowe-sdk": "8.6.1", - "@zowe/zos-tso-for-zowe-sdk": "8.6.1", - "@zowe/zos-uss-for-zowe-sdk": "8.6.1", - "@zowe/zos-workflows-for-zowe-sdk": "8.6.1", - "@zowe/zosmf-for-zowe-sdk": "8.6.1", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2", + "@zowe/provisioning-for-zowe-sdk": "8.6.2", + "@zowe/zos-console-for-zowe-sdk": "8.6.2", + "@zowe/zos-files-for-zowe-sdk": "8.6.2", + "@zowe/zos-jobs-for-zowe-sdk": "8.6.2", + "@zowe/zos-logs-for-zowe-sdk": "8.6.2", + "@zowe/zos-tso-for-zowe-sdk": "8.6.2", + "@zowe/zos-uss-for-zowe-sdk": "8.6.2", + "@zowe/zos-workflows-for-zowe-sdk": "8.6.2", + "@zowe/zosmf-for-zowe-sdk": "8.6.2", "find-process": "1.4.7", "lodash": "4.17.21", "minimatch": "9.0.5", @@ -16294,7 +16294,7 @@ "@types/diff": "^5.0.9", "@types/lodash": "^4.17.6", "@types/tar": "^6.1.11", - "@zowe/cli-test-utils": "8.6.1", + "@zowe/cli-test-utils": "8.6.2", "comment-json": "^4.2.3", "strip-ansi": "^6.0.1", "which": "^4.0.0" @@ -16350,15 +16350,15 @@ }, "packages/core": { "name": "@zowe/core-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "license": "EPL-2.0", "dependencies": { "comment-json": "~4.2.3", "string-width": "^4.2.3" }, "devDependencies": { - "@zowe/cli-test-utils": "8.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/imperative": "8.6.2" }, "engines": { "node": ">=18.12.0" @@ -16369,7 +16369,7 @@ }, "packages/imperative": { "name": "@zowe/imperative", - "version": "8.6.1", + "version": "8.6.2", "license": "EPL-2.0", "dependencies": { "@types/yargs": "^17.0.32", @@ -16563,16 +16563,16 @@ }, "packages/provisioning": { "name": "@zowe/provisioning-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "license": "EPL-2.0", "dependencies": { "js-yaml": "^4.1.0" }, "devDependencies": { "@types/js-yaml": "^4.0.9", - "@zowe/cli-test-utils": "8.6.1", - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2" }, "engines": { "node": ">=18.12.0" @@ -16597,15 +16597,15 @@ }, "packages/workflows": { "name": "@zowe/zos-workflows-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "license": "EPL-2.0", "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.6.1" + "@zowe/zos-files-for-zowe-sdk": "8.6.2" }, "devDependencies": { - "@zowe/cli-test-utils": "8.6.1", - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2" }, "engines": { "node": ">=18.12.0" @@ -16617,12 +16617,12 @@ }, "packages/zosconsole": { "name": "@zowe/zos-console-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "license": "EPL-2.0", "devDependencies": { - "@zowe/cli-test-utils": "8.6.1", - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2" }, "engines": { "node": ">=18.12.0" @@ -16634,17 +16634,17 @@ }, "packages/zosfiles": { "name": "@zowe/zos-files-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "license": "EPL-2.0", "dependencies": { "lodash": "^4.17.21", "minimatch": "^9.0.5" }, "devDependencies": { - "@zowe/cli-test-utils": "8.6.1", - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1", - "@zowe/zos-uss-for-zowe-sdk": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2", + "@zowe/zos-uss-for-zowe-sdk": "8.6.2" }, "engines": { "node": ">=18.12.0" @@ -16676,15 +16676,15 @@ }, "packages/zosjobs": { "name": "@zowe/zos-jobs-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "license": "EPL-2.0", "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.6.1" + "@zowe/zos-files-for-zowe-sdk": "8.6.2" }, "devDependencies": { - "@zowe/cli-test-utils": "8.6.1", - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2" }, "engines": { "node": ">=18.12.0" @@ -16696,12 +16696,12 @@ }, "packages/zoslogs": { "name": "@zowe/zos-logs-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "license": "EPL-2.0", "devDependencies": { - "@zowe/cli-test-utils": "8.6.1", - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2" }, "engines": { "node": ">=18.12.0" @@ -16713,12 +16713,12 @@ }, "packages/zosmf": { "name": "@zowe/zosmf-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "license": "EPL-2.0", "devDependencies": { - "@zowe/cli-test-utils": "8.6.1", - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2" }, "engines": { "node": ">=18.12.0" @@ -16730,15 +16730,15 @@ }, "packages/zostso": { "name": "@zowe/zos-tso-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "license": "EPL-2.0", "dependencies": { - "@zowe/zosmf-for-zowe-sdk": "8.6.1" + "@zowe/zosmf-for-zowe-sdk": "8.6.2" }, "devDependencies": { - "@zowe/cli-test-utils": "8.6.1", - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2" }, "engines": { "node": ">=18.12.0" @@ -16750,15 +16750,15 @@ }, "packages/zosuss": { "name": "@zowe/zos-uss-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "license": "EPL-2.0", "dependencies": { "ssh2": "^1.15.0" }, "devDependencies": { "@types/ssh2": "^1.11.19", - "@zowe/cli-test-utils": "8.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/imperative": "8.6.2" }, "engines": { "node": ">=18.12.0" diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index e828c15721..f553ae64fb 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to the Zowe CLI package will be documented in this file. -## Recent Changes +## `8.6.2` - BugFix: Resolved issue where `zowe zos-files upload file-to-uss` was not properly handling command flags. [#2234](https://github.com/zowe/zowe-cli/pull/2334) diff --git a/packages/cli/package.json b/packages/cli/package.json index d6270f3599..615c401698 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/cli", - "version": "8.6.1", + "version": "8.6.2", "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.6.1", - "@zowe/imperative": "8.6.1", - "@zowe/provisioning-for-zowe-sdk": "8.6.1", - "@zowe/zos-console-for-zowe-sdk": "8.6.1", - "@zowe/zos-files-for-zowe-sdk": "8.6.1", - "@zowe/zos-jobs-for-zowe-sdk": "8.6.1", - "@zowe/zos-logs-for-zowe-sdk": "8.6.1", - "@zowe/zos-tso-for-zowe-sdk": "8.6.1", - "@zowe/zos-uss-for-zowe-sdk": "8.6.1", - "@zowe/zos-workflows-for-zowe-sdk": "8.6.1", - "@zowe/zosmf-for-zowe-sdk": "8.6.1", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2", + "@zowe/provisioning-for-zowe-sdk": "8.6.2", + "@zowe/zos-console-for-zowe-sdk": "8.6.2", + "@zowe/zos-files-for-zowe-sdk": "8.6.2", + "@zowe/zos-jobs-for-zowe-sdk": "8.6.2", + "@zowe/zos-logs-for-zowe-sdk": "8.6.2", + "@zowe/zos-tso-for-zowe-sdk": "8.6.2", + "@zowe/zos-uss-for-zowe-sdk": "8.6.2", + "@zowe/zos-workflows-for-zowe-sdk": "8.6.2", + "@zowe/zosmf-for-zowe-sdk": "8.6.2", "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.6.1", + "@zowe/cli-test-utils": "8.6.2", "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 f577a2df2f..8aa0b92f1b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/core-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "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.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/imperative": "8.6.2" }, "peerDependencies": { "@zowe/imperative": "^8.0.0" diff --git a/packages/imperative/package.json b/packages/imperative/package.json index a0aa2979df..83c53907a8 100644 --- a/packages/imperative/package.json +++ b/packages/imperative/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/imperative", - "version": "8.6.1", + "version": "8.6.2", "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 5ec3550d6b..3c2653a2c6 100644 --- a/packages/provisioning/package.json +++ b/packages/provisioning/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/provisioning-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "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.6.1", - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/workflows/package.json b/packages/workflows/package.json index 322a783c6a..cb222f0e41 100644 --- a/packages/workflows/package.json +++ b/packages/workflows/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-workflows-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "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.6.1" + "@zowe/zos-files-for-zowe-sdk": "8.6.2" }, "devDependencies": { - "@zowe/cli-test-utils": "8.6.1", - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zosconsole/package.json b/packages/zosconsole/package.json index 2db608eeb1..d6d8de132b 100644 --- a/packages/zosconsole/package.json +++ b/packages/zosconsole/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-console-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "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.6.1", - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zosfiles/CHANGELOG.md b/packages/zosfiles/CHANGELOG.md index 4407123388..a7d879d22f 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.6.2` - BugFix: Resolved issue where encoding argument was missing from `FileToUss.handler.ts` options object. [#2234](https://github.com/zowe/zowe-cli/pull/2334) - BugFix: Resolved issue where `FileToUss.handler.ts` options object was not properly passed through subsequent command calls. [#2234](https://github.com/zowe/zowe-cli/pull/2334) diff --git a/packages/zosfiles/package.json b/packages/zosfiles/package.json index e2b823ff63..54d827f333 100644 --- a/packages/zosfiles/package.json +++ b/packages/zosfiles/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-files-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "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.6.1", - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1", - "@zowe/zos-uss-for-zowe-sdk": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2", + "@zowe/zos-uss-for-zowe-sdk": "8.6.2" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zosjobs/package.json b/packages/zosjobs/package.json index dd7660d7dd..fdc5156464 100644 --- a/packages/zosjobs/package.json +++ b/packages/zosjobs/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-jobs-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "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.6.1" + "@zowe/zos-files-for-zowe-sdk": "8.6.2" }, "devDependencies": { - "@zowe/cli-test-utils": "8.6.1", - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zoslogs/package.json b/packages/zoslogs/package.json index 112c0bc7cb..c7fdaca2ef 100644 --- a/packages/zoslogs/package.json +++ b/packages/zoslogs/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-logs-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "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.6.1", - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zosmf/package.json b/packages/zosmf/package.json index ef2644bfa6..5c84b13d8c 100644 --- a/packages/zosmf/package.json +++ b/packages/zosmf/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zosmf-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "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.6.1", - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zostso/CHANGELOG.md b/packages/zostso/CHANGELOG.md index 65a0667e54..25f79e7a01 100644 --- a/packages/zostso/CHANGELOG.md +++ b/packages/zostso/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to the Zowe z/OS TSO SDK package will be documented in this file. -## Recent Changes +## `8.6.2` - BugFix: Fixed imports that failed to resolve. [#2343](https://github.com/zowe/zowe-cli/pull/2343) diff --git a/packages/zostso/package.json b/packages/zostso/package.json index 66013cb01c..233434a46e 100644 --- a/packages/zostso/package.json +++ b/packages/zostso/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-tso-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "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.6.1" + "@zowe/zosmf-for-zowe-sdk": "8.6.2" }, "devDependencies": { - "@zowe/cli-test-utils": "8.6.1", - "@zowe/core-for-zowe-sdk": "8.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/core-for-zowe-sdk": "8.6.2", + "@zowe/imperative": "8.6.2" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0", diff --git a/packages/zosuss/package.json b/packages/zosuss/package.json index c6a33495e4..4e5ebb3190 100644 --- a/packages/zosuss/package.json +++ b/packages/zosuss/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-uss-for-zowe-sdk", - "version": "8.6.1", + "version": "8.6.2", "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.6.1", - "@zowe/imperative": "8.6.1" + "@zowe/cli-test-utils": "8.6.2", + "@zowe/imperative": "8.6.2" }, "peerDependencies": { "@zowe/imperative": "^8.0.0"