From 648c01fb6968225522a9dbc8e78de41dd71838a4 Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Tue, 17 Oct 2023 15:40:40 -0400 Subject: [PATCH 01/71] [wip] feat(extend): Update schema with missing types Signed-off-by: Trae Yelovich --- .../zowe-explorer/src/ZoweExplorerExtender.ts | 44 ++++++++++++++++--- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/packages/zowe-explorer/src/ZoweExplorerExtender.ts b/packages/zowe-explorer/src/ZoweExplorerExtender.ts index 6dd235aa7a..de96303b7a 100644 --- a/packages/zowe-explorer/src/ZoweExplorerExtender.ts +++ b/packages/zowe-explorer/src/ZoweExplorerExtender.ts @@ -156,6 +156,8 @@ export class ZoweExplorerExtender implements ZoweExplorerApi.IApiExplorerExtende // will be created with the appropriate meta data. If not called the user will // see errors when creating a profile of any type. const zoweDir = getZoweDir(); + const workspaceOpen = vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders[0]; + const projectDir = workspaceOpen ? getFullPath(vscode.workspace.workspaceFolders[0].uri.fsPath) : undefined; /** * This should create initialize the loadedConfig if it is not already @@ -166,12 +168,7 @@ export class ZoweExplorerExtender implements ZoweExplorerApi.IApiExplorerExtende let usingTeamConfig: boolean; try { const mProfileInfo = await ProfilesUtils.getProfileInfo(globals.ISTHEIA); - if (vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders[0]) { - const rootPath = vscode.workspace.workspaceFolders[0].uri.fsPath; - await mProfileInfo.readProfilesFromDisk({ homeDir: zoweDir, projectDir: getFullPath(rootPath) }); - } else { - await mProfileInfo.readProfilesFromDisk({ homeDir: zoweDir, projectDir: undefined }); - } + await mProfileInfo.readProfilesFromDisk({ homeDir: zoweDir, projectDir }); usingTeamConfig = mProfileInfo.usingTeamConfig; } catch (error) { ZoweLogger.warn(error); @@ -191,7 +188,40 @@ export class ZoweExplorerExtender implements ZoweExplorerApi.IApiExplorerExtende }); } } - if (profileTypeConfigurations !== undefined) Profiles.getInstance().addToConfigArray(profileTypeConfigurations); + if (profileTypeConfigurations !== undefined) { + Profiles.getInstance().addToConfigArray(profileTypeConfigurations); + } + + if (usingTeamConfig && profileTypeConfigurations != null) { + const projSchemaLoc = projectDir ? path.join(projectDir, "zowe.schema.json") : null; + const projSchemaExists = projSchemaLoc ? fs.existsSync(projSchemaLoc) : false; + + // use the project-level schema if it exists; update the global schema otherwise + const schemaPath = projSchemaExists ? path.join(projectDir, "zowe.schema.json") : path.join(getZoweDir(), "zowe.schema.json"); + + try { + const schemaContents = fs.readFileSync(schemaPath).toString(); + const parsedSchema = JSON.parse(schemaContents); + + const schemaTypes = zowe.imperative.ConfigSchema.loadSchema(parsedSchema); + const newSchemaTypes = Profiles.getInstance().getConfigArray(); + + // Check if any types need added to the schema + const typesToAdd = newSchemaTypes.filter((s) => schemaTypes.find((newS) => s.type === newS.type) == null); + if (typesToAdd.length > 0) { + // Get profile types from config on-disk and merge with new profile types + const mergedProfTypes = [...schemaTypes, ...typesToAdd]; + + // rebuild schema to contain all (merged) profile types and write to disk + const newSchema = JSON.stringify(zowe.imperative.ConfigSchema.buildSchema(mergedProfTypes)); + fs.writeFileSync(schemaPath, newSchema); + } + } catch (err) { + // TODO: Inform user only if we couldn't write the new schema to disk + // If we can't read the schema or parse its contents, its nothing that should + // hold up the initialization + } + } // sequentially reload the internal profiles cache to satisfy all the newly added profile types await ZoweExplorerExtender.refreshProfilesQueue.add(async (): Promise => { From 1784db55a1c02ab06f316aa79602c1537265cd1c Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Thu, 16 Nov 2023 13:36:49 -0500 Subject: [PATCH 02/71] Add to Schema: bump patch cov., add typedoc Signed-off-by: Trae Yelovich --- .../__mocks__/@zowe/imperative.ts | 4 + .../__mocks__/mockCreators/shared.ts | 7 + packages/zowe-explorer/__mocks__/mockUtils.ts | 2 + packages/zowe-explorer/__mocks__/path.ts | 4 + .../zowe-explorer/__mocks__/sampleSchema.json | 102 +++++++++ .../zowe-explorer/__mocks__/zowe.schema.json | 213 ++++++++++++++++++ .../ZoweExplorerExtender.unit.test.ts | 94 ++++++-- .../tsoCommandHandler.extended.unit.test.ts | 1 - .../__unit__/dataset/DatasetTree.unit.test.ts | 4 +- .../__unit__/dataset/actions.unit.test.ts | 4 +- .../__unit__/job/ZosJobsProvider.unit.test.ts | 4 +- .../__unit__/job/actions.unit.test.ts | 4 +- .../__unit__/shared/actions.unit.test.ts | 4 +- .../__unit__/shared/utils.unit.test.ts | 2 - .../__unit__/uss/USSTree.unit.test.ts | 3 +- .../__unit__/uss/ZoweUSSNode.unit.test.ts | 4 +- .../__unit__/uss/actions.unit.test.ts | 3 +- .../__tests__/__unit__/utils.unit.test.ts | 4 +- .../__unit__/utils/ProfilesUtils.unit.test.ts | 2 +- .../zowe-explorer/src/ZoweExplorerExtender.ts | 82 ++++--- 20 files changed, 475 insertions(+), 72 deletions(-) create mode 100644 packages/zowe-explorer/__mocks__/mockUtils.ts create mode 100644 packages/zowe-explorer/__mocks__/sampleSchema.json create mode 100644 packages/zowe-explorer/__mocks__/zowe.schema.json diff --git a/packages/zowe-explorer/__mocks__/@zowe/imperative.ts b/packages/zowe-explorer/__mocks__/@zowe/imperative.ts index c85cc88a6e..8a44e78e88 100644 --- a/packages/zowe-explorer/__mocks__/@zowe/imperative.ts +++ b/packages/zowe-explorer/__mocks__/@zowe/imperative.ts @@ -279,6 +279,10 @@ export class ConfigSchema { public static buildSchema() { return {}; } + + public static loadSchema() { + return []; + } } export class CredentialManagerOverride { diff --git a/packages/zowe-explorer/__mocks__/mockCreators/shared.ts b/packages/zowe-explorer/__mocks__/mockCreators/shared.ts index 07d17faaf5..33ca0da6b6 100644 --- a/packages/zowe-explorer/__mocks__/mockCreators/shared.ts +++ b/packages/zowe-explorer/__mocks__/mockCreators/shared.ts @@ -17,6 +17,9 @@ import { ValidProfileEnum } from "@zowe/zowe-explorer-api"; import { FilterDescriptor } from "../../src/utils/ProfilesUtils"; import { imperative, ZosmfSession } from "@zowe/cli"; import { SettingsConfig } from "../../src/utils/SettingsConfig"; +import { Profiles } from "../../src/Profiles"; + +const MOCK_PROFILES = []; export function createPersistentConfig() { return { @@ -307,6 +310,8 @@ export function createTextDocument(name: string, sessionNode?: ZoweDatasetNode | export function createInstanceOfProfile(profile: imperative.IProfileLoaded) { return { + ...Profiles.prototype, + addToConfigArray: Profiles.prototype.addToConfigArray, allProfiles: [{ name: "sestest" }, { name: "profile1" }, { name: "profile2" }], defaultProfile: { name: "sestest" }, getDefaultProfile: jest.fn(), @@ -318,6 +323,8 @@ export function createInstanceOfProfile(profile: imperative.IProfileLoaded) { return { status: "active", name: "sestest" }; }), profilesForValidation: [{ status: "active", name: "sestest" }], + profileTypeConfigurations: MOCK_PROFILES, + getConfigArray: () => MOCK_PROFILES, validateProfiles: jest.fn(), getBaseProfile: jest.fn(), enableValidationContext: jest.fn(), diff --git a/packages/zowe-explorer/__mocks__/mockUtils.ts b/packages/zowe-explorer/__mocks__/mockUtils.ts new file mode 100644 index 0000000000..250c61e8ce --- /dev/null +++ b/packages/zowe-explorer/__mocks__/mockUtils.ts @@ -0,0 +1,2 @@ +// Idea is borrowed from: https://github.com/kulshekhar/ts-jest/blob/master/src/util/testing.ts +export const mocked = any>(fn: T): jest.Mock> => fn as any; diff --git a/packages/zowe-explorer/__mocks__/path.ts b/packages/zowe-explorer/__mocks__/path.ts index c394eff5ab..00adfac79b 100644 --- a/packages/zowe-explorer/__mocks__/path.ts +++ b/packages/zowe-explorer/__mocks__/path.ts @@ -25,3 +25,7 @@ export function extname(file: string): string { export function parse(file: string) { return { name: file }; } + +export function basename(path: string) { + return jest.requireActual("path")["basename"](path); +} diff --git a/packages/zowe-explorer/__mocks__/sampleSchema.json b/packages/zowe-explorer/__mocks__/sampleSchema.json new file mode 100644 index 0000000000..a0a78bd7b3 --- /dev/null +++ b/packages/zowe-explorer/__mocks__/sampleSchema.json @@ -0,0 +1,102 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$version": "1.0", + "type": "object", + "description": "Zowe configuration", + "properties": { + "profiles": { + "type": "object", + "description": "Mapping of profile names to profile configurations", + "patternProperties": { + "^\\S*$": { + "type": "object", + "description": "Profile configuration object", + "properties": { + "type": { + "description": "Profile type", + "type": "string", + "enum": ["sample"] + }, + "properties": { + "description": "Profile properties object", + "type": "object" + }, + "profiles": { + "description": "Optional subprofile configurations", + "type": "object", + "$ref": "#/properties/profiles" + }, + "secure": { + "description": "Secure property names", + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": false + } + }, + "then": { + "properties": { + "properties": { + "title": "Missing profile type" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "sample" + } + } + }, + "then": { + "properties": { + "properties": { + "type": "object", + "title": "Sample Profile", + "description": "Sample profile that stores values", + "properties": { + "host": { + "type": "string", + "description": "Host name of sample service on the mainframe." + } + }, + "required": [] + }, + "secure": { + "items": { + "enum": ["user", "password", "tokenValue"] + } + } + } + } + } + ] + } + } + }, + "defaults": { + "type": "object", + "description": "Mapping of profile types to default profile names", + "properties": { + "sample": { + "description": "Default sample profile", + "type": "string" + } + } + }, + "autoStore": { + "type": "boolean", + "description": "If true, values you enter when prompted are stored for future use" + } + } +} diff --git a/packages/zowe-explorer/__mocks__/zowe.schema.json b/packages/zowe-explorer/__mocks__/zowe.schema.json new file mode 100644 index 0000000000..bb34b77cfe --- /dev/null +++ b/packages/zowe-explorer/__mocks__/zowe.schema.json @@ -0,0 +1,213 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$version": "1.0", + "type": "object", + "description": "Zowe configuration", + "properties": { + "profiles": { + "type": "object", + "description": "Mapping of profile names to profile configurations", + "patternProperties": { + "^\\S*$": { + "type": "object", + "description": "Profile configuration object", + "properties": { + "type": { + "description": "Profile type", + "type": "string", + "enum": ["zosmf", "base"] + }, + "properties": { + "description": "Profile properties object", + "type": "object" + }, + "profiles": { + "description": "Optional subprofile configurations", + "type": "object", + "$ref": "#/properties/profiles" + }, + "secure": { + "description": "Secure property names", + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": false + } + }, + "then": { + "properties": { + "properties": { + "title": "Missing profile type" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "zosmf" + } + } + }, + "then": { + "properties": { + "properties": { + "type": "object", + "title": "z/OSMF Profile", + "description": "z/OSMF Profile", + "properties": { + "host": { + "type": "string", + "description": "The z/OSMF server host name." + }, + "port": { + "type": "number", + "description": "The z/OSMF server port.", + "default": 443 + }, + "user": { + "type": "string", + "description": "Mainframe (z/OSMF) user name, which can be the same as your TSO login." + }, + "password": { + "type": "string", + "description": "Mainframe (z/OSMF) password, which can be the same as your TSO password." + }, + "rejectUnauthorized": { + "type": "boolean", + "description": "Reject self-signed certificates.", + "default": true + }, + "certFile": { + "type": "string", + "description": "The file path to a certificate file to use for authentication" + }, + "certKeyFile": { + "type": "string", + "description": "The file path to a certificate key file to use for authentication" + }, + "basePath": { + "type": "string", + "description": "The base path for your API mediation layer instance. Specify this option to prepend the base path to all z/OSMF resources when making REST requests. Do not specify this option if you are not using an API mediation layer." + }, + "protocol": { + "type": "string", + "description": "The protocol used (HTTP or HTTPS)", + "default": "https", + "enum": ["http", "https"] + }, + "encoding": { + "type": "string", + "description": "The encoding for download and upload of z/OS data set and USS files. The default encoding if not specified is IBM-1047." + }, + "responseTimeout": { + "type": "number", + "description": "The maximum amount of time in seconds the z/OSMF Files TSO servlet should run before returning a response. Any request exceeding this amount of time will be terminated and return an error. Allowed values: 5 - 600" + } + }, + "required": [] + }, + "secure": { + "items": { + "enum": ["user", "password"] + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "base" + } + } + }, + "then": { + "properties": { + "properties": { + "type": "object", + "title": "Base Profile", + "description": "Base profile that stores values shared by multiple service profiles", + "properties": { + "host": { + "type": "string", + "description": "Host name of service on the mainframe." + }, + "port": { + "type": "number", + "description": "Port number of service on the mainframe." + }, + "user": { + "type": "string", + "description": "User name to authenticate to service on the mainframe." + }, + "password": { + "type": "string", + "description": "Password to authenticate to service on the mainframe." + }, + "rejectUnauthorized": { + "type": "boolean", + "description": "Reject self-signed certificates.", + "default": true + }, + "tokenType": { + "type": "string", + "description": "The type of token to get and use for the API. Omit this option to use the default token type, which is provided by 'zowe auth login'." + }, + "tokenValue": { + "type": "string", + "description": "The value of the token to pass to the API." + }, + "certFile": { + "type": "string", + "description": "The file path to a certificate file to use for authentication" + }, + "certKeyFile": { + "type": "string", + "description": "The file path to a certificate key file to use for authentication" + } + }, + "required": [] + }, + "secure": { + "items": { + "enum": ["user", "password", "tokenValue"] + } + } + } + } + } + ] + } + } + }, + "defaults": { + "type": "object", + "description": "Mapping of profile types to default profile names", + "properties": { + "zosmf": { + "description": "Default zosmf profile", + "type": "string" + }, + "base": { + "description": "Default base profile", + "type": "string" + } + } + }, + "autoStore": { + "type": "boolean", + "description": "If true, values you enter when prompted are stored for future use" + } + } +} diff --git a/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts index a3bea5845a..50c9abab05 100644 --- a/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts @@ -35,7 +35,7 @@ describe("ZoweExplorerExtender unit tests", () => { altTypeProfile: createAltTypeIProfile(), treeView: createTreeView(), instTest: ZoweExplorerExtender.getInstance(), - profiles: null, + profiles: {}, mockGetConfiguration: jest.fn(), mockErrorMessage: jest.fn(), mockExistsSync: jest.fn(), @@ -44,15 +44,7 @@ describe("ZoweExplorerExtender unit tests", () => { Object.defineProperty(fs, "existsSync", { value: newMocks.mockExistsSync, configurable: true }); newMocks.profiles = createInstanceOfProfile(newMocks.imperativeProfile); - Object.defineProperty(Profiles, "getInstance", { - value: jest - .fn(() => { - return { - refresh: jest.fn(), - }; - }) - .mockReturnValue(newMocks.profiles), - }); + jest.spyOn(Profiles, "getInstance").mockReturnValue(newMocks.profiles as any); Object.defineProperty(vscode.window, "createTreeView", { value: jest.fn(), configurable: true }); Object.defineProperty(vscode.window, "showErrorMessage", { value: newMocks.mockErrorMessage, @@ -78,10 +70,6 @@ describe("ZoweExplorerExtender unit tests", () => { value: jest.fn(), configurable: true, }); - Object.defineProperty(Profiles.getInstance(), "addToConfigArray", { - value: jest.fn(), - configurable: true, - }); return newMocks; } @@ -221,4 +209,82 @@ describe("ZoweExplorerExtender unit tests", () => { expect(readProfilesFromDiskSpy).toBeCalledTimes(1); expect(refreshProfilesQueueAddSpy).toHaveBeenCalledTimes(1); }); + + describe("Add to Schema functionality", () => { + const updateSchema = async ( + level: string = "global", + writeFileSyncImpl: ( + path: number | fs.PathLike, + data: string | ArrayBufferView, + options?: fs.WriteFileOptions | undefined + ) => void = jest.fn() + ) => { + const blockMocks = await createBlockMocks(); + const readProfilesFromDisk = jest.fn(); + const schemaFolder = path.resolve("__mocks__"); + if (level === "project") { + Object.defineProperty(vscode.workspace, "workspaceFolders", { + value: [ + { + uri: { + fsPath: schemaFolder, + }, + }, + ], + configurable: true, + }); + } + + jest.spyOn(profUtils.ProfilesUtils, "getProfileInfo").mockResolvedValueOnce({ usingTeamConfig: true, readProfilesFromDisk } as any); + const writeFileSyncSpy = jest.spyOn(fs, "writeFileSync").mockImplementation(writeFileSyncImpl); + jest.spyOn(imperative.ConfigSchema, "loadSchema").mockReturnValue([ + { + type: "zosmf", + schema: {} as any, + }, + { + type: "base", + schema: {} as any, + }, + ]); + await blockMocks.instTest.initForZowe("sample", [ + { + schema: {} as any, + type: "sample", + }, + ]); + expect(writeFileSyncSpy).toHaveBeenCalled(); + writeFileSyncSpy.mockRestore(); + }; + + describe("global schema", () => { + it("should update when an extender calls initForZowe", async () => { + await updateSchema(); + }); + + it("should throw an error if the schema is read-only", async () => { + const errorMessageSpy = jest.spyOn(Gui, "errorMessage"); + await updateSchema("global", (_filepath, _contents) => { + const err = new Error(); + Object.defineProperty(err, "code", { + value: "EACCES", + }); + throw err; + }); + expect(errorMessageSpy).toHaveBeenCalledWith( + `Failed to update Zowe schema at ${path.join( + "__tests__", + ".zowe", + "zowe.schema.json" + )}: insufficient permissions or read-only file` + ); + }); + }); + + describe("project-level schema", () => { + it("should update when an extender calls initForZowe", async () => { + await updateSchema("project"); + }); + }); + }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/command/tsoCommandHandler.extended.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/command/tsoCommandHandler.extended.unit.test.ts index 39247218e2..834c3d1364 100644 --- a/packages/zowe-explorer/__tests__/__unit__/command/tsoCommandHandler.extended.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/command/tsoCommandHandler.extended.unit.test.ts @@ -19,7 +19,6 @@ import { ZoweLogger } from "../../../src/utils/LoggerUtils"; describe("TsoCommandHandler extended testing", () => { // Idea is borrowed from: https://github.com/kulshekhar/ts-jest/blob/master/src/util/testing.ts - const mocked = any>(fn: T): jest.Mock> => fn as any; const newMocks = { imperativeProfile: createIProfile(), profileInstance: null, diff --git a/packages/zowe-explorer/__tests__/__unit__/dataset/DatasetTree.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/dataset/DatasetTree.unit.test.ts index 9cb5357619..f15b218118 100644 --- a/packages/zowe-explorer/__tests__/__unit__/dataset/DatasetTree.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/dataset/DatasetTree.unit.test.ts @@ -41,6 +41,7 @@ import * as dsUtils from "../../../src/dataset/utils"; import { SettingsConfig } from "../../../src/utils/SettingsConfig"; import * as sharedActions from "../../../src/shared/actions"; import { ZoweLogger } from "../../../src/utils/LoggerUtils"; +import { mocked } from "../../../__mocks__/mockUtils"; jest.mock("fs"); jest.mock("util"); @@ -154,9 +155,6 @@ function createGlobalMocks() { return globalMocks; } -// Idea is borrowed from: https://github.com/kulshekhar/ts-jest/blob/eadf408f90ca2007b85f5a61c6c0b74b4e431943/src/utils/testing.ts -const mocked = any>(fn: T): jest.Mock> => fn as any; - describe("Dataset Tree Unit Tests - Initialisation", () => { function createBlockMocks() { const session = createISession(); diff --git a/packages/zowe-explorer/__tests__/__unit__/dataset/actions.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/dataset/actions.unit.test.ts index 93aeba652e..d861da3abd 100644 --- a/packages/zowe-explorer/__tests__/__unit__/dataset/actions.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/dataset/actions.unit.test.ts @@ -43,6 +43,7 @@ import { getNodeLabels } from "../../../src/dataset/utils"; import { ZoweLogger } from "../../../src/utils/LoggerUtils"; import * as context from "../../../src/shared/context"; import { ZoweExplorerApiRegister } from "../../../src/ZoweExplorerApiRegister"; +import { mocked } from "../../../__mocks__/mockUtils"; // Missing the definition of path module, because I need the original logic for tests jest.mock("fs"); @@ -132,9 +133,6 @@ function createGlobalMocks() { return newMocks; } -// Idea is borrowed from: https://github.com/kulshekhar/ts-jest/blob/master/src/util/testing.ts -const mocked = any>(fn: T): jest.Mock> => fn as any; - const createBlockMocksShared = () => { const session = createISession(); const imperativeProfile = createIProfile(); diff --git a/packages/zowe-explorer/__tests__/__unit__/job/ZosJobsProvider.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/job/ZosJobsProvider.unit.test.ts index da5b74ffa7..71061d45fb 100644 --- a/packages/zowe-explorer/__tests__/__unit__/job/ZosJobsProvider.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/job/ZosJobsProvider.unit.test.ts @@ -35,6 +35,7 @@ import { jobStringValidator } from "../../../src/shared/utils"; import { ZoweLogger } from "../../../src/utils/LoggerUtils"; import { Poller } from "@zowe/zowe-explorer-api/src/utils"; import { SettingsConfig } from "../../../src/utils/SettingsConfig"; +import { mocked } from "../../../__mocks__/mockUtils"; async function createGlobalMocks() { const globalMocks = { @@ -195,9 +196,6 @@ async function createGlobalMocks() { return globalMocks; } -// Idea is borrowed from: https://github.com/kulshekhar/ts-jest/blob/master/src/util/testing.ts -const mocked = any>(fn: T): jest.Mock> => fn as any; - describe("ZosJobsProvider unit tests - Function getChildren", () => { function createBlockMocks(globalMocks) { const newMocks = { diff --git a/packages/zowe-explorer/__tests__/__unit__/job/actions.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/job/actions.unit.test.ts index 85737a5c89..28a8ef34aa 100644 --- a/packages/zowe-explorer/__tests__/__unit__/job/actions.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/job/actions.unit.test.ts @@ -42,6 +42,7 @@ import * as sharedUtils from "../../../src/shared/utils"; import { ZoweLogger } from "../../../src/utils/LoggerUtils"; import { SpoolFile } from "../../../src/SpoolProvider"; import { ZosJobsProvider } from "../../../src/job/ZosJobsProvider"; +import { mocked } from "../../../__mocks__/mockUtils"; const activeTextEditorDocument = jest.fn(); @@ -131,9 +132,6 @@ function createGlobalMocks() { return newMocks; } -// Idea is borrowed from: https://github.com/kulshekhar/ts-jest/blob/master/src/util/testing.ts -const mocked = any>(fn: T): jest.Mock> => fn as any; - afterEach(() => { jest.clearAllMocks(); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/shared/actions.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/shared/actions.unit.test.ts index 51e6c042a8..87cf860d18 100644 --- a/packages/zowe-explorer/__tests__/__unit__/shared/actions.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/shared/actions.unit.test.ts @@ -31,6 +31,7 @@ import { ZoweUSSNode } from "../../../src/uss/ZoweUSSNode"; import { getIconById, IconId, getIconByNode } from "../../../src/generators/icons"; import * as zowe from "@zowe/cli"; import { ZoweLogger } from "../../../src/utils/LoggerUtils"; +import { mocked } from "../../../__mocks__/mockUtils"; async function createGlobalMocks() { const globalMocks = { @@ -108,9 +109,6 @@ async function createGlobalMocks() { return globalMocks; } -// Idea is borrowed from: https://github.com/kulshekhar/ts-jest/blob/master/src/util/testing.ts -const mocked = any>(fn: T): jest.Mock> => fn as any; - describe("Shared Actions Unit Tests - Function searchForLoadedItems", () => { function createBlockMocks(globalMocks) { const newMocks = { diff --git a/packages/zowe-explorer/__tests__/__unit__/shared/utils.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/shared/utils.unit.test.ts index 4fa7ad9190..e29b3c4656 100644 --- a/packages/zowe-explorer/__tests__/__unit__/shared/utils.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/shared/utils.unit.test.ts @@ -32,8 +32,6 @@ import * as utils from "../../../src/utils/ProfilesUtils"; import { ProfilesCache } from "@zowe/zowe-explorer-api"; import { ZoweLogger } from "../../../src/utils/LoggerUtils"; -jest.mock("path"); - async function createGlobalMocks() { const newMocks = { session: createISession(), diff --git a/packages/zowe-explorer/__tests__/__unit__/uss/USSTree.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/uss/USSTree.unit.test.ts index 56d20ad5b0..32e78399ca 100644 --- a/packages/zowe-explorer/__tests__/__unit__/uss/USSTree.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/uss/USSTree.unit.test.ts @@ -32,6 +32,7 @@ import { getIconByNode } from "../../../src/generators/icons"; import * as workspaceUtils from "../../../src/utils/workspace"; import { createUssApi, bindUssApi } from "../../../__mocks__/mockCreators/api"; import { ZoweLogger } from "../../../src/utils/LoggerUtils"; +import { mocked } from "../../../__mocks__/mockUtils"; async function createGlobalMocks() { const globalMocks = { @@ -1425,8 +1426,6 @@ describe("USSTree Unit Tests - Function USSTree.getChildren()", () => { expect(loadProfilesForFavoritesSpy).toHaveBeenCalledWith(log, favProfileNode); }); }); -// Idea is borrowed from: https://github.com/kulshekhar/ts-jest/blob/master/src/util/testing.ts -const mocked = any>(fn: T): jest.Mock> => fn as any; describe("USSTree Unit Tests - Function USSTree.loadProfilesForFavorites", () => { function createBlockMocks(globalMocks) { diff --git a/packages/zowe-explorer/__tests__/__unit__/uss/ZoweUSSNode.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/uss/ZoweUSSNode.unit.test.ts index b80a6805f3..e6969bd5fd 100644 --- a/packages/zowe-explorer/__tests__/__unit__/uss/ZoweUSSNode.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/uss/ZoweUSSNode.unit.test.ts @@ -148,7 +148,7 @@ async function createGlobalMocks() { Object.defineProperty(workspaceUtils, "closeOpenedTextFile", { value: jest.fn(), configurable: true }); Object.defineProperty(globalMocks.Download, "ussFile", { value: globalMocks.ussFile, configurable: true }); Object.defineProperty(zowe, "Delete", { value: globalMocks.Delete, configurable: true }); - Object.defineProperty(fs, "existsSync", { value: globalMocks.existsSync, configurable: true }); + jest.spyOn(fs, "existsSync").mockImplementation(globalMocks.existsSync); Object.defineProperty(globalMocks.Delete, "ussFile", { value: globalMocks.ussFile, configurable: true }); Object.defineProperty(Profiles, "createInstance", { value: jest.fn(() => globalMocks.profileOps), @@ -168,7 +168,7 @@ async function createGlobalMocks() { configurable: true, }); Object.defineProperty(vscode.env.clipboard, "readText", { value: globalMocks.readText, configurable: true }); - Object.defineProperty(path, "basename", { value: globalMocks.basePath, configurable: true }); + jest.spyOn(path, "basename").mockImplementation(globalMocks.basePath); Object.defineProperty(ZoweLogger, "error", { value: jest.fn(), configurable: true }); Object.defineProperty(ZoweLogger, "debug", { value: jest.fn(), configurable: true }); Object.defineProperty(ZoweLogger, "warn", { value: jest.fn(), configurable: true }); diff --git a/packages/zowe-explorer/__tests__/__unit__/uss/actions.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/uss/actions.unit.test.ts index 4c84b3d6ec..fa3f98d8dd 100644 --- a/packages/zowe-explorer/__tests__/__unit__/uss/actions.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/uss/actions.unit.test.ts @@ -40,6 +40,7 @@ import { ZoweLogger } from "../../../src/utils/LoggerUtils"; import * as wsUtils from "../../../src/utils/workspace"; import * as context from "../../../src/shared/context"; import { AttributeView } from "../../../src/uss/AttributeView"; +import { mocked } from "../../../__mocks__/mockUtils"; function createGlobalMocks() { const globalMocks = { @@ -167,8 +168,6 @@ function createGlobalMocks() { return globalMocks; } -// Idea is borrowed from: https://github.com/kulshekhar/ts-jest/blob/master/src/util/testing.ts -const mocked = any>(fn: T): jest.Mock> => fn as any; describe("USS Action Unit Tests - Function createUSSNodeDialog", () => { async function createBlockMocks(globalMocks) { diff --git a/packages/zowe-explorer/__tests__/__unit__/utils.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/utils.unit.test.ts index ca4a59e7f4..44faa0d9f4 100644 --- a/packages/zowe-explorer/__tests__/__unit__/utils.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/utils.unit.test.ts @@ -17,6 +17,7 @@ import * as globals from "../../src/globals"; import { createInstanceOfProfile, createInstanceOfProfileInfo, createIProfile, createValidIProfile } from "../../__mocks__/mockCreators/shared"; import { Profiles } from "../../src/Profiles"; import { ZoweLogger } from "../../src/utils/LoggerUtils"; +import { mocked } from "../../__mocks__/mockUtils"; function createGlobalMocks() { const globalMocks = { @@ -60,9 +61,6 @@ function createGlobalMocks() { }; } -// Idea is borrowed from: https://github.com/kulshekhar/ts-jest/blob/master/src/util/testing.ts -const mocked = any>(fn: T): jest.Mock> => fn as any; - describe("Utils Unit Tests - Function errorHandling", () => { function createBlockMocks() { const imperativeProfile = createIProfile(); diff --git a/packages/zowe-explorer/__tests__/__unit__/utils/ProfilesUtils.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/utils/ProfilesUtils.unit.test.ts index 74cdb85a8a..8463f43e4e 100644 --- a/packages/zowe-explorer/__tests__/__unit__/utils/ProfilesUtils.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/utils/ProfilesUtils.unit.test.ts @@ -45,7 +45,7 @@ describe("ProfilesUtils unit tests", () => { }; Object.defineProperty(fs, "existsSync", { value: newMocks.mockExistsSync, configurable: true }); Object.defineProperty(fs, "readFileSync", { value: newMocks.mockReadFileSync, configurable: true }); - Object.defineProperty(fs, "writeFileSync", { value: newMocks.mockWriteFileSync, configurable: true }); + jest.spyOn(fs, "writeFileSync").mockImplementation(newMocks.mockWriteFileSync); Object.defineProperty(fs, "openSync", { value: newMocks.mockOpenSync, configurable: true }); Object.defineProperty(fs, "mkdirSync", { value: newMocks.mockMkdirSync, configurable: true }); Object.defineProperty(Gui, "errorMessage", { value: jest.fn(), configurable: true }); diff --git a/packages/zowe-explorer/src/ZoweExplorerExtender.ts b/packages/zowe-explorer/src/ZoweExplorerExtender.ts index de96303b7a..af5eb43f1c 100644 --- a/packages/zowe-explorer/src/ZoweExplorerExtender.ts +++ b/packages/zowe-explorer/src/ZoweExplorerExtender.ts @@ -178,7 +178,9 @@ export class ZoweExplorerExtender implements ZoweExplorerApi.IApiExplorerExtende ZoweExplorerExtender.showZoweConfigError(error.message); } - if (profileTypeConfigurations && !usingTeamConfig) { + const hasProfileTypes = profileTypeConfigurations != null && profileTypeConfigurations.length > 0; + + if (!usingTeamConfig && hasProfileTypes) { const configOptions = Array.from(profileTypeConfigurations); const exists = fs.existsSync(path.join(zoweDir, "profiles", profileType)); if (configOptions && !exists) { @@ -188,45 +190,65 @@ export class ZoweExplorerExtender implements ZoweExplorerApi.IApiExplorerExtende }); } } - if (profileTypeConfigurations !== undefined) { + + if (hasProfileTypes) { Profiles.getInstance().addToConfigArray(profileTypeConfigurations); } - if (usingTeamConfig && profileTypeConfigurations != null) { - const projSchemaLoc = projectDir ? path.join(projectDir, "zowe.schema.json") : null; - const projSchemaExists = projSchemaLoc ? fs.existsSync(projSchemaLoc) : false; + // Check if schema needs updated when the end user is using a team config + if (usingTeamConfig) { + this.updateSchema(projectDir); + } - // use the project-level schema if it exists; update the global schema otherwise - const schemaPath = projSchemaExists ? path.join(projectDir, "zowe.schema.json") : path.join(getZoweDir(), "zowe.schema.json"); + // sequentially reload the internal profiles cache to satisfy all the newly added profile types + await ZoweExplorerExtender.refreshProfilesQueue.add(async (): Promise => { + await Profiles.getInstance().refresh(ZoweExplorerApiRegister.getInstance()); + }); + } - try { - const schemaContents = fs.readFileSync(schemaPath).toString(); - const parsedSchema = JSON.parse(schemaContents); + /** + * Checks to see if any profile types should be added and adds the new types to the schema, if found. + * @param projectDir (optional) The workspace directory (if the user has a workspace open) + */ + private updateSchema(projectDir?: string): void { + // check for the existence of a project-level schema; if it doesn't exist, fall back to global + const projSchemaLoc = projectDir ? path.join(projectDir, "zowe.schema.json") : null; + const projSchemaExists = projSchemaLoc != null && fs.existsSync(projSchemaLoc); + const schemaPath = projSchemaExists ? projSchemaLoc : path.join(getZoweDir(), "zowe.schema.json"); - const schemaTypes = zowe.imperative.ConfigSchema.loadSchema(parsedSchema); - const newSchemaTypes = Profiles.getInstance().getConfigArray(); + // try parsing the existing schema to gather the list of types to merge + try { + const schemaContents = fs.readFileSync(schemaPath).toString(); + const parsedSchema = JSON.parse(schemaContents); - // Check if any types need added to the schema - const typesToAdd = newSchemaTypes.filter((s) => schemaTypes.find((newS) => s.type === newS.type) == null); - if (typesToAdd.length > 0) { - // Get profile types from config on-disk and merge with new profile types - const mergedProfTypes = [...schemaTypes, ...typesToAdd]; + // determine new types that are not present in the on-disk schema + const schemaTypes = zowe.imperative.ConfigSchema.loadSchema(parsedSchema); + const newSchemaTypes = Profiles.getInstance() + .getConfigArray() + .filter((o) => typeof o === "object"); - // rebuild schema to contain all (merged) profile types and write to disk - const newSchema = JSON.stringify(zowe.imperative.ConfigSchema.buildSchema(mergedProfTypes)); - fs.writeFileSync(schemaPath, newSchema); - } - } catch (err) { - // TODO: Inform user only if we couldn't write the new schema to disk - // If we can't read the schema or parse its contents, its nothing that should - // hold up the initialization + // If there are any new types to add, merge the list of profile types and rebuild the schema + const typesToAdd = newSchemaTypes.filter((s) => schemaTypes.find((newS) => s.type === newS.type) == null); + if (typesToAdd.length > 0) { + // Get profile types from config on-disk and merge with new profile types + const mergedProfTypes = [...schemaTypes, ...typesToAdd]; + + // rebuild schema to contain all profile types (including merged) and write to disk + const newSchema = JSON.stringify(zowe.imperative.ConfigSchema.buildSchema(mergedProfTypes)); + fs.writeFileSync(schemaPath, newSchema); + } + } catch (err) { + // Only show an error if we failed to update the on-disk schema. + if (err.code === "EACCES" || err.code === "EPERM") { + Gui.errorMessage( + localize( + "zowe.schema.cannotAccess", + "Failed to update Zowe schema at {0}: insufficient permissions or read-only file", + schemaPath + ) + ); } } - - // sequentially reload the internal profiles cache to satisfy all the newly added profile types - await ZoweExplorerExtender.refreshProfilesQueue.add(async (): Promise => { - await Profiles.getInstance().refresh(ZoweExplorerApiRegister.getInstance()); - }); } /** From 7c1f5512c1d32df975eeed02f921b59999f35815 Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Mon, 11 Dec 2023 13:30:00 -0500 Subject: [PATCH 03/71] chore: update yarn.lock, add license to mockUtils Signed-off-by: Trae Yelovich --- packages/zowe-explorer/__mocks__/mockUtils.ts | 11 +++++++++++ yarn.lock | 8 ++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/zowe-explorer/__mocks__/mockUtils.ts b/packages/zowe-explorer/__mocks__/mockUtils.ts index 250c61e8ce..06a03e3e0a 100644 --- a/packages/zowe-explorer/__mocks__/mockUtils.ts +++ b/packages/zowe-explorer/__mocks__/mockUtils.ts @@ -1,2 +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. + * + */ + // Idea is borrowed from: https://github.com/kulshekhar/ts-jest/blob/master/src/util/testing.ts export const mocked = any>(fn: T): jest.Mock> => fn as any; diff --git a/yarn.lock b/yarn.lock index 427c49fa5e..417487a991 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11641,10 +11641,10 @@ vite-plugin-checker@^0.6.2: vscode-languageserver-textdocument "^1.0.1" vscode-uri "^3.0.2" -vite@^4.4.9: - version "4.4.12" - resolved "https://registry.npmjs.org/vite/-/vite-4.4.12.tgz#e9c355d5a0d8a47afa46cb4bad10820da333da5c" - integrity sha512-KtPlUbWfxzGVul8Nut8Gw2Qe8sBzWY+8QVc5SL8iRFnpnrcoCaNlzO40c1R6hPmcdTwIPEDkq0Y9+27a5tVbdQ== +vite@^4.4.12: + version "4.5.1" + resolved "https://registry.npmjs.org/vite/-/vite-4.5.1.tgz#3370986e1ed5dbabbf35a6c2e1fb1e18555b968a" + integrity sha512-AXXFaAJ8yebyqzoNB9fu2pHoo/nWX+xZlaRwoeYUxEqBO+Zj4msE5G+BhGBll9lYEKv9Hfks52PAF2X7qDYXQA== dependencies: esbuild "^0.18.10" postcss "^8.4.27" From 028cb18c6a255a45e53e8c63e79d0eceb2c6966f Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Mon, 11 Dec 2023 13:40:05 -0500 Subject: [PATCH 04/71] chore: update ZE changelog Signed-off-by: Trae Yelovich --- packages/zowe-explorer/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index f90033235d..666bf4006f 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -11,6 +11,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen - Added Display confirmation dialog when submitting local JCL. [#2061](https://github.com/zowe/vscode-extension-for-zowe/issues/2061) - Added support for adding a Zowe profile across all trees [#2603](https://github.com/zowe/vscode-extension-for-zowe/issues/2603) - Added "Filter Jobs" feature in Jobs tree view: accessible via filter icon or right-clicking on session node. [#2599](https://github.com/zowe/vscode-extension-for-zowe/issues/2599) +- Added the capability for extenders to contribute new profile types to the Zowe schema during extender activation. [#2508](https://github.com/zowe/vscode-extension-for-zowe/issues/2508) ### Bug fixes From e8d1172ebe12ea3251f29561e8cf37ffe14b503e Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Mon, 11 Dec 2023 13:56:07 -0500 Subject: [PATCH 05/71] style: use optional chaining instead of AND short-circuit Signed-off-by: Trae Yelovich --- packages/zowe-explorer/src/ZoweExplorerExtender.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/zowe-explorer/src/ZoweExplorerExtender.ts b/packages/zowe-explorer/src/ZoweExplorerExtender.ts index af5eb43f1c..11103a1f84 100644 --- a/packages/zowe-explorer/src/ZoweExplorerExtender.ts +++ b/packages/zowe-explorer/src/ZoweExplorerExtender.ts @@ -156,8 +156,8 @@ export class ZoweExplorerExtender implements ZoweExplorerApi.IApiExplorerExtende // will be created with the appropriate meta data. If not called the user will // see errors when creating a profile of any type. const zoweDir = getZoweDir(); - const workspaceOpen = vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders[0]; - const projectDir = workspaceOpen ? getFullPath(vscode.workspace.workspaceFolders[0].uri.fsPath) : undefined; + const workspaceDir = vscode.workspace.workspaceFolders?.[0]; + const projectDir = workspaceDir ? getFullPath(workspaceDir.uri.fsPath) : undefined; /** * This should create initialize the loadedConfig if it is not already From 4d5492708fc0f0b558512be11347c1fdee052e45 Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Tue, 19 Dec 2023 17:09:24 -0500 Subject: [PATCH 06/71] wip: updateSchema adjustments, test schemaVersion checks w/ FTP ext. Signed-off-by: Trae Yelovich --- package.json | 3 + .../src/extension.ts | 2 +- .../zowe-explorer/src/ZoweExplorerExtender.ts | 77 ++++++++----------- 3 files changed, 38 insertions(+), 44 deletions(-) diff --git a/package.json b/package.json index 5473e1d918..e3aecb5413 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,9 @@ "@zowe/cli": "7.19.0", "vscode-nls": "4.1.2" }, + "resolutions": { + "@zowe/imperative": "file:i5.19.tgz" + }, "devDependencies": { "@types/jest": "^29.2.3", "@types/mocha": "^10.0.1", diff --git a/packages/zowe-explorer-ftp-extension/src/extension.ts b/packages/zowe-explorer-ftp-extension/src/extension.ts index abdab24b6f..9bdd6678cc 100644 --- a/packages/zowe-explorer-ftp-extension/src/extension.ts +++ b/packages/zowe-explorer-ftp-extension/src/extension.ts @@ -43,7 +43,7 @@ async function registerFtpApis(): Promise { zoweExplorerApi.registerJesApi(new FtpJesApi()); const meta = await CoreUtils.getProfileMeta(); - await zoweExplorerApi.getExplorerExtenderApi().initForZowe("zftp", meta); + await zoweExplorerApi.getExplorerExtenderApi().initForZowe("zftp", [{ ...meta[0], schemaVersion: "2.0" } as any]); await zoweExplorerApi.getExplorerExtenderApi().reloadProfiles("zftp"); await Gui.showMessage("Zowe Explorer was modified for FTP support.", { logger: ZoweLogger }); diff --git a/packages/zowe-explorer/src/ZoweExplorerExtender.ts b/packages/zowe-explorer/src/ZoweExplorerExtender.ts index 11103a1f84..c394b820b0 100644 --- a/packages/zowe-explorer/src/ZoweExplorerExtender.ts +++ b/packages/zowe-explorer/src/ZoweExplorerExtender.ts @@ -166,10 +166,11 @@ export class ZoweExplorerExtender implements ZoweExplorerApi.IApiExplorerExtende * profile management. */ let usingTeamConfig: boolean; + let profileInfo: zowe.imperative.ProfileInfo; try { - const mProfileInfo = await ProfilesUtils.getProfileInfo(globals.ISTHEIA); - await mProfileInfo.readProfilesFromDisk({ homeDir: zoweDir, projectDir }); - usingTeamConfig = mProfileInfo.usingTeamConfig; + profileInfo = await ProfilesUtils.getProfileInfo(globals.ISTHEIA); + await profileInfo.readProfilesFromDisk({ homeDir: zoweDir, projectDir }); + usingTeamConfig = profileInfo.usingTeamConfig; } catch (error) { ZoweLogger.warn(error); if (error.toString().includes("Error parsing JSON")) { @@ -197,7 +198,7 @@ export class ZoweExplorerExtender implements ZoweExplorerApi.IApiExplorerExtende // Check if schema needs updated when the end user is using a team config if (usingTeamConfig) { - this.updateSchema(projectDir); + this.updateSchema(profileInfo, profileTypeConfigurations); } // sequentially reload the internal profiles cache to satisfy all the newly added profile types @@ -207,46 +208,36 @@ export class ZoweExplorerExtender implements ZoweExplorerApi.IApiExplorerExtende } /** - * Checks to see if any profile types should be added and adds the new types to the schema, if found. - * @param projectDir (optional) The workspace directory (if the user has a workspace open) + * Adds new types to the Zowe schema. + * @param profileInfo the ProfileInfo object that has been prepared with `readProfilesFromDisk`, such as the one initialized in `initForZowe`. + * @param profileTypeConfigurations (optional) Profile type configurations to add to the schema */ - private updateSchema(projectDir?: string): void { - // check for the existence of a project-level schema; if it doesn't exist, fall back to global - const projSchemaLoc = projectDir ? path.join(projectDir, "zowe.schema.json") : null; - const projSchemaExists = projSchemaLoc != null && fs.existsSync(projSchemaLoc); - const schemaPath = projSchemaExists ? projSchemaLoc : path.join(getZoweDir(), "zowe.schema.json"); - - // try parsing the existing schema to gather the list of types to merge - try { - const schemaContents = fs.readFileSync(schemaPath).toString(); - const parsedSchema = JSON.parse(schemaContents); - - // determine new types that are not present in the on-disk schema - const schemaTypes = zowe.imperative.ConfigSchema.loadSchema(parsedSchema); - const newSchemaTypes = Profiles.getInstance() - .getConfigArray() - .filter((o) => typeof o === "object"); - - // If there are any new types to add, merge the list of profile types and rebuild the schema - const typesToAdd = newSchemaTypes.filter((s) => schemaTypes.find((newS) => s.type === newS.type) == null); - if (typesToAdd.length > 0) { - // Get profile types from config on-disk and merge with new profile types - const mergedProfTypes = [...schemaTypes, ...typesToAdd]; - - // rebuild schema to contain all profile types (including merged) and write to disk - const newSchema = JSON.stringify(zowe.imperative.ConfigSchema.buildSchema(mergedProfTypes)); - fs.writeFileSync(schemaPath, newSchema); - } - } catch (err) { - // Only show an error if we failed to update the on-disk schema. - if (err.code === "EACCES" || err.code === "EPERM") { - Gui.errorMessage( - localize( - "zowe.schema.cannotAccess", - "Failed to update Zowe schema at {0}: insufficient permissions or read-only file", - schemaPath - ) - ); + private updateSchema( + profileInfo: zowe.imperative.ProfileInfo, + profileTypeConfigurations?: zowe.imperative.ICommandProfileTypeConfiguration[], + ): void { + if (profileTypeConfigurations) { + try { + for (const typeConfig of profileTypeConfigurations) { + const addResult = profileInfo.addProfileTypeToSchema(typeConfig.type, { + schema: typeConfig.schema, + sourceApp: "Zowe Explorer (for VS Code)", + version: typeConfig.schemaVersion + }); + if (addResult.info.length > 0) { + Gui.warningMessage(addResult.info); + } + } + } catch (err) { + // Only show an error if we failed to update the on-disk schema. + if (err.code === "EACCES" || err.code === "EPERM") { + Gui.errorMessage( + localize( + "zowe.schema.cannotAccess", + "Failed to update Zowe schema: insufficient permissions or read-only file", + ) + ); + } } } } From 0cb91a48a00b96e4b770234f6734206f01028fb8 Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Wed, 20 Dec 2023 11:22:48 -0500 Subject: [PATCH 07/71] chore: update CLI to 7.21.0; use valid schema version for FTP demo Signed-off-by: Trae Yelovich --- package.json | 4 +- packages/zowe-explorer-api/package.json | 2 +- .../src/extension.ts | 2 +- yarn.lock | 136 +++++++++--------- 4 files changed, 68 insertions(+), 76 deletions(-) diff --git a/package.json b/package.json index e3aecb5413..37230f6314 100644 --- a/package.json +++ b/package.json @@ -16,11 +16,11 @@ "vscode": "^1.53.2" }, "dependencies": { - "@zowe/cli": "7.19.0", + "@zowe/cli": "7.21.0", "vscode-nls": "4.1.2" }, "resolutions": { - "@zowe/imperative": "file:i5.19.tgz" + "@zowe/imperative": "file:imp-5.20.0-schema-mgmt.tgz" }, "devDependencies": { "@types/jest": "^29.2.3", diff --git a/packages/zowe-explorer-api/package.json b/packages/zowe-explorer-api/package.json index e2be0fa376..90f6673fb0 100644 --- a/packages/zowe-explorer-api/package.json +++ b/packages/zowe-explorer-api/package.json @@ -18,7 +18,7 @@ }, "dependencies": { "@types/vscode": "^1.53.2", - "@zowe/cli": "7.19.0", + "@zowe/cli": "7.21.0", "@zowe/secrets-for-zowe-sdk": "7.18.6", "handlebars": "^4.7.7", "semver": "^7.5.3" diff --git a/packages/zowe-explorer-ftp-extension/src/extension.ts b/packages/zowe-explorer-ftp-extension/src/extension.ts index 9bdd6678cc..774a2b6e94 100644 --- a/packages/zowe-explorer-ftp-extension/src/extension.ts +++ b/packages/zowe-explorer-ftp-extension/src/extension.ts @@ -43,7 +43,7 @@ async function registerFtpApis(): Promise { zoweExplorerApi.registerJesApi(new FtpJesApi()); const meta = await CoreUtils.getProfileMeta(); - await zoweExplorerApi.getExplorerExtenderApi().initForZowe("zftp", [{ ...meta[0], schemaVersion: "2.0" } as any]); + await zoweExplorerApi.getExplorerExtenderApi().initForZowe("zftp", [{ ...meta[0], schemaVersion: "1.0.0" }]); await zoweExplorerApi.getExplorerExtenderApi().reloadProfiles("zftp"); await Gui.showMessage("Zowe Explorer was modified for FTP support.", { logger: ZoweLogger }); diff --git a/yarn.lock b/yarn.lock index 417487a991..0bf57d99d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2642,22 +2642,22 @@ resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -"@zowe/cli@7.19.0": - version "7.19.0" - resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.19.0.tgz#ee053f35438484f1271af333c954b851d0ea747b" - integrity sha512-hkAwsdYWkI+DMsP8nbCUb3pRfzMuaTh663v5L+tGJtizBpDKpFGYYQ9buv0eOskPi4d5/+bae089aT8VavgwAw== - dependencies: - "@zowe/core-for-zowe-sdk" "7.19.0" - "@zowe/imperative" "5.19.0" - "@zowe/provisioning-for-zowe-sdk" "7.19.0" - "@zowe/zos-console-for-zowe-sdk" "7.19.0" - "@zowe/zos-files-for-zowe-sdk" "7.19.0" - "@zowe/zos-jobs-for-zowe-sdk" "7.19.0" - "@zowe/zos-logs-for-zowe-sdk" "7.19.0" - "@zowe/zos-tso-for-zowe-sdk" "7.19.0" - "@zowe/zos-uss-for-zowe-sdk" "7.19.0" - "@zowe/zos-workflows-for-zowe-sdk" "7.19.0" - "@zowe/zosmf-for-zowe-sdk" "7.19.0" +"@zowe/cli@7.21.0": + version "7.21.0" + resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.21.0.tgz#748feccf9d7832daac5e5ceb61a784ef7ea65fb3" + integrity sha512-XSwgjfOpzMeXAVpzDHiZjFdYhcWqyZjlKyCUWWqN/Kw87OqvWYkUlvDrCk2RkynTiGP48E+4Zto1ZbvjH00cCw== + dependencies: + "@zowe/core-for-zowe-sdk" "7.21.0" + "@zowe/imperative" "5.20.0" + "@zowe/provisioning-for-zowe-sdk" "7.21.0" + "@zowe/zos-console-for-zowe-sdk" "7.21.0" + "@zowe/zos-files-for-zowe-sdk" "7.21.0" + "@zowe/zos-jobs-for-zowe-sdk" "7.21.0" + "@zowe/zos-logs-for-zowe-sdk" "7.21.0" + "@zowe/zos-tso-for-zowe-sdk" "7.21.0" + "@zowe/zos-uss-for-zowe-sdk" "7.21.0" + "@zowe/zos-workflows-for-zowe-sdk" "7.21.0" + "@zowe/zosmf-for-zowe-sdk" "7.21.0" find-process "1.4.7" get-stream "6.0.1" lodash "4.17.21" @@ -2666,18 +2666,17 @@ optionalDependencies: "@zowe/secrets-for-zowe-sdk" "7.18.6" -"@zowe/core-for-zowe-sdk@7.19.0": - version "7.19.0" - resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.19.0.tgz#36113036954b9554a0e927a15510ded444c85fc1" - integrity sha512-u7safSLwN4Rctt/ihGjEO3NFljDOANKtmqvw/pqoy+G1DcGswR4i9J3rbors8THfodiG2FXBsTxv9+l3qzUVkQ== +"@zowe/core-for-zowe-sdk@7.21.0": + version "7.21.0" + resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.21.0.tgz#d35d5757eae41e43e3f998342a31b2570bb1b143" + integrity sha512-QNabrsS0FkNDpb7Hm51e/oLDTR7kgchsg9BtqbeEhduUFzqlPeQUumN5j8J37DSz9HJZcaBZakNg9wEwj4xQkg== dependencies: comment-json "4.1.1" string-width "4.2.3" -"@zowe/imperative@5.19.0": - version "5.19.0" - resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.19.0.tgz#7f8deb89030bf2f649cd2351fe12095da46dce6c" - integrity sha512-XhhNUnZprtf1zqn/vkuH4tbxJrAinYWAgGw6WU9yZ7vPAeqYIEWwd9Na+D1/ols3unet64cd1lhvHG3xKSMKUw== +"@zowe/imperative@5.20.0", "@zowe/imperative@file:imp-5.20.0-schema-mgmt.tgz": + version "5.20.0" + resolved "file:imp-5.20.0-schema-mgmt.tgz#7f9ceb4fbde85231197adcb5a86608679c7a7f74" dependencies: "@types/yargs" "13.0.4" chalk "2.4.2" @@ -2708,7 +2707,7 @@ progress "2.0.3" read "1.0.7" readline-sync "1.4.10" - semver "7.5.2" + semver "7.5.4" stack-trace "0.0.10" strip-ansi "6.0.1" which "3.0.0" @@ -2716,10 +2715,10 @@ yamljs "0.3.0" yargs "15.3.1" -"@zowe/provisioning-for-zowe-sdk@7.19.0": - version "7.19.0" - resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.19.0.tgz#a63378cd0c1201cc42abff282d99b5bdb1354aec" - integrity sha512-f2j8p1g+VVCEz9pZrLr4dSZe1T7oznxA3cVcC3YsbQxCUnZVXfB+sNkOThlyjdzorRFBzfnyrkVad3wt2VZxBw== +"@zowe/provisioning-for-zowe-sdk@7.21.0": + version "7.21.0" + resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.21.0.tgz#141622245d59ba134157a4c94f5842946ed1c86f" + integrity sha512-bKKRzl1Qa/XBzqLDsMJqhRmpgeC1+Rra+1cBqmk63qh1BMsrkgrUQaeGJimpD3wJJHxfX8LYW59FDL92bb3S1w== dependencies: js-yaml "4.1.0" @@ -2728,15 +2727,15 @@ resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.6.tgz#6b854b344babb291c26d19d82633099a46e08452" integrity sha512-YyS1NoXddb147mBQpu5/dTfo1gdwGa/xdg85U8KCngA+RHCmNct3n2rbK3tHx9C9H6rlgjeS+Mrux5Q+PHJUgQ== -"@zowe/zos-console-for-zowe-sdk@7.19.0": - version "7.19.0" - resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.19.0.tgz#9431731e49cef3993f7428e5e81f1565f6572e70" - integrity sha512-0YNLP8wK3ja+gY0Aj8K89J8dwiZr/d+vIaN7qB42584t991UaNOZjDNt5A416Qc3DwVTlQGDBpHKnlAFiykexA== +"@zowe/zos-console-for-zowe-sdk@7.21.0": + version "7.21.0" + resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.21.0.tgz#eb0d1f3813e6edde92d36fb3620245b98a5577df" + integrity sha512-fQjc4ouovPuOvi+4kf8PDL3GBf01j0sRboHj/zHvrAhO+q8ILB9ukTWyvGlRMe3Hgg89pYKLwprTDvtqxxJSUw== -"@zowe/zos-files-for-zowe-sdk@7.19.0": - version "7.19.0" - resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.19.0.tgz#e378cc7a13c4577ab30e879d63bc760203297761" - integrity sha512-ZUTRxjLPEFAXKEUrLQmRI+hFW9KtxEarkaYJKtOpaQgkB14L62fSdfhw3prRwQalwNhLdm+RPvrJjvijnz1fag== +"@zowe/zos-files-for-zowe-sdk@7.21.0": + version "7.21.0" + resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.21.0.tgz#1af17544294f14ab382bb4b2bcdf0ed212a86591" + integrity sha512-9NIpyI7EKSJJVN66RwMKZ+cbsSD2Pp5wxJIunUgdplfKgUn7R6FF4uYQJa3ChyVYp+vdKcRcuWU8Gh8Gl79lEw== dependencies: get-stream "6.0.1" minimatch "5.0.1" @@ -2748,43 +2747,43 @@ dependencies: zos-node-accessor "1.0.14" -"@zowe/zos-jobs-for-zowe-sdk@7.19.0": - version "7.19.0" - resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.19.0.tgz#5e2fe76368d6e4a8ce7c40254e9b767464e496f8" - integrity sha512-oLs53Wzh8vP7ytzdlmja4l6bxRFDkgQiREfDZ44vwTGpX2oAAsCXzGBtaM9EBxfSIOtHyCMDucWcj4ho2KPIhQ== +"@zowe/zos-jobs-for-zowe-sdk@7.21.0": + version "7.21.0" + resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.21.0.tgz#bce05b961fdc2f04719ff075b13a26d2141bd9c6" + integrity sha512-ZFroZA/0+EsfLU34HyG/MemcraJVOpL7ASl9ox4yvOWkua6tlfTxB5NFwaEQRmQk4U+hGKGg5Ns1QKzAPAxVkA== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.19.0" + "@zowe/zos-files-for-zowe-sdk" "7.21.0" -"@zowe/zos-logs-for-zowe-sdk@7.19.0": - version "7.19.0" - resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.19.0.tgz#9f97bdff593867519c8ada718b19ac405a01ea84" - integrity sha512-tBqrDyUrZP17wLBVjDx5ol8de77pK3Bbb2LvmVErC8Z5VIY7yH+6iJQmnKeLduSiRpaAcK46citZNmLkGbGkbw== +"@zowe/zos-logs-for-zowe-sdk@7.21.0": + version "7.21.0" + resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.21.0.tgz#863a4f30891f7679e346150a006d422988d4b295" + integrity sha512-egYBu+oDK8BoHmRY1ILi+DrtKJjC3aaEaez/j77N0SO0AmT66GVkB0NMgQehkeCS0ajd2URmujT+/4Eq5DsQ5g== -"@zowe/zos-tso-for-zowe-sdk@7.19.0": - version "7.19.0" - resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.19.0.tgz#8983e05e130228955e9d054160fe89cf0a1e6bf0" - integrity sha512-5LUD9K7oxyo8/EmLw2/mWIi8fJFt4aX+Ja+iKcC62vdt+R3o73AbNBuAeP0Vj6IghmODZ1rAVA7oyYEkXBYdDg== +"@zowe/zos-tso-for-zowe-sdk@7.21.0": + version "7.21.0" + resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.21.0.tgz#64ffa4b755368c1f117499941044fc3d93caed23" + integrity sha512-ElxZlGvLDWcXHYDbHu7wTU69LlzoQHF/r70Gn3ikr8TkLOuqy57EPxYpTTbBr0bAAF9O54ciYPQ4Knpmkk8ZbA== dependencies: - "@zowe/zosmf-for-zowe-sdk" "7.19.0" + "@zowe/zosmf-for-zowe-sdk" "7.21.0" -"@zowe/zos-uss-for-zowe-sdk@7.19.0": - version "7.19.0" - resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.19.0.tgz#588939eef3642dbf85a69a3a4e8b94da9909d731" - integrity sha512-TNk4x0etnUt9RWiYuN4ooxvbb2+Zi6ZQF1gHeVP3M96lR/O89LKhBlwK4LOjEn/6+9M3CCdbRylCqjbqJehijQ== +"@zowe/zos-uss-for-zowe-sdk@7.21.0": + version "7.21.0" + resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.21.0.tgz#ce6c90d314845ecd2337ca585d6ab6689413f251" + integrity sha512-UH+7o1cjZ+OuL3HuVjTd07Q8cLJQunYdjM4haWb5ayuUnc0/hSMH7AmjyVPP15YttCFLATsfbRh3ruW/7oYnrA== dependencies: ssh2 "1.11.0" -"@zowe/zos-workflows-for-zowe-sdk@7.19.0": - version "7.19.0" - resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.19.0.tgz#aba933cb3675651b386b862c9afe79518639f7c2" - integrity sha512-J9zHUJzL4QPKg2NiRPkCIu1v36aAn4wAOQHl4o74h0dH3Ncz7fI1DDxUTlSAaA9W6dHFJV9g4YEToUpwn07mQQ== +"@zowe/zos-workflows-for-zowe-sdk@7.21.0": + version "7.21.0" + resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.21.0.tgz#66b09c655ef819b0f44a31fcd0bdcfd4d255c244" + integrity sha512-9BEVXlwzLoIZmDdaduW//WIReCnQz9QbJD645BkIngbeio0tEuI3/oe/I088gHDjqZucV1mJ51b7z5i1yNElHQ== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.19.0" + "@zowe/zos-files-for-zowe-sdk" "7.21.0" -"@zowe/zosmf-for-zowe-sdk@7.19.0": - version "7.19.0" - resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.19.0.tgz#e6fc7f7ae4aaa6531345dc5ac38bcc55d52bda45" - integrity sha512-pdy4mrRbvEmmhs9Vuuak5T3gaMpG6SK8WkET0i3/TiIuG0aAU1g9vMgcnfeHJyz82jXQrjfvHeGX5ei74zGWqg== +"@zowe/zosmf-for-zowe-sdk@7.21.0": + version "7.21.0" + resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.21.0.tgz#e540b2eec3e36d73b491f3db3a366eeb48b55273" + integrity sha512-uvraOpYVMVmDSjCiQcvPukauQSabXGgY+FwMBFdDw0kCs0b/1jVAQA5jVgzNuvuTlD4l+pCJYILsh/lmb9SfqA== abab@^2.0.3, abab@^2.0.5: version "2.0.6" @@ -10223,14 +10222,7 @@ semver@7.0.0: resolved "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@7.5.2: - version "7.5.2" - resolved "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz" - integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ== - dependencies: - lru-cache "^6.0.0" - -semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.0, semver@^7.5.3: +semver@7.5.4, semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.0, semver@^7.5.3: version "7.5.4" resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== From c81cf50c51c39fa741bda2024366468be20f666d Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Fri, 5 Jan 2024 11:26:42 -0500 Subject: [PATCH 08/71] chore: remove test schemaVersion from zftp type Signed-off-by: Trae Yelovich --- packages/zowe-explorer-ftp-extension/src/extension.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zowe-explorer-ftp-extension/src/extension.ts b/packages/zowe-explorer-ftp-extension/src/extension.ts index 774a2b6e94..abdab24b6f 100644 --- a/packages/zowe-explorer-ftp-extension/src/extension.ts +++ b/packages/zowe-explorer-ftp-extension/src/extension.ts @@ -43,7 +43,7 @@ async function registerFtpApis(): Promise { zoweExplorerApi.registerJesApi(new FtpJesApi()); const meta = await CoreUtils.getProfileMeta(); - await zoweExplorerApi.getExplorerExtenderApi().initForZowe("zftp", [{ ...meta[0], schemaVersion: "1.0.0" }]); + await zoweExplorerApi.getExplorerExtenderApi().initForZowe("zftp", meta); await zoweExplorerApi.getExplorerExtenderApi().reloadProfiles("zftp"); await Gui.showMessage("Zowe Explorer was modified for FTP support.", { logger: ZoweLogger }); From cad6bf5297e00a1119303cffc583af5d9c866a78 Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Fri, 5 Jan 2024 15:13:45 -0500 Subject: [PATCH 09/71] fix(tests): Update test cases to mock imperative API Signed-off-by: Trae Yelovich --- .../__mocks__/@zowe/imperative.ts | 8 ++ .../ZoweExplorerExtender.unit.test.ts | 96 ++++++------------- 2 files changed, 39 insertions(+), 65 deletions(-) diff --git a/packages/zowe-explorer/__mocks__/@zowe/imperative.ts b/packages/zowe-explorer/__mocks__/@zowe/imperative.ts index 8a44e78e88..8aeabc737b 100644 --- a/packages/zowe-explorer/__mocks__/@zowe/imperative.ts +++ b/packages/zowe-explorer/__mocks__/@zowe/imperative.ts @@ -246,6 +246,14 @@ export class ProfileInfo { public readProfilesFromDisk(teamCfgOpts?: IConfigOpts) { return; } + + public addProfileTypeToSchema(profileType: string, typeInfo: { + sourceApp: string; + schema: any; + version?: string; + }): any { + return; + } } export class ImperativeError extends Error { diff --git a/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts index 5bae8a1897..d70de77fec 100644 --- a/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts @@ -22,8 +22,9 @@ import { Profiles } from "../../src/Profiles"; import * as path from "path"; import * as fs from "fs"; import { getZoweDir, Gui } from "@zowe/zowe-explorer-api"; -import * as profUtils from "../../src/utils/ProfilesUtils"; +import { ProfilesUtils } from "../../src/utils/ProfilesUtils"; import { ZoweLogger } from "../../src/utils/LoggerUtils"; +import { SettingsConfig } from "../../src/utils/SettingsConfig"; jest.mock("fs"); describe("ZoweExplorerExtender unit tests", () => { @@ -205,7 +206,7 @@ describe("ZoweExplorerExtender unit tests", () => { const readProfilesFromDiskSpy = jest.fn(); const refreshProfilesQueueAddSpy = jest.spyOn((ZoweExplorerExtender as any).refreshProfilesQueue, "add"); - jest.spyOn(profUtils.ProfilesUtils, "getProfileInfo").mockReturnValue({ + jest.spyOn(ProfilesUtils, "getProfileInfo").mockReturnValueOnce({ readProfilesFromDisk: readProfilesFromDiskSpy, } as any); await expect(blockMocks.instTest.initForZowe("USS", ["" as any])).resolves.not.toThrow(); @@ -214,80 +215,45 @@ describe("ZoweExplorerExtender unit tests", () => { }); describe("Add to Schema functionality", () => { + // eslint-disable-next-line @typescript-eslint/explicit-function-return-type const updateSchema = async ( - level: string = "global", - writeFileSyncImpl: ( - path: number | fs.PathLike, - data: string | ArrayBufferView, - options?: fs.WriteFileOptions | undefined - ) => void = jest.fn() + addProfileTypeToSchemaMock: ( + profileType: string, + typeInfo: { sourceApp: string; schema: any; version?: string | undefined } + ) => any = jest.fn() ) => { const blockMocks = await createBlockMocks(); - const readProfilesFromDisk = jest.fn(); - const schemaFolder = path.resolve("__mocks__"); - if (level === "project") { - Object.defineProperty(vscode.workspace, "workspaceFolders", { - value: [ - { - uri: { - fsPath: schemaFolder, - }, - }, - ], - configurable: true, - }); - } - - jest.spyOn(profUtils.ProfilesUtils, "getProfileInfo").mockResolvedValueOnce({ usingTeamConfig: true, readProfilesFromDisk } as any); - const writeFileSyncSpy = jest.spyOn(fs, "writeFileSync").mockImplementation(writeFileSyncImpl); - jest.spyOn(imperative.ConfigSchema, "loadSchema").mockReturnValue([ - { - type: "zosmf", - schema: {} as any, - }, - { - type: "base", - schema: {} as any, - }, - ]); - await blockMocks.instTest.initForZowe("sample", [ + // bypass "if (hasSecureCredentialManagerEnabled)" check for sake of testing + jest.spyOn(SettingsConfig, "getDirectValue").mockReturnValueOnce(false); + jest.spyOn(ZoweLogger, "trace").mockImplementation(); + jest.spyOn(ZoweLogger, "info").mockImplementation(); + const profInfo = await ProfilesUtils.getProfileInfo(false); + const addProfTypeToSchema = jest + .spyOn(imperative.ProfileInfo.prototype, "addProfileTypeToSchema") + .mockImplementation(addProfileTypeToSchemaMock as unknown as any); + await (blockMocks.instTest as any).updateSchema(profInfo, [ { + type: "test-type", schema: {} as any, - type: "sample", - }, + } as any, ]); - expect(writeFileSyncSpy).toHaveBeenCalled(); - writeFileSyncSpy.mockRestore(); + expect(addProfTypeToSchema).toHaveBeenCalled(); }; - describe("global schema", () => { - it("should update when an extender calls initForZowe", async () => { - await updateSchema(); - }); - - it("should throw an error if the schema is read-only", async () => { - const errorMessageSpy = jest.spyOn(Gui, "errorMessage"); - await updateSchema("global", (_filepath, _contents) => { - const err = new Error(); - Object.defineProperty(err, "code", { - value: "EACCES", - }); - throw err; - }); - expect(errorMessageSpy).toHaveBeenCalledWith( - `Failed to update Zowe schema at ${path.join( - "__tests__", - ".zowe", - "zowe.schema.json" - )}: insufficient permissions or read-only file` - ); - }); + it("should update the schema when an extender calls initForZowe", async () => { + await updateSchema(); }); - describe("project-level schema", () => { - it("should update when an extender calls initForZowe", async () => { - await updateSchema("project"); + it("should throw an error if the schema is read-only", async () => { + const errorMessageSpy = jest.spyOn(Gui, "errorMessage"); + await updateSchema((_filepath, _contents) => { + const err = new Error(); + Object.defineProperty(err, "code", { + value: "EACCES", + }); + throw err; }); + expect(errorMessageSpy).toHaveBeenCalledWith("Failed to update Zowe schema: insufficient permissions or read-only file"); }); }); }); From 17d9ea9ff7e4d55830dfca6491e74b7f3829ec17 Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Tue, 23 Jan 2024 09:43:28 -0500 Subject: [PATCH 10/71] prepare: check for relocated schema version Signed-off-by: Trae Yelovich --- packages/zowe-explorer/src/ZoweExplorerExtender.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zowe-explorer/src/ZoweExplorerExtender.ts b/packages/zowe-explorer/src/ZoweExplorerExtender.ts index c394b820b0..ba6850098e 100644 --- a/packages/zowe-explorer/src/ZoweExplorerExtender.ts +++ b/packages/zowe-explorer/src/ZoweExplorerExtender.ts @@ -222,7 +222,7 @@ export class ZoweExplorerExtender implements ZoweExplorerApi.IApiExplorerExtende const addResult = profileInfo.addProfileTypeToSchema(typeConfig.type, { schema: typeConfig.schema, sourceApp: "Zowe Explorer (for VS Code)", - version: typeConfig.schemaVersion + version: typeConfig.schema.version }); if (addResult.info.length > 0) { Gui.warningMessage(addResult.info); From b7d8573856ddd2b645f627f4180f41ccebeb9282 Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Tue, 23 Jan 2024 12:17:07 -0500 Subject: [PATCH 11/71] refactor: remove version from addProfileTypeToSchema call Signed-off-by: Trae Yelovich --- package.json | 2 +- .../sample/src/ZoweExplorerExtender.i18n.json | 3 ++- .../zowe-explorer/src/ZoweExplorerExtender.ts | 3 +-- yarn.lock | 18 +++++------------- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index b3cea1f3fa..b6bee62a32 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "vscode-nls": "4.1.2" }, "resolutions": { - "@zowe/imperative": "file:imp-5.20.0-schema-mgmt.tgz" + "@zowe/imperative": "file:zowe-imperative-5.21.0.tgz" }, "devDependencies": { "@types/jest": "^29.2.3", diff --git a/packages/zowe-explorer/i18n/sample/src/ZoweExplorerExtender.i18n.json b/packages/zowe-explorer/i18n/sample/src/ZoweExplorerExtender.i18n.json index 64590cd306..4159f0f8a6 100644 --- a/packages/zowe-explorer/i18n/sample/src/ZoweExplorerExtender.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/ZoweExplorerExtender.i18n.json @@ -1,3 +1,4 @@ { - "initialize.profiles.error": "Error encountered when loading your Zowe config. Click \"Show Config\" for more details." + "initialize.profiles.error": "Error encountered when loading your Zowe config. Click \"Show Config\" for more details.", + "zowe.schema.cannotAccess": "Failed to update Zowe schema: insufficient permissions or read-only file" } diff --git a/packages/zowe-explorer/src/ZoweExplorerExtender.ts b/packages/zowe-explorer/src/ZoweExplorerExtender.ts index ba6850098e..61bd283271 100644 --- a/packages/zowe-explorer/src/ZoweExplorerExtender.ts +++ b/packages/zowe-explorer/src/ZoweExplorerExtender.ts @@ -221,8 +221,7 @@ export class ZoweExplorerExtender implements ZoweExplorerApi.IApiExplorerExtende for (const typeConfig of profileTypeConfigurations) { const addResult = profileInfo.addProfileTypeToSchema(typeConfig.type, { schema: typeConfig.schema, - sourceApp: "Zowe Explorer (for VS Code)", - version: typeConfig.schema.version + sourceApp: "Zowe Explorer (for VS Code)" }); if (addResult.info.length > 0) { Gui.warningMessage(addResult.info); diff --git a/yarn.lock b/yarn.lock index 2242bcffab..2f293573df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2674,10 +2674,9 @@ comment-json "4.1.1" string-width "4.2.3" -"@zowe/imperative@5.21.0": +"@zowe/imperative@5.21.0", "@zowe/imperative@file:zowe-imperative-5.21.0.tgz": version "5.21.0" - resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.21.0.tgz#52cd216bf04a15fe60fcc9fa4603dba0f8c59da2" - integrity sha512-yjt3Mmn1ItfZZK42SecH+2U5rSvKl6k4ZqPvFaQIvzfVwhOeXi3Srx6/ulxDhSPN0txPUgeyIxz+PHSPtN5Elw== + resolved "file:zowe-imperative-5.21.0.tgz#47da40ba624d1a695df7cbf55e7e2b4faa43ef1d" dependencies: "@types/yargs" "13.0.4" chalk "2.4.2" @@ -2708,7 +2707,7 @@ progress "2.0.3" read "1.0.7" readline-sync "1.4.10" - semver "7.5.2" + semver "7.5.4" stack-trace "0.0.10" strip-ansi "6.0.1" which "3.0.0" @@ -10218,14 +10217,7 @@ semver@7.0.0: resolved "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@7.5.2: - version "7.5.2" - resolved "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz" - integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ== - dependencies: - lru-cache "^6.0.0" - -semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.0, semver@^7.5.3: +semver@7.5.4, semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.0, semver@^7.5.3: version "7.5.4" resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -11636,7 +11628,7 @@ vite-plugin-checker@^0.6.2: vscode-languageserver-textdocument "^1.0.1" vscode-uri "^3.0.2" -vite@^4.4.12: +vite@^4.5.2: version "4.5.2" resolved "https://registry.npmjs.org/vite/-/vite-4.5.2.tgz#d6ea8610e099851dad8c7371599969e0f8b97e82" integrity sha512-tBCZBNSBbHQkaGyhGCDUGqeo2ph8Fstyp6FMSvTtsXeZSPpSMGlviAOav2hxVTqFcx8Hj/twtWKsMJXNY0xI8w== From a59602bfcacfa9eaee810bef04bdcc121938d88a Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Tue, 23 Jan 2024 14:00:36 -0500 Subject: [PATCH 12/71] feat: Show warning to end user if no schema found during ZE activation Signed-off-by: Trae Yelovich --- package.json | 2 +- .../i18n/sample/src/utils/ProfilesUtils.i18n.json | 1 + packages/zowe-explorer/src/utils/ProfilesUtils.ts | 12 ++++++++++-- yarn.lock | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b6bee62a32..36b71d6a64 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "vscode-nls": "4.1.2" }, "resolutions": { - "@zowe/imperative": "file:zowe-imperative-5.21.0.tgz" + "@zowe/imperative": "file:zowe-imperative-5.21.0-schema-mgmt.tgz" }, "devDependencies": { "@types/jest": "^29.2.3", diff --git a/packages/zowe-explorer/i18n/sample/src/utils/ProfilesUtils.i18n.json b/packages/zowe-explorer/i18n/sample/src/utils/ProfilesUtils.i18n.json index b21b95cfa8..1ab9fb18a4 100644 --- a/packages/zowe-explorer/i18n/sample/src/utils/ProfilesUtils.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/utils/ProfilesUtils.i18n.json @@ -18,6 +18,7 @@ "ProfilesUtils.promptAndHandleMissingCredentialManager.install": "Install", "ProfilesUtils.promptAndHandleMissingCredentialManager.refreshMessage": "After installing the extension, please make sure to reload your VS Code window in order\n to start using the installed credential manager", "ProfilesUtils.promptAndHandleMissingCredentialManager.refreshButton": "Reload", + "profiles.noValidSchema": "No valid schema was found for the active team configuration. This may introduce issues with profiles in Zowe Explorer.", "zowe.promptCredentials.notSupported": "\"Update Credentials\" operation not supported when \"autoStore\" is false", "createNewConnection.option.prompt.profileName.placeholder": "Connection Name", "createNewConnection.option.prompt.profileName": "Enter a name for the connection.", diff --git a/packages/zowe-explorer/src/utils/ProfilesUtils.ts b/packages/zowe-explorer/src/utils/ProfilesUtils.ts index 05e37957d2..50d5090ad0 100644 --- a/packages/zowe-explorer/src/utils/ProfilesUtils.ts +++ b/packages/zowe-explorer/src/utils/ProfilesUtils.ts @@ -442,7 +442,7 @@ export class ProfilesUtils { return this.setupDefaultCredentialManager(); } - public static async readConfigFromDisk(): Promise { + public static async readConfigFromDisk(warnForMissingSchema?: boolean): Promise { ZoweLogger.trace("ProfilesUtils.readConfigFromDisk called."); let rootPath: string; const mProfileInfo = await ProfilesUtils.getProfileInfo(globals.ISTHEIA); @@ -453,6 +453,14 @@ export class ProfilesUtils { await mProfileInfo.readProfilesFromDisk({ homeDir: getZoweDir(), projectDir: undefined }); } if (mProfileInfo.usingTeamConfig) { + if (warnForMissingSchema && !mProfileInfo.hasValidSchema) { + const schemaWarning = localize( + "profiles.noValidSchema", + "No valid schema was found for the active team configuration. This may introduce issues with profiles in Zowe Explorer." + ); + Gui.warningMessage(schemaWarning); + ZoweLogger.warn(schemaWarning); + } globals.setConfigPath(rootPath); ZoweLogger.info(`Zowe Explorer is using the team configuration file "${mProfileInfo.getTeamConfig().configName}"`); const layers = mProfileInfo.getTeamConfig().layers || []; @@ -627,7 +635,7 @@ export class ProfilesUtils { } try { - await ProfilesUtils.readConfigFromDisk(); + await ProfilesUtils.readConfigFromDisk(true); ZoweLogger.info(localize("initializeZoweProfiles.success", "Zowe Profiles initialized successfully.")); } catch (err) { if (err instanceof imperative.ImperativeError) { diff --git a/yarn.lock b/yarn.lock index 2f293573df..93da1e8dd7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2674,9 +2674,9 @@ comment-json "4.1.1" string-width "4.2.3" -"@zowe/imperative@5.21.0", "@zowe/imperative@file:zowe-imperative-5.21.0.tgz": +"@zowe/imperative@5.21.0", "@zowe/imperative@file:zowe-imperative-5.21.0-schema-mgmt.tgz": version "5.21.0" - resolved "file:zowe-imperative-5.21.0.tgz#47da40ba624d1a695df7cbf55e7e2b4faa43ef1d" + resolved "file:zowe-imperative-5.21.0-schema-mgmt.tgz#88b2f3222d56e46135577aee72b783540ab7338b" dependencies: "@types/yargs" "13.0.4" chalk "2.4.2" From 8addc7ec4a35337625e59b1ea95ecafe96509ce2 Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Wed, 24 Jan 2024 12:33:26 -0500 Subject: [PATCH 13/71] Enhance watch task to trigger for zowe-explorer-api changes Signed-off-by: Timothy Johnson --- .gitignore | 1 + packages/zowe-explorer-api/tsconfig.json | 6 ++++-- packages/zowe-explorer-ftp-extension/tsconfig.json | 3 ++- packages/zowe-explorer-ftp-extension/webpack.config.js | 1 + packages/zowe-explorer/tsconfig.json | 3 ++- packages/zowe-explorer/webpack.config.js | 1 + 6 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 5bc1cc9be9..563cb38c36 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ testProfileData.ts results *.log npm-shrinkwrap.json +tsconfig.tsbuildinfo vscode-extension-for-zowe*.vsix .vscode/settings.json .vscode/*.env diff --git a/packages/zowe-explorer-api/tsconfig.json b/packages/zowe-explorer-api/tsconfig.json index 71742e7bf4..d0808119db 100644 --- a/packages/zowe-explorer-api/tsconfig.json +++ b/packages/zowe-explorer-api/tsconfig.json @@ -12,8 +12,10 @@ "pretty": true, "sourceMap": true, "newLine": "lf", - "resolveJsonModule": true + "resolveJsonModule": true, + "composite": true, + "rootDir": "./src" }, - "include": ["src/**/*"], + "include": ["src/**/*.ts", "src/log4jsconfig.json"], "exclude": ["lib", "node_modules"] } diff --git a/packages/zowe-explorer-ftp-extension/tsconfig.json b/packages/zowe-explorer-ftp-extension/tsconfig.json index ce19de4fbb..bea2eb0e77 100644 --- a/packages/zowe-explorer-ftp-extension/tsconfig.json +++ b/packages/zowe-explorer-ftp-extension/tsconfig.json @@ -27,5 +27,6 @@ "./node_modules/vscode/lib/*", "__tests__", "__mocks__" - ] + ], + "references": [{ "path": "../zowe-explorer-api" }] } diff --git a/packages/zowe-explorer-ftp-extension/webpack.config.js b/packages/zowe-explorer-ftp-extension/webpack.config.js index 697a9c7a92..ae2ecedb09 100644 --- a/packages/zowe-explorer-ftp-extension/webpack.config.js +++ b/packages/zowe-explorer-ftp-extension/webpack.config.js @@ -74,6 +74,7 @@ const config = { compilerOptions: { sourceMap: true, }, + projectReferences: true, }, }, ], diff --git a/packages/zowe-explorer/tsconfig.json b/packages/zowe-explorer/tsconfig.json index 6d3dcbda62..5d3466d5c0 100644 --- a/packages/zowe-explorer/tsconfig.json +++ b/packages/zowe-explorer/tsconfig.json @@ -26,5 +26,6 @@ // Needed in production for vscode-nls localization to work: "./node_modules/vscode/vscode.d.ts", "./node_modules/vscode/lib/*" - ] + ], + "references": [{ "path": "../zowe-explorer-api" }] } diff --git a/packages/zowe-explorer/webpack.config.js b/packages/zowe-explorer/webpack.config.js index aa0e80a2f2..fa720db412 100644 --- a/packages/zowe-explorer/webpack.config.js +++ b/packages/zowe-explorer/webpack.config.js @@ -76,6 +76,7 @@ const config = { compilerOptions: { sourceMap: true, }, + projectReferences: true, }, }, ], From 3126278908a553bb4b8265123ff6c6c66e9edce4 Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Wed, 24 Jan 2024 16:59:48 -0500 Subject: [PATCH 14/71] Fix missing paths config in tsconfig.json Signed-off-by: Timothy Johnson --- package.json | 4 ++++ packages/zowe-explorer-api/package.json | 2 +- packages/zowe-explorer-ftp-extension/tsconfig.json | 5 ++++- packages/zowe-explorer/package.json | 6 +----- packages/zowe-explorer/tsconfig.json | 5 ++++- yarn.lock | 2 +- 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 6ad007b153..3f84c91a57 100644 --- a/package.json +++ b/package.json @@ -40,10 +40,14 @@ "prettier": "2.6.0", "rimraf": "^3.0.2", "ts-jest": "^29.0.3", + "ts-loader": "^7.0.1", + "ts-node": "^8.10.1", "typescript": "^4.5.3", "vsce": "2.15.0", "vscode-nls-dev": "^4.0.0", "vscode-test": "^1.4.0", + "webpack": "^4.42.1", + "webpack-cli": "^3.3.11", "yarn": "1.22.19" }, "scripts": { diff --git a/packages/zowe-explorer-api/package.json b/packages/zowe-explorer-api/package.json index 3bdfdd2e02..4784bb5718 100644 --- a/packages/zowe-explorer-api/package.json +++ b/packages/zowe-explorer-api/package.json @@ -32,7 +32,7 @@ "pretty": "prettier --write .", "check-cli": "node scripts/check-cli.js", "clean": "rimraf lib", - "fresh-clone": "yarn clean && rimraf node_modules", + "fresh-clone": "yarn clean && rimraf node_modules tsconfig.tsbuildinfo", "license": "node ../../scripts/updateLicenses.js", "package": "yarn build && npm pack && node ../../scripts/mv-pack.js zowe-zowe-explorer-api tgz", "copy-secrets": "copyfiles -f ../../node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/*.node ./prebuilds" diff --git a/packages/zowe-explorer-ftp-extension/tsconfig.json b/packages/zowe-explorer-ftp-extension/tsconfig.json index bea2eb0e77..d6cd143ba8 100644 --- a/packages/zowe-explorer-ftp-extension/tsconfig.json +++ b/packages/zowe-explorer-ftp-extension/tsconfig.json @@ -17,7 +17,10 @@ "experimentalDecorators": true, "removeComments": true, "resolveJsonModule": true, - "rootDir": "." + "rootDir": ".", + "paths": { + "@zowe/zowe-explorer-api": ["../zowe-explorer-api"] + } }, "exclude": ["node_modules", ".vscode-test"], "include": [ diff --git a/packages/zowe-explorer/package.json b/packages/zowe-explorer/package.json index f5372cd0e7..f3c3edbc70 100644 --- a/packages/zowe-explorer/package.json +++ b/packages/zowe-explorer/package.json @@ -2036,11 +2036,7 @@ "mem": "^6.0.1", "run-sequence": "^2.2.1", "selenium-webdriver": "^3.6.0", - "sinon": "^6.1.0", - "ts-loader": "^7.0.1", - "ts-node": "^8.10.1", - "webpack": "^4.42.1", - "webpack-cli": "^3.3.11" + "sinon": "^6.1.0" }, "dependencies": { "@zowe/secrets-for-zowe-sdk": "7.18.6", diff --git a/packages/zowe-explorer/tsconfig.json b/packages/zowe-explorer/tsconfig.json index 5d3466d5c0..e8259b3304 100644 --- a/packages/zowe-explorer/tsconfig.json +++ b/packages/zowe-explorer/tsconfig.json @@ -17,7 +17,10 @@ "experimentalDecorators": true, "removeComments": true, "resolveJsonModule": true, - "rootDir": "." + "rootDir": ".", + "paths": { + "@zowe/zowe-explorer-api": ["../zowe-explorer-api"] + } // "types": ["node", "jest", "mocha"] }, "exclude": ["node_modules", ".vscode-test"], diff --git a/yarn.lock b/yarn.lock index 2242bcffab..0c663746b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11636,7 +11636,7 @@ vite-plugin-checker@^0.6.2: vscode-languageserver-textdocument "^1.0.1" vscode-uri "^3.0.2" -vite@^4.4.12: +vite@^4.5.2: version "4.5.2" resolved "https://registry.npmjs.org/vite/-/vite-4.5.2.tgz#d6ea8610e099851dad8c7371599969e0f8b97e82" integrity sha512-tBCZBNSBbHQkaGyhGCDUGqeo2ph8Fstyp6FMSvTtsXeZSPpSMGlviAOav2hxVTqFcx8Hj/twtWKsMJXNY0xI8w== From 61e15ebea8f707e35f2d379247031f19f6b280a0 Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Wed, 24 Jan 2024 23:37:25 -0500 Subject: [PATCH 15/71] Fix breakpoints not working in zowe-explorer-api Signed-off-by: Timothy Johnson --- packages/zowe-explorer-ftp-extension/webpack.config.js | 5 ++++- packages/zowe-explorer/webpack.config.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/zowe-explorer-ftp-extension/webpack.config.js b/packages/zowe-explorer-ftp-extension/webpack.config.js index ae2ecedb09..9968b1ca99 100644 --- a/packages/zowe-explorer-ftp-extension/webpack.config.js +++ b/packages/zowe-explorer-ftp-extension/webpack.config.js @@ -34,7 +34,7 @@ const config = { path: path.resolve(__dirname, "out/src"), filename: "extension.js", libraryTarget: "commonjs2", - devtoolModuleFilenameTemplate: "../../[resource-path]", + devtoolModuleFilenameTemplate: "webpack:///[absolute-resource-path]", }, devtool: "source-map", externals: { @@ -48,6 +48,9 @@ const config = { resolve: { // support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader extensions: [".ts", ".js"], + alias: { + "@zowe/zowe-explorer-api$": path.resolve(__dirname, "..", "zowe-explorer-api/src"), + }, }, node: { __dirname: false, // leave the __dirname behavior intact diff --git a/packages/zowe-explorer/webpack.config.js b/packages/zowe-explorer/webpack.config.js index fa720db412..b8e81d407d 100644 --- a/packages/zowe-explorer/webpack.config.js +++ b/packages/zowe-explorer/webpack.config.js @@ -36,7 +36,7 @@ const config = { path: path.resolve(__dirname, "out/src"), filename: "extension.js", libraryTarget: "commonjs2", - devtoolModuleFilenameTemplate: "../../[resource-path]", + devtoolModuleFilenameTemplate: "webpack:///[absolute-resource-path]", }, devtool: "source-map", externals: { @@ -50,6 +50,9 @@ const config = { resolve: { // support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader extensions: [".ts", ".js"], + alias: { + "@zowe/zowe-explorer-api$": path.resolve(__dirname, "..", "zowe-explorer-api/src"), + }, }, node: { __dirname: false, // leave the __dirname behavior intact From aee187e6f315a201ac9da8b4c86c8a0f81376f39 Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Thu, 25 Jan 2024 07:38:48 -0500 Subject: [PATCH 16/71] Update yarn clean script for zowe-explorer-api Signed-off-by: Timothy Johnson --- packages/zowe-explorer-api/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/zowe-explorer-api/package.json b/packages/zowe-explorer-api/package.json index 4784bb5718..d6fa1187b7 100644 --- a/packages/zowe-explorer-api/package.json +++ b/packages/zowe-explorer-api/package.json @@ -31,8 +31,8 @@ "lint:html": "eslint . --format html > results/eslint.html", "pretty": "prettier --write .", "check-cli": "node scripts/check-cli.js", - "clean": "rimraf lib", - "fresh-clone": "yarn clean && rimraf node_modules tsconfig.tsbuildinfo", + "clean": "rimraf lib tsconfig.tsbuildinfo", + "fresh-clone": "yarn clean && rimraf node_modules", "license": "node ../../scripts/updateLicenses.js", "package": "yarn build && npm pack && node ../../scripts/mv-pack.js zowe-zowe-explorer-api tgz", "copy-secrets": "copyfiles -f ../../node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/*.node ./prebuilds" From 212234fa83e302413feed47cc078dbb1e8c69282 Mon Sep 17 00:00:00 2001 From: adam-wolfe <122040687+adam-wolfe@users.noreply.github.com> Date: Sun, 28 Jan 2024 17:26:53 -0500 Subject: [PATCH 17/71] Adjust jobs context menu group definitions Signed-off-by: adam-wolfe <122040687+adam-wolfe@users.noreply.github.com> --- packages/zowe-explorer/CHANGELOG.md | 2 ++ .../i18n/sample/package.i18n.json | 1 + packages/zowe-explorer/package.json | 22 +++++++++---------- packages/zowe-explorer/package.nls.json | 1 + 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index 358c034f87..48d59b9065 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -8,6 +8,8 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen ### Bug fixes +- Adjusted order of 'Manage Profile' and 'Edit History' in the jobs tree's context menu to match the other trees. [#2670](https://github.com/zowe/vscode-extension-for-zowe/issues/2670) + ## `2.14.0` ### New features and enhancements diff --git a/packages/zowe-explorer/i18n/sample/package.i18n.json b/packages/zowe-explorer/i18n/sample/package.i18n.json index 69575a9b15..ee18deca35 100644 --- a/packages/zowe-explorer/i18n/sample/package.i18n.json +++ b/packages/zowe-explorer/i18n/sample/package.i18n.json @@ -151,6 +151,7 @@ "copyFile": "Copy", "pasteFile": "Paste", "jobs.sortBy": "Sort jobs...", + "jobs.filterBy": "Filter jobs...", "ds.allPdsSort": "all PDS members in {0}", "ds.singlePdsSort": "the PDS members in {0}", "ds.selectFilterOpt": "Set a filter for {0}", diff --git a/packages/zowe-explorer/package.json b/packages/zowe-explorer/package.json index 065af899b0..2a47c9f23b 100644 --- a/packages/zowe-explorer/package.json +++ b/packages/zowe-explorer/package.json @@ -768,7 +768,7 @@ }, { "command": "zowe.jobs.filterJobs", - "title": "Filter Jobs", + "title": "%jobs.filterBy%", "category": "Zowe Explorer", "icon": "$(list-filter)" }, @@ -1305,11 +1305,6 @@ "command": "zowe.jobs.addFavorite", "group": "002_zowe_jobsWorkspace@0" }, - { - "when": "view == zowe.jobs.explorer && viewItem =~ /^(?!.*_fav.*)server.*/ && !listMultiSelection", - "command": "zowe.jobs.filterJobs", - "group": "002_zowe_jobsProfileModification@99" - }, { "when": "view == zowe.jobs.explorer && viewItem =~ /^job.*_fav.*/", "command": "zowe.jobs.removeFavorite", @@ -1353,27 +1348,32 @@ { "when": "view == zowe.jobs.explorer && viewItem =~ /^(?!.*_fav.*)job.*/", "command": "zowe.jobs.deleteJob", - "group": "099_zowe_jobsModification" + "group": "097_zowe_jobsModification" }, { "when": "view == zowe.jobs.explorer && viewItem =~ /^job.*/", "command": "zowe.jobs.cancelJob", - "group": "099_zowe_jobsModification" + "group": "097_zowe_jobsModification" + }, + { + "when": "view == zowe.jobs.explorer && viewItem =~ /^(?!.*_fav.*)server.*/ && !listMultiSelection", + "command": "zowe.jobs.filterJobs", + "group": "098_zowe_jobsSort@0" }, { "when": "view == zowe.jobs.explorer && viewItem =~ /^(?!.*_fav.*)server.*/ && !listMultiSelection", "command": "zowe.jobs.sortBy", - "group": "099_zowe_jobsSort" + "group": "098_zowe_jobsSort@1" }, { "when": "view == zowe.jobs.explorer && viewItem =~ /^(?!.*_fav.*)server.*/ && !listMultiSelection", "command": "zowe.editHistory", - "group": "100_zowe_editHistory@100" + "group": "100_zowe_editHistory" }, { "when": "view == zowe.jobs.explorer && viewItem =~ /^(?!.*_fav.*)server.*/ && !listMultiSelection", "command": "zowe.profileManagement", - "group": "100_zowe_jobsProfileAuthentication@99" + "group": "099_zowe_jobsProfileAuthentication" } ], "commandPalette": [ diff --git a/packages/zowe-explorer/package.nls.json b/packages/zowe-explorer/package.nls.json index 69575a9b15..ee18deca35 100644 --- a/packages/zowe-explorer/package.nls.json +++ b/packages/zowe-explorer/package.nls.json @@ -151,6 +151,7 @@ "copyFile": "Copy", "pasteFile": "Paste", "jobs.sortBy": "Sort jobs...", + "jobs.filterBy": "Filter jobs...", "ds.allPdsSort": "all PDS members in {0}", "ds.singlePdsSort": "the PDS members in {0}", "ds.selectFilterOpt": "Set a filter for {0}", From 599e46193960b40e89118e1372dae0fed936378d Mon Sep 17 00:00:00 2001 From: adam-wolfe <122040687+adam-wolfe@users.noreply.github.com> Date: Sun, 28 Jan 2024 17:43:21 -0500 Subject: [PATCH 18/71] Rearrange things in package.json Signed-off-by: adam-wolfe <122040687+adam-wolfe@users.noreply.github.com> --- packages/zowe-explorer/package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/zowe-explorer/package.json b/packages/zowe-explorer/package.json index 2a47c9f23b..fa6b0be045 100644 --- a/packages/zowe-explorer/package.json +++ b/packages/zowe-explorer/package.json @@ -1365,15 +1365,15 @@ "command": "zowe.jobs.sortBy", "group": "098_zowe_jobsSort@1" }, - { - "when": "view == zowe.jobs.explorer && viewItem =~ /^(?!.*_fav.*)server.*/ && !listMultiSelection", - "command": "zowe.editHistory", - "group": "100_zowe_editHistory" - }, { "when": "view == zowe.jobs.explorer && viewItem =~ /^(?!.*_fav.*)server.*/ && !listMultiSelection", "command": "zowe.profileManagement", "group": "099_zowe_jobsProfileAuthentication" + }, + { + "when": "view == zowe.jobs.explorer && viewItem =~ /^(?!.*_fav.*)server.*/ && !listMultiSelection", + "command": "zowe.editHistory", + "group": "100_zowe_editHistory" } ], "commandPalette": [ From 369be7c3d1a80b3a3b8e90f57ea64325148e4445 Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Mon, 29 Jan 2024 09:23:24 -0500 Subject: [PATCH 19/71] deps: Update @zowe/cli to 7.23.0 Signed-off-by: Trae Yelovich --- package.json | 5 +- packages/zowe-explorer-api/package.json | 2 +- yarn.lock | 146 ++++++++++++------------ 3 files changed, 73 insertions(+), 80 deletions(-) diff --git a/package.json b/package.json index 0df8e29144..e0d6366573 100644 --- a/package.json +++ b/package.json @@ -16,12 +16,9 @@ "vscode": "^1.53.2" }, "dependencies": { - "@zowe/cli": "7.22.0", + "@zowe/cli": "7.23.0", "vscode-nls": "4.1.2" }, - "resolutions": { - "@zowe/imperative": "file:zowe-imperative-5.21.0-schema-mgmt.tgz" - }, "devDependencies": { "@types/jest": "^29.2.3", "@types/mocha": "^10.0.1", diff --git a/packages/zowe-explorer-api/package.json b/packages/zowe-explorer-api/package.json index d2e041fb11..e2f7651c18 100644 --- a/packages/zowe-explorer-api/package.json +++ b/packages/zowe-explorer-api/package.json @@ -18,7 +18,7 @@ }, "dependencies": { "@types/vscode": "^1.53.2", - "@zowe/cli": "7.22.0", + "@zowe/cli": "7.23.0", "@zowe/secrets-for-zowe-sdk": "7.18.6", "handlebars": "^4.7.7", "semver": "^7.5.3" diff --git a/yarn.lock b/yarn.lock index 93da1e8dd7..3a2007d74c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2642,22 +2642,22 @@ resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -"@zowe/cli@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.22.0.tgz#63e648337a1d61aad017748acca7468dc3940a24" - integrity sha512-Z+9403u7pPpge+WHAuuMqwSBaWNC+3qw0eL5aIVPgnvGPpQWWN0sL5mOaDo117GN9I1p8ee7tWqwrcll55tP0w== - dependencies: - "@zowe/core-for-zowe-sdk" "7.22.0" - "@zowe/imperative" "5.21.0" - "@zowe/provisioning-for-zowe-sdk" "7.22.0" - "@zowe/zos-console-for-zowe-sdk" "7.22.0" - "@zowe/zos-files-for-zowe-sdk" "7.22.0" - "@zowe/zos-jobs-for-zowe-sdk" "7.22.0" - "@zowe/zos-logs-for-zowe-sdk" "7.22.0" - "@zowe/zos-tso-for-zowe-sdk" "7.22.0" - "@zowe/zos-uss-for-zowe-sdk" "7.22.0" - "@zowe/zos-workflows-for-zowe-sdk" "7.22.0" - "@zowe/zosmf-for-zowe-sdk" "7.22.0" +"@zowe/cli@7.23.0": + version "7.23.0" + resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.23.0.tgz#1ce2f4d2037b4d4dfdbf9d0ab6ec8f18984c798c" + integrity sha512-NVgeVn3bCu0zC1qgaXYo0qvVX3rgh58gI2JqrevY1XuRkAlFseTG02RscOfQjmPmBW6JQtbwd4ANEl6azYN2rA== + dependencies: + "@zowe/core-for-zowe-sdk" "7.23.0" + "@zowe/imperative" "5.22.0" + "@zowe/provisioning-for-zowe-sdk" "7.23.0" + "@zowe/zos-console-for-zowe-sdk" "7.23.0" + "@zowe/zos-files-for-zowe-sdk" "7.23.0" + "@zowe/zos-jobs-for-zowe-sdk" "7.23.0" + "@zowe/zos-logs-for-zowe-sdk" "7.23.0" + "@zowe/zos-tso-for-zowe-sdk" "7.23.0" + "@zowe/zos-uss-for-zowe-sdk" "7.23.0" + "@zowe/zos-workflows-for-zowe-sdk" "7.23.0" + "@zowe/zosmf-for-zowe-sdk" "7.23.0" find-process "1.4.7" get-stream "6.0.1" lodash "4.17.21" @@ -2666,17 +2666,18 @@ optionalDependencies: "@zowe/secrets-for-zowe-sdk" "7.18.6" -"@zowe/core-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.22.0.tgz#ae271ee84e52f48b5508b74affb5f9aa5d4adbdf" - integrity sha512-uLkbxn0KvI6MiSZ8Y0SZRFJhvDarwhlvvW/oiSjIyNHeNtuTb31s5eYLTCdvX585om98wyVEKwYWK3ITzQ6w6g== +"@zowe/core-for-zowe-sdk@7.23.0": + version "7.23.0" + resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.23.0.tgz#8ade9eeb1b8145468e0a7a8770a026b2206bd73c" + integrity sha512-y7bm4nhuIVtKhL9aa6M++Cj3UETwRwMiZzRbzeSqphn4P83umQ4NTHfltJL5xPouDIaqXBNhKET8UecBXJntrQ== dependencies: comment-json "4.1.1" string-width "4.2.3" -"@zowe/imperative@5.21.0", "@zowe/imperative@file:zowe-imperative-5.21.0-schema-mgmt.tgz": - version "5.21.0" - resolved "file:zowe-imperative-5.21.0-schema-mgmt.tgz#88b2f3222d56e46135577aee72b783540ab7338b" +"@zowe/imperative@5.22.0": + version "5.22.0" + resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.22.0.tgz#b79f9630fd6afc4c4ea907f403c4133784838285" + integrity sha512-XSTlHuaKtI2FsWYSQWNIx2rR739Zv8pkjvvxBDesyiCYXOpo4u/1RxkeAE/FKfw5UgVKR6yq7izLeeOpPjj3IA== dependencies: "@types/yargs" "13.0.4" chalk "2.4.2" @@ -2694,12 +2695,12 @@ jest-diff "27.0.6" js-yaml "4.1.0" jsonfile "4.0.0" - jsonschema "1.1.1" + jsonschema "1.4.1" lodash "4.17.21" lodash-deep "2.0.0" log4js "6.4.6" markdown-it "12.3.2" - mustache "2.3.0" + mustache "4.2.0" npm-package-arg "9.1.0" opener "1.5.2" pacote "11.1.4" @@ -2715,10 +2716,10 @@ yamljs "0.3.0" yargs "15.3.1" -"@zowe/provisioning-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.22.0.tgz#01bcd2a182c219115779b3f3aeee65e2f846d349" - integrity sha512-5wX+qXxXL3WlmmS9rnDDZeUL4K4fuUAJ+8H+z8z0qv++ffZSJc36Jkmi/D5tX9FanmB0/kpCgeHqx1rWE/mYtA== +"@zowe/provisioning-for-zowe-sdk@7.23.0": + version "7.23.0" + resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.23.0.tgz#a359b44a2e60f33c243cb6d7272e47be7ca8c355" + integrity sha512-F+OSm0a5c4y2aX11XPVC6HSQM42T9puY9v6sTuvMHFIJBR7+gOoh5ijeyCy6eZMPmoXewsItc3oJEzbPHP5mKg== dependencies: js-yaml "4.1.0" @@ -2727,15 +2728,15 @@ resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.6.tgz#6b854b344babb291c26d19d82633099a46e08452" integrity sha512-YyS1NoXddb147mBQpu5/dTfo1gdwGa/xdg85U8KCngA+RHCmNct3n2rbK3tHx9C9H6rlgjeS+Mrux5Q+PHJUgQ== -"@zowe/zos-console-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.22.0.tgz#2088bee1963a9fa602df055a7078f63667a80f44" - integrity sha512-EI9rK76eq5kGXJqGkhobLMdNJstVUSswJ2JlNvGzwOQD/jV/7OJRHSHPllygMGaos8Rh14mzPDooeb9CBr5faA== +"@zowe/zos-console-for-zowe-sdk@7.23.0": + version "7.23.0" + resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.23.0.tgz#03a862339a70a09646af8791074da891b56cb343" + integrity sha512-nc3zpGRn5H0xX2ynIB1EB9OQiyIMu74qoXA6XTuYgaa/5gtb/xIxkeB9POC45aSAGJFjXDMT+3jeVKWhrtRVVw== -"@zowe/zos-files-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.22.0.tgz#a692b09016c0350685cf085dc47cb9591fec11d3" - integrity sha512-jw1j9q77DTQgm5i0YuslN454zC4eS0qb5PnfZ1thCbUugLxI/LRR1CgV59rTfqMGHMjXyfmmqjtCot4NMLUV1A== +"@zowe/zos-files-for-zowe-sdk@7.23.0": + version "7.23.0" + resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.23.0.tgz#dba5221b107831577c8e9c6ba1e39cd66bfeb782" + integrity sha512-2MWuS2JyZ6f2bZVS/SAOaAihuLZt1kWmp4zalJcSNLtwOp5cMWm4iKtKIokrdtb35IZOMADaiG31c/Sm71fZzQ== dependencies: get-stream "6.0.1" minimatch "5.0.1" @@ -2747,43 +2748,43 @@ dependencies: zos-node-accessor "1.0.14" -"@zowe/zos-jobs-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.22.0.tgz#4447071d304bc8c6348c08bdd8f28e84213aa1ac" - integrity sha512-QdKjWgQV7uEvLhHED48TBmQ2EhKn8ZG9OVrZiAa82k0AIsps5U2Wv/W9M1PyWlCEWQP/Zok7PpRWi3Bbv010cQ== +"@zowe/zos-jobs-for-zowe-sdk@7.23.0": + version "7.23.0" + resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.23.0.tgz#0f4cc083771a8673f38b53a2d76ebf0e931a68ac" + integrity sha512-FoYxZeC8BpI0Pd5X3vJyo7ViXBhXLvrdogNmWuTvYfMVj78xDp/ZoSon9JDJhurOhtjWOdnwrfPZVyI074PHNw== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.22.0" + "@zowe/zos-files-for-zowe-sdk" "7.23.0" -"@zowe/zos-logs-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.22.0.tgz#61500c48b76c2458243508d83137f221393ffb44" - integrity sha512-XA/ZH1LsdqE9vTA6GOlI3t6RsgA7hf+efImVltE9brVlFrrIgXCD46A9CVDl6bmkp/tFQqCdMYHjHFbWiwN4WA== +"@zowe/zos-logs-for-zowe-sdk@7.23.0": + version "7.23.0" + resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.23.0.tgz#fa1e40ce1e681f4d2b56b23f2c8585dce918dbfd" + integrity sha512-7OnIIiwbiL7qEYXTfBVIW7EoXc+jKMygDQmIpUaTgOeu5cnmy5/SfvF4YtaW8eVJvsEJG0p1w77WMGGSyvQDEw== -"@zowe/zos-tso-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.22.0.tgz#38c0ba26bbcc6af0564911883e21bd9ad5c217e4" - integrity sha512-vzhKJUk6E/EHjH8BadCfpL45C40qmJxYlSHAIHitAtFcOkI4F7i13mlgulaxPCiTTV3jBw4g+JoJe8DwG1eiyA== +"@zowe/zos-tso-for-zowe-sdk@7.23.0": + version "7.23.0" + resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.23.0.tgz#a3302f9e529071bbc91d5ea4353ea6e0154a7968" + integrity sha512-+cj39Vo42wIPSK8eiX7WcBrk2JyxKQZuZnFvXbtcX9j/i/05GAM7kfYX1JVKsd2v59dbmYkOotb0q+GSIDMKGA== dependencies: - "@zowe/zosmf-for-zowe-sdk" "7.22.0" + "@zowe/zosmf-for-zowe-sdk" "7.23.0" -"@zowe/zos-uss-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.22.0.tgz#3b6bb8dedae1a6c4f367189cf6b3bdbab0aca822" - integrity sha512-c3yXBdBWW2I1WbkMvgmx/EMNEpxJmCRZ0gygjYd1xM//wWhPaigOVY5XSRTpnXS0UY6KOX9T7ZymlCe6XzAhEQ== +"@zowe/zos-uss-for-zowe-sdk@7.23.0": + version "7.23.0" + resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.23.0.tgz#76daf52d8ffd22a4db17cf526226b247e7d74810" + integrity sha512-+gIzbLbvhWM+zIXbvUMqpgBoKrKbf5lbSA7GTdf3oTHc1VZzy0YJFX/bIewDYZunMV/D91KVAQ1Fie8i1Xlkfg== dependencies: ssh2 "1.15.0" -"@zowe/zos-workflows-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.22.0.tgz#05537853832bcf2307a78907459fb43e59ca22ed" - integrity sha512-arM0gVpm0zM84JuIZSWTK+bCqu6gED0ubYJZAdI5ttsjSaiv+E4LM1OUkd05n0HCUGYeNrL30LEsswHUM7cqZA== +"@zowe/zos-workflows-for-zowe-sdk@7.23.0": + version "7.23.0" + resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.23.0.tgz#6195ff3fcf1e8d50d806ca051a01500689b3b666" + integrity sha512-H9xbDhlY0m+BbNy7mOIS6kxPT1/UbHvavpi2y9ZtzxOV47sYxCOIfSGE7mvSTVSSjnV47B+mQT0h6qvX0Kqinw== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.22.0" + "@zowe/zos-files-for-zowe-sdk" "7.23.0" -"@zowe/zosmf-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.22.0.tgz#cc87f28acf60b600eca5111d35ac8668aaec192a" - integrity sha512-D4nbTDr5uJxJev9+zNwbq/3Z3DuQR6qfmbofzDGYYaU1peFO7+ioFN+uAInFBS1jqj4iHko2KINJfPZFALg3/A== +"@zowe/zosmf-for-zowe-sdk@7.23.0": + version "7.23.0" + resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.23.0.tgz#fd235649093c4f936365692506ca854953a8e18c" + integrity sha512-zwavHYHuFQOS3AxmZ5bhsWKyniUgQTRyMwpguce09XdehLyveb2VwuH1tVAbggUZlP+ae8vqWQAVU2fdg+eiPg== abab@^2.0.3, abab@^2.0.5: version "2.0.6" @@ -7687,10 +7688,10 @@ jsonparse@^1.3.1: resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= -jsonschema@1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/jsonschema/-/jsonschema-1.1.1.tgz" - integrity sha1-PO3o4+QR03eHLu+8n98mODy8Ptk= +jsonschema@1.4.1: + version "1.4.1" + resolved "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" + integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== jszip@^3.1.3: version "3.9.1" @@ -8554,14 +8555,9 @@ multimatch@^2.0.0: arrify "^1.0.0" minimatch "^3.0.0" -mustache@2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/mustache/-/mustache-2.3.0.tgz" - integrity sha1-QCj3d4sXcIpImTCm5SrDvKDaQdA= - -mustache@^4.0.0: +mustache@4.2.0, mustache@^4.0.0: version "4.2.0" - resolved "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz" + resolved "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64" integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== mute-stdout@^1.0.0: From b6574645ef2bdf68dbcde7d7d14e2b65a57a5ed9 Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Mon, 29 Jan 2024 09:24:08 -0500 Subject: [PATCH 20/71] tests: adjust mocks, remove unused schema files Signed-off-by: Trae Yelovich --- .../zowe-explorer/__mocks__/sampleSchema.json | 102 --------- .../zowe-explorer/__mocks__/zowe.schema.json | 213 ------------------ .../ZoweExplorerExtender.unit.test.ts | 7 +- 3 files changed, 5 insertions(+), 317 deletions(-) delete mode 100644 packages/zowe-explorer/__mocks__/sampleSchema.json delete mode 100644 packages/zowe-explorer/__mocks__/zowe.schema.json diff --git a/packages/zowe-explorer/__mocks__/sampleSchema.json b/packages/zowe-explorer/__mocks__/sampleSchema.json deleted file mode 100644 index a0a78bd7b3..0000000000 --- a/packages/zowe-explorer/__mocks__/sampleSchema.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$version": "1.0", - "type": "object", - "description": "Zowe configuration", - "properties": { - "profiles": { - "type": "object", - "description": "Mapping of profile names to profile configurations", - "patternProperties": { - "^\\S*$": { - "type": "object", - "description": "Profile configuration object", - "properties": { - "type": { - "description": "Profile type", - "type": "string", - "enum": ["sample"] - }, - "properties": { - "description": "Profile properties object", - "type": "object" - }, - "profiles": { - "description": "Optional subprofile configurations", - "type": "object", - "$ref": "#/properties/profiles" - }, - "secure": { - "description": "Secure property names", - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - }, - "allOf": [ - { - "if": { - "properties": { - "type": false - } - }, - "then": { - "properties": { - "properties": { - "title": "Missing profile type" - } - } - } - }, - { - "if": { - "properties": { - "type": { - "const": "sample" - } - } - }, - "then": { - "properties": { - "properties": { - "type": "object", - "title": "Sample Profile", - "description": "Sample profile that stores values", - "properties": { - "host": { - "type": "string", - "description": "Host name of sample service on the mainframe." - } - }, - "required": [] - }, - "secure": { - "items": { - "enum": ["user", "password", "tokenValue"] - } - } - } - } - } - ] - } - } - }, - "defaults": { - "type": "object", - "description": "Mapping of profile types to default profile names", - "properties": { - "sample": { - "description": "Default sample profile", - "type": "string" - } - } - }, - "autoStore": { - "type": "boolean", - "description": "If true, values you enter when prompted are stored for future use" - } - } -} diff --git a/packages/zowe-explorer/__mocks__/zowe.schema.json b/packages/zowe-explorer/__mocks__/zowe.schema.json deleted file mode 100644 index bb34b77cfe..0000000000 --- a/packages/zowe-explorer/__mocks__/zowe.schema.json +++ /dev/null @@ -1,213 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$version": "1.0", - "type": "object", - "description": "Zowe configuration", - "properties": { - "profiles": { - "type": "object", - "description": "Mapping of profile names to profile configurations", - "patternProperties": { - "^\\S*$": { - "type": "object", - "description": "Profile configuration object", - "properties": { - "type": { - "description": "Profile type", - "type": "string", - "enum": ["zosmf", "base"] - }, - "properties": { - "description": "Profile properties object", - "type": "object" - }, - "profiles": { - "description": "Optional subprofile configurations", - "type": "object", - "$ref": "#/properties/profiles" - }, - "secure": { - "description": "Secure property names", - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - }, - "allOf": [ - { - "if": { - "properties": { - "type": false - } - }, - "then": { - "properties": { - "properties": { - "title": "Missing profile type" - } - } - } - }, - { - "if": { - "properties": { - "type": { - "const": "zosmf" - } - } - }, - "then": { - "properties": { - "properties": { - "type": "object", - "title": "z/OSMF Profile", - "description": "z/OSMF Profile", - "properties": { - "host": { - "type": "string", - "description": "The z/OSMF server host name." - }, - "port": { - "type": "number", - "description": "The z/OSMF server port.", - "default": 443 - }, - "user": { - "type": "string", - "description": "Mainframe (z/OSMF) user name, which can be the same as your TSO login." - }, - "password": { - "type": "string", - "description": "Mainframe (z/OSMF) password, which can be the same as your TSO password." - }, - "rejectUnauthorized": { - "type": "boolean", - "description": "Reject self-signed certificates.", - "default": true - }, - "certFile": { - "type": "string", - "description": "The file path to a certificate file to use for authentication" - }, - "certKeyFile": { - "type": "string", - "description": "The file path to a certificate key file to use for authentication" - }, - "basePath": { - "type": "string", - "description": "The base path for your API mediation layer instance. Specify this option to prepend the base path to all z/OSMF resources when making REST requests. Do not specify this option if you are not using an API mediation layer." - }, - "protocol": { - "type": "string", - "description": "The protocol used (HTTP or HTTPS)", - "default": "https", - "enum": ["http", "https"] - }, - "encoding": { - "type": "string", - "description": "The encoding for download and upload of z/OS data set and USS files. The default encoding if not specified is IBM-1047." - }, - "responseTimeout": { - "type": "number", - "description": "The maximum amount of time in seconds the z/OSMF Files TSO servlet should run before returning a response. Any request exceeding this amount of time will be terminated and return an error. Allowed values: 5 - 600" - } - }, - "required": [] - }, - "secure": { - "items": { - "enum": ["user", "password"] - } - } - } - } - }, - { - "if": { - "properties": { - "type": { - "const": "base" - } - } - }, - "then": { - "properties": { - "properties": { - "type": "object", - "title": "Base Profile", - "description": "Base profile that stores values shared by multiple service profiles", - "properties": { - "host": { - "type": "string", - "description": "Host name of service on the mainframe." - }, - "port": { - "type": "number", - "description": "Port number of service on the mainframe." - }, - "user": { - "type": "string", - "description": "User name to authenticate to service on the mainframe." - }, - "password": { - "type": "string", - "description": "Password to authenticate to service on the mainframe." - }, - "rejectUnauthorized": { - "type": "boolean", - "description": "Reject self-signed certificates.", - "default": true - }, - "tokenType": { - "type": "string", - "description": "The type of token to get and use for the API. Omit this option to use the default token type, which is provided by 'zowe auth login'." - }, - "tokenValue": { - "type": "string", - "description": "The value of the token to pass to the API." - }, - "certFile": { - "type": "string", - "description": "The file path to a certificate file to use for authentication" - }, - "certKeyFile": { - "type": "string", - "description": "The file path to a certificate key file to use for authentication" - } - }, - "required": [] - }, - "secure": { - "items": { - "enum": ["user", "password", "tokenValue"] - } - } - } - } - } - ] - } - } - }, - "defaults": { - "type": "object", - "description": "Mapping of profile types to default profile names", - "properties": { - "zosmf": { - "description": "Default zosmf profile", - "type": "string" - }, - "base": { - "description": "Default base profile", - "type": "string" - } - } - }, - "autoStore": { - "type": "boolean", - "description": "If true, values you enter when prompted are stored for future use" - } - } -} diff --git a/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts index d70de77fec..907619ad3a 100644 --- a/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts @@ -21,7 +21,7 @@ import { ZoweExplorerExtender } from "../../src/ZoweExplorerExtender"; import { Profiles } from "../../src/Profiles"; import * as path from "path"; import * as fs from "fs"; -import { getZoweDir, Gui } from "@zowe/zowe-explorer-api"; +import { getZoweDir, Gui, ProfilesCache } from "@zowe/zowe-explorer-api"; import { ProfilesUtils } from "../../src/utils/ProfilesUtils"; import { ZoweLogger } from "../../src/utils/LoggerUtils"; import { SettingsConfig } from "../../src/utils/SettingsConfig"; @@ -227,7 +227,10 @@ describe("ZoweExplorerExtender unit tests", () => { jest.spyOn(SettingsConfig, "getDirectValue").mockReturnValueOnce(false); jest.spyOn(ZoweLogger, "trace").mockImplementation(); jest.spyOn(ZoweLogger, "info").mockImplementation(); - const profInfo = await ProfilesUtils.getProfileInfo(false); + const profInfo = new imperative.ProfileInfo("zowe", { + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + credMgrOverride: imperative.ProfileCredentials.defaultCredMgrWithKeytar(ProfilesCache.requireKeyring), + }); const addProfTypeToSchema = jest .spyOn(imperative.ProfileInfo.prototype, "addProfileTypeToSchema") .mockImplementation(addProfileTypeToSchemaMock as unknown as any); From 6f8bbe91d797cc41adbdc25917ed8566ee8a90ff Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Mon, 29 Jan 2024 09:24:47 -0500 Subject: [PATCH 21/71] i18n: remove unneeded 'zowe' scope from localized string id Signed-off-by: Trae Yelovich --- .../i18n/sample/src/ZoweExplorerExtender.i18n.json | 2 +- packages/zowe-explorer/src/ZoweExplorerExtender.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/zowe-explorer/i18n/sample/src/ZoweExplorerExtender.i18n.json b/packages/zowe-explorer/i18n/sample/src/ZoweExplorerExtender.i18n.json index 4159f0f8a6..c5db5ea283 100644 --- a/packages/zowe-explorer/i18n/sample/src/ZoweExplorerExtender.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/ZoweExplorerExtender.i18n.json @@ -1,4 +1,4 @@ { "initialize.profiles.error": "Error encountered when loading your Zowe config. Click \"Show Config\" for more details.", - "zowe.schema.cannotAccess": "Failed to update Zowe schema: insufficient permissions or read-only file" + "schema.cannotAccess": "Failed to update Zowe schema: insufficient permissions or read-only file" } diff --git a/packages/zowe-explorer/src/ZoweExplorerExtender.ts b/packages/zowe-explorer/src/ZoweExplorerExtender.ts index 61bd283271..7688d7316c 100644 --- a/packages/zowe-explorer/src/ZoweExplorerExtender.ts +++ b/packages/zowe-explorer/src/ZoweExplorerExtender.ts @@ -209,7 +209,7 @@ export class ZoweExplorerExtender implements ZoweExplorerApi.IApiExplorerExtende /** * Adds new types to the Zowe schema. - * @param profileInfo the ProfileInfo object that has been prepared with `readProfilesFromDisk`, such as the one initialized in `initForZowe`. + * @param profileInfo a ProfileInfo object that has been prepared with `readProfilesFromDisk` (such as the one initialized in `initForZowe`). * @param profileTypeConfigurations (optional) Profile type configurations to add to the schema */ private updateSchema( @@ -232,7 +232,7 @@ export class ZoweExplorerExtender implements ZoweExplorerApi.IApiExplorerExtende if (err.code === "EACCES" || err.code === "EPERM") { Gui.errorMessage( localize( - "zowe.schema.cannotAccess", + "schema.cannotAccess", "Failed to update Zowe schema: insufficient permissions or read-only file", ) ); From 0389e019e373b25828d2a325ac421547ac241500 Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Mon, 29 Jan 2024 09:47:22 -0500 Subject: [PATCH 22/71] format: run prettier Signed-off-by: Trae Yelovich --- .../zowe-explorer/__mocks__/@zowe/imperative.ts | 13 ++++++++----- .../uss/ussNodeActions.integration.test.ts | 4 ++-- packages/zowe-explorer/src/ZoweExplorerExtender.ts | 11 +++-------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/packages/zowe-explorer/__mocks__/@zowe/imperative.ts b/packages/zowe-explorer/__mocks__/@zowe/imperative.ts index 8aeabc737b..5ba8cc5b9c 100644 --- a/packages/zowe-explorer/__mocks__/@zowe/imperative.ts +++ b/packages/zowe-explorer/__mocks__/@zowe/imperative.ts @@ -247,11 +247,14 @@ export class ProfileInfo { return; } - public addProfileTypeToSchema(profileType: string, typeInfo: { - sourceApp: string; - schema: any; - version?: string; - }): any { + public addProfileTypeToSchema( + profileType: string, + typeInfo: { + sourceApp: string; + schema: any; + version?: string; + } + ): any { return; } } diff --git a/packages/zowe-explorer/__tests__/__integration__/uss/ussNodeActions.integration.test.ts b/packages/zowe-explorer/__tests__/__integration__/uss/ussNodeActions.integration.test.ts index eab79dc855..7e894f6d1e 100644 --- a/packages/zowe-explorer/__tests__/__integration__/uss/ussNodeActions.integration.test.ts +++ b/packages/zowe-explorer/__tests__/__integration__/uss/ussNodeActions.integration.test.ts @@ -122,7 +122,7 @@ describe("ussNodeActions integration test", async () => { it("should rename a uss file", async () => { let error; let list; - const beforeNameBase = beforeFileName.split("/").pop(); + const beforeNameBase = beforeFileName.split("/").pop()!; const afterNameBase = afterFileName.split("/").pop(); try { @@ -134,7 +134,7 @@ describe("ussNodeActions integration test", async () => { profile: testConst.profile.profile, }); const testNode = new ZoweUSSNode({ - label: beforeNameBase as string, + label: beforeNameBase, collapsibleState: vscode.TreeItemCollapsibleState.None, parentNode: testFolder, session, diff --git a/packages/zowe-explorer/src/ZoweExplorerExtender.ts b/packages/zowe-explorer/src/ZoweExplorerExtender.ts index 7688d7316c..ba7310755c 100644 --- a/packages/zowe-explorer/src/ZoweExplorerExtender.ts +++ b/packages/zowe-explorer/src/ZoweExplorerExtender.ts @@ -214,14 +214,14 @@ export class ZoweExplorerExtender implements ZoweExplorerApi.IApiExplorerExtende */ private updateSchema( profileInfo: zowe.imperative.ProfileInfo, - profileTypeConfigurations?: zowe.imperative.ICommandProfileTypeConfiguration[], + profileTypeConfigurations?: zowe.imperative.ICommandProfileTypeConfiguration[] ): void { if (profileTypeConfigurations) { try { for (const typeConfig of profileTypeConfigurations) { const addResult = profileInfo.addProfileTypeToSchema(typeConfig.type, { schema: typeConfig.schema, - sourceApp: "Zowe Explorer (for VS Code)" + sourceApp: "Zowe Explorer (for VS Code)", }); if (addResult.info.length > 0) { Gui.warningMessage(addResult.info); @@ -230,12 +230,7 @@ export class ZoweExplorerExtender implements ZoweExplorerApi.IApiExplorerExtende } catch (err) { // Only show an error if we failed to update the on-disk schema. if (err.code === "EACCES" || err.code === "EPERM") { - Gui.errorMessage( - localize( - "schema.cannotAccess", - "Failed to update Zowe schema: insufficient permissions or read-only file", - ) - ); + Gui.errorMessage(localize("schema.cannotAccess", "Failed to update Zowe schema: insufficient permissions or read-only file")); } } } From b8103dc4780122570db9e6bfd6c2f8fce6e8d33d Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Mon, 29 Jan 2024 09:54:39 -0500 Subject: [PATCH 23/71] deps: update zowe/cli on USS profile sample Signed-off-by: Trae Yelovich --- samples/uss-profile-sample/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/uss-profile-sample/package.json b/samples/uss-profile-sample/package.json index 8ef06f49e9..d8e23f1118 100644 --- a/samples/uss-profile-sample/package.json +++ b/samples/uss-profile-sample/package.json @@ -33,7 +33,7 @@ "watch": "tsc -watch -p ./" }, "dependencies": { - "@zowe/cli": "7.22.0", + "@zowe/cli": "7.23.0", "@zowe/zowe-explorer-api": "file:../../packages/zowe-explorer-api", "ssh2-sftp-client": "^9.1.0" }, From 8eafe34c6875cd938ecd6a2a5192805900d9a2be Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Mon, 29 Jan 2024 10:13:24 -0500 Subject: [PATCH 24/71] tests: cover 'missing schema warning message' Signed-off-by: Trae Yelovich --- packages/zowe-explorer/__mocks__/vscode.ts | 12 ++++++++ .../__unit__/utils/ProfilesUtils.unit.test.ts | 30 +++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/packages/zowe-explorer/__mocks__/vscode.ts b/packages/zowe-explorer/__mocks__/vscode.ts index 36d30b6634..fcc782eaff 100644 --- a/packages/zowe-explorer/__mocks__/vscode.ts +++ b/packages/zowe-explorer/__mocks__/vscode.ts @@ -279,6 +279,18 @@ export namespace window { return Promise.resolve(""); } + /** + * Show a warning message to users. Optionally provide an array of items which will be presented as + * clickable buttons. + * + * @param message The message to show. + * @param items A set of items that will be rendered as actions in the message. + * @return A thenable that resolves to the selected item or `undefined` when being dismissed. + */ + export function showWarningMessage(message: string, ...items: string[]): Thenable { + return Promise.resolve(""); + } + export function showTextDocument(document: TextDocument, column?: ViewColumn, preserveFocus?: boolean): any { return undefined; } diff --git a/packages/zowe-explorer/__tests__/__unit__/utils/ProfilesUtils.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/utils/ProfilesUtils.unit.test.ts index 15bb1dff32..cd8ad1e544 100644 --- a/packages/zowe-explorer/__tests__/__unit__/utils/ProfilesUtils.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/utils/ProfilesUtils.unit.test.ts @@ -366,6 +366,36 @@ describe("ProfilesUtils unit tests", () => { expect(mockReadProfilesFromDisk).toHaveBeenCalledTimes(1); profInfoSpy.mockRestore(); }); + + it("should warn the user when using team config with a missing schema", async () => { + const profInfoSpy = jest.spyOn(profUtils.ProfilesUtils, "getProfileInfo").mockReturnValueOnce({ + readProfilesFromDisk: jest.fn(), + usingTeamConfig: true, + hasValidSchema: false, + getTeamConfig: () => ({ + layers: [ + { + path: "test", + exists: true, + properties: { + defaults: "test", + }, + }, + { + path: "test", + exists: true, + properties: {}, + }, + ], + }), + } as never); + const warnMsgSpy = jest.spyOn(Gui, "warningMessage"); + await profUtils.ProfilesUtils.readConfigFromDisk(true); + expect(warnMsgSpy).toHaveBeenCalledWith( + "No valid schema was found for the active team configuration. This may introduce issues with profiles in Zowe Explorer." + ); + profInfoSpy.mockRestore(); + }); }); describe("promptCredentials", () => { From c934de2720eaa627cc7a06307d244c27fcec8a51 Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Mon, 29 Jan 2024 10:29:17 -0500 Subject: [PATCH 25/71] doc: move changelog entry Signed-off-by: Trae Yelovich --- packages/zowe-explorer/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index bd475c7f4f..2d3a77ace5 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -6,6 +6,8 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen ### New features and enhancements +- Added the capability for extenders to contribute new profile types to the Zowe schema during extender activation. [#2508](https://github.com/zowe/vscode-extension-for-zowe/issues/2508) + ### Bug fixes ## `2.14.0` @@ -17,7 +19,6 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen - Adopted new common methods for `loginWithBaseProfile` and `logoutWithBaseProfile`. [#2493](https://github.com/zowe/vscode-extension-for-zowe/pull/2493) - Added APIML dynamic token support. [#2665](https://github.com/zowe/vscode-extension-for-zowe/issues/2665) - Implemented profile determination without triggering quick pick for `Submit JCL` if the file is part of Zowe Explorer's temp files. [#2628](https://github.com/zowe/vscode-extension-for-zowe/issues/2628) -- Added the capability for extenders to contribute new profile types to the Zowe schema during extender activation. [#2508](https://github.com/zowe/vscode-extension-for-zowe/issues/2508) ### Bug fixes From 3616a1ec48ff49e267569e15ef9ad2d1a1565769 Mon Sep 17 00:00:00 2001 From: zFernand0 <37381190+zFernand0@users.noreply.github.com> Date: Mon, 29 Jan 2024 20:54:07 +0000 Subject: [PATCH 26/71] fix: Login and Logout with APIML Dynamic Token support Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> --- .../zowe-explorer-api/src/vscode/ZoweVsCodeExtension.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/zowe-explorer-api/src/vscode/ZoweVsCodeExtension.ts b/packages/zowe-explorer-api/src/vscode/ZoweVsCodeExtension.ts index 2c0d4de2b8..cb3e2249ad 100644 --- a/packages/zowe-explorer-api/src/vscode/ZoweVsCodeExtension.ts +++ b/packages/zowe-explorer-api/src/vscode/ZoweVsCodeExtension.ts @@ -175,7 +175,8 @@ export class ZoweVsCodeExtension { if (typeof serviceProfile === "string") { serviceProfile = await ZoweVsCodeExtension.getServiceProfileForAuthPurposes(cache, serviceProfile); } - const tokenType = loginTokenType ?? serviceProfile.profile.tokenType ?? imperative.SessConstants.TOKEN_TYPE_APIML; + const tokenType = + serviceProfile.profile.tokenType ?? baseProfile.profile.tokenType ?? loginTokenType ?? imperative.SessConstants.TOKEN_TYPE_APIML; const updSession = new imperative.Session({ hostname: serviceProfile.profile.host, port: serviceProfile.profile.port, @@ -195,7 +196,7 @@ export class ZoweVsCodeExtension { const loginToken = await (zeRegister?.getCommonApi(serviceProfile).login ?? Login.apimlLogin)(updSession); const updBaseProfile: imperative.IProfile = { - tokenType, + tokenType: updSession.ISession.tokenType ?? tokenType, tokenValue: loginToken, }; @@ -248,8 +249,9 @@ export class ZoweVsCodeExtension { serviceProfile = await ZoweVsCodeExtension.getServiceProfileForAuthPurposes(cache, serviceProfile); } const tokenType = - zeRegister?.getCommonApi(serviceProfile).getTokenTypeName() ?? serviceProfile.profile.tokenType ?? + baseProfile.profile.tokenType ?? + zeRegister?.getCommonApi(serviceProfile).getTokenTypeName() ?? imperative.SessConstants.TOKEN_TYPE_APIML; const updSession = new imperative.Session({ hostname: serviceProfile.profile.host, From fbe83ee555fbe2e1a2015dd8f9650443bc0ad108 Mon Sep 17 00:00:00 2001 From: zFernand0 <37381190+zFernand0@users.noreply.github.com> Date: Mon, 29 Jan 2024 21:54:44 +0000 Subject: [PATCH 27/71] update tests and changelog Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> --- packages/zowe-explorer-api/CHANGELOG.md | 2 ++ .../__unit__/vscode/ZoweVsCodeExtension.unit.test.ts | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/zowe-explorer-api/CHANGELOG.md b/packages/zowe-explorer-api/CHANGELOG.md index 12836812c6..231f1e5b47 100644 --- a/packages/zowe-explorer-api/CHANGELOG.md +++ b/packages/zowe-explorer-api/CHANGELOG.md @@ -8,6 +8,8 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t ### Bug fixes +- Fix login and logout operations when APIML dynamic tokens are enabled. [#2692](https://github.com/zowe/vscode-extension-for-zowe/pull/2692) + ## `2.14.0` ### New features and enhancements diff --git a/packages/zowe-explorer-api/__tests__/__unit__/vscode/ZoweVsCodeExtension.unit.test.ts b/packages/zowe-explorer-api/__tests__/__unit__/vscode/ZoweVsCodeExtension.unit.test.ts index 52e78ae601..880f5201ca 100644 --- a/packages/zowe-explorer-api/__tests__/__unit__/vscode/ZoweVsCodeExtension.unit.test.ts +++ b/packages/zowe-explorer-api/__tests__/__unit__/vscode/ZoweVsCodeExtension.unit.test.ts @@ -312,10 +312,18 @@ describe("ZoweVsCodeExtension", () => { delete testSession.ISession.password; testSession.ISession.hostname = "service"; testSession.ISession.base64EncodedAuth = "dXNlcjpwYXNz"; + testSession.ISession.tokenType = tempBaseProfile.profile.tokenType; expect(loginSpy).toHaveBeenCalledWith(testSession); expect(testSpy).toHaveBeenCalledWith(testCache, "service"); - expect(testCache.updateBaseProfileFileLogin).toHaveBeenCalledWith(newServiceProfile, updProfile, true); + expect(testCache.updateBaseProfileFileLogin).toHaveBeenCalledWith( + newServiceProfile, + { + tokenType: tempBaseProfile.profile.tokenType, + tokenValue: "tokenValue", + }, + true + ); }); it("should logout using the service profile given a simple profile name", async () => { testCache.fetchBaseProfile.mockResolvedValue(baseProfile); From 9a506b3c0462c2ed8ddc04e86c986d577db406c5 Mon Sep 17 00:00:00 2001 From: "Andrew W. Harn" Date: Fri, 2 Feb 2024 14:50:20 +0000 Subject: [PATCH 28/71] Update workflows to Node 20 workflows Signed-off-by: Andrew W. Harn --- .github/actions/deploy-npm-package/action.yml | 2 +- .github/actions/deploy-vscode-extension/action.yml | 2 +- .github/workflows/audit.yml | 4 ++-- .github/workflows/auto-comment.yml | 2 +- .github/workflows/changelog.yml | 2 +- .github/workflows/codeql.yml | 2 +- .github/workflows/deployment.yml | 6 +++--- .github/workflows/lint.yml | 4 ++-- .github/workflows/stale.yml | 2 +- .github/workflows/theia-zowe-explorer-ci.yml | 4 ++-- .github/workflows/zowe-explorer-ci.yml | 12 ++++++------ .github/workflows/zowe-explorer-ftp-ci.yml | 8 ++++---- .github/workflows/zowe-explorer-samples.yml | 4 ++-- 13 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/actions/deploy-npm-package/action.yml b/.github/actions/deploy-npm-package/action.yml index 11441e8126..8a535b7e36 100644 --- a/.github/actions/deploy-npm-package/action.yml +++ b/.github/actions/deploy-npm-package/action.yml @@ -17,5 +17,5 @@ outputs: changelog: description: The body of the changelog to be added to GH Releases runs: - using: node12 + using: node20 main: index.js diff --git a/.github/actions/deploy-vscode-extension/action.yml b/.github/actions/deploy-vscode-extension/action.yml index f66cbea5c8..f4a392a49a 100644 --- a/.github/actions/deploy-vscode-extension/action.yml +++ b/.github/actions/deploy-vscode-extension/action.yml @@ -17,5 +17,5 @@ outputs: changelog: description: The body of the changelog to be added to GH Releases runs: - using: node12 + using: node20 main: index.js diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 5f7320e74e..b63632a657 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -10,10 +10,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Use Node.js LTS - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: lts/* diff --git a/.github/workflows/auto-comment.yml b/.github/workflows/auto-comment.yml index f0305131d7..143a7557e2 100644 --- a/.github/workflows/auto-comment.yml +++ b/.github/workflows/auto-comment.yml @@ -9,7 +9,7 @@ jobs: name: Process Label Action runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Process Label Action uses: hramos/respond-to-issue-based-on-label@v2 diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 26aef488a9..1de582838f 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d30952f840..0a7442e241 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 6ef66b00d2..c8bc6ff45a 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -23,16 +23,16 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 persist-credentials: false ref: ${{ github.ref }} - name: Use Node.js LTS - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '16.x' + node-version: '18.x' - name: Install Yarn and Lerna run: npm install -g yarn lerna@6 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9fa9a04b67..ce39da6493 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,10 +10,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Use Node.js LTS - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: lts/* diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 9fcab36a71..e5a6f0a46e 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -10,7 +10,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v8 + - uses: actions/stale@v9 with: any-of-issue-labels: "needs more info, pending closure" close-issue-message: > diff --git a/.github/workflows/theia-zowe-explorer-ci.yml b/.github/workflows/theia-zowe-explorer-ci.yml index d72828a776..b512c387ec 100644 --- a/.github/workflows/theia-zowe-explorer-ci.yml +++ b/.github/workflows/theia-zowe-explorer-ci.yml @@ -26,7 +26,7 @@ jobs: steps: # check out source - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # install dependencies - run: yarn install --frozen-lockfile @@ -77,7 +77,7 @@ jobs: - name: Upload test results if: success() || failure() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: theia-zowe-explorer-results path: packages/zowe-explorer/results/ diff --git a/.github/workflows/zowe-explorer-ci.yml b/.github/workflows/zowe-explorer-ci.yml index 2fa4a1799d..dcad17bb1f 100644 --- a/.github/workflows/zowe-explorer-ci.yml +++ b/.github/workflows/zowe-explorer-ci.yml @@ -32,10 +32,10 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} @@ -50,21 +50,21 @@ jobs: NODE_OPTIONS: --max_old_space_size=4096 - name: Upload test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x' with: name: zowe-explorer-results path: packages/zowe-explorer/results/ - name: Upload API test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x' with: name: zowe-explorer-api-results path: packages/zowe-explorer-api/results/ - name: Upload Results to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: env_vars: OS,NODE @@ -75,7 +75,7 @@ jobs: - name: Archive VSIX artifact if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: zowe-explorer-vsix path: dist/*.vsix diff --git a/.github/workflows/zowe-explorer-ftp-ci.yml b/.github/workflows/zowe-explorer-ftp-ci.yml index a1125bdd73..f6ef717b02 100644 --- a/.github/workflows/zowe-explorer-ftp-ci.yml +++ b/.github/workflows/zowe-explorer-ftp-ci.yml @@ -32,10 +32,10 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} @@ -50,7 +50,7 @@ jobs: NODE_OPTIONS: --max_old_space_size=4096 - name: Upload test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x' with: name: zowe-explorer-ftp-extension-results @@ -70,7 +70,7 @@ jobs: - name: Archive VSIX artifact if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: zowe-explorer-ftp-extension-vsix path: dist/*.vsix diff --git a/.github/workflows/zowe-explorer-samples.yml b/.github/workflows/zowe-explorer-samples.yml index d18ad85f9f..d0873b372e 100644 --- a/.github/workflows/zowe-explorer-samples.yml +++ b/.github/workflows/zowe-explorer-samples.yml @@ -31,10 +31,10 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} From 1457751935035577cb0448141b977806d1f69a52 Mon Sep 17 00:00:00 2001 From: "Andrew W. Harn" Date: Fri, 2 Feb 2024 16:16:05 +0000 Subject: [PATCH 29/71] Add missing CodeCov token Signed-off-by: Andrew W. Harn --- .github/workflows/zowe-explorer-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/zowe-explorer-ci.yml b/.github/workflows/zowe-explorer-ci.yml index dcad17bb1f..eed9aabdac 100644 --- a/.github/workflows/zowe-explorer-ci.yml +++ b/.github/workflows/zowe-explorer-ci.yml @@ -67,6 +67,7 @@ jobs: uses: codecov/codecov-action@v4 with: env_vars: OS,NODE + token: ${{ secrets.CODECOV_TOKEN }} - name: Package VSIX if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x' From d108ce8cb7e174d16649da98584258e57f72a5d1 Mon Sep 17 00:00:00 2001 From: "Andrew W. Harn" Date: Fri, 2 Feb 2024 19:44:36 +0000 Subject: [PATCH 30/71] Use maintained label action Signed-off-by: Andrew W. Harn --- .github/workflows/auto-comment.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto-comment.yml b/.github/workflows/auto-comment.yml index 143a7557e2..713524003b 100644 --- a/.github/workflows/auto-comment.yml +++ b/.github/workflows/auto-comment.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v4 - name: Process Label Action - uses: hramos/respond-to-issue-based-on-label@v2 + uses: dessant/label-actions@v4 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - configuration-path: '.github/label-actions.yml' + github-token: ${{ secrets.GITHUB_TOKEN }} + config-path: '.github/label-actions.yml' From af809ca81b1f5555b9e5928de17f14611d65ceb3 Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Wed, 7 Feb 2024 09:07:40 -0500 Subject: [PATCH 31/71] fix: include protocol when building zosmf session object Signed-off-by: Trae Yelovich --- packages/zowe-explorer-api/src/profiles/ZoweExplorerZosmfApi.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/zowe-explorer-api/src/profiles/ZoweExplorerZosmfApi.ts b/packages/zowe-explorer-api/src/profiles/ZoweExplorerZosmfApi.ts index 1075472f49..9d196583a5 100644 --- a/packages/zowe-explorer-api/src/profiles/ZoweExplorerZosmfApi.ts +++ b/packages/zowe-explorer-api/src/profiles/ZoweExplorerZosmfApi.ts @@ -53,6 +53,7 @@ class ZosmfApiCommon implements ZoweExplorerApi.ICommon { _: [""], host: serviceProfile.profile.host as string, port: serviceProfile.profile.port as number, + protocol: serviceProfile.profile.protocol as string, basePath: serviceProfile.profile.basePath as string, rejectUnauthorized: serviceProfile.profile.rejectUnauthorized as boolean, }; From 9bd3fd1d8aff9a951fee62b9d26e1e116990f11d Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Wed, 7 Feb 2024 10:03:32 -0500 Subject: [PATCH 32/71] test(zosmf): _getSession returns protocol in session object Signed-off-by: Trae Yelovich --- .../ZoweExplorerZosmfApi.unit.test.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/packages/zowe-explorer-api/__tests__/__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts b/packages/zowe-explorer-api/__tests__/__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts index f700d6df52..a489d5a7f8 100644 --- a/packages/zowe-explorer-api/__tests__/__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts +++ b/packages/zowe-explorer-api/__tests__/__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts @@ -57,6 +57,26 @@ describe("ZosmfUssApi", () => { jest.clearAllMocks(); }); + describe("_getSession", () => { + const exampleProfile = { + message: "", + type: "zosmf", + failNotFound: false, + name: "test.zosmf", + profile: { + host: "localhost", + password: "password", + protocol: "http", + user: "aZosmfUser", + }, + } as zowe.imperative.IProfileLoaded; + + it("should include protocol in the built session object", () => { + const api = new ZosmfUssApi(); + expect((api as any)._getSession(exampleProfile).mISession.protocol).toBe("http"); + }); + }); + describe("updateAttributes", () => { const ussApi = new ZosmfUssApi(); const getSessionMock = jest.spyOn(ussApi, "getSession").mockReturnValue(fakeSession); From 3dec34026c2234c3686fbfa12dfc47caad65af8b Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Wed, 7 Feb 2024 10:11:21 -0500 Subject: [PATCH 33/71] chore: add #2703 to API changelog Signed-off-by: Trae Yelovich --- packages/zowe-explorer-api/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/zowe-explorer-api/CHANGELOG.md b/packages/zowe-explorer-api/CHANGELOG.md index 12836812c6..9ab0a83261 100644 --- a/packages/zowe-explorer-api/CHANGELOG.md +++ b/packages/zowe-explorer-api/CHANGELOG.md @@ -8,6 +8,8 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t ### Bug fixes +- Fixed issue where `zosmf` profiles did not respect the `protocol` property [#2703](https://github.com/zowe/vscode-extension-for-zowe/issues/2703). + ## `2.14.0` ### New features and enhancements From 8161eed0ee5f2eb97123e93a8d65eed62e75bdad Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Thu, 8 Feb 2024 19:11:27 +0530 Subject: [PATCH 34/71] Sorting of PDS members by date created Signed-off-by: Santhoshi Boyina --- .../src/tree/IZoweTreeNode.ts | 2 + .../zowe-explorer-api/src/tree/sorting.ts | 1 + .../__unit__/dataset/DatasetTree.unit.test.ts | 45 +++++++++++++++++-- .../i18n/sample/src/dataset/utils.i18n.json | 1 + .../src/dataset/ZoweDatasetNode.ts | 29 +++++++++++- packages/zowe-explorer/src/dataset/utils.ts | 1 + 6 files changed, 73 insertions(+), 6 deletions(-) diff --git a/packages/zowe-explorer-api/src/tree/IZoweTreeNode.ts b/packages/zowe-explorer-api/src/tree/IZoweTreeNode.ts index 9269c6f2d9..4ca5ab7f93 100644 --- a/packages/zowe-explorer-api/src/tree/IZoweTreeNode.ts +++ b/packages/zowe-explorer-api/src/tree/IZoweTreeNode.ts @@ -142,6 +142,8 @@ export interface IZoweTreeNode { export type DatasetStats = { user: string; + //built from "c4date" variable from the z/OSMF API response + createdDate: Date; // built from "m4date", "mtime" and "msec" variables from z/OSMF API response modifiedDate: Date; }; diff --git a/packages/zowe-explorer-api/src/tree/sorting.ts b/packages/zowe-explorer-api/src/tree/sorting.ts index cefcf68eb0..d26eccad7f 100644 --- a/packages/zowe-explorer-api/src/tree/sorting.ts +++ b/packages/zowe-explorer-api/src/tree/sorting.ts @@ -11,6 +11,7 @@ export enum DatasetSortOpts { Name, + DateCreated, LastModified, UserId, } diff --git a/packages/zowe-explorer/__tests__/__unit__/dataset/DatasetTree.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/dataset/DatasetTree.unit.test.ts index f7c38b97ab..0b8f1138e5 100644 --- a/packages/zowe-explorer/__tests__/__unit__/dataset/DatasetTree.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/dataset/DatasetTree.unit.test.ts @@ -2965,21 +2965,21 @@ describe("Dataset Tree Unit Tests - Sorting and Filtering operations", () => { parentNode: pds, session: createISession(), }); - nodeA.stats = { user: "someUser", modifiedDate: new Date() }; + nodeA.stats = { user: "someUser", createdDate: new Date(), modifiedDate: new Date() }; const nodeB = new ZoweDatasetNode({ label: "B", collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, parentNode: pds, session: createISession(), }); - nodeB.stats = { user: "anotherUser", modifiedDate: new Date("2022-01-01T12:00:00") }; + nodeB.stats = { user: "anotherUser", createdDate: new Date("2021-01-01T12:00:00"), modifiedDate: new Date("2022-01-01T12:00:00") }; const nodeC = new ZoweDatasetNode({ label: "C", collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, parentNode: pds, session: createISession(), }); - nodeC.stats = { user: "someUser", modifiedDate: new Date("2022-03-15T16:30:00") }; + nodeC.stats = { user: "someUser", createdDate: new Date("2022-02-01T12:00:00"), modifiedDate: new Date("2022-03-15T16:30:00") }; pds.children = [nodeA, nodeB, nodeC]; pds.sort = { method: DatasetSortOpts.Name, @@ -3044,6 +3044,43 @@ describe("Dataset Tree Unit Tests - Sorting and Filtering operations", () => { expect(nodes.pds.children?.reduce((val, cur) => val + (cur.description as string), "")).toBe(""); }); + it("sorts by created date", async () => { + const mocks = getBlockMocks(); + const nodes = nodesForSuite(); + nodes.pds.sort = { + method: DatasetSortOpts.Name, + direction: SortDirection.Descending, + }; + mocks.showQuickPick.mockResolvedValueOnce({ label: "$(calendar) Date Created" }); + await tree.sortPdsMembersDialog(nodes.pds); + expect(mocks.nodeDataChanged).toHaveBeenCalled(); + expect(mocks.refreshElement).not.toHaveBeenCalled(); + expect(nodes.pds.children?.map((c: IZoweDatasetTreeNode) => c.label)).toStrictEqual(["A", "C", "B"]); + }); + + it("sorts by created date: handling 2 nodes with same date", async () => { + const mocks = getBlockMocks(); + const nodes = nodesForSuite(); + nodes.pds.sort = { + method: DatasetSortOpts.Name, + direction: SortDirection.Descending, + }; + mocks.showQuickPick.mockResolvedValueOnce({ label: "$(calendar) Date Created" }); + // insert node with same date modified + const nodeD = new ZoweDatasetNode({ + label: "D", + collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, + parentNode: nodes.pds, + session: createISession(), + }); + nodeD.stats = { user: "someUser", createdDate: new Date("2021-01-01T12:00:00"), modifiedDate: new Date("2022-03-15T16:30:00") }; + nodes.pds.children = [...(nodes.pds.children ?? []), nodeD]; + await tree.sortPdsMembersDialog(nodes.pds); + expect(mocks.nodeDataChanged).toHaveBeenCalled(); + expect(mocks.refreshElement).not.toHaveBeenCalled(); + expect(nodes.pds.children?.map((c: IZoweDatasetTreeNode) => c.label)).toStrictEqual(["A", "C", "D", "B"]); + }); + it("sorts by last modified date", async () => { const mocks = getBlockMocks(); const nodes = nodesForSuite(); @@ -3067,7 +3104,7 @@ describe("Dataset Tree Unit Tests - Sorting and Filtering operations", () => { parentNode: nodes.pds, session: createISession(), }); - nodeD.stats = { user: "someUser", modifiedDate: new Date("2022-03-15T16:30:00") }; + nodeD.stats = { user: "someUser", createdDate: new Date("2021-01-01T12:00:00"), modifiedDate: new Date("2022-03-15T16:30:00") }; nodes.pds.children = [...(nodes.pds.children ?? []), nodeD]; await tree.sortPdsMembersDialog(nodes.pds); expect(mocks.nodeDataChanged).toHaveBeenCalled(); diff --git a/packages/zowe-explorer/i18n/sample/src/dataset/utils.i18n.json b/packages/zowe-explorer/i18n/sample/src/dataset/utils.i18n.json index 0aad47e3d5..bd75327e2b 100644 --- a/packages/zowe-explorer/i18n/sample/src/dataset/utils.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/dataset/utils.i18n.json @@ -1,5 +1,6 @@ { "ds.sortByName": "$(case-sensitive) Name (default)", + "ds.sortByDateCreated": "$(calendar) Date Created", "ds.sortByModified": "$(calendar) Date Modified", "ds.sortByUserId": "$(account) User ID", "setSortDirection": "$(fold) Sort Direction" diff --git a/packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts b/packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts index 64b949d20f..683f889007 100644 --- a/packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts +++ b/packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts @@ -112,16 +112,18 @@ export class ZoweDatasetNode extends ZoweTreeNode implements IZoweDatasetTreeNod } public updateStats(item: any): void { - if ("m4date" in item) { + if ("c4date" in item || "m4date" in item) { const { m4date, mtime, msec }: { m4date: string; mtime: string; msec: string } = item; this.stats = { user: item.user, + createdDate: dayjs(item.c4date).toDate(), modifiedDate: dayjs(`${m4date} ${mtime}:${msec}`).toDate(), }; } else if ("id" in item || "changed" in item) { // missing keys from API response; check for FTP keys this.stats = { user: item.id, + createdDate: item.created ? dayjs(item.created).toDate() : undefined, modifiedDate: item.changed ? dayjs(item.changed).toDate() : undefined, }; } @@ -326,7 +328,30 @@ export class ZoweDatasetNode extends ZoweTreeNode implements IZoweDatasetTreeNod return sortByName(a, b); } - if (sort.method === DatasetSortOpts.LastModified) { + if (sort.method === DatasetSortOpts.DateCreated) { + const dateA = dayjs(a.stats?.createdDate ?? null); + const dateB = dayjs(b.stats?.createdDate ?? null); + + const aVaild = dateA.isValid(); + const bValid = dateB.isValid(); + + a.description = aVaild ? dateA.format("YYYY/MM/DD") : undefined; + b.description = bValid ? dateB.format("YYYY/MM/DD") : undefined; + + if (!aVaild) { + return sortGreaterThan; + } + + if (!bValid) { + return sortLessThan; + } + + if (dateA.isSame(dateB, "second")) { + return sortByName(a, b); + } + + return dateA.isBefore(dateB, "second") ? sortLessThan : sortGreaterThan; + } else if (sort.method === DatasetSortOpts.LastModified) { const dateA = dayjs(a.stats?.modifiedDate ?? null); const dateB = dayjs(b.stats?.modifiedDate ?? null); diff --git a/packages/zowe-explorer/src/dataset/utils.ts b/packages/zowe-explorer/src/dataset/utils.ts index 956ae28f31..020f43c54f 100644 --- a/packages/zowe-explorer/src/dataset/utils.ts +++ b/packages/zowe-explorer/src/dataset/utils.ts @@ -23,6 +23,7 @@ const localize: nls.LocalizeFunc = nls.loadMessageBundle(); export const DATASET_SORT_OPTS = [ localize("ds.sortByName", "$(case-sensitive) Name (default)"), + localize("ds.sortByDateCreated", "$(calendar) Date Created"), localize("ds.sortByModified", "$(calendar) Date Modified"), localize("ds.sortByUserId", "$(account) User ID"), localize("setSortDirection", "$(fold) Sort Direction"), From 69e5bf2c764da9515912279a0d331c2bcc953b91 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Thu, 8 Feb 2024 22:36:50 +0530 Subject: [PATCH 35/71] Updated changelog and improved code coverage Signed-off-by: Santhoshi Boyina --- packages/zowe-explorer-api/CHANGELOG.md | 2 ++ packages/zowe-explorer/CHANGELOG.md | 1 + .../__unit__/dataset/DatasetTree.unit.test.ts | 20 ++++++++++++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/packages/zowe-explorer-api/CHANGELOG.md b/packages/zowe-explorer-api/CHANGELOG.md index 12836812c6..e88f2f29ef 100644 --- a/packages/zowe-explorer-api/CHANGELOG.md +++ b/packages/zowe-explorer-api/CHANGELOG.md @@ -20,6 +20,8 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t - Added new functions `loginWithBaseProfile` and `logoutWithBaseProfile` to provide extenders with the ability to automatically login to their respective services. [#2493](https://github.com/zowe/vscode-extension-for-zowe/pull/2493) - Added APIML dynamic token support. [#2665](https://github.com/zowe/vscode-extension-for-zowe/issues/2665) - Added new optional method `getCommonApi` to `ZoweExplorerApi.IApiRegisterClient` for enhanced typings in other Zowe Explorer APIs. [#2493](https://github.com/zowe/vscode-extension-for-zowe/pull/2493) +- Add Created Date to `stats` optional variable for storing dataset stats +- Add Date created to DatasetSortOpts enum [#2707](https://github.com/zowe/vscode-extension-for-zowe/pull/2707) ### Bug fixes diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index 48d59b9065..d4f6c48af7 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -19,6 +19,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen - Adopted new common methods for `loginWithBaseProfile` and `logoutWithBaseProfile`. [#2493](https://github.com/zowe/vscode-extension-for-zowe/pull/2493) - Added APIML dynamic token support. [#2665](https://github.com/zowe/vscode-extension-for-zowe/issues/2665) - Implemented profile determination without triggering quick pick for `Submit JCL` if the file is part of Zowe Explorer's temp files. [#2628](https://github.com/zowe/vscode-extension-for-zowe/issues/2628) +- Implemented sorting of PDS members by date created [#2707](https://github.com/zowe/vscode-extension-for-zowe/pull/2707) ### Bug fixes diff --git a/packages/zowe-explorer/__tests__/__unit__/dataset/DatasetTree.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/dataset/DatasetTree.unit.test.ts index 0b8f1138e5..c3c9710e8e 100644 --- a/packages/zowe-explorer/__tests__/__unit__/dataset/DatasetTree.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/dataset/DatasetTree.unit.test.ts @@ -3065,7 +3065,6 @@ describe("Dataset Tree Unit Tests - Sorting and Filtering operations", () => { method: DatasetSortOpts.Name, direction: SortDirection.Descending, }; - mocks.showQuickPick.mockResolvedValueOnce({ label: "$(calendar) Date Created" }); // insert node with same date modified const nodeD = new ZoweDatasetNode({ label: "D", @@ -3075,12 +3074,31 @@ describe("Dataset Tree Unit Tests - Sorting and Filtering operations", () => { }); nodeD.stats = { user: "someUser", createdDate: new Date("2021-01-01T12:00:00"), modifiedDate: new Date("2022-03-15T16:30:00") }; nodes.pds.children = [...(nodes.pds.children ?? []), nodeD]; + mocks.showQuickPick.mockResolvedValueOnce({ label: "$(calendar) Date Created" }); await tree.sortPdsMembersDialog(nodes.pds); expect(mocks.nodeDataChanged).toHaveBeenCalled(); expect(mocks.refreshElement).not.toHaveBeenCalled(); expect(nodes.pds.children?.map((c: IZoweDatasetTreeNode) => c.label)).toStrictEqual(["A", "C", "D", "B"]); }); + it("sorts by created date: handling a invalid date", async () => { + const mocks = getBlockMocks(); + const nodes = nodesForSuite(); + // insert node with same date modified + const nodeD = new ZoweDatasetNode({ + label: "D", + collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, + parentNode: nodes.pds, + session: createISession(), + }); + nodeD.stats = { user: "someUser", createdDate: new Date("not a valid date"), modifiedDate: new Date("2022-03-15T16:30:00") }; + nodes.pds.children = [...(nodes.pds.children ?? []), nodeD]; + mocks.showQuickPick.mockResolvedValueOnce({ label: "$(calendar) Date Created" }); + await tree.sortPdsMembersDialog(nodes.pds); + expect(mocks.nodeDataChanged).toHaveBeenCalled(); + expect(mocks.refreshElement).not.toHaveBeenCalled(); + }); + it("sorts by last modified date", async () => { const mocks = getBlockMocks(); const nodes = nodesForSuite(); From 1a78949acca66ff93503953798ba576d7dca359f Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Thu, 8 Feb 2024 16:33:16 -0500 Subject: [PATCH 36/71] refactor: make test more comprehensive for profile properties Signed-off-by: Trae Yelovich --- .../__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/zowe-explorer-api/__tests__/__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts b/packages/zowe-explorer-api/__tests__/__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts index a489d5a7f8..bcd9645401 100644 --- a/packages/zowe-explorer-api/__tests__/__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts +++ b/packages/zowe-explorer-api/__tests__/__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts @@ -71,9 +71,12 @@ describe("ZosmfUssApi", () => { }, } as zowe.imperative.IProfileLoaded; - it("should include protocol in the built session object", () => { + it("should include profile properties in the built session object", () => { const api = new ZosmfUssApi(); - expect((api as any)._getSession(exampleProfile).mISession.protocol).toBe("http"); + + const transformedProps = { ...exampleProfile.profile, hostname: exampleProfile.profile?.host }; + delete transformedProps["host"]; + expect((api as any)._getSession(exampleProfile).mISession).toMatchObject(transformedProps); }); }); From 8fd12f21e954711b29918113f63687d34dcf3628 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Fri, 9 Feb 2024 14:13:00 +0530 Subject: [PATCH 37/71] improve code format Signed-off-by: Santhoshi Boyina --- .../src/dataset/ZoweDatasetNode.ts | 91 ++++++++++--------- 1 file changed, 48 insertions(+), 43 deletions(-) diff --git a/packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts b/packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts index 683f889007..b92f016a19 100644 --- a/packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts +++ b/packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts @@ -328,68 +328,73 @@ export class ZoweDatasetNode extends ZoweTreeNode implements IZoweDatasetTreeNod return sortByName(a, b); } - if (sort.method === DatasetSortOpts.DateCreated) { - const dateA = dayjs(a.stats?.createdDate ?? null); - const dateB = dayjs(b.stats?.createdDate ?? null); + switch (sort.method) { + case DatasetSortOpts.DateCreated: { + const dateA = dayjs(a.stats?.createdDate ?? null); + const dateB = dayjs(b.stats?.createdDate ?? null); - const aVaild = dateA.isValid(); - const bValid = dateB.isValid(); + const aVaild = dateA.isValid(); + const bValid = dateB.isValid(); - a.description = aVaild ? dateA.format("YYYY/MM/DD") : undefined; - b.description = bValid ? dateB.format("YYYY/MM/DD") : undefined; + a.description = aVaild ? dateA.format("YYYY/MM/DD") : undefined; + b.description = bValid ? dateB.format("YYYY/MM/DD") : undefined; - if (!aVaild) { - return sortGreaterThan; - } + if (!aVaild) { + return sortGreaterThan; + } - if (!bValid) { - return sortLessThan; - } + if (!bValid) { + return sortLessThan; + } - if (dateA.isSame(dateB, "second")) { - return sortByName(a, b); + if (dateA.isSame(dateB, "second")) { + return sortByName(a, b); + } + + return dateA.isBefore(dateB, "second") ? sortLessThan : sortGreaterThan; } + case DatasetSortOpts.LastModified: { + const dateA = dayjs(a.stats?.modifiedDate ?? null); + const dateB = dayjs(b.stats?.modifiedDate ?? null); - return dateA.isBefore(dateB, "second") ? sortLessThan : sortGreaterThan; - } else if (sort.method === DatasetSortOpts.LastModified) { - const dateA = dayjs(a.stats?.modifiedDate ?? null); - const dateB = dayjs(b.stats?.modifiedDate ?? null); + const aValid = dateA.isValid(); + const bValid = dateB.isValid(); - const aValid = dateA.isValid(); - const bValid = dateB.isValid(); + a.description = aValid ? dateA.format("YYYY/MM/DD HH:mm:ss") : undefined; + b.description = bValid ? dateB.format("YYYY/MM/DD HH:mm:ss") : undefined; - a.description = aValid ? dateA.format("YYYY/MM/DD HH:mm:ss") : undefined; - b.description = bValid ? dateB.format("YYYY/MM/DD HH:mm:ss") : undefined; + if (!aValid) { + return sortGreaterThan; + } - if (!aValid) { - return sortGreaterThan; - } + if (!bValid) { + return sortLessThan; + } - if (!bValid) { - return sortLessThan; - } + // for dates that are equal down to the second, fallback to sorting by name + if (dateA.isSame(dateB, "second")) { + return sortByName(a, b); + } - // for dates that are equal down to the second, fallback to sorting by name - if (dateA.isSame(dateB, "second")) { - return sortByName(a, b); + return dateA.isBefore(dateB, "second") ? sortLessThan : sortGreaterThan; } + case DatasetSortOpts.UserId: { + const userA = a.stats?.user ?? ""; + const userB = b.stats?.user ?? ""; - return dateA.isBefore(dateB, "second") ? sortLessThan : sortGreaterThan; - } else if (sort.method === DatasetSortOpts.UserId) { - const userA = a.stats?.user ?? ""; - const userB = b.stats?.user ?? ""; + a.description = userA; + b.description = userB; - a.description = userA; - b.description = userB; + if (userA === userB) { + return sortByName(a, b); + } - if (userA === userB) { + return userA < userB ? sortLessThan : sortGreaterThan; + } + default: { return sortByName(a, b); } - - return userA < userB ? sortLessThan : sortGreaterThan; } - - return sortByName(a, b); }; } From d54b26331faca85f334107834f814f9d7dfc8ca1 Mon Sep 17 00:00:00 2001 From: zFernand0 <37381190+zFernand0@users.noreply.github.com> Date: Mon, 12 Feb 2024 20:52:04 +0000 Subject: [PATCH 38/71] Update FTP plug-in version Resolves #2533 Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> --- .../zowe-explorer-ftp-extension/package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/zowe-explorer-ftp-extension/package.json b/packages/zowe-explorer-ftp-extension/package.json index b1067633b4..4de14369c9 100644 --- a/packages/zowe-explorer-ftp-extension/package.json +++ b/packages/zowe-explorer-ftp-extension/package.json @@ -47,7 +47,7 @@ "vscode": "^1.53.2" }, "dependencies": { - "@zowe/zos-ftp-for-zowe-cli": "2.1.2", + "@zowe/zos-ftp-for-zowe-cli": "2.1.8", "@zowe/zowe-explorer-api": "2.15.0-SNAPSHOT", "tmp": "0.2.1" }, diff --git a/yarn.lock b/yarn.lock index 0c663746b8..52663a70a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2741,12 +2741,12 @@ get-stream "6.0.1" minimatch "5.0.1" -"@zowe/zos-ftp-for-zowe-cli@2.1.2": - version "2.1.2" - resolved "https://registry.npmjs.org/@zowe/zos-ftp-for-zowe-cli/-/zos-ftp-for-zowe-cli-2.1.2.tgz" - integrity sha512-YWojS16Vr79tNV+3Rm9mfNwTYISCDvQ3NUSiQ3WajNrJ4GEmEnsB1RRSpUwb7CSmpbVlbs5n2JUY3jL8u30tlg== +"@zowe/zos-ftp-for-zowe-cli@2.1.8": + version "2.1.8" + resolved "https://registry.npmjs.org/@zowe/zos-ftp-for-zowe-cli/-/zos-ftp-for-zowe-cli-2.1.8.tgz#887aea58f12e5cea880d5829b93a0c8c33fd20a8" + integrity sha512-TDLiECMYQsmD5R7ndUnt2cft49Xd8zkXdkZenhRpowTvOTsrZYYj85JfIcwBglrjGER8APAfWH0+lSfTqCkOhw== dependencies: - zos-node-accessor "1.0.14" + zos-node-accessor "1.0.16" "@zowe/zos-jobs-for-zowe-sdk@7.22.0": version "7.22.0" @@ -12260,10 +12260,10 @@ yocto-queue@^0.1.0: resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -zos-node-accessor@1.0.14: - version "1.0.14" - resolved "https://registry.npmjs.org/zos-node-accessor/-/zos-node-accessor-1.0.14.tgz" - integrity sha512-+DXcOSBcixulEGPXVEn8ktXZqIP/eSzrQLO8daIELcak1zP89z7rdFRhMcKmEXk11PLq2wcoDzzIq3KPSHBLiA== +zos-node-accessor@1.0.16: + version "1.0.16" + resolved "https://registry.npmjs.org/zos-node-accessor/-/zos-node-accessor-1.0.16.tgz#4011410efe6c5924c7a1ea84d950c80031eafafc" + integrity sha512-7IsneaFw7sryn2ovopz4lr3W57LRXZ3p4tEdnRLSJav3xYY7qkbnfV5nni5kdWusd2rLaArf4omZY1O/LD4lhA== dependencies: debug "3.1.0" ftp4 "~0.3.13" From 31df2e3e84c6f9ff4f9fcd9bb9f46b6472668585 Mon Sep 17 00:00:00 2001 From: zFernand0 <37381190+zFernand0@users.noreply.github.com> Date: Mon, 12 Feb 2024 21:10:06 +0000 Subject: [PATCH 39/71] update changelog :yum: Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> --- packages/zowe-explorer-ftp-extension/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/zowe-explorer-ftp-extension/CHANGELOG.md b/packages/zowe-explorer-ftp-extension/CHANGELOG.md index ff1df64dfb..63d79151d4 100644 --- a/packages/zowe-explorer-ftp-extension/CHANGELOG.md +++ b/packages/zowe-explorer-ftp-extension/CHANGELOG.md @@ -6,6 +6,8 @@ All notable changes to the "zowe-explorer-ftp-extension" extension will be docum ### Bug fixes +- Fix Windows-specific hangs when saving members that contain JCL via the FTP extension. Thanks @tiantn & @std4lqi. [#2533](https://github.com/zowe/vscode-extension-for-zowe/issues/2533) + ## `2.14.0` ## `2.13.1` From fe2216b6b44707d9b952371eae347c8a6f434b6f Mon Sep 17 00:00:00 2001 From: zFernand0 <37381190+zFernand0@users.noreply.github.com> Date: Tue, 13 Feb 2024 14:17:36 +0000 Subject: [PATCH 40/71] update transitive deps Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> --- package.json | 2 +- packages/zowe-explorer-api/package.json | 2 +- yarn.lock | 187 ++++++++++++------------ 3 files changed, 96 insertions(+), 95 deletions(-) diff --git a/package.json b/package.json index 3f84c91a57..39bb850bcd 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "vscode": "^1.53.2" }, "dependencies": { - "@zowe/cli": "7.22.0", + "@zowe/cli": "7.23.2", "vscode-nls": "4.1.2" }, "devDependencies": { diff --git a/packages/zowe-explorer-api/package.json b/packages/zowe-explorer-api/package.json index d2e041fb11..372d372c8b 100644 --- a/packages/zowe-explorer-api/package.json +++ b/packages/zowe-explorer-api/package.json @@ -18,7 +18,7 @@ }, "dependencies": { "@types/vscode": "^1.53.2", - "@zowe/cli": "7.22.0", + "@zowe/cli": "7.23.2", "@zowe/secrets-for-zowe-sdk": "7.18.6", "handlebars": "^4.7.7", "semver": "^7.5.3" diff --git a/yarn.lock b/yarn.lock index 52663a70a9..c78dc90510 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2642,22 +2642,22 @@ resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -"@zowe/cli@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.22.0.tgz#63e648337a1d61aad017748acca7468dc3940a24" - integrity sha512-Z+9403u7pPpge+WHAuuMqwSBaWNC+3qw0eL5aIVPgnvGPpQWWN0sL5mOaDo117GN9I1p8ee7tWqwrcll55tP0w== - dependencies: - "@zowe/core-for-zowe-sdk" "7.22.0" - "@zowe/imperative" "5.21.0" - "@zowe/provisioning-for-zowe-sdk" "7.22.0" - "@zowe/zos-console-for-zowe-sdk" "7.22.0" - "@zowe/zos-files-for-zowe-sdk" "7.22.0" - "@zowe/zos-jobs-for-zowe-sdk" "7.22.0" - "@zowe/zos-logs-for-zowe-sdk" "7.22.0" - "@zowe/zos-tso-for-zowe-sdk" "7.22.0" - "@zowe/zos-uss-for-zowe-sdk" "7.22.0" - "@zowe/zos-workflows-for-zowe-sdk" "7.22.0" - "@zowe/zosmf-for-zowe-sdk" "7.22.0" +"@zowe/cli@7.23.2": + version "7.23.2" + resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.23.2.tgz#3cf9ae358b41b1a50f14c735643879d377e73ed9" + integrity sha512-47FrE6bVDoksiziy8SSsZKLf5EUM5JbiU/hwbOBEyX0l+GzIt2GKmnt+dir5fQmU+dibtexSh9ZJwK8l6JyEHA== + dependencies: + "@zowe/core-for-zowe-sdk" "7.23.2" + "@zowe/imperative" "5.22.2" + "@zowe/provisioning-for-zowe-sdk" "7.23.2" + "@zowe/zos-console-for-zowe-sdk" "7.23.2" + "@zowe/zos-files-for-zowe-sdk" "7.23.2" + "@zowe/zos-jobs-for-zowe-sdk" "7.23.2" + "@zowe/zos-logs-for-zowe-sdk" "7.23.2" + "@zowe/zos-tso-for-zowe-sdk" "7.23.2" + "@zowe/zos-uss-for-zowe-sdk" "7.23.2" + "@zowe/zos-workflows-for-zowe-sdk" "7.23.2" + "@zowe/zosmf-for-zowe-sdk" "7.23.2" find-process "1.4.7" get-stream "6.0.1" lodash "4.17.21" @@ -2666,18 +2666,18 @@ optionalDependencies: "@zowe/secrets-for-zowe-sdk" "7.18.6" -"@zowe/core-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.22.0.tgz#ae271ee84e52f48b5508b74affb5f9aa5d4adbdf" - integrity sha512-uLkbxn0KvI6MiSZ8Y0SZRFJhvDarwhlvvW/oiSjIyNHeNtuTb31s5eYLTCdvX585om98wyVEKwYWK3ITzQ6w6g== +"@zowe/core-for-zowe-sdk@7.23.2": + version "7.23.2" + resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.23.2.tgz#2585bdc696e4a07ee148f12398010db7e678e73a" + integrity sha512-hK+wmlsbOZoez8mwUZ97/bSjBMtbycrL5RKWdNhRl87ULOSNdSQGNg/3SfMKXRotiaVBKiaX/7efSlNZGelCQA== dependencies: comment-json "4.1.1" string-width "4.2.3" -"@zowe/imperative@5.21.0": - version "5.21.0" - resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.21.0.tgz#52cd216bf04a15fe60fcc9fa4603dba0f8c59da2" - integrity sha512-yjt3Mmn1ItfZZK42SecH+2U5rSvKl6k4ZqPvFaQIvzfVwhOeXi3Srx6/ulxDhSPN0txPUgeyIxz+PHSPtN5Elw== +"@zowe/imperative@5.22.2": + version "5.22.2" + resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.22.2.tgz#6cdab2ed7b2e1ee9e64df6412f2d31babd225984" + integrity sha512-t1jeceOiVez9IsJE4PJkznlKNAiaSPuxBk13jgFidcjqBAKmp5IotrbM62QmdxGeUsO4GVTulGulH2MiMoYY7w== dependencies: "@types/yargs" "13.0.4" chalk "2.4.2" @@ -2695,12 +2695,12 @@ jest-diff "27.0.6" js-yaml "4.1.0" jsonfile "4.0.0" - jsonschema "1.1.1" + jsonschema "1.4.1" lodash "4.17.21" lodash-deep "2.0.0" log4js "6.4.6" markdown-it "12.3.2" - mustache "2.3.0" + mustache "4.2.0" npm-package-arg "9.1.0" opener "1.5.2" pacote "11.1.4" @@ -2708,7 +2708,7 @@ progress "2.0.3" read "1.0.7" readline-sync "1.4.10" - semver "7.5.2" + semver "7.5.4" stack-trace "0.0.10" strip-ansi "6.0.1" which "3.0.0" @@ -2716,10 +2716,10 @@ yamljs "0.3.0" yargs "15.3.1" -"@zowe/provisioning-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.22.0.tgz#01bcd2a182c219115779b3f3aeee65e2f846d349" - integrity sha512-5wX+qXxXL3WlmmS9rnDDZeUL4K4fuUAJ+8H+z8z0qv++ffZSJc36Jkmi/D5tX9FanmB0/kpCgeHqx1rWE/mYtA== +"@zowe/provisioning-for-zowe-sdk@7.23.2": + version "7.23.2" + resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.23.2.tgz#1d685cb24a10ec07297feed0b0dbe4af0e93f705" + integrity sha512-XLNwqIPD4WY2mqqNAFwNZGgN6HLUiF2u+1IQcuWoTKOM7/UTYz7fx2FN0nqJ5HSquf2CWDB4uCqteZXxq9reAQ== dependencies: js-yaml "4.1.0" @@ -2728,15 +2728,15 @@ resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.6.tgz#6b854b344babb291c26d19d82633099a46e08452" integrity sha512-YyS1NoXddb147mBQpu5/dTfo1gdwGa/xdg85U8KCngA+RHCmNct3n2rbK3tHx9C9H6rlgjeS+Mrux5Q+PHJUgQ== -"@zowe/zos-console-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.22.0.tgz#2088bee1963a9fa602df055a7078f63667a80f44" - integrity sha512-EI9rK76eq5kGXJqGkhobLMdNJstVUSswJ2JlNvGzwOQD/jV/7OJRHSHPllygMGaos8Rh14mzPDooeb9CBr5faA== +"@zowe/zos-console-for-zowe-sdk@7.23.2": + version "7.23.2" + resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.23.2.tgz#10ac3dd64fb843b4450fc0d798bc839f76517c06" + integrity sha512-cOQNPGHxmjKs/7eaxgzouizZexReTOPkEGUaKePfpvKdiVeDOc9E62zLccVmMAppvhWaHCDx3nFaRzjPzOlGkg== -"@zowe/zos-files-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.22.0.tgz#a692b09016c0350685cf085dc47cb9591fec11d3" - integrity sha512-jw1j9q77DTQgm5i0YuslN454zC4eS0qb5PnfZ1thCbUugLxI/LRR1CgV59rTfqMGHMjXyfmmqjtCot4NMLUV1A== +"@zowe/zos-files-for-zowe-sdk@7.23.2": + version "7.23.2" + resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.23.2.tgz#a25a40cf9d4975feca45c647b8cdb79f57e21e32" + integrity sha512-+veO0Y/8jB+binTuzo6LCo+CINKegx9qP8pDocEaW3N+6k5iRiQtQrQ2py6R2a/Gn44mNISsJMB2dDUOkwf4iA== dependencies: get-stream "6.0.1" minimatch "5.0.1" @@ -2748,43 +2748,43 @@ dependencies: zos-node-accessor "1.0.16" -"@zowe/zos-jobs-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.22.0.tgz#4447071d304bc8c6348c08bdd8f28e84213aa1ac" - integrity sha512-QdKjWgQV7uEvLhHED48TBmQ2EhKn8ZG9OVrZiAa82k0AIsps5U2Wv/W9M1PyWlCEWQP/Zok7PpRWi3Bbv010cQ== +"@zowe/zos-jobs-for-zowe-sdk@7.23.2": + version "7.23.2" + resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.23.2.tgz#3b5d50eba93abc2108239816473e678d0a57c29e" + integrity sha512-+igrJiicNizJtRWUklrkv0JebWpsQc1Pc9Q09EGZf1tWm7BV8nDkubO2is7tw/y9qg4VCUpC/x29dsuBvhFg+g== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.22.0" + "@zowe/zos-files-for-zowe-sdk" "7.23.2" -"@zowe/zos-logs-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.22.0.tgz#61500c48b76c2458243508d83137f221393ffb44" - integrity sha512-XA/ZH1LsdqE9vTA6GOlI3t6RsgA7hf+efImVltE9brVlFrrIgXCD46A9CVDl6bmkp/tFQqCdMYHjHFbWiwN4WA== +"@zowe/zos-logs-for-zowe-sdk@7.23.2": + version "7.23.2" + resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.23.2.tgz#50a3f65c087154a3bf6014d9b542085b8379bf6b" + integrity sha512-OR/PD8++UCNnAZu+LESeoBqr3pH4ThnzzNw+i7DjNyZ4EmFipxqfUH8MNWeYl5AYthfUsExEbp5dNmzxaArq7A== -"@zowe/zos-tso-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.22.0.tgz#38c0ba26bbcc6af0564911883e21bd9ad5c217e4" - integrity sha512-vzhKJUk6E/EHjH8BadCfpL45C40qmJxYlSHAIHitAtFcOkI4F7i13mlgulaxPCiTTV3jBw4g+JoJe8DwG1eiyA== +"@zowe/zos-tso-for-zowe-sdk@7.23.2": + version "7.23.2" + resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.23.2.tgz#39bc972f7bc2638c53db15eb4159aeef5a83003c" + integrity sha512-plrU0NqmbXgVtOEOcW6oYTS2XVV7xetZIAckocdTxeQLPF3wwujl+8aFyQgCHAmDUjpSM/ZrVwi/37nI8z4upQ== dependencies: - "@zowe/zosmf-for-zowe-sdk" "7.22.0" + "@zowe/zosmf-for-zowe-sdk" "7.23.2" -"@zowe/zos-uss-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.22.0.tgz#3b6bb8dedae1a6c4f367189cf6b3bdbab0aca822" - integrity sha512-c3yXBdBWW2I1WbkMvgmx/EMNEpxJmCRZ0gygjYd1xM//wWhPaigOVY5XSRTpnXS0UY6KOX9T7ZymlCe6XzAhEQ== +"@zowe/zos-uss-for-zowe-sdk@7.23.2": + version "7.23.2" + resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.23.2.tgz#5f1435487760a9b1e150ca5023c0acb5f201ebf4" + integrity sha512-9apRtX8vPo895/Mk+MI+pWmCkCO9YqVk0hiW/FOGRLFZkZ/jsmE+iUht7YCQi6/Nkcfw7HJlKOsSC4yr4JEiXA== dependencies: ssh2 "1.15.0" -"@zowe/zos-workflows-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.22.0.tgz#05537853832bcf2307a78907459fb43e59ca22ed" - integrity sha512-arM0gVpm0zM84JuIZSWTK+bCqu6gED0ubYJZAdI5ttsjSaiv+E4LM1OUkd05n0HCUGYeNrL30LEsswHUM7cqZA== +"@zowe/zos-workflows-for-zowe-sdk@7.23.2": + version "7.23.2" + resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.23.2.tgz#187d42d94e07098d94026b908e2d7bd6d66cedd7" + integrity sha512-Qm25VZvvz6Ryqfhf3I9vVEm4/TF/N/VfhwZZHESArBTqoW4G5NLjSGdzhgutWVQuR5FYjL+ctKEzGMdDmdzZxg== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.22.0" + "@zowe/zos-files-for-zowe-sdk" "7.23.2" -"@zowe/zosmf-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.22.0.tgz#cc87f28acf60b600eca5111d35ac8668aaec192a" - integrity sha512-D4nbTDr5uJxJev9+zNwbq/3Z3DuQR6qfmbofzDGYYaU1peFO7+ioFN+uAInFBS1jqj4iHko2KINJfPZFALg3/A== +"@zowe/zosmf-for-zowe-sdk@7.23.2": + version "7.23.2" + resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.23.2.tgz#93035e56dc063d6f8e2beab007fc4571fd497006" + integrity sha512-KDzemMnHl4Ii6jatLLP3q4bOkUsy1j7xTScZisr1ag+odD3vx2RhE80wSF7uxuUFZAboXapKFqtWul+J2bBCjQ== abab@^2.0.3, abab@^2.0.5: version "2.0.6" @@ -6561,10 +6561,13 @@ invert-kv@^1.0.0: resolved "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz" integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= -ip@^1.1.5: - version "1.1.5" - resolved "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz" - integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= +ip-address@^9.0.5: + version "9.0.5" + resolved "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" + integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== + dependencies: + jsbn "1.1.0" + sprintf-js "^1.1.3" is-absolute@^1.0.0: version "1.0.0" @@ -7561,6 +7564,11 @@ js2xmlparser@^4.0.2: dependencies: xmlcreate "^2.0.4" +jsbn@1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" + integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== + jsdoc@^3.6.3: version "3.6.10" resolved "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.10.tgz" @@ -7688,10 +7696,10 @@ jsonparse@^1.3.1: resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= -jsonschema@1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/jsonschema/-/jsonschema-1.1.1.tgz" - integrity sha1-PO3o4+QR03eHLu+8n98mODy8Ptk= +jsonschema@1.4.1: + version "1.4.1" + resolved "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" + integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== jszip@^3.1.3: version "3.9.1" @@ -8555,14 +8563,9 @@ multimatch@^2.0.0: arrify "^1.0.0" minimatch "^3.0.0" -mustache@2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/mustache/-/mustache-2.3.0.tgz" - integrity sha1-QCj3d4sXcIpImTCm5SrDvKDaQdA= - -mustache@^4.0.0: +mustache@4.2.0, mustache@^4.0.0: version "4.2.0" - resolved "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz" + resolved "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64" integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== mute-stdout@^1.0.0: @@ -10218,14 +10221,7 @@ semver@7.0.0: resolved "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@7.5.2: - version "7.5.2" - resolved "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz" - integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ== - dependencies: - lru-cache "^6.0.0" - -semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.0, semver@^7.5.3: +semver@7.5.4, semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.0, semver@^7.5.3: version "7.5.4" resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -10439,11 +10435,11 @@ socks-proxy-agent@^5.0.0: socks "^2.3.3" socks@^2.3.3: - version "2.6.2" - resolved "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz" - integrity sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA== + version "2.7.3" + resolved "https://registry.npmjs.org/socks/-/socks-2.7.3.tgz#7d8a75d7ce845c0a96f710917174dba0d543a785" + integrity sha512-vfuYK48HXCTFD03G/1/zkIls3Ebr2YNa4qU9gHDZdblHLiqhJrJGkY3+0Nx0JpN9qBhJbVObc1CNciT1bIZJxw== dependencies: - ip "^1.1.5" + ip-address "^9.0.5" smart-buffer "^4.2.0" source-list-map@^2.0.0: @@ -10553,6 +10549,11 @@ split@^1.0.1: dependencies: through "2" +sprintf-js@^1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" + integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" From 42db330d3c7942475cd088da014e6006f7113447 Mon Sep 17 00:00:00 2001 From: zFernand0 <37381190+zFernand0@users.noreply.github.com> Date: Tue, 13 Feb 2024 14:20:00 +0000 Subject: [PATCH 41/71] update changelog (again) Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> --- packages/zowe-explorer-api/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/zowe-explorer-api/CHANGELOG.md b/packages/zowe-explorer-api/CHANGELOG.md index 231f1e5b47..43bf707103 100644 --- a/packages/zowe-explorer-api/CHANGELOG.md +++ b/packages/zowe-explorer-api/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t ### Bug fixes - Fix login and logout operations when APIML dynamic tokens are enabled. [#2692](https://github.com/zowe/vscode-extension-for-zowe/pull/2692) +- Update transitive dependencies for technical currency. ## `2.14.0` From 2de995e4513d3af806b5883efb1cd211a0888438 Mon Sep 17 00:00:00 2001 From: zFernand0 <37381190+zFernand0@users.noreply.github.com> Date: Tue, 13 Feb 2024 14:22:29 +0000 Subject: [PATCH 42/71] forgot to update samples Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> --- samples/uss-profile-sample/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/uss-profile-sample/package.json b/samples/uss-profile-sample/package.json index 8ef06f49e9..9373659dc8 100644 --- a/samples/uss-profile-sample/package.json +++ b/samples/uss-profile-sample/package.json @@ -33,7 +33,7 @@ "watch": "tsc -watch -p ./" }, "dependencies": { - "@zowe/cli": "7.22.0", + "@zowe/cli": "7.23.2", "@zowe/zowe-explorer-api": "file:../../packages/zowe-explorer-api", "ssh2-sftp-client": "^9.1.0" }, From d6b0af1728ab7c484ad08e5181828acbed3e197d Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Tue, 13 Feb 2024 12:41:19 -0500 Subject: [PATCH 43/71] fix: SonarCloud medium and high-priority bugs Signed-off-by: Trae Yelovich --- .../zowe-explorer-api/src/utils/Poller.ts | 23 ++++++------------- .../src/ZoweExplorerFtpUssApi.ts | 1 - .../zowe-explorer/src/PersistentFilters.ts | 2 +- packages/zowe-explorer/src/dataset/actions.ts | 6 ++--- 4 files changed, 11 insertions(+), 21 deletions(-) diff --git a/packages/zowe-explorer-api/src/utils/Poller.ts b/packages/zowe-explorer-api/src/utils/Poller.ts index f042a2ccab..4b5155d426 100644 --- a/packages/zowe-explorer-api/src/utils/Poller.ts +++ b/packages/zowe-explorer-api/src/utils/Poller.ts @@ -25,49 +25,40 @@ export class Poller { public static pollRequests: { [key: string]: PollRequest } = {}; private static poll(uniqueId: string, requestData: PollRequest): Promise { - const pollHandler = async (resolve, reject): Promise => { + const pollHandler = async (resolve?: (uniqueId: string, data: any) => unknown, reject?: typeof Promise["reject"]): Promise => { if (!Poller.pollRequests[uniqueId]) { // Poll request was discarded, return - return resolve() as unknown; + return resolve(uniqueId, null); } // Dispose the poll request if it was marked for disposal before next fetch attempt const shouldDispose = Poller.pollRequests[uniqueId].dispose; if (shouldDispose) { Poller.removeRequest(uniqueId); - return resolve() as unknown; + return resolve(uniqueId, null); } let data = null; try { data = await requestData.request(); } catch (err) { - if (requestData.reject) { - // eslint-disable-next-line zowe-explorer/no-floating-promises - requestData.reject(err); - } else { - reject(err); - } + return requestData.reject ? requestData.reject(err) : reject(err); } if (data && requestData.resolve) { requestData.resolve(uniqueId, data); } - // eslint-disable-next-line @typescript-eslint/no-misused-promises - setTimeout(pollHandler, requestData.msInterval, resolve, reject); + setTimeout(() => void pollHandler(resolve, reject), requestData.msInterval); }; - // eslint-disable-next-line @typescript-eslint/no-misused-promises - return new Promise(pollHandler); + return pollHandler(requestData.resolve, requestData.reject?.bind(pollHandler)); } public static addRequest(uniqueId: string, request: PollRequest): void { Poller.pollRequests[uniqueId] = request; - // Initialize the poll request - // eslint-disable-next-line zowe-explorer/no-floating-promises - this.poll(uniqueId, request); + void this.poll(uniqueId, request); } public static removeRequest(uniqueId: string): void { diff --git a/packages/zowe-explorer-ftp-extension/src/ZoweExplorerFtpUssApi.ts b/packages/zowe-explorer-ftp-extension/src/ZoweExplorerFtpUssApi.ts index db048ecd1c..f9208cb42f 100644 --- a/packages/zowe-explorer-ftp-extension/src/ZoweExplorerFtpUssApi.ts +++ b/packages/zowe-explorer-ftp-extension/src/ZoweExplorerFtpUssApi.ts @@ -261,7 +261,6 @@ export class FtpUssApi extends AbstractFtpApi implements ZoweExplorerApi.IUss { private async deleteDirectory(ussPath: string, connection): Promise { const result = this.getDefaultResponse(); try { - connection = await this.ftpClient(this.checkedProfile()); await UssUtils.deleteDirectory(connection, ussPath); result.success = true; result.commandResponse = "Delete Completed"; diff --git a/packages/zowe-explorer/src/PersistentFilters.ts b/packages/zowe-explorer/src/PersistentFilters.ts index b200a3ce35..6468593640 100644 --- a/packages/zowe-explorer/src/PersistentFilters.ts +++ b/packages/zowe-explorer/src/PersistentFilters.ts @@ -140,7 +140,7 @@ export class PersistentFilters { this.mSessions.push(criteria); // Use standard sorting - this.mSessions.sort(); + this.mSessions.sort((a, b) => a.localeCompare(b)); this.updateSessions(); } diff --git a/packages/zowe-explorer/src/dataset/actions.ts b/packages/zowe-explorer/src/dataset/actions.ts index 081c6bdfdf..a7543e97c3 100644 --- a/packages/zowe-explorer/src/dataset/actions.ts +++ b/packages/zowe-explorer/src/dataset/actions.ts @@ -296,7 +296,7 @@ export async function deleteDatasetPrompt(datasetProvider: api.IZoweTree a.localeCompare(b)); const nodesDeleted: string[] = []; @@ -376,7 +376,7 @@ export async function deleteDatasetPrompt(datasetProvider: api.IZoweTree 0) { - nodesDeleted.sort(); + nodesDeleted.sort((a, b) => a.localeCompare(b)); api.Gui.showMessage( localize("deleteDatasetPrompt.success", "The following {0} item(s) were deleted:{1}", nodesDeleted.length, nodesDeleted.toString()) ); @@ -926,7 +926,7 @@ export async function submitJcl(datasetProvider: api.IZoweTree Date: Tue, 13 Feb 2024 12:49:37 -0500 Subject: [PATCH 44/71] fix: lint error in ussNodeActions integration test Signed-off-by: Trae Yelovich --- .../__integration__/uss/ussNodeActions.integration.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/zowe-explorer/__tests__/__integration__/uss/ussNodeActions.integration.test.ts b/packages/zowe-explorer/__tests__/__integration__/uss/ussNodeActions.integration.test.ts index eab79dc855..7e894f6d1e 100644 --- a/packages/zowe-explorer/__tests__/__integration__/uss/ussNodeActions.integration.test.ts +++ b/packages/zowe-explorer/__tests__/__integration__/uss/ussNodeActions.integration.test.ts @@ -122,7 +122,7 @@ describe("ussNodeActions integration test", async () => { it("should rename a uss file", async () => { let error; let list; - const beforeNameBase = beforeFileName.split("/").pop(); + const beforeNameBase = beforeFileName.split("/").pop()!; const afterNameBase = afterFileName.split("/").pop(); try { @@ -134,7 +134,7 @@ describe("ussNodeActions integration test", async () => { profile: testConst.profile.profile, }); const testNode = new ZoweUSSNode({ - label: beforeNameBase as string, + label: beforeNameBase, collapsibleState: vscode.TreeItemCollapsibleState.None, parentNode: testFolder, session, From 16620d41f26516cbaf3dabb7a47e733dee82c43a Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Wed, 14 Feb 2024 09:42:35 +0530 Subject: [PATCH 45/71] update changelog Signed-off-by: Santhoshi Boyina --- packages/zowe-explorer/CHANGELOG.md | 3 ++- packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index d4f6c48af7..4f818939db 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -6,6 +6,8 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen ### New features and enhancements +- Implemented sorting of PDS members by date created [#2707](https://github.com/zowe/vscode-extension-for-zowe/pull/2707) + ### Bug fixes - Adjusted order of 'Manage Profile' and 'Edit History' in the jobs tree's context menu to match the other trees. [#2670](https://github.com/zowe/vscode-extension-for-zowe/issues/2670) @@ -19,7 +21,6 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen - Adopted new common methods for `loginWithBaseProfile` and `logoutWithBaseProfile`. [#2493](https://github.com/zowe/vscode-extension-for-zowe/pull/2493) - Added APIML dynamic token support. [#2665](https://github.com/zowe/vscode-extension-for-zowe/issues/2665) - Implemented profile determination without triggering quick pick for `Submit JCL` if the file is part of Zowe Explorer's temp files. [#2628](https://github.com/zowe/vscode-extension-for-zowe/issues/2628) -- Implemented sorting of PDS members by date created [#2707](https://github.com/zowe/vscode-extension-for-zowe/pull/2707) ### Bug fixes diff --git a/packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts b/packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts index b92f016a19..2f9b2bb9e2 100644 --- a/packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts +++ b/packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts @@ -112,7 +112,7 @@ export class ZoweDatasetNode extends ZoweTreeNode implements IZoweDatasetTreeNod } public updateStats(item: any): void { - if ("c4date" in item || "m4date" in item) { + if ("c4date" in item && "m4date" in item) { const { m4date, mtime, msec }: { m4date: string; mtime: string; msec: string } = item; this.stats = { user: item.user, From eb0815ca84b78e830b1940c075ebf83b3705e8ff Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Tue, 13 Feb 2024 12:51:50 -0500 Subject: [PATCH 46/71] deps: update zowe/cli to 7.23.3 Signed-off-by: Trae Yelovich --- package.json | 2 +- packages/zowe-explorer-api/package.json | 2 +- samples/uss-profile-sample/package.json | 2 +- yarn.lock | 126 ++++++++++++------------ 4 files changed, 66 insertions(+), 66 deletions(-) diff --git a/package.json b/package.json index e0d6366573..f437dc7d7a 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "vscode": "^1.53.2" }, "dependencies": { - "@zowe/cli": "7.23.0", + "@zowe/cli": "7.23.3", "vscode-nls": "4.1.2" }, "devDependencies": { diff --git a/packages/zowe-explorer-api/package.json b/packages/zowe-explorer-api/package.json index e2f7651c18..dde9f87d89 100644 --- a/packages/zowe-explorer-api/package.json +++ b/packages/zowe-explorer-api/package.json @@ -18,7 +18,7 @@ }, "dependencies": { "@types/vscode": "^1.53.2", - "@zowe/cli": "7.23.0", + "@zowe/cli": "7.23.3", "@zowe/secrets-for-zowe-sdk": "7.18.6", "handlebars": "^4.7.7", "semver": "^7.5.3" diff --git a/samples/uss-profile-sample/package.json b/samples/uss-profile-sample/package.json index d8e23f1118..b3f96ccc34 100644 --- a/samples/uss-profile-sample/package.json +++ b/samples/uss-profile-sample/package.json @@ -33,7 +33,7 @@ "watch": "tsc -watch -p ./" }, "dependencies": { - "@zowe/cli": "7.23.0", + "@zowe/cli": "7.23.3", "@zowe/zowe-explorer-api": "file:../../packages/zowe-explorer-api", "ssh2-sftp-client": "^9.1.0" }, diff --git a/yarn.lock b/yarn.lock index 3a2007d74c..f09bdd891d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2642,22 +2642,22 @@ resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -"@zowe/cli@7.23.0": - version "7.23.0" - resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.23.0.tgz#1ce2f4d2037b4d4dfdbf9d0ab6ec8f18984c798c" - integrity sha512-NVgeVn3bCu0zC1qgaXYo0qvVX3rgh58gI2JqrevY1XuRkAlFseTG02RscOfQjmPmBW6JQtbwd4ANEl6azYN2rA== - dependencies: - "@zowe/core-for-zowe-sdk" "7.23.0" - "@zowe/imperative" "5.22.0" - "@zowe/provisioning-for-zowe-sdk" "7.23.0" - "@zowe/zos-console-for-zowe-sdk" "7.23.0" - "@zowe/zos-files-for-zowe-sdk" "7.23.0" - "@zowe/zos-jobs-for-zowe-sdk" "7.23.0" - "@zowe/zos-logs-for-zowe-sdk" "7.23.0" - "@zowe/zos-tso-for-zowe-sdk" "7.23.0" - "@zowe/zos-uss-for-zowe-sdk" "7.23.0" - "@zowe/zos-workflows-for-zowe-sdk" "7.23.0" - "@zowe/zosmf-for-zowe-sdk" "7.23.0" +"@zowe/cli@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.23.3.tgz#4099c86e34437c6c9778a68155ef6556732b1e90" + integrity sha512-MRBlwAXAdimod5b3R4NaPF82thlptPDA8BRdmZDtWUAnE0sYkWepHxQcL5OjY8Gty6HrQj7t8q5ZWaawArcICg== + dependencies: + "@zowe/core-for-zowe-sdk" "7.23.3" + "@zowe/imperative" "5.22.3" + "@zowe/provisioning-for-zowe-sdk" "7.23.3" + "@zowe/zos-console-for-zowe-sdk" "7.23.3" + "@zowe/zos-files-for-zowe-sdk" "7.23.3" + "@zowe/zos-jobs-for-zowe-sdk" "7.23.3" + "@zowe/zos-logs-for-zowe-sdk" "7.23.3" + "@zowe/zos-tso-for-zowe-sdk" "7.23.3" + "@zowe/zos-uss-for-zowe-sdk" "7.23.3" + "@zowe/zos-workflows-for-zowe-sdk" "7.23.3" + "@zowe/zosmf-for-zowe-sdk" "7.23.3" find-process "1.4.7" get-stream "6.0.1" lodash "4.17.21" @@ -2666,18 +2666,18 @@ optionalDependencies: "@zowe/secrets-for-zowe-sdk" "7.18.6" -"@zowe/core-for-zowe-sdk@7.23.0": - version "7.23.0" - resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.23.0.tgz#8ade9eeb1b8145468e0a7a8770a026b2206bd73c" - integrity sha512-y7bm4nhuIVtKhL9aa6M++Cj3UETwRwMiZzRbzeSqphn4P83umQ4NTHfltJL5xPouDIaqXBNhKET8UecBXJntrQ== +"@zowe/core-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.23.3.tgz#ec8e9b1f18b162bfd8f44fdecbe858d1072334c0" + integrity sha512-gcW30wwAzSNk3jk8fQA0jFWE5A96v75Bq1l3Cs6ifzRL4YipUUmUmvb3YmNILhxrnlGrJEqSaNAf87G16Cik/g== dependencies: comment-json "4.1.1" string-width "4.2.3" -"@zowe/imperative@5.22.0": - version "5.22.0" - resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.22.0.tgz#b79f9630fd6afc4c4ea907f403c4133784838285" - integrity sha512-XSTlHuaKtI2FsWYSQWNIx2rR739Zv8pkjvvxBDesyiCYXOpo4u/1RxkeAE/FKfw5UgVKR6yq7izLeeOpPjj3IA== +"@zowe/imperative@5.22.3": + version "5.22.3" + resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.22.3.tgz#464b2dd167c7f20902f442cb98945cbae2dc30a6" + integrity sha512-nfUHPMczMvmPjQLg2qwmVZcnL7ZaLiiGbeGAbI/jV+qOkqsHbbFt+QJ5TSX3O3bZCZClP8idn99lTbj9v7mLcA== dependencies: "@types/yargs" "13.0.4" chalk "2.4.2" @@ -2716,10 +2716,10 @@ yamljs "0.3.0" yargs "15.3.1" -"@zowe/provisioning-for-zowe-sdk@7.23.0": - version "7.23.0" - resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.23.0.tgz#a359b44a2e60f33c243cb6d7272e47be7ca8c355" - integrity sha512-F+OSm0a5c4y2aX11XPVC6HSQM42T9puY9v6sTuvMHFIJBR7+gOoh5ijeyCy6eZMPmoXewsItc3oJEzbPHP5mKg== +"@zowe/provisioning-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.23.3.tgz#3c01fcf7223640f92cabd4ae4add79f239954179" + integrity sha512-UHW+ryUUSp17FQpazCFVShxlBPUJ8qPR2uonqp8cuB9AZyYA5RdGwTzgJvAznfVYXdvSgk4WS2TPOLaCNIVOvg== dependencies: js-yaml "4.1.0" @@ -2728,15 +2728,15 @@ resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.6.tgz#6b854b344babb291c26d19d82633099a46e08452" integrity sha512-YyS1NoXddb147mBQpu5/dTfo1gdwGa/xdg85U8KCngA+RHCmNct3n2rbK3tHx9C9H6rlgjeS+Mrux5Q+PHJUgQ== -"@zowe/zos-console-for-zowe-sdk@7.23.0": - version "7.23.0" - resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.23.0.tgz#03a862339a70a09646af8791074da891b56cb343" - integrity sha512-nc3zpGRn5H0xX2ynIB1EB9OQiyIMu74qoXA6XTuYgaa/5gtb/xIxkeB9POC45aSAGJFjXDMT+3jeVKWhrtRVVw== +"@zowe/zos-console-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.23.3.tgz#388220e82ad07c5c5cf757f019ee4bb3caf9ddef" + integrity sha512-KZrxTbKtRdDdWSOrFGvHKeEsDGrPFt74EVwRtn29xAzdJeeDsGHcLz+oXRQOdGDMn2PKXG8g+jBOT+zONqnBPQ== -"@zowe/zos-files-for-zowe-sdk@7.23.0": - version "7.23.0" - resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.23.0.tgz#dba5221b107831577c8e9c6ba1e39cd66bfeb782" - integrity sha512-2MWuS2JyZ6f2bZVS/SAOaAihuLZt1kWmp4zalJcSNLtwOp5cMWm4iKtKIokrdtb35IZOMADaiG31c/Sm71fZzQ== +"@zowe/zos-files-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.23.3.tgz#052e047edf6da9add9a76d78b9398891351866ec" + integrity sha512-dhuWez++WemAkAdrH0h5woH6vPMNYw6LcHzX5o+p4zLPpo3gjEzalYHkgH+MUP8eUX4M1yetLd6g82yk9hMuJQ== dependencies: get-stream "6.0.1" minimatch "5.0.1" @@ -2748,43 +2748,43 @@ dependencies: zos-node-accessor "1.0.14" -"@zowe/zos-jobs-for-zowe-sdk@7.23.0": - version "7.23.0" - resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.23.0.tgz#0f4cc083771a8673f38b53a2d76ebf0e931a68ac" - integrity sha512-FoYxZeC8BpI0Pd5X3vJyo7ViXBhXLvrdogNmWuTvYfMVj78xDp/ZoSon9JDJhurOhtjWOdnwrfPZVyI074PHNw== +"@zowe/zos-jobs-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.23.3.tgz#7fd3c38787ee5ef4abfa61e520d63a24deb02c0f" + integrity sha512-Ipk0kCKbCiY6Le93aO8+H0koTvSyI2ICllbs9yWC198tdbetO3oH9GJ8GXp5LKPInQQwGk1zCbnYK/YH6ZzwJg== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.23.0" + "@zowe/zos-files-for-zowe-sdk" "7.23.3" -"@zowe/zos-logs-for-zowe-sdk@7.23.0": - version "7.23.0" - resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.23.0.tgz#fa1e40ce1e681f4d2b56b23f2c8585dce918dbfd" - integrity sha512-7OnIIiwbiL7qEYXTfBVIW7EoXc+jKMygDQmIpUaTgOeu5cnmy5/SfvF4YtaW8eVJvsEJG0p1w77WMGGSyvQDEw== +"@zowe/zos-logs-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.23.3.tgz#22c02af97b1f3ddd2b03b4feb882d366f76e7881" + integrity sha512-e8COZ+3vmeDMLoO+/4umIwv5tmJ2Vd6EJ6Evivx9C2C9WlxVbyIu7YGjY6qf4o7yWxVJ53oVrsCXfsgDXFf7lA== -"@zowe/zos-tso-for-zowe-sdk@7.23.0": - version "7.23.0" - resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.23.0.tgz#a3302f9e529071bbc91d5ea4353ea6e0154a7968" - integrity sha512-+cj39Vo42wIPSK8eiX7WcBrk2JyxKQZuZnFvXbtcX9j/i/05GAM7kfYX1JVKsd2v59dbmYkOotb0q+GSIDMKGA== +"@zowe/zos-tso-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.23.3.tgz#f142d420c3ba637d8b586cdd81033ee9b58fde78" + integrity sha512-k23Kh4rK78MO3RBY5Zv/uCWyQL3id8+Rp1Y+oiLDlOxgg5RSYIO44PyUYQiahxaw4Qlv9uGYSxz1WBkh3zHXzg== dependencies: - "@zowe/zosmf-for-zowe-sdk" "7.23.0" + "@zowe/zosmf-for-zowe-sdk" "7.23.3" -"@zowe/zos-uss-for-zowe-sdk@7.23.0": - version "7.23.0" - resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.23.0.tgz#76daf52d8ffd22a4db17cf526226b247e7d74810" - integrity sha512-+gIzbLbvhWM+zIXbvUMqpgBoKrKbf5lbSA7GTdf3oTHc1VZzy0YJFX/bIewDYZunMV/D91KVAQ1Fie8i1Xlkfg== +"@zowe/zos-uss-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.23.3.tgz#5e3e746c30365063f33200be6d56fc857504e96b" + integrity sha512-fhMSqgpdOu8mlZgrIgIrR/JKaNWLhxDgLAyRRDk/KGwbQGdsnfSPvzXEB6BonN94oTeIsL5gJ/iw2Sc+Q7kZow== dependencies: ssh2 "1.15.0" -"@zowe/zos-workflows-for-zowe-sdk@7.23.0": - version "7.23.0" - resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.23.0.tgz#6195ff3fcf1e8d50d806ca051a01500689b3b666" - integrity sha512-H9xbDhlY0m+BbNy7mOIS6kxPT1/UbHvavpi2y9ZtzxOV47sYxCOIfSGE7mvSTVSSjnV47B+mQT0h6qvX0Kqinw== +"@zowe/zos-workflows-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.23.3.tgz#08d1af8d51eb8d28e2192c9ea027628d6bc7b3b8" + integrity sha512-VoigwgLIPJJixEoA7asoUKIRnf2e1DhWeqtTKRfyktP5LO5Gk+UcuWqHifAE/0aDlauIpSx6oGaXNlKGr4Za1w== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.23.0" + "@zowe/zos-files-for-zowe-sdk" "7.23.3" -"@zowe/zosmf-for-zowe-sdk@7.23.0": - version "7.23.0" - resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.23.0.tgz#fd235649093c4f936365692506ca854953a8e18c" - integrity sha512-zwavHYHuFQOS3AxmZ5bhsWKyniUgQTRyMwpguce09XdehLyveb2VwuH1tVAbggUZlP+ae8vqWQAVU2fdg+eiPg== +"@zowe/zosmf-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.23.3.tgz#e7e97fe224fa5b59291116ebf2857dfc9aa17d5e" + integrity sha512-EQzfq25iLEbJOuvD/dr/ox+x3k8oOzg2iTGMvrWJcT3JIeAFrpYRpTIoiRE5xDIsEZ7BohKKupEvEa3+Iilb9w== abab@^2.0.3, abab@^2.0.5: version "2.0.6" From 3f6d3f710ba5cc45b1f40dd1b1d452f9a85f85de Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Thu, 15 Feb 2024 16:36:11 -0500 Subject: [PATCH 47/71] Fix issue with duplicate dd names Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- packages/zowe-explorer/CHANGELOG.md | 1 + .../__unit__/job/ZoweJobNode.unit.test.ts | 45 ++++++++++++++++--- packages/zowe-explorer/src/job/ZoweJobNode.ts | 4 +- 3 files changed, 41 insertions(+), 9 deletions(-) diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index 2e78a08689..ef99f09cf4 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -11,6 +11,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen ### Bug fixes - Adjusted order of 'Manage Profile' and 'Edit History' in the jobs tree's context menu to match the other trees. [#2670](https://github.com/zowe/vscode-extension-for-zowe/issues/2670) +- Fixed issue where spools with duplicate DD names would overwrite each other causing less spools in job output view [#2315](https://github.com/zowe/vscode-extension-for-zowe/issues/2315) ## `2.14.1` diff --git a/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts index 9dd9913de3..d40148acab 100644 --- a/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts @@ -345,7 +345,7 @@ describe("ZoweJobNode unit tests - Function getChildren", () => { const spoolFiles = await globalMocks.testJobNode.getChildren(); expect(spoolFiles.length).toBe(1); - expect(spoolFiles[0].label).toEqual("STEP:STDOUT - 1"); + expect(spoolFiles[0].label).toEqual("101 - STEP:STDOUT"); expect(spoolFiles[0].owner).toEqual("fake"); }); @@ -354,7 +354,7 @@ describe("ZoweJobNode unit tests - Function getChildren", () => { const spoolFiles = await globalMocks.testJobNode.getChildren(); expect(spoolFiles.length).toBe(1); - expect(spoolFiles[0].label).toEqual("STEP:STDOUT - 1"); + expect(spoolFiles[0].label).toEqual("101 - STEP:STDOUT"); expect(spoolFiles[0].owner).toEqual("fake"); jest.spyOn(ZoweExplorerApiRegister, "getJesApi").mockReturnValueOnce({ @@ -363,7 +363,7 @@ describe("ZoweJobNode unit tests - Function getChildren", () => { globalMocks.testJobNode.dirty = true; const spoolFilesAfter = await globalMocks.testJobNode.getChildren(); expect(spoolFilesAfter.length).toBe(1); - expect(spoolFilesAfter[0].label).toEqual("STEP:STDOUT - 2"); + expect(spoolFilesAfter[0].label).toEqual("101 - STEP:STDOUT"); expect(spoolFilesAfter[0].owner).toEqual("fake"); }); @@ -388,7 +388,7 @@ describe("ZoweJobNode unit tests - Function getChildren", () => { globalMocks.testJobNode.session.ISession = globalMocks.testSessionNoCred; const spoolFiles = await globalMocks.testJobNode.getChildren(); expect(spoolFiles.length).toBe(1); - expect(spoolFiles[0].label).toEqual("STEP:STDOUT - 1"); + expect(spoolFiles[0].label).toEqual("101 - STEP:STDOUT"); expect(spoolFiles[0].owner).toEqual("*"); }); @@ -477,9 +477,40 @@ describe("ZoweJobNode unit tests - Function getChildren", () => { jest.spyOn(contextually, "isSession").mockReturnValueOnce(false); const spoolFiles = await globalMocks.testJobNode.getChildren(); expect(spoolFiles.length).toBe(3); - expect(spoolFiles[0].label).toBe("JES2:JESMSGLG - 11"); - expect(spoolFiles[1].label).toBe("JES2:JESJCL - 21"); - expect(spoolFiles[2].label).toBe("JES2:JESYSMSG - 6"); + expect(spoolFiles[0].label).toBe("101 - JES2:JESMSGLG"); + expect(spoolFiles[1].label).toBe("101 - JES2:JESJCL"); + expect(spoolFiles[2].label).toBe("101 - JES2:JESYSMSG"); + }); + + it("Check that jobs with duplicate DD names do not overwrite each other", async () => { + const globalMocks = await createGlobalMocks(); + const mockSpoolOne = { ...globalMocks.mockIJobFile, stepname: "SOMEJOB", ddname: "TEST", "record-count": 13 }; + const mockSpoolTwo = { ...globalMocks.mockIJobFile, stepname: "SOMEJOB", ddname: "TEST", "record-count": 5 }; + + mockSpoolOne.id = 12; + mockSpoolTwo.id = 13; + + globalMocks.testJobsProvider.mSessionNodes[1]._owner = null; + globalMocks.testJobsProvider.mSessionNodes[1]._prefix = "*"; + globalMocks.testJobsProvider.mSessionNodes[1]._searchId = ""; + globalMocks.testJobNode.session.ISession = globalMocks.testSessionNoCred; + jest.spyOn(ZoweExplorerApiRegister, "getJesApi").mockReturnValueOnce({ + getSpoolFiles: jest.fn().mockReturnValueOnce([ + { ...globalMocks.mockIJobFile, stepname: "JES2", ddname: "JESMSGLG", "record-count": 11 }, + { ...globalMocks.mockIJobFile, stepname: "JES2", ddname: "JESJCL", "record-count": 21 }, + { ...globalMocks.mockIJobFile, stepname: "JES2", ddname: "JESYSMSG", "record-count": 6 }, + mockSpoolOne, + mockSpoolTwo + ]), + } as any); + jest.spyOn(contextually, "isSession").mockReturnValueOnce(false); + const spoolFiles = await globalMocks.testJobNode.getChildren(); + expect(spoolFiles.length).toBe(5); + expect(spoolFiles[0].label).toBe("101 - JES2:JESMSGLG"); + expect(spoolFiles[1].label).toBe("101 - JES2:JESJCL"); + expect(spoolFiles[2].label).toBe("101 - JES2:JESYSMSG"); + expect(spoolFiles[3].label).toBe("12 - SOMEJOB:TEST"); + expect(spoolFiles[4].label).toBe("13 - SOMEJOB:TEST"); }); }); diff --git a/packages/zowe-explorer/src/job/ZoweJobNode.ts b/packages/zowe-explorer/src/job/ZoweJobNode.ts index 06da87e20d..60309353cf 100644 --- a/packages/zowe-explorer/src/job/ZoweJobNode.ts +++ b/packages/zowe-explorer/src/job/ZoweJobNode.ts @@ -143,9 +143,9 @@ export class ZoweJobNode extends ZoweTreeNode implements IZoweJobTreeNode { const procstep = spool.procstep ? spool.procstep : undefined; let newLabel: string; if (procstep) { - newLabel = `${spool.stepname}:${spool.ddname} - ${procstep}`; + newLabel = `${spool["id"]} - ${spool.stepname}:${spool.ddname} - ${procstep}`; } else { - newLabel = `${spool.stepname}:${spool.ddname} - ${spool["record-count"]}`; + newLabel = `${spool["id"]} - ${spool.stepname}:${spool.ddname}`; } // Only look for existing node w/ procstep if spool file has a procstep, From aab048f69ca6bbdde1322ee22566e8119d3ef9ef Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Thu, 15 Feb 2024 16:49:41 -0500 Subject: [PATCH 48/71] Add missing coverage Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- .../__unit__/job/ZoweJobNode.unit.test.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts index d40148acab..e78cea1b72 100644 --- a/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts @@ -484,11 +484,13 @@ describe("ZoweJobNode unit tests - Function getChildren", () => { it("Check that jobs with duplicate DD names do not overwrite each other", async () => { const globalMocks = await createGlobalMocks(); - const mockSpoolOne = { ...globalMocks.mockIJobFile, stepname: "SOMEJOB", ddname: "TEST", "record-count": 13 }; - const mockSpoolTwo = { ...globalMocks.mockIJobFile, stepname: "SOMEJOB", ddname: "TEST", "record-count": 5 }; + const mockSpoolOne = { ...globalMocks.mockIJobFile, stepname: "JES2", ddname: "JESMSGLG", "record-count": 11 }; + const mockSpoolTwo = { ...globalMocks.mockIJobFile, stepname: "SOMEJOB", ddname: "TEST", "record-count": 13 }; + const mockSpoolThree = { ...globalMocks.mockIJobFile, stepname: "SOMEJOB", ddname: "TEST", "record-count": 5 }; - mockSpoolOne.id = 12; - mockSpoolTwo.id = 13; + mockSpoolOne.procstep = "TEST"; + mockSpoolTwo.id = 12; + mockSpoolThree.id = 13; globalMocks.testJobsProvider.mSessionNodes[1]._owner = null; globalMocks.testJobsProvider.mSessionNodes[1]._prefix = "*"; @@ -496,17 +498,17 @@ describe("ZoweJobNode unit tests - Function getChildren", () => { globalMocks.testJobNode.session.ISession = globalMocks.testSessionNoCred; jest.spyOn(ZoweExplorerApiRegister, "getJesApi").mockReturnValueOnce({ getSpoolFiles: jest.fn().mockReturnValueOnce([ - { ...globalMocks.mockIJobFile, stepname: "JES2", ddname: "JESMSGLG", "record-count": 11 }, + mockSpoolOne { ...globalMocks.mockIJobFile, stepname: "JES2", ddname: "JESJCL", "record-count": 21 }, { ...globalMocks.mockIJobFile, stepname: "JES2", ddname: "JESYSMSG", "record-count": 6 }, - mockSpoolOne, - mockSpoolTwo + mockSpoolTwo, + mockSpoolThree ]), } as any); jest.spyOn(contextually, "isSession").mockReturnValueOnce(false); const spoolFiles = await globalMocks.testJobNode.getChildren(); expect(spoolFiles.length).toBe(5); - expect(spoolFiles[0].label).toBe("101 - JES2:JESMSGLG"); + expect(spoolFiles[0].label).toBe("101 - JES2:JESMSGLG - TEST"); expect(spoolFiles[1].label).toBe("101 - JES2:JESJCL"); expect(spoolFiles[2].label).toBe("101 - JES2:JESYSMSG"); expect(spoolFiles[3].label).toBe("12 - SOMEJOB:TEST"); From ca37d8cf1e985fa5e25dfa5162ad673e5a27666d Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Thu, 15 Feb 2024 16:52:52 -0500 Subject: [PATCH 49/71] Address syntax error Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- .../__tests__/__unit__/job/ZoweJobNode.unit.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts index e78cea1b72..023241f8e9 100644 --- a/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts @@ -498,7 +498,7 @@ describe("ZoweJobNode unit tests - Function getChildren", () => { globalMocks.testJobNode.session.ISession = globalMocks.testSessionNoCred; jest.spyOn(ZoweExplorerApiRegister, "getJesApi").mockReturnValueOnce({ getSpoolFiles: jest.fn().mockReturnValueOnce([ - mockSpoolOne + mockSpoolOne, { ...globalMocks.mockIJobFile, stepname: "JES2", ddname: "JESJCL", "record-count": 21 }, { ...globalMocks.mockIJobFile, stepname: "JES2", ddname: "JESYSMSG", "record-count": 6 }, mockSpoolTwo, From 91d5b3c8c445c6dc38fdc1810c3224e21ae351e9 Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Thu, 15 Feb 2024 16:58:46 -0500 Subject: [PATCH 50/71] Solve lint check issue Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- .../__unit__/job/ZoweJobNode.unit.test.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts index 023241f8e9..293dd08877 100644 --- a/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts @@ -497,13 +497,15 @@ describe("ZoweJobNode unit tests - Function getChildren", () => { globalMocks.testJobsProvider.mSessionNodes[1]._searchId = ""; globalMocks.testJobNode.session.ISession = globalMocks.testSessionNoCred; jest.spyOn(ZoweExplorerApiRegister, "getJesApi").mockReturnValueOnce({ - getSpoolFiles: jest.fn().mockReturnValueOnce([ - mockSpoolOne, - { ...globalMocks.mockIJobFile, stepname: "JES2", ddname: "JESJCL", "record-count": 21 }, - { ...globalMocks.mockIJobFile, stepname: "JES2", ddname: "JESYSMSG", "record-count": 6 }, - mockSpoolTwo, - mockSpoolThree - ]), + getSpoolFiles: jest + .fn() + .mockReturnValueOnce([ + mockSpoolOne, + { ...globalMocks.mockIJobFile, stepname: "JES2", ddname: "JESJCL", "record-count": 21 }, + { ...globalMocks.mockIJobFile, stepname: "JES2", ddname: "JESYSMSG", "record-count": 6 }, + mockSpoolTwo, + mockSpoolThree, + ]), } as any); jest.spyOn(contextually, "isSession").mockReturnValueOnce(false); const spoolFiles = await globalMocks.testJobNode.getChildren(); From b8e850bfd369b6a76ddaff87ad6efd987344f886 Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Fri, 16 Feb 2024 11:12:02 -0500 Subject: [PATCH 51/71] refactor: add error to message, remove spread from mock Signed-off-by: Trae Yelovich --- packages/zowe-explorer/__mocks__/mockCreators/shared.ts | 1 - .../__tests__/__unit__/ZoweExplorerExtender.unit.test.ts | 4 ++-- .../i18n/sample/src/ZoweExplorerExtender.i18n.json | 2 +- packages/zowe-explorer/src/ZoweExplorerExtender.ts | 8 +++++++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/zowe-explorer/__mocks__/mockCreators/shared.ts b/packages/zowe-explorer/__mocks__/mockCreators/shared.ts index f6ab63fd60..e9ff083cd1 100644 --- a/packages/zowe-explorer/__mocks__/mockCreators/shared.ts +++ b/packages/zowe-explorer/__mocks__/mockCreators/shared.ts @@ -313,7 +313,6 @@ export function createTextDocument(name: string, sessionNode?: ZoweDatasetNode | export function createInstanceOfProfile(profile: imperative.IProfileLoaded) { return { - ...Profiles.prototype, addToConfigArray: Profiles.prototype.addToConfigArray, allProfiles: [{ name: "sestest" }, { name: "profile1" }, { name: "profile2" }], defaultProfile: { name: "sestest" }, diff --git a/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts index 907619ad3a..d4e1196716 100644 --- a/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts @@ -250,13 +250,13 @@ describe("ZoweExplorerExtender unit tests", () => { it("should throw an error if the schema is read-only", async () => { const errorMessageSpy = jest.spyOn(Gui, "errorMessage"); await updateSchema((_filepath, _contents) => { - const err = new Error(); + const err = new Error("test error"); Object.defineProperty(err, "code", { value: "EACCES", }); throw err; }); - expect(errorMessageSpy).toHaveBeenCalledWith("Failed to update Zowe schema: insufficient permissions or read-only file"); + expect(errorMessageSpy).toHaveBeenCalledWith("Failed to update Zowe schema: insufficient permissions or read-only file. test error"); }); }); }); diff --git a/packages/zowe-explorer/i18n/sample/src/ZoweExplorerExtender.i18n.json b/packages/zowe-explorer/i18n/sample/src/ZoweExplorerExtender.i18n.json index c5db5ea283..1e4ecdc4b1 100644 --- a/packages/zowe-explorer/i18n/sample/src/ZoweExplorerExtender.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/ZoweExplorerExtender.i18n.json @@ -1,4 +1,4 @@ { "initialize.profiles.error": "Error encountered when loading your Zowe config. Click \"Show Config\" for more details.", - "schema.cannotAccess": "Failed to update Zowe schema: insufficient permissions or read-only file" + "schema.cannotAccess": "Failed to update Zowe schema: insufficient permissions or read-only file. {0}" } diff --git a/packages/zowe-explorer/src/ZoweExplorerExtender.ts b/packages/zowe-explorer/src/ZoweExplorerExtender.ts index ba7310755c..4dc0dfade3 100644 --- a/packages/zowe-explorer/src/ZoweExplorerExtender.ts +++ b/packages/zowe-explorer/src/ZoweExplorerExtender.ts @@ -230,7 +230,13 @@ export class ZoweExplorerExtender implements ZoweExplorerApi.IApiExplorerExtende } catch (err) { // Only show an error if we failed to update the on-disk schema. if (err.code === "EACCES" || err.code === "EPERM") { - Gui.errorMessage(localize("schema.cannotAccess", "Failed to update Zowe schema: insufficient permissions or read-only file")); + Gui.errorMessage( + localize( + "schema.cannotAccess", + "Failed to update Zowe schema: insufficient permissions or read-only file. {0}", + err.message ?? "" + ) + ); } } } From 12a7302a6f239650cc72a10e4bee04b77a06039b Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Fri, 16 Feb 2024 12:13:21 -0500 Subject: [PATCH 52/71] Use dot access Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- packages/zowe-explorer/src/job/ZoweJobNode.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/zowe-explorer/src/job/ZoweJobNode.ts b/packages/zowe-explorer/src/job/ZoweJobNode.ts index 60309353cf..ee69947531 100644 --- a/packages/zowe-explorer/src/job/ZoweJobNode.ts +++ b/packages/zowe-explorer/src/job/ZoweJobNode.ts @@ -143,9 +143,9 @@ export class ZoweJobNode extends ZoweTreeNode implements IZoweJobTreeNode { const procstep = spool.procstep ? spool.procstep : undefined; let newLabel: string; if (procstep) { - newLabel = `${spool["id"]} - ${spool.stepname}:${spool.ddname} - ${procstep}`; + newLabel = `${spool.id} - ${spool.stepname}:${spool.ddname} - ${procstep}`; } else { - newLabel = `${spool["id"]} - ${spool.stepname}:${spool.ddname}`; + newLabel = `${spool.id} - ${spool.stepname}:${spool.ddname}`; } // Only look for existing node w/ procstep if spool file has a procstep, From d47c2d1d8f46ef3ef36dc3a2c29b5c7c7db73ed9 Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:46:47 -0500 Subject: [PATCH 53/71] Apply Timothy's suggestion Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- .../__unit__/job/ZoweJobNode.unit.test.ts | 24 +++++++++---------- packages/zowe-explorer/src/job/ZoweJobNode.ts | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts index 293dd08877..a9d85bdcea 100644 --- a/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts @@ -345,7 +345,7 @@ describe("ZoweJobNode unit tests - Function getChildren", () => { const spoolFiles = await globalMocks.testJobNode.getChildren(); expect(spoolFiles.length).toBe(1); - expect(spoolFiles[0].label).toEqual("101 - STEP:STDOUT"); + expect(spoolFiles[0].label).toEqual("STEP:STDOUT(101)"); expect(spoolFiles[0].owner).toEqual("fake"); }); @@ -354,7 +354,7 @@ describe("ZoweJobNode unit tests - Function getChildren", () => { const spoolFiles = await globalMocks.testJobNode.getChildren(); expect(spoolFiles.length).toBe(1); - expect(spoolFiles[0].label).toEqual("101 - STEP:STDOUT"); + expect(spoolFiles[0].label).toEqual("STEP:STDOUT(101)"); expect(spoolFiles[0].owner).toEqual("fake"); jest.spyOn(ZoweExplorerApiRegister, "getJesApi").mockReturnValueOnce({ @@ -363,7 +363,7 @@ describe("ZoweJobNode unit tests - Function getChildren", () => { globalMocks.testJobNode.dirty = true; const spoolFilesAfter = await globalMocks.testJobNode.getChildren(); expect(spoolFilesAfter.length).toBe(1); - expect(spoolFilesAfter[0].label).toEqual("101 - STEP:STDOUT"); + expect(spoolFilesAfter[0].label).toEqual("STEP:STDOUT(101)"); expect(spoolFilesAfter[0].owner).toEqual("fake"); }); @@ -388,7 +388,7 @@ describe("ZoweJobNode unit tests - Function getChildren", () => { globalMocks.testJobNode.session.ISession = globalMocks.testSessionNoCred; const spoolFiles = await globalMocks.testJobNode.getChildren(); expect(spoolFiles.length).toBe(1); - expect(spoolFiles[0].label).toEqual("101 - STEP:STDOUT"); + expect(spoolFiles[0].label).toEqual("STEP:STDOUT(101)"); expect(spoolFiles[0].owner).toEqual("*"); }); @@ -477,9 +477,9 @@ describe("ZoweJobNode unit tests - Function getChildren", () => { jest.spyOn(contextually, "isSession").mockReturnValueOnce(false); const spoolFiles = await globalMocks.testJobNode.getChildren(); expect(spoolFiles.length).toBe(3); - expect(spoolFiles[0].label).toBe("101 - JES2:JESMSGLG"); - expect(spoolFiles[1].label).toBe("101 - JES2:JESJCL"); - expect(spoolFiles[2].label).toBe("101 - JES2:JESYSMSG"); + expect(spoolFiles[0].label).toBe("JES2:JESMSGLG(101)"); + expect(spoolFiles[1].label).toBe("JES2:JESJCL(101)"); + expect(spoolFiles[2].label).toBe("JES2:JESYSMSG(101)"); }); it("Check that jobs with duplicate DD names do not overwrite each other", async () => { @@ -510,11 +510,11 @@ describe("ZoweJobNode unit tests - Function getChildren", () => { jest.spyOn(contextually, "isSession").mockReturnValueOnce(false); const spoolFiles = await globalMocks.testJobNode.getChildren(); expect(spoolFiles.length).toBe(5); - expect(spoolFiles[0].label).toBe("101 - JES2:JESMSGLG - TEST"); - expect(spoolFiles[1].label).toBe("101 - JES2:JESJCL"); - expect(spoolFiles[2].label).toBe("101 - JES2:JESYSMSG"); - expect(spoolFiles[3].label).toBe("12 - SOMEJOB:TEST"); - expect(spoolFiles[4].label).toBe("13 - SOMEJOB:TEST"); + expect(spoolFiles[0].label).toBe("JES2:JESMSGLG(101) - TEST"); + expect(spoolFiles[1].label).toBe("JES2:JESJCL(101)"); + expect(spoolFiles[2].label).toBe("JES2:JESYSMSG(101)"); + expect(spoolFiles[3].label).toBe("SOMEJOB:TEST(12)"); + expect(spoolFiles[4].label).toBe("SOMEJOB:TEST(13)"); }); }); diff --git a/packages/zowe-explorer/src/job/ZoweJobNode.ts b/packages/zowe-explorer/src/job/ZoweJobNode.ts index ee69947531..80c1b41a5f 100644 --- a/packages/zowe-explorer/src/job/ZoweJobNode.ts +++ b/packages/zowe-explorer/src/job/ZoweJobNode.ts @@ -143,9 +143,9 @@ export class ZoweJobNode extends ZoweTreeNode implements IZoweJobTreeNode { const procstep = spool.procstep ? spool.procstep : undefined; let newLabel: string; if (procstep) { - newLabel = `${spool.id} - ${spool.stepname}:${spool.ddname} - ${procstep}`; + newLabel = `${spool.stepname}:${spool.ddname}(${spool.id}) - ${procstep}`; } else { - newLabel = `${spool.id} - ${spool.stepname}:${spool.ddname}`; + newLabel = `${spool.stepname}:${spool.ddname}(${spool.id})`; } // Only look for existing node w/ procstep if spool file has a procstep, From 7adc46407eb87314d1dde6984d3ee447555fa4bc Mon Sep 17 00:00:00 2001 From: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:08:18 -0500 Subject: [PATCH 54/71] fix tests Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> --- .vscode/launch.json | 6 +- .../__unit__/Profiles.retired.test.ts | 3106 ----------------- .../api/ZoweExplorerZosmfApi.unit.test.ts | 9 +- .../__unit__/dataset/actions.unit.test.ts | 10 +- .../__unit__/shared/refresh.unit.test.ts | 15 +- .../__unit__/uss/ZoweUSSNode.unit.test.ts | 2 +- 6 files changed, 15 insertions(+), 3133 deletions(-) delete mode 100644 packages/zowe-explorer/__tests__/__unit__/Profiles.retired.test.ts diff --git a/.vscode/launch.json b/.vscode/launch.json index 9170a108b1..a96d7680c0 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -47,9 +47,9 @@ "type": "node", "name": "Zowe Explorer Unit Tests (Jest)", "request": "launch", - "program": "${workspaceFolder}/node_modules/yarn/bin/yarn.js", - "args": ["run", "test"], - "cwd": "${workspaceFolder}", + "program": "${workspaceFolder}/node_modules/jest/bin/jest.js", + "args": ["-i"], + "cwd": "${workspaceFolder}/packages/zowe-explorer", "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", "smartStep": true, diff --git a/packages/zowe-explorer/__tests__/__unit__/Profiles.retired.test.ts b/packages/zowe-explorer/__tests__/__unit__/Profiles.retired.test.ts deleted file mode 100644 index f737b6371a..0000000000 --- a/packages/zowe-explorer/__tests__/__unit__/Profiles.retired.test.ts +++ /dev/null @@ -1,3106 +0,0 @@ -/** - * 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 { -// createISessionWithoutCredentials, -// createTreeView, -// createIProfile, -// createInstanceOfProfile, -// createQuickPickItem, -// createQuickPickContent, -// createInputBox, -// createSessCfgFromArgs, -// createPersistentConfig, -// createInvalidIProfile, -// createValidIProfile, -// createISession, -// createAltTypeIProfile, -// createInstanceOfProfileInfo, -// createInstanceOfProfilesCache, -// } from "../../__mocks__/mockCreators/shared"; -// import { createDatasetSessionNode, createDatasetTree } from "../../__mocks__/mockCreators/datasets"; -// import { createProfileManager, createTestSchemas } from "../../__mocks__/mockCreators/profiles"; -// import * as vscode from "vscode"; -// import * as utils from "../../src/utils/ProfilesUtils"; -// import * as child_process from "child_process"; -// import * as globals from "../../src/globals"; -// import { ValidProfileEnum, IZoweNodeType, ProfilesCache } from "@zowe/zowe-explorer-api"; -// import { ZosmfSession } from "@zowe/cli"; -// import { ZoweExplorerApiRegister } from "../../src/ZoweExplorerApiRegister"; -// import { Profiles } from "../../src/Profiles"; -// import { ZoweUSSNode } from "../../src/uss/ZoweUSSNode"; -// import { ZoweDatasetNode } from "../../src/dataset/ZoweDatasetNode"; -// import { Job } from "../../src/job/ZoweJobNode"; -// import { createUSSSessionNode, createUSSTree } from "../../__mocks__/mockCreators/uss"; -// import { createJobsTree, createIJobObject, createJobSessionNode } from "../../__mocks__/mockCreators/jobs"; - -// jest.mock("vscode"); -// jest.mock("child_process"); -// jest.mock("fs"); -// jest.mock("fs-extra"); - -// async function createGlobalMocks() { -// const newMocks = { -// mockShowInputBox: jest.fn(), -// mockGetConfiguration: jest.fn(), -// mockCreateQuickPick: jest.fn(), -// mockShowQuickPick: jest.fn(), -// mockShowInformationMessage: jest.fn(), -// mockGetInstance: jest.fn(), -// mockShowErrorMessage: jest.fn(), -// mockCreateInputBox: jest.fn(), -// mockLog: jest.fn(), -// mockProfileInstance: null, -// mockDebug: jest.fn(), -// mockError: jest.fn(), -// mockConfigurationTarget: jest.fn(), -// mockCreateSessCfgFromArgs: jest.fn(), -// testProfile: createValidIProfile(), -// testSession: createISession(), -// mockCliProfileManager: createProfileManager(), -// ProgressLocation: jest.fn().mockImplementation(() => { -// return { -// Notification: 15, -// }; -// }), -// withProgress: null, -// mockCallback: null, -// mockUrlInfo: { -// valid: true, -// protocol: "https", -// host: "fake.com", -// port: 143, -// }, -// mockGlobalProfileInfo: null, -// }; - -// newMocks.mockProfileInstance = createInstanceOfProfile(newMocks.testProfile); -// newMocks.mockGetInstance.mockReturnValue(newMocks.mockProfileInstance); -// newMocks.withProgress = jest.fn().mockImplementation((progLocation, callback) => { -// return newMocks.mockCallback; -// }); - -// Object.defineProperty(vscode.window, "showInformationMessage", { -// value: newMocks.mockShowInformationMessage, -// configurable: true, -// }); -// Object.defineProperty(vscode.window, "showInputBox", { value: newMocks.mockShowInputBox, configurable: true }); -// Object.defineProperty(vscode.window, "showErrorMessage", { -// value: newMocks.mockShowErrorMessage, -// configurable: true, -// }); -// Object.defineProperty(vscode.window, "showQuickPick", { value: newMocks.mockShowQuickPick, configurable: true }); -// Object.defineProperty(vscode.window, "createQuickPick", { -// value: newMocks.mockCreateQuickPick, -// configurable: true, -// }); -// Object.defineProperty(Profiles, "getInstance", { value: () => newMocks.mockGetInstance, configurable: true }); -// Object.defineProperty(globals, "LOG", { value: newMocks.mockLog, configurable: true }); -// Object.defineProperty(vscode.window, "createInputBox", { value: newMocks.mockCreateInputBox, configurable: true }); -// Object.defineProperty(globals.LOG, "debug", { value: newMocks.mockDebug, configurable: true }); -// Object.defineProperty(ZosmfSession, "createSessCfgFromArgs", { -// value: newMocks.mockCreateSessCfgFromArgs, -// configurable: true, -// }); -// Object.defineProperty(globals.LOG, "error", { value: newMocks.mockError, configurable: true }); -// Object.defineProperty(globals, "ISTHEIA", { get: () => false, configurable: true }); -// Object.defineProperty(vscode.window, "createTreeView", { value: jest.fn(), configurable: true }); -// Object.defineProperty(vscode.workspace, "getConfiguration", { -// value: newMocks.mockGetConfiguration, -// configurable: true, -// }); -// Object.defineProperty(vscode, "ConfigurationTarget", { -// value: newMocks.mockConfigurationTarget, -// configurable: true, -// }); -// Object.defineProperty(vscode, "ProgressLocation", { value: newMocks.ProgressLocation, configurable: true }); -// Object.defineProperty(vscode.window, "withProgress", { value: newMocks.withProgress, configurable: true }); -// Object.defineProperty(ProfilesCache, "getProfileInfo", { -// value: jest.fn(() => Promise.resolve(createInstanceOfProfileInfo())), -// configurable: true, -// }); - -// return newMocks; -// } - -// describe("Profiles Unit Tests - Function createZoweSession", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// session: createISessionWithoutCredentials(), -// treeView: createTreeView(), -// mockLoadNamedProfile: jest.fn(), -// imperativeProfile: createIProfile(), -// quickPickItem: createQuickPickItem(), -// qpPlaceholder: -// 'Choose "Create new..." to define a new profile or select an existing profile to add to the Data Set Explorer', -// profiles: null, -// testJobNode: createIJobObject(), -// testDatasetSessionNode: null, -// testUSSSessionNode: null, -// testJobsSessionNode: null, -// testDatasetTree: null, -// testUSSTree: null, -// testJobsTree: null, -// profileInstance: null, -// }; -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// newMocks.mockLoadNamedProfile.mockReturnValue(newMocks.imperativeProfile); -// newMocks.profileInstance.loadNamedProfile = newMocks.mockLoadNamedProfile; -// globalMocks.mockGetInstance.mockReturnValue(newMocks.profileInstance); -// newMocks.testDatasetSessionNode = createDatasetSessionNode(newMocks.session, newMocks.profileInstance); -// newMocks.testUSSSessionNode = createUSSSessionNode(newMocks.session, newMocks.profileInstance); -// newMocks.testJobsSessionNode = createJobSessionNode(newMocks.session, newMocks.profileInstance); -// newMocks.testDatasetTree = createDatasetTree(newMocks.testDatasetSessionNode, newMocks.treeView); -// newMocks.testUSSTree = createUSSTree([], [newMocks.testUSSSessionNode], newMocks.treeView); -// newMocks.testJobsTree = createJobsTree( -// newMocks.session, -// newMocks.testJobNode, -// newMocks.profileInstance, -// newMocks.treeView -// ); - -// return newMocks; -// } - -// it("Tests that createZoweSession fails if profile name is invalid", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const entered = undefined; -// globalMocks.mockShowInputBox.mockResolvedValueOnce(entered); - -// // Assert edge condition user cancels the input path box -// globalMocks.mockCreateQuickPick.mockReturnValue( -// createQuickPickContent(entered, [blockMocks.quickPickItem], blockMocks.qpPlaceholder) -// ); -// jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(blockMocks.quickPickItem); - -// await Profiles.getInstance().loadNamedProfile("profile1"); -// await blockMocks.profiles.createZoweSession(blockMocks.testDatasetTree); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toEqual( -// "Profile Name was not supplied. Operation Cancelled" -// ); -// }); - -// it("Tests that createZoweSession successfully creates a new session with profile name supplied by user", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const entered = undefined; -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); - -// // Assert edge condition user cancels the input path box -// globalMocks.mockCreateQuickPick.mockReturnValue( -// createQuickPickContent(entered, [blockMocks.quickPickItem], blockMocks.qpPlaceholder) -// ); -// jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(blockMocks.quickPickItem); - -// await blockMocks.profiles.createZoweSession(blockMocks.testDatasetTree); -// expect(blockMocks.testDatasetTree.addSession).toBeCalled(); -// expect(blockMocks.testDatasetTree.addSession.mock.calls[0][0]).toEqual({ newprofile: "fake" }); -// }); - -// it("Tests that createZoweSession correctly gets APIs available for USS tree", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const entered = undefined; -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); - -// const apiRegisterInstance = ZoweExplorerApiRegister.getInstance(); -// const registeredTypesSpy = jest.spyOn(apiRegisterInstance, "registeredUssApiTypes"); - -// globalMocks.mockCreateQuickPick.mockReturnValue( -// createQuickPickContent(entered, [blockMocks.quickPickItem], blockMocks.qpPlaceholder) -// ); -// jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(blockMocks.quickPickItem); - -// await blockMocks.profiles.createZoweSession(blockMocks.testUSSTree); -// expect(registeredTypesSpy).toBeCalled(); -// }); - -// it("Tests that createZoweSession correctly gets APIs available for dataset tree", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const entered = undefined; -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); - -// const apiRegisterInstance = ZoweExplorerApiRegister.getInstance(); -// const registeredTypesSpy = jest.spyOn(apiRegisterInstance, "registeredMvsApiTypes"); - -// globalMocks.mockCreateQuickPick.mockReturnValue( -// createQuickPickContent(entered, [blockMocks.quickPickItem], blockMocks.qpPlaceholder) -// ); -// jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(blockMocks.quickPickItem); - -// await blockMocks.profiles.createZoweSession(blockMocks.testDatasetTree); -// expect(registeredTypesSpy).toBeCalled(); -// }); - -// it("Tests that createZoweSession correctly gets APIs available for dataset tree", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const entered = undefined; -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); - -// const apiRegisterInstance = ZoweExplorerApiRegister.getInstance(); -// const registeredTypesSpy = jest.spyOn(apiRegisterInstance, "registeredJesApiTypes"); - -// globalMocks.mockCreateQuickPick.mockReturnValue( -// createQuickPickContent(entered, [blockMocks.quickPickItem], blockMocks.qpPlaceholder) -// ); -// jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(blockMocks.quickPickItem); - -// await blockMocks.profiles.createZoweSession(blockMocks.testJobsTree); -// expect(registeredTypesSpy).toBeCalled(); -// }); - -// it("Tests that createZoweSession successfully creates a new session with profile name selected from list by user", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const entered = ""; - -// // Assert edge condition user cancels the input path box -// const quickPickContent = createQuickPickContent(entered, [blockMocks.quickPickItem], blockMocks.qpPlaceholder); -// quickPickContent.label = "firstName"; -// globalMocks.mockCreateQuickPick.mockReturnValue(quickPickContent); -// jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(quickPickContent); - -// await blockMocks.profiles.createZoweSession(blockMocks.testDatasetTree); -// expect(blockMocks.testDatasetTree.addSession).toBeCalled(); -// expect(blockMocks.testDatasetTree.addSession.mock.calls[0][0]).toBe("firstName"); -// }); - -// it("Tests that createZoweSession successfully creates a new session with profile name selected from list by user by typing", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const entered = "fake"; - -// globalMocks.mockCreateQuickPick.mockReturnValue( -// createQuickPickContent(entered, [blockMocks.quickPickItem], blockMocks.qpPlaceholder) -// ); -// jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(blockMocks.quickPickItem); - -// await blockMocks.profiles.createZoweSession(blockMocks.testDatasetTree); -// expect(blockMocks.testDatasetTree.addSession).not.toBeCalled(); -// }); - -// it("Tests that createZoweSession fails if profile not selected", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const entered = ""; - -// // Assert edge condition user cancels the input path box -// const quickPickContent = createQuickPickContent(entered, [blockMocks.quickPickItem], blockMocks.qpPlaceholder); -// quickPickContent.label = undefined; -// globalMocks.mockCreateQuickPick.mockReturnValue(quickPickContent); -// jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(quickPickContent); - -// await blockMocks.profiles.createZoweSession(blockMocks.testDatasetTree); -// expect(blockMocks.testDatasetTree.addSession).not.toBeCalled(); -// }); - -// it("Tests that createZoweSession fails if createNewConnection fails", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const entered = "fake"; -// blockMocks.profileInstance.createNewConnection = jest -// .fn() -// .mockRejectedValue(new Error("create connection error")); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(entered); - -// globalMocks.mockCreateQuickPick.mockReturnValue( -// createQuickPickContent(entered, [blockMocks.quickPickItem], blockMocks.qpPlaceholder) -// ); -// jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(blockMocks.quickPickItem); -// const errorHandlingSpy = jest.spyOn(utils, "errorHandling"); - -// await blockMocks.profiles.createZoweSession(blockMocks.testDatasetTree); -// expect(errorHandlingSpy).toBeCalled(); -// expect(errorHandlingSpy.mock.calls[0][0]).toEqual(new Error("create connection error")); -// }); - -// it("Testing that createZoweSession with theia", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const entered = ""; -// const createZoweSessionSpy = jest.spyOn(blockMocks.profiles, "createZoweSession"); -// Object.defineProperty(globals, "ISTHEIA", { get: () => true, configurable: true }); -// globalMocks.mockCreateQuickPick.mockReturnValue( -// createQuickPickContent(entered, [blockMocks.quickPickItem], blockMocks.qpPlaceholder) -// ); -// jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(blockMocks.quickPickItem); - -// await blockMocks.profiles.createZoweSession(blockMocks.testDatasetTree); -// expect(createZoweSessionSpy).toHaveBeenCalled(); -// }); - -// it("Testing that createZoweSession with theia fails if no choice", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const entered = null; -// const createZoweSessionSpy = jest.spyOn(blockMocks.profiles, "createZoweSession"); -// Object.defineProperty(globals, "ISTHEIA", { get: () => true, configurable: true }); -// globalMocks.mockCreateQuickPick.mockReturnValue( -// createQuickPickContent(entered, [blockMocks.quickPickItem], blockMocks.qpPlaceholder) -// ); -// jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(blockMocks.quickPickItem); - -// await blockMocks.profiles.createZoweSession(blockMocks.testDatasetTree); -// expect(createZoweSessionSpy).toHaveBeenCalled(); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// }); -// }); - -// describe("Profiles Unit Tests - Function createNewConnection", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// session: createISessionWithoutCredentials(), -// treeView: createTreeView(), -// mockLoadNamedProfile: jest.fn(), -// imperativeProfile: createIProfile(), -// datasetSessionNode: null, -// inputBox: createInputBox("input"), -// quickPickItem: createQuickPickItem(), -// profiles: null, -// testSchemas: createTestSchemas(), -// testDatasetTree: null, -// profileInstance: null, -// }; -// newMocks.imperativeProfile.name = "profile1"; -// newMocks.imperativeProfile.profile.user = "fake"; -// newMocks.imperativeProfile.profile.password = "1234"; -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// newMocks.mockLoadNamedProfile.mockReturnValue(newMocks.imperativeProfile); -// newMocks.profileInstance.loadNamedProfile = newMocks.mockLoadNamedProfile; -// globalMocks.mockGetInstance.mockReturnValue(newMocks.profileInstance); -// globalMocks.mockCreateInputBox.mockReturnValue(newMocks.inputBox); -// newMocks.datasetSessionNode = createDatasetSessionNode(newMocks.session, newMocks.imperativeProfile); -// newMocks.testDatasetTree = createDatasetTree(newMocks.datasetSessionNode, newMocks.treeView); - -// return newMocks; -// } - -// it("Tests that createNewConnection fails if profileName is missing", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// await blockMocks.profiles.createNewConnection(""); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe( -// "Profile name was not supplied. Operation Cancelled" -// ); -// }); - -// it("Tests that createNewConnection fails if profileType is missing", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve(undefined); -// }); - -// await blockMocks.profiles.createNewConnection(blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe( -// "No profile type was chosen. Operation Cancelled" -// ); -// }); - -// it("Tests that createNewConnection fails if zOSMF URL is missing", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("zosmf"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[0]; -// blockMocks.profiles.getUrl = () => -// new Promise((resolve) => { -// resolve(undefined); -// }); - -// await blockMocks.profiles.createNewConnection(blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe( -// "No valid value for z/OS URL. Operation Cancelled" -// ); -// }); - -// it("Tests that createNewConnection fails if username is missing", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("zosmf"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[0]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(undefined); - -// await blockMocks.profiles.createNewConnection(blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); -// }); - -// it("Tests that createNewConnection fails if password is missing", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("zosmf"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[0]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(undefined); - -// await blockMocks.profiles.createNewConnection(blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); -// }); - -// it("Tests that createNewConnection fails if rejectUnauthorized is missing", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("zosmf"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[0]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(undefined); - -// await blockMocks.profiles.createNewConnection(blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); -// }); - -// it("Tests that createNewConnection fails if profileName is a duplicate", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("zosmf"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[0]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockShowInputBox.mockResolvedValue("fake"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("False - Accept connections with self-signed certificates"); - -// await blockMocks.profiles.createNewConnection(blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowErrorMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowErrorMessage.mock.calls[0][0]).toBe( -// "Profile name already exists. Please create a profile using a different name" -// ); -// }); - -// it("Tests that createNewConnection creates a new profile", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("zosmf"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[0]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockShowInputBox.mockResolvedValue("fake"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("False - Accept connections with self-signed certificates"); - -// await blockMocks.profiles.createNewConnection("fake"); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile fake was created."); -// }); - -// it("Tests that createNewConnection creates a new profile with optional credentials", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("zosmf"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[0]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockShowInputBox.mockResolvedValue(""); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("False - Accept connections with self-signed certificates"); - -// await blockMocks.profiles.createNewConnection("fake"); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile fake was created."); -// }); - -// it("Tests that createNewConnection stores default port value if 443 is included with hostname", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("zosmf"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[0]; -// blockMocks.profiles.urlInfo = () => -// Promise.resolve({ -// valid: true, -// protocol: "https", -// host: "fake.com", -// port: 443, -// }); -// globalMocks.mockShowInputBox.mockResolvedValue(""); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("False - Accept connections with self-signed certificates"); - -// await blockMocks.profiles.createNewConnection("fake"); - -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile fake was created."); -// }); - -// it("Tests that createNewConnection creates a new profile twice in a row", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("zosmf"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[0]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockShowInputBox.mockResolvedValue("fake1"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("False - Accept connections with self-signed certificates"); - -// await blockMocks.profiles.createNewConnection("fake1"); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile fake1 was created."); - -// globalMocks.mockShowInputBox.mockReset(); -// globalMocks.mockShowInformationMessage.mockReset(); -// globalMocks.mockShowInputBox.mockResolvedValue("fake2"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("True - Reject connections with self-signed certificates"); - -// await blockMocks.profiles.createNewConnection("fake2"); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile fake2 was created."); -// }); - -// it("Tests that createNewConnection creates an alternate profile", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[1]; -// blockMocks.profiles.urlInfo = () => -// Promise.resolve({ -// valid: true, -// protocol: "https", -// host: "fake.com", -// port: 234, -// }); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("False"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("13"); - -// await blockMocks.profiles.createNewConnection("alternate"); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile alternate was created."); -// }); - -// it("Tests that createNewConnection creates an alternate profile with default aNumber value", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[1]; -// blockMocks.profiles.urlInfo = () => -// Promise.resolve({ -// valid: true, -// protocol: "https", -// host: "fake.com", -// port: 234, -// }); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("False"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(""); - -// await blockMocks.profiles.createNewConnection("alternate"); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile alternate was created."); -// }); - -// it("Tests that createNewConnection creates an alternate profile with undefined aNumber value", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[2]; -// blockMocks.profiles.urlInfo = () => -// Promise.resolve({ -// valid: true, -// protocol: "https", -// host: "fake.com", -// port: 234, -// }); - -// globalMocks.mockShowInputBox.mockResolvedValueOnce(undefined); - -// await blockMocks.profiles.createNewConnection("alternate"); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); -// }); - -// it("Tests that createNewConnection creates an alternate profile with null aNumber value", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[4]; -// blockMocks.profiles.urlInfo = () => -// Promise.resolve({ -// valid: true, -// protocol: "https", -// host: "fake.com", -// port: 234, -// }); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("False"); - -// await blockMocks.profiles.createNewConnection("alternate"); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile alternate was created."); -// }); - -// it("Tests that createNewConnection creates an alternate profile with default port value", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[1]; -// blockMocks.profiles.urlInfo = () => -// Promise.resolve({ -// valid: true, -// protocol: "https", -// host: "fake.com", -// port: undefined, -// }); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("0"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("True"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("126"); - -// await blockMocks.profiles.createNewConnection("alternate"); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile alternate was created."); -// }); - -// it("Tests that createNewConnection fails to create an alternate profile if port is invalid", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[1]; -// blockMocks.profiles.urlInfo = () => -// Promise.resolve({ -// valid: true, -// protocol: "https", -// host: "fake.com", -// port: undefined, -// }); -// blockMocks.profiles.portInfo = () => -// new Promise((resolve) => { -// resolve("fake"); -// }); - -// await blockMocks.profiles.createNewConnection("fake"); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe( -// "Invalid Port number provided or operation was cancelled" -// ); -// }); - -// it("Tests that createNewConnection fails to create an alternate profile if aBoolean is invalid", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[1]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockShowInputBox.mockResolvedValue("fake"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce(undefined); - -// await blockMocks.profiles.createNewConnection("fake"); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); -// }); - -// it("Tests that createNewConnection fails to create an alternate profile if aOther is undefined", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[2]; -// blockMocks.profiles.urlInfo = () => -// Promise.resolve({ -// valid: true, -// protocol: "https", -// host: "fake.com", -// port: 234, -// }); - -// globalMocks.mockShowInputBox.mockResolvedValueOnce("123"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(undefined); - -// await blockMocks.profiles.createNewConnection("fake"); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); -// }); - -// it("Tests that createNewConnection creates an alternate profile with an optional port", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => -// new Promise((resolve) => { -// resolve(blockMocks.testSchemas[2]); -// }); -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(Number("143")); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(""); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "fake", base64EncodedAuth: "fake" }, -// }); - -// await blockMocks.profiles.createNewConnection("fake"); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile fake was created."); -// }); -// }); - -// describe("Profiles Unit Tests - Function promptCredentials", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// mockLoadNamedProfile: jest.fn(), -// imperativeProfile: createIProfile(), -// profiles: null, -// profileInstance: null, -// }; -// newMocks.imperativeProfile.name = "profile1"; -// newMocks.imperativeProfile.profile.user = "fake"; -// newMocks.imperativeProfile.profile.password = "1234"; -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.imperativeProfile); -// newMocks.profiles.allProfiles[1].profile = { user: "test", password: "test" }; -// newMocks.profiles.loadNamedProfile = newMocks.mockLoadNamedProfile; - -// const mockMvsApi = await ZoweExplorerApiRegister.getMvsApi(globalMocks.testProfile); -// const getMvsApiMock = jest.fn(); -// getMvsApiMock.mockReturnValue(mockMvsApi); -// globalMocks.testSession.ISession.base64EncodedAuth = "fake"; -// ZoweExplorerApiRegister.getMvsApi = getMvsApiMock.bind(ZoweExplorerApiRegister); -// jest.spyOn(mockMvsApi, "getSession").mockReturnValue(globalMocks.testSession); - -// globalMocks.mockProfileInstance.getProfileInfo().usingTeamConfig = true; -// globalMocks.mockProfileInstance.getProfileInfo().getAllProfiles = [ -// { -// profName: newMocks.imperativeProfile.name, -// profType: newMocks.imperativeProfile.type, -// profile: newMocks.imperativeProfile.name, -// profLoc: { osLoc: ["dummy"] }, -// }, -// ]; -// globalMocks.mockProfileInstance.getProfileInfo().mergeArgsForProfile = { knownArgs: [], missingArgs: [] }; -// // Object.defineProperty(ProfilesCache, "getConfigInstance", { -// // value: jest.fn(() => { -// // return { -// // usingTeamConfig: true, -// // getAllProfiles: () => [ -// // { -// // profName: newMocks.imperativeProfile.name, -// // profType: newMocks.imperativeProfile.type, -// // profile: newMocks.imperativeProfile.name, -// // profLoc: { osLoc: ["dummy"] }, -// // }, -// // ], -// // mergeArgsForProfile: () => { -// // return { knownArgs: [], missingArgs: [] }; -// // }, -// // updateProperty: jest.fn(), -// // }; -// // }), -// // }); - -// return newMocks; -// } - -// it("Tests that promptCredentials is executed successfully", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.imperativeProfile.profile = { user: undefined, password: undefined }; -// blockMocks.mockLoadNamedProfile.mockReturnValue(blockMocks.imperativeProfile); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "fake", base64EncodedAuth: "fake" }, -// }); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInformationMessage.mockResolvedValueOnce([1]); - -// const res = await blockMocks.profiles.promptCredentials(blockMocks.imperativeProfile.name); -// expect(res).toEqual(["fake", "fake", "fake"]); -// }); - -// it("Tests that promptCredentials is executed successfully with rePrompt equals true", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.imperativeProfile.profile = { user: "fake", password: "fake" }; -// blockMocks.mockLoadNamedProfile.mockReturnValue(blockMocks.imperativeProfile); -// globalMocks.mockShowInformationMessage.mockResolvedValueOnce("Save Credentials"); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "fake", base64EncodedAuth: "fake" }, -// }); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInformationMessage.mockResolvedValueOnce([1]); - -// const res = await blockMocks.profiles.promptCredentials(blockMocks.imperativeProfile.name, true); -// expect(res).toEqual(["fake", "fake", "fake"]); -// }); - -// it("Tests that promptCredentials is executed successfully when profile doesn't have a username", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.imperativeProfile.profile = { user: undefined, password: "oldfake" }; -// blockMocks.mockLoadNamedProfile.mockReturnValue(blockMocks.imperativeProfile); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "oldfake", base64EncodedAuth: "fake" }, -// }); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("oldfake"); -// globalMocks.mockShowInformationMessage.mockResolvedValueOnce([1]); -// globalMocks.testSession.ISession.password = "oldfake"; - -// const res = await blockMocks.profiles.promptCredentials(blockMocks.imperativeProfile.name); -// expect(res).toEqual(["fake", "oldfake", "fake"]); -// }); - -// it("Tests that promptCredentials is executed successfully when profile doesn't have a password", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.imperativeProfile.profile = { user: "oldfake", password: undefined }; -// blockMocks.mockLoadNamedProfile.mockReturnValue(blockMocks.imperativeProfile); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "oldfake", password: "fake", base64EncodedAuth: "fake" }, -// }); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("oldfake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInformationMessage.mockResolvedValueOnce([1]); -// globalMocks.testSession.ISession.user = "oldfake"; - -// const res = await blockMocks.profiles.promptCredentials(blockMocks.imperativeProfile.name); -// expect(res).toEqual(["oldfake", "fake", "fake"]); -// }); - -// it("Tests that promptCredentials is executed successfully when profile already contains username/password", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.imperativeProfile.profile = { user: "oldfake", password: "oldfake" }; -// blockMocks.mockLoadNamedProfile.mockReturnValue(blockMocks.imperativeProfile); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "fake", base64EncodedAuth: "fake" }, -// }); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInformationMessage.mockResolvedValueOnce("Save Credentials"); - -// const res = await blockMocks.profiles.promptCredentials(blockMocks.imperativeProfile.name); -// expect(res).toEqual(["fake", "fake", "fake"]); -// }); - -// it("Tests that promptCredentials fails if username is invalid", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.imperativeProfile.profile = { user: undefined, password: undefined }; -// blockMocks.mockLoadNamedProfile.mockReturnValue(blockMocks.imperativeProfile); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(undefined); - -// const res = await blockMocks.profiles.promptCredentials(blockMocks.imperativeProfile.name); -// expect(res).toBeUndefined(); -// }); - -// it("Tests that promptCredentials fails if password is invalid", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.imperativeProfile.profile = { user: undefined, password: undefined }; -// blockMocks.mockLoadNamedProfile.mockReturnValue(blockMocks.imperativeProfile); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(undefined); - -// const res = await blockMocks.profiles.promptCredentials(blockMocks.imperativeProfile.name); -// expect(res).toBeUndefined(); -// }); -// }); - -// describe("Profiles Unit Tests - Function validateAndParseUrl", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// profiles: null, -// profileInstance: null, -// }; -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); - -// return newMocks; -// } - -// it("Tests that validateAndParseUrl returns invalid for invalid URL", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const input = "fake/url"; -// const res = await blockMocks.profiles.validateAndParseUrl(input); -// expect(res.valid).toBe(false); -// }); - -// it("Tests that validateAndParseUrl successfully validates a URL with a port", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const input = "https://fake:143"; - -// const res = await blockMocks.profiles.validateAndParseUrl(input); -// expect(res.valid).toBe(true); -// expect(res.host).toBe("fake"); -// // expect(res.port).toBe(143); -// }); - -// it("Tests that validateAndParseUrl returns invalid for invalid port", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const res = await blockMocks.profiles.validateAndParseUrl("http://10.142.0.23:9999999999/some/path"); -// expect(res.valid).toBe(false); -// }); - -// it("Tests that validateAndParseUrl returns invalid for invalid URL syntax", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const res = await blockMocks.profiles.validateAndParseUrl("https://fake::80"); -// expect(res.valid).toBe(false); -// }); -// }); - -// describe("Profiles Unit Tests - Function getProfileType", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// profiles: null, -// profileInstance: null, -// }; -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); - -// return newMocks; -// } - -// it("Tests that getProfileType returns correct profile type when receiving only one type", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// ZoweExplorerApiRegister.getInstance().registeredApiTypes = () => ["zosmf"]; - -// const response = await blockMocks.profiles.getProfileType(); -// expect(response).toEqual("zosmf"); -// }); - -// it("Tests that getProfileType returns correct profile type when receiving multiple types", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// ZoweExplorerApiRegister.getInstance().registeredApiTypes = () => ["zosmf", "alternate"]; -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("alternate"); - -// const res = await blockMocks.profiles.getProfileType(); -// expect(res).toEqual("alternate"); -// }); -// }); - -// describe("Profiles Unit Tests - Function getSchema", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// profiles: null, -// testSchemas: createTestSchemas(), -// profileInstance: null, -// }; -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); - -// return newMocks; -// } - -// it("Tests that getSchema returns correct schema for zosmf profile", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// blockMocks.profiles.getCliProfileManager = () => globalMocks.mockCliProfileManager; - -// const response = blockMocks.profiles.getSchema("zosmf"); -// // expect(response).toEqual(blockMocks.testSchemas[3]); -// }); -// }); - -// describe("Profiles Unit Tests - Function updateProfile", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// imperativeProfile: createIProfile(), -// changedImperativeProfile: createIProfile(), -// profileInfo: null, -// log: Logger.getAppLogger(), -// profiles: null, -// profileInstance: null, -// }; -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// newMocks.changedImperativeProfile.profile = { user: "test2", password: "test2", rejectUnauthorize: true }; -// newMocks.profileInfo = newMocks.changedImperativeProfile; -// Object.defineProperty(globalMocks.mockCliProfileManager, "load", { -// value: jest.fn(() => { -// return new Promise((resolve) => { -// resolve(newMocks.imperativeProfile); -// }); -// }), -// configurable: true, -// }); -// Object.defineProperty(globalMocks.mockCliProfileManager, "update", { value: jest.fn(), configurable: true }); -// newMocks.profiles.getCliProfileManager = () => globalMocks.mockCliProfileManager; - -// return newMocks; -// } - -// it("Tests that updateProfile successfully updates a profile of undefined type", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// blockMocks.profileInfo.type = undefined; - -// await blockMocks.profiles.updateProfile(blockMocks.profileInfo); -// expect(blockMocks.imperativeProfile.profile).toEqual(blockMocks.changedImperativeProfile.profile); -// }); - -// it("Tests that updateProfile successfully updates a profile of defined type (zosmf)", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// await blockMocks.profiles.updateProfile(blockMocks.profileInfo); -// expect(blockMocks.imperativeProfile.profile).toEqual(blockMocks.changedImperativeProfile.profile); -// }); -// }); - -// describe("Profiles Unit Tests - Function editSession", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// session: createISessionWithoutCredentials(), -// mockLoadNamedProfile: jest.fn(), -// imperativeProfile: createIProfile(), -// datasetSessionNode: null, -// inputBox: createInputBox("input"), -// profiles: null, -// testSchemas: createTestSchemas(), -// profileInstance: null, -// }; -// newMocks.imperativeProfile.name = "profile1"; -// newMocks.imperativeProfile.profile.user = "fake"; -// newMocks.imperativeProfile.profile.password = "1234"; -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// newMocks.mockLoadNamedProfile.mockReturnValue(newMocks.imperativeProfile); -// globalMocks.mockCreateInputBox.mockReturnValue(newMocks.inputBox); -// newMocks.datasetSessionNode = createDatasetSessionNode(newMocks.session, newMocks.imperativeProfile); - -// return newMocks; -// } - -// it("Tests that editSession successfully edits a session of type zosmf", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("zosmf"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[0]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValue("fake"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("False - Accept connections with self-signed certificates"); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "fake", base64EncodedAuth: "fake" }, -// }); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile was successfully updated"); -// }); - -// it("Tests that editSession stores default port value if 443 is included with hostname", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("zosmf"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[0]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValue("fake"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("False - Accept connections with self-signed certificates"); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "fake", base64EncodedAuth: "fake" }, -// }); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile was successfully updated"); -// }); - -// it("Tests that editSession successfully edits a session of type alternate", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[1]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("False"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("123"); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "fake", base64EncodedAuth: "fake" }, -// }); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile was successfully updated"); -// }); - -// it("Tests that editSession successfully edits a session of type alternate with entered port number", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[1]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("123"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("False"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("123"); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "fake", base64EncodedAuth: "fake" }, -// }); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile was successfully updated"); -// }); - -// it("Tests that editSession successfully edits a session of type alternate with default aNumber", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[1]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("False"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(""); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "fake", base64EncodedAuth: "fake" }, -// }); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile was successfully updated"); -// }); - -// it("Tests that editSession successfully edits a session of type alternate with empty aNumber", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[2]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(""); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(""); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "fake", base64EncodedAuth: "fake" }, -// }); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile was successfully updated"); -// }); - -// it("Tests that editSession successfully edits a session of type alternate with undefined aNumber", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[2]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("False"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(undefined); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "fake", base64EncodedAuth: "fake" }, -// }); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); -// }); - -// it("Tests that editSession successfully edits a session of type alternate with null aNumber", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[4]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("False"); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "fake", base64EncodedAuth: "fake" }, -// }); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); -// }); - -// it("Tests that editSession successfully edits a session of type alternate with empty aOther value", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[2]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("123"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(""); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "fake", base64EncodedAuth: "fake" }, -// }); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile was successfully updated"); -// }); - -// it("Tests that editSession successfully edits a session of type alternate with undefined aOther value", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[2]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("123"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(undefined); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "fake", base64EncodedAuth: "fake" }, -// }); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); -// }); - -// it("Tests that editSession fails with error", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("zosmf"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[0]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValue("fake"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("False - Accept connections with self-signed certificates"); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowErrorMessage.mock.calls.length).toEqual(1); -// }); - -// it("Tests that editSession fails with invalid url supplied", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("zosmf"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[0]; -// blockMocks.profiles.getUrl = () => Promise.resolve(undefined); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe( -// "No valid value for z/OS URL. Operation Cancelled" -// ); -// }); - -// it("Tests that editSession fails with invalid username supplied", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("zosmf"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[0]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(undefined); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); -// }); - -// it("Tests that editSession fails with invalid password supplied", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("zosmf"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[0]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(undefined); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); -// }); - -// it("Tests that editSession fails with invalid rejectUnauthorized value supplied", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("zosmf"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[0]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(undefined); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); -// }); - -// it("Tests that editSession fails with invalid aBoolean value supplied on alternate profile type", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[1]; -// blockMocks.profiles.urlInfo = () => Promise.resolve(globalMocks.mockUrlInfo); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce(undefined); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); -// }); - -// it("Tests that editSession fails if invalid port value supplied", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.getProfileType = () => -// new Promise((resolve) => { -// resolve("alternate"); -// }); -// blockMocks.profiles.getSchema = () => blockMocks.testSchemas[1]; -// blockMocks.profiles.urlInfo = () => -// Promise.resolve({ -// valid: true, -// protocol: "https", -// host: "fake.com", -// port: undefined, -// }); -// globalMocks.mockCreateInputBox.mockReturnValue(blockMocks.inputBox); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("False"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("123"); -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "fake", base64EncodedAuth: "fake" }, -// }); - -// await blockMocks.profiles.editSession(blockMocks.imperativeProfile, blockMocks.imperativeProfile.name); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe( -// "Invalid Port number provided or operation was cancelled" -// ); -// }); -// }); - -// describe("Profiles Unit Tests - Function deleteProfile", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// profiles: null, -// testDatasetTree: null, -// testUSSTree: null, -// testJobTree: null, -// mockLoadNamedProfile: jest.fn(), -// treeView: createTreeView(), -// datasetSessionNode: null, -// USSSessionNode: null, -// iJob: createIJobObject(), -// imperativeProfile: createIProfile(), -// session: null, - -// testSchemas: createTestSchemas(), -// profileInstance: null, -// }; -// globalMocks.mockCreateSessCfgFromArgs.mockReturnValue({ -// ISession: { user: "fake", password: "fake", base64EncodedAuth: "fake" }, -// }); -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.session = createSessCfgFromArgs(newMocks.imperativeProfile); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// newMocks.mockLoadNamedProfile.mockReturnValue(newMocks.imperativeProfile); -// globalMocks.mockGetInstance.mockReturnValue(newMocks.profileInstance); -// newMocks.datasetSessionNode = createDatasetSessionNode(newMocks.session, newMocks.imperativeProfile); -// newMocks.USSSessionNode = createUSSSessionNode(newMocks.session, newMocks.imperativeProfile); -// newMocks.testDatasetTree = createDatasetTree(newMocks.datasetSessionNode, newMocks.treeView); -// newMocks.testUSSTree = createUSSTree([], [newMocks.USSSessionNode], newMocks.treeView); -// newMocks.testJobTree = createJobsTree( -// newMocks.session, -// newMocks.iJob, -// newMocks.profileInstance, -// newMocks.treeView -// ); -// newMocks.testDatasetTree.addFileHistory("[profile1]: TEST.NODE"); -// newMocks.testUSSTree.addFileHistory("[profile1]: /u/myuser"); -// globalMocks.mockGetConfiguration.mockReturnValue(createPersistentConfig()); - -// return newMocks; -// } - -// it("Tests that deleteProfile successfully deletes a profile from the command palette", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("profile1"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("Delete"); - -// await blockMocks.profiles.deleteProfile( -// blockMocks.testDatasetTree, -// blockMocks.testUSSTree, -// blockMocks.testJobTree -// ); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile profile1 was deleted."); -// }); - -// it("Tests that deleteProfile successfully handles missing profile name selection", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// globalMocks.mockShowQuickPick.mockResolvedValueOnce(undefined); - -// await blockMocks.profiles.deleteProfile( -// blockMocks.testDatasetTree, -// blockMocks.testUSSTree, -// blockMocks.testJobTree -// ); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); -// }); - -// it("Tests that deleteProfile successfully handles case where user selects No", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("profile1"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("No"); - -// await blockMocks.profiles.deleteProfile( -// blockMocks.testDatasetTree, -// blockMocks.testUSSTree, -// blockMocks.testJobTree -// ); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); -// }); - -// it("Tests that deleteProfile successfully executes when there are no profiles to delete", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.profiles.allProfiles = []; - -// await blockMocks.profiles.deleteProfile( -// blockMocks.testDatasetTree, -// blockMocks.testUSSTree, -// blockMocks.testJobTree -// ); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("No profiles available"); -// }); - -// it("Tests that deleteProfile successfully deletes profile from context menu", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const dsNode = new ZoweDatasetNode( -// "testNode", -// vscode.TreeItemCollapsibleState.Expanded, -// null, -// blockMocks.session, -// undefined, -// undefined, -// blockMocks.imperativeProfile -// ); -// dsNode.contextValue = globals.DS_SESSION_CONTEXT; -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("Delete"); - -// await blockMocks.profiles.deleteProfile( -// blockMocks.testDatasetTree, -// blockMocks.testUSSTree, -// blockMocks.testJobTree, -// dsNode -// ); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile sestest was deleted."); -// }); - -// it("Tests that deleteProfile successfully deletes a profile from a dataset tree", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const startLength = blockMocks.testDatasetTree.mSessionNodes.length; -// const favoriteLength = blockMocks.testDatasetTree.mFavorites.length; -// // Use existing test session node -// const dsNode = blockMocks.testDatasetTree.mSessionNodes[0]; -// // Set up dsNode in Favorites -// const favedDsNode = dsNode; -// favedDsNode.contextValue = dsNode.contextValue + globals.FAV_SUFFIX; -// const dsProfileNodeInFavs = new ZoweDatasetNode( -// `sestest`, -// vscode.TreeItemCollapsibleState.None, -// blockMocks.testDatasetTree.mFavoriteSession, -// blockMocks.session, -// globals.FAV_PROFILE_CONTEXT, -// null, -// dsNode.getProfile() -// ); -// dsProfileNodeInFavs.children.push(favedDsNode); -// blockMocks.testDatasetTree.mFavorites.push(dsProfileNodeInFavs); - -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("Delete"); - -// await blockMocks.profiles.deleteProfile( -// blockMocks.testDatasetTree, -// blockMocks.testUSSTree, -// blockMocks.testJobTree, -// dsNode -// ); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile sestest was deleted."); -// expect(blockMocks.testDatasetTree.mSessionNodes.length).toEqual(startLength - 1); -// expect(blockMocks.testDatasetTree.mFavorites.length).toEqual(favoriteLength); -// }); - -// it("Tests that deleteProfile successfully deletes a profile from a USS tree", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const startLength = blockMocks.testUSSTree.mSessionNodes.length; -// const favoriteLength = blockMocks.testUSSTree.mFavorites.length; -// // Set up session node in USS -// const ussNode = new ZoweUSSNode( -// "testNode", -// vscode.TreeItemCollapsibleState.Expanded, -// null, -// blockMocks.session, -// null, -// false, -// blockMocks.imperativeProfile.name, -// null, -// blockMocks.imperativeProfile -// ); -// ussNode.contextValue = globals.USS_SESSION_CONTEXT; -// ussNode.profile = blockMocks.imperativeProfile; -// blockMocks.testUSSTree.mSessionNodes.push(ussNode); -// // Set up favorites -// const favProfileNode = new ZoweUSSNode("sestest", vscode.TreeItemCollapsibleState.Collapsed, null, null, null); -// favProfileNode.contextValue = globals.FAV_PROFILE_CONTEXT; -// const ussNodeAsFavorite = new ZoweUSSNode( -// "testNode", -// vscode.TreeItemCollapsibleState.None, -// favProfileNode, -// blockMocks.session, -// null, -// false, -// blockMocks.imperativeProfile.name, -// null, -// blockMocks.imperativeProfile -// ); -// favProfileNode.children.push(ussNodeAsFavorite); -// blockMocks.testUSSTree.mFavorites.push(favProfileNode); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("Delete"); - -// await blockMocks.profiles.deleteProfile( -// blockMocks.testDatasetTree, -// blockMocks.testUSSTree, -// blockMocks.testJobTree, -// ussNode -// ); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile sestest was deleted."); -// expect(blockMocks.testUSSTree.mSessionNodes.length).toEqual(startLength); -// expect(blockMocks.testUSSTree.mFavorites.length).toEqual(favoriteLength); -// }); - -// it("Tests that deleteProfile successfully deletes a profile from a jobs tree", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const startLength = blockMocks.testJobTree.mSessionNodes.length; -// const favoriteLength = blockMocks.testJobTree.mFavorites.length; -// // Set up job node -// const jobNode = new Job( -// "sestest", -// vscode.TreeItemCollapsibleState.Expanded, -// null, -// blockMocks.session, -// blockMocks.iJob, -// blockMocks.imperativeProfile -// ); -// jobNode.contextValue = globals.JOBS_SESSION_CONTEXT; -// blockMocks.testJobTree.mSessionNodes.push(jobNode); -// // Set up jobNode in Favorites -// const favedJobNode = jobNode; -// favedJobNode.contextValue = jobNode.contextValue + globals.FAV_SUFFIX; -// const jobProfileNodeInFavs = new Job( -// `sestest`, -// vscode.TreeItemCollapsibleState.Expanded, -// blockMocks.testJobTree.mFavoriteSession, -// blockMocks.session, -// null, -// blockMocks.imperativeProfile -// ); -// jobProfileNodeInFavs.contextValue = globals.FAV_PROFILE_CONTEXT; -// jobProfileNodeInFavs.children.push(favedJobNode); -// blockMocks.testJobTree.mFavorites.push(jobProfileNodeInFavs); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("Delete"); - -// await blockMocks.profiles.deleteProfile( -// blockMocks.testDatasetTree, -// blockMocks.testUSSTree, -// blockMocks.testJobTree, -// jobNode -// ); - -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile sestest was deleted."); -// expect(blockMocks.testJobTree.mSessionNodes.length).toEqual(startLength); -// expect(blockMocks.testJobTree.mFavorites.length).toEqual(favoriteLength); -// }); - -// it("Tests that deleteProfile successfully deletes all related file history items for a dataset tree", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.testDatasetTree.mFileHistory = ["[SESTEST]: TEST.DATA"]; -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("sestest"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("Delete"); - -// await blockMocks.profiles.deleteProfile( -// blockMocks.testDatasetTree, -// blockMocks.testUSSTree, -// blockMocks.testJobTree -// ); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile sestest was deleted."); -// expect(blockMocks.testDatasetTree.getFileHistory()[0]).toBeUndefined(); -// }); - -// it("Tests that deleteProfile successfully deletes all related file history items for a USS tree", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.testUSSTree.addFileHistory("[SESTEST]: /node1/node2/node3.txt"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("sestest"); -// globalMocks.mockShowQuickPick.mockResolvedValueOnce("Delete"); - -// await blockMocks.profiles.deleteProfile( -// blockMocks.testDatasetTree, -// blockMocks.testUSSTree, -// blockMocks.testJobTree -// ); -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile sestest was deleted."); -// expect(blockMocks.testUSSTree.getFileHistory()[1]).toBeUndefined(); -// }); -// }); - -// describe("Profiles Unit Tests - Function createInstance", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// profiles: null, -// mockJSONParse: jest.spyOn(JSON, "parse"), -// testProfiles: [ -// { name: "profile1", profile: {}, type: "zosmf" }, -// { name: "sestest", profile: {}, type: "zosmf" }, -// { name: "profile1", profile: {}, type: "zosmf" }, -// { name: "profile2", profile: {}, type: "zosmf" }, -// ], -// }; -// globalMocks.mockProfileInstance.allProfiles = newMocks.testProfiles; -// (child_process.spawnSync as any) = jest.fn((program: string, args: string[], options: any) => { -// const createFakeChildProcess = (status: number, stdout: string, stderr: string) => { -// return { -// status: 0, -// stdout, -// stderr, -// }; -// }; -// if (args[0].indexOf("getAllProfiles") >= 0) { -// return createFakeChildProcess(0, JSON.stringify(newMocks.testProfiles), ""); -// } else { -// // load default profile -// return createFakeChildProcess(0, JSON.stringify(newMocks.testProfiles[1]), ""); -// } -// }); - -// return newMocks; -// } - -// it("Tests that createInstance executes successfully", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// expect(Profiles.getInstance()).toStrictEqual(globalMocks.mockProfileInstance); -// }); - -// it("Tests that createInstance successfully routes through to spawn", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.mockJSONParse.mockReturnValueOnce({ -// overrides: { CredentialManager: "ANO" }, -// }); -// blockMocks.mockJSONParse.mockReturnValueOnce(blockMocks.testProfiles); -// blockMocks.mockJSONParse.mockReturnValueOnce(blockMocks.testProfiles[1]); - -// expect(Profiles.getInstance().allProfiles).toEqual(blockMocks.testProfiles); -// }); - -// it("Tests that createInstance properly handles errors when failing to route through to spawn", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// blockMocks.mockJSONParse.mockReturnValueOnce({ -// overrides: undefined, -// }); -// blockMocks.mockJSONParse.mockReturnValueOnce(blockMocks.testProfiles); -// blockMocks.mockJSONParse.mockReturnValueOnce(blockMocks.testProfiles[1]); - -// await Profiles.createInstance(blockMocks.log); -// expect(Profiles.getInstance().allProfiles).toEqual(blockMocks.testProfiles); -// }); -// }); - -// describe("Profiles Unit Tests - Property allProfiles", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// testProfiles: [ -// { name: "profile1", profile: {}, type: "zosmf" }, -// { name: "sestest", profile: {}, type: "zosmf" }, -// { name: "profile1", profile: {}, type: "zosmf" }, -// { name: "profile2", profile: {}, type: "zosmf" }, -// ], -// }; -// globalMocks.mockProfileInstance.allProfiles = newMocks.testProfiles; -// return newMocks; -// } -// it("Tests that allProfiles contains all profiles", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// expect(Profiles.getInstance().allProfiles).toEqual(blockMocks.testProfiles); -// }); -// }); - -// describe("Profiles Unit Tests - Function getDefaultProfile", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// defaultProfile: { name: "profile1", profile: {}, type: "zosmf" }, -// }; -// globalMocks.mockProfileInstance.getDefaultProfile.mockReturnValue(newMocks.defaultProfile); -// return newMocks; -// } - -// it("Tests that getDefaultProfile returns the default profile", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// // const profiles = await Profiles.createInstance(blockMocks.log); -// // const loadedProfiles = profiles.getDefaultProfile(); -// expect(Profiles.getInstance().getDefaultProfile()).toEqual(blockMocks.defaultProfile); -// }); -// }); - -// describe("Profiles Unit Tests - Function getProfiles", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// testProfiles: [ -// { name: "sestest", profile: {}, type: "zosmf" }, -// { name: "profile1", profile: {}, type: "zosmf" }, -// { name: "profile2", profile: {}, type: "zosmf" }, -// ], -// }; -// globalMocks.mockProfileInstance.getProfiles.mockReturnValue(newMocks.testProfiles); -// return newMocks; -// } -// it("Tests that getProfiles returns all profiles of the specified type", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// expect(Profiles.getInstance().getProfiles()).toEqual(blockMocks.testProfiles); -// }); -// }); - -// describe("Profiles Unit Tests - Function directLoad", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// testProfile: { name: "profile1", profile: {}, type: "zosmf" }, -// }; -// globalMocks.mockProfileInstance.directLoad.mockResolvedValue(newMocks.testProfile); - -// return newMocks; -// } -// it("Tests that directLoad returns the specified profile", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// // const profile = await Profiles.getInstance().directLoad("zosmf", "profile1"); -// expect(await Profiles.getInstance().directLoad("zosmf", "profile1")).toEqual(blockMocks.testProfile); -// }); -// }); - -// describe("Profiles Unit Tests - Function getNamesForType", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// profiles: null, -// profileInstance: null, -// }; -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// globalMocks.mockGetInstance.mockReturnValue(newMocks.profiles); - -// return newMocks; -// } - -// it("Tests that getNamesForType returns all profile names for profiles of the specified type", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// expect((await theProfiles.getNamesForType("zosmf"))[1]).toEqual("profile1"); -// }); -// }); - -// describe("Profiles Unit Tests - Function getAllTypes", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// testTypes: ["zosmf", "banana"], -// }; -// globalMocks.mockProfileInstance.getAllTypes.mockReturnValue(newMocks.testTypes); -// return newMocks; -// } -// it("Tests that getAllTypes returns the names of all profile types", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// expect(Profiles.getInstance().getAllTypes()).toEqual(blockMocks.testTypes); -// }); -// }); - -// describe("Profiles Unit Tests - Function loadNamedProfile", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// testProfile: { name: "profile2", profile: {}, type: "zosmf" }, -// }; -// globalMocks.mockProfileInstance.loadNamedProfile.mockReturnValue(newMocks.testProfile); -// return newMocks; -// } -// it("Tests that loadNamedProfile returns the profile with the specified name", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// expect(Profiles.getInstance().loadNamedProfile("profile2")).toEqual(blockMocks.testProfile); -// }); - -// it("Tests that loadNamedProfile fails to load a non-existent profile", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// let success = false; -// const profiles = await Profiles.createInstance(blockMocks.log); -// try { -// profiles.loadNamedProfile("profile3"); -// } catch (error) { -// expect(error.message).toEqual( -// "Zowe Explorer Profiles Cache error: Could not find profile named: profile3." -// ); -// success = true; -// } -// expect(success).toBe(true); -// }); -// }); - -// describe("Profiles Unit Tests - Function checkCurrentProfile", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// profiles: null, -// invalidProfile: createInvalidIProfile(), -// validProfile: createValidIProfile(), -// profileInstance: null, -// }; -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// globalMocks.mockGetInstance.mockReturnValue(newMocks.profiles); - -// return newMocks; -// } - -// it("Tests that checkCurrentProfile is successful when user is prompted for missing credentials", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); - -// Object.defineProperty(theProfiles, "validateProfiles", { -// value: jest.fn(() => { -// return { -// status: "active", -// name: blockMocks.invalidProfile.name, -// }; -// }), -// }); -// blockMocks.profiles.promptCredentials = jest.fn(() => { -// return ["test", "test", "test"]; -// }); -// theProfiles.validProfile = -1; -// await theProfiles.checkCurrentProfile(blockMocks.invalidProfile); -// expect(theProfiles.validProfile).toBe(ValidProfileEnum.VALID); -// }); - -// it("Tests that checkCurrentProfile is successful for a profile with valid stored credentials", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// Object.defineProperty(theProfiles, "validateProfiles", { -// value: jest.fn(() => { -// return { -// status: "active", -// name: blockMocks.invalidProfile.name, -// }; -// }), -// }); -// theProfiles.validProfile = -1; -// await theProfiles.checkCurrentProfile(blockMocks.validProfile); -// expect(theProfiles.validProfile).toBe(ValidProfileEnum.VALID); -// }); - -// it("Tests that checkCurrentProfile fails when user enters invalid credentials", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// const mockValidateProfiles = jest.fn(); -// Object.defineProperty(theProfiles, "validateProfiles", { -// value: mockValidateProfiles, -// }); -// mockValidateProfiles.mockReturnValue({ -// status: "inactive", -// name: blockMocks.invalidProfile.name, -// }); -// blockMocks.profiles.promptCredentials = jest.fn(() => { -// return undefined; -// }); -// await theProfiles.checkCurrentProfile(blockMocks.invalidProfile); -// expect(theProfiles.validProfile).toBe(ValidProfileEnum.INVALID); -// }); - -// it("Tests that checkCurrentProfile will handle inactive profiles", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// Object.defineProperty(theProfiles, "validateProfiles", { -// value: jest.fn(() => { -// return { -// status: "inactive", -// name: blockMocks.invalidProfile.name, -// }; -// }), -// }); -// blockMocks.profiles.promptCredentials = jest.fn(() => { -// return undefined; -// }); -// await theProfiles.checkCurrentProfile(blockMocks.invalidProfile); -// expect(theProfiles.validProfile).toBe(ValidProfileEnum.INVALID); -// }); - -// it("Tests that checkCurrentProfile will handle unverified profiles", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// Object.defineProperty(theProfiles, "getProfileSetting", { -// value: jest.fn(() => { -// return { -// status: "unverified", -// name: blockMocks.invalidProfile.name, -// }; -// }), -// }); - -// const response = await theProfiles.checkCurrentProfile({ -// ...blockMocks.invalidProfile, -// ...{ profile: { tokenType: true } }, -// }); -// expect(response).toEqual({ name: blockMocks.invalidProfile.name, status: "unverified" }); -// }); - -// it("Tests that checkCurrentProfile will handle inactive profiles", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// Object.defineProperty(theProfiles, "validateProfiles", { -// value: jest.fn(() => { -// return { -// status: "inactive", -// name: blockMocks.invalidProfile.name, -// }; -// }), -// }); -// blockMocks.profiles.promptCredentials = jest.fn(() => { -// return undefined; -// }); -// await theProfiles.checkCurrentProfile(blockMocks.invalidProfile); -// expect(theProfiles.validProfile).toBe(ValidProfileEnum.INVALID); -// }); -// }); - -// describe("Profiles Unit Tests - Function getProfileSetting", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// profiles: null, -// imperativeProfile: createInvalidIProfile(), -// validProfile: createValidIProfile(), -// profileInstance: null, -// session: null, -// mockNode: null, -// mockDisableValidationContext: jest.fn(), -// mockLoadNamedProfile: jest.fn(), -// mockValidateProfile: jest.fn(), -// }; -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// Object.defineProperty(Profiles, "getInstance", { -// value: jest.fn(() => { -// return { -// loadNamedProfile: newMocks.mockLoadNamedProfile.mockReturnValue(newMocks.imperativeProfile), -// validateProfiles: newMocks.mockValidateProfile.mockReturnValue({ -// status: "active", -// name: "sestest", -// }), -// }; -// }), -// }); -// globalMocks.mockGetInstance.mockReturnValue(newMocks.profiles); - -// return newMocks; -// } - -// it("Tests that getProfileSetting returns profile status for disabled profile already set in profilesForValidation", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const resultSetting = { status: "unverified", name: "sestest" }; -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// theProfiles.profilesValidationSetting = [{ name: blockMocks.imperativeProfile.name, setting: false }]; -// theProfiles.profilesForValidation = [{ status: "unverified", name: "sestest" }]; - -// const response = await theProfiles.getProfileSetting(blockMocks.imperativeProfile); -// expect(response).toEqual(resultSetting); -// }); - -// it("Tests that getProfileSetting returns profile status for disabled profile not already set in profilesForValidation", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const resultSetting = { status: "unverified", name: "sestest" }; -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// theProfiles.profilesValidationSetting = [{ name: blockMocks.imperativeProfile.name, setting: false }]; -// theProfiles.profilesForValidation = [{ status: "inactive", name: "sestest" }]; - -// const response = await theProfiles.getProfileSetting(blockMocks.imperativeProfile); -// expect(response).toEqual(resultSetting); -// }); - -// it("Tests that getProfileSetting returns profile status for disabled profile non existant in profilesForValidation", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const resultSetting = { status: "unverified", name: "sestest" }; -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// theProfiles.profilesValidationSetting = [{ name: blockMocks.imperativeProfile.name, setting: false }]; -// theProfiles.profilesForValidation = []; - -// const response = await theProfiles.getProfileSetting(blockMocks.imperativeProfile); -// expect(response).toEqual(resultSetting); -// }); - -// it("Tests that getProfileSetting returns profile status for enabled profile", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const resultSetting = { status: "inactive", name: "sestest" }; -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// theProfiles.profilesValidationSetting = [{ name: blockMocks.imperativeProfile.name, setting: true }]; -// globalMocks.mockCallback = "inactive"; - -// const response = await theProfiles.getProfileSetting(blockMocks.imperativeProfile); -// expect(response).toEqual(resultSetting); -// }); -// }); - -// describe("Profiles Unit Tests - Function disableValidation", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// testDatasetTree: null, -// testUSSTree: null, -// testJobTree: null, -// treeView: createTreeView(), -// datasetSessionNode: null, -// ussSessionNode: null, -// iJob: createIJobObject(), -// profiles: null, -// imperativeProfile: createValidIProfile(), -// profileInstance: null, -// session: null, -// mockNode: null, -// mockDisableValidationContext: jest.fn(), -// mockLoadNamedProfile: jest.fn(), -// }; -// newMocks.datasetSessionNode = createDatasetSessionNode(newMocks.session, newMocks.imperativeProfile); -// newMocks.mockNode = newMocks.datasetSessionNode; -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// newMocks.testDatasetTree = createDatasetTree(newMocks.datasetSessionNode, newMocks.treeView); -// newMocks.testJobTree = createJobsTree( -// newMocks.session, -// newMocks.iJob, -// newMocks.imperativeProfile, -// newMocks.treeView -// ); -// Object.defineProperty(Profiles, "getInstance", { -// value: jest.fn(() => { -// return { -// loadNamedProfile: newMocks.mockLoadNamedProfile.mockReturnValue(newMocks.imperativeProfile), -// disableValidationContext: newMocks.mockDisableValidationContext.mockReturnValue( -// newMocks.datasetSessionNode -// ), -// }; -// }), -// }); -// globalMocks.mockGetInstance.mockReturnValue(newMocks.profiles); - -// return newMocks; -// } - -// it("Tests that disableValidation returns correct node context", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const ussSessionNode = createUSSSessionNode(blockMocks.session, blockMocks.imperativeProfile); -// const ussTree = createUSSTree([], [ussSessionNode], blockMocks.treeView); -// const theProfiles = await Profiles.createInstance(blockMocks.log); - -// // const response = await theProfiles.disableValidation(blockMocks.datasetSessionNode); -// expect(response.contextValue).toContain(`${globals.VALIDATE_SUFFIX}false`); -// expect(response.contextValue).not.toContain(`${globals.VALIDATE_SUFFIX}true`); -// }); - -// it("Tests that disableValidation returns correct node context if already enabled", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const ussSessionNode = createUSSSessionNode(blockMocks.session, blockMocks.imperativeProfile); -// const ussTree = createUSSTree([], [ussSessionNode], blockMocks.treeView); -// const resultNode: IZoweNodeType = blockMocks.datasetSessionNode; -// resultNode.contextValue = `${globals.DS_SESSION_CONTEXT}${globals.VALIDATE_SUFFIX}true`; -// const theProfiles = await Profiles.createInstance(blockMocks.log); - -// // const response = await theProfiles.disableValidation(resultNode); -// expect(response.contextValue).toContain(`${globals.VALIDATE_SUFFIX}false`); -// expect(response.contextValue).not.toContain(`${globals.VALIDATE_SUFFIX}true`); -// }); -// }); - -// describe("Profiles Unit Tests - Function enableValidation", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// testDatasetTree: null, -// testUSSTree: null, -// testJobTree: null, -// treeView: createTreeView(), -// datasetSessionNode: null, -// ussSessionNode: null, -// iJob: createIJobObject(), -// profiles: null, -// imperativeProfile: createValidIProfile(), -// profileInstance: null, -// session: null, -// mockNode: null, -// mockEnableValidationContext: jest.fn(), -// mockLoadNamedProfile: jest.fn(), -// }; -// newMocks.datasetSessionNode = createDatasetSessionNode(newMocks.session, newMocks.imperativeProfile); -// newMocks.mockNode = newMocks.datasetSessionNode; -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// newMocks.testDatasetTree = createDatasetTree(newMocks.datasetSessionNode, newMocks.treeView); -// newMocks.testJobTree = createJobsTree( -// newMocks.session, -// newMocks.iJob, -// newMocks.imperativeProfile, -// newMocks.treeView -// ); -// Object.defineProperty(Profiles, "getInstance", { -// value: jest.fn(() => { -// return { -// loadNamedProfile: newMocks.mockLoadNamedProfile.mockReturnValue(newMocks.imperativeProfile), -// enableValidationContext: newMocks.mockEnableValidationContext.mockReturnValue( -// newMocks.datasetSessionNode -// ), -// }; -// }), -// }); -// globalMocks.mockGetInstance.mockReturnValue(newMocks.profiles); - -// return newMocks; -// } - -// it("Tests that enableValidation returns correct node context", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const ussSessionNode = createUSSSessionNode(blockMocks.session, blockMocks.imperativeProfile); -// const ussTree = createUSSTree([], [ussSessionNode], blockMocks.treeView); -// const resultNode: IZoweNodeType = blockMocks.datasetSessionNode; -// resultNode.contextValue = `${globals.DS_SESSION_CONTEXT}${globals.VALIDATE_SUFFIX}false`; -// const theProfiles = await Profiles.createInstance(blockMocks.log); - -// // const response = await theProfiles.enableValidation(resultNode); -// expect(response.contextValue).toContain(`${globals.VALIDATE_SUFFIX}true`); -// expect(response.contextValue).not.toContain(`${globals.VALIDATE_SUFFIX}false`); -// }); -// }); - -// describe("Profiles Unit Tests - Function disableValidationContext", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// profiles: null, -// imperativeProfile: createIProfile(), -// profileInstance: null, -// session: null, -// datasetSessionNode: null, -// mockNode: null, -// mockDisableValidationContext: jest.fn(), -// }; -// newMocks.mockNode = newMocks.datasetSessionNode; -// newMocks.datasetSessionNode = createDatasetSessionNode(newMocks.session, newMocks.imperativeProfile); -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// Object.defineProperty(Profiles, "getInstance", { -// value: jest.fn(() => { -// return { -// disableValidationContext: newMocks.mockDisableValidationContext.mockReturnValue(newMocks.mockNode), -// }; -// }), -// }); -// globalMocks.mockGetInstance.mockReturnValue(newMocks.profiles); - -// return newMocks; -// } - -// it("Tests that disableValidationContext returns correct node context if it is enabled", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// const resultNode: IZoweNodeType = blockMocks.datasetSessionNode; -// resultNode.contextValue = `${globals.DS_SESSION_CONTEXT}${globals.VALIDATE_SUFFIX}true`; -// const result = await theProfiles.disableValidationContext(resultNode); -// expect(result.contextValue).toContain(`${globals.VALIDATE_SUFFIX}false`); -// }); - -// it("Tests that disableValidationContext returns correct node context if validation context isn't set", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// const resultNode: IZoweNodeType = blockMocks.datasetSessionNode; -// resultNode.contextValue = `${globals.DS_SESSION_CONTEXT}`; -// const result = await theProfiles.disableValidationContext(resultNode); -// expect(result.contextValue).toContain(`${globals.VALIDATE_SUFFIX}false`); -// }); - -// it("Tests that disableValidationContext returns correct node context if it is already disabled", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// const resultNode: IZoweNodeType = blockMocks.datasetSessionNode; -// resultNode.contextValue = `${globals.DS_SESSION_CONTEXT}${globals.VALIDATE_SUFFIX}false`; -// const result = await theProfiles.disableValidationContext(resultNode); -// expect(result.contextValue).toContain(`${globals.VALIDATE_SUFFIX}false`); -// }); -// }); - -// describe("Profiles Unit Tests - Function enableValidationContext", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// profiles: null, -// imperativeProfile: createIProfile(), -// profileInstance: null, -// session: null, -// datasetSessionNode: null, -// mockNode: null, -// mockEnableValidationContext: jest.fn(), -// }; -// newMocks.mockNode = newMocks.datasetSessionNode; -// newMocks.datasetSessionNode = createDatasetSessionNode(newMocks.session, newMocks.imperativeProfile); -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// Object.defineProperty(Profiles, "getInstance", { -// value: jest.fn(() => { -// return { -// enableValidationContext: newMocks.mockEnableValidationContext.mockReturnValue(newMocks.mockNode), -// }; -// }), -// }); -// globalMocks.mockGetInstance.mockReturnValue(newMocks.profiles); - -// return newMocks; -// } - -// it("Tests that enableValidationContext returns correct node context if it is disabled", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// const resultNode: IZoweNodeType = blockMocks.datasetSessionNode; -// resultNode.contextValue = `${globals.DS_SESSION_CONTEXT}${globals.VALIDATE_SUFFIX}false`; -// const result = await theProfiles.enableValidationContext(resultNode); -// expect(result.contextValue).toContain(`${globals.VALIDATE_SUFFIX}true`); -// }); - -// it("Tests that enableValidationContext returns correct node context if it is already enabled", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// const resultNode: IZoweNodeType = blockMocks.datasetSessionNode; -// resultNode.contextValue = `${globals.DS_SESSION_CONTEXT}${globals.VALIDATE_SUFFIX}true`; -// const result = await theProfiles.enableValidationContext(resultNode); -// expect(result.contextValue).toContain(`${globals.VALIDATE_SUFFIX}true`); -// }); - -// it("Tests that enableValidationContext returns correct node context if validation context isn't set", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// const resultNode: IZoweNodeType = blockMocks.datasetSessionNode; -// resultNode.contextValue = `${globals.DS_SESSION_CONTEXT}`; -// const result = await theProfiles.enableValidationContext(resultNode); -// expect(result.contextValue).toContain(`${globals.VALIDATE_SUFFIX}true`); -// }); -// }); - -// describe("Profiles Unit Tests - Function validationArraySetup", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// profiles: null, -// imperativeProfile: createIProfile(), -// validProfile: createValidIProfile(), -// profileInstance: null, -// session: null, -// datasetSessionNode: null, -// mockNode: null, -// mockEnableValidationContext: jest.fn(), -// }; -// newMocks.mockNode = newMocks.datasetSessionNode; -// newMocks.datasetSessionNode = createDatasetSessionNode(newMocks.session, newMocks.imperativeProfile); -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// Object.defineProperty(Profiles, "getInstance", { -// value: jest.fn(() => { -// return { -// enableValidationContext: newMocks.mockEnableValidationContext.mockReturnValue(newMocks.mockNode), -// }; -// }), -// }); -// globalMocks.mockGetInstance.mockReturnValue(newMocks.profiles); - -// return newMocks; -// } - -// it("Tests that validationArraySetup returns profileSetting if same setting is passed", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const returnedSetting = { -// name: blockMocks.imperativeProfile.name, -// setting: false, -// }; - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// theProfiles.profilesValidationSetting = [{ name: blockMocks.imperativeProfile.name, setting: false }]; - -// const response = await theProfiles.validationArraySetup(blockMocks.imperativeProfile, false); -// expect(response).toEqual(returnedSetting); -// }); - -// it("Tests that validationArraySetup returns profileSetting and updates profilesValidationSetting if different setting is passed", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const returnedSetting = { -// name: blockMocks.imperativeProfile.name, -// setting: false, -// }; - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// theProfiles.profilesValidationSetting = [{ name: blockMocks.imperativeProfile.name, setting: true }]; - -// const response = await theProfiles.validationArraySetup(blockMocks.imperativeProfile, false); -// expect(response).toEqual(returnedSetting); -// expect(theProfiles.profilesValidationSetting).toEqual([ -// { name: blockMocks.imperativeProfile.name, setting: false }, -// ]); -// }); - -// it("Tests that validationArraySetup returns profileSetting and updates profilesValidationSetting when array empty", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const returnedSetting = { -// name: blockMocks.imperativeProfile.name, -// setting: false, -// }; - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// theProfiles.profilesValidationSetting = []; - -// const response = await theProfiles.validationArraySetup(blockMocks.imperativeProfile, false); -// expect(response).toEqual(returnedSetting); -// expect(theProfiles.profilesValidationSetting).toEqual([ -// { name: blockMocks.imperativeProfile.name, setting: false }, -// ]); -// }); - -// it("Tests that validationArraySetup returns profileSetting and updates profilesValidationSetting when profile name not found", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// blockMocks.validProfile.name = "test2"; -// const returnedSetting = { -// name: blockMocks.validProfile.name, -// setting: false, -// }; - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// theProfiles.profilesValidationSetting = [{ name: blockMocks.imperativeProfile.name, setting: true }]; - -// const response = await theProfiles.validationArraySetup(blockMocks.validProfile, false); -// expect(response).toEqual(returnedSetting); -// expect(theProfiles.profilesValidationSetting).toEqual([ -// { name: blockMocks.imperativeProfile.name, setting: true }, -// { name: blockMocks.validProfile.name, setting: false }, -// ]); -// }); -// }); - -// describe("Profiles Unit Tests - Function validateProfiles", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// profiles: null, -// invalidProfile: createInvalidIProfile(), -// validProfile: createValidIProfile(), -// profileInstance: null, -// commonApi: null, -// }; -// newMocks.commonApi = ZoweExplorerApiRegister.getInstance().getCommonApi(newMocks.validProfile); -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// globalMocks.mockGetInstance.mockReturnValue(newMocks.profiles); - -// return newMocks; -// } - -// it("Tests that validateProfiles handles active profiles", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// globalMocks.mockCallback = "active"; - -// const returnedValidation = await theProfiles.checkCurrentProfile(blockMocks.validProfile); -// expect(returnedValidation).toEqual({ status: "active", name: blockMocks.validProfile.name }); -// }); - -// it("Tests that validateProfiles handles inactive profiles", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// globalMocks.mockCallback = "inactive"; - -// const returnedValidation = await theProfiles.checkCurrentProfile(blockMocks.validProfile); -// expect(returnedValidation).toEqual({ status: "inactive", name: blockMocks.validProfile.name }); -// }); - -// it("Tests that validateProfiles handles unverified profiles", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// globalMocks.mockCallback = "unverified"; - -// const returnedValidation = await theProfiles.checkCurrentProfile(blockMocks.validProfile); -// expect(returnedValidation).toEqual({ status: "unverified", name: blockMocks.validProfile.name }); -// }); -// }); - -// describe("Profiles Unit Tests - Function refresh", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// profiles: null, -// invalidProfile: createInvalidIProfile(), -// validProfile: createValidIProfile(), -// profileInstance: null, -// }; -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// globalMocks.mockGetInstance.mockReturnValue(newMocks.profiles); - -// return newMocks; -// } - -// it("Tests that Profile refresh empties profilesForValidation[]", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// theProfiles.profilesForValidation.push({ status: "active", name: blockMocks.validProfile.name }); -// await theProfiles.refresh(ZoweExplorerApiRegister.getInstance()); -// expect(theProfiles.profilesForValidation.length).toBe(0); -// }); -// }); - -// describe("Profiles Unit Tests - Function ssoLogin", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// testDatasetTree: null, -// testUSSTree: null, -// testJobTree: null, -// treeView: createTreeView(), -// datasetSessionNode: null, -// optionalCredNode: null, -// datasetSessionNodeToken: null, -// ussSessionNode: null, -// iJob: createIJobObject(), -// profiles: null, -// imperativeProfile: createValidIProfile(), -// profileInstance: null, -// session: null, -// mockNode: null, -// mockEnableValidationContext: jest.fn(), -// mockLoadNamedProfile: jest.fn(), -// testBaseProfile: createValidIProfile(), -// testCombinedSession: createISession(), -// testCombinedProfile: createValidIProfile(), -// testOptionalProfile: createValidIProfile(), -// datasetSessionNodeAltToken: null, -// testAltTypeProfile: createAltTypeIProfile(), -// testAltSession: createISession(), -// }; -// newMocks.testBaseProfile.profile.tokenType = "testTokenType"; -// newMocks.testBaseProfile.profile.tokenValue = "testTokenValue"; -// newMocks.testCombinedSession.ISession.tokenType = "testTokenType"; -// newMocks.testCombinedSession.ISession.tokenValue = "testTokenValue"; -// newMocks.testCombinedProfile.profile.tokenType = "testTokenType"; -// newMocks.testCombinedProfile.profile.tokenValue = "testTokenValue"; -// newMocks.testCombinedProfile.profile.user = undefined; -// newMocks.testCombinedProfile.profile.password = undefined; -// newMocks.testCombinedProfile.profile.protocol = "https"; -// newMocks.testCombinedProfile.profile.host = "test"; -// newMocks.testCombinedProfile.profile.type = "basic"; -// newMocks.testOptionalProfile.profile.host = "host"; -// newMocks.testOptionalProfile.profile.port = "1443"; -// newMocks.testOptionalProfile.profile.user = undefined; -// newMocks.testOptionalProfile.profile.password = undefined; -// newMocks.testOptionalProfile.type = "zosmf"; -// newMocks.testAltSession.ISession.tokenType = "altTokenType"; -// newMocks.testAltSession.ISession.tokenValue = "altTokenValue"; -// newMocks.testAltTypeProfile.profile.user = undefined; -// newMocks.testAltTypeProfile.profile.password = undefined; -// newMocks.testAltTypeProfile.profile.tokenType = "altTokenType"; -// newMocks.testAltTypeProfile.profile.tokenValue = "altTokenValue"; -// globalMocks.mockCreateSessCfgFromArgs.mockResolvedValue(newMocks.testCombinedSession); -// newMocks.datasetSessionNodeToken = createDatasetSessionNode( -// newMocks.testCombinedSession, -// newMocks.testCombinedProfile -// ); -// newMocks.datasetSessionNodeAltToken = createDatasetSessionNode( -// newMocks.testAltSession, -// newMocks.testAltTypeProfile -// ); -// newMocks.datasetSessionNode = createDatasetSessionNode(newMocks.session, newMocks.imperativeProfile); -// newMocks.optionalCredNode = createDatasetSessionNode(newMocks.session, newMocks.testOptionalProfile); -// newMocks.mockNode = newMocks.datasetSessionNode; -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// newMocks.testDatasetTree = createDatasetTree(newMocks.datasetSessionNode, newMocks.treeView); -// newMocks.testJobTree = createJobsTree( -// newMocks.session, -// newMocks.iJob, -// newMocks.imperativeProfile, -// newMocks.treeView -// ); - -// Object.defineProperty(globalMocks.mockCliProfileManager, "load", { -// value: jest.fn(() => { -// return new Promise((resolve) => { -// resolve(newMocks.imperativeProfile); -// }); -// }), -// configurable: true, -// }); -// Object.defineProperty(globalMocks.mockCliProfileManager, "update", { value: jest.fn(), configurable: true }); -// newMocks.profiles.getCliProfileManager = () => globalMocks.mockCliProfileManager; - -// globalMocks.mockGetInstance.mockReturnValue(newMocks.profiles); - -// return newMocks; -// } - -// it("Tests that sso login is skipped if service profile contains user/password", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const ussSessionNode = createUSSSessionNode(blockMocks.session, blockMocks.imperativeProfile); -// const ussTree = createUSSTree([], [ussSessionNode], blockMocks.treeView); -// const resultNode: IZoweNodeType = blockMocks.datasetSessionNode; -// const theProfiles = await Profiles.createInstance(blockMocks.log); - -// const response = await theProfiles.ssoLogin(resultNode); - -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe( -// "This profile does not support token authentication." -// ); -// }); - -// it("Tests that sso login with token for base profile", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const resultNode: IZoweNodeType = blockMocks.datasetSessionNodeToken; -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// Object.defineProperty(theProfiles, "getBaseProfile", { -// value: jest.fn(() => { -// return blockMocks.testBaseProfile; -// }), -// }); - -// const mockCommonApi = await ZoweExplorerApiRegister.getInstance().getCommonApi(blockMocks.testCombinedProfile); -// const getCommonApiMock = jest.fn(); -// getCommonApiMock.mockReturnValue(mockCommonApi); -// ZoweExplorerApiRegister.getInstance().getCommonApi = getCommonApiMock.bind(ZoweExplorerApiRegister); -// jest.spyOn(mockCommonApi, "getTokenTypeName").mockReturnValue("token"); - -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// await theProfiles.ssoLogin(resultNode); - -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe( -// "Login to authentication service was successful." -// ); -// }); - -// it("Test that sso login will login config file", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const resultNode: IZoweNodeType = blockMocks.datasetSessionNodeToken; -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// Object.defineProperty(theProfiles, "optionalCredChecks", { -// value: jest.fn(() => { -// return true; -// }), -// }); -// globalMocks.mockProfileInstance.getProfileInfo().usingTeamConfig = true; -// // Object.defineProperty(ProfilesCache, "getConfigInstance", { -// // value: jest.fn(() => { -// // return { -// // usingTeamConfig: true, -// // }; -// // }), -// // }); - -// const mockCommonApi = await ZoweExplorerApiRegister.getInstance().getCommonApi(blockMocks.testCombinedProfile); -// const getCommonApiMock = jest.fn(); -// getCommonApiMock.mockReturnValue(mockCommonApi); -// ZoweExplorerApiRegister.getInstance().getCommonApi = getCommonApiMock.bind(ZoweExplorerApiRegister); -// jest.spyOn(mockCommonApi, "getTokenTypeName").mockReturnValue(SessConstants.TOKEN_TYPE_APIML); - -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// await theProfiles.ssoLogin(resultNode); - -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe( -// "Login to authentication service was successful." -// ); -// }); - -// it("Tests that sso login is skipped if service profile has its own host and port", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// const mockCommonApi = await ZoweExplorerApiRegister.getInstance().getCommonApi(blockMocks.testCombinedProfile); -// const getCommonApiMock = jest.fn(); -// getCommonApiMock.mockReturnValue(mockCommonApi); -// ZoweExplorerApiRegister.getInstance().getCommonApi = getCommonApiMock.bind(ZoweExplorerApiRegister); -// jest.spyOn(mockCommonApi, "getTokenTypeName").mockReturnValue(SessConstants.TOKEN_TYPE_APIML); -// Object.defineProperty(theProfiles, "getBaseProfile", { -// value: jest.fn(() => { -// return blockMocks.testBaseProfile; -// }), -// }); - -// const resultNode: IZoweNodeType = blockMocks.optionalCredNode; - -// await theProfiles.ssoLogin(resultNode); - -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe( -// "This profile does not support token authentication." -// ); -// }); - -// it("Tests that sso login with token for alternate profile", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const resultNode: IZoweNodeType = blockMocks.datasetSessionNodeAltToken; -// const theProfiles = await Profiles.createInstance(blockMocks.log); - -// const mockCommonApi = await ZoweExplorerApiRegister.getInstance().getCommonApi(blockMocks.testCombinedProfile); -// const getCommonApiMock = jest.fn(); -// getCommonApiMock.mockReturnValue(mockCommonApi); -// ZoweExplorerApiRegister.getInstance().getCommonApi = getCommonApiMock.bind(ZoweExplorerApiRegister); -// jest.spyOn(mockCommonApi, "getTokenTypeName").mockReturnValue("altTokenType"); - -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// globalMocks.mockShowInputBox.mockResolvedValueOnce("fake"); -// await theProfiles.ssoLogin(resultNode); - -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe( -// "Login to authentication service was successful." -// ); -// }); -// }); - -// describe("Profiles Unit Tests - Function ssoLogout", () => { -// async function createBlockMocks(globalMocks) { -// const newMocks = { -// log: Logger.getAppLogger(), -// testDatasetTree: null, -// testUSSTree: null, -// testJobTree: null, -// treeView: createTreeView(), -// datasetSessionNode: null, -// datasetSessionNodeToken: null, -// ussSessionNode: null, -// iJob: createIJobObject(), -// profiles: null, -// imperativeProfile: createValidIProfile(), -// profileInstance: null, -// session: null, -// mockNode: null, -// mockEnableValidationContext: jest.fn(), -// mockLoadNamedProfile: jest.fn(), -// testBaseProfile: createValidIProfile(), -// testCombinedSession: createISession(), -// testCombinedProfile: createValidIProfile(), -// datasetSessionNodeAltToken: null, -// testAltTypeProfile: createAltTypeIProfile(), -// testAltSession: createISession(), -// }; -// newMocks.testBaseProfile.profile.tokenType = "apimlAuthenticationToken"; -// newMocks.testBaseProfile.profile.tokenValue = "testTokenValue"; -// newMocks.testCombinedSession.ISession.tokenType = "testTokenType"; -// newMocks.testCombinedSession.ISession.tokenValue = "testTokenValue"; -// newMocks.testBaseProfile.profile.host = "fake"; -// newMocks.testCombinedSession.ISession.tokenType = "apimlAuthenticationToken"; -// newMocks.testCombinedProfile.profile.tokenValue = "testTokenValue"; -// newMocks.testCombinedProfile.profile.tokenType = "apimlAuthenticationToken"; -// newMocks.testCombinedProfile.profile.user = undefined; -// newMocks.testCombinedProfile.profile.password = undefined; -// newMocks.testCombinedProfile.profile.protocol = "https"; -// newMocks.testCombinedProfile.profile.host = "fake"; -// newMocks.testAltSession.ISession.tokenType = "altTokenType"; -// newMocks.testAltSession.ISession.tokenValue = "altTokenValue"; -// newMocks.testAltTypeProfile.profile.user = undefined; -// newMocks.testAltTypeProfile.profile.password = undefined; -// newMocks.testAltTypeProfile.profile.tokenType = "altTokenType"; -// newMocks.testAltTypeProfile.profile.tokenValue = "altTokenValue"; -// globalMocks.mockCreateSessCfgFromArgs.mockResolvedValue(newMocks.testCombinedSession); -// newMocks.datasetSessionNodeToken = createDatasetSessionNode( -// newMocks.testCombinedSession, -// newMocks.testCombinedProfile -// ); -// newMocks.datasetSessionNodeAltToken = createDatasetSessionNode( -// newMocks.testAltSession, -// newMocks.testAltTypeProfile -// ); -// newMocks.datasetSessionNode = createDatasetSessionNode(newMocks.session, newMocks.imperativeProfile); -// newMocks.mockNode = newMocks.datasetSessionNode; -// newMocks.profiles = await Profiles.createInstance(newMocks.log); -// newMocks.profileInstance = createInstanceOfProfile(newMocks.profiles); -// newMocks.profileInstance.getBaseProfile.mockReturnValue(newMocks.testBaseProfile); -// newMocks.testDatasetTree = createDatasetTree(newMocks.datasetSessionNode, newMocks.treeView); -// newMocks.testJobTree = createJobsTree( -// newMocks.session, -// newMocks.iJob, -// newMocks.imperativeProfile, -// newMocks.treeView -// ); - -// Object.defineProperty(globalMocks.mockCliProfileManager, "save", { -// value: jest.fn(() => { -// return new Promise((resolve) => { -// resolve(newMocks.imperativeProfile); -// }); -// }), -// configurable: true, -// }); -// Object.defineProperty(globalMocks.mockCliProfileManager, "update", { value: jest.fn(), configurable: true }); -// newMocks.profiles.getCliProfileManager = () => globalMocks.mockCliProfileManager; - -// globalMocks.mockGetInstance.mockReturnValue(newMocks.profiles); - -// return newMocks; -// } - -// it("Tests that sso logout is skipped if service profile contains user/password", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const ussSessionNode = createUSSSessionNode(blockMocks.session, blockMocks.imperativeProfile); -// const ussTree = createUSSTree([], [ussSessionNode], blockMocks.treeView); -// const resultNode: IZoweNodeType = blockMocks.datasetSessionNode; -// const theProfiles = await Profiles.createInstance(blockMocks.log); - -// const response = await theProfiles.ssoLogout(resultNode); - -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe( -// "This profile does not support token authentication." -// ); -// }); - -// it("Tests that sso logout with token in base profile", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const resultNode: IZoweNodeType = blockMocks.datasetSessionNodeToken; -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// Object.defineProperty(theProfiles, "getBaseProfile", { -// value: jest.fn(() => { -// return blockMocks.testBaseProfile; -// }), -// }); - -// const mockCommonApi = await ZoweExplorerApiRegister.getInstance().getCommonApi(blockMocks.testCombinedProfile); -// const getCommonApiMock = jest.fn(); -// getCommonApiMock.mockReturnValue(mockCommonApi); -// ZoweExplorerApiRegister.getInstance().getCommonApi = getCommonApiMock.bind(ZoweExplorerApiRegister); -// jest.spyOn(mockCommonApi, "getTokenTypeName").mockReturnValue("apimlAuthenticationToken"); -// jest.spyOn(mockCommonApi, "logout").mockReturnValue("logout success"); - -// await theProfiles.ssoLogout(resultNode); - -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe( -// "Logout from authentication service was successful." -// ); -// }); - -// it("Tests that sso logout with token in alternate profile", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); - -// const resultNode: IZoweNodeType = blockMocks.datasetSessionNodeAltToken; -// const theProfiles = await Profiles.createInstance(blockMocks.log); -// const mockCommonApi = await ZoweExplorerApiRegister.getInstance().getCommonApi(blockMocks.testCombinedProfile); -// const getCommonApiMock = jest.fn(); -// getCommonApiMock.mockReturnValue(mockCommonApi); -// ZoweExplorerApiRegister.getInstance().getCommonApi = getCommonApiMock.bind(ZoweExplorerApiRegister); -// jest.spyOn(mockCommonApi, "getTokenTypeName").mockReturnValue("altTokenType"); - -// jest.spyOn(mockCommonApi, "logout").mockReturnValue("logout success"); - -// await theProfiles.ssoLogout(resultNode); - -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe( -// "Logout from authentication service was successful." -// ); -// }); - -// it("Test that sso logout for config file", async () => { -// const globalMocks = await createGlobalMocks(); -// const blockMocks = await createBlockMocks(globalMocks); -// const resultNode: IZoweNodeType = blockMocks.datasetSessionNodeAltToken; -// globalMocks.mockProfileInfo.usingTeamConfig = true; -// const theProfiles = await Profiles.createInstance(blockMocks.log); - -// const mockCommonApi = await ZoweExplorerApiRegister.getInstance().getCommonApi(blockMocks.testCombinedProfile); -// const getCommonApiMock = jest.fn(); -// getCommonApiMock.mockReturnValue(mockCommonApi); -// ZoweExplorerApiRegister.getInstance().getCommonApi = getCommonApiMock.bind(ZoweExplorerApiRegister); -// jest.spyOn(mockCommonApi, "getTokenTypeName").mockReturnValue(SessConstants.TOKEN_TYPE_APIML); - -// jest.spyOn(mockCommonApi, "logout").mockReturnValue("logout success"); - -// await theProfiles.ssoLogout(resultNode); - -// expect(globalMocks.mockShowInformationMessage.mock.calls.length).toBe(1); -// expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe( -// "Logout from authentication service was successful." -// ); -// }); -// }); diff --git a/packages/zowe-explorer/__tests__/__unit__/api/ZoweExplorerZosmfApi.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/api/ZoweExplorerZosmfApi.unit.test.ts index 40449b9978..e00d8e955f 100644 --- a/packages/zowe-explorer/__tests__/__unit__/api/ZoweExplorerZosmfApi.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/api/ZoweExplorerZosmfApi.unit.test.ts @@ -106,19 +106,16 @@ describe("Zosmf API tests", () => { it("should test that getContents calls zowe.Download.ussFile", async () => { const api = new ZosmfUssApi(); api.getSession = jest.fn(); + const response = { shouldMatch: true }; Object.defineProperty(zowe, "Download", { value: { - ussFile: jest.fn().mockResolvedValue({ - shouldMatch: true, - }), + ussFile: jest.fn().mockResolvedValue(response), }, configurable: true, }); - expect(api.getContents("/some/input/path", {})).toStrictEqual( - Promise.resolve(zowe.Download.ussFile(api.getSession(), "/some/input/path", {})) - ); + await expect(api.getContents("/some/input/path", {})).resolves.toEqual(response); }); it("should update the tag attribute of a USS file if a new change is made", async () => { diff --git a/packages/zowe-explorer/__tests__/__unit__/dataset/actions.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/dataset/actions.unit.test.ts index 2ecd17ab94..7dbcbe69c8 100644 --- a/packages/zowe-explorer/__tests__/__unit__/dataset/actions.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/dataset/actions.unit.test.ts @@ -1923,7 +1923,7 @@ describe("Dataset Actions Unit Tests - Function copyDataSets", () => { parentNode: blockMocks.datasetSessionNode, }); child.contextValue = globals.DS_DS_CONTEXT; - await expect(dsActions.copyDataSets(child, null, blockMocks.testDatasetTree)).toStrictEqual(Promise.resolve()); + await expect(dsActions.copyDataSets(child, null as any, blockMocks.testDatasetTree)).resolves.not.toThrow(); }); it("Checking copy of sequential datasets", async () => { globals.defineGlobals(""); @@ -1960,7 +1960,7 @@ describe("Dataset Actions Unit Tests - Function copyDataSets", () => { return Promise.resolve(prm); }); expect(mocked(Gui.errorMessage)).not.toHaveBeenCalled(); - await expect(dsActions.copyDataSets(nodeCopy, null, blockMocks.testDatasetTree)).toStrictEqual(Promise.resolve()); + await expect(dsActions.copyDataSets(nodeCopy, null as any, blockMocks.testDatasetTree)).resolves.not.toThrow(); }); it("Checking failed copy of sequential datasets", async () => { @@ -2090,7 +2090,7 @@ describe("Dataset Actions Unit Tests - Function copyDataSets", () => { const blockMocks = createBlockMocks(); vscode.env.clipboard.writeText(""); const errSpy = jest.spyOn(Gui, "errorMessage"); - await expect(dsActions.pasteDataSetMembers(blockMocks.testDatasetTree, blockMocks.datasetSessionNode)).toEqual(Promise.resolve()); + await expect(dsActions.pasteDataSetMembers(blockMocks.testDatasetTree, blockMocks.datasetSessionNode)).resolves.not.toThrow(); expect(errSpy).toBeCalled(); }); it("Testing pasteDataSetMembers() fails and gives error message with empty clipboard", async () => { @@ -2105,7 +2105,7 @@ describe("Dataset Actions Unit Tests - Function copyDataSets", () => { profile: blockMocks.imperativeProfile, }); const errSpy = jest.spyOn(Gui, "errorMessage"); - await expect(dsActions.pasteDataSetMembers(blockMocks.testDatasetTree, node)).toEqual(Promise.resolve()); + await expect(dsActions.pasteDataSetMembers(blockMocks.testDatasetTree, node)).resolves.not.toThrow(); expect(errSpy).toBeCalled(); }); it("Testing pasteDataSetMembers() succesfully runs pasteMember()", async () => { @@ -2115,7 +2115,7 @@ describe("Dataset Actions Unit Tests - Function copyDataSets", () => { vscode.env.clipboard.writeText(JSON.stringify(getNodeLabels(blockMocks.pdsMemberNode))); const errSpy = jest.spyOn(dsActions, "pasteMember"); errSpy.mockResolvedValueOnce(null); - await expect(dsActions.pasteDataSetMembers(blockMocks.testDatasetTree, blockMocks.pdsMemberNode)).toEqual(Promise.resolve()); + await expect(dsActions.pasteDataSetMembers(blockMocks.testDatasetTree, blockMocks.pdsMemberNode)).resolves.not.toThrow(); }); it("Testing pasteDataSetMembers() successfully runs with multiple members", async () => { diff --git a/packages/zowe-explorer/__tests__/__unit__/shared/refresh.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/shared/refresh.unit.test.ts index 7dc0661da9..963921d13b 100644 --- a/packages/zowe-explorer/__tests__/__unit__/shared/refresh.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/shared/refresh.unit.test.ts @@ -132,38 +132,29 @@ describe("Refresh Unit Tests - Function refreshAll", () => { it("Tests that refreshAll() executed successfully with ussTreeProvider passed", async () => { const globalMocks = createGlobalMocks(); const blockMocks = await createBlockMocks(globalMocks); - const response = new Promise(() => { - return {}; - }); const spy = jest.spyOn(refreshActions, "refreshAll"); await refreshActions.refreshAll(blockMocks.testUSSTree); expect(spy).toHaveBeenCalledTimes(1); - expect(refreshActions.refreshAll(blockMocks.testUSSTree)).toEqual(response); + await expect(refreshActions.refreshAll(blockMocks.testUSSTree)).resolves.not.toThrow(); spy.mockClear(); }); it("Testing that refreshAll() is executed successfully with jobsTreeProvider passed", async () => { const globalMocks = createGlobalMocks(); const blockMocks = await createBlockMocks(globalMocks); - const response = new Promise(() => { - return {}; - }); const submitJclSpy = jest.spyOn(refreshActions, "refreshAll"); await refreshActions.refreshAll(blockMocks.jobsTree); expect(submitJclSpy).toHaveBeenCalledTimes(1); - expect(refreshActions.refreshAll(blockMocks.jobsTree)).toEqual(response); + await expect(refreshActions.refreshAll(blockMocks.jobsTree)).resolves.not.toThrow(); submitJclSpy.mockClear(); }); it("Testing that refreshAll() is executed successfully with datasetTreeProvider passed", async () => { const globalMocks = createGlobalMocks(); const blockMocks = await createBlockMocks(globalMocks); - const response = new Promise(() => { - return {}; - }); const spy = jest.spyOn(refreshActions, "refreshAll"); await refreshActions.refreshAll(blockMocks.testUSSTree); expect(spy).toHaveBeenCalledTimes(1); - expect(refreshActions.refreshAll(blockMocks.testDatasetTree)).toEqual(response); + await expect(refreshActions.refreshAll(blockMocks.testDatasetTree)).resolves.not.toThrow(); spy.mockClear(); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/uss/ZoweUSSNode.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/uss/ZoweUSSNode.unit.test.ts index dabd7a87ea..e9c9c34fcc 100644 --- a/packages/zowe-explorer/__tests__/__unit__/uss/ZoweUSSNode.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/uss/ZoweUSSNode.unit.test.ts @@ -1660,7 +1660,7 @@ describe("ZoweUSSNode Unit Tests - Function node.pasteUssTree()", () => { it("Tests util disposeClipboardContents function correctly free clipboardContents", async () => { vscode.env.clipboard.writeText("test"); ussUtils.disposeClipboardContents(); - expect(vscode.env.clipboard.readText()).toEqual(Promise.resolve({})); + await expect(vscode.env.clipboard.readText()).resolves.not.toThrow(); }); it("Tests node.pasteUssTree() reads clipboard contents and returns early if nothing is in the clipboard", async () => { const globalMocks = await createGlobalMocks(); From 417d8a3cce8c6f1aae2e6a057d0a94c3491a576f Mon Sep 17 00:00:00 2001 From: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:13:08 -0500 Subject: [PATCH 55/71] change back to using yarn with launch Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> --- .vscode/launch.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index a96d7680c0..7f25f373fb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -47,8 +47,8 @@ "type": "node", "name": "Zowe Explorer Unit Tests (Jest)", "request": "launch", - "program": "${workspaceFolder}/node_modules/jest/bin/jest.js", - "args": ["-i"], + "program": "${workspaceFolder}/node_modules/yarn/bin/yarn.js", + "args": ["run", "test"], "cwd": "${workspaceFolder}/packages/zowe-explorer", "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", From 39e5d2eb2dd31baa873b85a362e71535137813a4 Mon Sep 17 00:00:00 2001 From: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:32:32 -0500 Subject: [PATCH 56/71] add ZE API unit test task Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> --- .vscode/launch.json | 12 ++++++++++++ .../profiles/ZoweExplorerZosmfApi.unit.test.ts | 7 ++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 7f25f373fb..7a9282a731 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -55,6 +55,18 @@ "smartStep": true, "skipFiles": ["/**"] }, + { + "type": "node", + "name": "Zowe Explorer API Unit Tests (Jest)", + "request": "launch", + "program": "${workspaceFolder}/node_modules/yarn/bin/yarn.js", + "args": ["run", "test"], + "cwd": "${workspaceFolder}/packages/zowe-explorer-api", + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "smartStep": true, + "skipFiles": ["/**"] + }, { "name": "Zowe Explorer Integration Tests (Mocha)", "type": "extensionHost", diff --git a/packages/zowe-explorer-api/__tests__/__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts b/packages/zowe-explorer-api/__tests__/__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts index bcd9645401..4afd73d72a 100644 --- a/packages/zowe-explorer-api/__tests__/__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts +++ b/packages/zowe-explorer-api/__tests__/__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts @@ -253,16 +253,17 @@ describe("ZosmfUssApi", () => { expect(checkStatusSpy).toHaveBeenCalledTimes(1); }); - it("should test that copy calls zowe.Utilities.putUSSPayload", () => { + it("should test that copy calls zowe.Utilities.putUSSPayload", async () => { const api = new ZosmfUssApi(); api.getSession = jest.fn(); + const response = Buffer.from("hello world!"); Object.defineProperty(zowe.Utilities, "putUSSPayload", { - value: jest.fn().mockResolvedValue(Buffer.from("hello world!")), + value: jest.fn().mockResolvedValue(response), configurable: true, }); - expect(api.copy("/")).toStrictEqual(Promise.resolve(zowe.Utilities.putUSSPayload(api.getSession(), "/", { request: "copy" }))); + await expect(api.copy("/")).resolves.toEqual(response); }); it("getStatus should validate unverified profile", async () => { From b5c0a8da8a8fdc90fcb516db5c231a4fed7686c4 Mon Sep 17 00:00:00 2001 From: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:36:40 -0500 Subject: [PATCH 57/71] add ftp ext launch Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> --- .vscode/launch.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index 7a9282a731..aa4eacefd4 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -67,6 +67,18 @@ "smartStep": true, "skipFiles": ["/**"] }, + { + "type": "node", + "name": "Zowe Explorer FTP Unit Tests (Jest)", + "request": "launch", + "program": "${workspaceFolder}/node_modules/yarn/bin/yarn.js", + "args": ["run", "test"], + "cwd": "${workspaceFolder}/packages/zowe-explorer-ftp-extension", + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "smartStep": true, + "skipFiles": ["/**"] + }, { "name": "Zowe Explorer Integration Tests (Mocha)", "type": "extensionHost", From 1a90dced49303931cfab2541d8e7efe650bbd888 Mon Sep 17 00:00:00 2001 From: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:46:09 -0500 Subject: [PATCH 58/71] don't need "run" as args Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> --- .vscode/launch.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index aa4eacefd4..41bb62ae46 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -48,7 +48,7 @@ "name": "Zowe Explorer Unit Tests (Jest)", "request": "launch", "program": "${workspaceFolder}/node_modules/yarn/bin/yarn.js", - "args": ["run", "test"], + "args": ["test"], "cwd": "${workspaceFolder}/packages/zowe-explorer", "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", @@ -60,7 +60,7 @@ "name": "Zowe Explorer API Unit Tests (Jest)", "request": "launch", "program": "${workspaceFolder}/node_modules/yarn/bin/yarn.js", - "args": ["run", "test"], + "args": ["test"], "cwd": "${workspaceFolder}/packages/zowe-explorer-api", "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", @@ -72,7 +72,7 @@ "name": "Zowe Explorer FTP Unit Tests (Jest)", "request": "launch", "program": "${workspaceFolder}/node_modules/yarn/bin/yarn.js", - "args": ["run", "test"], + "args": ["test"], "cwd": "${workspaceFolder}/packages/zowe-explorer-ftp-extension", "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", From da1566c601b08d7125b7112ec221dbf493874350 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 01:08:25 +0000 Subject: [PATCH 59/71] Bump ip from 2.0.0 to 2.0.1 in /samples/menu-item-sample Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1. - [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1) --- updated-dependencies: - dependency-name: ip dependency-type: indirect ... Signed-off-by: dependabot[bot] --- samples/menu-item-sample/yarn.lock | 267 +++++++++++------------------ 1 file changed, 102 insertions(+), 165 deletions(-) diff --git a/samples/menu-item-sample/yarn.lock b/samples/menu-item-sample/yarn.lock index 59eb328aa3..2a06e466a0 100644 --- a/samples/menu-item-sample/yarn.lock +++ b/samples/menu-item-sample/yarn.lock @@ -260,46 +260,44 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@zowe/cli@^7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.18.0.tgz#21a76581cdc2b9c603fc006ce1002775e12c68c1" - integrity sha512-HDHiyavUQmqiIFyCxq9wEhswGBGFSxyQinT+Wv8q20i7D0M69J06+mR18OlWUbbR3gPMXOV2PnC8t07W7Tg3qg== - dependencies: - "@zowe/core-for-zowe-sdk" "7.18.0" - "@zowe/imperative" "5.18.0" - "@zowe/perf-timing" "1.0.7" - "@zowe/provisioning-for-zowe-sdk" "7.18.0" - "@zowe/zos-console-for-zowe-sdk" "7.18.0" - "@zowe/zos-files-for-zowe-sdk" "7.18.0" - "@zowe/zos-jobs-for-zowe-sdk" "7.18.0" - "@zowe/zos-logs-for-zowe-sdk" "7.18.0" - "@zowe/zos-tso-for-zowe-sdk" "7.18.0" - "@zowe/zos-uss-for-zowe-sdk" "7.18.0" - "@zowe/zos-workflows-for-zowe-sdk" "7.18.0" - "@zowe/zosmf-for-zowe-sdk" "7.18.0" +"@zowe/cli@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.23.3.tgz#4099c86e34437c6c9778a68155ef6556732b1e90" + integrity sha512-MRBlwAXAdimod5b3R4NaPF82thlptPDA8BRdmZDtWUAnE0sYkWepHxQcL5OjY8Gty6HrQj7t8q5ZWaawArcICg== + dependencies: + "@zowe/core-for-zowe-sdk" "7.23.3" + "@zowe/imperative" "5.22.3" + "@zowe/provisioning-for-zowe-sdk" "7.23.3" + "@zowe/zos-console-for-zowe-sdk" "7.23.3" + "@zowe/zos-files-for-zowe-sdk" "7.23.3" + "@zowe/zos-jobs-for-zowe-sdk" "7.23.3" + "@zowe/zos-logs-for-zowe-sdk" "7.23.3" + "@zowe/zos-tso-for-zowe-sdk" "7.23.3" + "@zowe/zos-uss-for-zowe-sdk" "7.23.3" + "@zowe/zos-workflows-for-zowe-sdk" "7.23.3" + "@zowe/zosmf-for-zowe-sdk" "7.23.3" find-process "1.4.7" get-stream "6.0.1" lodash "4.17.21" minimatch "5.0.1" tar "6.1.14" optionalDependencies: - "@zowe/secrets-for-zowe-sdk" "7.18.0" + "@zowe/secrets-for-zowe-sdk" "7.18.6" -"@zowe/core-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.18.0.tgz#fe210c0b639bf9b0d246a1148ae9b41243b0265d" - integrity sha512-XKvGjl/Sr49yB6OsKoIDJpztTQRXn0/+W9s2hLkgDvnvVxRPmjKjODZrHh+FIx35Ts76bmUNPPr2tWXe7mNC3Q== +"@zowe/core-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.23.3.tgz#ec8e9b1f18b162bfd8f44fdecbe858d1072334c0" + integrity sha512-gcW30wwAzSNk3jk8fQA0jFWE5A96v75Bq1l3Cs6ifzRL4YipUUmUmvb3YmNILhxrnlGrJEqSaNAf87G16Cik/g== dependencies: comment-json "4.1.1" string-width "4.2.3" -"@zowe/imperative@5.18.0": - version "5.18.0" - resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.18.0.tgz#177b19150a36572d5ec0913234b7c85cfadbbf1a" - integrity sha512-GZL9S9AZmazfu5kWLsYU/RUSW7v8mdsk4qaOhkgp38nFDnUWqM+tS768lJdAOSuROECQr0OXw/72kbGDxJhCRw== +"@zowe/imperative@5.22.3": + version "5.22.3" + resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.22.3.tgz#464b2dd167c7f20902f442cb98945cbae2dc30a6" + integrity sha512-nfUHPMczMvmPjQLg2qwmVZcnL7ZaLiiGbeGAbI/jV+qOkqsHbbFt+QJ5TSX3O3bZCZClP8idn99lTbj9v7mLcA== dependencies: "@types/yargs" "13.0.4" - "@zowe/perf-timing" "1.0.7" chalk "2.4.2" cli-table3 "0.6.2" comment-json "4.1.1" @@ -315,12 +313,12 @@ jest-diff "27.0.6" js-yaml "4.1.0" jsonfile "4.0.0" - jsonschema "1.1.1" + jsonschema "1.4.1" lodash "4.17.21" lodash-deep "2.0.0" log4js "6.4.6" markdown-it "12.3.2" - mustache "2.3.0" + mustache "4.2.0" npm-package-arg "9.1.0" opener "1.5.2" pacote "11.1.4" @@ -328,7 +326,7 @@ progress "2.0.3" read "1.0.7" readline-sync "1.4.10" - semver "7.5.2" + semver "7.5.4" stack-trace "0.0.10" strip-ansi "6.0.1" which "3.0.0" @@ -336,88 +334,75 @@ yamljs "0.3.0" yargs "15.3.1" -"@zowe/perf-timing@1.0.7": - version "1.0.7" - resolved "https://registry.npmjs.org/@zowe/perf-timing/-/perf-timing-1.0.7.tgz#527adeb6b0053b77a610e016d061209dcd942b1a" - integrity sha512-2txq0yg+POxkGQH6xe4l5wCItwy40YPuSK9cqCWVzrLgPxcvC+serhIkmJosaIMDxQe0e+vLd/mEED4l8nQGRA== - dependencies: - fs-extra "8.1.0" - pkg-up "2.0.0" - -"@zowe/provisioning-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.18.0.tgz#8059dc5667d70d53aed8ba0e9483de40951eb9cf" - integrity sha512-ejvIpzWJTzV7T6/oADFZsCD2ekxXpt7hAUk6PjR/wUUT8C11PUgaDpRkMotpF5WUF3CLLVNoUcvK6taAgjuAGg== +"@zowe/provisioning-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.23.3.tgz#3c01fcf7223640f92cabd4ae4add79f239954179" + integrity sha512-UHW+ryUUSp17FQpazCFVShxlBPUJ8qPR2uonqp8cuB9AZyYA5RdGwTzgJvAznfVYXdvSgk4WS2TPOLaCNIVOvg== dependencies: js-yaml "4.1.0" -"@zowe/secrets-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.0.tgz#d7974ac234e79ce220e15fc4f7f17d880754b739" - integrity sha512-lWs7oVjXpotWw8bu4NxPszu+MiTJgzdiYgj/0q0OBYLJdoZtKBTGRSohtoLZWpu6mfObiEICI1k8UDE8v7xbPw== - -"@zowe/secrets-for-zowe-sdk@7.18.4": - version "7.18.4" - resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.4.tgz#b755a063217a45bdffffb8d21c30afaad136b08c" - integrity sha512-eeVYZ+s9OlgqnHVVopJj3Bz4Ir6gDos5ZiT9Zf+gB6DQaeHFyvC4a2JZrLu9bEMAiVyiCTJydRaspcN4xoEi9Q== +"@zowe/secrets-for-zowe-sdk@7.18.6": + version "7.18.6" + resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.6.tgz#6b854b344babb291c26d19d82633099a46e08452" + integrity sha512-YyS1NoXddb147mBQpu5/dTfo1gdwGa/xdg85U8KCngA+RHCmNct3n2rbK3tHx9C9H6rlgjeS+Mrux5Q+PHJUgQ== -"@zowe/zos-console-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.18.0.tgz#808c377db659860be5440e0889f3f149c6676fea" - integrity sha512-rM73FjdD6l82Y2B5VPad6/fRhWKJw6YXkMmvCERZGtSSYP3vdrSqUWgsF4bCmod4hpT0DKLw+ozId4QPqgcVbw== +"@zowe/zos-console-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.23.3.tgz#388220e82ad07c5c5cf757f019ee4bb3caf9ddef" + integrity sha512-KZrxTbKtRdDdWSOrFGvHKeEsDGrPFt74EVwRtn29xAzdJeeDsGHcLz+oXRQOdGDMn2PKXG8g+jBOT+zONqnBPQ== -"@zowe/zos-files-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.18.0.tgz#a16a1d68262c1f00b80648f6e0050dd27f91ca42" - integrity sha512-FJFfUE7HCF3w7aNWwMYz2/6e5xdrfv3DtWmr9HkYeFOR7/mc9bT/hVtJAIzU2jUw7+8cK47JVidxmfHit8IgIQ== +"@zowe/zos-files-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.23.3.tgz#052e047edf6da9add9a76d78b9398891351866ec" + integrity sha512-dhuWez++WemAkAdrH0h5woH6vPMNYw6LcHzX5o+p4zLPpo3gjEzalYHkgH+MUP8eUX4M1yetLd6g82yk9hMuJQ== dependencies: get-stream "6.0.1" minimatch "5.0.1" -"@zowe/zos-jobs-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.18.0.tgz#1969cdd7ee621a955e57142a72a4954b239577e3" - integrity sha512-zCdiYNHRtBYdwnfeVKu+cXeTl/7+YEP5Srn6nDSVE0BYqpWHO0DAfff1tpeT1VarngDxOWHfqufopvDDd0PSKg== +"@zowe/zos-jobs-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.23.3.tgz#7fd3c38787ee5ef4abfa61e520d63a24deb02c0f" + integrity sha512-Ipk0kCKbCiY6Le93aO8+H0koTvSyI2ICllbs9yWC198tdbetO3oH9GJ8GXp5LKPInQQwGk1zCbnYK/YH6ZzwJg== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.18.0" + "@zowe/zos-files-for-zowe-sdk" "7.23.3" -"@zowe/zos-logs-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.18.0.tgz#7ec1c84b30e0302485f3d27b363ea164400559dd" - integrity sha512-HwYr+80ZivK2WBjd9S3tZxjx+Zgfj6W1zaRXSQgYOQBBFpGZlBhxaoAAiK2wdKk0OYaUkvcyqeftfrKxAJLuZQ== +"@zowe/zos-logs-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.23.3.tgz#22c02af97b1f3ddd2b03b4feb882d366f76e7881" + integrity sha512-e8COZ+3vmeDMLoO+/4umIwv5tmJ2Vd6EJ6Evivx9C2C9WlxVbyIu7YGjY6qf4o7yWxVJ53oVrsCXfsgDXFf7lA== -"@zowe/zos-tso-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.18.0.tgz#5571146b4bcfb6df3a43959a257a4317879d0a8d" - integrity sha512-J726M/M3NVuQl07ZuQv3Z/yq3OnWVmQnJY5a5SbNAL09OC/1jdQLELty60wZi9mbPqmXW/iXMdLuvuyKpc480Q== +"@zowe/zos-tso-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.23.3.tgz#f142d420c3ba637d8b586cdd81033ee9b58fde78" + integrity sha512-k23Kh4rK78MO3RBY5Zv/uCWyQL3id8+Rp1Y+oiLDlOxgg5RSYIO44PyUYQiahxaw4Qlv9uGYSxz1WBkh3zHXzg== dependencies: - "@zowe/zosmf-for-zowe-sdk" "7.18.0" + "@zowe/zosmf-for-zowe-sdk" "7.23.3" -"@zowe/zos-uss-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.18.0.tgz#485fda9a59f0361920eeb84677e1f161b86358bb" - integrity sha512-YMjgXvacyhxd9VpAaa010FK4eQpbAi9En467FejWlvUF0N5qWjBX5mNRFQeQ6tlMUGXcN8xdba1Zq/DB2wkXcg== +"@zowe/zos-uss-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.23.3.tgz#5e3e746c30365063f33200be6d56fc857504e96b" + integrity sha512-fhMSqgpdOu8mlZgrIgIrR/JKaNWLhxDgLAyRRDk/KGwbQGdsnfSPvzXEB6BonN94oTeIsL5gJ/iw2Sc+Q7kZow== dependencies: - ssh2 "1.11.0" + ssh2 "1.15.0" -"@zowe/zos-workflows-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.18.0.tgz#141ddcdc076e0d9479b3ef34e42535277addcc04" - integrity sha512-W1phlfJFxCCkNeZ3Vx7aHm6OrepvMPYhboQKRQp84yHlZ1qrSwdN9/8VBVijgmcD4yiz99HpysBs7bqkr/2nkw== +"@zowe/zos-workflows-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.23.3.tgz#08d1af8d51eb8d28e2192c9ea027628d6bc7b3b8" + integrity sha512-VoigwgLIPJJixEoA7asoUKIRnf2e1DhWeqtTKRfyktP5LO5Gk+UcuWqHifAE/0aDlauIpSx6oGaXNlKGr4Za1w== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.18.0" + "@zowe/zos-files-for-zowe-sdk" "7.23.3" -"@zowe/zosmf-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.18.0.tgz#1d7be74dae8a7844386a50b3b581046dd8febe2c" - integrity sha512-rrk/fQEOb7izgZnlsxFcniuY+NZaDZPDI90/ePzdWSQZPeA1lzq42Wzww9KXMpnZa3sliXXe9qfLBnrCnZYCbg== +"@zowe/zosmf-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.23.3.tgz#e7e97fe224fa5b59291116ebf2857dfc9aa17d5e" + integrity sha512-EQzfq25iLEbJOuvD/dr/ox+x3k8oOzg2iTGMvrWJcT3JIeAFrpYRpTIoiRE5xDIsEZ7BohKKupEvEa3+Iilb9w== "@zowe/zowe-explorer-api@file:../../packages/zowe-explorer-api": - version "2.12.0-SNAPSHOT" + version "2.15.0-SNAPSHOT" dependencies: "@types/vscode" "^1.53.2" - "@zowe/cli" "^7.18.0" - "@zowe/secrets-for-zowe-sdk" "7.18.4" + "@zowe/cli" "7.23.3" + "@zowe/secrets-for-zowe-sdk" "7.18.6" handlebars "^4.7.7" semver "^7.5.3" @@ -509,7 +494,7 @@ array-union@^2.1.0: resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -asn1@^0.2.4: +asn1@^0.2.6: version "0.2.6" resolved "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== @@ -706,7 +691,7 @@ core-util-is@^1.0.2: resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -cpu-features@~0.0.4: +cpu-features@~0.0.9: version "0.0.9" resolved "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.9.tgz#5226b92f0f1c63122b0a3eb84cb8335a4de499fc" integrity sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ== @@ -1013,13 +998,6 @@ find-up@4.1.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== - dependencies: - locate-path "^2.0.0" - find-up@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" @@ -1258,9 +1236,9 @@ inherits@2: integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== ip@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" - integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== + version "2.0.1" + resolved "https://registry.npmjs.org/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105" + integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ== is-extglob@^2.1.1: version "2.1.1" @@ -1348,10 +1326,10 @@ jsonparse@^1.3.1: resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -jsonschema@1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/jsonschema/-/jsonschema-1.1.1.tgz#3cede8e3e411d377872eefbc9fdf26383cbc3ed9" - integrity sha512-kHyDK+K6ehb+0LmJYzsQSd3QkRPDEPoG/59uhNzFTLVb92J9jYPaonLkzJe+Z4angkIhDeurMmvhtmjAVrz9eA== +jsonschema@1.4.1: + version "1.4.1" + resolved "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" + integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== levn@^0.4.1: version "0.4.1" @@ -1368,14 +1346,6 @@ linkify-it@^3.0.1: dependencies: uc.micro "^1.0.1" -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - locate-path@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -1588,21 +1558,26 @@ ms@^2.0.0: resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -mustache@2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/mustache/-/mustache-2.3.0.tgz#4028f7778b17708a489930a6e52ac3bca0da41d0" - integrity sha512-IgZ/cCHtDG1ft0vdDV9wrlNz20SvbUu2ECoDF6dhk2ZtedLNy1Kehy4oFlzmHPxcUQmVZuXYS2j+d0NkaEjTXQ== +mustache@4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64" + integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== mute-stream@~0.0.4: version "0.0.8" resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nan@^2.16.0, nan@^2.17.0: +nan@^2.17.0: version "2.17.0" resolved "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== +nan@^2.18.0: + version "2.18.0" + resolved "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554" + integrity sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w== + natural-compare-lite@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" @@ -1714,13 +1689,6 @@ optionator@^0.9.3: prelude-ls "^1.2.1" type-check "^0.4.0" -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - p-limit@^2.2.0: version "2.3.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -1735,13 +1703,6 @@ p-limit@^3.0.2: dependencies: yocto-queue "^0.1.0" -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== - dependencies: - p-limit "^1.1.0" - p-locate@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -1763,11 +1724,6 @@ p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== - p-try@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -1809,11 +1765,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== - path-exists@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -1839,13 +1790,6 @@ picomatch@^2.3.1: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pkg-up@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" - integrity sha512-fjAPuiws93rm7mPUu21RdBnkeZNrbfCFCwfAhPWY+rR3zG0ubpe5cEReHOw5fIbfmsxEV/g2kSxGTATY3Bpnwg== - dependencies: - find-up "^2.1.0" - prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -2000,14 +1944,7 @@ run-parallel@^1.1.9: resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -semver@7.5.2: - version "7.5.2" - resolved "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz#5b851e66d1be07c1cdaf37dfc856f543325a2beb" - integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ== - dependencies: - lru-cache "^6.0.0" - -semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3: +semver@7.5.4, semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3: version "7.5.4" resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -2068,16 +2005,16 @@ sprintf-js@~1.0.2: resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== -ssh2@1.11.0: - version "1.11.0" - resolved "https://registry.npmjs.org/ssh2/-/ssh2-1.11.0.tgz#ce60186216971e12f6deb553dcf82322498fe2e4" - integrity sha512-nfg0wZWGSsfUe/IBJkXVll3PEZ//YH2guww+mP88gTpuSU4FtZN7zu9JoeTGOyCNx2dTDtT9fOpWwlzyj4uOOw== +ssh2@1.15.0: + version "1.15.0" + resolved "https://registry.npmjs.org/ssh2/-/ssh2-1.15.0.tgz#2f998455036a7f89e0df5847efb5421748d9871b" + integrity sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw== dependencies: - asn1 "^0.2.4" + asn1 "^0.2.6" bcrypt-pbkdf "^1.0.2" optionalDependencies: - cpu-features "~0.0.4" - nan "^2.16.0" + cpu-features "~0.0.9" + nan "^2.18.0" ssri@^8.0.0, ssri@^8.0.1: version "8.0.1" From 6089d561a684d3b419f7df320dff6a17df0c19c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 01:08:26 +0000 Subject: [PATCH 60/71] Bump ip from 2.0.0 to 2.0.1 in /samples/vue-webview-sample Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1. - [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1) --- updated-dependencies: - dependency-name: ip dependency-type: indirect ... Signed-off-by: dependabot[bot] --- samples/vue-webview-sample/yarn.lock | 273 +++++++++++---------------- 1 file changed, 105 insertions(+), 168 deletions(-) diff --git a/samples/vue-webview-sample/yarn.lock b/samples/vue-webview-sample/yarn.lock index cf594255b8..1e419a082d 100644 --- a/samples/vue-webview-sample/yarn.lock +++ b/samples/vue-webview-sample/yarn.lock @@ -338,46 +338,44 @@ "@volar/typescript" "~1.10.0" "@vue/language-core" "1.8.8" -"@zowe/cli@^7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.18.0.tgz#21a76581cdc2b9c603fc006ce1002775e12c68c1" - integrity sha512-HDHiyavUQmqiIFyCxq9wEhswGBGFSxyQinT+Wv8q20i7D0M69J06+mR18OlWUbbR3gPMXOV2PnC8t07W7Tg3qg== - dependencies: - "@zowe/core-for-zowe-sdk" "7.18.0" - "@zowe/imperative" "5.18.0" - "@zowe/perf-timing" "1.0.7" - "@zowe/provisioning-for-zowe-sdk" "7.18.0" - "@zowe/zos-console-for-zowe-sdk" "7.18.0" - "@zowe/zos-files-for-zowe-sdk" "7.18.0" - "@zowe/zos-jobs-for-zowe-sdk" "7.18.0" - "@zowe/zos-logs-for-zowe-sdk" "7.18.0" - "@zowe/zos-tso-for-zowe-sdk" "7.18.0" - "@zowe/zos-uss-for-zowe-sdk" "7.18.0" - "@zowe/zos-workflows-for-zowe-sdk" "7.18.0" - "@zowe/zosmf-for-zowe-sdk" "7.18.0" +"@zowe/cli@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.23.3.tgz#4099c86e34437c6c9778a68155ef6556732b1e90" + integrity sha512-MRBlwAXAdimod5b3R4NaPF82thlptPDA8BRdmZDtWUAnE0sYkWepHxQcL5OjY8Gty6HrQj7t8q5ZWaawArcICg== + dependencies: + "@zowe/core-for-zowe-sdk" "7.23.3" + "@zowe/imperative" "5.22.3" + "@zowe/provisioning-for-zowe-sdk" "7.23.3" + "@zowe/zos-console-for-zowe-sdk" "7.23.3" + "@zowe/zos-files-for-zowe-sdk" "7.23.3" + "@zowe/zos-jobs-for-zowe-sdk" "7.23.3" + "@zowe/zos-logs-for-zowe-sdk" "7.23.3" + "@zowe/zos-tso-for-zowe-sdk" "7.23.3" + "@zowe/zos-uss-for-zowe-sdk" "7.23.3" + "@zowe/zos-workflows-for-zowe-sdk" "7.23.3" + "@zowe/zosmf-for-zowe-sdk" "7.23.3" find-process "1.4.7" get-stream "6.0.1" lodash "4.17.21" minimatch "5.0.1" tar "6.1.14" optionalDependencies: - "@zowe/secrets-for-zowe-sdk" "7.18.0" + "@zowe/secrets-for-zowe-sdk" "7.18.6" -"@zowe/core-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.18.0.tgz#fe210c0b639bf9b0d246a1148ae9b41243b0265d" - integrity sha512-XKvGjl/Sr49yB6OsKoIDJpztTQRXn0/+W9s2hLkgDvnvVxRPmjKjODZrHh+FIx35Ts76bmUNPPr2tWXe7mNC3Q== +"@zowe/core-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.23.3.tgz#ec8e9b1f18b162bfd8f44fdecbe858d1072334c0" + integrity sha512-gcW30wwAzSNk3jk8fQA0jFWE5A96v75Bq1l3Cs6ifzRL4YipUUmUmvb3YmNILhxrnlGrJEqSaNAf87G16Cik/g== dependencies: comment-json "4.1.1" string-width "4.2.3" -"@zowe/imperative@5.18.0": - version "5.18.0" - resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.18.0.tgz#177b19150a36572d5ec0913234b7c85cfadbbf1a" - integrity sha512-GZL9S9AZmazfu5kWLsYU/RUSW7v8mdsk4qaOhkgp38nFDnUWqM+tS768lJdAOSuROECQr0OXw/72kbGDxJhCRw== +"@zowe/imperative@5.22.3": + version "5.22.3" + resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.22.3.tgz#464b2dd167c7f20902f442cb98945cbae2dc30a6" + integrity sha512-nfUHPMczMvmPjQLg2qwmVZcnL7ZaLiiGbeGAbI/jV+qOkqsHbbFt+QJ5TSX3O3bZCZClP8idn99lTbj9v7mLcA== dependencies: "@types/yargs" "13.0.4" - "@zowe/perf-timing" "1.0.7" chalk "2.4.2" cli-table3 "0.6.2" comment-json "4.1.1" @@ -393,12 +391,12 @@ jest-diff "27.0.6" js-yaml "4.1.0" jsonfile "4.0.0" - jsonschema "1.1.1" + jsonschema "1.4.1" lodash "4.17.21" lodash-deep "2.0.0" log4js "6.4.6" markdown-it "12.3.2" - mustache "2.3.0" + mustache "4.2.0" npm-package-arg "9.1.0" opener "1.5.2" pacote "11.1.4" @@ -406,7 +404,7 @@ progress "2.0.3" read "1.0.7" readline-sync "1.4.10" - semver "7.5.2" + semver "7.5.4" stack-trace "0.0.10" strip-ansi "6.0.1" which "3.0.0" @@ -414,88 +412,75 @@ yamljs "0.3.0" yargs "15.3.1" -"@zowe/perf-timing@1.0.7": - version "1.0.7" - resolved "https://registry.npmjs.org/@zowe/perf-timing/-/perf-timing-1.0.7.tgz#527adeb6b0053b77a610e016d061209dcd942b1a" - integrity sha512-2txq0yg+POxkGQH6xe4l5wCItwy40YPuSK9cqCWVzrLgPxcvC+serhIkmJosaIMDxQe0e+vLd/mEED4l8nQGRA== - dependencies: - fs-extra "8.1.0" - pkg-up "2.0.0" - -"@zowe/provisioning-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.18.0.tgz#8059dc5667d70d53aed8ba0e9483de40951eb9cf" - integrity sha512-ejvIpzWJTzV7T6/oADFZsCD2ekxXpt7hAUk6PjR/wUUT8C11PUgaDpRkMotpF5WUF3CLLVNoUcvK6taAgjuAGg== +"@zowe/provisioning-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.23.3.tgz#3c01fcf7223640f92cabd4ae4add79f239954179" + integrity sha512-UHW+ryUUSp17FQpazCFVShxlBPUJ8qPR2uonqp8cuB9AZyYA5RdGwTzgJvAznfVYXdvSgk4WS2TPOLaCNIVOvg== dependencies: js-yaml "4.1.0" -"@zowe/secrets-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.0.tgz#d7974ac234e79ce220e15fc4f7f17d880754b739" - integrity sha512-lWs7oVjXpotWw8bu4NxPszu+MiTJgzdiYgj/0q0OBYLJdoZtKBTGRSohtoLZWpu6mfObiEICI1k8UDE8v7xbPw== - -"@zowe/secrets-for-zowe-sdk@7.18.4": - version "7.18.4" - resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.4.tgz#b755a063217a45bdffffb8d21c30afaad136b08c" - integrity sha512-eeVYZ+s9OlgqnHVVopJj3Bz4Ir6gDos5ZiT9Zf+gB6DQaeHFyvC4a2JZrLu9bEMAiVyiCTJydRaspcN4xoEi9Q== +"@zowe/secrets-for-zowe-sdk@7.18.6": + version "7.18.6" + resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.6.tgz#6b854b344babb291c26d19d82633099a46e08452" + integrity sha512-YyS1NoXddb147mBQpu5/dTfo1gdwGa/xdg85U8KCngA+RHCmNct3n2rbK3tHx9C9H6rlgjeS+Mrux5Q+PHJUgQ== -"@zowe/zos-console-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.18.0.tgz#808c377db659860be5440e0889f3f149c6676fea" - integrity sha512-rM73FjdD6l82Y2B5VPad6/fRhWKJw6YXkMmvCERZGtSSYP3vdrSqUWgsF4bCmod4hpT0DKLw+ozId4QPqgcVbw== +"@zowe/zos-console-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.23.3.tgz#388220e82ad07c5c5cf757f019ee4bb3caf9ddef" + integrity sha512-KZrxTbKtRdDdWSOrFGvHKeEsDGrPFt74EVwRtn29xAzdJeeDsGHcLz+oXRQOdGDMn2PKXG8g+jBOT+zONqnBPQ== -"@zowe/zos-files-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.18.0.tgz#a16a1d68262c1f00b80648f6e0050dd27f91ca42" - integrity sha512-FJFfUE7HCF3w7aNWwMYz2/6e5xdrfv3DtWmr9HkYeFOR7/mc9bT/hVtJAIzU2jUw7+8cK47JVidxmfHit8IgIQ== +"@zowe/zos-files-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.23.3.tgz#052e047edf6da9add9a76d78b9398891351866ec" + integrity sha512-dhuWez++WemAkAdrH0h5woH6vPMNYw6LcHzX5o+p4zLPpo3gjEzalYHkgH+MUP8eUX4M1yetLd6g82yk9hMuJQ== dependencies: get-stream "6.0.1" minimatch "5.0.1" -"@zowe/zos-jobs-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.18.0.tgz#1969cdd7ee621a955e57142a72a4954b239577e3" - integrity sha512-zCdiYNHRtBYdwnfeVKu+cXeTl/7+YEP5Srn6nDSVE0BYqpWHO0DAfff1tpeT1VarngDxOWHfqufopvDDd0PSKg== +"@zowe/zos-jobs-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.23.3.tgz#7fd3c38787ee5ef4abfa61e520d63a24deb02c0f" + integrity sha512-Ipk0kCKbCiY6Le93aO8+H0koTvSyI2ICllbs9yWC198tdbetO3oH9GJ8GXp5LKPInQQwGk1zCbnYK/YH6ZzwJg== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.18.0" + "@zowe/zos-files-for-zowe-sdk" "7.23.3" -"@zowe/zos-logs-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.18.0.tgz#7ec1c84b30e0302485f3d27b363ea164400559dd" - integrity sha512-HwYr+80ZivK2WBjd9S3tZxjx+Zgfj6W1zaRXSQgYOQBBFpGZlBhxaoAAiK2wdKk0OYaUkvcyqeftfrKxAJLuZQ== +"@zowe/zos-logs-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.23.3.tgz#22c02af97b1f3ddd2b03b4feb882d366f76e7881" + integrity sha512-e8COZ+3vmeDMLoO+/4umIwv5tmJ2Vd6EJ6Evivx9C2C9WlxVbyIu7YGjY6qf4o7yWxVJ53oVrsCXfsgDXFf7lA== -"@zowe/zos-tso-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.18.0.tgz#5571146b4bcfb6df3a43959a257a4317879d0a8d" - integrity sha512-J726M/M3NVuQl07ZuQv3Z/yq3OnWVmQnJY5a5SbNAL09OC/1jdQLELty60wZi9mbPqmXW/iXMdLuvuyKpc480Q== +"@zowe/zos-tso-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.23.3.tgz#f142d420c3ba637d8b586cdd81033ee9b58fde78" + integrity sha512-k23Kh4rK78MO3RBY5Zv/uCWyQL3id8+Rp1Y+oiLDlOxgg5RSYIO44PyUYQiahxaw4Qlv9uGYSxz1WBkh3zHXzg== dependencies: - "@zowe/zosmf-for-zowe-sdk" "7.18.0" + "@zowe/zosmf-for-zowe-sdk" "7.23.3" -"@zowe/zos-uss-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.18.0.tgz#485fda9a59f0361920eeb84677e1f161b86358bb" - integrity sha512-YMjgXvacyhxd9VpAaa010FK4eQpbAi9En467FejWlvUF0N5qWjBX5mNRFQeQ6tlMUGXcN8xdba1Zq/DB2wkXcg== +"@zowe/zos-uss-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.23.3.tgz#5e3e746c30365063f33200be6d56fc857504e96b" + integrity sha512-fhMSqgpdOu8mlZgrIgIrR/JKaNWLhxDgLAyRRDk/KGwbQGdsnfSPvzXEB6BonN94oTeIsL5gJ/iw2Sc+Q7kZow== dependencies: - ssh2 "1.11.0" + ssh2 "1.15.0" -"@zowe/zos-workflows-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.18.0.tgz#141ddcdc076e0d9479b3ef34e42535277addcc04" - integrity sha512-W1phlfJFxCCkNeZ3Vx7aHm6OrepvMPYhboQKRQp84yHlZ1qrSwdN9/8VBVijgmcD4yiz99HpysBs7bqkr/2nkw== +"@zowe/zos-workflows-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.23.3.tgz#08d1af8d51eb8d28e2192c9ea027628d6bc7b3b8" + integrity sha512-VoigwgLIPJJixEoA7asoUKIRnf2e1DhWeqtTKRfyktP5LO5Gk+UcuWqHifAE/0aDlauIpSx6oGaXNlKGr4Za1w== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.18.0" + "@zowe/zos-files-for-zowe-sdk" "7.23.3" -"@zowe/zosmf-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.18.0.tgz#1d7be74dae8a7844386a50b3b581046dd8febe2c" - integrity sha512-rrk/fQEOb7izgZnlsxFcniuY+NZaDZPDI90/ePzdWSQZPeA1lzq42Wzww9KXMpnZa3sliXXe9qfLBnrCnZYCbg== +"@zowe/zosmf-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.23.3.tgz#e7e97fe224fa5b59291116ebf2857dfc9aa17d5e" + integrity sha512-EQzfq25iLEbJOuvD/dr/ox+x3k8oOzg2iTGMvrWJcT3JIeAFrpYRpTIoiRE5xDIsEZ7BohKKupEvEa3+Iilb9w== "@zowe/zowe-explorer-api@file:../../packages/zowe-explorer-api": - version "2.12.0-SNAPSHOT" + version "2.15.0-SNAPSHOT" dependencies: "@types/vscode" "^1.53.2" - "@zowe/cli" "^7.18.0" - "@zowe/secrets-for-zowe-sdk" "7.18.4" + "@zowe/cli" "7.23.3" + "@zowe/secrets-for-zowe-sdk" "7.18.6" handlebars "^4.7.7" semver "^7.5.3" @@ -587,7 +572,7 @@ array-union@^2.1.0: resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -asn1@^0.2.4: +asn1@^0.2.6: version "0.2.6" resolved "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== @@ -784,10 +769,10 @@ core-util-is@^1.0.2: resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -cpu-features@~0.0.4: - version "0.0.8" - resolved "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.8.tgz#a2d464b023b8ad09004c8cdca23b33f192f63546" - integrity sha512-BbHBvtYhUhksqTjr6bhNOjGgMnhwhGTQmOoZGD+K7BCaQDCuZl/Ve1ZxUSMRwVC4D/rkCPQ2MAIeYzrWyK7eEg== +cpu-features@~0.0.9: + version "0.0.9" + resolved "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.9.tgz#5226b92f0f1c63122b0a3eb84cb8335a4de499fc" + integrity sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ== dependencies: buildcheck "~0.0.6" nan "^2.17.0" @@ -1101,13 +1086,6 @@ find-up@4.1.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== - dependencies: - locate-path "^2.0.0" - find-up@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" @@ -1351,9 +1329,9 @@ inherits@2: integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== ip@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" - integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== + version "2.0.1" + resolved "https://registry.npmjs.org/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105" + integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ== is-extglob@^2.1.1: version "2.1.1" @@ -1441,10 +1419,10 @@ jsonparse@^1.3.1: resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -jsonschema@1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/jsonschema/-/jsonschema-1.1.1.tgz#3cede8e3e411d377872eefbc9fdf26383cbc3ed9" - integrity sha512-kHyDK+K6ehb+0LmJYzsQSd3QkRPDEPoG/59uhNzFTLVb92J9jYPaonLkzJe+Z4angkIhDeurMmvhtmjAVrz9eA== +jsonschema@1.4.1: + version "1.4.1" + resolved "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" + integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== levn@^0.4.1: version "0.4.1" @@ -1461,14 +1439,6 @@ linkify-it@^3.0.1: dependencies: uc.micro "^1.0.1" -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - locate-path@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -1693,21 +1663,26 @@ muggle-string@^0.3.1: resolved "https://registry.npmjs.org/muggle-string/-/muggle-string-0.3.1.tgz#e524312eb1728c63dd0b2ac49e3282e6ed85963a" integrity sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg== -mustache@2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/mustache/-/mustache-2.3.0.tgz#4028f7778b17708a489930a6e52ac3bca0da41d0" - integrity sha512-IgZ/cCHtDG1ft0vdDV9wrlNz20SvbUu2ECoDF6dhk2ZtedLNy1Kehy4oFlzmHPxcUQmVZuXYS2j+d0NkaEjTXQ== +mustache@4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64" + integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== mute-stream@~0.0.4: version "0.0.8" resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nan@^2.16.0, nan@^2.17.0: +nan@^2.17.0: version "2.17.0" resolved "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== +nan@^2.18.0: + version "2.18.0" + resolved "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554" + integrity sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w== + natural-compare-lite@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" @@ -1819,13 +1794,6 @@ optionator@^0.9.3: prelude-ls "^1.2.1" type-check "^0.4.0" -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - p-limit@^2.2.0: version "2.3.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -1840,13 +1808,6 @@ p-limit@^3.0.2: dependencies: yocto-queue "^0.1.0" -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== - dependencies: - p-limit "^1.1.0" - p-locate@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -1868,11 +1829,6 @@ p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== - p-try@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -1914,11 +1870,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== - path-exists@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -1944,13 +1895,6 @@ picomatch@^2.3.1: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pkg-up@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" - integrity sha512-fjAPuiws93rm7mPUu21RdBnkeZNrbfCFCwfAhPWY+rR3zG0ubpe5cEReHOw5fIbfmsxEV/g2kSxGTATY3Bpnwg== - dependencies: - find-up "^2.1.0" - prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -2105,14 +2049,7 @@ run-parallel@^1.1.9: resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -semver@7.5.2: - version "7.5.2" - resolved "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz#5b851e66d1be07c1cdaf37dfc856f543325a2beb" - integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ== - dependencies: - lru-cache "^6.0.0" - -semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3: +semver@7.5.4, semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3: version "7.5.4" resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -2178,16 +2115,16 @@ sprintf-js@~1.0.2: resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== -ssh2@1.11.0: - version "1.11.0" - resolved "https://registry.npmjs.org/ssh2/-/ssh2-1.11.0.tgz#ce60186216971e12f6deb553dcf82322498fe2e4" - integrity sha512-nfg0wZWGSsfUe/IBJkXVll3PEZ//YH2guww+mP88gTpuSU4FtZN7zu9JoeTGOyCNx2dTDtT9fOpWwlzyj4uOOw== +ssh2@1.15.0: + version "1.15.0" + resolved "https://registry.npmjs.org/ssh2/-/ssh2-1.15.0.tgz#2f998455036a7f89e0df5847efb5421748d9871b" + integrity sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw== dependencies: - asn1 "^0.2.4" + asn1 "^0.2.6" bcrypt-pbkdf "^1.0.2" optionalDependencies: - cpu-features "~0.0.4" - nan "^2.16.0" + cpu-features "~0.0.9" + nan "^2.18.0" ssri@^8.0.0, ssri@^8.0.1: version "8.0.1" From a686d7b4a197e23cd7d2cf529a840f43b040c3fe Mon Sep 17 00:00:00 2001 From: likhithanimma1 <142219673+likhithanimma1@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:45:53 +0530 Subject: [PATCH 61/71] Make all profiles to work when APIML token authentication is used Signed-off-by: likhithanimma1 <142219673+likhithanimma1@users.noreply.github.com> --- packages/zowe-explorer-api/src/profiles/ProfilesCache.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/zowe-explorer-api/src/profiles/ProfilesCache.ts b/packages/zowe-explorer-api/src/profiles/ProfilesCache.ts index a4718a0b6c..71eafac78c 100644 --- a/packages/zowe-explorer-api/src/profiles/ProfilesCache.ts +++ b/packages/zowe-explorer-api/src/profiles/ProfilesCache.ts @@ -539,11 +539,10 @@ export class ProfilesCache { } private shouldRemoveTokenFromProfile(profile: zowe.imperative.IProfileLoaded, baseProfile: zowe.imperative.IProfileLoaded): boolean { - return (baseProfile?.profile?.host && - baseProfile?.profile?.port && + return ((baseProfile?.profile?.host || baseProfile?.profile?.port) && profile?.profile?.host && profile?.profile?.port && - (baseProfile?.profile.host !== profile?.profile.host || baseProfile?.profile.port !== profile?.profile.port) && + (baseProfile?.profile.host !== profile?.profile.host || (profile?.profile.user && profile?.profile.password))&& profile?.profile.tokenType?.startsWith(zowe.imperative.SessConstants.TOKEN_TYPE_APIML)) as boolean; } From 4ccefea16ef22c994aca827bfdeda7b191b5c124 Mon Sep 17 00:00:00 2001 From: likhithanimma1 <142219673+likhithanimma1@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:34:07 +0530 Subject: [PATCH 62/71] Updated changelog and fixed linting Signed-off-by: likhithanimma1 <142219673+likhithanimma1@users.noreply.github.com> --- packages/zowe-explorer-api/CHANGELOG.md | 1 + packages/zowe-explorer-api/src/profiles/ProfilesCache.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/zowe-explorer-api/CHANGELOG.md b/packages/zowe-explorer-api/CHANGELOG.md index 717bb5221e..73d2552966 100644 --- a/packages/zowe-explorer-api/CHANGELOG.md +++ b/packages/zowe-explorer-api/CHANGELOG.md @@ -10,6 +10,7 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t - Fix login and logout operations when APIML dynamic tokens are enabled. [#2692](https://github.com/zowe/vscode-extension-for-zowe/pull/2692) - Fixed issue where `zosmf` profiles did not respect the `protocol` property. [#2703](https://github.com/zowe/vscode-extension-for-zowe/issues/2703) +- Fix to restore accessibility to all profiles when default profile has APIML token authentication. [#2111](https://github.com/zowe/vscode-extension-for-zowe/issues/2111) ## `2.14.1` diff --git a/packages/zowe-explorer-api/src/profiles/ProfilesCache.ts b/packages/zowe-explorer-api/src/profiles/ProfilesCache.ts index 71eafac78c..3e357861c0 100644 --- a/packages/zowe-explorer-api/src/profiles/ProfilesCache.ts +++ b/packages/zowe-explorer-api/src/profiles/ProfilesCache.ts @@ -542,7 +542,7 @@ export class ProfilesCache { return ((baseProfile?.profile?.host || baseProfile?.profile?.port) && profile?.profile?.host && profile?.profile?.port && - (baseProfile?.profile.host !== profile?.profile.host || (profile?.profile.user && profile?.profile.password))&& + (baseProfile?.profile.host !== profile?.profile.host || (profile?.profile.user && profile?.profile.password)) && profile?.profile.tokenType?.startsWith(zowe.imperative.SessConstants.TOKEN_TYPE_APIML)) as boolean; } From 24b6cb9a8da2d8b121dad5e448ec5e130e8f8e5a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:08:47 +0000 Subject: [PATCH 63/71] Bump ip from 2.0.0 to 2.0.1 in /samples/tree-view-sample Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1. - [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1) --- updated-dependencies: - dependency-name: ip dependency-type: indirect ... Signed-off-by: dependabot[bot] --- samples/tree-view-sample/yarn.lock | 267 +++++++++++------------------ 1 file changed, 102 insertions(+), 165 deletions(-) diff --git a/samples/tree-view-sample/yarn.lock b/samples/tree-view-sample/yarn.lock index 5d8538b3b9..2a06e466a0 100644 --- a/samples/tree-view-sample/yarn.lock +++ b/samples/tree-view-sample/yarn.lock @@ -260,46 +260,44 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@zowe/cli@^7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.18.0.tgz#21a76581cdc2b9c603fc006ce1002775e12c68c1" - integrity sha512-HDHiyavUQmqiIFyCxq9wEhswGBGFSxyQinT+Wv8q20i7D0M69J06+mR18OlWUbbR3gPMXOV2PnC8t07W7Tg3qg== - dependencies: - "@zowe/core-for-zowe-sdk" "7.18.0" - "@zowe/imperative" "5.18.0" - "@zowe/perf-timing" "1.0.7" - "@zowe/provisioning-for-zowe-sdk" "7.18.0" - "@zowe/zos-console-for-zowe-sdk" "7.18.0" - "@zowe/zos-files-for-zowe-sdk" "7.18.0" - "@zowe/zos-jobs-for-zowe-sdk" "7.18.0" - "@zowe/zos-logs-for-zowe-sdk" "7.18.0" - "@zowe/zos-tso-for-zowe-sdk" "7.18.0" - "@zowe/zos-uss-for-zowe-sdk" "7.18.0" - "@zowe/zos-workflows-for-zowe-sdk" "7.18.0" - "@zowe/zosmf-for-zowe-sdk" "7.18.0" +"@zowe/cli@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.23.3.tgz#4099c86e34437c6c9778a68155ef6556732b1e90" + integrity sha512-MRBlwAXAdimod5b3R4NaPF82thlptPDA8BRdmZDtWUAnE0sYkWepHxQcL5OjY8Gty6HrQj7t8q5ZWaawArcICg== + dependencies: + "@zowe/core-for-zowe-sdk" "7.23.3" + "@zowe/imperative" "5.22.3" + "@zowe/provisioning-for-zowe-sdk" "7.23.3" + "@zowe/zos-console-for-zowe-sdk" "7.23.3" + "@zowe/zos-files-for-zowe-sdk" "7.23.3" + "@zowe/zos-jobs-for-zowe-sdk" "7.23.3" + "@zowe/zos-logs-for-zowe-sdk" "7.23.3" + "@zowe/zos-tso-for-zowe-sdk" "7.23.3" + "@zowe/zos-uss-for-zowe-sdk" "7.23.3" + "@zowe/zos-workflows-for-zowe-sdk" "7.23.3" + "@zowe/zosmf-for-zowe-sdk" "7.23.3" find-process "1.4.7" get-stream "6.0.1" lodash "4.17.21" minimatch "5.0.1" tar "6.1.14" optionalDependencies: - "@zowe/secrets-for-zowe-sdk" "7.18.0" + "@zowe/secrets-for-zowe-sdk" "7.18.6" -"@zowe/core-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.18.0.tgz#fe210c0b639bf9b0d246a1148ae9b41243b0265d" - integrity sha512-XKvGjl/Sr49yB6OsKoIDJpztTQRXn0/+W9s2hLkgDvnvVxRPmjKjODZrHh+FIx35Ts76bmUNPPr2tWXe7mNC3Q== +"@zowe/core-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.23.3.tgz#ec8e9b1f18b162bfd8f44fdecbe858d1072334c0" + integrity sha512-gcW30wwAzSNk3jk8fQA0jFWE5A96v75Bq1l3Cs6ifzRL4YipUUmUmvb3YmNILhxrnlGrJEqSaNAf87G16Cik/g== dependencies: comment-json "4.1.1" string-width "4.2.3" -"@zowe/imperative@5.18.0", "@zowe/imperative@^5.18.0": - version "5.18.0" - resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.18.0.tgz#177b19150a36572d5ec0913234b7c85cfadbbf1a" - integrity sha512-GZL9S9AZmazfu5kWLsYU/RUSW7v8mdsk4qaOhkgp38nFDnUWqM+tS768lJdAOSuROECQr0OXw/72kbGDxJhCRw== +"@zowe/imperative@5.22.3": + version "5.22.3" + resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.22.3.tgz#464b2dd167c7f20902f442cb98945cbae2dc30a6" + integrity sha512-nfUHPMczMvmPjQLg2qwmVZcnL7ZaLiiGbeGAbI/jV+qOkqsHbbFt+QJ5TSX3O3bZCZClP8idn99lTbj9v7mLcA== dependencies: "@types/yargs" "13.0.4" - "@zowe/perf-timing" "1.0.7" chalk "2.4.2" cli-table3 "0.6.2" comment-json "4.1.1" @@ -315,12 +313,12 @@ jest-diff "27.0.6" js-yaml "4.1.0" jsonfile "4.0.0" - jsonschema "1.1.1" + jsonschema "1.4.1" lodash "4.17.21" lodash-deep "2.0.0" log4js "6.4.6" markdown-it "12.3.2" - mustache "2.3.0" + mustache "4.2.0" npm-package-arg "9.1.0" opener "1.5.2" pacote "11.1.4" @@ -328,7 +326,7 @@ progress "2.0.3" read "1.0.7" readline-sync "1.4.10" - semver "7.5.2" + semver "7.5.4" stack-trace "0.0.10" strip-ansi "6.0.1" which "3.0.0" @@ -336,88 +334,75 @@ yamljs "0.3.0" yargs "15.3.1" -"@zowe/perf-timing@1.0.7": - version "1.0.7" - resolved "https://registry.npmjs.org/@zowe/perf-timing/-/perf-timing-1.0.7.tgz#527adeb6b0053b77a610e016d061209dcd942b1a" - integrity sha512-2txq0yg+POxkGQH6xe4l5wCItwy40YPuSK9cqCWVzrLgPxcvC+serhIkmJosaIMDxQe0e+vLd/mEED4l8nQGRA== - dependencies: - fs-extra "8.1.0" - pkg-up "2.0.0" - -"@zowe/provisioning-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.18.0.tgz#8059dc5667d70d53aed8ba0e9483de40951eb9cf" - integrity sha512-ejvIpzWJTzV7T6/oADFZsCD2ekxXpt7hAUk6PjR/wUUT8C11PUgaDpRkMotpF5WUF3CLLVNoUcvK6taAgjuAGg== +"@zowe/provisioning-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.23.3.tgz#3c01fcf7223640f92cabd4ae4add79f239954179" + integrity sha512-UHW+ryUUSp17FQpazCFVShxlBPUJ8qPR2uonqp8cuB9AZyYA5RdGwTzgJvAznfVYXdvSgk4WS2TPOLaCNIVOvg== dependencies: js-yaml "4.1.0" -"@zowe/secrets-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.0.tgz#d7974ac234e79ce220e15fc4f7f17d880754b739" - integrity sha512-lWs7oVjXpotWw8bu4NxPszu+MiTJgzdiYgj/0q0OBYLJdoZtKBTGRSohtoLZWpu6mfObiEICI1k8UDE8v7xbPw== - -"@zowe/secrets-for-zowe-sdk@7.18.4": - version "7.18.4" - resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.4.tgz#b755a063217a45bdffffb8d21c30afaad136b08c" - integrity sha512-eeVYZ+s9OlgqnHVVopJj3Bz4Ir6gDos5ZiT9Zf+gB6DQaeHFyvC4a2JZrLu9bEMAiVyiCTJydRaspcN4xoEi9Q== +"@zowe/secrets-for-zowe-sdk@7.18.6": + version "7.18.6" + resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.6.tgz#6b854b344babb291c26d19d82633099a46e08452" + integrity sha512-YyS1NoXddb147mBQpu5/dTfo1gdwGa/xdg85U8KCngA+RHCmNct3n2rbK3tHx9C9H6rlgjeS+Mrux5Q+PHJUgQ== -"@zowe/zos-console-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.18.0.tgz#808c377db659860be5440e0889f3f149c6676fea" - integrity sha512-rM73FjdD6l82Y2B5VPad6/fRhWKJw6YXkMmvCERZGtSSYP3vdrSqUWgsF4bCmod4hpT0DKLw+ozId4QPqgcVbw== +"@zowe/zos-console-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.23.3.tgz#388220e82ad07c5c5cf757f019ee4bb3caf9ddef" + integrity sha512-KZrxTbKtRdDdWSOrFGvHKeEsDGrPFt74EVwRtn29xAzdJeeDsGHcLz+oXRQOdGDMn2PKXG8g+jBOT+zONqnBPQ== -"@zowe/zos-files-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.18.0.tgz#a16a1d68262c1f00b80648f6e0050dd27f91ca42" - integrity sha512-FJFfUE7HCF3w7aNWwMYz2/6e5xdrfv3DtWmr9HkYeFOR7/mc9bT/hVtJAIzU2jUw7+8cK47JVidxmfHit8IgIQ== +"@zowe/zos-files-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.23.3.tgz#052e047edf6da9add9a76d78b9398891351866ec" + integrity sha512-dhuWez++WemAkAdrH0h5woH6vPMNYw6LcHzX5o+p4zLPpo3gjEzalYHkgH+MUP8eUX4M1yetLd6g82yk9hMuJQ== dependencies: get-stream "6.0.1" minimatch "5.0.1" -"@zowe/zos-jobs-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.18.0.tgz#1969cdd7ee621a955e57142a72a4954b239577e3" - integrity sha512-zCdiYNHRtBYdwnfeVKu+cXeTl/7+YEP5Srn6nDSVE0BYqpWHO0DAfff1tpeT1VarngDxOWHfqufopvDDd0PSKg== +"@zowe/zos-jobs-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.23.3.tgz#7fd3c38787ee5ef4abfa61e520d63a24deb02c0f" + integrity sha512-Ipk0kCKbCiY6Le93aO8+H0koTvSyI2ICllbs9yWC198tdbetO3oH9GJ8GXp5LKPInQQwGk1zCbnYK/YH6ZzwJg== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.18.0" + "@zowe/zos-files-for-zowe-sdk" "7.23.3" -"@zowe/zos-logs-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.18.0.tgz#7ec1c84b30e0302485f3d27b363ea164400559dd" - integrity sha512-HwYr+80ZivK2WBjd9S3tZxjx+Zgfj6W1zaRXSQgYOQBBFpGZlBhxaoAAiK2wdKk0OYaUkvcyqeftfrKxAJLuZQ== +"@zowe/zos-logs-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.23.3.tgz#22c02af97b1f3ddd2b03b4feb882d366f76e7881" + integrity sha512-e8COZ+3vmeDMLoO+/4umIwv5tmJ2Vd6EJ6Evivx9C2C9WlxVbyIu7YGjY6qf4o7yWxVJ53oVrsCXfsgDXFf7lA== -"@zowe/zos-tso-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.18.0.tgz#5571146b4bcfb6df3a43959a257a4317879d0a8d" - integrity sha512-J726M/M3NVuQl07ZuQv3Z/yq3OnWVmQnJY5a5SbNAL09OC/1jdQLELty60wZi9mbPqmXW/iXMdLuvuyKpc480Q== +"@zowe/zos-tso-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.23.3.tgz#f142d420c3ba637d8b586cdd81033ee9b58fde78" + integrity sha512-k23Kh4rK78MO3RBY5Zv/uCWyQL3id8+Rp1Y+oiLDlOxgg5RSYIO44PyUYQiahxaw4Qlv9uGYSxz1WBkh3zHXzg== dependencies: - "@zowe/zosmf-for-zowe-sdk" "7.18.0" + "@zowe/zosmf-for-zowe-sdk" "7.23.3" -"@zowe/zos-uss-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.18.0.tgz#485fda9a59f0361920eeb84677e1f161b86358bb" - integrity sha512-YMjgXvacyhxd9VpAaa010FK4eQpbAi9En467FejWlvUF0N5qWjBX5mNRFQeQ6tlMUGXcN8xdba1Zq/DB2wkXcg== +"@zowe/zos-uss-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.23.3.tgz#5e3e746c30365063f33200be6d56fc857504e96b" + integrity sha512-fhMSqgpdOu8mlZgrIgIrR/JKaNWLhxDgLAyRRDk/KGwbQGdsnfSPvzXEB6BonN94oTeIsL5gJ/iw2Sc+Q7kZow== dependencies: - ssh2 "1.11.0" + ssh2 "1.15.0" -"@zowe/zos-workflows-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.18.0.tgz#141ddcdc076e0d9479b3ef34e42535277addcc04" - integrity sha512-W1phlfJFxCCkNeZ3Vx7aHm6OrepvMPYhboQKRQp84yHlZ1qrSwdN9/8VBVijgmcD4yiz99HpysBs7bqkr/2nkw== +"@zowe/zos-workflows-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.23.3.tgz#08d1af8d51eb8d28e2192c9ea027628d6bc7b3b8" + integrity sha512-VoigwgLIPJJixEoA7asoUKIRnf2e1DhWeqtTKRfyktP5LO5Gk+UcuWqHifAE/0aDlauIpSx6oGaXNlKGr4Za1w== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.18.0" + "@zowe/zos-files-for-zowe-sdk" "7.23.3" -"@zowe/zosmf-for-zowe-sdk@7.18.0": - version "7.18.0" - resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.18.0.tgz#1d7be74dae8a7844386a50b3b581046dd8febe2c" - integrity sha512-rrk/fQEOb7izgZnlsxFcniuY+NZaDZPDI90/ePzdWSQZPeA1lzq42Wzww9KXMpnZa3sliXXe9qfLBnrCnZYCbg== +"@zowe/zosmf-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.23.3.tgz#e7e97fe224fa5b59291116ebf2857dfc9aa17d5e" + integrity sha512-EQzfq25iLEbJOuvD/dr/ox+x3k8oOzg2iTGMvrWJcT3JIeAFrpYRpTIoiRE5xDIsEZ7BohKKupEvEa3+Iilb9w== "@zowe/zowe-explorer-api@file:../../packages/zowe-explorer-api": - version "2.12.0-SNAPSHOT" + version "2.15.0-SNAPSHOT" dependencies: "@types/vscode" "^1.53.2" - "@zowe/cli" "^7.18.0" - "@zowe/secrets-for-zowe-sdk" "7.18.4" + "@zowe/cli" "7.23.3" + "@zowe/secrets-for-zowe-sdk" "7.18.6" handlebars "^4.7.7" semver "^7.5.3" @@ -509,7 +494,7 @@ array-union@^2.1.0: resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -asn1@^0.2.4: +asn1@^0.2.6: version "0.2.6" resolved "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== @@ -706,7 +691,7 @@ core-util-is@^1.0.2: resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -cpu-features@~0.0.4: +cpu-features@~0.0.9: version "0.0.9" resolved "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.9.tgz#5226b92f0f1c63122b0a3eb84cb8335a4de499fc" integrity sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ== @@ -1013,13 +998,6 @@ find-up@4.1.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== - dependencies: - locate-path "^2.0.0" - find-up@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" @@ -1258,9 +1236,9 @@ inherits@2: integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== ip@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" - integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== + version "2.0.1" + resolved "https://registry.npmjs.org/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105" + integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ== is-extglob@^2.1.1: version "2.1.1" @@ -1348,10 +1326,10 @@ jsonparse@^1.3.1: resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -jsonschema@1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/jsonschema/-/jsonschema-1.1.1.tgz#3cede8e3e411d377872eefbc9fdf26383cbc3ed9" - integrity sha512-kHyDK+K6ehb+0LmJYzsQSd3QkRPDEPoG/59uhNzFTLVb92J9jYPaonLkzJe+Z4angkIhDeurMmvhtmjAVrz9eA== +jsonschema@1.4.1: + version "1.4.1" + resolved "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" + integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== levn@^0.4.1: version "0.4.1" @@ -1368,14 +1346,6 @@ linkify-it@^3.0.1: dependencies: uc.micro "^1.0.1" -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - locate-path@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -1588,21 +1558,26 @@ ms@^2.0.0: resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -mustache@2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/mustache/-/mustache-2.3.0.tgz#4028f7778b17708a489930a6e52ac3bca0da41d0" - integrity sha512-IgZ/cCHtDG1ft0vdDV9wrlNz20SvbUu2ECoDF6dhk2ZtedLNy1Kehy4oFlzmHPxcUQmVZuXYS2j+d0NkaEjTXQ== +mustache@4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64" + integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== mute-stream@~0.0.4: version "0.0.8" resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nan@^2.16.0, nan@^2.17.0: +nan@^2.17.0: version "2.17.0" resolved "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== +nan@^2.18.0: + version "2.18.0" + resolved "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554" + integrity sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w== + natural-compare-lite@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" @@ -1714,13 +1689,6 @@ optionator@^0.9.3: prelude-ls "^1.2.1" type-check "^0.4.0" -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - p-limit@^2.2.0: version "2.3.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -1735,13 +1703,6 @@ p-limit@^3.0.2: dependencies: yocto-queue "^0.1.0" -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== - dependencies: - p-limit "^1.1.0" - p-locate@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -1763,11 +1724,6 @@ p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== - p-try@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -1809,11 +1765,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== - path-exists@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -1839,13 +1790,6 @@ picomatch@^2.3.1: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pkg-up@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" - integrity sha512-fjAPuiws93rm7mPUu21RdBnkeZNrbfCFCwfAhPWY+rR3zG0ubpe5cEReHOw5fIbfmsxEV/g2kSxGTATY3Bpnwg== - dependencies: - find-up "^2.1.0" - prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -2000,14 +1944,7 @@ run-parallel@^1.1.9: resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -semver@7.5.2: - version "7.5.2" - resolved "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz#5b851e66d1be07c1cdaf37dfc856f543325a2beb" - integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ== - dependencies: - lru-cache "^6.0.0" - -semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3: +semver@7.5.4, semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3: version "7.5.4" resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -2068,16 +2005,16 @@ sprintf-js@~1.0.2: resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== -ssh2@1.11.0: - version "1.11.0" - resolved "https://registry.npmjs.org/ssh2/-/ssh2-1.11.0.tgz#ce60186216971e12f6deb553dcf82322498fe2e4" - integrity sha512-nfg0wZWGSsfUe/IBJkXVll3PEZ//YH2guww+mP88gTpuSU4FtZN7zu9JoeTGOyCNx2dTDtT9fOpWwlzyj4uOOw== +ssh2@1.15.0: + version "1.15.0" + resolved "https://registry.npmjs.org/ssh2/-/ssh2-1.15.0.tgz#2f998455036a7f89e0df5847efb5421748d9871b" + integrity sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw== dependencies: - asn1 "^0.2.4" + asn1 "^0.2.6" bcrypt-pbkdf "^1.0.2" optionalDependencies: - cpu-features "~0.0.4" - nan "^2.16.0" + cpu-features "~0.0.9" + nan "^2.18.0" ssri@^8.0.0, ssri@^8.0.1: version "8.0.1" From 5ec0f715830dd659a27679912365c706d30063ad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:26:39 +0000 Subject: [PATCH 64/71] Bump ip from 2.0.0 to 2.0.1 in /samples/uss-profile-sample Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1. - [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1) --- updated-dependencies: - dependency-name: ip dependency-type: indirect ... Signed-off-by: dependabot[bot] --- samples/uss-profile-sample/yarn.lock | 167 +++++++++++++-------------- 1 file changed, 80 insertions(+), 87 deletions(-) diff --git a/samples/uss-profile-sample/yarn.lock b/samples/uss-profile-sample/yarn.lock index fcf9f56563..6e217b55c0 100644 --- a/samples/uss-profile-sample/yarn.lock +++ b/samples/uss-profile-sample/yarn.lock @@ -279,22 +279,22 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@zowe/cli@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.22.0.tgz#63e648337a1d61aad017748acca7468dc3940a24" - integrity sha512-Z+9403u7pPpge+WHAuuMqwSBaWNC+3qw0eL5aIVPgnvGPpQWWN0sL5mOaDo117GN9I1p8ee7tWqwrcll55tP0w== - dependencies: - "@zowe/core-for-zowe-sdk" "7.22.0" - "@zowe/imperative" "5.21.0" - "@zowe/provisioning-for-zowe-sdk" "7.22.0" - "@zowe/zos-console-for-zowe-sdk" "7.22.0" - "@zowe/zos-files-for-zowe-sdk" "7.22.0" - "@zowe/zos-jobs-for-zowe-sdk" "7.22.0" - "@zowe/zos-logs-for-zowe-sdk" "7.22.0" - "@zowe/zos-tso-for-zowe-sdk" "7.22.0" - "@zowe/zos-uss-for-zowe-sdk" "7.22.0" - "@zowe/zos-workflows-for-zowe-sdk" "7.22.0" - "@zowe/zosmf-for-zowe-sdk" "7.22.0" +"@zowe/cli@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.23.3.tgz#4099c86e34437c6c9778a68155ef6556732b1e90" + integrity sha512-MRBlwAXAdimod5b3R4NaPF82thlptPDA8BRdmZDtWUAnE0sYkWepHxQcL5OjY8Gty6HrQj7t8q5ZWaawArcICg== + dependencies: + "@zowe/core-for-zowe-sdk" "7.23.3" + "@zowe/imperative" "5.22.3" + "@zowe/provisioning-for-zowe-sdk" "7.23.3" + "@zowe/zos-console-for-zowe-sdk" "7.23.3" + "@zowe/zos-files-for-zowe-sdk" "7.23.3" + "@zowe/zos-jobs-for-zowe-sdk" "7.23.3" + "@zowe/zos-logs-for-zowe-sdk" "7.23.3" + "@zowe/zos-tso-for-zowe-sdk" "7.23.3" + "@zowe/zos-uss-for-zowe-sdk" "7.23.3" + "@zowe/zos-workflows-for-zowe-sdk" "7.23.3" + "@zowe/zosmf-for-zowe-sdk" "7.23.3" find-process "1.4.7" get-stream "6.0.1" lodash "4.17.21" @@ -303,18 +303,18 @@ optionalDependencies: "@zowe/secrets-for-zowe-sdk" "7.18.6" -"@zowe/core-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.22.0.tgz#ae271ee84e52f48b5508b74affb5f9aa5d4adbdf" - integrity sha512-uLkbxn0KvI6MiSZ8Y0SZRFJhvDarwhlvvW/oiSjIyNHeNtuTb31s5eYLTCdvX585om98wyVEKwYWK3ITzQ6w6g== +"@zowe/core-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.23.3.tgz#ec8e9b1f18b162bfd8f44fdecbe858d1072334c0" + integrity sha512-gcW30wwAzSNk3jk8fQA0jFWE5A96v75Bq1l3Cs6ifzRL4YipUUmUmvb3YmNILhxrnlGrJEqSaNAf87G16Cik/g== dependencies: comment-json "4.1.1" string-width "4.2.3" -"@zowe/imperative@5.21.0": - version "5.21.0" - resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.21.0.tgz#52cd216bf04a15fe60fcc9fa4603dba0f8c59da2" - integrity sha512-yjt3Mmn1ItfZZK42SecH+2U5rSvKl6k4ZqPvFaQIvzfVwhOeXi3Srx6/ulxDhSPN0txPUgeyIxz+PHSPtN5Elw== +"@zowe/imperative@5.22.3": + version "5.22.3" + resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.22.3.tgz#464b2dd167c7f20902f442cb98945cbae2dc30a6" + integrity sha512-nfUHPMczMvmPjQLg2qwmVZcnL7ZaLiiGbeGAbI/jV+qOkqsHbbFt+QJ5TSX3O3bZCZClP8idn99lTbj9v7mLcA== dependencies: "@types/yargs" "13.0.4" chalk "2.4.2" @@ -332,12 +332,12 @@ jest-diff "27.0.6" js-yaml "4.1.0" jsonfile "4.0.0" - jsonschema "1.1.1" + jsonschema "1.4.1" lodash "4.17.21" lodash-deep "2.0.0" log4js "6.4.6" markdown-it "12.3.2" - mustache "2.3.0" + mustache "4.2.0" npm-package-arg "9.1.0" opener "1.5.2" pacote "11.1.4" @@ -345,7 +345,7 @@ progress "2.0.3" read "1.0.7" readline-sync "1.4.10" - semver "7.5.2" + semver "7.5.4" stack-trace "0.0.10" strip-ansi "6.0.1" which "3.0.0" @@ -353,10 +353,10 @@ yamljs "0.3.0" yargs "15.3.1" -"@zowe/provisioning-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.22.0.tgz#01bcd2a182c219115779b3f3aeee65e2f846d349" - integrity sha512-5wX+qXxXL3WlmmS9rnDDZeUL4K4fuUAJ+8H+z8z0qv++ffZSJc36Jkmi/D5tX9FanmB0/kpCgeHqx1rWE/mYtA== +"@zowe/provisioning-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.23.3.tgz#3c01fcf7223640f92cabd4ae4add79f239954179" + integrity sha512-UHW+ryUUSp17FQpazCFVShxlBPUJ8qPR2uonqp8cuB9AZyYA5RdGwTzgJvAznfVYXdvSgk4WS2TPOLaCNIVOvg== dependencies: js-yaml "4.1.0" @@ -365,62 +365,62 @@ resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.6.tgz#6b854b344babb291c26d19d82633099a46e08452" integrity sha512-YyS1NoXddb147mBQpu5/dTfo1gdwGa/xdg85U8KCngA+RHCmNct3n2rbK3tHx9C9H6rlgjeS+Mrux5Q+PHJUgQ== -"@zowe/zos-console-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.22.0.tgz#2088bee1963a9fa602df055a7078f63667a80f44" - integrity sha512-EI9rK76eq5kGXJqGkhobLMdNJstVUSswJ2JlNvGzwOQD/jV/7OJRHSHPllygMGaos8Rh14mzPDooeb9CBr5faA== +"@zowe/zos-console-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.23.3.tgz#388220e82ad07c5c5cf757f019ee4bb3caf9ddef" + integrity sha512-KZrxTbKtRdDdWSOrFGvHKeEsDGrPFt74EVwRtn29xAzdJeeDsGHcLz+oXRQOdGDMn2PKXG8g+jBOT+zONqnBPQ== -"@zowe/zos-files-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.22.0.tgz#a692b09016c0350685cf085dc47cb9591fec11d3" - integrity sha512-jw1j9q77DTQgm5i0YuslN454zC4eS0qb5PnfZ1thCbUugLxI/LRR1CgV59rTfqMGHMjXyfmmqjtCot4NMLUV1A== +"@zowe/zos-files-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.23.3.tgz#052e047edf6da9add9a76d78b9398891351866ec" + integrity sha512-dhuWez++WemAkAdrH0h5woH6vPMNYw6LcHzX5o+p4zLPpo3gjEzalYHkgH+MUP8eUX4M1yetLd6g82yk9hMuJQ== dependencies: get-stream "6.0.1" minimatch "5.0.1" -"@zowe/zos-jobs-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.22.0.tgz#4447071d304bc8c6348c08bdd8f28e84213aa1ac" - integrity sha512-QdKjWgQV7uEvLhHED48TBmQ2EhKn8ZG9OVrZiAa82k0AIsps5U2Wv/W9M1PyWlCEWQP/Zok7PpRWi3Bbv010cQ== +"@zowe/zos-jobs-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.23.3.tgz#7fd3c38787ee5ef4abfa61e520d63a24deb02c0f" + integrity sha512-Ipk0kCKbCiY6Le93aO8+H0koTvSyI2ICllbs9yWC198tdbetO3oH9GJ8GXp5LKPInQQwGk1zCbnYK/YH6ZzwJg== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.22.0" + "@zowe/zos-files-for-zowe-sdk" "7.23.3" -"@zowe/zos-logs-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.22.0.tgz#61500c48b76c2458243508d83137f221393ffb44" - integrity sha512-XA/ZH1LsdqE9vTA6GOlI3t6RsgA7hf+efImVltE9brVlFrrIgXCD46A9CVDl6bmkp/tFQqCdMYHjHFbWiwN4WA== +"@zowe/zos-logs-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.23.3.tgz#22c02af97b1f3ddd2b03b4feb882d366f76e7881" + integrity sha512-e8COZ+3vmeDMLoO+/4umIwv5tmJ2Vd6EJ6Evivx9C2C9WlxVbyIu7YGjY6qf4o7yWxVJ53oVrsCXfsgDXFf7lA== -"@zowe/zos-tso-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.22.0.tgz#38c0ba26bbcc6af0564911883e21bd9ad5c217e4" - integrity sha512-vzhKJUk6E/EHjH8BadCfpL45C40qmJxYlSHAIHitAtFcOkI4F7i13mlgulaxPCiTTV3jBw4g+JoJe8DwG1eiyA== +"@zowe/zos-tso-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.23.3.tgz#f142d420c3ba637d8b586cdd81033ee9b58fde78" + integrity sha512-k23Kh4rK78MO3RBY5Zv/uCWyQL3id8+Rp1Y+oiLDlOxgg5RSYIO44PyUYQiahxaw4Qlv9uGYSxz1WBkh3zHXzg== dependencies: - "@zowe/zosmf-for-zowe-sdk" "7.22.0" + "@zowe/zosmf-for-zowe-sdk" "7.23.3" -"@zowe/zos-uss-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.22.0.tgz#3b6bb8dedae1a6c4f367189cf6b3bdbab0aca822" - integrity sha512-c3yXBdBWW2I1WbkMvgmx/EMNEpxJmCRZ0gygjYd1xM//wWhPaigOVY5XSRTpnXS0UY6KOX9T7ZymlCe6XzAhEQ== +"@zowe/zos-uss-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.23.3.tgz#5e3e746c30365063f33200be6d56fc857504e96b" + integrity sha512-fhMSqgpdOu8mlZgrIgIrR/JKaNWLhxDgLAyRRDk/KGwbQGdsnfSPvzXEB6BonN94oTeIsL5gJ/iw2Sc+Q7kZow== dependencies: ssh2 "1.15.0" -"@zowe/zos-workflows-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.22.0.tgz#05537853832bcf2307a78907459fb43e59ca22ed" - integrity sha512-arM0gVpm0zM84JuIZSWTK+bCqu6gED0ubYJZAdI5ttsjSaiv+E4LM1OUkd05n0HCUGYeNrL30LEsswHUM7cqZA== +"@zowe/zos-workflows-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.23.3.tgz#08d1af8d51eb8d28e2192c9ea027628d6bc7b3b8" + integrity sha512-VoigwgLIPJJixEoA7asoUKIRnf2e1DhWeqtTKRfyktP5LO5Gk+UcuWqHifAE/0aDlauIpSx6oGaXNlKGr4Za1w== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.22.0" + "@zowe/zos-files-for-zowe-sdk" "7.23.3" -"@zowe/zosmf-for-zowe-sdk@7.22.0": - version "7.22.0" - resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.22.0.tgz#cc87f28acf60b600eca5111d35ac8668aaec192a" - integrity sha512-D4nbTDr5uJxJev9+zNwbq/3Z3DuQR6qfmbofzDGYYaU1peFO7+ioFN+uAInFBS1jqj4iHko2KINJfPZFALg3/A== +"@zowe/zosmf-for-zowe-sdk@7.23.3": + version "7.23.3" + resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.23.3.tgz#e7e97fe224fa5b59291116ebf2857dfc9aa17d5e" + integrity sha512-EQzfq25iLEbJOuvD/dr/ox+x3k8oOzg2iTGMvrWJcT3JIeAFrpYRpTIoiRE5xDIsEZ7BohKKupEvEa3+Iilb9w== "@zowe/zowe-explorer-api@file:../../packages/zowe-explorer-api": - version "2.14.0-SNAPSHOT" + version "2.15.0-SNAPSHOT" dependencies: "@types/vscode" "^1.53.2" - "@zowe/cli" "7.22.0" + "@zowe/cli" "7.23.3" "@zowe/secrets-for-zowe-sdk" "7.18.6" handlebars "^4.7.7" semver "^7.5.3" @@ -1270,9 +1270,9 @@ inherits@2, inherits@^2.0.3: integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== ip@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" - integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== + version "2.0.1" + resolved "https://registry.npmjs.org/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105" + integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ== is-extglob@^2.1.1: version "2.1.1" @@ -1360,10 +1360,10 @@ jsonparse@^1.3.1: resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -jsonschema@1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/jsonschema/-/jsonschema-1.1.1.tgz#3cede8e3e411d377872eefbc9fdf26383cbc3ed9" - integrity sha512-kHyDK+K6ehb+0LmJYzsQSd3QkRPDEPoG/59uhNzFTLVb92J9jYPaonLkzJe+Z4angkIhDeurMmvhtmjAVrz9eA== +jsonschema@1.4.1: + version "1.4.1" + resolved "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" + integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== levn@^0.4.1: version "0.4.1" @@ -1592,10 +1592,10 @@ ms@^2.0.0: resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -mustache@2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/mustache/-/mustache-2.3.0.tgz#4028f7778b17708a489930a6e52ac3bca0da41d0" - integrity sha512-IgZ/cCHtDG1ft0vdDV9wrlNz20SvbUu2ECoDF6dhk2ZtedLNy1Kehy4oFlzmHPxcUQmVZuXYS2j+d0NkaEjTXQ== +mustache@4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64" + integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== mute-stream@~0.0.4: version "0.0.8" @@ -1992,14 +1992,7 @@ safe-buffer@~5.2.0: resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -semver@7.5.2: - version "7.5.2" - resolved "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz#5b851e66d1be07c1cdaf37dfc856f543325a2beb" - integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ== - dependencies: - lru-cache "^6.0.0" - -semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3: +semver@7.5.4, semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3: version "7.5.4" resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== From 57e94885b70cbad61af392cbdced7d865881755f Mon Sep 17 00:00:00 2001 From: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> Date: Mon, 26 Feb 2024 16:23:51 -0500 Subject: [PATCH 65/71] prepare the 2.15.0 release Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> --- lerna.json | 2 +- packages/eslint-plugin-zowe-explorer/CHANGELOG.md | 4 ---- packages/zowe-explorer-api/CHANGELOG.md | 2 -- packages/zowe-explorer-ftp-extension/CHANGELOG.md | 4 ---- 4 files changed, 1 insertion(+), 11 deletions(-) diff --git a/lerna.json b/lerna.json index 1323c902ef..7a3ff4c6cd 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.15.0-SNAPSHOT", + "version": "2.15.0", "command": { "version": { "forcePublish": true, diff --git a/packages/eslint-plugin-zowe-explorer/CHANGELOG.md b/packages/eslint-plugin-zowe-explorer/CHANGELOG.md index 93373157a7..dc4b752601 100644 --- a/packages/eslint-plugin-zowe-explorer/CHANGELOG.md +++ b/packages/eslint-plugin-zowe-explorer/CHANGELOG.md @@ -2,10 +2,6 @@ All notable changes to the "eslint-plugin-zowe-explorer" package will be documen ## TBD Release -### New features and enhancements - -### Bug fixes - ## `2.14.1` ## `2.14.0` diff --git a/packages/zowe-explorer-api/CHANGELOG.md b/packages/zowe-explorer-api/CHANGELOG.md index 717bb5221e..d8d90387d1 100644 --- a/packages/zowe-explorer-api/CHANGELOG.md +++ b/packages/zowe-explorer-api/CHANGELOG.md @@ -4,8 +4,6 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t ## TBD Release -### New features and enhancements - ### Bug fixes - Fix login and logout operations when APIML dynamic tokens are enabled. [#2692](https://github.com/zowe/vscode-extension-for-zowe/pull/2692) diff --git a/packages/zowe-explorer-ftp-extension/CHANGELOG.md b/packages/zowe-explorer-ftp-extension/CHANGELOG.md index 4d3beef0b4..30f9db02cc 100644 --- a/packages/zowe-explorer-ftp-extension/CHANGELOG.md +++ b/packages/zowe-explorer-ftp-extension/CHANGELOG.md @@ -2,10 +2,6 @@ All notable changes to the "zowe-explorer-ftp-extension" extension will be docum ## TBD Release -### New features and enhancements - -### Bug fixes - ## `2.14.1` ### Bug fixes From 7735e7947bdc83562cfde69d100c917385563e51 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Tue, 27 Feb 2024 13:38:25 +0530 Subject: [PATCH 66/71] update code Signed-off-by: Santhoshi Boyina --- packages/zowe-explorer/src/job/ZoweJobNode.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/zowe-explorer/src/job/ZoweJobNode.ts b/packages/zowe-explorer/src/job/ZoweJobNode.ts index 80c1b41a5f..22028a6e54 100644 --- a/packages/zowe-explorer/src/job/ZoweJobNode.ts +++ b/packages/zowe-explorer/src/job/ZoweJobNode.ts @@ -53,7 +53,10 @@ export class ZoweJobNode extends ZoweTreeNode implements IZoweJobTreeNode { for (let i = 0; i < labelOpts.length; i++) { const opt = labelOpts[i]; const [key, val] = opt.split(":"); - finalLabel += `${key}: ${val}`; + finalLabel += `${key}`; + if (val !== undefined) { + finalLabel += `: ${val}`; + } if (i != labelOpts.length - 1) { finalLabel += " | "; } From f39c43698184f980fa924a2e076a031fbce09775 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Tue, 27 Feb 2024 14:20:24 +0530 Subject: [PATCH 67/71] add unit tests Signed-off-by: Santhoshi Boyina --- .../__unit__/job/ZosJobsProvider.unit.test.ts | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/packages/zowe-explorer/__tests__/__unit__/job/ZosJobsProvider.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/job/ZosJobsProvider.unit.test.ts index b3734c38f6..e52def29e2 100644 --- a/packages/zowe-explorer/__tests__/__unit__/job/ZosJobsProvider.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/job/ZosJobsProvider.unit.test.ts @@ -397,6 +397,34 @@ describe("ZosJobsProvider unit tests - Function initializeFavChildNodeForProfile expect(favChildNodeForProfile).toEqual(node); }); + it("To check job label under favorited is correct", async () => { + await createGlobalMocks(); + const blockMocks = createBlockMocks(); + const testTree = new ZosJobsProvider(); + + const favProfileNode = new ZoweJobNode({ + label: "testProfile", + collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, + parentNode: blockMocks.jobFavoritesNode, + }); + favProfileNode.contextValue = globals.FAV_PROFILE_CONTEXT; + const node = new ZoweJobNode({ + label: "testJob(JOB123)", + collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, + parentNode: favProfileNode, + job: new MockJobDetail("testJob(JOB123)"), + }); + node.contextValue = globals.JOBS_JOB_CONTEXT + globals.FAV_SUFFIX; + node.command = { command: "zowe.zosJobsSelectjob", title: "", arguments: [node] }; + const targetIcon = getIconByNode(node); + if (targetIcon) { + node.iconPath = targetIcon.path; + } + + const favChildNodeForProfile = await testTree.initializeFavChildNodeForProfile("testJob(JOB123)", globals.JOBS_JOB_CONTEXT, favProfileNode); + + expect(favChildNodeForProfile.label).toEqual("testJob(JOB123)"); + }); }); describe("ZosJobsProvider unit tests - Function loadProfilesForFavorites", () => { From 273646853aa62e445a2d2507a81d0820bac2b607 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Tue, 27 Feb 2024 14:27:41 +0530 Subject: [PATCH 68/71] update changelog Signed-off-by: Santhoshi Boyina --- packages/zowe-explorer/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index fd56272512..c29608848d 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -13,6 +13,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen - Adjusted order of 'Manage Profile' and 'Edit History' in the jobs tree's context menu to match the other trees. [#2670](https://github.com/zowe/vscode-extension-for-zowe/issues/2670) - Fixed issue where spools with duplicate DD names would overwrite each other causing less spools in job output view [#2315](https://github.com/zowe/vscode-extension-for-zowe/issues/2315) +- To fix Strange behaviour with the Job label in Job Favorites [#2632](https://github.com/zowe/vscode-extension-for-zowe/issues/2632) ## `2.14.1` From ef6267d5322a1993b67f508efcf760d6893a3571 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 15:40:01 +0000 Subject: [PATCH 69/71] Bump es5-ext from 0.10.61 to 0.10.63 Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.61 to 0.10.63. - [Release notes](https://github.com/medikoo/es5-ext/releases) - [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md) - [Commits](https://github.com/medikoo/es5-ext/compare/v0.10.61...v0.10.63) --- updated-dependencies: - dependency-name: es5-ext dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index a71aecf474..4c2b142e84 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4960,13 +4960,14 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: - version "0.10.61" - resolved "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.61.tgz" - integrity sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA== +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.62, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: + version "0.10.63" + resolved "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.63.tgz#9c222a63b6a332ac80b1e373b426af723b895bd6" + integrity sha512-hUCZd2Byj/mNKjfP9jXrdVZ62B8KuA/VoK7X8nUh5qT+AxDmcbvZz041oDVZdbIN1qW6XY9VDNwzkvKnZvK2TQ== dependencies: es6-iterator "^2.0.3" es6-symbol "^3.1.3" + esniff "^2.0.1" next-tick "^1.1.0" es6-iterator@^2.0.1, es6-iterator@^2.0.3: @@ -5212,6 +5213,16 @@ eslint@^8.34.0: strip-json-comments "^3.1.0" text-table "^0.2.0" +esniff@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308" + integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg== + dependencies: + d "^1.0.1" + es5-ext "^0.10.62" + event-emitter "^0.3.5" + type "^2.7.2" + espree@^7.3.0, espree@^7.3.1: version "7.3.1" resolved "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz" @@ -11243,6 +11254,11 @@ type@^2.5.0: resolved "https://registry.npmjs.org/type/-/type-2.6.0.tgz" integrity sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ== +type@^2.7.2: + version "2.7.2" + resolved "https://registry.npmjs.org/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== + typed-rest-client@^1.8.4: version "1.8.6" resolved "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.6.tgz" From 71d2b96e4cd9a72ef2a2ca995391cac059801c66 Mon Sep 17 00:00:00 2001 From: likhithanimma1 <142219673+likhithanimma1@users.noreply.github.com> Date: Wed, 28 Feb 2024 23:18:53 +0530 Subject: [PATCH 70/71] Added port check Signed-off-by: likhithanimma1 <142219673+likhithanimma1@users.noreply.github.com> --- packages/zowe-explorer-api/src/profiles/ProfilesCache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zowe-explorer-api/src/profiles/ProfilesCache.ts b/packages/zowe-explorer-api/src/profiles/ProfilesCache.ts index 3e357861c0..1410dc6b48 100644 --- a/packages/zowe-explorer-api/src/profiles/ProfilesCache.ts +++ b/packages/zowe-explorer-api/src/profiles/ProfilesCache.ts @@ -542,7 +542,7 @@ export class ProfilesCache { return ((baseProfile?.profile?.host || baseProfile?.profile?.port) && profile?.profile?.host && profile?.profile?.port && - (baseProfile?.profile.host !== profile?.profile.host || (profile?.profile.user && profile?.profile.password)) && + (baseProfile?.profile.host !== profile?.profile.host || baseProfile?.profile.port !== profile?.profile.port ||(profile?.profile.user && profile?.profile.password)) && profile?.profile.tokenType?.startsWith(zowe.imperative.SessConstants.TOKEN_TYPE_APIML)) as boolean; } From 28ae5ca47e81ec3de1aa6b780820d1374dedadb0 Mon Sep 17 00:00:00 2001 From: likhithanimma1 <142219673+likhithanimma1@users.noreply.github.com> Date: Wed, 28 Feb 2024 23:25:37 +0530 Subject: [PATCH 71/71] Fixed Linting Signed-off-by: likhithanimma1 <142219673+likhithanimma1@users.noreply.github.com> --- packages/zowe-explorer-api/src/profiles/ProfilesCache.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/zowe-explorer-api/src/profiles/ProfilesCache.ts b/packages/zowe-explorer-api/src/profiles/ProfilesCache.ts index 1410dc6b48..511819769f 100644 --- a/packages/zowe-explorer-api/src/profiles/ProfilesCache.ts +++ b/packages/zowe-explorer-api/src/profiles/ProfilesCache.ts @@ -542,7 +542,9 @@ export class ProfilesCache { return ((baseProfile?.profile?.host || baseProfile?.profile?.port) && profile?.profile?.host && profile?.profile?.port && - (baseProfile?.profile.host !== profile?.profile.host || baseProfile?.profile.port !== profile?.profile.port ||(profile?.profile.user && profile?.profile.password)) && + (baseProfile?.profile.host !== profile?.profile.host || + baseProfile?.profile.port !== profile?.profile.port || + (profile?.profile.user && profile?.profile.password)) && profile?.profile.tokenType?.startsWith(zowe.imperative.SessConstants.TOKEN_TYPE_APIML)) as boolean; }