From 01423e1d9c8de8ea85fc15212d6ce2a07694a013 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Mon, 22 Apr 2024 22:43:07 +0530 Subject: [PATCH 01/32] Switch Basic auth. to Token auth. and viceversa Signed-off-by: Santhoshi Boyina --- .../i18n/sample/src/uss/actions.i18n.json | 1 + .../src/utils/ProfileManagement.i18n.json | 2 ++ packages/zowe-explorer/src/Profiles.ts | 18 ++++++++++++++++++ .../src/utils/ProfileManagement.ts | 13 +++++++++++++ 4 files changed, 34 insertions(+) diff --git a/packages/zowe-explorer/i18n/sample/src/uss/actions.i18n.json b/packages/zowe-explorer/i18n/sample/src/uss/actions.i18n.json index 81a6ecf0df..96bfd5dda4 100644 --- a/packages/zowe-explorer/i18n/sample/src/uss/actions.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/uss/actions.i18n.json @@ -6,6 +6,7 @@ "createUSSNode.error.create": "Unable to create node:", "uploadFile.response.upload.title": "Uploading file to USS tree", "uploadFile.uploadCancelled": "Upload action was cancelled.", + "uploadFile.operationCancelled": "Operation Cancelled", "uploadFile.putContents": "Uploading USS file", "copyPath.infoMessage": "Copy Path is not yet supported in Theia.", "saveUSSFile.log.debug.saveRequest": "save requested for USS file ", diff --git a/packages/zowe-explorer/i18n/sample/src/utils/ProfileManagement.i18n.json b/packages/zowe-explorer/i18n/sample/src/utils/ProfileManagement.i18n.json index 79b2dd6a84..fdda98d478 100644 --- a/packages/zowe-explorer/i18n/sample/src/utils/ProfileManagement.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/utils/ProfileManagement.i18n.json @@ -22,6 +22,8 @@ "editProfileQpItem.editProfile.qpDetail": "Update profile connection information", "hideProfileQpItems.hideProfile.qpLabel": "$(eye-closed) Hide Profile", "hideProfileQpItems.hideProfile.qpDetail": "Hide profile name from tree view", + "switchAuthenticationQpItems.switchAuthentication.qpLabel": "$(eye-closed) Change the Authentication Method", + "switchAuthenticationQpItems.switchAuthentication.qpDetail": "To switch authentication method", "loginQpItem.login.qpLabel": "$(arrow-right) Log in to authentication service", "loginQpItem.login.qpDetail": "Log in to obtain a new token value", "logoutQpItem.logout.qpLabel": "$(arrow-left) Log out of authentication service", diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index 63cb399e3d..fef53a9611 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1237,6 +1237,24 @@ export class Profiles extends ProfilesCache { } } + public async handleSwitchAuthentication(node?: IZoweNodeType, label?: string): Promise { + // think it as basic to token based auth switch + + const profName = "base"; + const profAttrs = this.getProfileFromConfig(profName); + const configApi = (await this.getProfileInfo()).getTeamConfig(); + configApi.set(`${(await profAttrs).profLoc.jsonLoc}.secure`, []); + await configApi.save(); + + const profName2 = "zosmf"; + const profAttrs2 = this.getProfileFromConfig(profName2); + const configApi2 = (await this.getProfileInfo()).getTeamConfig(); + configApi2.set(`${(await profAttrs2).profLoc.jsonLoc}.secure`, []); + await configApi2.save(); + + // await this.ssoLogin(node, label); + } + public clearDSFilterFromTree(node: IZoweNodeType): void { if (!TreeProviders.ds?.mSessionNodes || !TreeProviders.ds?.mSessionNodes.length) { return; diff --git a/packages/zowe-explorer/src/utils/ProfileManagement.ts b/packages/zowe-explorer/src/utils/ProfileManagement.ts index e2c2743831..9214a7f335 100644 --- a/packages/zowe-explorer/src/utils/ProfileManagement.ts +++ b/packages/zowe-explorer/src/utils/ProfileManagement.ts @@ -76,6 +76,7 @@ export class ProfileManagement { edit: "edit-profile", enable: "enable-validation", hide: "hide-profile", + switch: "switch-auth", login: "obtain-token", logout: "invalidate-token", update: "update-credentials", @@ -121,6 +122,12 @@ export class ProfileManagement { description: localize("hideProfileQpItems.hideProfile.qpDetail", "Hide profile name from tree view"), }, }; + public static switchAuthenticationQpItems: Record = { + [this.AuthQpLabels.switch]: { + label: localize("switchAuthenticationQpItems.switchAuthentication.qpLabel", "$(eye-closed) Change the Authentication Method"), + description: localize("switchAuthenticationQpItems.switchAuthentication.qpDetail", "To switch authentication method"), + }, + }; public static tokenAuthLoginQpItem: Record = { [this.AuthQpLabels.login]: { label: localize("loginQpItem.login.qpLabel", "$(arrow-right) Log in to authentication service"), @@ -222,6 +229,11 @@ export class ProfileManagement { await this.handleHideProfiles(node); break; } + case this.switchAuthenticationQpItems[this.AuthQpLabels.switch]: { + await Profiles.getInstance().handleSwitchAuthentication(node, profile.name); + await Profiles.getInstance().ssoLogin(node, profile.name); + break; + } case this.deleteProfileQpItem[this.AuthQpLabels.delete]: { await this.handleDeleteProfiles(node); break; @@ -279,6 +291,7 @@ export class ProfileManagement { private static addFinalQpOptions(node: IZoweTreeNode, quickPickOptions: vscode.QuickPickItem[]): vscode.QuickPickItem[] { quickPickOptions.push(this.editProfileQpItems[this.AuthQpLabels.edit]); quickPickOptions.push(this.hideProfileQpItems[this.AuthQpLabels.hide]); + quickPickOptions.push(this.switchAuthenticationQpItems[this.AuthQpLabels.switch]); if (node.contextValue.includes(globals.NO_VALIDATE_SUFFIX)) { quickPickOptions.push(this.enableProfileValildationQpItem[this.AuthQpLabels.enable]); } else { From dfb1cc8b5d12e4d6e549bb425031b7b9f23de6eb Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Tue, 30 Apr 2024 19:34:49 +0530 Subject: [PATCH 02/32] Updated code Signed-off-by: Santhoshi Boyina --- .../i18n/sample/src/Profiles.i18n.json | 4 + .../src/utils/ProfileManagement.i18n.json | 2 +- packages/zowe-explorer/src/Profiles.ts | 86 ++++++++++++++++--- .../src/utils/ProfileManagement.ts | 9 +- 4 files changed, 85 insertions(+), 16 deletions(-) diff --git a/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json b/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json index 57a7772513..5cd8202e56 100644 --- a/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json @@ -31,6 +31,10 @@ "ssoLogin.tokenType.error": "Error getting supported tokenType value for profile {0}", "ssoLogin.successful": "Login to authentication service was successful.", "ssoLogin.error": "Unable to log in with {0}. {1}", + "handleSwitchAuthentication.tokenType.error": "Cannot switch to Token Authentication for profile {0}", + "handleSwitchAuthentication.switchBaseToTokenAuth": "Switching from Basic to Token Authentication for profile {0}", + "handleSwitchAuthentication.switchTokenToBaseAuth": "Switching from Token to Basic Authentication for profile {0}", + "handleSwitchAuthentication.noAuth": "Unable to Switch Authentication for profile {0}", "ssoLogout.successful": "Logout from authentication service was successful for {0}.", "ssoLogout.error": "Unable to log out with {0}. {1}", "getConfigLocationPrompt.placeholder.create": "Select the location where the config file will be initialized", diff --git a/packages/zowe-explorer/i18n/sample/src/utils/ProfileManagement.i18n.json b/packages/zowe-explorer/i18n/sample/src/utils/ProfileManagement.i18n.json index fdda98d478..2b7023b893 100644 --- a/packages/zowe-explorer/i18n/sample/src/utils/ProfileManagement.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/utils/ProfileManagement.i18n.json @@ -23,7 +23,7 @@ "hideProfileQpItems.hideProfile.qpLabel": "$(eye-closed) Hide Profile", "hideProfileQpItems.hideProfile.qpDetail": "Hide profile name from tree view", "switchAuthenticationQpItems.switchAuthentication.qpLabel": "$(eye-closed) Change the Authentication Method", - "switchAuthenticationQpItems.switchAuthentication.qpDetail": "To switch authentication method", + "switchAuthenticationQpItems.switchAuthentication.qpDetail": "To change the authentication method", "loginQpItem.login.qpLabel": "$(arrow-right) Log in to authentication service", "loginQpItem.login.qpDetail": "Log in to obtain a new token value", "logoutQpItem.logout.qpLabel": "$(arrow-left) Log out of authentication service", diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index fef53a9611..bc746e7c1a 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1237,22 +1237,86 @@ export class Profiles extends ProfilesCache { } } - public async handleSwitchAuthentication(node?: IZoweNodeType, label?: string): Promise { - // think it as basic to token based auth switch - - const profName = "base"; - const profAttrs = this.getProfileFromConfig(profName); + public async basicAuthClearSecureArray(profileName?: string): Promise { + const profAttrs = this.getProfileFromConfig(profileName); const configApi = (await this.getProfileInfo()).getTeamConfig(); configApi.set(`${(await profAttrs).profLoc.jsonLoc}.secure`, []); + configApi.delete(`${(await profAttrs).profLoc.jsonLoc}.properties.user`); + configApi.delete(`${(await profAttrs).profLoc.jsonLoc}.properties.password`); await configApi.save(); + } - const profName2 = "zosmf"; - const profAttrs2 = this.getProfileFromConfig(profName2); - const configApi2 = (await this.getProfileInfo()).getTeamConfig(); - configApi2.set(`${(await profAttrs2).profLoc.jsonLoc}.secure`, []); - await configApi2.save(); + public async tokenAuthClearSecureArray(profileName?: string): Promise { + const profAttrs = this.getProfileFromConfig(profileName); + const configApi = (await this.getProfileInfo()).getTeamConfig(); + configApi.set(`${(await profAttrs).profLoc.jsonLoc}.secure`, []); + await configApi.save(); + } - // await this.ssoLogin(node, label); + public async handleSwitchAuthentication(node?: IZoweNodeType): Promise { + let loginTokenType: string; + let serviceProfile: zowe.imperative.IProfileLoaded; + if (node) { + serviceProfile = node.getProfile(); + } else { + serviceProfile = this.loadNamedProfile(node.label.toString().trim()); + } + const zeInstance = ZoweExplorerApiRegister.getInstance(); + try { + loginTokenType = await zeInstance.getCommonApi(serviceProfile).getTokenTypeName(); + } catch (error) { + ZoweLogger.warn(error); + Gui.showMessage( + localize("handleSwitchAuthentication.tokenType.error", "Cannot switch to Token Authentication for profile {0}", serviceProfile.name) + ); + return; + } + switch (true) { + case ProfilesUtils.isProfileUsingBasicAuth(serviceProfile): { + Gui.infoMessage( + localize( + "handleSwitchAuthentication.switchBaseToTokenAuth", + "Switching from Basic to Token Authentication for profile {0}", + serviceProfile.name + ) + ); + await this.basicAuthClearSecureArray(serviceProfile.name); + if (loginTokenType.startsWith(zowe.imperative.SessConstants.TOKEN_TYPE_APIML)) { + await this.basicAuthClearSecureArray("base"); + } + const updBaseProfile: zowe.imperative.IProfile = { + user: undefined, + password: undefined, + }; + node.setProfileToChoice({ + ...node.getProfile(), + profile: { ...node.getProfile().profile, ...updBaseProfile }, + }); + await this.ssoLogin(node, serviceProfile.name); + break; + } + case await ProfilesUtils.isUsingTokenAuth(serviceProfile.name): { + Gui.infoMessage( + localize( + "handleSwitchAuthentication.switchTokenToBaseAuth", + "Switching from Token to Basic Authentication for profile {0}", + serviceProfile.name + ) + ); + await this.ssoLogout(node); + await this.tokenAuthClearSecureArray(serviceProfile.name); + if (loginTokenType.startsWith(zowe.imperative.SessConstants.TOKEN_TYPE_APIML)) { + await this.tokenAuthClearSecureArray("base"); + } + await ProfilesUtils.promptCredentials(node); + break; + } + default: { + Gui.infoMessage( + localize("handleSwitchAuthentication.noAuth", "Unable to Switch Authentication for profile {0}", serviceProfile.name) + ); + } + } } public clearDSFilterFromTree(node: IZoweNodeType): void { diff --git a/packages/zowe-explorer/src/utils/ProfileManagement.ts b/packages/zowe-explorer/src/utils/ProfileManagement.ts index 9214a7f335..1dc0ba2a7f 100644 --- a/packages/zowe-explorer/src/utils/ProfileManagement.ts +++ b/packages/zowe-explorer/src/utils/ProfileManagement.ts @@ -125,7 +125,7 @@ export class ProfileManagement { public static switchAuthenticationQpItems: Record = { [this.AuthQpLabels.switch]: { label: localize("switchAuthenticationQpItems.switchAuthentication.qpLabel", "$(eye-closed) Change the Authentication Method"), - description: localize("switchAuthenticationQpItems.switchAuthentication.qpDetail", "To switch authentication method"), + description: localize("switchAuthenticationQpItems.switchAuthentication.qpDetail", "To change the authentication method"), }, }; public static tokenAuthLoginQpItem: Record = { @@ -230,8 +230,7 @@ export class ProfileManagement { break; } case this.switchAuthenticationQpItems[this.AuthQpLabels.switch]: { - await Profiles.getInstance().handleSwitchAuthentication(node, profile.name); - await Profiles.getInstance().ssoLogin(node, profile.name); + await Profiles.getInstance().handleSwitchAuthentication(node); break; } case this.deleteProfileQpItem[this.AuthQpLabels.delete]: { @@ -267,6 +266,7 @@ export class ProfileManagement { private static basicAuthQp(node: IZoweTreeNode): vscode.QuickPickItem[] { const quickPickOptions: vscode.QuickPickItem[] = Object.values(this.basicAuthUpdateQpItems); + quickPickOptions.push(this.switchAuthenticationQpItems[this.AuthQpLabels.switch]); return this.addFinalQpOptions(node, quickPickOptions); } private static tokenAuthQp(node: IZoweTreeNode): vscode.QuickPickItem[] { @@ -275,6 +275,7 @@ export class ProfileManagement { if (profile.profile.tokenType) { quickPickOptions.push(this.tokenAuthLogoutQpItem[this.AuthQpLabels.logout]); } + quickPickOptions.push(this.switchAuthenticationQpItems[this.AuthQpLabels.switch]); return this.addFinalQpOptions(node, quickPickOptions); } private static chooseAuthQp(node: IZoweTreeNode): vscode.QuickPickItem[] { @@ -283,6 +284,7 @@ export class ProfileManagement { try { ZoweExplorerApiRegister.getInstance().getCommonApi(profile).getTokenTypeName(); quickPickOptions.push(this.tokenAuthLoginQpItem[this.AuthQpLabels.login]); + // quickPickOptions.push(this.switchAuthenticationQpItems[this.AuthQpLabels.switch]); } catch { ZoweLogger.debug(`Profile ${profile.name} doesn't support token authentication, will not provide option.`); } @@ -291,7 +293,6 @@ export class ProfileManagement { private static addFinalQpOptions(node: IZoweTreeNode, quickPickOptions: vscode.QuickPickItem[]): vscode.QuickPickItem[] { quickPickOptions.push(this.editProfileQpItems[this.AuthQpLabels.edit]); quickPickOptions.push(this.hideProfileQpItems[this.AuthQpLabels.hide]); - quickPickOptions.push(this.switchAuthenticationQpItems[this.AuthQpLabels.switch]); if (node.contextValue.includes(globals.NO_VALIDATE_SUFFIX)) { quickPickOptions.push(this.enableProfileValildationQpItem[this.AuthQpLabels.enable]); } else { From 59e2416cf0f8e600e8f2a8cb793f8813546fdd65 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Fri, 10 May 2024 00:27:58 +0530 Subject: [PATCH 03/32] Add Unit test coverage Signed-off-by: Santhoshi Boyina --- .../__unit__/Profiles.extended.unit.test.ts | 132 ++++++++++++++++++ .../utils/ProfileManagement.unit.test.ts | 36 ++++- .../src/utils/ProfileManagement.i18n.json | 2 +- .../src/utils/ProfileManagement.ts | 3 +- 4 files changed, 169 insertions(+), 4 deletions(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts index 6e43d7cca8..6b49bdd287 100644 --- a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts @@ -1653,6 +1653,138 @@ describe("Profiles Unit Tests - function ssoLogin", () => { }); }); +describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { + let globalMocks, testNode, modifiedTestNode; + beforeEach(async () => { + globalMocks = await createGlobalMocks(); + testNode = new (ZoweTreeNode as any)( + "test", + vscode.TreeItemCollapsibleState.None, + undefined, + globalMocks.testSession, + globalMocks.testProfile + ); + modifiedTestNode = new (ZoweTreeNode as any)( + "test", + vscode.TreeItemCollapsibleState.None, + undefined, + globalMocks.testSession, + globalMocks.testProfile + ); + }); + it("To switch from Basic to Token Based Authentication", async () => { + jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); + jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ + getTeamConfig: () => ({ + properties: jest.fn(), + set: jest.fn(), + delete: jest.fn(), + save: jest.fn(), + }), + getAllProfiles: () => [ + { + profName: "sestest", + profLoc: { + osLoc: ["test"], + }, + }, + ], + } as any); + testNode.profile.profile = { + type: "zosmf", + host: "test", + port: 1443, + name: "base", + rejectUnauthorized: false, + user: "testUser", + password: "***", + tokenType: undefined, + tokenValue: undefined, + secure: ["user", "password"], + }; + modifiedTestNode.profile.profile = { + type: "zosmf", + host: "test", + port: 1443, + name: "base", + rejectUnauthorized: false, + user: undefined, + password: undefined, + tokenType: "testToken", + tokenValue: "12345", + secure: ["tokenType"], + }; + jest.spyOn(Gui, "infoMessage").mockImplementation(); + jest.spyOn(Profiles.getInstance(), "ssoLogin").mockImplementationOnce((node) => modifiedTestNode); + await Profiles.getInstance().handleSwitchAuthentication(testNode); + expect(testNode.profile.profile.tokenType).toBe("testToken"); + expect(testNode.profile.profile.tokenValue).toBe("12345"); + expect(testNode.profile.profile.secure.length).toBe(1); + expect(testNode.profile.profile.secure).toEqual(["tokenType"]); + expect(testNode.profile.profile.user).toBeUndefined(); + expect(testNode.profile.profile.password).toBeUndefined(); + }); + + it("To switch from Token based to Basic Authentication", async () => { + jest.spyOn(utils.ProfilesUtils, "isUsingTokenAuth").mockResolvedValueOnce(true); + jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ + getTeamConfig: () => ({ + properties: jest.fn(), + set: jest.fn(), + delete: jest.fn(), + save: jest.fn(), + }), + getAllProfiles: () => [ + { + profName: "sestest", + profLoc: { + osLoc: ["test"], + }, + }, + ], + } as any); + testNode.profile.profile = { + type: "zosmf", + host: "test", + port: 1443, + name: "base", + rejectUnauthorized: false, + user: undefined, + password: undefined, + tokenType: "testTokenType", + tokenValue: "12345", + secure: ["tokenType"], + }; + modifiedTestNode.profile.profile = { + type: "zosmf", + host: "test", + port: 1443, + name: "base", + rejectUnauthorized: false, + user: "testUser", + password: "6789", + tokenType: undefined, + tokenValue: undefined, + secure: ["user", "password"], + }; + jest.spyOn(Gui, "infoMessage").mockImplementation(); + jest.spyOn(utils.ProfilesUtils, "promptCredentials").mockImplementationOnce((node) => modifiedTestNode); + await Profiles.getInstance().handleSwitchAuthentication(testNode); + expect(testNode.profile.profile.user).toBe("testUser"); + expect(testNode.profile.profile.password).toBe("6789"); + expect(testNode.profile.profile.secure.length).toBe(2); + expect(testNode.profile.profile.secure).toEqual(["user", "password"]); + expect(testNode.profile.profile.tokenType).toBeUndefined(); + expect(testNode.profile.profile.tokenValue).toBeUndefined(); + }); + + it("when authentication method is unknown", () => { + jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(false); + jest.spyOn(utils.ProfilesUtils, "isUsingTokenAuth").mockResolvedValueOnce(false); + jest.spyOn(Gui, "infoMessage").mockImplementation(); + }); +}); + describe("Profiles Unit Tests - function ssoLogout", () => { let testNode; let globalMocks; diff --git a/packages/zowe-explorer/__tests__/__unit__/utils/ProfileManagement.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/utils/ProfileManagement.unit.test.ts index 3421d474a7..213ebf700e 100644 --- a/packages/zowe-explorer/__tests__/__unit__/utils/ProfileManagement.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/utils/ProfileManagement.unit.test.ts @@ -50,6 +50,7 @@ describe("ProfileManagement unit tests", () => { mockAddBasicChosen: ProfileManagement.basicAuthAddQpItems[ProfileManagement.AuthQpLabels.add], mockLoginChosen: ProfileManagement.tokenAuthLoginQpItem[ProfileManagement.AuthQpLabels.login], mockLogoutChosen: ProfileManagement.tokenAuthLogoutQpItem[ProfileManagement.AuthQpLabels.logout], + mockSwitchAuthChosen: ProfileManagement.switchAuthenticationQpItems[ProfileManagement.AuthQpLabels.switch], mockEditProfChosen: ProfileManagement.editProfileQpItems[ProfileManagement.AuthQpLabels.edit], mockDeleteProfChosen: ProfileManagement.deleteProfileQpItem[ProfileManagement.AuthQpLabels.delete], mockHideProfChosen: ProfileManagement.hideProfileQpItems[ProfileManagement.AuthQpLabels.hide], @@ -60,6 +61,7 @@ describe("ProfileManagement unit tests", () => { mockTreeProviders: sharedMock.createTreeProviders(), debugLogSpy: null as any, promptSpy: null as any, + switchAuthSpy: null as any, editSpy: null as any, loginSpy: null as any, logoutSpy: null as any, @@ -96,6 +98,8 @@ describe("ProfileManagement unit tests", () => { }); Object.defineProperty(newMocks.mockProfileInstance, "editSession", { value: jest.fn(), configurable: true }); newMocks.editSpy = jest.spyOn(newMocks.mockProfileInstance, "editSession"); + Object.defineProperty(newMocks.mockProfileInstance, "handleSwitchAuthentication", { value: jest.fn(), configurable: true }); + newMocks.switchAuthSpy = jest.spyOn(newMocks.mockProfileInstance, "handleSwitchAuthentication"); Object.defineProperty(newMocks.mockProfileInstance, "ssoLogin", { value: jest.fn(), configurable: true }); newMocks.loginSpy = jest.spyOn(newMocks.mockProfileInstance, "ssoLogin"); Object.defineProperty(newMocks.mockProfileInstance, "ssoLogout", { value: jest.fn(), configurable: true }); @@ -103,11 +107,18 @@ describe("ProfileManagement unit tests", () => { Object.defineProperty(vscode.commands, "executeCommand", { value: jest.fn(), configurable: true }); newMocks.commandSpy = jest.spyOn(vscode.commands, "executeCommand"); jest.spyOn(TreeProviders, "providers", "get").mockReturnValue(newMocks.mockTreeProviders); - return newMocks; } describe("unit tests around basic auth selections", () => { + beforeEach(() => { + jest.resetModules(); + }); + + afterAll(() => { + jest.restoreAllMocks(); + }); + function createBlockMocks(globalMocks): any { globalMocks.logMsg = `Profile ${globalMocks.mockBasicAuthProfile.name} is using basic authentication.`; globalMocks.mockDsSessionNode.getProfile = jest.fn().mockReturnValue(globalMocks.mockBasicAuthProfile); @@ -127,6 +138,13 @@ describe("ProfileManagement unit tests", () => { expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); expect(mocks.promptSpy).toBeCalled(); }); + it("profile using basic authentication should see handleSwitchAuthentication called when Change the Authentication method chosen", async () => { + const mocks = createBlockMocks(createGlobalMocks()); + mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockSwitchAuthChosen); + await ProfileManagement.manageProfile(mocks.mockDsSessionNode); + expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); + expect(mocks.switchAuthSpy).toBeCalled(); + }); it("profile using basic authentication should see editSession called when Edit Profile chosen", async () => { const mocks = createBlockMocks(createGlobalMocks()); mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockEditProfChosen); @@ -168,6 +186,14 @@ describe("ProfileManagement unit tests", () => { }); }); describe("unit tests around token auth selections", () => { + beforeEach(() => { + jest.resetModules(); + }); + + afterAll(() => { + jest.restoreAllMocks(); + }); + function createBlockMocks(globalMocks): any { globalMocks.logMsg = `Profile ${globalMocks.mockTokenAuthProfile.name} is using token authentication.`; globalMocks.mockUnixSessionNode = unixMock.createUSSSessionNode(globalMocks.mockSession, globalMocks.mockBasicAuthProfile) as any; @@ -221,6 +247,14 @@ describe("ProfileManagement unit tests", () => { expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); expect(mocks.commandSpy).toHaveBeenLastCalledWith("zowe.uss.disableValidation", mocks.mockUnixSessionNode); }); + it("profile using token authentication should see handleSwitchAuthentication called when Change the Authentication method chosen", async () => { + const mocks = createBlockMocks(createGlobalMocks()); + jest.spyOn(profUtils.ProfilesUtils, "isUsingTokenAuth").mockResolvedValue(true); + mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockSwitchAuthChosen); + await ProfileManagement.manageProfile(mocks.mockDsSessionNode); + expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); + expect(mocks.switchAuthSpy).toBeCalled(); + }); }); describe("unit tests around no auth declared selections", () => { function createBlockMocks(globalMocks): any { diff --git a/packages/zowe-explorer/i18n/sample/src/utils/ProfileManagement.i18n.json b/packages/zowe-explorer/i18n/sample/src/utils/ProfileManagement.i18n.json index 2b7023b893..623303ff43 100644 --- a/packages/zowe-explorer/i18n/sample/src/utils/ProfileManagement.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/utils/ProfileManagement.i18n.json @@ -22,7 +22,7 @@ "editProfileQpItem.editProfile.qpDetail": "Update profile connection information", "hideProfileQpItems.hideProfile.qpLabel": "$(eye-closed) Hide Profile", "hideProfileQpItems.hideProfile.qpDetail": "Hide profile name from tree view", - "switchAuthenticationQpItems.switchAuthentication.qpLabel": "$(eye-closed) Change the Authentication Method", + "switchAuthenticationQpItems.switchAuthentication.qpLabel": "$(key) Change the Authentication Method", "switchAuthenticationQpItems.switchAuthentication.qpDetail": "To change the authentication method", "loginQpItem.login.qpLabel": "$(arrow-right) Log in to authentication service", "loginQpItem.login.qpDetail": "Log in to obtain a new token value", diff --git a/packages/zowe-explorer/src/utils/ProfileManagement.ts b/packages/zowe-explorer/src/utils/ProfileManagement.ts index 1dc0ba2a7f..29a266a5ec 100644 --- a/packages/zowe-explorer/src/utils/ProfileManagement.ts +++ b/packages/zowe-explorer/src/utils/ProfileManagement.ts @@ -124,7 +124,7 @@ export class ProfileManagement { }; public static switchAuthenticationQpItems: Record = { [this.AuthQpLabels.switch]: { - label: localize("switchAuthenticationQpItems.switchAuthentication.qpLabel", "$(eye-closed) Change the Authentication Method"), + label: localize("switchAuthenticationQpItems.switchAuthentication.qpLabel", "$(key) Change the Authentication Method"), description: localize("switchAuthenticationQpItems.switchAuthentication.qpDetail", "To change the authentication method"), }, }; @@ -284,7 +284,6 @@ export class ProfileManagement { try { ZoweExplorerApiRegister.getInstance().getCommonApi(profile).getTokenTypeName(); quickPickOptions.push(this.tokenAuthLoginQpItem[this.AuthQpLabels.login]); - // quickPickOptions.push(this.switchAuthenticationQpItems[this.AuthQpLabels.switch]); } catch { ZoweLogger.debug(`Profile ${profile.name} doesn't support token authentication, will not provide option.`); } From 7c66fcbe385a9ba2beb3b227c65ff2c8976cbe6b Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Mon, 13 May 2024 19:59:19 +0530 Subject: [PATCH 04/32] handled tokenType and tokenValue Signed-off-by: Santhoshi Boyina --- .../__tests__/__unit__/Profiles.extended.unit.test.ts | 11 +++++++++++ packages/zowe-explorer/src/Profiles.ts | 2 ++ 2 files changed, 13 insertions(+) diff --git a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts index a4f609b9e0..f14ea98edf 100644 --- a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts @@ -1654,6 +1654,11 @@ describe("Profiles Unit Tests - function ssoLogin", () => { }); describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { + afterEach(() => { + jest.resetAllMocks(); + jest.clearAllMocks(); + }); + let globalMocks, testNode, modifiedTestNode; beforeEach(async () => { globalMocks = await createGlobalMocks(); @@ -1715,6 +1720,9 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { secure: ["tokenType"], }; jest.spyOn(Gui, "infoMessage").mockImplementation(); + jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockResolvedValue({ + getTokenType: () => zowe.imperative.SessConstants.TOKEN_TYPE_APIML, + } as never); jest.spyOn(Profiles.getInstance(), "ssoLogin").mockImplementationOnce((node) => modifiedTestNode); await Profiles.getInstance().handleSwitchAuthentication(testNode); expect(testNode.profile.profile.tokenType).toBe("testToken"); @@ -1768,6 +1776,9 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { secure: ["user", "password"], }; jest.spyOn(Gui, "infoMessage").mockImplementation(); + jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockResolvedValue({ + getTokenType: () => zowe.imperative.SessConstants.TOKEN_TYPE_APIML, + } as never); jest.spyOn(utils.ProfilesUtils, "promptCredentials").mockImplementationOnce((node) => modifiedTestNode); await Profiles.getInstance().handleSwitchAuthentication(testNode); expect(testNode.profile.profile.user).toBe("testUser"); diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index bc746e7c1a..19d826b588 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1250,6 +1250,8 @@ export class Profiles extends ProfilesCache { const profAttrs = this.getProfileFromConfig(profileName); const configApi = (await this.getProfileInfo()).getTeamConfig(); configApi.set(`${(await profAttrs).profLoc.jsonLoc}.secure`, []); + configApi.delete(`${(await profAttrs).profLoc.jsonLoc}.properties.tokenType`); + configApi.delete(`${(await profAttrs).profLoc.jsonLoc}.properties.tokenValue`); await configApi.save(); } From 55f696bdfe32bf1caf94f52fd09475458eb635e1 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Thu, 16 May 2024 20:23:12 +0530 Subject: [PATCH 05/32] address circular login issue Signed-off-by: Santhoshi Boyina --- .../__unit__/Profiles.extended.unit.test.ts | 19 ++++++++++--------- packages/zowe-explorer/src/Profiles.ts | 6 ++++++ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts index f14ea98edf..69ba469a6f 100644 --- a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts @@ -1654,12 +1654,10 @@ describe("Profiles Unit Tests - function ssoLogin", () => { }); describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { - afterEach(() => { - jest.resetAllMocks(); - jest.clearAllMocks(); - }); + let testNode; + let globalMocks; + let modifiedTestNode; - let globalMocks, testNode, modifiedTestNode; beforeEach(async () => { globalMocks = await createGlobalMocks(); testNode = new (ZoweTreeNode as any)( @@ -1669,6 +1667,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { globalMocks.testSession, globalMocks.testProfile ); + modifiedTestNode = new (ZoweTreeNode as any)( "test", vscode.TreeItemCollapsibleState.None, @@ -1677,6 +1676,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { globalMocks.testProfile ); }); + it("To switch from Basic to Token Based Authentication", async () => { jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ @@ -1720,9 +1720,10 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { secure: ["tokenType"], }; jest.spyOn(Gui, "infoMessage").mockImplementation(); - jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockResolvedValue({ - getTokenType: () => zowe.imperative.SessConstants.TOKEN_TYPE_APIML, + jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ + getTokenTypeName: () => "apimlAuthenticationToken", } as never); + jest.spyOn(Profiles.getInstance(), "ssoLogin").mockImplementationOnce((node) => modifiedTestNode); await Profiles.getInstance().handleSwitchAuthentication(testNode); expect(testNode.profile.profile.tokenType).toBe("testToken"); @@ -1776,8 +1777,8 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { secure: ["user", "password"], }; jest.spyOn(Gui, "infoMessage").mockImplementation(); - jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockResolvedValue({ - getTokenType: () => zowe.imperative.SessConstants.TOKEN_TYPE_APIML, + jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ + getTokenTypeName: () => "apimlAuthenticationToken", } as never); jest.spyOn(utils.ProfilesUtils, "promptCredentials").mockImplementationOnce((node) => modifiedTestNode); await Profiles.getInstance().handleSwitchAuthentication(testNode); diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index 19d826b588..5b07527689 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1222,6 +1222,12 @@ export class Profiles extends ProfilesCache { loginOk = await this.loginWithRegularProfile(serviceProfile, node); } else { loginOk = await ZoweVsCodeExtension.loginWithBaseProfile(serviceProfile, loginTokenType, node, zeInstance, this); + if (loginOk) { + const profAttrs = this.getProfileFromConfig("base"); + const configApi = (await this.getProfileInfo()).getTeamConfig(); + configApi.set(`${(await profAttrs).profLoc.jsonLoc}.properties.port`, serviceProfile.profile.port); + await configApi.save(); + } } if (loginOk) { Gui.showMessage(localize("ssoLogin.successful", "Login to authentication service was successful.")); From d94f9753a0722bbb47a36f5f9d26f642ce325004 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Tue, 21 May 2024 21:31:22 +0530 Subject: [PATCH 06/32] update CHANGELoG.md file Signed-off-by: Santhoshi Boyina --- packages/zowe-explorer/CHANGELOG.md | 1 + packages/zowe-explorer/src/Profiles.ts | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index c7ced93bef..c80e4db0f6 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -17,6 +17,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen - Added a confirmation dialog when the encoding is changed for an unsaved data set or USS file. [#2911](https://github.com/zowe/zowe-explorer-vscode/pull/2911) - Added a "Copy Relative Path" context option for USS files and directories in the tree view. [#2908](https://github.com/zowe/zowe-explorer-vscode/pull/2908) - Added a "Copy Name" context option for data sets, jobs and spool files in the tree view. [#2908](https://github.com/zowe/zowe-explorer-vscode/pull/2908) +- To switch from Basic authentication to Token based authentication and viceversa. [#2867](https://github.com/zowe/zowe-explorer-vscode/pull/2867) ### Bug fixes diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index 5b07527689..19d826b588 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1222,12 +1222,6 @@ export class Profiles extends ProfilesCache { loginOk = await this.loginWithRegularProfile(serviceProfile, node); } else { loginOk = await ZoweVsCodeExtension.loginWithBaseProfile(serviceProfile, loginTokenType, node, zeInstance, this); - if (loginOk) { - const profAttrs = this.getProfileFromConfig("base"); - const configApi = (await this.getProfileInfo()).getTeamConfig(); - configApi.set(`${(await profAttrs).profLoc.jsonLoc}.properties.port`, serviceProfile.profile.port); - await configApi.save(); - } } if (loginOk) { Gui.showMessage(localize("ssoLogin.successful", "Login to authentication service was successful.")); From 925768dba34d8e2c7b91e559a29155d502b4f003 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Wed, 22 May 2024 19:22:03 +0530 Subject: [PATCH 07/32] code coverage for missing lines Signed-off-by: Santhoshi Boyina --- .../__unit__/Profiles.extended.unit.test.ts | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts index 69ba469a6f..8643e1146c 100644 --- a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts @@ -1658,6 +1658,10 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { let globalMocks; let modifiedTestNode; + afterEach(() => { + jest.resetAllMocks(); + }); + beforeEach(async () => { globalMocks = await createGlobalMocks(); testNode = new (ZoweTreeNode as any)( @@ -1726,6 +1730,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { jest.spyOn(Profiles.getInstance(), "ssoLogin").mockImplementationOnce((node) => modifiedTestNode); await Profiles.getInstance().handleSwitchAuthentication(testNode); + expect(Gui.infoMessage).toBeCalled(); expect(testNode.profile.profile.tokenType).toBe("testToken"); expect(testNode.profile.profile.tokenValue).toBe("12345"); expect(testNode.profile.profile.secure.length).toBe(1); @@ -1782,6 +1787,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { } as never); jest.spyOn(utils.ProfilesUtils, "promptCredentials").mockImplementationOnce((node) => modifiedTestNode); await Profiles.getInstance().handleSwitchAuthentication(testNode); + expect(Gui.infoMessage).toBeCalled(); expect(testNode.profile.profile.user).toBe("testUser"); expect(testNode.profile.profile.password).toBe("6789"); expect(testNode.profile.profile.secure.length).toBe(2); @@ -1790,10 +1796,27 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { expect(testNode.profile.profile.tokenValue).toBeUndefined(); }); - it("when authentication method is unknown", () => { + it("When authentication method is unknown", async () => { jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(false); jest.spyOn(utils.ProfilesUtils, "isUsingTokenAuth").mockResolvedValueOnce(false); jest.spyOn(Gui, "infoMessage").mockImplementation(); + jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ + getTokenTypeName: () => "apimlAuthenticationToken", + } as never); + await Profiles.getInstance().handleSwitchAuthentication(testNode); + expect(Gui.infoMessage).toBeCalled(); + }); + + it("To check authentication switch for a profile which does not support token based authentication", async () => { + jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); + jest.spyOn(Gui, "showMessage").mockImplementation(); + jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ + getTokenTypeName: () => { + throw new Error("test error."); + }, + } as never); + await Profiles.getInstance().handleSwitchAuthentication(testNode); + expect(Gui.showMessage).toBeCalled(); }); }); From d0d8ffe0bcbe36a58136acd8b75420b3a3fc755a Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Thu, 23 May 2024 20:13:49 +0530 Subject: [PATCH 08/32] address review comments Signed-off-by: Santhoshi Boyina --- packages/zowe-explorer/CHANGELOG.md | 2 +- .../sample/src/utils/ProfileManagement.i18n.json | 2 +- packages/zowe-explorer/src/Profiles.ts | 16 ++++++++-------- .../zowe-explorer/src/utils/ProfileManagement.ts | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index c80e4db0f6..232b1b4436 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -17,7 +17,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen - Added a confirmation dialog when the encoding is changed for an unsaved data set or USS file. [#2911](https://github.com/zowe/zowe-explorer-vscode/pull/2911) - Added a "Copy Relative Path" context option for USS files and directories in the tree view. [#2908](https://github.com/zowe/zowe-explorer-vscode/pull/2908) - Added a "Copy Name" context option for data sets, jobs and spool files in the tree view. [#2908](https://github.com/zowe/zowe-explorer-vscode/pull/2908) -- To switch from Basic authentication to Token based authentication and viceversa. [#2867](https://github.com/zowe/zowe-explorer-vscode/pull/2867) +- Added the ability to switch between basic authentication and token-based authentication. [#2867](https://github.com/zowe/zowe-explorer-vscode/pull/2867) ### Bug fixes diff --git a/packages/zowe-explorer/i18n/sample/src/utils/ProfileManagement.i18n.json b/packages/zowe-explorer/i18n/sample/src/utils/ProfileManagement.i18n.json index 623303ff43..44d580af03 100644 --- a/packages/zowe-explorer/i18n/sample/src/utils/ProfileManagement.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/utils/ProfileManagement.i18n.json @@ -23,7 +23,7 @@ "hideProfileQpItems.hideProfile.qpLabel": "$(eye-closed) Hide Profile", "hideProfileQpItems.hideProfile.qpDetail": "Hide profile name from tree view", "switchAuthenticationQpItems.switchAuthentication.qpLabel": "$(key) Change the Authentication Method", - "switchAuthenticationQpItems.switchAuthentication.qpDetail": "To change the authentication method", + "switchAuthenticationQpItems.switchAuthentication.qpDetail": "Change the authentication method", "loginQpItem.login.qpLabel": "$(arrow-right) Log in to authentication service", "loginQpItem.login.qpDetail": "Log in to obtain a new token value", "logoutQpItem.logout.qpLabel": "$(arrow-left) Log out of authentication service", diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index 19d826b588..39a64cf07e 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1238,20 +1238,20 @@ export class Profiles extends ProfilesCache { } public async basicAuthClearSecureArray(profileName?: string): Promise { - const profAttrs = this.getProfileFromConfig(profileName); + const profAttrs = await this.getProfileFromConfig(profileName); const configApi = (await this.getProfileInfo()).getTeamConfig(); - configApi.set(`${(await profAttrs).profLoc.jsonLoc}.secure`, []); - configApi.delete(`${(await profAttrs).profLoc.jsonLoc}.properties.user`); - configApi.delete(`${(await profAttrs).profLoc.jsonLoc}.properties.password`); + configApi.set(`${profAttrs.profLoc.jsonLoc}.secure`, []); + configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.user`); + configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.password`); await configApi.save(); } public async tokenAuthClearSecureArray(profileName?: string): Promise { - const profAttrs = this.getProfileFromConfig(profileName); + const profAttrs = await this.getProfileFromConfig(profileName); const configApi = (await this.getProfileInfo()).getTeamConfig(); - configApi.set(`${(await profAttrs).profLoc.jsonLoc}.secure`, []); - configApi.delete(`${(await profAttrs).profLoc.jsonLoc}.properties.tokenType`); - configApi.delete(`${(await profAttrs).profLoc.jsonLoc}.properties.tokenValue`); + configApi.set(`${profAttrs.profLoc.jsonLoc}.secure`, []); + configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.tokenType`); + configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.tokenValue`); await configApi.save(); } diff --git a/packages/zowe-explorer/src/utils/ProfileManagement.ts b/packages/zowe-explorer/src/utils/ProfileManagement.ts index 9d78d60c09..ae7dae8b98 100644 --- a/packages/zowe-explorer/src/utils/ProfileManagement.ts +++ b/packages/zowe-explorer/src/utils/ProfileManagement.ts @@ -125,7 +125,7 @@ export class ProfileManagement { public static switchAuthenticationQpItems: Record = { [this.AuthQpLabels.switch]: { label: localize("switchAuthenticationQpItems.switchAuthentication.qpLabel", "$(key) Change the Authentication Method"), - description: localize("switchAuthenticationQpItems.switchAuthentication.qpDetail", "To change the authentication method"), + description: localize("switchAuthenticationQpItems.switchAuthentication.qpDetail", "Change the authentication method"), }, }; public static tokenAuthLoginQpItem: Record = { From 519fac602d80b39c3a72828ee992d8b2abebae56 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Mon, 10 Jun 2024 13:53:48 +0530 Subject: [PATCH 09/32] update switch to token-auth Signed-off-by: Santhoshi Boyina --- packages/zowe-explorer/src/Profiles.ts | 35 ++++++++++++++++---------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index eaf576e9ab..c0f2d127c8 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1240,7 +1240,7 @@ export class Profiles extends ProfilesCache { public async basicAuthClearSecureArray(profileName?: string): Promise { const profAttrs = await this.getProfileFromConfig(profileName); const configApi = (await this.getProfileInfo()).getTeamConfig(); - configApi.set(`${profAttrs.profLoc.jsonLoc}.secure`, []); + configApi.set(`${profAttrs.profLoc.jsonLoc}.secure`, ["tokenValue"]); configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.user`); configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.password`); await configApi.save(); @@ -1282,19 +1282,28 @@ export class Profiles extends ProfilesCache { serviceProfile.name ) ); - await this.basicAuthClearSecureArray(serviceProfile.name); - if (loginTokenType.startsWith(zowe.imperative.SessConstants.TOKEN_TYPE_APIML)) { - await this.basicAuthClearSecureArray("base"); + let loginOk = false; + if (loginTokenType && loginTokenType.startsWith(zowe.imperative.SessConstants.TOKEN_TYPE_APIML)) { + loginOk = await ZoweVsCodeExtension.loginWithBaseProfile(serviceProfile, loginTokenType, node, zeInstance, this); + } else { + loginOk = await this.loginWithRegularProfile(serviceProfile, node); + } + + if (loginOk) { + Gui.showMessage(localize("ssoLogin.successful", "Login to authentication service was successful.")); + await Profiles.getInstance().refresh(zeInstance); + await this.basicAuthClearSecureArray(serviceProfile.name); + const updBaseProfile: zowe.imperative.IProfile = { + user: undefined, + password: undefined, + }; + node.setProfileToChoice({ + ...node.getProfile(), + profile: { ...node.getProfile().profile, ...updBaseProfile }, + }); + } else { + Gui.showMessage(this.profilesOpCancelled); } - const updBaseProfile: zowe.imperative.IProfile = { - user: undefined, - password: undefined, - }; - node.setProfileToChoice({ - ...node.getProfile(), - profile: { ...node.getProfile().profile, ...updBaseProfile }, - }); - await this.ssoLogin(node, serviceProfile.name); break; } case await ProfilesUtils.isUsingTokenAuth(serviceProfile.name): { From 49070fc1973835cbd13d479eaea608ee87f9c55f Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Mon, 10 Jun 2024 14:10:13 +0530 Subject: [PATCH 10/32] update switch to basic auth Signed-off-by: Santhoshi Boyina --- packages/zowe-explorer/src/Profiles.ts | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index c0f2d127c8..612167a735 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1249,9 +1249,10 @@ export class Profiles extends ProfilesCache { public async tokenAuthClearSecureArray(profileName?: string): Promise { const profAttrs = await this.getProfileFromConfig(profileName); const configApi = (await this.getProfileInfo()).getTeamConfig(); - configApi.set(`${profAttrs.profLoc.jsonLoc}.secure`, []); + configApi.set(`${profAttrs.profLoc.jsonLoc}.secure`, ["user", "password"]); configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.tokenType`); configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.tokenValue`); + configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.tokenExpiration`); await configApi.save(); } @@ -1314,12 +1315,20 @@ export class Profiles extends ProfilesCache { serviceProfile.name ) ); - await this.ssoLogout(node); - await this.tokenAuthClearSecureArray(serviceProfile.name); - if (loginTokenType.startsWith(zowe.imperative.SessConstants.TOKEN_TYPE_APIML)) { - await this.tokenAuthClearSecureArray("base"); + const profile: string | zowe.imperative.IProfileLoaded = node?.getProfile(); + const creds = await Profiles.getInstance().promptCredentials(profile, true); + + if (creds != null) { + const successMsg = localize( + "promptCredentials.updatedCredentials", + "Credentials for {0} were successfully updated", + typeof profile === "string" ? profile : profile.name + ); + ZoweLogger.info(successMsg); + Gui.showMessage(successMsg); + await this.tokenAuthClearSecureArray(serviceProfile.name); + await vscode.commands.executeCommand("zowe.extRefresh"); } - await ProfilesUtils.promptCredentials(node); break; } default: { From 67b643032197614deecfd923a1e9f7b9ddbaec14 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Mon, 10 Jun 2024 14:25:10 +0530 Subject: [PATCH 11/32] update unit test case for switch from basic to token-auth Signed-off-by: Santhoshi Boyina --- .../__tests__/__unit__/Profiles.extended.unit.test.ts | 2 +- packages/zowe-explorer/src/Profiles.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts index 076c500abc..138f0569f2 100644 --- a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts @@ -1728,7 +1728,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { getTokenTypeName: () => "apimlAuthenticationToken", } as never); - jest.spyOn(Profiles.getInstance(), "ssoLogin").mockImplementationOnce((node) => modifiedTestNode); + jest.spyOn(ZoweVsCodeExtension, "loginWithBaseProfile").mockResolvedValue(true); await Profiles.getInstance().handleSwitchAuthentication(testNode); expect(Gui.infoMessage).toBeCalled(); expect(testNode.profile.profile.tokenType).toBe("testToken"); diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index 612167a735..cbb966a488 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1284,7 +1284,7 @@ export class Profiles extends ProfilesCache { ) ); let loginOk = false; - if (loginTokenType && loginTokenType.startsWith(zowe.imperative.SessConstants.TOKEN_TYPE_APIML)) { + if (loginTokenType && loginTokenType.startsWith("apimlAuthenticationToken")) { loginOk = await ZoweVsCodeExtension.loginWithBaseProfile(serviceProfile, loginTokenType, node, zeInstance, this); } else { loginOk = await this.loginWithRegularProfile(serviceProfile, node); From 9ebd39a10a965e61bdb69cfd0924e1bb582a1d0a Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Mon, 10 Jun 2024 14:26:59 +0530 Subject: [PATCH 12/32] update unit test case for switch from token-auth to basic-auth Signed-off-by: Santhoshi Boyina --- .../__tests__/__unit__/Profiles.extended.unit.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts index 138f0569f2..204413ebab 100644 --- a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts @@ -1785,7 +1785,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ getTokenTypeName: () => "apimlAuthenticationToken", } as never); - jest.spyOn(utils.ProfilesUtils, "promptCredentials").mockImplementationOnce((node) => modifiedTestNode); + jest.spyOn(Profiles.getInstance(), "promptCredentials").mockResolvedValue(["testUser", "6789"]); await Profiles.getInstance().handleSwitchAuthentication(testNode); expect(Gui.infoMessage).toBeCalled(); expect(testNode.profile.profile.user).toBe("testUser"); From 7c1c4e670731d99b577cef1959aadb523b62bc0b Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Mon, 10 Jun 2024 14:28:42 +0530 Subject: [PATCH 13/32] update unit test case for switch authentication edge cases Signed-off-by: Santhoshi Boyina --- .../__unit__/Profiles.extended.unit.test.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts index 204413ebab..a86fe516e8 100644 --- a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts @@ -1795,7 +1795,6 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { expect(testNode.profile.profile.tokenType).toBeUndefined(); expect(testNode.profile.profile.tokenValue).toBeUndefined(); }); - it("When authentication method is unknown", async () => { jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(false); jest.spyOn(utils.ProfilesUtils, "isUsingTokenAuth").mockResolvedValueOnce(false); @@ -1818,6 +1817,17 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { await Profiles.getInstance().handleSwitchAuthentication(testNode); expect(Gui.showMessage).toBeCalled(); }); + + it("To check profile using basic authentication does not support token based authentication", async () => { + jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); + jest.spyOn(Gui, "showMessage").mockImplementation(); + jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ + getTokenTypeName: () => "apimlAuthenticationToken", + } as never); + jest.spyOn(ZoweVsCodeExtension, "loginWithBaseProfile").mockResolvedValue(false); + await Profiles.getInstance().handleSwitchAuthentication(testNode); + expect(Gui.showMessage).toBeCalled(); + }); }); describe("Profiles Unit Tests - function ssoLogout", () => { From 0e93f04f90d4e96dce516a2e0daef54b2e8c7111 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Mon, 10 Jun 2024 14:51:34 +0530 Subject: [PATCH 14/32] update unit test case for token-auth based on the profile used Signed-off-by: Santhoshi Boyina --- .../__unit__/Profiles.extended.unit.test.ts | 60 ++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts index a86fe516e8..1ada282137 100644 --- a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts @@ -1681,7 +1681,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { ); }); - it("To switch from Basic to Token Based Authentication", async () => { + it("To switch from Basic to Token Based Authentication with Base Profile", async () => { jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ getTeamConfig: () => ({ @@ -1739,6 +1739,64 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { expect(testNode.profile.profile.password).toBeUndefined(); }); + it("To switch from Basic to Token Based Authentication with Regular Profile", async () => { + jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); + jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ + getTeamConfig: () => ({ + properties: jest.fn(), + set: jest.fn(), + delete: jest.fn(), + save: jest.fn(), + }), + getAllProfiles: () => [ + { + profName: "sestest", + profLoc: { + osLoc: ["test"], + }, + }, + ], + } as any); + testNode.profile.profile = { + type: "zosmf", + host: "test", + port: 1443, + name: "base", + rejectUnauthorized: false, + user: "testUser", + password: "***", + tokenType: undefined, + tokenValue: undefined, + secure: ["user", "password"], + }; + modifiedTestNode.profile.profile = { + type: "zosmf", + host: "test", + port: 1443, + name: "base", + rejectUnauthorized: false, + user: undefined, + password: undefined, + tokenType: "testToken", + tokenValue: "12345", + secure: ["tokenType"], + }; + jest.spyOn(Gui, "infoMessage").mockImplementation(); + jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ + getTokenTypeName: () => "jwtToken", + } as never); + + jest.spyOn(ZoweVsCodeExtension, "loginWithBaseProfile").mockResolvedValue(true); + await Profiles.getInstance().handleSwitchAuthentication(testNode); + expect(Gui.infoMessage).toBeCalled(); + expect(testNode.profile.profile.tokenType).toBe("testToken"); + expect(testNode.profile.profile.tokenValue).toBe("12345"); + expect(testNode.profile.profile.secure.length).toBe(1); + expect(testNode.profile.profile.secure).toEqual(["tokenType"]); + expect(testNode.profile.profile.user).toBeUndefined(); + expect(testNode.profile.profile.password).toBeUndefined(); + }); + it("To switch from Token based to Basic Authentication", async () => { jest.spyOn(utils.ProfilesUtils, "isUsingTokenAuth").mockResolvedValueOnce(true); jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ From 84e188128130d966c963aef6102111ebafe5a479 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Mon, 10 Jun 2024 15:13:10 +0530 Subject: [PATCH 15/32] to add authentication successful message Signed-off-by: Santhoshi Boyina --- .../i18n/sample/src/Profiles.i18n.json | 8 +++++--- packages/zowe-explorer/src/Profiles.ts | 18 ++++++++++++------ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json b/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json index 5cd8202e56..dfb9e1edb6 100644 --- a/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json @@ -31,9 +31,11 @@ "ssoLogin.tokenType.error": "Error getting supported tokenType value for profile {0}", "ssoLogin.successful": "Login to authentication service was successful.", "ssoLogin.error": "Unable to log in with {0}. {1}", - "handleSwitchAuthentication.tokenType.error": "Cannot switch to Token Authentication for profile {0}", - "handleSwitchAuthentication.switchBaseToTokenAuth": "Switching from Basic to Token Authentication for profile {0}", - "handleSwitchAuthentication.switchTokenToBaseAuth": "Switching from Token to Basic Authentication for profile {0}", + "handleSwitchAuthentication.tokenType.error": "Cannot switch to Token-based Authentication for profile {0}", + "handleSwitchAuthentication.switchBaseToTokenAuth": "Switching from Basic to Token-based Authentication for profile {0}", + "handleSwitchAuthentication.tokenAuth.successful": "Login using token-based authentication service was successful.", + "handleSwitchAuthentication.switchTokenToBaseAuth": "Switching from Token-based to Basic Authentication for profile {0}", + "handleSwitchAuthentication.basicAuth.successful": "Login using basic authentication was successful.", "handleSwitchAuthentication.noAuth": "Unable to Switch Authentication for profile {0}", "ssoLogout.successful": "Logout from authentication service was successful for {0}.", "ssoLogout.error": "Unable to log out with {0}. {1}", diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index cbb966a488..41e246bb7f 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1270,7 +1270,11 @@ export class Profiles extends ProfilesCache { } catch (error) { ZoweLogger.warn(error); Gui.showMessage( - localize("handleSwitchAuthentication.tokenType.error", "Cannot switch to Token Authentication for profile {0}", serviceProfile.name) + localize( + "handleSwitchAuthentication.tokenType.error", + "Cannot switch to Token-based Authentication for profile {0}", + serviceProfile.name + ) ); return; } @@ -1279,7 +1283,7 @@ export class Profiles extends ProfilesCache { Gui.infoMessage( localize( "handleSwitchAuthentication.switchBaseToTokenAuth", - "Switching from Basic to Token Authentication for profile {0}", + "Switching from Basic to Token-based Authentication for profile {0}", serviceProfile.name ) ); @@ -1291,7 +1295,9 @@ export class Profiles extends ProfilesCache { } if (loginOk) { - Gui.showMessage(localize("ssoLogin.successful", "Login to authentication service was successful.")); + Gui.showMessage( + localize("handleSwitchAuthentication.tokenAuth.successful", "Login using token-based authentication service was successful.") + ); await Profiles.getInstance().refresh(zeInstance); await this.basicAuthClearSecureArray(serviceProfile.name); const updBaseProfile: zowe.imperative.IProfile = { @@ -1311,7 +1317,7 @@ export class Profiles extends ProfilesCache { Gui.infoMessage( localize( "handleSwitchAuthentication.switchTokenToBaseAuth", - "Switching from Token to Basic Authentication for profile {0}", + "Switching from Token-based to Basic Authentication for profile {0}", serviceProfile.name ) ); @@ -1320,8 +1326,8 @@ export class Profiles extends ProfilesCache { if (creds != null) { const successMsg = localize( - "promptCredentials.updatedCredentials", - "Credentials for {0} were successfully updated", + "handleSwitchAuthentication.basicAuth.successful", + "Login using basic authentication was successful.", typeof profile === "string" ? profile : profile.name ); ZoweLogger.info(successMsg); From 1236bc4cff4b6aaafbc60949060d70f664d130b6 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Mon, 10 Jun 2024 16:14:02 +0530 Subject: [PATCH 16/32] update error messages Signed-off-by: Santhoshi Boyina --- .../i18n/sample/src/Profiles.i18n.json | 12 ++--- packages/zowe-explorer/src/Profiles.ts | 50 +++++++++++-------- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json b/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json index dfb9e1edb6..b6e9bca64b 100644 --- a/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json @@ -31,12 +31,12 @@ "ssoLogin.tokenType.error": "Error getting supported tokenType value for profile {0}", "ssoLogin.successful": "Login to authentication service was successful.", "ssoLogin.error": "Unable to log in with {0}. {1}", - "handleSwitchAuthentication.tokenType.error": "Cannot switch to Token-based Authentication for profile {0}", - "handleSwitchAuthentication.switchBaseToTokenAuth": "Switching from Basic to Token-based Authentication for profile {0}", - "handleSwitchAuthentication.tokenAuth.successful": "Login using token-based authentication service was successful.", - "handleSwitchAuthentication.switchTokenToBaseAuth": "Switching from Token-based to Basic Authentication for profile {0}", - "handleSwitchAuthentication.basicAuth.successful": "Login using basic authentication was successful.", - "handleSwitchAuthentication.noAuth": "Unable to Switch Authentication for profile {0}", + "handleSwitchAuthentication.getTokenTypeName.error": "Cannot switch to Token-based Authentication for profile {0}.", + "handleSwitchAuthentication.switchFromBasicToTokenAuth.successful": "Login using token-based authentication service was successful for profile {0}.", + "handleSwitchAuthentication.switchFromBasicToTokenAuth.error": "Unable to switch to Token-based authentication for profile {0}.", + "handleSwitchAuthentication.switchFromTokenToBasicAuth.successful": "Login using basic authentication was successful for profile {0}.", + "handleSwitchAuthentication.switchFromTokenToBasicAuth.error": "Unable to switch to Basic authentication for profile {0}.", + "handleSwitchAuthentication.noAuth": "Unable to Switch Authentication for profile {0}.", "ssoLogout.successful": "Logout from authentication service was successful for {0}.", "ssoLogout.error": "Unable to log out with {0}. {1}", "getConfigLocationPrompt.placeholder.create": "Select the location where the config file will be initialized", diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index 41e246bb7f..03dbee70ba 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1271,8 +1271,8 @@ export class Profiles extends ProfilesCache { ZoweLogger.warn(error); Gui.showMessage( localize( - "handleSwitchAuthentication.tokenType.error", - "Cannot switch to Token-based Authentication for profile {0}", + "handleSwitchAuthentication.getTokenTypeName.error", + "Cannot switch to Token-based Authentication for profile {0}.", serviceProfile.name ) ); @@ -1280,13 +1280,6 @@ export class Profiles extends ProfilesCache { } switch (true) { case ProfilesUtils.isProfileUsingBasicAuth(serviceProfile): { - Gui.infoMessage( - localize( - "handleSwitchAuthentication.switchBaseToTokenAuth", - "Switching from Basic to Token-based Authentication for profile {0}", - serviceProfile.name - ) - ); let loginOk = false; if (loginTokenType && loginTokenType.startsWith("apimlAuthenticationToken")) { loginOk = await ZoweVsCodeExtension.loginWithBaseProfile(serviceProfile, loginTokenType, node, zeInstance, this); @@ -1296,7 +1289,11 @@ export class Profiles extends ProfilesCache { if (loginOk) { Gui.showMessage( - localize("handleSwitchAuthentication.tokenAuth.successful", "Login using token-based authentication service was successful.") + localize( + "handleSwitchAuthentication.switchFromBasicToTokenAuth.successful", + "Login using token-based authentication service was successful for profile {0}.", + serviceProfile.name + ) ); await Profiles.getInstance().refresh(zeInstance); await this.basicAuthClearSecureArray(serviceProfile.name); @@ -1309,37 +1306,46 @@ export class Profiles extends ProfilesCache { profile: { ...node.getProfile().profile, ...updBaseProfile }, }); } else { - Gui.showMessage(this.profilesOpCancelled); + Gui.errorMessage( + localize( + "handleSwitchAuthentication.switchFromBasicToTokenAuth.error", + "Unable to switch to Token-based authentication for profile {0}.", + serviceProfile.name + ) + ); + return; } break; } case await ProfilesUtils.isUsingTokenAuth(serviceProfile.name): { - Gui.infoMessage( - localize( - "handleSwitchAuthentication.switchTokenToBaseAuth", - "Switching from Token-based to Basic Authentication for profile {0}", - serviceProfile.name - ) - ); const profile: string | zowe.imperative.IProfileLoaded = node?.getProfile(); const creds = await Profiles.getInstance().promptCredentials(profile, true); if (creds != null) { const successMsg = localize( - "handleSwitchAuthentication.basicAuth.successful", - "Login using basic authentication was successful.", + "handleSwitchAuthentication.switchFromTokenToBasicAuth.successful", + "Login using basic authentication was successful for profile {0}.", typeof profile === "string" ? profile : profile.name ); ZoweLogger.info(successMsg); Gui.showMessage(successMsg); await this.tokenAuthClearSecureArray(serviceProfile.name); await vscode.commands.executeCommand("zowe.extRefresh"); + } else { + Gui.errorMessage( + localize( + "handleSwitchAuthentication.switchFromTokenToBasicAuth.error", + "Unable to switch to Basic authentication for profile {0}.", + serviceProfile.name + ) + ); + return; } break; } default: { - Gui.infoMessage( - localize("handleSwitchAuthentication.noAuth", "Unable to Switch Authentication for profile {0}", serviceProfile.name) + Gui.errorMessage( + localize("handleSwitchAuthentication.noAuth", "Unable to Switch Authentication for profile {0}.", serviceProfile.name) ); } } From fb2f70eb217a3fc69f53baf35aa938c28d8f81ab Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Mon, 10 Jun 2024 18:21:40 +0530 Subject: [PATCH 17/32] update unit test cases Signed-off-by: Santhoshi Boyina --- .../__unit__/Profiles.extended.unit.test.ts | 247 +++++++++++++++--- packages/zowe-explorer/src/Profiles.ts | 4 +- 2 files changed, 212 insertions(+), 39 deletions(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts index 1ada282137..8644fb2b31 100644 --- a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts @@ -155,6 +155,12 @@ async function createGlobalMocks() { }), configurable: true, }); + Object.defineProperty(newMocks.mockProfileInstance, "loginWithRegularProfile", { + value: jest.fn(() => { + return true; + }), + configurable: true, + }); Object.defineProperty(zowe.imperative, "Config", { value: () => newMocks.mockConfigInstance, @@ -1681,7 +1687,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { ); }); - it("To switch from Basic to Token Based Authentication with Base Profile", async () => { + it("To switch from Basic to Token-based authentication with Base Profile", async () => { jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ getTeamConfig: () => ({ @@ -1723,23 +1729,80 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { tokenValue: "12345", secure: ["tokenType"], }; - jest.spyOn(Gui, "infoMessage").mockImplementation(); jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ getTokenTypeName: () => "apimlAuthenticationToken", } as never); jest.spyOn(ZoweVsCodeExtension, "loginWithBaseProfile").mockResolvedValue(true); await Profiles.getInstance().handleSwitchAuthentication(testNode); - expect(Gui.infoMessage).toBeCalled(); - expect(testNode.profile.profile.tokenType).toBe("testToken"); - expect(testNode.profile.profile.tokenValue).toBe("12345"); - expect(testNode.profile.profile.secure.length).toBe(1); - expect(testNode.profile.profile.secure).toEqual(["tokenType"]); + expect(Gui.showMessage).toBeCalled(); + expect(testNode.profile.profile.tokenType).toBe(modifiedTestNode.profile.profile.tokenType); + expect(testNode.profile.profile.tokenValue).toBe(modifiedTestNode.profile.profile.tokenValue); + expect(testNode.profile.profile.secure.length).toBe(modifiedTestNode.profile.profile.secure.length); + expect(testNode.profile.profile.secure).toEqual(modifiedTestNode.profile.profile.secure); expect(testNode.profile.profile.user).toBeUndefined(); expect(testNode.profile.profile.password).toBeUndefined(); }); - it("To switch from Basic to Token Based Authentication with Regular Profile", async () => { + it("To check login fail's when switching from Basic to Token-based authentication with Base Profile", async () => { + jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); + jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ + getTeamConfig: () => ({ + properties: jest.fn(), + set: jest.fn(), + delete: jest.fn(), + save: jest.fn(), + }), + getAllProfiles: () => [ + { + profName: "sestest", + profLoc: { + osLoc: ["test"], + }, + }, + ], + } as any); + testNode.profile.profile = { + type: "zosmf", + host: "test", + port: 1443, + name: "base", + rejectUnauthorized: false, + user: "testUser", + password: "***", + tokenType: undefined, + tokenValue: undefined, + secure: ["user", "password"], + }; + modifiedTestNode.profile.profile = { + type: "zosmf", + host: "test", + port: 1443, + name: "base", + rejectUnauthorized: false, + user: "testUser", + password: "***", + tokenType: undefined, + tokenValue: undefined, + secure: ["user", "password"], + }; + jest.spyOn(Gui, "errorMessage").mockImplementation(); + jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ + getTokenTypeName: () => "apimlAuthenticationToken", + } as never); + + jest.spyOn(ZoweVsCodeExtension, "loginWithBaseProfile").mockResolvedValue(false); + await Profiles.getInstance().handleSwitchAuthentication(testNode); + expect(Gui.errorMessage).toBeCalled(); + expect(testNode.profile.profile.tokenType).toBe(modifiedTestNode.profile.profile.tokenType); + expect(testNode.profile.profile.tokenValue).toBe(modifiedTestNode.profile.profile.tokenValue); + expect(testNode.profile.profile.secure.length).toBe(modifiedTestNode.profile.profile.secure.length); + expect(testNode.profile.profile.secure).toEqual(modifiedTestNode.profile.profile.secure); + expect(testNode.profile.profile.tokenType).toBeUndefined(); + expect(testNode.profile.profile.tokenValue).toBeUndefined(); + }); + + it("To switch from Basic to Token-based authentication with Regular Profile", async () => { jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ getTeamConfig: () => ({ @@ -1781,23 +1844,77 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { tokenValue: "12345", secure: ["tokenType"], }; - jest.spyOn(Gui, "infoMessage").mockImplementation(); jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ getTokenTypeName: () => "jwtToken", } as never); - - jest.spyOn(ZoweVsCodeExtension, "loginWithBaseProfile").mockResolvedValue(true); + jest.spyOn(Profiles.getInstance(), "loginWithRegularProfile").mockResolvedValue(true); await Profiles.getInstance().handleSwitchAuthentication(testNode); - expect(Gui.infoMessage).toBeCalled(); - expect(testNode.profile.profile.tokenType).toBe("testToken"); - expect(testNode.profile.profile.tokenValue).toBe("12345"); - expect(testNode.profile.profile.secure.length).toBe(1); - expect(testNode.profile.profile.secure).toEqual(["tokenType"]); + expect(Gui.showMessage).toBeCalled(); + expect(testNode.profile.profile.tokenType).toBe(modifiedTestNode.profile.profile.tokenType); + expect(testNode.profile.profile.tokenValue).toBe(modifiedTestNode.profile.profile.tokenValue); + expect(testNode.profile.profile.secure.length).toBe(modifiedTestNode.profile.profile.secure.length); + expect(testNode.profile.profile.secure).toEqual(modifiedTestNode.profile.profile.secure); expect(testNode.profile.profile.user).toBeUndefined(); expect(testNode.profile.profile.password).toBeUndefined(); }); - it("To switch from Token based to Basic Authentication", async () => { + it("To check login fail's when switching from Basic to Token-based authentication with Regular Profile", async () => { + jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); + jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ + getTeamConfig: () => ({ + properties: jest.fn(), + set: jest.fn(), + delete: jest.fn(), + save: jest.fn(), + }), + getAllProfiles: () => [ + { + profName: "sestest", + profLoc: { + osLoc: ["test"], + }, + }, + ], + } as any); + testNode.profile.profile = { + type: "zosmf", + host: "test", + port: 1443, + name: "base", + rejectUnauthorized: false, + user: "testUser", + password: "***", + tokenType: undefined, + tokenValue: undefined, + secure: ["user", "password"], + }; + modifiedTestNode.profile.profile = { + type: "zosmf", + host: "test", + port: 1443, + name: "base", + rejectUnauthorized: false, + user: "testUser", + password: "***", + tokenType: undefined, + tokenValue: undefined, + secure: ["user", "password"], + }; + jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ + getTokenTypeName: () => "jwtToken", + } as never); + jest.spyOn(Profiles.getInstance(), "loginWithRegularProfile").mockResolvedValue(false); + await Profiles.getInstance().handleSwitchAuthentication(testNode); + expect(Gui.errorMessage).toBeCalled(); + expect(testNode.profile.profile.tokenType).toBe(modifiedTestNode.profile.profile.tokenType); + expect(testNode.profile.profile.tokenValue).toBe(modifiedTestNode.profile.profile.tokenValue); + expect(testNode.profile.profile.secure.length).toBe(modifiedTestNode.profile.profile.secure.length); + expect(testNode.profile.profile.secure).toEqual(modifiedTestNode.profile.profile.secure); + expect(testNode.profile.profile.tokenType).toBeUndefined(); + expect(testNode.profile.profile.tokenValue).toBeUndefined(); + }); + + it("To switch from Token-based to Basic authentication when cred values are passed", async () => { jest.spyOn(utils.ProfilesUtils, "isUsingTokenAuth").mockResolvedValueOnce(true); jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ getTeamConfig: () => ({ @@ -1839,53 +1956,109 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { tokenValue: undefined, secure: ["user", "password"], }; - jest.spyOn(Gui, "infoMessage").mockImplementation(); jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ getTokenTypeName: () => "apimlAuthenticationToken", } as never); jest.spyOn(Profiles.getInstance(), "promptCredentials").mockResolvedValue(["testUser", "6789"]); await Profiles.getInstance().handleSwitchAuthentication(testNode); - expect(Gui.infoMessage).toBeCalled(); - expect(testNode.profile.profile.user).toBe("testUser"); - expect(testNode.profile.profile.password).toBe("6789"); - expect(testNode.profile.profile.secure.length).toBe(2); - expect(testNode.profile.profile.secure).toEqual(["user", "password"]); + expect(Gui.showMessage).toBeCalled(); + expect(Gui.showMessage).toBeCalled(); + expect(testNode.profile.profile.tokenType).toBe(modifiedTestNode.profile.profile.tokenType); + expect(testNode.profile.profile.tokenValue).toBe(modifiedTestNode.profile.profile.tokenValue); + expect(testNode.profile.profile.secure.length).toBe(modifiedTestNode.profile.profile.secure.length); + expect(testNode.profile.profile.secure).toEqual(modifiedTestNode.profile.profile.secure); expect(testNode.profile.profile.tokenType).toBeUndefined(); expect(testNode.profile.profile.tokenValue).toBeUndefined(); }); - it("When authentication method is unknown", async () => { - jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(false); - jest.spyOn(utils.ProfilesUtils, "isUsingTokenAuth").mockResolvedValueOnce(false); - jest.spyOn(Gui, "infoMessage").mockImplementation(); + + it("To switch from Token-based to Basic authentication when cred values are not passed", async () => { + jest.spyOn(utils.ProfilesUtils, "isUsingTokenAuth").mockResolvedValueOnce(true); + jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ + getTeamConfig: () => ({ + properties: jest.fn(), + set: jest.fn(), + delete: jest.fn(), + save: jest.fn(), + }), + getAllProfiles: () => [ + { + profName: "sestest", + profLoc: { + osLoc: ["test"], + }, + }, + ], + } as any); + testNode.profile.profile = { + type: "zosmf", + host: "test", + port: 1443, + name: "base", + rejectUnauthorized: false, + user: undefined, + password: undefined, + tokenType: "testTokenType", + tokenValue: "12345", + secure: ["tokenType"], + }; + modifiedTestNode.profile.profile = { + type: "zosmf", + host: "test", + port: 1443, + name: "base", + rejectUnauthorized: false, + user: undefined, + password: undefined, + tokenType: "testTokenType", + tokenValue: "12345", + secure: ["tokenType"], + }; jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ getTokenTypeName: () => "apimlAuthenticationToken", } as never); + jest.spyOn(Gui, "errorMessage").mockImplementation(); + jest.spyOn(Profiles.getInstance(), "promptCredentials").mockResolvedValue(undefined); await Profiles.getInstance().handleSwitchAuthentication(testNode); - expect(Gui.infoMessage).toBeCalled(); + expect(Gui.errorMessage).toBeCalled(); + expect(testNode.profile.profile.tokenType).toBe(modifiedTestNode.profile.profile.tokenType); + expect(testNode.profile.profile.tokenValue).toBe(modifiedTestNode.profile.profile.tokenValue); + expect(testNode.profile.profile.secure.length).toBe(modifiedTestNode.profile.profile.secure.length); + expect(testNode.profile.profile.secure).toEqual(modifiedTestNode.profile.profile.secure); + expect(testNode.profile.profile.user).toBeUndefined(); + expect(testNode.profile.profile.password).toBeUndefined(); }); - it("To check authentication switch for a profile which does not support token based authentication", async () => { + it("To check authentication switch for a profile which does not support token-based authentication", async () => { jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); - jest.spyOn(Gui, "showMessage").mockImplementation(); jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ getTokenTypeName: () => { throw new Error("test error."); }, } as never); await Profiles.getInstance().handleSwitchAuthentication(testNode); - expect(Gui.showMessage).toBeCalled(); + expect(Gui.errorMessage).toBeCalled(); }); - it("To check profile using basic authentication does not support token based authentication", async () => { - jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); - jest.spyOn(Gui, "showMessage").mockImplementation(); + it("When authentication method is unknown", async () => { + jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(false); + jest.spyOn(utils.ProfilesUtils, "isUsingTokenAuth").mockResolvedValueOnce(false); jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ getTokenTypeName: () => "apimlAuthenticationToken", } as never); - jest.spyOn(ZoweVsCodeExtension, "loginWithBaseProfile").mockResolvedValue(false); await Profiles.getInstance().handleSwitchAuthentication(testNode); - expect(Gui.showMessage).toBeCalled(); - }); + expect(Gui.errorMessage).toBeCalled(); + }); + + // it("To check profile using basic authentication does not support token-based authentication", async () => { + // jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); + // jest.spyOn(Gui, "showMessage").mockImplementation(); + // jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ + // getTokenTypeName: () => "apimlAuthenticationToken", + // } as never); + // jest.spyOn(ZoweVsCodeExtension, "loginWithBaseProfile").mockResolvedValue(false); + // await Profiles.getInstance().handleSwitchAuthentication(testNode); + // expect(Gui.showMessage).toBeCalled(); + // }); }); describe("Profiles Unit Tests - function ssoLogout", () => { diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index 03dbee70ba..e183b89b20 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1269,7 +1269,7 @@ export class Profiles extends ProfilesCache { loginTokenType = await zeInstance.getCommonApi(serviceProfile).getTokenTypeName(); } catch (error) { ZoweLogger.warn(error); - Gui.showMessage( + Gui.errorMessage( localize( "handleSwitchAuthentication.getTokenTypeName.error", "Cannot switch to Token-based Authentication for profile {0}.", @@ -1475,7 +1475,7 @@ export class Profiles extends ProfilesCache { .map((arg) => arg.argName); } - private async loginWithRegularProfile(serviceProfile: zowe.imperative.IProfileLoaded, node?: IZoweNodeType): Promise { + public async loginWithRegularProfile(serviceProfile: zowe.imperative.IProfileLoaded, node?: IZoweNodeType): Promise { let session: zowe.imperative.Session; if (node) { session = node.getSession(); From 2b147919f0c350a98e14d16492771123ab9a1178 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Mon, 17 Jun 2024 20:22:00 +0530 Subject: [PATCH 18/32] address review comment Signed-off-by: Santhoshi Boyina --- .../__tests__/__unit__/Profiles.extended.unit.test.ts | 11 ----------- packages/zowe-explorer/src/Profiles.ts | 2 -- 2 files changed, 13 deletions(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts index 8644fb2b31..5d9ba954da 100644 --- a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts @@ -2048,17 +2048,6 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { await Profiles.getInstance().handleSwitchAuthentication(testNode); expect(Gui.errorMessage).toBeCalled(); }); - - // it("To check profile using basic authentication does not support token-based authentication", async () => { - // jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); - // jest.spyOn(Gui, "showMessage").mockImplementation(); - // jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ - // getTokenTypeName: () => "apimlAuthenticationToken", - // } as never); - // jest.spyOn(ZoweVsCodeExtension, "loginWithBaseProfile").mockResolvedValue(false); - // await Profiles.getInstance().handleSwitchAuthentication(testNode); - // expect(Gui.showMessage).toBeCalled(); - // }); }); describe("Profiles Unit Tests - function ssoLogout", () => { diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index e183b89b20..b1ab4ce684 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1295,7 +1295,6 @@ export class Profiles extends ProfilesCache { serviceProfile.name ) ); - await Profiles.getInstance().refresh(zeInstance); await this.basicAuthClearSecureArray(serviceProfile.name); const updBaseProfile: zowe.imperative.IProfile = { user: undefined, @@ -1330,7 +1329,6 @@ export class Profiles extends ProfilesCache { ZoweLogger.info(successMsg); Gui.showMessage(successMsg); await this.tokenAuthClearSecureArray(serviceProfile.name); - await vscode.commands.executeCommand("zowe.extRefresh"); } else { Gui.errorMessage( localize( From 5ebc4231f20785f8032c59d23018164a222e3d45 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Wed, 19 Jun 2024 15:58:39 +0530 Subject: [PATCH 19/32] To fire the onProfilesUpdate event Signed-off-by: Santhoshi Boyina --- packages/zowe-explorer/src/Profiles.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index b1ab4ce684..e6368351de 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -29,6 +29,7 @@ import { ZoweVsCodeExtension, getFullPath, getZoweDir, + EventTypes, } from "@zowe/zowe-explorer-api"; import { errorHandling, FilterDescriptor, FilterItem, ProfilesUtils } from "./utils/ProfilesUtils"; import { ZoweExplorerApiRegister } from "./ZoweExplorerApiRegister"; @@ -1329,6 +1330,7 @@ export class Profiles extends ProfilesCache { ZoweLogger.info(successMsg); Gui.showMessage(successMsg); await this.tokenAuthClearSecureArray(serviceProfile.name); + ZoweExplorerApiRegister.getInstance().onProfilesUpdateEmitter.fire(EventTypes.UPDATE); } else { Gui.errorMessage( localize( From 883e5077d486464f36bc492bea17f393c535c4d2 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Tue, 2 Jul 2024 19:59:55 +0530 Subject: [PATCH 20/32] warn user on authentication switch Signed-off-by: Santhoshi Boyina --- .../zowe-explorer/i18n/sample/src/Profiles.i18n.json | 1 + packages/zowe-explorer/src/Profiles.ts | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json b/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json index b6e9bca64b..1ffc69a7d7 100644 --- a/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json @@ -31,6 +31,7 @@ "ssoLogin.tokenType.error": "Error getting supported tokenType value for profile {0}", "ssoLogin.successful": "Login to authentication service was successful.", "ssoLogin.error": "Unable to log in with {0}. {1}", + "handleSwitchAuthentication.confirm": "Are you sure you want to change the authentication for profile {0}?", "handleSwitchAuthentication.getTokenTypeName.error": "Cannot switch to Token-based Authentication for profile {0}.", "handleSwitchAuthentication.switchFromBasicToTokenAuth.successful": "Login using token-based authentication service was successful for profile {0}.", "handleSwitchAuthentication.switchFromBasicToTokenAuth.error": "Unable to switch to Token-based authentication for profile {0}.", diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index e6368351de..b3934c8c03 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1265,6 +1265,15 @@ export class Profiles extends ProfilesCache { } else { serviceProfile = this.loadNamedProfile(node.label.toString().trim()); } + const selection = await Gui.warningMessage( + localize( + "handleSwitchAuthentication.confirm", + "Are you sure you want to change the authentication for profile {0}?", + serviceProfile.name + ), + { items: [{ title: "Yes" }], vsCodeOpts: { modal: true } } + ); + if (selection == null) return; const zeInstance = ZoweExplorerApiRegister.getInstance(); try { loginTokenType = await zeInstance.getCommonApi(serviceProfile).getTokenTypeName(); From 36564e95baa8a58b876b64cf2a5c164e6e3ae39d Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Tue, 2 Jul 2024 20:06:29 +0530 Subject: [PATCH 21/32] To use securePropsForProfile() method Signed-off-by: Santhoshi Boyina --- packages/zowe-explorer/src/Profiles.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index b3934c8c03..8a0455d9ef 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1241,7 +1241,8 @@ export class Profiles extends ProfilesCache { public async basicAuthClearSecureArray(profileName?: string): Promise { const profAttrs = await this.getProfileFromConfig(profileName); const configApi = (await this.getProfileInfo()).getTeamConfig(); - configApi.set(`${profAttrs.profLoc.jsonLoc}.secure`, ["tokenValue"]); + const secureProps = await this.getSecurePropsForProfile(profileName); + configApi.set(`${secureProps.toString()}`, ["tokenValue"]); configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.user`); configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.password`); await configApi.save(); @@ -1250,7 +1251,8 @@ export class Profiles extends ProfilesCache { public async tokenAuthClearSecureArray(profileName?: string): Promise { const profAttrs = await this.getProfileFromConfig(profileName); const configApi = (await this.getProfileInfo()).getTeamConfig(); - configApi.set(`${profAttrs.profLoc.jsonLoc}.secure`, ["user", "password"]); + const secureProps = await this.getSecurePropsForProfile(profileName); + configApi.set(`${secureProps.toString()}`, ["user", "password"]); configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.tokenType`); configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.tokenValue`); configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.tokenExpiration`); From b6535468d651f717166d9183c1fa7b7efd787c94 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Tue, 9 Jul 2024 23:56:50 +0530 Subject: [PATCH 22/32] update access of Json location of profiles Signed-off-by: Santhoshi Boyina --- packages/zowe-explorer/src/Profiles.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index 8a0455d9ef..17c9f31666 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1240,22 +1240,24 @@ export class Profiles extends ProfilesCache { public async basicAuthClearSecureArray(profileName?: string): Promise { const profAttrs = await this.getProfileFromConfig(profileName); - const configApi = (await this.getProfileInfo()).getTeamConfig(); + const profInfo = await this.getProfileInfo(); + const configApi = profInfo.getTeamConfig(); const secureProps = await this.getSecurePropsForProfile(profileName); configApi.set(`${secureProps.toString()}`, ["tokenValue"]); - configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.user`); - configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.password`); + configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "user")?.argLoc.jsonLoc}`); + configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "password")?.argLoc.jsonLoc}`); await configApi.save(); } public async tokenAuthClearSecureArray(profileName?: string): Promise { const profAttrs = await this.getProfileFromConfig(profileName); - const configApi = (await this.getProfileInfo()).getTeamConfig(); + const profInfo = await this.getProfileInfo(); + const configApi = profInfo.getTeamConfig(); const secureProps = await this.getSecurePropsForProfile(profileName); configApi.set(`${secureProps.toString()}`, ["user", "password"]); - configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.tokenType`); - configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.tokenValue`); - configApi.delete(`${profAttrs.profLoc.jsonLoc}.properties.tokenExpiration`); + configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenType")?.argLoc.jsonLoc}`); + configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenValue")?.argLoc.jsonLoc}`); + configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenExpiration")?.argLoc.jsonLoc}`); await configApi.save(); } From 24d8b6330e975899028063acd349aa86c14eb89b Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Wed, 10 Jul 2024 15:38:00 +0530 Subject: [PATCH 23/32] to add quickpick for authentication switch confirmation Signed-off-by: Santhoshi Boyina --- .../i18n/sample/src/Profiles.i18n.json | 6 ++- packages/zowe-explorer/src/Profiles.ts | 40 ++++++++++++++----- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json b/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json index 1ffc69a7d7..4a9e9a46fa 100644 --- a/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json @@ -31,7 +31,11 @@ "ssoLogin.tokenType.error": "Error getting supported tokenType value for profile {0}", "ssoLogin.successful": "Login to authentication service was successful.", "ssoLogin.error": "Unable to log in with {0}. {1}", - "handleSwitchAuthentication.confirm": "Are you sure you want to change the authentication for profile {0}?", + "Profiles.getSwitchAuthenticationQpItems.yesLbl": "Yes", + "ProfileManagement.getSwitchAuthenticationQpItems.yesDesc": "To change the authentication", + "Profiles.getSwitchAuthenticationQpItems.noLbl": "No", + "Profiles.getSwitchAuthenticationQpItems.noDesc": "To continue in current authentication", + "Profiles.switchAuthenticationQuickPick.qpConfirmation": "Do you wish to change the Authentication", "handleSwitchAuthentication.getTokenTypeName.error": "Cannot switch to Token-based Authentication for profile {0}.", "handleSwitchAuthentication.switchFromBasicToTokenAuth.successful": "Login using token-based authentication service was successful for profile {0}.", "handleSwitchAuthentication.switchFromBasicToTokenAuth.error": "Unable to switch to Token-based authentication for profile {0}.", diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index 17c9f31666..c95c71c4d3 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1238,6 +1238,30 @@ export class Profiles extends ProfilesCache { } } + public getSwitchAuthenticationQpItems(): vscode.QuickPickItem[] { + const qpItemYes: vscode.QuickPickItem = { + label: localize("Profiles.getSwitchAuthenticationQpItems.yesLbl", "Yes"), + description: localize("ProfileManagement.getSwitchAuthenticationQpItems.yesDesc", "To change the authentication"), + }; + const qpItemNo: vscode.QuickPickItem = { + label: localize("Profiles.getSwitchAuthenticationQpItems.noLbl", "No"), + description: localize("Profiles.getSwitchAuthenticationQpItems.noDesc", "To continue in current authentication"), + }; + return [qpItemYes, qpItemNo]; + } + + public async switchAuthenticationQuickPick(): Promise { + const qp = Gui.createQuickPick(); + const [qpItemYes, qpItemNo] = this.getSwitchAuthenticationQpItems(); + qp.items = [qpItemYes, qpItemNo]; + qp.placeholder = localize("Profiles.switchAuthenticationQuickPick.qpConfirmation", "Do you wish to change the Authentication"); + qp.activeItems = [qpItemYes]; + qp.show(); + const selection = await Gui.resolveQuickPick(qp); + qp.hide(); + return selection; + } + public async basicAuthClearSecureArray(profileName?: string): Promise { const profAttrs = await this.getProfileFromConfig(profileName); const profInfo = await this.getProfileInfo(); @@ -1262,6 +1286,13 @@ export class Profiles extends ProfilesCache { } public async handleSwitchAuthentication(node?: IZoweNodeType): Promise { + const qpSelection = await this.switchAuthenticationQuickPick(); + if (qpSelection === undefined) { + Gui.infoMessage(localize("profiles.operation.cancelled", "Operation Cancelled")); + return; + } + if (qpSelection.label === localize("Profiles.getSwitchAuthenticationQpItems.noLbl", "No")) return; + let loginTokenType: string; let serviceProfile: zowe.imperative.IProfileLoaded; if (node) { @@ -1269,15 +1300,6 @@ export class Profiles extends ProfilesCache { } else { serviceProfile = this.loadNamedProfile(node.label.toString().trim()); } - const selection = await Gui.warningMessage( - localize( - "handleSwitchAuthentication.confirm", - "Are you sure you want to change the authentication for profile {0}?", - serviceProfile.name - ), - { items: [{ title: "Yes" }], vsCodeOpts: { modal: true } } - ); - if (selection == null) return; const zeInstance = ZoweExplorerApiRegister.getInstance(); try { loginTokenType = await zeInstance.getCommonApi(serviceProfile).getTokenTypeName(); From b6d381e41b422fd8017dd5a2db6876290ec35b76 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Wed, 10 Jul 2024 18:26:53 +0530 Subject: [PATCH 24/32] Fix clearing basic auth Signed-off-by: Santhoshi Boyina --- packages/zowe-explorer/src/Profiles.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index c95c71c4d3..0a24c336fd 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1262,12 +1262,16 @@ export class Profiles extends ProfilesCache { return selection; } - public async basicAuthClearSecureArray(profileName?: string): Promise { - const profAttrs = await this.getProfileFromConfig(profileName); + public async basicAuthClearSecureArray(profileName?: string, loginTokenType?: string): Promise { const profInfo = await this.getProfileInfo(); const configApi = profInfo.getTeamConfig(); + const profAttrs = await this.getProfileFromConfig(profileName); const secureProps = await this.getSecurePropsForProfile(profileName); - configApi.set(`${secureProps.toString()}`, ["tokenValue"]); + if (loginTokenType && loginTokenType.startsWith("apimlAuthenticationToken")) { + configApi.set(`${secureProps.toString()}`, []); + } else { + configApi.set(`${secureProps.toString()}`, ["tokenValue"]); + } configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "user")?.argLoc.jsonLoc}`); configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "password")?.argLoc.jsonLoc}`); await configApi.save(); @@ -1331,7 +1335,7 @@ export class Profiles extends ProfilesCache { serviceProfile.name ) ); - await this.basicAuthClearSecureArray(serviceProfile.name); + await this.basicAuthClearSecureArray(serviceProfile.name, loginTokenType); const updBaseProfile: zowe.imperative.IProfile = { user: undefined, password: undefined, From 8d29f0ee11514920a3905ddfae2de727bbe94b25 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Wed, 10 Jul 2024 18:37:49 +0530 Subject: [PATCH 25/32] fix clearing token authentication Signed-off-by: Santhoshi Boyina --- packages/zowe-explorer/src/Profiles.ts | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index 0a24c336fd..49ce5b825d 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1277,15 +1277,24 @@ export class Profiles extends ProfilesCache { await configApi.save(); } - public async tokenAuthClearSecureArray(profileName?: string): Promise { - const profAttrs = await this.getProfileFromConfig(profileName); + public async tokenAuthClearSecureArray(profileName?: string, loginTokenType?: string): Promise { const profInfo = await this.getProfileInfo(); const configApi = profInfo.getTeamConfig(); - const secureProps = await this.getSecurePropsForProfile(profileName); - configApi.set(`${secureProps.toString()}`, ["user", "password"]); - configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenType")?.argLoc.jsonLoc}`); - configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenValue")?.argLoc.jsonLoc}`); - configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenExpiration")?.argLoc.jsonLoc}`); + if (loginTokenType && loginTokenType.startsWith("apimlAuthenticationToken")) { + const profAttrs = await this.getProfileFromConfig("base"); + const secureProps = await this.getSecurePropsForProfile("base"); + configApi.set(`${secureProps.toString()}`, []); + configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenType")?.argLoc.jsonLoc}`); + configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenValue")?.argLoc.jsonLoc}`); + configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenExpiration")?.argLoc.jsonLoc}`); + } else { + const profAttrs = await this.getProfileFromConfig(profileName); + const secureProps = await this.getSecurePropsForProfile(profileName); + configApi.set(`${secureProps.toString()}`, ["user", "password"]); + configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenType")?.argLoc.jsonLoc}`); + configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenValue")?.argLoc.jsonLoc}`); + configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenExpiration")?.argLoc.jsonLoc}`); + } await configApi.save(); } @@ -1368,7 +1377,7 @@ export class Profiles extends ProfilesCache { ); ZoweLogger.info(successMsg); Gui.showMessage(successMsg); - await this.tokenAuthClearSecureArray(serviceProfile.name); + await this.tokenAuthClearSecureArray(serviceProfile.name, loginTokenType); ZoweExplorerApiRegister.getInstance().onProfilesUpdateEmitter.fire(EventTypes.UPDATE); } else { Gui.errorMessage( From 116ad2df06a0ad82e26cb58c2fffb6f22c25c4c6 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Thu, 11 Jul 2024 16:08:00 +0530 Subject: [PATCH 26/32] Fix broken unit test cases Signed-off-by: Santhoshi Boyina --- .../__unit__/Profiles.extended.unit.test.ts | 191 +++++++++++++++++- .../i18n/sample/src/Profiles.i18n.json | 9 +- packages/zowe-explorer/src/Profiles.ts | 41 ++-- 3 files changed, 204 insertions(+), 37 deletions(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts index 5d9ba954da..686093b741 100644 --- a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts @@ -1687,7 +1687,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { ); }); - it("To switch from Basic to Token-based authentication with Base Profile", async () => { + it("To switch from Basic to Token-based authentication using Base Profile", async () => { jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ getTeamConfig: () => ({ @@ -1704,6 +1704,22 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { }, }, ], + mergeArgsForProfile: jest.fn().mockReturnValue({ + knownArgs: [ + { + argName: "user", + dataType: "string", + argValue: "fake", + argLoc: { jsonLoc: "jsonLoc" }, + }, + { + argName: "password", + dataType: "string", + argValue: "fake", + argLoc: { jsonLoc: "jsonLoc" }, + }, + ], + }), } as any); testNode.profile.profile = { type: "zosmf", @@ -1729,6 +1745,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { tokenValue: "12345", secure: ["tokenType"], }; + jest.spyOn(Gui, "resolveQuickPick").mockResolvedValue({ label: "Yes" } as vscode.QuickPickItem); jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ getTokenTypeName: () => "apimlAuthenticationToken", } as never); @@ -1744,7 +1761,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { expect(testNode.profile.profile.password).toBeUndefined(); }); - it("To check login fail's when switching from Basic to Token-based authentication with Base Profile", async () => { + it("To check login fail's when trying to switch from Basic to Token-based authentication using Base Profile", async () => { jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ getTeamConfig: () => ({ @@ -1786,6 +1803,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { tokenValue: undefined, secure: ["user", "password"], }; + jest.spyOn(Gui, "resolveQuickPick").mockResolvedValue({ label: "Yes" } as vscode.QuickPickItem); jest.spyOn(Gui, "errorMessage").mockImplementation(); jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ getTokenTypeName: () => "apimlAuthenticationToken", @@ -1802,7 +1820,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { expect(testNode.profile.profile.tokenValue).toBeUndefined(); }); - it("To switch from Basic to Token-based authentication with Regular Profile", async () => { + it("To switch from Basic to Token-based authentication using Regular Profile", async () => { jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ getTeamConfig: () => ({ @@ -1819,6 +1837,22 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { }, }, ], + mergeArgsForProfile: jest.fn().mockReturnValue({ + knownArgs: [ + { + argName: "user", + dataType: "string", + argValue: "fake", + argLoc: { jsonLoc: "jsonLoc" }, + }, + { + argName: "password", + dataType: "string", + argValue: "fake", + argLoc: { jsonLoc: "jsonLoc" }, + }, + ], + }), } as any); testNode.profile.profile = { type: "zosmf", @@ -1844,6 +1878,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { tokenValue: "12345", secure: ["tokenType"], }; + jest.spyOn(Gui, "resolveQuickPick").mockResolvedValue({ label: "Yes" } as vscode.QuickPickItem); jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ getTokenTypeName: () => "jwtToken", } as never); @@ -1858,7 +1893,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { expect(testNode.profile.profile.password).toBeUndefined(); }); - it("To check login fail's when switching from Basic to Token-based authentication with Regular Profile", async () => { + it("To check login fail's when trying to switch from Basic to Token-based authentication using Regular Profile", async () => { jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ getTeamConfig: () => ({ @@ -1900,6 +1935,8 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { tokenValue: undefined, secure: ["user", "password"], }; + jest.spyOn(Gui, "resolveQuickPick").mockResolvedValue({ label: "Yes" } as vscode.QuickPickItem); + jest.spyOn(Gui, "errorMessage").mockImplementation(); jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ getTokenTypeName: () => "jwtToken", } as never); @@ -1914,7 +1951,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { expect(testNode.profile.profile.tokenValue).toBeUndefined(); }); - it("To switch from Token-based to Basic authentication when cred values are passed", async () => { + it("To switch from Token-based to Basic authentication when cred values are passed involving base profile", async () => { jest.spyOn(utils.ProfilesUtils, "isUsingTokenAuth").mockResolvedValueOnce(true); jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ getTeamConfig: () => ({ @@ -1931,6 +1968,22 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { }, }, ], + mergeArgsForProfile: jest.fn().mockReturnValue({ + knownArgs: [ + { + argName: "user", + dataType: "string", + argValue: "fake", + argLoc: { jsonLoc: "jsonLoc" }, + }, + { + argName: "password", + dataType: "string", + argValue: "fake", + argLoc: { jsonLoc: "jsonLoc" }, + }, + ], + }), } as any); testNode.profile.profile = { type: "zosmf", @@ -1956,6 +2009,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { tokenValue: undefined, secure: ["user", "password"], }; + jest.spyOn(Gui, "resolveQuickPick").mockResolvedValue({ label: "Yes" } as vscode.QuickPickItem); jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ getTokenTypeName: () => "apimlAuthenticationToken", } as never); @@ -1971,7 +2025,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { expect(testNode.profile.profile.tokenValue).toBeUndefined(); }); - it("To switch from Token-based to Basic authentication when cred values are not passed", async () => { + it("To switch from Token-based to Basic authentication when cred values are passed involving regular profile", async () => { jest.spyOn(utils.ProfilesUtils, "isUsingTokenAuth").mockResolvedValueOnce(true); jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ getTeamConfig: () => ({ @@ -1988,6 +2042,22 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { }, }, ], + mergeArgsForProfile: jest.fn().mockReturnValue({ + knownArgs: [ + { + argName: "user", + dataType: "string", + argValue: "fake", + argLoc: { jsonLoc: "jsonLoc" }, + }, + { + argName: "password", + dataType: "string", + argValue: "fake", + argLoc: { jsonLoc: "jsonLoc" }, + }, + ], + }), } as any); testNode.profile.profile = { type: "zosmf", @@ -2002,6 +2072,52 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { secure: ["tokenType"], }; modifiedTestNode.profile.profile = { + type: "zosmf", + host: "test", + port: 1443, + name: "base", + rejectUnauthorized: false, + user: "testUser", + password: "6789", + tokenType: undefined, + tokenValue: undefined, + secure: ["user", "password"], + }; + jest.spyOn(Gui, "resolveQuickPick").mockResolvedValue({ label: "Yes" } as vscode.QuickPickItem); + jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ + getTokenTypeName: () => "jwtToken", + } as never); + jest.spyOn(Profiles.getInstance(), "promptCredentials").mockResolvedValue(["testUser", "6789"]); + await Profiles.getInstance().handleSwitchAuthentication(testNode); + expect(Gui.showMessage).toBeCalled(); + expect(Gui.showMessage).toBeCalled(); + expect(testNode.profile.profile.tokenType).toBe(modifiedTestNode.profile.profile.tokenType); + expect(testNode.profile.profile.tokenValue).toBe(modifiedTestNode.profile.profile.tokenValue); + expect(testNode.profile.profile.secure.length).toBe(modifiedTestNode.profile.profile.secure.length); + expect(testNode.profile.profile.secure).toEqual(modifiedTestNode.profile.profile.secure); + expect(testNode.profile.profile.tokenType).toBeUndefined(); + expect(testNode.profile.profile.tokenValue).toBeUndefined(); + }); + + it("To not switch from Token-based to Basic authentication when cred values are not passed", async () => { + jest.spyOn(utils.ProfilesUtils, "isUsingTokenAuth").mockResolvedValueOnce(true); + jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockResolvedValue({ + getTeamConfig: () => ({ + properties: jest.fn(), + set: jest.fn(), + delete: jest.fn(), + save: jest.fn(), + }), + getAllProfiles: () => [ + { + profName: "sestest", + profLoc: { + osLoc: ["test"], + }, + }, + ], + } as any); + testNode.profile.profile = { type: "zosmf", host: "test", port: 1443, @@ -2013,6 +2129,19 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { tokenValue: "12345", secure: ["tokenType"], }; + modifiedTestNode.profile.profile = { + type: "zosmf", + host: "test", + port: 1443, + name: "base", + rejectUnauthorized: false, + user: undefined, + password: undefined, + tokenType: "testTokenType", + tokenValue: "12345", + secure: ["tokenType"], + }; + jest.spyOn(Gui, "resolveQuickPick").mockResolvedValue({ label: "Yes" } as vscode.QuickPickItem); jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ getTokenTypeName: () => "apimlAuthenticationToken", } as never); @@ -2028,8 +2157,10 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { expect(testNode.profile.profile.password).toBeUndefined(); }); - it("To check authentication switch for a profile which does not support token-based authentication", async () => { + it("To not perform switching the authentication for a profile which does not support token-based authentication", async () => { jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(true); + jest.spyOn(Gui, "errorMessage").mockImplementation(); + jest.spyOn(Gui, "resolveQuickPick").mockResolvedValue({ label: "Yes" } as vscode.QuickPickItem); jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ getTokenTypeName: () => { throw new Error("test error."); @@ -2039,7 +2170,9 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { expect(Gui.errorMessage).toBeCalled(); }); - it("When authentication method is unknown", async () => { + it("To not perform switching the authentication when authentication method is unknown", async () => { + jest.spyOn(Gui, "resolveQuickPick").mockResolvedValue({ label: "Yes" } as vscode.QuickPickItem); + jest.spyOn(Gui, "errorMessage").mockImplementation(); jest.spyOn(utils.ProfilesUtils, "isProfileUsingBasicAuth").mockReturnValueOnce(false); jest.spyOn(utils.ProfilesUtils, "isUsingTokenAuth").mockResolvedValueOnce(false); jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ @@ -2048,6 +2181,48 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { await Profiles.getInstance().handleSwitchAuthentication(testNode); expect(Gui.errorMessage).toBeCalled(); }); + + it("To not perform switching the authentication when user wants to cancel the authentication switch", async () => { + testNode.profile.profile = { + type: "zosmf", + host: "test", + port: 1443, + name: "base", + rejectUnauthorized: false, + user: undefined, + password: undefined, + tokenType: "testTokenType", + tokenValue: "12345", + secure: ["tokenType"], + }; + modifiedTestNode.profile.profile = { + type: "zosmf", + host: "test", + port: 1443, + name: "base", + rejectUnauthorized: false, + user: undefined, + password: undefined, + tokenType: "testTokenType", + tokenValue: "12345", + secure: ["tokenType"], + }; + jest.spyOn(Gui, "resolveQuickPick").mockResolvedValue({ label: "No" } as vscode.QuickPickItem); + await Profiles.getInstance().handleSwitchAuthentication(testNode); + expect(testNode.profile.profile.tokenType).toBe(modifiedTestNode.profile.profile.tokenType); + expect(testNode.profile.profile.tokenValue).toBe(modifiedTestNode.profile.profile.tokenValue); + expect(testNode.profile.profile.secure.length).toBe(modifiedTestNode.profile.profile.secure.length); + expect(testNode.profile.profile.secure).toEqual(modifiedTestNode.profile.profile.secure); + expect(testNode.profile.profile.user).toBeUndefined(); + expect(testNode.profile.profile.password).toBeUndefined(); + }); + + it("To not perform switching the authentication when user wants escapes the quick pick of authentication switch", async () => { + jest.spyOn(Gui, "resolveQuickPick").mockResolvedValue(undefined); + jest.spyOn(Gui, "infoMessage").mockImplementation(); + await Profiles.getInstance().handleSwitchAuthentication(testNode); + expect(Gui.infoMessage).toBeCalled(); + }); }); describe("Profiles Unit Tests - function ssoLogout", () => { diff --git a/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json b/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json index 4a9e9a46fa..b48b0f2a1b 100644 --- a/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json @@ -31,11 +31,12 @@ "ssoLogin.tokenType.error": "Error getting supported tokenType value for profile {0}", "ssoLogin.successful": "Login to authentication service was successful.", "ssoLogin.error": "Unable to log in with {0}. {1}", - "Profiles.getSwitchAuthenticationQpItems.yesLbl": "Yes", - "ProfileManagement.getSwitchAuthenticationQpItems.yesDesc": "To change the authentication", - "Profiles.getSwitchAuthenticationQpItems.noLbl": "No", - "Profiles.getSwitchAuthenticationQpItems.noDesc": "To continue in current authentication", + "Profiles.switchAuthenticationQuickPick.yesLbl": "Yes", + "ProfileManagement.switchAuthenticationQuickPick.yesDesc": "To change the authentication", + "Profiles.switchAuthenticationQuickPick.noLbl": "No", + "Profiles.switchAuthenticationQuickPick.noDesc": "To continue in current authentication", "Profiles.switchAuthenticationQuickPick.qpConfirmation": "Do you wish to change the Authentication", + "Profiles.getSwitchAuthenticationQpItems.noLbl": "No", "handleSwitchAuthentication.getTokenTypeName.error": "Cannot switch to Token-based Authentication for profile {0}.", "handleSwitchAuthentication.switchFromBasicToTokenAuth.successful": "Login using token-based authentication service was successful for profile {0}.", "handleSwitchAuthentication.switchFromBasicToTokenAuth.error": "Unable to switch to Token-based authentication for profile {0}.", diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index 49ce5b825d..e3cd460305 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1238,30 +1238,6 @@ export class Profiles extends ProfilesCache { } } - public getSwitchAuthenticationQpItems(): vscode.QuickPickItem[] { - const qpItemYes: vscode.QuickPickItem = { - label: localize("Profiles.getSwitchAuthenticationQpItems.yesLbl", "Yes"), - description: localize("ProfileManagement.getSwitchAuthenticationQpItems.yesDesc", "To change the authentication"), - }; - const qpItemNo: vscode.QuickPickItem = { - label: localize("Profiles.getSwitchAuthenticationQpItems.noLbl", "No"), - description: localize("Profiles.getSwitchAuthenticationQpItems.noDesc", "To continue in current authentication"), - }; - return [qpItemYes, qpItemNo]; - } - - public async switchAuthenticationQuickPick(): Promise { - const qp = Gui.createQuickPick(); - const [qpItemYes, qpItemNo] = this.getSwitchAuthenticationQpItems(); - qp.items = [qpItemYes, qpItemNo]; - qp.placeholder = localize("Profiles.switchAuthenticationQuickPick.qpConfirmation", "Do you wish to change the Authentication"); - qp.activeItems = [qpItemYes]; - qp.show(); - const selection = await Gui.resolveQuickPick(qp); - qp.hide(); - return selection; - } - public async basicAuthClearSecureArray(profileName?: string, loginTokenType?: string): Promise { const profInfo = await this.getProfileInfo(); const configApi = profInfo.getTeamConfig(); @@ -1299,7 +1275,22 @@ export class Profiles extends ProfilesCache { } public async handleSwitchAuthentication(node?: IZoweNodeType): Promise { - const qpSelection = await this.switchAuthenticationQuickPick(); + const qp = Gui.createQuickPick(); + const qpItemYes: vscode.QuickPickItem = { + label: localize("Profiles.switchAuthenticationQuickPick.yesLbl", "Yes"), + description: localize("ProfileManagement.switchAuthenticationQuickPick.yesDesc", "To change the authentication"), + }; + const qpItemNo: vscode.QuickPickItem = { + label: localize("Profiles.switchAuthenticationQuickPick.noLbl", "No"), + description: localize("Profiles.switchAuthenticationQuickPick.noDesc", "To continue in current authentication"), + }; + qp.items = [qpItemYes, qpItemNo]; + qp.placeholder = localize("Profiles.switchAuthenticationQuickPick.qpConfirmation", "Do you wish to change the Authentication"); + qp.activeItems = [qpItemYes]; + qp.show(); + const qpSelection = await Gui.resolveQuickPick(qp); + qp.hide(); + if (qpSelection === undefined) { Gui.infoMessage(localize("profiles.operation.cancelled", "Operation Cancelled")); return; From 4d078fc68b0186316eb889a03b3392402b45c16c Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Fri, 12 Jul 2024 16:35:53 +0530 Subject: [PATCH 27/32] To fix values getting added after Profile object Signed-off-by: Santhoshi Boyina --- packages/zowe-explorer/src/Profiles.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index e3cd460305..5d2ab4566c 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1242,11 +1242,10 @@ export class Profiles extends ProfilesCache { const profInfo = await this.getProfileInfo(); const configApi = profInfo.getTeamConfig(); const profAttrs = await this.getProfileFromConfig(profileName); - const secureProps = await this.getSecurePropsForProfile(profileName); if (loginTokenType && loginTokenType.startsWith("apimlAuthenticationToken")) { - configApi.set(`${secureProps.toString()}`, []); + configApi.set(`${profAttrs.profLoc.jsonLoc}.secure`, []); } else { - configApi.set(`${secureProps.toString()}`, ["tokenValue"]); + configApi.set(`${profAttrs.profLoc.jsonLoc}.secure`, ["tokenValue"]); } configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "user")?.argLoc.jsonLoc}`); configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "password")?.argLoc.jsonLoc}`); @@ -1258,15 +1257,13 @@ export class Profiles extends ProfilesCache { const configApi = profInfo.getTeamConfig(); if (loginTokenType && loginTokenType.startsWith("apimlAuthenticationToken")) { const profAttrs = await this.getProfileFromConfig("base"); - const secureProps = await this.getSecurePropsForProfile("base"); - configApi.set(`${secureProps.toString()}`, []); + configApi.set(`${profAttrs.profLoc.jsonLoc}.secure`, []); configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenType")?.argLoc.jsonLoc}`); configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenValue")?.argLoc.jsonLoc}`); configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenExpiration")?.argLoc.jsonLoc}`); } else { const profAttrs = await this.getProfileFromConfig(profileName); - const secureProps = await this.getSecurePropsForProfile(profileName); - configApi.set(`${secureProps.toString()}`, ["user", "password"]); + configApi.set(`${profAttrs.profLoc.jsonLoc}.secure`, ["user", "password"]); configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenType")?.argLoc.jsonLoc}`); configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenValue")?.argLoc.jsonLoc}`); configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenExpiration")?.argLoc.jsonLoc}`); From e482b2f28ae60dca113cce6df8ccf4daed732c12 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Fri, 12 Jul 2024 18:09:12 +0530 Subject: [PATCH 28/32] fix broken unit test cases Signed-off-by: Santhoshi Boyina --- .../__tests__/__unit__/Profiles.extended.unit.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts index 686093b741..9477a1937a 100644 --- a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts @@ -1965,8 +1965,13 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { profName: "sestest", profLoc: { osLoc: ["test"], + jsonLoc: "jsonLoc", }, }, + { + profName: "base", + profLoc: { locType: 0, osLoc: ["location"], jsonLoc: "jsonLoc" }, + }, ], mergeArgsForProfile: jest.fn().mockReturnValue({ knownArgs: [ From 99b344f71a2e01deef50df8b274d42974f4d162b Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Fri, 12 Jul 2024 18:17:56 +0530 Subject: [PATCH 29/32] update changelog Signed-off-by: Santhoshi Boyina --- 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 537e56f0ab..e5109ab4bc 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 ability to switch between basic authentication and token-based authentication. [#2944](https://github.com/zowe/zowe-explorer-vscode/pull/2944) + ### Bug fixes - To add the ability to open a Favorited Job Search under Favorites [#2630](https://github.com/zowe/zowe-explorer-vscode/pull/2930) @@ -39,7 +41,6 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen - Added a confirmation dialog when the encoding is changed for an unsaved data set or USS file. [#2911](https://github.com/zowe/zowe-explorer-vscode/pull/2911) - Added a "Copy Relative Path" context option for USS files and directories in the tree view. [#2908](https://github.com/zowe/zowe-explorer-vscode/pull/2908) - Added a "Copy Name" context option for data sets, jobs and spool files in the tree view. [#2908](https://github.com/zowe/zowe-explorer-vscode/pull/2908) -- Added the ability to switch between basic authentication and token-based authentication. [#2867](https://github.com/zowe/zowe-explorer-vscode/pull/2867) ### Bug fixes From c0437acc430039ae6ca8f40f464042be16c9e5bb Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Mon, 15 Jul 2024 22:55:18 +0530 Subject: [PATCH 30/32] To remove unnecessary use of string interpolation Signed-off-by: Santhoshi Boyina --- packages/zowe-explorer/src/Profiles.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index 5d2ab4566c..5509ed3de1 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1247,8 +1247,8 @@ export class Profiles extends ProfilesCache { } else { configApi.set(`${profAttrs.profLoc.jsonLoc}.secure`, ["tokenValue"]); } - configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "user")?.argLoc.jsonLoc}`); - configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "password")?.argLoc.jsonLoc}`); + configApi.delete(profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "user")?.argLoc.jsonLoc); + configApi.delete(profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "password")?.argLoc.jsonLoc); await configApi.save(); } @@ -1258,15 +1258,15 @@ export class Profiles extends ProfilesCache { if (loginTokenType && loginTokenType.startsWith("apimlAuthenticationToken")) { const profAttrs = await this.getProfileFromConfig("base"); configApi.set(`${profAttrs.profLoc.jsonLoc}.secure`, []); - configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenType")?.argLoc.jsonLoc}`); - configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenValue")?.argLoc.jsonLoc}`); - configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenExpiration")?.argLoc.jsonLoc}`); + configApi.delete(profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenType")?.argLoc.jsonLoc); + configApi.delete(profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenValue")?.argLoc.jsonLoc); + configApi.delete(profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenExpiration")?.argLoc.jsonLoc); } else { const profAttrs = await this.getProfileFromConfig(profileName); configApi.set(`${profAttrs.profLoc.jsonLoc}.secure`, ["user", "password"]); - configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenType")?.argLoc.jsonLoc}`); - configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenValue")?.argLoc.jsonLoc}`); - configApi.delete(`${profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenExpiration")?.argLoc.jsonLoc}`); + configApi.delete(profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenType")?.argLoc.jsonLoc); + configApi.delete(profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenValue")?.argLoc.jsonLoc); + configApi.delete(profInfo.mergeArgsForProfile(profAttrs).knownArgs.find((arg) => arg.argName === "tokenExpiration")?.argLoc.jsonLoc); } await configApi.save(); } From 7cb304866c249187535a8ebbaa34e7edaed09741 Mon Sep 17 00:00:00 2001 From: Santhoshi Boyina Date: Mon, 15 Jul 2024 23:08:07 +0530 Subject: [PATCH 31/32] To change loginWithRegualarProfile() method to private Signed-off-by: Santhoshi Boyina --- .../__tests__/__unit__/Profiles.extended.unit.test.ts | 4 ++-- packages/zowe-explorer/src/Profiles.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts index 9477a1937a..a6120b90a8 100644 --- a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts @@ -1882,7 +1882,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ getTokenTypeName: () => "jwtToken", } as never); - jest.spyOn(Profiles.getInstance(), "loginWithRegularProfile").mockResolvedValue(true); + jest.spyOn(Profiles.getInstance() as any, "loginWithRegularProfile").mockResolvedValue(true); await Profiles.getInstance().handleSwitchAuthentication(testNode); expect(Gui.showMessage).toBeCalled(); expect(testNode.profile.profile.tokenType).toBe(modifiedTestNode.profile.profile.tokenType); @@ -1940,7 +1940,7 @@ describe("Profiles Unit Tests - function handleSwitchAuthentication", () => { jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValue({ getTokenTypeName: () => "jwtToken", } as never); - jest.spyOn(Profiles.getInstance(), "loginWithRegularProfile").mockResolvedValue(false); + jest.spyOn(Profiles.getInstance() as any, "loginWithRegularProfile").mockResolvedValue(false); await Profiles.getInstance().handleSwitchAuthentication(testNode); expect(Gui.errorMessage).toBeCalled(); expect(testNode.profile.profile.tokenType).toBe(modifiedTestNode.profile.profile.tokenType); diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index 5509ed3de1..3a0f146971 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1511,7 +1511,7 @@ export class Profiles extends ProfilesCache { .map((arg) => arg.argName); } - public async loginWithRegularProfile(serviceProfile: zowe.imperative.IProfileLoaded, node?: IZoweNodeType): Promise { + private async loginWithRegularProfile(serviceProfile: zowe.imperative.IProfileLoaded, node?: IZoweNodeType): Promise { let session: zowe.imperative.Session; if (node) { session = node.getSession(); From dae489ca56c1fc9238e33812eb7439b57c011e93 Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Tue, 16 Jul 2024 10:57:41 -0400 Subject: [PATCH 32/32] Update Zowe CLI dependency to 7.27.0 Signed-off-by: Timothy Johnson --- package.json | 5 +- packages/zowe-explorer-api/CHANGELOG.md | 2 + packages/zowe-explorer-api/package.json | 2 +- .../webpack.config.js | 10 + packages/zowe-explorer/webpack.config.js | 10 + samples/uss-profile-sample/package.json | 2 +- yarn.lock | 1148 +++++++++++++++-- 7 files changed, 1095 insertions(+), 84 deletions(-) diff --git a/package.json b/package.json index 2158b403e4..019b8eba2e 100644 --- a/package.json +++ b/package.json @@ -16,16 +16,19 @@ "vscode": "^1.53.2" }, "dependencies": { - "@zowe/cli": "7.26.1", + "@zowe/cli": "7.27.0", "vscode-nls": "4.1.2" }, "devDependencies": { + "@babel/core": "^7.24.9", + "@babel/preset-env": "^7.24.8", "@types/jest": "^29.2.3", "@types/mocha": "^10.0.1", "@types/node": "^14.18.12", "@types/vscode": "^1.53.2", "@typescript-eslint/eslint-plugin": "^5.53.0", "@typescript-eslint/parser": "^5.53.0", + "babel-loader": "^8.3.0", "eslint": "^8.34.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-prettier": "^4.2.1", diff --git a/packages/zowe-explorer-api/CHANGELOG.md b/packages/zowe-explorer-api/CHANGELOG.md index 378cdd33df..d51890c1ac 100644 --- a/packages/zowe-explorer-api/CHANGELOG.md +++ b/packages/zowe-explorer-api/CHANGELOG.md @@ -6,6 +6,8 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t ### New features and enhancements +- Updated the `@zowe/cli` dependency to 7.27.0 to support proxy environment variables [#3003](https://github.com/zowe/zowe-explorer-vscode/issues/3003) + ### Bug fixes - Removed `handlebars` dependency in favor of `mustache` for technical currency purposes. [#2974](https://github.com/zowe/zowe-explorer-vscode/pull/2974) diff --git a/packages/zowe-explorer-api/package.json b/packages/zowe-explorer-api/package.json index b346b14631..55c6c5ab4d 100644 --- a/packages/zowe-explorer-api/package.json +++ b/packages/zowe-explorer-api/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "@types/vscode": "^1.53.2", - "@zowe/cli": "7.26.1", + "@zowe/cli": "7.27.0", "@zowe/secrets-for-zowe-sdk": "7.18.6", "mustache": "^4.2.0", "semver": "^7.5.3" diff --git a/packages/zowe-explorer-ftp-extension/webpack.config.js b/packages/zowe-explorer-ftp-extension/webpack.config.js index a30f819c8e..9da34283b0 100644 --- a/packages/zowe-explorer-ftp-extension/webpack.config.js +++ b/packages/zowe-explorer-ftp-extension/webpack.config.js @@ -82,6 +82,16 @@ const config = { }, ], }, + { + test: /\.js$/, + include: /agent-base|https?-proxy-agent/, + use: { + loader: "babel-loader", + options: { + presets: ["@babel/preset-env"], + }, + }, + }, { test: /\.mjs$/, include: /markdown-it/, diff --git a/packages/zowe-explorer/webpack.config.js b/packages/zowe-explorer/webpack.config.js index 5c2b67b47b..057a55696c 100644 --- a/packages/zowe-explorer/webpack.config.js +++ b/packages/zowe-explorer/webpack.config.js @@ -84,6 +84,16 @@ const config = { }, ], }, + { + test: /\.js$/, + include: /agent-base|https?-proxy-agent/, + use: { + loader: "babel-loader", + options: { + presets: ["@babel/preset-env"], + }, + }, + }, { test: /\.mjs$/, include: /markdown-it/, diff --git a/samples/uss-profile-sample/package.json b/samples/uss-profile-sample/package.json index 44bb520568..716f060bdc 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.26.1", + "@zowe/cli": "7.27.0", "@zowe/zowe-explorer-api": "file:../../packages/zowe-explorer-api", "ssh2-sftp-client": "^9.1.0" }, diff --git a/yarn.lock b/yarn.lock index 5c5ce8f7b7..3451b4e492 100644 --- a/yarn.lock +++ b/yarn.lock @@ -52,6 +52,14 @@ "@babel/highlight" "^7.22.13" chalk "^2.4.2" +"@babel/code-frame@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" + integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== + dependencies: + "@babel/highlight" "^7.24.7" + picocolors "^1.0.0" + "@babel/compat-data@^7.13.11", "@babel/compat-data@^7.17.0", "@babel/compat-data@^7.17.10": version "7.17.10" resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.10.tgz" @@ -62,6 +70,11 @@ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.1.tgz" integrity sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ== +"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.24.8": + version "7.24.9" + resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.9.tgz#53eee4e68f1c1d0282aa0eb05ddb02d033fc43a0" + integrity sha512-e701mcfApCJqMMueQI0Fb68Amflj83+dvAvHawoBpAz+GDjCIyGHzNwnefjsWJ3xiYAqqiQFoWbspGYBdb2/ng== + "@babel/compat-data@^7.22.9": version "7.22.9" resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz" @@ -130,6 +143,27 @@ json5 "^2.2.3" semver "^6.3.1" +"@babel/core@^7.24.9": + version "7.24.9" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.24.9.tgz#dc07c9d307162c97fa9484ea997ade65841c7c82" + integrity sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.24.9" + "@babel/helper-compilation-targets" "^7.24.8" + "@babel/helper-module-transforms" "^7.24.9" + "@babel/helpers" "^7.24.8" + "@babel/parser" "^7.24.8" + "@babel/template" "^7.24.7" + "@babel/traverse" "^7.24.8" + "@babel/types" "^7.24.9" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/generator@^7.17.10": version "7.17.10" resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.17.10.tgz#c281fa35b0c349bbe9d02916f4ae08fc85ed7189" @@ -158,6 +192,16 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" +"@babel/generator@^7.24.8", "@babel/generator@^7.24.9": + version "7.24.10" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.24.10.tgz#a4ab681ec2a78bbb9ba22a3941195e28a81d8e76" + integrity sha512-o9HBZL1G2129luEUlG1hB4N/nlYNWHnpwlND9eOMclRqqu1YDy2sSYVCFUZwl8I1Gxh+QSRrP2vD7EpUmFVXxg== + dependencies: + "@babel/types" "^7.24.9" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz" @@ -172,6 +216,13 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-annotate-as-pure@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz#5373c7bc8366b12a033b4be1ac13a206c6656aab" + integrity sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-builder-binary-assignment-operator-visitor@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz" @@ -180,6 +231,14 @@ "@babel/helper-explode-assignable-expression" "^7.16.7" "@babel/types" "^7.16.7" +"@babel/helper-builder-binary-assignment-operator-visitor@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.24.7.tgz#37d66feb012024f2422b762b9b2a7cfe27c7fba3" + integrity sha512-xZeCVVdwb4MsDBkkyZ64tReWYrLRHlMN72vP7Bdm3OUOuyFZExhsHUUnuWnm2/XOlAJzR0LfPpB56WXZn0X/lA== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.16.7", "@babel/helper-compilation-targets@^7.17.10": version "7.17.10" resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.10.tgz" @@ -211,6 +270,17 @@ lru-cache "^5.1.1" semver "^6.3.1" +"@babel/helper-compilation-targets@^7.22.6", "@babel/helper-compilation-targets@^7.24.7", "@babel/helper-compilation-targets@^7.24.8": + version "7.24.8" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.8.tgz#b607c3161cd9d1744977d4f97139572fe778c271" + integrity sha512-oU+UoqCHdp+nWVDkpldqIQL/i/bvAv53tRqLG/s+cOXxe66zOYLU7ar/Xs3LdmBihrUMEUhwu6dMZwbNOYDwvw== + dependencies: + "@babel/compat-data" "^7.24.8" + "@babel/helper-validator-option" "^7.24.8" + browserslist "^4.23.1" + lru-cache "^5.1.1" + semver "^6.3.1" + "@babel/helper-create-class-features-plugin@^7.16.10", "@babel/helper-create-class-features-plugin@^7.16.7", "@babel/helper-create-class-features-plugin@^7.17.6": version "7.17.9" resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.9.tgz" @@ -224,6 +294,21 @@ "@babel/helper-replace-supers" "^7.16.7" "@babel/helper-split-export-declaration" "^7.16.7" +"@babel/helper-create-class-features-plugin@^7.24.7": + version "7.24.8" + resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.8.tgz#47f546408d13c200c0867f9d935184eaa0851b09" + integrity sha512-4f6Oqnmyp2PP3olgUMmOwC3akxSm5aBYraQ6YDdKy7NcAMkDECHWG0DEnV6M2UAkERgIBhYt8S27rURPg7SxWA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.7" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-function-name" "^7.24.7" + "@babel/helper-member-expression-to-functions" "^7.24.8" + "@babel/helper-optimise-call-expression" "^7.24.7" + "@babel/helper-replace-supers" "^7.24.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + semver "^6.3.1" + "@babel/helper-create-regexp-features-plugin@^7.16.7", "@babel/helper-create-regexp-features-plugin@^7.17.0": version "7.17.0" resolved "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz" @@ -232,6 +317,15 @@ "@babel/helper-annotate-as-pure" "^7.16.7" regexpu-core "^5.0.1" +"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.24.7.tgz#be4f435a80dc2b053c76eeb4b7d16dd22cfc89da" + integrity sha512-03TCmXy2FtXJEZfbXDTSqq1fRJArk7lX9DOFC/47VthYcxyIOx+eXQmdo6DOQvrbpIix+KfXwvuXdFDZHxt+rA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.7" + regexpu-core "^5.3.1" + semver "^6.3.1" + "@babel/helper-define-polyfill-provider@^0.3.1": version "0.3.1" resolved "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz" @@ -246,6 +340,17 @@ resolve "^1.14.2" semver "^6.1.2" +"@babel/helper-define-polyfill-provider@^0.6.1", "@babel/helper-define-polyfill-provider@^0.6.2": + version "0.6.2" + resolved "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz#18594f789c3594acb24cfdb4a7f7b7d2e8bd912d" + integrity sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ== + dependencies: + "@babel/helper-compilation-targets" "^7.22.6" + "@babel/helper-plugin-utils" "^7.22.5" + debug "^4.1.1" + lodash.debounce "^4.0.8" + resolve "^1.14.2" + "@babel/helper-environment-visitor@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz" @@ -263,6 +368,13 @@ resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== +"@babel/helper-environment-visitor@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz#4b31ba9551d1f90781ba83491dd59cf9b269f7d9" + integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-explode-assignable-expression@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz" @@ -286,6 +398,14 @@ "@babel/template" "^7.22.15" "@babel/types" "^7.23.0" +"@babel/helper-function-name@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz#75f1e1725742f39ac6584ee0b16d94513da38dd2" + integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA== + dependencies: + "@babel/template" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-hoist-variables@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz" @@ -300,6 +420,13 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-hoist-variables@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee" + integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-member-expression-to-functions@^7.16.7", "@babel/helper-member-expression-to-functions@^7.17.7": version "7.17.7" resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz" @@ -307,6 +434,14 @@ dependencies: "@babel/types" "^7.17.0" +"@babel/helper-member-expression-to-functions@^7.24.7", "@babel/helper-member-expression-to-functions@^7.24.8": + version "7.24.8" + resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.8.tgz#6155e079c913357d24a4c20480db7c712a5c3fb6" + integrity sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA== + dependencies: + "@babel/traverse" "^7.24.8" + "@babel/types" "^7.24.8" + "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz" @@ -328,6 +463,14 @@ dependencies: "@babel/types" "^7.22.15" +"@babel/helper-module-imports@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz#f2f980392de5b84c3328fc71d38bd81bbb83042b" + integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-module-transforms@^7.16.7", "@babel/helper-module-transforms@^7.17.7": version "7.17.7" resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz" @@ -367,6 +510,17 @@ "@babel/helper-split-export-declaration" "^7.22.6" "@babel/helper-validator-identifier" "^7.22.20" +"@babel/helper-module-transforms@^7.24.7", "@babel/helper-module-transforms@^7.24.8", "@babel/helper-module-transforms@^7.24.9": + version "7.24.9" + resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.9.tgz#e13d26306b89eea569180868e652e7f514de9d29" + integrity sha512-oYbh+rtFKj/HwBQkFlUzvcybzklmVdVV3UU+mN7n2t/q3yGHbuVdNxyFvSBO1tfvjyArpHNcWMAzsSPdyI46hw== + dependencies: + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-module-imports" "^7.24.7" + "@babel/helper-simple-access" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" + "@babel/helper-optimise-call-expression@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz" @@ -374,11 +528,23 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-optimise-call-expression@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz#8b0a0456c92f6b323d27cfd00d1d664e76692a0f" + integrity sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.16.7" resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz" integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== +"@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.24.7", "@babel/helper-plugin-utils@^7.24.8": + version "7.24.8" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz#94ee67e8ec0e5d44ea7baeb51e571bd26af07878" + integrity sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg== + "@babel/helper-plugin-utils@^7.19.0": version "7.20.2" resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz" @@ -398,6 +564,15 @@ "@babel/helper-wrap-function" "^7.16.8" "@babel/types" "^7.16.8" +"@babel/helper-remap-async-to-generator@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.24.7.tgz#b3f0f203628522713849d49403f1a414468be4c7" + integrity sha512-9pKLcTlZ92hNZMQfGCHImUpDOlAgkkpqalWEeftW5FBya75k8Li2ilerxkM/uBEj01iBZXcCIB/bwvDYgWyibA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.7" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-wrap-function" "^7.24.7" + "@babel/helper-replace-supers@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz" @@ -409,6 +584,15 @@ "@babel/traverse" "^7.16.7" "@babel/types" "^7.16.7" +"@babel/helper-replace-supers@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.24.7.tgz#f933b7eed81a1c0265740edc91491ce51250f765" + integrity sha512-qTAxxBM81VEyoAY0TtLrx1oAEJc09ZK67Q9ljQToqCnA+55eNwCORaxlKyu+rNfX86o8OXRUSNUnrtsAZXM9sg== + dependencies: + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-member-expression-to-functions" "^7.24.7" + "@babel/helper-optimise-call-expression" "^7.24.7" + "@babel/helper-simple-access@^7.17.7": version "7.17.7" resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz" @@ -430,6 +614,14 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-simple-access@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz#bcade8da3aec8ed16b9c4953b74e506b51b5edb3" + integrity sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-skip-transparent-expression-wrappers@^7.16.0": version "7.16.0" resolved "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz" @@ -437,6 +629,14 @@ dependencies: "@babel/types" "^7.16.0" +"@babel/helper-skip-transparent-expression-wrappers@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz#5f8fa83b69ed5c27adc56044f8be2b3ea96669d9" + integrity sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-split-export-declaration@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz" @@ -458,6 +658,13 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-split-export-declaration@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz#83949436890e07fa3d6873c61a96e3bbf692d856" + integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-string-parser@^7.19.4": version "7.19.4" resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz" @@ -468,6 +675,11 @@ resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz" integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== +"@babel/helper-string-parser@^7.24.8": + version "7.24.8" + resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" + integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== + "@babel/helper-validator-identifier@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz" @@ -483,6 +695,11 @@ resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== + "@babel/helper-validator-option@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz" @@ -498,6 +715,11 @@ resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz" integrity sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA== +"@babel/helper-validator-option@^7.24.8": + version "7.24.8" + resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz#3725cdeea8b480e86d34df15304806a06975e33d" + integrity sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q== + "@babel/helper-wrap-function@^7.16.8": version "7.16.8" resolved "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz" @@ -508,6 +730,16 @@ "@babel/traverse" "^7.16.8" "@babel/types" "^7.16.8" +"@babel/helper-wrap-function@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.24.7.tgz#52d893af7e42edca7c6d2c6764549826336aae1f" + integrity sha512-N9JIYk3TD+1vq/wn77YnJOqMtfWhNewNE+DJV4puD2X7Ew9J4JvrzrFDfTfyv5EgEXVy9/Wt8QiOErzEmv5Ifw== + dependencies: + "@babel/helper-function-name" "^7.24.7" + "@babel/template" "^7.24.7" + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helpers@^7.17.9": version "7.17.9" resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.9.tgz" @@ -535,6 +767,14 @@ "@babel/traverse" "^7.23.2" "@babel/types" "^7.23.0" +"@babel/helpers@^7.24.8": + version "7.24.8" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.8.tgz#2820d64d5d6686cca8789dd15b074cd862795873" + integrity sha512-gV2265Nkcz7weJJfvDoAEVzC1e2OTDpkGbEsebse8koXUJUXPsCMi7sRo/+SPMuMZ9MtUPnGwITTnQnU5YjyaQ== + dependencies: + "@babel/template" "^7.24.7" + "@babel/types" "^7.24.8" + "@babel/highlight@^7.10.4", "@babel/highlight@^7.16.7", "@babel/highlight@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz" @@ -553,6 +793,16 @@ chalk "^2.4.2" js-tokens "^4.0.0" +"@babel/highlight@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" + integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== + dependencies: + "@babel/helper-validator-identifier" "^7.24.7" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.10": version "7.17.10" resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.17.10.tgz" @@ -573,6 +823,19 @@ resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== +"@babel/parser@^7.24.7", "@babel/parser@^7.24.8": + version "7.24.8" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.24.8.tgz#58a4dbbcad7eb1d48930524a3fd93d93e9084c6f" + integrity sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w== + +"@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.7.tgz#fd059fd27b184ea2b4c7e646868a9a381bbc3055" + integrity sha512-TiT1ss81W80eQsN+722OaeQMY/G4yTb4G9JrqeiDADs3N8lbPMGldWi9x8tyqCW5NLx1Jh2AvkE6r6QvEltMMQ== + dependencies: + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz" @@ -580,6 +843,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.7.tgz#468096ca44bbcbe8fcc570574e12eb1950e18107" + integrity sha512-unaQgZ/iRu/By6tsjMZzpeBZjChYfLYry6HrEXPoz3KmfF0sVBQ1l8zKMQ4xRGLWVsjuvB8nQfjNP/DcfEOCsg== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.16.7.tgz" @@ -589,6 +859,23 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" "@babel/plugin-proposal-optional-chaining" "^7.16.7" +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.7.tgz#e4eabdd5109acc399b38d7999b2ef66fc2022f89" + integrity sha512-+izXIbke1T33mY4MSNnrqhPXDz01WYhEf3yF5NbnUtkiNnm+XBZJl3kNfoK6NKmYlz/D07+l2GWVK/QfDkNCuQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" + "@babel/plugin-transform-optional-chaining" "^7.24.7" + +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.24.7.tgz#71b21bb0286d5810e63a1538aa901c58e87375ec" + integrity sha512-utA4HuR6F4Vvcr+o4DnjL8fCOlgRFGbeeBEGNg3ZTrLFw6VWG5XmUrvcQ0FjIYMU2ST4XcR2Wsp7t9qOAPnxMg== + dependencies: + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-proposal-async-generator-functions@^7.16.8": version "7.16.8" resolved "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz" @@ -699,6 +986,11 @@ "@babel/helper-create-class-features-plugin" "^7.16.10" "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2": + version "7.21.0-placeholder-for-preset-env.2" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz#7844f9289546efa9febac2de4cfe358a050bd703" + integrity sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w== + "@babel/plugin-proposal-private-property-in-object@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.7.tgz" @@ -759,7 +1051,21 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-syntax-import-meta@^7.8.3": +"@babel/plugin-syntax-import-assertions@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.7.tgz#2a0b406b5871a20a841240586b1300ce2088a778" + integrity sha512-Ec3NRUMoi8gskrkBe3fNmEQfxDvY8bgfQpz6jlk/41kX9eUjvpyqWU7PBP/pLAvMaSQjbMNKJmvX57jP+M6bPg== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-syntax-import-attributes@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.7.tgz#b4f9ea95a79e6912480c4b626739f86a076624ca" + integrity sha512-hbX+lKKeUMGihnK8nvKqmXBInriT3GVjzXKFriV3YC6APGxMbP8RZNFwy91+hocLXq90Mta+HshoB31802bb8A== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-syntax-import-meta@^7.10.4", "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz" integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== @@ -850,6 +1156,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.19.0" +"@babel/plugin-syntax-unicode-sets-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz#d49a3b3e6b52e5be6740022317580234a6a47357" + integrity sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-transform-arrow-functions@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz" @@ -857,6 +1171,23 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-arrow-functions@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.7.tgz#4f6886c11e423bd69f3ce51dbf42424a5f275514" + integrity sha512-Dt9LQs6iEY++gXUwY03DNFat5C2NbO48jj+j/bSAz6b3HgPs39qcPiYt77fDObIcFwj3/C2ICX9YMwGflUoSHQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-async-generator-functions@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.24.7.tgz#7330a5c50e05181ca52351b8fd01642000c96cfd" + integrity sha512-o+iF77e3u7ZS4AoAuJvapz9Fm001PuD2V3Lp6OSE4FYQke+cSewYtnek+THqGRWyQloRCyvWL1OkyfNEl9vr/g== + dependencies: + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-remap-async-to-generator" "^7.24.7" + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-transform-async-to-generator@^7.16.8": version "7.16.8" resolved "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz" @@ -866,6 +1197,15 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/helper-remap-async-to-generator" "^7.16.8" +"@babel/plugin-transform-async-to-generator@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.24.7.tgz#72a3af6c451d575842a7e9b5a02863414355bdcc" + integrity sha512-SQY01PcJfmQ+4Ash7NE+rpbLFbmqA2GPIgqzxfFTL4t1FKRq4zTms/7htKpoCUI9OcFYgzqfmCdH53s6/jn5fA== + dependencies: + "@babel/helper-module-imports" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-remap-async-to-generator" "^7.24.7" + "@babel/plugin-transform-block-scoped-functions@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz" @@ -873,6 +1213,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-block-scoped-functions@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.7.tgz#a4251d98ea0c0f399dafe1a35801eaba455bbf1f" + integrity sha512-yO7RAz6EsVQDaBH18IDJcMB1HnrUn2FJ/Jslc/WtPPWcjhpUJXU/rjbwmluzp7v/ZzWcEhTMXELnnsz8djWDwQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-transform-block-scoping@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz" @@ -880,6 +1227,30 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-block-scoping@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.7.tgz#42063e4deb850c7bd7c55e626bf4e7ab48e6ce02" + integrity sha512-Nd5CvgMbWc+oWzBsuaMcbwjJWAcp5qzrbg69SZdHSP7AMY0AbWFqFO0WTFCA1jxhMCwodRwvRec8k0QUbZk7RQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-class-properties@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.7.tgz#256879467b57b0b68c7ddfc5b76584f398cd6834" + integrity sha512-vKbfawVYayKcSeSR5YYzzyXvsDFWU2mD8U5TFeXtbCPLFUqe7GyCgvO6XDHzje862ODrOwy6WCPmKeWHbCFJ4w== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-class-static-block@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.7.tgz#c82027ebb7010bc33c116d4b5044fbbf8c05484d" + integrity sha512-HMXK3WbBPpZQufbMG4B46A90PkuuhN9vBCb5T8+VAHqvAqvcLi+2cKoukcpmUYkszLhScU3l1iudhrks3DggRQ== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-transform-classes@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz" @@ -894,6 +1265,20 @@ "@babel/helper-split-export-declaration" "^7.16.7" globals "^11.1.0" +"@babel/plugin-transform-classes@^7.24.8": + version "7.24.8" + resolved "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.8.tgz#ad23301fe5bc153ca4cf7fb572a9bc8b0b711cf7" + integrity sha512-VXy91c47uujj758ud9wx+OMgheXm4qJfyhj1P18YvlrQkNOSrwsteHk+EFS3OMGfhMhpZa0A+81eE7G4QC+3CA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.7" + "@babel/helper-compilation-targets" "^7.24.8" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-function-name" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/helper-replace-supers" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + globals "^11.1.0" + "@babel/plugin-transform-computed-properties@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz" @@ -901,6 +1286,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-computed-properties@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.7.tgz#4cab3214e80bc71fae3853238d13d097b004c707" + integrity sha512-25cS7v+707Gu6Ds2oY6tCkUwsJ9YIDbggd9+cu9jzzDgiNq7hR/8dkzxWfKWnTic26vsI3EsCXNd4iEB6e8esQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/template" "^7.24.7" + "@babel/plugin-transform-destructuring@^7.17.7": version "7.17.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.7.tgz" @@ -908,6 +1301,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-destructuring@^7.24.8": + version "7.24.8" + resolved "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.8.tgz#c828e814dbe42a2718a838c2a2e16a408e055550" + integrity sha512-36e87mfY8TnRxc7yc6M9g9gOB7rKgSahqkIKwLpz4Ppk2+zC2Cy1is0uwtuSG6AE4zlTOUa+7JGz9jCJGLqQFQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/plugin-transform-dotall-regex@^7.16.7", "@babel/plugin-transform-dotall-regex@^7.4.4": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz" @@ -916,6 +1316,14 @@ "@babel/helper-create-regexp-features-plugin" "^7.16.7" "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-dotall-regex@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.7.tgz#5f8bf8a680f2116a7207e16288a5f974ad47a7a0" + integrity sha512-ZOA3W+1RRTSWvyqcMJDLqbchh7U4NRGqwRfFSVbOLS/ePIP4vHB5e8T8eXcuqyN1QkgKyj5wuW0lcS85v4CrSw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-transform-duplicate-keys@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz" @@ -923,6 +1331,21 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-duplicate-keys@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.7.tgz#dd20102897c9a2324e5adfffb67ff3610359a8ee" + integrity sha512-JdYfXyCRihAe46jUIliuL2/s0x0wObgwwiGxw/UbgJBr20gQBThrokO4nYKgWkD7uBaqM7+9x5TU7NkExZJyzw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-dynamic-import@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.7.tgz#4d8b95e3bae2b037673091aa09cd33fecd6419f4" + integrity sha512-sc3X26PhZQDb3JhORmakcbvkeInvxz+A8oda99lj7J60QRuPZvNAk9wQlTBS1ZynelDrDmTU4pw1tyc5d5ZMUg== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-transform-exponentiation-operator@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz" @@ -931,6 +1354,22 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.16.7" "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-exponentiation-operator@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.7.tgz#b629ee22645f412024297d5245bce425c31f9b0d" + integrity sha512-Rqe/vSc9OYgDajNIK35u7ot+KeCoetqQYFXM4Epf7M7ez3lWlOjrDjrwMei6caCVhfdw+mIKD4cgdGNy5JQotQ== + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-export-namespace-from@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.7.tgz#176d52d8d8ed516aeae7013ee9556d540c53f197" + integrity sha512-v0K9uNYsPL3oXZ/7F9NNIbAj2jv1whUEtyA6aujhekLs56R++JDQuzRcP2/z4WX5Vg/c5lE9uWZA0/iUoFhLTA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + "@babel/plugin-transform-for-of@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz" @@ -938,6 +1377,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-for-of@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.7.tgz#f25b33f72df1d8be76399e1b8f3f9d366eb5bc70" + integrity sha512-wo9ogrDG1ITTTBsy46oGiN1dS9A7MROBTcYsfS8DtsImMkHk9JXJ3EWQM6X2SUw4x80uGPlwj0o00Uoc6nEE3g== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" + "@babel/plugin-transform-function-name@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz" @@ -947,6 +1394,23 @@ "@babel/helper-function-name" "^7.16.7" "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-function-name@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.24.7.tgz#6d8601fbffe665c894440ab4470bc721dd9131d6" + integrity sha512-U9FcnA821YoILngSmYkW6FjyQe2TyZD5pHt4EVIhmcTkrJw/3KqcrRSxuOo5tFZJi7TE19iDyI1u+weTI7bn2w== + dependencies: + "@babel/helper-compilation-targets" "^7.24.7" + "@babel/helper-function-name" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-json-strings@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.7.tgz#f3e9c37c0a373fee86e36880d45b3664cedaf73a" + integrity sha512-2yFnBGDvRuxAaE/f0vfBKvtnvvqU8tGpMHqMNpTN2oWMKIR3NqFkjaAgGwawhqK/pIN2T3XdjGPdaG0vDhOBGw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-transform-literals@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz" @@ -954,6 +1418,21 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-literals@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.7.tgz#36b505c1e655151a9d7607799a9988fc5467d06c" + integrity sha512-vcwCbb4HDH+hWi8Pqenwnjy+UiklO4Kt1vfspcQYFhJdpthSnW8XvWGyDZWKNVrVbVViI/S7K9PDJZiUmP2fYQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-logical-assignment-operators@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.7.tgz#a58fb6eda16c9dc8f9ff1c7b1ba6deb7f4694cb0" + integrity sha512-4D2tpwlQ1odXmTEIFWy9ELJcZHqrStlzK/dAOWYyxX3zT0iXQB6banjgeOJQXzEc4S0E0a5A+hahxPaEFYftsw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-transform-member-expression-literals@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz" @@ -961,6 +1440,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-member-expression-literals@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.7.tgz#3b4454fb0e302e18ba4945ba3246acb1248315df" + integrity sha512-T/hRC1uqrzXMKLQ6UCwMT85S3EvqaBXDGf0FaMf4446Qx9vKwlghvee0+uuZcDUCZU5RuNi4781UQ7R308zzBw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-transform-modules-amd@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz" @@ -970,6 +1456,14 @@ "@babel/helper-plugin-utils" "^7.16.7" babel-plugin-dynamic-import-node "^2.3.3" +"@babel/plugin-transform-modules-amd@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.7.tgz#65090ed493c4a834976a3ca1cde776e6ccff32d7" + integrity sha512-9+pB1qxV3vs/8Hdmz/CulFB8w2tuu6EB94JZFsjdqxQokwGa9Unap7Bo2gGBGIvPmDIVvQrom7r5m/TCDMURhg== + dependencies: + "@babel/helper-module-transforms" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-transform-modules-commonjs@^7.17.9": version "7.17.9" resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.17.9.tgz" @@ -980,6 +1474,15 @@ "@babel/helper-simple-access" "^7.17.7" babel-plugin-dynamic-import-node "^2.3.3" +"@babel/plugin-transform-modules-commonjs@^7.24.8": + version "7.24.8" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.8.tgz#ab6421e564b717cb475d6fff70ae7f103536ea3c" + integrity sha512-WHsk9H8XxRs3JXKWFiqtQebdh9b/pTk4EgueygFzYlTKAg0Ud985mSevdNjdXdFBATSKVJGQXP1tv6aGbssLKA== + dependencies: + "@babel/helper-module-transforms" "^7.24.8" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/helper-simple-access" "^7.24.7" + "@babel/plugin-transform-modules-systemjs@^7.17.8": version "7.17.8" resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.17.8.tgz" @@ -991,6 +1494,16 @@ "@babel/helper-validator-identifier" "^7.16.7" babel-plugin-dynamic-import-node "^2.3.3" +"@babel/plugin-transform-modules-systemjs@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.24.7.tgz#f8012316c5098f6e8dee6ecd58e2bc6f003d0ce7" + integrity sha512-GYQE0tW7YoaN13qFh3O1NCY4MPkUiAH3fiF7UcV/I3ajmDKEdG3l+UOcbAm4zUE3gnvUU+Eni7XrVKo9eO9auw== + dependencies: + "@babel/helper-hoist-variables" "^7.24.7" + "@babel/helper-module-transforms" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" + "@babel/plugin-transform-modules-umd@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz" @@ -999,6 +1512,14 @@ "@babel/helper-module-transforms" "^7.16.7" "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-modules-umd@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.7.tgz#edd9f43ec549099620df7df24e7ba13b5c76efc8" + integrity sha512-3aytQvqJ/h9z4g8AsKPLvD4Zqi2qT+L3j7XoFFu1XBlZWEl2/1kWnhmAbxpLgPrHSY0M6UA02jyTiwUVtiKR6A== + dependencies: + "@babel/helper-module-transforms" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-transform-named-capturing-groups-regex@^7.17.10": version "7.17.10" resolved "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.17.10.tgz" @@ -1006,6 +1527,14 @@ dependencies: "@babel/helper-create-regexp-features-plugin" "^7.17.0" +"@babel/plugin-transform-named-capturing-groups-regex@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.24.7.tgz#9042e9b856bc6b3688c0c2e4060e9e10b1460923" + integrity sha512-/jr7h/EWeJtk1U/uz2jlsCioHkZk1JJZVcc8oQsJ1dUlaJD83f4/6Zeh2aHt9BIFokHIsSeDfhUmju0+1GPd6g== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-transform-new-target@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz" @@ -1013,6 +1542,39 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-new-target@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.7.tgz#31ff54c4e0555cc549d5816e4ab39241dfb6ab00" + integrity sha512-RNKwfRIXg4Ls/8mMTza5oPF5RkOW8Wy/WgMAp1/F1yZ8mMbtwXW+HDoJiOsagWrAhI5f57Vncrmr9XeT4CVapA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-nullish-coalescing-operator@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.7.tgz#1de4534c590af9596f53d67f52a92f12db984120" + integrity sha512-Ts7xQVk1OEocqzm8rHMXHlxvsfZ0cEF2yomUqpKENHWMF4zKk175Y4q8H5knJes6PgYad50uuRmt3UJuhBw8pQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + +"@babel/plugin-transform-numeric-separator@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.7.tgz#bea62b538c80605d8a0fac9b40f48e97efa7de63" + integrity sha512-e6q1TiVUzvH9KRvicuxdBTUj4AdKSRwzIyFFnfnezpCfP2/7Qmbb8qbU2j7GODbl4JMkblitCQjKYUaX/qkkwA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + +"@babel/plugin-transform-object-rest-spread@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.7.tgz#d13a2b93435aeb8a197e115221cab266ba6e55d6" + integrity sha512-4QrHAr0aXQCEFni2q4DqKLD31n2DL+RxcwnNjDFkSG0eNQ/xCavnRkfCUjsyqGC2OviNJvZOF/mQqZBw7i2C5Q== + dependencies: + "@babel/helper-compilation-targets" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.24.7" + "@babel/plugin-transform-object-super@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz" @@ -1021,6 +1583,31 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/helper-replace-supers" "^7.16.7" +"@babel/plugin-transform-object-super@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.7.tgz#66eeaff7830bba945dd8989b632a40c04ed625be" + integrity sha512-A/vVLwN6lBrMFmMDmPPz0jnE6ZGx7Jq7d6sT/Ev4H65RER6pZ+kczlf1DthF5N0qaPHBsI7UXiE8Zy66nmAovg== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-replace-supers" "^7.24.7" + +"@babel/plugin-transform-optional-catch-binding@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.7.tgz#00eabd883d0dd6a60c1c557548785919b6e717b4" + integrity sha512-uLEndKqP5BfBbC/5jTwPxLh9kqPWWgzN/f8w6UwAIirAEqiIVJWWY312X72Eub09g5KF9+Zn7+hT7sDxmhRuKA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + +"@babel/plugin-transform-optional-chaining@^7.24.7", "@babel/plugin-transform-optional-chaining@^7.24.8": + version "7.24.8" + resolved "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.8.tgz#bb02a67b60ff0406085c13d104c99a835cdf365d" + integrity sha512-5cTOLSMs9eypEy8JUVvIKOu6NgvbJMnpG62VpIHrTmROdQ+L5mDAaI40g25k5vXti55JWNX5jCkq3HZxXBQANw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-transform-parameters@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz" @@ -1028,6 +1615,31 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-parameters@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.7.tgz#5881f0ae21018400e320fc7eb817e529d1254b68" + integrity sha512-yGWW5Rr+sQOhK0Ot8hjDJuxU3XLRQGflvT4lhlSY0DFvdb3TwKaY26CJzHtYllU0vT9j58hc37ndFPsqT1SrzA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-private-methods@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.7.tgz#e6318746b2ae70a59d023d5cc1344a2ba7a75f5e" + integrity sha512-COTCOkG2hn4JKGEKBADkA8WNb35TGkkRbI5iT845dB+NyqgO8Hn+ajPbSnIQznneJTa3d30scb6iz/DhH8GsJQ== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-private-property-in-object@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.7.tgz#4eec6bc701288c1fab5f72e6a4bbc9d67faca061" + integrity sha512-9z76mxwnwFxMyxZWEgdgECQglF2Q7cFLm0kMf8pGwt+GSJsY0cONKj/UuO4bOH0w/uAel3ekS4ra5CEAyJRmDA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.7" + "@babel/helper-create-class-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-transform-property-literals@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz" @@ -1035,6 +1647,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-property-literals@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.7.tgz#f0d2ed8380dfbed949c42d4d790266525d63bbdc" + integrity sha512-EMi4MLQSHfd2nrCqQEWxFdha2gBCqU4ZcCng4WBGZ5CJL4bBRW0ptdqqDdeirGZcpALazVVNJqRmsO8/+oNCBA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-transform-react-jsx-development@^7.16.7": version "7.22.5" resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.22.5.tgz" @@ -1060,6 +1679,14 @@ dependencies: regenerator-transform "^0.15.0" +"@babel/plugin-transform-regenerator@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.7.tgz#021562de4534d8b4b1851759fd7af4e05d2c47f8" + integrity sha512-lq3fvXPdimDrlg6LWBoqj+r/DEWgONuwjuOuQCSYgRroXDH/IdM1C0IZf59fL5cHLpjEH/O6opIRBbqv7ELnuA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + regenerator-transform "^0.15.2" + "@babel/plugin-transform-reserved-words@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz" @@ -1067,6 +1694,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-reserved-words@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.7.tgz#80037fe4fbf031fc1125022178ff3938bb3743a4" + integrity sha512-0DUq0pHcPKbjFZCfTss/pGkYMfy3vFWydkUBd9r0GHpIyfs2eCDENvqadMycRS9wZCXR41wucAfJHJmwA0UmoQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-transform-shorthand-properties@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz" @@ -1074,6 +1708,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-shorthand-properties@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.7.tgz#85448c6b996e122fa9e289746140aaa99da64e73" + integrity sha512-KsDsevZMDsigzbA09+vacnLpmPH4aWjcZjXdyFKGzpplxhbeB4wYtury3vglQkg6KM/xEPKt73eCjPPf1PgXBA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-transform-spread@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz" @@ -1082,6 +1723,14 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" +"@babel/plugin-transform-spread@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.7.tgz#e8a38c0fde7882e0fb8f160378f74bd885cc7bb3" + integrity sha512-x96oO0I09dgMDxJaANcRyD4ellXFLLiWhuwDxKZX5g2rWP1bTPkBSwCYv96VDXVT1bD9aPj8tppr5ITIh8hBng== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" + "@babel/plugin-transform-sticky-regex@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz" @@ -1089,6 +1738,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-sticky-regex@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.7.tgz#96ae80d7a7e5251f657b5cf18f1ea6bf926f5feb" + integrity sha512-kHPSIJc9v24zEml5geKg9Mjx5ULpfncj0wRpYtxbvKyTtHCYDkVE3aHQ03FrpEo4gEe2vrJJS1Y9CJTaThA52g== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-transform-template-literals@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz" @@ -1096,6 +1752,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-template-literals@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.7.tgz#a05debb4a9072ae8f985bcf77f3f215434c8f8c8" + integrity sha512-AfDTQmClklHCOLxtGoP7HkeMw56k1/bTQjwsfhL6pppo/M4TOBSq+jjBUBLmV/4oeFg4GWMavIl44ZeCtmmZTw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-transform-typeof-symbol@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz" @@ -1103,6 +1766,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-typeof-symbol@^7.24.8": + version "7.24.8" + resolved "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.8.tgz#383dab37fb073f5bfe6e60c654caac309f92ba1c" + integrity sha512-adNTUpDCVnmAE58VEqKlAA6ZBlNkMnWD0ZcW76lyNFN3MJniyGFZfNwERVk8Ap56MCnXztmDr19T4mPTztcuaw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/plugin-transform-typescript@^7.16.7": version "7.16.8" resolved "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.16.8.tgz" @@ -1119,6 +1789,21 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-unicode-escapes@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.7.tgz#2023a82ced1fb4971630a2e079764502c4148e0e" + integrity sha512-U3ap1gm5+4edc2Q/P+9VrBNhGkfnf+8ZqppY71Bo/pzZmXhhLdqgaUl6cuB07O1+AQJtCLfaOmswiNbSQ9ivhw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-unicode-property-regex@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.7.tgz#9073a4cd13b86ea71c3264659590ac086605bbcd" + integrity sha512-uH2O4OV5M9FZYQrwc7NdVmMxQJOCCzFeYudlZSzUAHRFeOujQefa92E74TQDVskNHCzOXoigEuoyzHDhaEaK5w== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-transform-unicode-regex@^7.16.7": version "7.16.7" resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz" @@ -1127,6 +1812,109 @@ "@babel/helper-create-regexp-features-plugin" "^7.16.7" "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-unicode-regex@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.7.tgz#dfc3d4a51127108099b19817c0963be6a2adf19f" + integrity sha512-hlQ96MBZSAXUq7ltkjtu3FJCCSMx/j629ns3hA3pXnBXjanNP0LHi+JpPeA81zaWgVK1VGH95Xuy7u0RyQ8kMg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-unicode-sets-regex@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.7.tgz#d40705d67523803a576e29c63cef6e516b858ed9" + integrity sha512-2G8aAvF4wy1w/AGZkemprdGMRg5o6zPNhbHVImRz3lss55TYCBd6xStN19rt8XJHq20sqV0JbyWjOWwQRwV/wg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/preset-env@^7.24.8": + version "7.24.8" + resolved "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.24.8.tgz#e0db94d7f17d6f0e2564e8d29190bc8cdacec2d1" + integrity sha512-vObvMZB6hNWuDxhSaEPTKCwcqkAIuDtE+bQGn4XMXne1DSLzFVY8Vmj1bm+mUQXYNN8NmaQEO+r8MMbzPr1jBQ== + dependencies: + "@babel/compat-data" "^7.24.8" + "@babel/helper-compilation-targets" "^7.24.8" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/helper-validator-option" "^7.24.8" + "@babel/plugin-bugfix-firefox-class-in-computed-class-key" "^7.24.7" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.24.7" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.24.7" + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.24.7" + "@babel/plugin-proposal-private-property-in-object" "7.21.0-placeholder-for-preset-env.2" + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-class-properties" "^7.12.13" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + "@babel/plugin-syntax-import-assertions" "^7.24.7" + "@babel/plugin-syntax-import-attributes" "^7.24.7" + "@babel/plugin-syntax-import-meta" "^7.10.4" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.14.5" + "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" + "@babel/plugin-transform-arrow-functions" "^7.24.7" + "@babel/plugin-transform-async-generator-functions" "^7.24.7" + "@babel/plugin-transform-async-to-generator" "^7.24.7" + "@babel/plugin-transform-block-scoped-functions" "^7.24.7" + "@babel/plugin-transform-block-scoping" "^7.24.7" + "@babel/plugin-transform-class-properties" "^7.24.7" + "@babel/plugin-transform-class-static-block" "^7.24.7" + "@babel/plugin-transform-classes" "^7.24.8" + "@babel/plugin-transform-computed-properties" "^7.24.7" + "@babel/plugin-transform-destructuring" "^7.24.8" + "@babel/plugin-transform-dotall-regex" "^7.24.7" + "@babel/plugin-transform-duplicate-keys" "^7.24.7" + "@babel/plugin-transform-dynamic-import" "^7.24.7" + "@babel/plugin-transform-exponentiation-operator" "^7.24.7" + "@babel/plugin-transform-export-namespace-from" "^7.24.7" + "@babel/plugin-transform-for-of" "^7.24.7" + "@babel/plugin-transform-function-name" "^7.24.7" + "@babel/plugin-transform-json-strings" "^7.24.7" + "@babel/plugin-transform-literals" "^7.24.7" + "@babel/plugin-transform-logical-assignment-operators" "^7.24.7" + "@babel/plugin-transform-member-expression-literals" "^7.24.7" + "@babel/plugin-transform-modules-amd" "^7.24.7" + "@babel/plugin-transform-modules-commonjs" "^7.24.8" + "@babel/plugin-transform-modules-systemjs" "^7.24.7" + "@babel/plugin-transform-modules-umd" "^7.24.7" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.24.7" + "@babel/plugin-transform-new-target" "^7.24.7" + "@babel/plugin-transform-nullish-coalescing-operator" "^7.24.7" + "@babel/plugin-transform-numeric-separator" "^7.24.7" + "@babel/plugin-transform-object-rest-spread" "^7.24.7" + "@babel/plugin-transform-object-super" "^7.24.7" + "@babel/plugin-transform-optional-catch-binding" "^7.24.7" + "@babel/plugin-transform-optional-chaining" "^7.24.8" + "@babel/plugin-transform-parameters" "^7.24.7" + "@babel/plugin-transform-private-methods" "^7.24.7" + "@babel/plugin-transform-private-property-in-object" "^7.24.7" + "@babel/plugin-transform-property-literals" "^7.24.7" + "@babel/plugin-transform-regenerator" "^7.24.7" + "@babel/plugin-transform-reserved-words" "^7.24.7" + "@babel/plugin-transform-shorthand-properties" "^7.24.7" + "@babel/plugin-transform-spread" "^7.24.7" + "@babel/plugin-transform-sticky-regex" "^7.24.7" + "@babel/plugin-transform-template-literals" "^7.24.7" + "@babel/plugin-transform-typeof-symbol" "^7.24.8" + "@babel/plugin-transform-unicode-escapes" "^7.24.7" + "@babel/plugin-transform-unicode-property-regex" "^7.24.7" + "@babel/plugin-transform-unicode-regex" "^7.24.7" + "@babel/plugin-transform-unicode-sets-regex" "^7.24.7" + "@babel/preset-modules" "0.1.6-no-external-plugins" + babel-plugin-polyfill-corejs2 "^0.4.10" + babel-plugin-polyfill-corejs3 "^0.10.4" + babel-plugin-polyfill-regenerator "^0.6.1" + core-js-compat "^3.37.1" + semver "^6.3.1" + "@babel/preset-env@^7.8.7": version "7.17.10" resolved "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.17.10.tgz" @@ -1207,6 +1995,15 @@ core-js-compat "^3.22.1" semver "^6.3.0" +"@babel/preset-modules@0.1.6-no-external-plugins": + version "0.1.6-no-external-plugins" + resolved "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz#ccb88a2c49c817236861fee7826080573b8a923a" + integrity sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/types" "^7.4.4" + esutils "^2.0.2" + "@babel/preset-modules@^0.1.5": version "0.1.5" resolved "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz" @@ -1227,6 +2024,11 @@ "@babel/helper-validator-option" "^7.16.7" "@babel/plugin-transform-typescript" "^7.16.7" +"@babel/regjsgen@^0.8.0": + version "0.8.0" + resolved "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" + integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== + "@babel/runtime@^7.8.4": version "7.17.9" resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.9.tgz" @@ -1261,6 +2063,15 @@ "@babel/parser" "^7.22.15" "@babel/types" "^7.22.15" +"@babel/template@^7.24.7": + version "7.24.7" + resolved "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz#02efcee317d0609d2c07117cb70ef8fb17ab7315" + integrity sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.17.10", "@babel/traverse@^7.17.3", "@babel/traverse@^7.17.9", "@babel/traverse@^7.20.1", "@babel/traverse@^7.22.17", "@babel/traverse@^7.23.2", "@babel/traverse@^7.7.2": version "7.23.2" resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" @@ -1277,6 +2088,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.24.7", "@babel/traverse@^7.24.8": + version "7.24.8" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.8.tgz#6c14ed5232b7549df3371d820fbd9abfcd7dfab7" + integrity sha512-t0P1xxAPzEDcEPmjprAQq19NWum4K0EQPjMwZQZbHt+GiZqvjCHjj755Weq1YRPVzBI+3zSfvScfpnuIecVFJQ== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.24.8" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-function-name" "^7.24.7" + "@babel/helper-hoist-variables" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + "@babel/parser" "^7.24.8" + "@babel/types" "^7.24.8" + debug "^4.3.1" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.17.10", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.17.10" resolved "https://registry.npmjs.org/@babel/types/-/types-7.17.10.tgz" @@ -1312,6 +2139,15 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" +"@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.24.9": + version "7.24.9" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.24.9.tgz#228ce953d7b0d16646e755acf204f4cf3d08cc73" + integrity sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ== + dependencies: + "@babel/helper-string-parser" "^7.24.8" + "@babel/helper-validator-identifier" "^7.24.7" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" @@ -1881,6 +2717,15 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + "@jridgewell/resolve-uri@3.1.0": version "3.1.0" resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz" @@ -1896,6 +2741,11 @@ resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + "@jridgewell/sourcemap-codec@1.4.14": version "1.4.14" resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz" @@ -1927,6 +2777,14 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@microsoft/fast-element@^1.12.0", "@microsoft/fast-element@^1.6.2", "@microsoft/fast-element@^1.9.0": version "1.12.0" resolved "https://registry.npmjs.org/@microsoft/fast-element/-/fast-element-1.12.0.tgz" @@ -2367,6 +3225,11 @@ expect "^29.0.0" pretty-format "^29.0.0" +"@types/json-schema@^7.0.5": + version "7.0.15" + resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + "@types/json-schema@^7.0.8": version "7.0.12" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz" @@ -2733,22 +3596,22 @@ resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -"@zowe/cli@7.26.1": - version "7.26.1" - resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.26.1.tgz#c14c817e7d198bbbb477740a8691b91e2235f124" - integrity sha512-GplVBp5cK1MuhVwH4LAcvlnbCAy176uc9waXzeWw5HopDLPXThIb60rNcRTy1UR4akrM2vzoZW9He7FnIRC1rQ== - dependencies: - "@zowe/core-for-zowe-sdk" "7.25.2" - "@zowe/imperative" "5.24.0" - "@zowe/provisioning-for-zowe-sdk" "7.25.2" - "@zowe/zos-console-for-zowe-sdk" "7.25.2" - "@zowe/zos-files-for-zowe-sdk" "7.26.1" - "@zowe/zos-jobs-for-zowe-sdk" "7.26.1" - "@zowe/zos-logs-for-zowe-sdk" "7.25.2" - "@zowe/zos-tso-for-zowe-sdk" "7.25.2" - "@zowe/zos-uss-for-zowe-sdk" "7.24.3" - "@zowe/zos-workflows-for-zowe-sdk" "7.26.1" - "@zowe/zosmf-for-zowe-sdk" "7.25.2" +"@zowe/cli@7.27.0": + version "7.27.0" + resolved "https://registry.npmjs.org/@zowe/cli/-/cli-7.27.0.tgz#28d9a3a567a7077029c11774237f560c400befb0" + integrity sha512-FV96g/owlmllQf2On4gD/hyIQYgHRvPptdN4Cfh7C/+eY72Mc+GgZ5hT/bdWq3mG+jlrMYEV4Y/iilD5LH7KOQ== + dependencies: + "@zowe/core-for-zowe-sdk" "7.27.0" + "@zowe/imperative" "5.25.0" + "@zowe/provisioning-for-zowe-sdk" "7.27.0" + "@zowe/zos-console-for-zowe-sdk" "7.27.0" + "@zowe/zos-files-for-zowe-sdk" "7.27.0" + "@zowe/zos-jobs-for-zowe-sdk" "7.27.0" + "@zowe/zos-logs-for-zowe-sdk" "7.27.0" + "@zowe/zos-tso-for-zowe-sdk" "7.27.0" + "@zowe/zos-uss-for-zowe-sdk" "7.27.0" + "@zowe/zos-workflows-for-zowe-sdk" "7.27.0" + "@zowe/zosmf-for-zowe-sdk" "7.27.0" find-process "1.4.7" get-stream "6.0.1" lodash "4.17.21" @@ -2757,18 +3620,18 @@ optionalDependencies: "@zowe/secrets-for-zowe-sdk" "7.18.6" -"@zowe/core-for-zowe-sdk@7.25.2": - version "7.25.2" - resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.25.2.tgz#b3386f89fc8deb4aa702f68fde6c58dc6088babe" - integrity sha512-mR7X1NVZKkSOHdCkvznPIjBqT1WPjIabG2T0Wdx0fh8rYMZbEv4YF4MtcZQjQnOYXRekk7I2kD0Tpi3yw6BaJA== +"@zowe/core-for-zowe-sdk@7.27.0": + version "7.27.0" + resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-7.27.0.tgz#30edf4f39c7428f498ca06d35ec66ca8e0023572" + integrity sha512-sKPk5o1u9CMiGDvq1q+W1gwMM1w5tVFftlPi78K1+7VSuz9yH9dHkUgitBlNcH3BA3oD1SvUQXt0G/lZDQuOsg== dependencies: comment-json "4.1.1" string-width "4.2.3" -"@zowe/imperative@5.24.0": - version "5.24.0" - resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.24.0.tgz#01c4d69a48693f4ca7038b93ba063bc1ba5877da" - integrity sha512-isoDaxRAO1G/YhOkB3L599wF4QhkFi5HvKGTULWkGw0a6PwHZFiyr/B6MCq188q+zn4XKftNUHjc4QPQnAP+zw== +"@zowe/imperative@5.25.0": + version "5.25.0" + resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-5.25.0.tgz#48263b20b56f5a23014792393d6740964220b112" + integrity sha512-/fUhSbAB58GIJDUWt+yZkcTKCBPQACwlPVEqMn7Vae9SkyWc+daEswAoPdMHBXHLaaicTz8DcLq9xwTnoGmnjQ== dependencies: "@types/yargs" "13.0.4" chalk "2.4.2" @@ -2783,6 +3646,8 @@ fastest-levenshtein "1.0.12" find-up "4.1.0" fs-extra "8.1.0" + http-proxy-agent "7.0.2" + https-proxy-agent "7.0.4" jest-diff "27.0.6" js-yaml "4.1.0" jsonfile "4.0.0" @@ -2807,10 +3672,10 @@ yamljs "0.3.0" yargs "15.3.1" -"@zowe/provisioning-for-zowe-sdk@7.25.2": - version "7.25.2" - resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.25.2.tgz#83a2c2f9dc70287a1c06a7216bddca900f2c60b8" - integrity sha512-IkH0dLhSzV3i71Bq52piFH2tAIFShNTc5mGKmIKCpktJMsl/JirqpoKDEAKxM1bXYewZZ+WxW1VfjdvYrTQpGw== +"@zowe/provisioning-for-zowe-sdk@7.27.0": + version "7.27.0" + resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-7.27.0.tgz#2a82cc345847ae9ad0924e46738a484aaad8c267" + integrity sha512-c6B1G/WYNi+91ZhjA3X8XnGBZtwP6MxnlfnuicG+LD5mSCLqm5Li5lKsaDtabUo4uA6xVARcqi5nlL32TKO1WA== dependencies: js-yaml "4.1.0" @@ -2819,15 +3684,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.25.2": - version "7.25.2" - resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.25.2.tgz#151edeb7189c36c4fc8a6039467e278e585b4d03" - integrity sha512-G+898bxMQGrC9upSIeXhkplQqClyt2QPOp6NnZ3dWi/XkRmxhYeJo+Ck5JCZEH8uprvKOsnIb5K1Ll/JsTraPQ== +"@zowe/zos-console-for-zowe-sdk@7.27.0": + version "7.27.0" + resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-7.27.0.tgz#7437b61172906ed3b52dbb3492d0c6f64fc3827c" + integrity sha512-tyvwkymKMPvF+rHa2fg8RaAwYt3n2TNDXPLeLlDCy3GsU1CDeKpLUDJ4aTbAZHB97JMxb8QH0HL1En8yQObW2Q== -"@zowe/zos-files-for-zowe-sdk@7.26.1": - version "7.26.1" - resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.26.1.tgz#1b4a6d50cad665a0e5b8bb666eb346837be3771f" - integrity sha512-Impd7s6Ux5WMnioJZpjGJkGR7PBDgpLo/EYZ5KnNNx9n+pqFr7QJ6qX3c38bFsYfXItOE6l/qJ8dkQguG4uv7g== +"@zowe/zos-files-for-zowe-sdk@7.27.0": + version "7.27.0" + resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-7.27.0.tgz#56962ee670c8cc6331425aa3534db81bba87a1a3" + integrity sha512-NXxhcUNSRE6uemIvDVwrt8yGGm50eGDtc38kURqmS4eyIPEVNOLWMcX+NeMhh71/+s2hGtgEzMuyPy5mC2mfBw== dependencies: minimatch "5.0.1" @@ -2838,43 +3703,43 @@ dependencies: zos-node-accessor "1.0.16" -"@zowe/zos-jobs-for-zowe-sdk@7.26.1": - version "7.26.1" - resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.26.1.tgz#922db1f8f215033b599cca397902b8cae0c15a81" - integrity sha512-9sJfMLUB4XpNZVRQA4F8pwRdPs76dASVZDi+SPR1P2Lxx/Rex2dmvX20eHwo39nhtGsC4r1LozTr3fOsN6t3LQ== +"@zowe/zos-jobs-for-zowe-sdk@7.27.0": + version "7.27.0" + resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-7.27.0.tgz#2a3ab1fb2485e35d9dc2cd025ed8b171b5544127" + integrity sha512-4NaM3jVHjtMtUWKRjUWRWgH2Aa1X1dwuW6a8GAKofjvj94zKG1g2+1sG14eJZifSQcLEFcox9AqHGeULeTvF1A== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.26.1" + "@zowe/zos-files-for-zowe-sdk" "7.27.0" -"@zowe/zos-logs-for-zowe-sdk@7.25.2": - version "7.25.2" - resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.25.2.tgz#358616d3c0963d977ca6be971528349566720a1a" - integrity sha512-AudPiKcCJW19hQSdQAR9wZgO3htb1HOeyg9pEwzy8CVf0zI74EGIC0bAGcfVcicMbPg5xx9YzjrEfn21CMZBiQ== +"@zowe/zos-logs-for-zowe-sdk@7.27.0": + version "7.27.0" + resolved "https://registry.npmjs.org/@zowe/zos-logs-for-zowe-sdk/-/zos-logs-for-zowe-sdk-7.27.0.tgz#206d5c48f295efd7ac5623b929c79b40ded73125" + integrity sha512-t7zopzAlLDqViD/PSzaxWcdjOiqJEoTu00W+Msk/JIiAv5+G5/0Ne0j5QbIUNlUGmUqi5Z0fapKodeJiJBjI4w== -"@zowe/zos-tso-for-zowe-sdk@7.25.2": - version "7.25.2" - resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.25.2.tgz#6e58e1ef6a958d4dba78a35d3bd032bce01acd5f" - integrity sha512-wnnZrBs8Erpf2NggvUchMx2dQ+1QIsi0UlpkhWZ048DEwjBstLM92N16gWkNXzxDfnFHdOu/3KScQgr279dakw== +"@zowe/zos-tso-for-zowe-sdk@7.27.0": + version "7.27.0" + resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-7.27.0.tgz#db1a8a4b4dfee166638a46a8110890f4e2051634" + integrity sha512-+W8Gt4mp/viX3+t9p25ZQc6F3ytmtSZJ/beXI2ip4jswhfv8cOqBuyp4bLopiM5A3NiV1IOoSbzIyWTWyw5xmw== dependencies: - "@zowe/zosmf-for-zowe-sdk" "7.25.2" + "@zowe/zosmf-for-zowe-sdk" "7.27.0" -"@zowe/zos-uss-for-zowe-sdk@7.24.3": - version "7.24.3" - resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.24.3.tgz#fe74be634c2ef3ecb8fa2d3adb1dff446f7e1927" - integrity sha512-FbXtN0SPh9BXhjoZwDOlD+zE2mC5rOgpGuodxDLkh3U4I2HnvF25aEXn9OXAbjJFNZqF/OOjMM9q8DNAyGqFTA== +"@zowe/zos-uss-for-zowe-sdk@7.27.0": + version "7.27.0" + resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-7.27.0.tgz#986740008c63b0fb021da8eab560205183c49dd9" + integrity sha512-WuTH4yPWYTDI3zest8NDhTIZfwqWNlwKYNlkg6nrtRsQBLssdPsvw5tz3fPE73ll3CvmusQwXNAz8CTZrGE1Xg== dependencies: ssh2 "1.15.0" -"@zowe/zos-workflows-for-zowe-sdk@7.26.1": - version "7.26.1" - resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.26.1.tgz#2a834a197d7796e9268ef945cd60e51205231b7e" - integrity sha512-7NMwttq5N7AWnMg0K5Cw1OuGpcFDvAobIbcclGrJgAYpTjr6qXDcy/sQ0hFnm5L0rW8XED7aJNapDtdXM9lLVQ== +"@zowe/zos-workflows-for-zowe-sdk@7.27.0": + version "7.27.0" + resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-7.27.0.tgz#d97d5ff8ba1a102a1629603f7e6ffb3619412e86" + integrity sha512-cIOSkb38+aIZCwr8AtvDDIHEuTHHzOR4JVVsjlCz0YIo4i8Q/DmIGxOajB76eLUBi7MseC4SSoeJpChzvfMfjA== dependencies: - "@zowe/zos-files-for-zowe-sdk" "7.26.1" + "@zowe/zos-files-for-zowe-sdk" "7.27.0" -"@zowe/zosmf-for-zowe-sdk@7.25.2": - version "7.25.2" - resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.25.2.tgz#077b8b3d4faa245d569fdb19f24ebbd6181a0ab7" - integrity sha512-f0wTHZUD9cLBQfSEYCZzpwZyXhbBYG8AistO4GUGf7Qyiz8I7fY4RtXOjdQ6LpA+uPHdd5FkVBqPmMm/EpMdPA== +"@zowe/zosmf-for-zowe-sdk@7.27.0": + version "7.27.0" + resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.27.0.tgz#6bb35cfe0a8a4abfefc95e2faed4e1bc23f16f04" + integrity sha512-E/oq3+vo5wP0C5MntVgHlKwHNrOYi62NlZx9MNwMnecw/i50fiMs0FP5nXuiycTM0i8bPUp42ciWLrnCkSGTOA== abbrev@1: version "1.1.1" @@ -3336,6 +4201,16 @@ babel-jest@^29.3.1: graceful-fs "^4.2.9" slash "^3.0.0" +babel-loader@^8.3.0: + version "8.3.0" + resolved "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz#124936e841ba4fe8176786d6ff28add1f134d6a8" + integrity sha512-H8SvsMF+m9t15HNLMipppzkC+Y2Yq+v3SonZyU70RBL/h1gxPkH08Ot8pEE9Z4Kd+czyWJClmFS8qzIP9OZ04Q== + dependencies: + find-cache-dir "^3.3.1" + loader-utils "^2.0.0" + make-dir "^3.1.0" + schema-utils "^2.6.5" + babel-plugin-dynamic-import-node@^2.3.3: version "2.3.3" resolved "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz" @@ -3373,6 +4248,23 @@ babel-plugin-polyfill-corejs2@^0.3.0: "@babel/helper-define-polyfill-provider" "^0.3.1" semver "^6.1.1" +babel-plugin-polyfill-corejs2@^0.4.10: + version "0.4.11" + resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz#30320dfe3ffe1a336c15afdcdafd6fd615b25e33" + integrity sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q== + dependencies: + "@babel/compat-data" "^7.22.6" + "@babel/helper-define-polyfill-provider" "^0.6.2" + semver "^6.3.1" + +babel-plugin-polyfill-corejs3@^0.10.4: + version "0.10.4" + resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.4.tgz#789ac82405ad664c20476d0233b485281deb9c77" + integrity sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.6.1" + core-js-compat "^3.36.1" + babel-plugin-polyfill-corejs3@^0.5.0: version "0.5.2" resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz" @@ -3388,6 +4280,13 @@ babel-plugin-polyfill-regenerator@^0.3.0: dependencies: "@babel/helper-define-polyfill-provider" "^0.3.1" +babel-plugin-polyfill-regenerator@^0.6.1: + version "0.6.2" + resolved "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.2.tgz#addc47e240edd1da1058ebda03021f382bba785e" + integrity sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.6.2" + babel-plugin-transform-hook-names@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/babel-plugin-transform-hook-names/-/babel-plugin-transform-hook-names-1.0.2.tgz" @@ -3693,6 +4592,16 @@ browserslist@^4.23.0: node-releases "^2.0.14" update-browserslist-db "^1.0.13" +browserslist@^4.23.1: + version "4.23.2" + resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.23.2.tgz#244fe803641f1c19c28c48c4b6ec9736eb3d32ed" + integrity sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA== + dependencies: + caniuse-lite "^1.0.30001640" + electron-to-chromium "^1.4.820" + node-releases "^2.0.14" + update-browserslist-db "^1.1.0" + bs-logger@0.x: version "0.2.6" resolved "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz" @@ -3897,6 +4806,11 @@ caniuse-lite@^1.0.30001587: resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001615.tgz#7c2c8772db681b6dee74d81d6550db68f2d28842" integrity sha512-1IpazM5G3r38meiae0bHRnPhz+CBQ3ZLqbQMtrg+AsTPKAXgW38JNsXkyZ+v8waCsDmPq87lmfun5Q2AGysNEQ== +caniuse-lite@^1.0.30001640: + version "1.0.30001642" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001642.tgz#6aa6610eb24067c246d30c57f055a9d0a7f8d05f" + integrity sha512-3XQ0DoRgLijXJErLSl+bLnJ+Et4KqV1PY6JJBGAFlsNsz31zeAIncyeZfLCabHK/jtSh+671RM9YMldxjUPZtA== + chai-as-promised@^7.1.1: version "7.1.1" resolved "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz" @@ -4387,6 +5301,13 @@ core-js-compat@^3.21.0, core-js-compat@^3.22.1: dependencies: browserslist "^4.23.0" +core-js-compat@^3.36.1, core-js-compat@^3.37.1: + version "3.37.1" + resolved "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.37.1.tgz#c844310c7852f4bdf49b8d339730b97e17ff09ee" + integrity sha512-9TNiImhKvQqSUkOvk/mMRZzOANTiEVC7WaBNhHcKM7x+/5E1l5NvsysR19zuDQScE8k+kfQXWRN3AtS/eOSHpg== + dependencies: + browserslist "^4.23.0" + core-util-is@^1.0.2, core-util-is@~1.0.0: version "1.0.3" resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz" @@ -4886,6 +5807,11 @@ electron-to-chromium@^1.4.668: resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.754.tgz#20a9f3cc80e0fb6a804b86605e55da16918a58b0" integrity sha512-7Kr5jUdns5rL/M9wFFmMZAgFDuL2YOnanFH4OI4iFzUqyh3XOL7nAGbSlSMZdzKMIyyTpNSbqZsWG9odwLeKvA== +electron-to-chromium@^1.4.820: + version "1.4.828" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.828.tgz#a1ee8cd8847448b2898d3f2d9db02113f9c5b35c" + integrity sha512-QOIJiWpQJDHAVO4P58pwb133Cwee0nbvy/MV1CwzZVGpkH1RX33N3vsaWRCpR6bF63AAq366neZrRTu7Qlsbbw== + elliptic@^6.5.3, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz" @@ -6390,6 +7316,14 @@ http-cache-semantics@^4.1.1: resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== +http-proxy-agent@7.0.2, http-proxy-agent@^7.0.0: + version "7.0.2" + resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" + integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + http-proxy-agent@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz" @@ -6399,19 +7333,19 @@ http-proxy-agent@^4.0.1: agent-base "6" debug "4" -http-proxy-agent@^7.0.0: - version "7.0.2" - resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" - integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== - dependencies: - agent-base "^7.1.0" - debug "^4.3.4" - https-browserify@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= +https-proxy-agent@7.0.4, https-proxy-agent@^7.0.1: + version "7.0.4" + resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz#8e97b841a029ad8ddc8731f26595bad868cb4168" + integrity sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg== + dependencies: + agent-base "^7.0.2" + debug "4" + https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz" @@ -6420,14 +7354,6 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" -https-proxy-agent@^7.0.1: - version "7.0.4" - resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz#8e97b841a029ad8ddc8731f26595bad868cb4168" - integrity sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg== - dependencies: - agent-base "^7.0.2" - debug "4" - human-signals@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" @@ -7968,7 +8894,7 @@ make-dir@^2.0.0: pify "^4.0.1" semver "^5.6.0" -make-dir@^3.0.0, make-dir@^3.0.2: +make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== @@ -9239,6 +10165,11 @@ picocolors@^1.0.0: resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== +picocolors@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" + integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" @@ -9741,6 +10672,13 @@ regenerate-unicode-properties@^10.0.1: dependencies: regenerate "^1.4.2" +regenerate-unicode-properties@^10.1.0: + version "10.1.1" + resolved "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz#6b0e05489d9076b04c436f318d9b067bba459480" + integrity sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q== + dependencies: + regenerate "^1.4.2" + regenerate@^1.4.2: version "1.4.2" resolved "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz" @@ -9758,6 +10696,13 @@ regenerator-transform@^0.15.0: dependencies: "@babel/runtime" "^7.8.4" +regenerator-transform@^0.15.2: + version "0.15.2" + resolved "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz#5bbae58b522098ebdf09bca2f83838929001c7a4" + integrity sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg== + dependencies: + "@babel/runtime" "^7.8.4" + regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz" @@ -9783,6 +10728,18 @@ regexpu-core@^5.0.1: unicode-match-property-ecmascript "^2.0.0" unicode-match-property-value-ecmascript "^2.0.0" +regexpu-core@^5.3.1: + version "5.3.2" + resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz#11a2b06884f3527aec3e93dbbf4a3b958a95546b" + integrity sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ== + dependencies: + "@babel/regjsgen" "^0.8.0" + regenerate "^1.4.2" + regenerate-unicode-properties "^10.1.0" + regjsparser "^0.9.1" + unicode-match-property-ecmascript "^2.0.0" + unicode-match-property-value-ecmascript "^2.1.0" + regjsgen@^0.6.0: version "0.6.0" resolved "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz" @@ -9795,6 +10752,13 @@ regjsparser@^0.8.2: dependencies: jsesc "~0.5.0" +regjsparser@^0.9.1: + version "0.9.1" + resolved "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz#272d05aa10c7c1f67095b1ff0addae8442fc5709" + integrity sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ== + dependencies: + jsesc "~0.5.0" + remove-bom-buffer@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz" @@ -10061,6 +11025,15 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" +schema-utils@^2.6.5: + version "2.7.1" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7" + integrity sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg== + dependencies: + "@types/json-schema" "^7.0.5" + ajv "^6.12.4" + ajv-keywords "^3.5.2" + schema-utils@^3.0.0: version "3.3.0" resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz" @@ -11218,6 +12191,11 @@ unicode-match-property-value-ecmascript@^2.0.0: resolved "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz" integrity sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw== +unicode-match-property-value-ecmascript@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz#cb5fffdcd16a05124f5a4b0bf7c3770208acbbe0" + integrity sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA== + unicode-property-aliases-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz" @@ -11337,6 +12315,14 @@ update-browserslist-db@^1.0.9: escalade "^3.1.1" picocolors "^1.0.0" +update-browserslist-db@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" + integrity sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ== + dependencies: + escalade "^3.1.2" + picocolors "^1.0.1" + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz"