Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Introduce integrated terminal #3079

Open
wants to merge 65 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
0f14050
chore: remove code duplication in preparation to handling integrated …
zFernand0 Aug 27, 2024
73f5814
chore: done consolidating, fixing unit test before continuing :yum:
zFernand0 Aug 28, 2024
ee95d66
tests: fix unit tests and address any missing checks :yum:
zFernand0 Aug 28, 2024
48abeef
tests: fix the rest of the unit tests :yum:
zFernand0 Aug 29, 2024
43d6863
l10n: update strings :yum:
zFernand0 Aug 29, 2024
beba0c4
chore: Add zoweTerminal :yum:
zFernand0 Aug 29, 2024
d3b5975
chore: finalize ZoweTerminal implementation :yum:
zFernand0 Aug 30, 2024
4f7dd21
chore: add actual z/os behavior :yum:
zFernand0 Aug 30, 2024
451c49b
chore: add missing license header
zFernand0 Oct 9, 2024
978ff99
tests: fix unit tests assuming we are not using integrated terminals
zFernand0 Oct 9, 2024
8b2d310
feat: initial addition of zowe commands to edit History webview
zFernand0 Oct 9, 2024
ee12695
fix: done with core terminal issues
zFernand0 Oct 9, 2024
859807c
tests: fix unit tests for now :yum:
zFernand0 Oct 10, 2024
6d49d02
fix remainig unit tests
zFernand0 Oct 21, 2024
65c8e24
Merge branch 'main' of https://github.com/zowe/zowe-explorer-vscode i…
zFernand0 Oct 21, 2024
04927a3
fix: remove circular references
zFernand0 Oct 21, 2024
96a8d25
test: add small unit test :yum:
zFernand0 Oct 21, 2024
257254b
test: add more unit testws to bump patch coverage
zFernand0 Oct 22, 2024
819e742
chore: more unit tests
zFernand0 Oct 22, 2024
3898c54
Merge branch 'main' into feat/int-term
zFernand0 Oct 22, 2024
ef41fcf
fix: edge case when processing double-byte characters
zFernand0 Oct 23, 2024
93b6c30
fix handle unicode characters
zFernand0 Oct 23, 2024
52eb208
fix: error handling for failing responses from the server
zFernand0 Oct 23, 2024
062327f
Merge branch 'main' into feat/int-term
zFernand0 Oct 29, 2024
20c313a
Update packages/zowe-explorer/src/commands/UnixCommandHandler.ts
zFernand0 Oct 29, 2024
7f1375e
test: update test to reflect less operation cancelled notifications :…
zFernand0 Oct 29, 2024
54c2f89
review: updates based on feedback :yum:
zFernand0 Oct 29, 2024
612473d
Merge branch 'main' of https://github.com/zowe/zowe-explorer-vscode i…
zFernand0 Oct 30, 2024
6df816c
review: localize strings in package.json
zFernand0 Oct 30, 2024
b6170fa
Merge branch 'main' into feat/int-term
JillieBeanSim Oct 31, 2024
75d1386
fix: profile selection cached between commands via the palette
zFernand0 Oct 31, 2024
882db9a
fix: iTerm setting not working from the workspace scope :yum:
zFernand0 Oct 31, 2024
1ba492a
Merge branch 'main' of https://github.com/zowe/zowe-explorer-vscode i…
zFernand0 Oct 31, 2024
7833f74
fix: make profile validation consistent amonogst all cmdTypes
zFernand0 Oct 31, 2024
88e064b
review: add validation of SSH porfiles:
zFernand0 Oct 31, 2024
33294c9
chore: multiple fixes (see below)
zFernand0 Nov 1, 2024
986fbaf
feat: separated commands history :yum:
zFernand0 Nov 1, 2024
e181481
fix: Greyout entry text in iTerms
zFernand0 Nov 1, 2024
e618b14
review: fix unit test after adding validation
zFernand0 Nov 2, 2024
75a6d03
chore: update changelog
zFernand0 Nov 2, 2024
7f18310
review: updated sdk and removed ssh2 lazy-loading
zFernand0 Nov 6, 2024
85696d1
chore: update unit tests for new APIs
zFernand0 Nov 6, 2024
931ed3f
chore: update dependencies across the board
zFernand0 Nov 6, 2024
3311857
Merge branch 'main' of https://github.com/zowe/zowe-explorer-vscode i…
zFernand0 Nov 6, 2024
133276e
Merge branch 'main' of https://github.com/zowe/zowe-explorer-vscode i…
zFernand0 Nov 6, 2024
ccc9f48
chore: fix lint issues and update changelogs
zFernand0 Nov 6, 2024
a18f7f6
review: fis unit tests
zFernand0 Nov 6, 2024
230e933
chore: cleanup ssh profile validation logic
zFernand0 Nov 6, 2024
172cfe5
review: update changelog
zFernand0 Nov 12, 2024
f578724
review: add italic to :clear command
zFernand0 Nov 25, 2024
dc3d748
Merge branch 'main' of https://github.com/zowe/zowe-explorer-vscode i…
zFernand0 Nov 25, 2024
50fd881
review: address lint issues
zFernand0 Nov 25, 2024
f5546a6
review: Address delete key, and cancel operations
zFernand0 Dec 10, 2024
5e5242f
review: revert typecript update
zFernand0 Dec 10, 2024
725e369
review: remove redundant logs
zFernand0 Dec 10, 2024
f839d0e
Merge branch 'main' of https://github.com/zowe/zowe-explorer-vscode i…
zFernand0 Dec 10, 2024
09e0ce2
review: fix delete key with moving cursor across emojis and special c…
zFernand0 Dec 10, 2024
b707bdb
Merge branch 'main' of https://github.com/zowe/zowe-explorer-vscode i…
zFernand0 Dec 10, 2024
05a892c
review: fix oversight of moving to charArray
zFernand0 Dec 10, 2024
2716e21
review: handle home and end keys
zFernand0 Dec 10, 2024
a9247fc
review: address home and end key
zFernand0 Dec 10, 2024
d58c416
review: display non printable characters
zFernand0 Dec 10, 2024
f4d60dd
Merge branch 'main' into feat/int-term
zFernand0 Dec 17, 2024
4d498c4
review: fix modifier keys and add intuitive control+C exit
zFernand0 Dec 18, 2024
c998f8d
review: bump test coverage of the zowe terminal
zFernand0 Dec 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/zowe-explorer-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t
### New features and enhancements

