Skip to content

Commit

Permalink
Merge pull request #1 from phaumer/master
Browse files Browse the repository at this point in the history
bring in changes from head repo
  • Loading branch information
JillieBeanSim authored Oct 16, 2019
2 parents 4a0f4eb + 07a1400 commit 8313f57
Show file tree
Hide file tree
Showing 87 changed files with 9,265 additions and 2,446 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"request": "launch",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": [
"--runInBand"
"--runInBand",
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
Expand All @@ -38,7 +38,7 @@
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/__tests__/integrationTests"
"--extensionTestsPath=${workspaceFolder}/out/__tests__/__integration__"
],
"outFiles": [
"${workspaceFolder}/out/__tests__/**/*.js"
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
"typescript.tsc.autoDetect": "off"
}
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,54 @@

All notable changes to the "vscode-extension-for-zowe" extension will be documented in this file.

## 0.25.0

- Add Edit to context menu for MVS and USS Tree. Thanks to Rodney-Wilson
- Restructured all search and filters dialogs to incorporate a recall/history function. @Colin-Stone
- Added Search Favorite for USS Favorites. @Colin-Stone
- Added Job and Search Favorite for Jobs. @Colin-Stone
- Provided support for specifying jobs by job id. @Colin-Stone
- Fixed issue with submitting datasets job link. @Colin-Stone
- Fixed label for Jobs Refresh All. @Colin-Stone
- Minor icon improvement to distinguish Favorites from LPAR's. @Colin-Stone
- Support copy path Thanks @lauren-li
- Progress Bar animation on opening large files. Thanks to Rodney-Wilson

## 0.24.1

- Fixed issue when saving USS files

## 0.24.0

- Updated Localization Documentation and Added Update Dictionary Script. Thanks to @evannwu20
- Show stepname or procstep alongside spool name. Thanks @crshnburn
- Add command to issue TSO command. Thanks @crshnburn
- Added icons for files and folders. Thanks to @Colin-Stone

## 0.23.2

- Fixed issue when saving datasets in Windows

## 0.23.1

- Refined dataset suffix solution by restricting to explicit names only

## 0.23.0

- Add support for localization. Thanks to @evannwu20
- Correctly determine if file is binary for saving. Thanks @crshnburn
- Fix Default profile error message with friendlier version. Thanks @lauren-li
- Context menu grouping for MVS and USS. Thanks @lauren-li
- Preference to Specify Temp Folder. Thanks to @adambattenburg
- Store local version of dataset with a suffix if appropriate to enable syntax highlighting. Thanks to @Colin-Stone

## 0.22.0

- Add ability to create directories or files on the root node. Thanks to @kristinochka
- Add ability to upload files through regular OS browse dialog on regular nodes and favorites. Thanks to @kristinochka
- Add USS File Refresh and USS Safe Save. Thanks to @adambattenburg
- Honor the file tag (binary or ascii) if not specified. Thanks to @Colin-Stone

## 0.21.0

- Added the Upload member to datasets. Thanks Kristina Mayo
Expand Down
72 changes: 12 additions & 60 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,11 @@ def MASTER_RECIPIENTS_LIST = "fernando.rijocedeno@broadcom.com"
*/
def MASTER_BRANCH = "master"

/**
* Name of the VSCE publisher
*/
def PUBLISHER_NAME = "Zowe"

/**
* TOKEN ID where secret is stored
*/
def PUBLISH_TOKEN = "vsce-publish-key"

/**
* Version to be published
*/
def PUBLISH_VERSION = "0.0.0"

