Skip to content

Commit

Permalink
Merge branch 'main' into feat/cfg/update-schema
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <[email protected]>
  • Loading branch information
traeok committed Jan 5, 2024
2 parents c81cf50 + 15d8aeb commit 3cbc826
Show file tree
Hide file tree
Showing 90 changed files with 5,723 additions and 4,250 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.13.0-SNAPSHOT",
"version": "2.14.0-SNAPSHOT",
"command": {
"version": {
"forcePublish": true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"vscode": "^1.53.2"
},
"dependencies": {
"@zowe/cli": "7.21.0",
"@zowe/cli": "7.21.1",
"vscode-nls": "4.1.2"
},
"resolutions": {
Expand Down
2 changes: 2 additions & 0 deletions packages/eslint-plugin-zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ All notable changes to the "eslint-plugin-zowe-explorer" package will be documen

### Bug fixes

## `2.13.0`

## `2.12.2`

## `2.12.1`
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-zowe-explorer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-zowe-explorer",
"version": "2.13.0-SNAPSHOT",
"version": "2.14.0-SNAPSHOT",
"description": "Custom ESLint Rules for ZOWE Explorer",
"keywords": [
"eslint",
Expand Down
17 changes: 15 additions & 2 deletions packages/zowe-explorer-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,26 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t

### New features and enhancements

- Added optional `openDs` function to `IZoweDatasetTreeNode` to open a data set or member in the editor.
- Added optional `setEncoding` function to `IZoweDatasetTreeNode` and `IZoweUSSTreeNode` to set the encoding of a node to binary, text, or a custom codepage.
- Added optional properties `binary`, `encoding`, and `encodingMap` to tree node interfaces for storing the codepage of a data set or USS file.
- Deprecated `IZoweUSSTreeNode.binaryFiles` and `IZoweUSSTreeNode.setBinary` in favor of `IZoweUSSTreeNode.encodingMap` and `IZoweUSSTreeNode.setEncoding`.
- Deprecated `ZoweTreeNode.binary`, `ZoweTreeNode.binaryFiles`, and `ZoweTreeNode.shortLabel`. These properties are not applicable for all tree nodes and should be defined in subclasses of `ZoweTreeNode` if necessary.

### Bug fixes

- Update dependencies for technical currency purposes.
- Added return type for `IZoweUSSTreeNode.openUSS`.

## `2.13.0`

### New features and enhancements

- Added new optional boolean parameter `hideFromAllTrees` to `IZoweTree.deleteSession` for specifying whether to hide from all trees or current tree. [#2567](https://github.com/zowe/vscode-extension-for-zowe/issues/2567)
- Added new optional parameter `provider` of type `IZoweTree<IZoweTreeNode>` for `IZoweTree.addSession` to specify a tree to add the profile to.
- Added optional `filter` and `actualJobs` variables to `IZoweJobTreeNode` to track local filter search.
- Added new optional record `openFiles` to `IZoweTree` to track opened files under a specific tree view. [#2597](https://github.com/zowe/vscode-extension-for-zowe/issues/2597)

### Bug fixes

## `2.12.2`

## `2.12.1`
Expand Down
4 changes: 2 additions & 2 deletions packages/zowe-explorer-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zowe/zowe-explorer-api",
"version": "2.13.0-SNAPSHOT",
"version": "2.14.0-SNAPSHOT",
"description": "Extensibility API for Zowe Explorer.",
"publisher": "Zowe",
"author": "Zowe",
Expand All @@ -18,7 +18,7 @@
},
"dependencies": {
"@types/vscode": "^1.53.2",
"@zowe/cli": "7.21.0",
"@zowe/cli": "7.21.1",
"@zowe/secrets-for-zowe-sdk": "7.18.6",
"handlebars": "^4.7.7",
"semver": "^7.5.3"
Expand Down
68 changes: 66 additions & 2 deletions packages/zowe-explorer-api/src/tree/IZoweTreeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@ export enum NodeAction {
Download = "download",
}

interface TextEncoding {
kind: "text";
}

interface BinaryEncoding {
kind: "binary";
}

interface OtherEncoding {
kind: "other";
codepage: string;
}

export type ZosEncoding = TextEncoding | BinaryEncoding | OtherEncoding;

/**
* The base interface for Zowe tree nodes that are implemented by vscode.TreeItem.
*
Expand Down Expand Up @@ -154,6 +169,21 @@ export interface IZoweDatasetTreeNode extends IZoweTreeNode {
* Filter method for this data set's children
*/
filter?: DatasetFilter;
/**
* List of child nodes and user-selected encodings
*/
encodingMap?: Record<string, ZosEncoding>;
/**
* Binary indicator. Default false (text)
*/
binary?: boolean;
/**
* Remote encoding of the data set
*
* * `null` = user selected z/OS default codepage
* * `undefined` = user did not specify
*/
encoding?: string;
/**
* Retrieves child nodes of this IZoweDatasetTreeNode
*
Expand All @@ -172,6 +202,20 @@ export interface IZoweDatasetTreeNode extends IZoweTreeNode {
* @param {string}
*/
setEtag?(etag: string);
/**
* Downloads and displays a file in a text editor view
*
* @param download Download the file default false
* @param preview the file, true or false
* @param datasetFileProvider the tree provider
*/
openDs?(download: boolean, previewFile: boolean, datasetFileProvider: IZoweTree<IZoweDatasetTreeNode>): Promise<void>;
/**
* Sets the codepage value for the file
*
* @param {string}
*/
setEncoding?(encoding: ZosEncoding);
}

/**
Expand All @@ -187,14 +231,20 @@ export interface IZoweUSSTreeNode extends IZoweTreeNode {
shortLabel?: string;
/**
* List of child nodes downloaded in binary format
* @deprecated Use `encodingMap` instead
*/
binaryFiles?: Record<string, unknown>;
/**
* List of child nodes and user-selected encodings
*/
encodingMap?: Record<string, ZosEncoding>;
/**
* Binary indicator. Default false (text)
*/
binary?: boolean;
/**
* Specific profile name in use with this node
* @deprecated Use `getProfileName` instead
*/
mProfileName?: string;

Expand All @@ -206,6 +256,13 @@ export interface IZoweUSSTreeNode extends IZoweTreeNode {
* Event that fires whenever an existing node is updated.
*/
onUpdateEmitter?: vscode.EventEmitter<IZoweUSSTreeNode>;
/**
* Remote encoding of the data set
*
* * `null` = user selected z/OS default codepage
* * `undefined` = user did not specify
*/
encoding?: string;
/**
* Event that fires whenever an existing node is updated.
*/
Expand Down Expand Up @@ -235,10 +292,17 @@ export interface IZoweUSSTreeNode extends IZoweTreeNode {
*/
rename?(newNamePath: string);
/**
* Specifies the field as binary
* Sets the file encoding to binary
* @deprecated Use `setEncoding` instead
* @param binary true is a binary file otherwise false
*/
setBinary?(binary: boolean);
/**
* Sets the codepage value for the file
*
* @param {string}
*/
setEncoding?(encoding: ZosEncoding);
// /**
// * Opens the text document
// * @return vscode.TextDocument
Expand All @@ -251,7 +315,7 @@ export interface IZoweUSSTreeNode extends IZoweTreeNode {
* @param preview the file, true or false
* @param ussFileProvider the tree provider
*/
openUSS?(download: boolean, previewFile: boolean, ussFileProvider: IZoweTree<IZoweUSSTreeNode>);
openUSS?(download: boolean, previewFile: boolean, ussFileProvider: IZoweTree<IZoweUSSTreeNode>): Promise<void>;
/**
* Returns the local file path for the ZoweUSSNode
*
Expand Down
9 changes: 9 additions & 0 deletions packages/zowe-explorer-api/src/tree/ZoweTreeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,17 @@ export class ZoweTreeNode extends vscode.TreeItem {
public fullPath = "";
public dirty = false;
public children: IZoweTreeNode[] = [];
/**
* @deprecated Define on subclass instead
*/
public binaryFiles = {};
/**
* @deprecated Define on subclass instead
*/
public binary = false;
/**
* @deprecated Define on subclass instead
*/
public shortLabel = "";

/**
Expand Down
4 changes: 4 additions & 0 deletions packages/zowe-explorer-ftp-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ All notable changes to the "zowe-explorer-ftp-extension" extension will be docum

### Bug fixes

- Update dependencies for technical currency purposes.

## `2.13.0`

## `2.12.2`

## `2.12.1`
Expand Down
4 changes: 2 additions & 2 deletions packages/zowe-explorer-ftp-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Zowe",
"license": "EPL-2.0",
"description": "Adds zFTP support to Zowe Explorer demonstrating how to extend the Zowe Explorer using its extensibility API.",
"version": "2.13.0-SNAPSHOT",
"version": "2.14.0-SNAPSHOT",
"icon": "resources/zowe-ftp-color.png",
"repository": {
"url": "https://github.com/zowe/vscode-extension-for-zowe"
Expand Down Expand Up @@ -48,7 +48,7 @@
},
"dependencies": {
"@zowe/zos-ftp-for-zowe-cli": "2.1.2",
"@zowe/zowe-explorer-api": "2.13.0-SNAPSHOT",
"@zowe/zowe-explorer-api": "2.14.0-SNAPSHOT",
"tmp": "0.2.1"
},
"devDependencies": {
Expand Down
20 changes: 19 additions & 1 deletion packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,30 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen

### New features and enhancements

- Added new data set creation template for partitioned data set extended. [#2600](https://github.com/zowe/vscode-extension-for-zowe/issues/2600)
- Added "Open with Encoding" feature to open data sets and USS files in a non-standard codepage. [#2435](https://github.com/zowe/vscode-extension-for-zowe/issues/2435)
- Added the capability for extenders to contribute new profile types to the Zowe schema during extender activation. [#2508](https://github.com/zowe/vscode-extension-for-zowe/issues/2508)

### Bug fixes

- Fixed the allocate-like functionality by removing the inclusion of DS item in the filter history. [#2620](https://github.com/zowe/vscode-extension-for-zowe/issues/2620)
- Fixed issue with `Submit JCL` losing focus on JCL being submitted, causing the wrong job submission. [#2616](https://github.com/zowe/vscode-extension-for-zowe/issues/2616)
- Update dependencies for technical currency purposes.
- Fixed issue where USS file tag could get overwritten when changes to file are uploaded. [#2576](https://github.com/zowe/vscode-extension-for-zowe/issues/2576)
- Fixed failure to refresh token value after user logs in to authentication. [#2638](https://github.com/zowe/vscode-extension-for-zowe/issues/2638)
- Fixed order of spool files reverses when the Job is expanded and collapsed. [#2644](https://github.com/zowe/vscode-extension-for-zowe/pull/2644)

## `2.13.0`

### New features and enhancements

- Added support for hiding a Zowe profile across all trees [#2567](https://github.com/zowe/vscode-extension-for-zowe/issues/2567)
- Added support for enabling/disabling validation for a Zowe profile across all trees [#2570](https://github.com/zowe/vscode-extension-for-zowe/issues/2570)
- Added Display confirmation dialog when submitting local JCL. [#2061](https://github.com/zowe/vscode-extension-for-zowe/issues/2061)
- Added support for adding a Zowe profile across all trees [#2603](https://github.com/zowe/vscode-extension-for-zowe/issues/2603)
- Added "Filter Jobs" feature in Jobs tree view: accessible via filter icon or right-clicking on session node. [#2599](https://github.com/zowe/vscode-extension-for-zowe/issues/2599)
- Added the capability for extenders to contribute new profile types to the Zowe schema during extender activation. [#2508](https://github.com/zowe/vscode-extension-for-zowe/issues/2508)
- Added z/OS System Name (SMFID) to Zowe Explorer Jobs View. [#2629](https://github.com/zowe/vscode-extension-for-zowe/issues/2629)
- PROC and PROCLIB datasets are recognized as JCL files for syntax highlighting [#2614](https://github.com/zowe/vscode-extension-for-zowe/issues/2614)

### Bug fixes

Expand Down
1 change: 1 addition & 0 deletions packages/zowe-explorer/__mocks__/@zowe/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export declare const enum CreateDataSetTypeEnum {
DATA_SET_CLASSIC = 2,
DATA_SET_PARTITIONED = 3,
DATA_SET_SEQUENTIAL = 4,
DATA_SET_BLANK = 5,
}

export namespace List {
Expand Down
12 changes: 10 additions & 2 deletions packages/zowe-explorer/__mocks__/mockCreators/datasets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,22 @@ import { removeNodeFromArray } from "./shared";
import { PersistenceSchemaEnum } from "@zowe/zowe-explorer-api";

export function createDatasetSessionNode(session: imperative.Session, profile: imperative.IProfileLoaded) {
const datasetNode = new ZoweDatasetNode("sestest", vscode.TreeItemCollapsibleState.Expanded, null, session, undefined, undefined, profile);
const datasetNode = new ZoweDatasetNode({
label: "sestest",
collapsibleState: vscode.TreeItemCollapsibleState.Expanded,
session,
profile,
});
datasetNode.contextValue = globals.DS_SESSION_CONTEXT;

return datasetNode;
}

export function createDatasetFavoritesNode() {
const datasetNode = new ZoweDatasetNode("Favorites", vscode.TreeItemCollapsibleState.Collapsed, null, null, null);
const datasetNode = new ZoweDatasetNode({
label: "Favorites",
collapsibleState: vscode.TreeItemCollapsibleState.Collapsed,
});
datasetNode.contextValue = globals.FAVORITE_CONTEXT;

return datasetNode;
Expand Down
34 changes: 28 additions & 6 deletions packages/zowe-explorer/__mocks__/mockCreators/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
*
*/

import { Job } from "../../src/job/ZoweJobNode";
import { ZoweJobNode } from "../../src/job/ZoweJobNode";
import * as vscode from "vscode";
import * as globals from "../../src/globals";
import { IJob, IJobFile, imperative } from "@zowe/cli";
import { removeNodeFromArray } from "./shared";
import { PersistenceSchemaEnum } from "@zowe/zowe-explorer-api";

export function createIJobObject(): IJob {
export function createIJobObject() {
return {
jobid: "JOB1234",
jobname: "TESTJOB",
Expand All @@ -42,6 +42,7 @@ export function createIJobObject(): IJob {
subsystem: "SYS",
type: "JOB",
url: "fake/url",
"exec-member": "sampleMember",
};
}

Expand All @@ -65,7 +66,13 @@ export function createIJobFile(): IJobFile {
}

export function createJobsTree(session: imperative.Session, iJob: IJob, profile: imperative.IProfileLoaded, treeView: any): any {
const jobNode = new Job("jobtest", vscode.TreeItemCollapsibleState.Expanded, null, session, iJob, profile);
const jobNode = new ZoweJobNode({
label: "jobtest",
collapsibleState: vscode.TreeItemCollapsibleState.Expanded,
session,
profile,
job: iJob,
});
jobNode.contextValue = globals.JOBS_SESSION_CONTEXT;

const testJobsTree = {
Expand Down Expand Up @@ -124,21 +131,36 @@ export function createJobsTree(session: imperative.Session, iJob: IJob, profile:
}

export function createJobSessionNode(session: imperative.Session, profile: imperative.IProfileLoaded) {
const jobSessionNode = new Job("sestest", vscode.TreeItemCollapsibleState.Collapsed, null, session, null, profile);
const jobSessionNode = new ZoweJobNode({
label: "sestest",
collapsibleState: vscode.TreeItemCollapsibleState.Collapsed,
session,
profile,
});
jobSessionNode.contextValue = globals.JOBS_SESSION_CONTEXT;

return jobSessionNode;
}

export function createJobNode(session: any, profile: imperative.IProfileLoaded) {
const jobNode = new Job("sampleJob", vscode.TreeItemCollapsibleState.Collapsed, session.getSessionNode(), session, createIJobObject(), profile);
const jobNode = new ZoweJobNode({
label: "sampleJob",
collapsibleState: vscode.TreeItemCollapsibleState.Collapsed,
parentNode: session.getSessionNode(),
session,
profile,
job: createIJobObject(),
});
jobNode.contextValue = globals.JOBS_JOB_CONTEXT;

return jobNode;
}

export function createJobFavoritesNode() {
const jobFavoritesNode = new Job("Favorites", vscode.TreeItemCollapsibleState.Collapsed, null, null, null, null);
const jobFavoritesNode = new ZoweJobNode({
label: "Favorites",
collapsibleState: vscode.TreeItemCollapsibleState.Collapsed,
});
jobFavoritesNode.contextValue = globals.FAVORITE_CONTEXT;

return jobFavoritesNode;
Expand Down
Loading

0 comments on commit 3cbc826

Please sign in to comment.