- Update Zowe SDKs to `8.8.4` to get the latest enhancements from Imperative and the z/OS Files SDK. [#3306](https://github.com/zowe/zowe-explorer-vscode/pull/3306)
- Added individual user settings for MVS, TSO, and Unix commands. [#3079](https://github.com/zowe/zowe-explorer-vscode/pull/3079)
- Added new `searchDataSets` API to provide the ability to search all data sets and PDS members that match a pattern for a string. [#3306](https://github.com/zowe/zowe-explorer-vscode/pull/3306)
- Added support for extenders to obtain an updated Session that will includes VS Code proxy settings values if set, `getProfileSessionWithVscProxy`. [#3010](https://github.com/zowe/zowe-explorer-vscode/issues/3010)
- Added support for VS Code proxy settings with zosmf profile types. [#3010](https://github.com/zowe/zowe-explorer-vscode/issues/3010)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,17 @@ async function expectUnixCommandApiWithSshSession<T>(
sshobj: zosuss.SshSession
): Promise<void> {
spy.mockClear().mockResolvedValue(undefined);
spy.mockImplementation((sshobject: zosuss.SshSession, command: string, cwd: string, callback: (data: string) => void) => {
callback("test");
});
spy.mockImplementation(
(_sshobject: zosuss.SshSession, _command: string, _cwd: string, callback: (data: string) => void, _cleanStdout?: boolean) => {
callback("test");
}
);
const spywhenpathnotspecified = jest.spyOn(zosuss.Shell, "executeSsh");
spywhenpathnotspecified.mockImplementation((sshobject: zosuss.SshSession, command: string, callback: (data: string) => void) => {
callback("test");
});
spywhenpathnotspecified.mockImplementation(
(_sshobject: zosuss.SshSession, _command: string, callback: (data: string) => void, _cleanStdout?: boolean) => {
callback("test");
}
);
await apiInstance[name as string](sshobj, ...args, true, () => {});
await apiInstance[name as string](sshobj, ...args, false, () => {});
expect(spy).toHaveBeenCalled();
Expand Down Expand Up @@ -671,6 +675,12 @@ describe("ZosmfCommandApi", () => {
args: ["command", { account: "ACCT#" }],
transform: (args) => [args[1].account, ...args],
},
{
name: "issueTsoCmdWithParms",
spy: jest.spyOn(zostso.IssueTso, "issueTsoCmd"),
args: ["command"],
transform: (args) => [...args, { addressSpaceOptions: undefined }],
},
{
name: "issueMvsCommand",
spy: jest.spyOn(zosconsole.IssueCommand, "issue"),
Expand Down
11 changes: 11 additions & 0 deletions packages/zowe-explorer-api/src/extend/MainframeInteraction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,20 @@ export namespace MainframeInteraction {
* @param {zostso.IStartTsoParms} parms
* @returns {Promise<zostso.IIssueResponse>}
* @memberof ICommand
* @deprecated Please use `issueTsoCmdWithParms`
*/
issueTsoCommandWithParms?(command: string, parms?: zostso.IStartTsoParms): Promise<zostso.IIssueResponse>;

/**
* Issues a TSO Command without the need for account information
*
* @param {string} command
* @param {zostso.IStartTsoParms} parms
* @returns {Promise<zostso.IIssueResponse>}
* @memberof ICommand
*/
issueTsoCmdWithParms?(command: string, parms?: zostso.IStartTsoParms): Promise<zostso.IIssueResponse>;

zFernand0 marked this conversation as resolved.
Show resolved Hide resolved
/**
* Issues a MVS Command and returns a Console Command API response.
*
Expand Down
4 changes: 3 additions & 1 deletion packages/zowe-explorer-api/src/profiles/UserSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ export enum PersistenceSchemaEnum {
Dataset = "zowe.ds.history",
USS = "zowe.uss.history",
Job = "zowe.jobs.history",
Commands = "zowe.commands.history",
MvsCommands = "zowe.commands.mvs.history",
TsoCommands = "zowe.commands.tso.history",
UssCommands = "zowe.commands.uss.history",
zFernand0 marked this conversation as resolved.
Show resolved Hide resolved
}
27 changes: 21 additions & 6 deletions packages/zowe-explorer-api/src/profiles/ZoweExplorerZosmfApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,20 +457,35 @@
return zostso.IssueTso.issueTsoCommand(this.getSession(), parms.account, command, parms);
}

public issueTsoCmdWithParms(command: string, parms: zostso.IStartTsoParms): Promise<zostso.IIssueResponse> {
return zostso.IssueTso.issueTsoCmd(this.getSession(), command, { addressSpaceOptions: parms });
}

public issueMvsCommand(command: string, consoleName?: string): Promise<zosconsole.IConsoleResponse> {
return zosconsole.IssueCommand.issue(this.getSession(), { command, consoleName, processResponses: true });
}

public async issueUnixCommand(command: string, cwd: string, sshSession: zosuss.SshSession): Promise<string> {
let stdout = "";
if (cwd) {
await zosuss.Shell.executeSshCwd(sshSession, command, '"' + cwd + '"', (data: string) => {
stdout += data;
});
await zosuss.Shell.executeSshCwd(
sshSession,
command,
'"' + cwd + '"',
(data: string) => {
stdout += data;
},
true
);
} else {
await zosuss.Shell.executeSsh(sshSession, command, (data: string) => {
stdout += data;
});
await zosuss.Shell.executeSsh(

Check warning on line 481 in packages/zowe-explorer-api/src/profiles/ZoweExplorerZosmfApi.ts

View check run for this annotation

Codecov / codecov/patch

packages/zowe-explorer-api/src/profiles/ZoweExplorerZosmfApi.ts#L481

Added line #L481 was not covered by tests
sshSession,
command,
(data: string) => {
stdout += data;

Check warning on line 485 in packages/zowe-explorer-api/src/profiles/ZoweExplorerZosmfApi.ts

View check run for this annotation

Codecov / codecov/patch

packages/zowe-explorer-api/src/profiles/ZoweExplorerZosmfApi.ts#L484-L485

Added lines #L484 - L485 were not covered by tests
},
true
);
}
return stdout;
}
Expand Down
5 changes: 2 additions & 3 deletions packages/zowe-explorer-api/src/tree/ZoweTreeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import * as vscode from "vscode";
import * as imperative from "@zowe/imperative";
import { IZoweTreeNode } from "./IZoweTreeNode";
import type { BaseProvider } from "../fs/BaseProvider";

/**
* Common implementation of functions and methods associated with the
Expand Down Expand Up @@ -98,9 +97,9 @@ export class ZoweTreeNode extends vscode.TreeItem {
/**
* Sets the imperative.IProfileLoaded profile for this node to the one chosen in parameters.
*
* @param {imperative.IProfileLoaded} The profile you will set the node to use
* @param {imperative.IProfileLoaded} aProfile The profile you will set the node to use
*/
public setProfileToChoice(aProfile: imperative.IProfileLoaded, fsProvider?: BaseProvider): void {
public setProfileToChoice(aProfile: imperative.IProfileLoaded): void {
// Don't reassign profile if its already defined, as we want to keep the reference valid for other nodes and filesystems
this.profile = Object.assign(this.profile ?? {}, aProfile);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/zowe-explorer-ftp-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ All notable changes to the "zowe-explorer-ftp-extension" extension will be docum

### New features and enhancements

- Updated Zowe SDKs to `8.8.4` for technical currency. [#3306](https://github.com/zowe/zowe-explorer-vscode/pull/3306)

### Bug fixes

- Updated Zowe SDKs to `8.8.4` for technical currency. [#3306](https://github.com/zowe/zowe-explorer-vscode/pull/3306)

## `3.0.3`

### Bug fixes
Expand Down
1 change: 1 addition & 0 deletions packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen

- Updated Zowe SDKs to `8.8.4` for technical currency. [#3306](https://github.com/zowe/zowe-explorer-vscode/pull/3306)
- Added expired JSON web token detection for profiles in each tree view (Data Sets, USS, Jobs). When a user performs a search on a profile, they are prompted to log in if their token expired. [#3175](https://github.com/zowe/zowe-explorer-vscode/issues/3175)
- Added integrated terminals for z/OS Unix, TSO, and MVS commands which can be enabled via the `Zowe › Commands: Use Integrated Terminals` setting. [#3079](https://github.com/zowe/zowe-explorer-vscode/pull/3079)
- Add a data set or USS resource to a virtual workspace with the new "Add to Workspace" context menu option. [#3265](https://github.com/zowe/zowe-explorer-vscode/issues/3265)
- Power users and developers can now build links to efficiently open mainframe resources in Zowe Explorer. Use the **Copy External Link** option in the context menu to get the URL for a data set or USS resource, or create a link in the format `vscode://Zowe.vscode-extension-for-zowe?<ZoweResourceUri>`. For more information on building resource URIs, see the [FileSystemProvider wiki article](https://github.com/zowe/zowe-explorer-vscode/wiki/FileSystemProvider#file-paths-vs-uris). [#3271](https://github.com/zowe/zowe-explorer-vscode/pull/3271)
- Adopted support for VS Code proxy settings with zosmf profile types. [#3010](https://github.com/zowe/zowe-explorer-vscode/issues/3010)
Expand Down
11 changes: 10 additions & 1 deletion packages/zowe-explorer/__tests__/__mocks__/@zowe/imperative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export interface ICommandArguments {
export interface IImperativeError {
msg: string;
errorCode?: number;
causeErrors?: any;
additionalDetails?: string;
}

Expand Down Expand Up @@ -236,13 +237,20 @@ export class ConfigUtils {
}
export class ImperativeError extends Error {
private msg: string;
constructor(public mDetails: IImperativeError) {
public causeErrors: any;
public additionalDetails: any;
constructor(private mDetails: IImperativeError) {
super();
this.msg = mDetails.msg;
this.causeErrors = this.mDetails.causeErrors;
this.additionalDetails = this.mDetails.additionalDetails;
}
public get message() {
return this.msg;
}
public get details() {
return this.mDetails;
}
}

export class ProfInfoErr extends ImperativeError {
Expand Down Expand Up @@ -359,6 +367,7 @@ export class TextUtils {
public static prettyJson(object: any, options?: any, color?: boolean, append?: string): string {
return JSON.stringify(object);
}
public static chalk = jest.requireActual("chalk");
}

export namespace SessConstants {
Expand Down
Loading
Loading