def PIPELINE_CONTROL = [
ci_skip: false
]
Expand All @@ -48,7 +38,6 @@ opts.push( parameters([
booleanParam(name: 'SKIP_CI_SKIP', defaultValue: false, description: 'Skip: CI SKIP'),
booleanParam(name: 'SKIP_TEST', defaultValue: false, description: 'Skip: TEST'),
booleanParam(name: 'SKIP_AUDIT', defaultValue: false, description: 'Skip: AUDIT'),
booleanParam(name: 'SKIP_VERSIONING', defaultValue: false, description: 'Skip: VERSIONING'),
booleanParam(name: 'SKIP_PUBLISH', defaultValue: false, description: 'Skip: PUBLISH'),
string(name: 'RECIPIENTS_LIST', defaultValue: '', description: 'List of emails to receive build results (Override)')
]) )
Expand Down Expand Up @@ -115,50 +104,6 @@ pipeline {
} }
}
}
stage("Versioning & Changelog") {
when { allOf {
expression { return !PIPELINE_CONTROL.ci_skip }
expression { return BRANCH_NAME == MASTER_BRANCH }
expression { return !params.SKIP_VERSIONING }
} }
steps {
timeout(time: 10, unit: 'MINUTES') { script {
echo "This stage will help with the versioning of the VSCode Extension"
// def versionInput = input message: "Version information:", submitterParameter: "VERSION", parameters: [
// choice(name: "VERSION", description: "What level should be increased?", choices: ["major", "minor", "patch"])
// ]

// echo "User selected: ${versionInput.VERSION}"

// def prDescription = sh returnStdout: true, script: "git log --format=%B -n 1"
// echo "${prDescription}"

// sh "npm version ${versionInput.VERSION}"
// sh "git commit --amend --signoff -m \"Bump version to %s [ci skip]\""

// def packageJSON = readJSON file: "package.json"
// PUBLISH_VERSION = packageJSON.version

// sh "git reset HEAD --hard"

// def changelogFile = "CHANGELOG.md"

// def changelogInput = input message: "Changelog description:", submitterParameter: "TEXT", parameters: [
// text(name: "TEXT", description: "What goes on the changelog?", defaultvalue: '''$prDescription''')
// ]

// def changelogOutput = sh returnStdout: true, script: "sed -n 'H;\${x;s/^\n//;s/## .*\$/## ${PUBLISH_VERSION}\n\n${changelogInput.TEXT}\n\n&/;p;}' ${changelogFile} > ${changelogFile}.temp"
// sh "mv ${changelogFile}.temp ${changelogFile}"

// sh "cat ${changelogFile}"

// sh "git add ${changelogFile}"
// sh "git commit --signoff -m \"Update Changelog for version: ${PUBLISH_VERSION} [ci skip]\""

// sh "git push --dry-run"
} }
}
}
stage("Publish") {
when { allOf {
expression { return !PIPELINE_CONTROL.ci_skip }
Expand All @@ -167,11 +112,18 @@ pipeline {
} }
steps {
timeout(time: 10, unit: 'MINUTES') { script {
echo "This stage will publish the VSCode Extension"
// sh "npx vsce login ${PUBLISHER_NAME}"
// withCredentials([string(credentialsId: PUBLISH_TOKEN, variable: 'TOKEN')]) {
// sh "npx vsce publish ${PUBLISH_VERSION} -p $TOKEN"
// }
def vscodePackageJson = readJSON file: "package.json"
def extensionMetadata = sh(returnStdout: true, script: "npx vsce show ${vscodePackageJson.publisher}.${vscodePackageJson.name} --json").trim()
def extensionInfo = readJSON text: extensionMetadata

if (extensionInfo.versions[0].version == vscodePackageJson.version) {
echo "No new version to publish at this time (${vscodePackageJson.version})"
} else {
echo "Publishing version ${vscodePackageJson.version} since it's different from ${extensionInfo.versions[0].version}"
withCredentials([string(credentialsId: PUBLISH_TOKEN, variable: 'TOKEN')]) {
sh "npx vsce publish -p $TOKEN"
}
}
} }
}
}
Expand Down
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,36 @@ The VSC Extension for Zowe is powered by [Zowe CLI](https://zowe.org/home/). The

After you install the Zowe extension, meet the following prerequisites:

* [Install Zowe CLI](https://zowe.github.io/docs-site/latest/user-guide/cli-installcli.html#methods-to-install-zowe-cli) on your PC.
* [Install Zowe CLI](https://docs.zowe.org/stable/user-guide/cli-installcli.html#methods-to-install-zowe-cli) on your PC.

**Important!** To use the VSC Extension for Zowe, you must install Zowe CLI version `2.0.0` or later.
* [Create at least one Zowe CLI 'zosmf' profile](https://zowe.github.io/docs-site/latest/user-guide/cli-configuringcli.html#creating-zowe-cli-profiles).
> **Important!**: To use the VSC Extension for Zowe, you must install Zowe CLI version `2.0.0` or later.
* [Create at least one Zowe CLI 'zosmf' profile](https://docs.zowe.org/stable/user-guide/cli-configuringcli.html#creating-zowe-cli-profiles).

## Configuration and usage tips

You can alter the behavior of the extension in the following ways:

* **Data set Safe Save:** The Visual Studio Code **Save** functionality will overwrite data set contents on the mainframe. To prevent conflicts, use the Zowe extension **Safe Save** functionality to compare changes made with initial mainframe contents before saving. For more information, see [Use Safe Save to prevent merge conflicts](#use-safe-save-to-prevent-merge-conflicts).
* **Data set creation settings:** You can change the default creation settings for various data set types. Navigate to the Settings for this extension for more info.
* **Data set persistence settings:** You can toggle the persistence of any data sets that are present under your **Favorites** tab.

**Tip:** By default, Visual Studio Code does not highlight data set syntax. To enhance the experience of using the extension, download an extension that highlights syntax, such as COBOL.

### Advanced Configuration

> **WARNING**: Specifying these preferences incorrectly, may cause the extension to fail.
Extension preferences can also be modified in the `Settings` for this extension. They can be customized in the following ways:

* **Data set creation settings:** You can change the default creation settings for various data set types.
* **Temp Folder Location:** You can change the default folder location, for where temporary files are stored. In order to set in `Settings`, use the example below.

```json
"Zowe-Temp-Folder-Location": {
"folderPath": "/path/to/directory"
}
```

## Sample use cases

Review the following use cases to understand how to use this extension.
Expand Down
15 changes: 12 additions & 3 deletions __mocks__/@brightside/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@ import * as imperative from "../@brightside/imperative";

// tslint:disable-next-line:no-namespace
export namespace ZosmfSession {
export function createBasicZosmfSession(profile: imperative.Profile){
return true;
export function createBasicZosmfSession(profile: imperative.Profile) {
return {
type: "basic",
user: "fake",
password: "fake",
hostname: "fake",
protocol: "https",
base64EncodedAuth: "",
rejectUnauthorized: false,
port: 2,
};
}
}

Expand Down Expand Up @@ -91,7 +100,7 @@ export namespace List {
{
name: "aDir", mode: "drw-r--r--", size: 20, uid: 0, user: "WSADMIN", gid: 1,
group: "OMVSGRP", mtime: "2015-11-24T02:12:04"
},
},
{
name: "myFile.txt", mode: "-rw-r--r--", size: 20, uid: 0, user: "WSADMIN", gid: 1,
group: "OMVSGRP", mtime: "2015-11-24T02:12:04"
Expand Down
11 changes: 9 additions & 2 deletions __mocks__/@brightside/imperative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,16 @@ export class DefaultCredentialManager {

// tslint:disable-next-line:max-classes-per-file
export class Logger {
static initLogger(loggingConfig: IConfigLogging): any {
public static initLogger(loggingConfig: IConfigLogging): any {
}
static getAppLogger(): Logger {
public static getAppLogger(): Logger {
return log4js.getLogger("app");
}
}

// tslint:disable-next-line:max-classes-per-file
export class TextUtils {
public static prettyJson(object: any, options?: any, color?: boolean, append?: string): string {
return JSON.stringify(object);
}
}
12 changes: 12 additions & 0 deletions __mocks__/fs-extra.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* This program and the accompanying materials are made available under the terms of the *
* Eclipse Public License v2.0 which accompanies this distribution, and is available at *
* https://www.eclipse.org/legal/epl-v20.html *
* *
* SPDX-License-Identifier: EPL-2.0 *
* *
* Copyright Contributors to the Zowe Project. *
* *
*/

export function moveSync(srcPath: string, destPath: string): void {}
28 changes: 28 additions & 0 deletions __mocks__/vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,3 +388,31 @@ export interface TextDocument {
fileName?: string;
}

/**
* The clipboard provides read and write access to the system's clipboard.
*/
export interface Clipboard {

/**
* Writes text into the clipboard.
* @returns A thenable that resolves when writing happened.
*/
writeText(value: string): Thenable<void>;
}

/**
* Namespace describing the environment the editor runs in.
*/
export namespace env {
/**
* The application name of the editor, like 'VS Code'.
*/
export const appName = "Visual Studio Code"

/**
* The system clipboard.
*/
export const clipboard: Clipboard = {
writeText(){ return Promise.resolve(); }
};
}
65 changes: 0 additions & 65 deletions __tests__/ProfileLoader.test.ts

This file was deleted.

Loading

0 comments on commit 8313f57

Please sign in to comment.