diff --git a/.github/release.config.js b/.github/release.config.js
index 330f16f8..830710f4 100644
--- a/.github/release.config.js
+++ b/.github/release.config.js
@@ -6,7 +6,7 @@ module.exports = {
level: "minor",
devDependencies: {
"@zowe/imperative": "zowe-v2-lts",
- "@zowe/zowe-explorer-api": "zowe-v2-lts",
+ "@zowe/zowe-explorer-api": ["zowe-v2-lts", "@zowe:registry=https://registry.npmjs.org/"],
}
},
{
@@ -15,7 +15,7 @@ module.exports = {
level: "patch",
devDependencies: {
"@zowe/imperative": "zowe-v1-lts",
- "@zowe/zowe-explorer-api": "zowe-v1-lts",
+ "@zowe/zowe-explorer-api": ["zowe-v1-lts", "@zowe:registry=https://registry.npmjs.org/"],
}
},
{
@@ -25,7 +25,7 @@ module.exports = {
prerelease: true,
devDependencies: {
"@zowe/imperative": "next",
- "@zowe/zowe-explorer-api": "next",
+ "@zowe/zowe-explorer-api": ["next", "@zowe:registry=https://registry.npmjs.org/"],
}
}
],
@@ -44,10 +44,12 @@ module.exports = {
[
"@octorelease/lerna",
{
- pruneShrinkwrap: ["@zowe/cics-for-zowe-cli"],
+ // The shrinkwrap pruning should happen after only as part of the prepack of the CLI Plug-in
+ // pruneShrinkwrap: ["@zowe/cics-for-zowe-cli"],
+
// Use Lerna only for versioning and publish packages independently
npmPublish: false,
- versionIndependent: ["cics-extension-for-zowe"]
+ versionIndependent: ["cics-extension-for-zowe"],
},
],
[
@@ -57,24 +59,22 @@ module.exports = {
aliasTags: {
"latest": ["zowe-v2-lts"],
},
- npmPublish: false,
- tarballDir: "dist",
+ npmPublish: true,
},
{
$cwd: "packages/cli",
aliasTags: {
"latest": ["zowe-v2-lts"],
},
- npmPublish: false,
- tarballDir: "dist",
+ npmPublish: true,
},
],
[
"@octorelease/vsce",
{
$cwd: "packages/vsce",
- ovsxPublish: false,
- vscePublish: false,
+ ovsxPublish: true,
+ vscePublish: true,
vsixDir: "dist",
},
],
diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml
index ccf202cb..737386c7 100644
--- a/.github/workflows/audit.yml
+++ b/.github/workflows/audit.yml
@@ -16,12 +16,12 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js LTS
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: lts/*
diff --git a/.github/workflows/auto-comment.yml b/.github/workflows/auto-comment.yml
index c6cc7836..78c09d21 100644
--- a/.github/workflows/auto-comment.yml
+++ b/.github/workflows/auto-comment.yml
@@ -9,7 +9,7 @@ jobs:
name: Process Label Action
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Process Label Action
uses: hramos/respond-to-issue-based-on-label@v2
diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml
index ec1a577f..6fa45391 100644
--- a/.github/workflows/changelog.yml
+++ b/.github/workflows/changelog.yml
@@ -15,7 +15,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
fetch-depth: 0
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 6d292700..4355bc9c 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -32,7 +32,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
fetch-depth: 0
diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml
index e2c6fc78..3c3db377 100644
--- a/.github/workflows/linter.yml
+++ b/.github/workflows/linter.yml
@@ -18,10 +18,10 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Use Node.js LTS
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: lts/*
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 9ccde4ac..30e92210 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -5,6 +5,8 @@ on:
paths:
- .github/**
- packages/**
+ - .npmrc
+ - package.json
pull_request:
paths:
- packages/**
@@ -36,10 +38,10 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
@@ -48,14 +50,6 @@ jobs:
echo "::remove-matcher owner=eslint-compact::"
echo "::remove-matcher owner=eslint-stylish::"
- # - name: Install turbo based on the OS
- # run: |
- # os_name="${{ matrix.os }}"
- # os_name="${os_name/windows-latest/windows}"
- # os_name="${os_name/ubuntu-latest/linux}"
- # os_name="${os_name/macos-latest/darwin}"
- # npm i "turbo-${os_name}-64"
-
- name: Install Dependencies
run: npm ci
@@ -76,23 +70,24 @@ jobs:
- name: Archive Results
if: ${{ always() && steps.build.outcome == 'success' }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.node-version }}-results
path: packages/*/__tests__/__results__/
- name: Upload Results to Codecov
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
env_vars: OS,NODE
+ token: ${{ secrets.CODECOV_TOKEN }}
# - name: Bundle all packages
- # if: matrix.os == 'ubuntu-latest' && matrix.node-version == '18.x'
+ # if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x'
# run: npm i -g vsce && npm run package
# - name: Archive all packages
- # if: matrix.os == 'ubuntu-latest' && matrix.node-version == '18.x'
- # uses: actions/upload-artifact@v3
+ # if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x'
+ # uses: actions/upload-artifact@v4
# with:
# name: zowe-cics-client
# path: dist/*
@@ -104,14 +99,14 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
ref: ${{ github.ref }}
- name: Use Node.js LTS
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: lts/*
@@ -131,7 +126,7 @@ jobs:
- name: Build Source
run: npm run build
- - uses: zowe-actions/octorelease@fix/allow-first-time-publish2
+ - uses: zowe-actions/octorelease@v1
env:
GIT_COMMITTER_NAME: ${{ secrets.ZOWE_ROBOT_USER }}
GIT_COMMITTER_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }}
@@ -140,5 +135,8 @@ jobs:
NPM_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
NPM_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
NPM_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }}
+ NPM_TOKEN: ${{ secrets.VSCODE_NPM_PUBLISHER_TOKEN }}
+ OVSX_PAT: ${{ secrets.VSCODE_OVSX_PUBLISHER_TOKEN }}
+ VSCE_PAT: ${{ secrets.VSCODE_VSCE_PUBLISHER_TOKEN }}
with:
config-dir: .github
\ No newline at end of file
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 1a5a707c..f1e9d396 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -11,7 +11,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- - uses: actions/stale@v8
+ - uses: actions/stale@v9
with:
# General rules applied to both, issues and pull requests (PRs)
days-before-close: 14
diff --git a/lerna.json b/lerna.json
deleted file mode 100644
index c735f851..00000000
--- a/lerna.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "version": "5.0.3",
- "command": {
- "publish": {
- "ignoreChanges": [
- "packages/vsce/**"
- ],
- "registry": "https://zowe.jfrog.io/zowe/api/npm/npm-local-release/"
- }
- },
- "useWorkspaces": true
-}
diff --git a/package-lock.json b/package-lock.json
index b7923da9..c83d1fef 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,10 +1,12 @@
{
"name": "@zowe/cics_monorepo",
+ "version": "5.0.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@zowe/cics_monorepo",
+ "version": "5.0.3",
"workspaces": [
"./packages/*"
],
@@ -20,7 +22,6 @@
"@typescript-eslint/parser": "^5.57.1",
"@zowe/cli-test-utils": "^7.13.0",
"@zowe/imperative": "^5.22.0",
- "@zowe/secrets-for-zowe-sdk": "^7.18.6",
"@zowe/zowe-explorer-api": "^2.14.0",
"chalk": "^4.1.2",
"eslint": "^8.37.0",
diff --git a/package.json b/package.json
index e5f72d2e..5c03bf33 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,14 @@
{
"name": "@zowe/cics_monorepo",
"private": true,
+ "version": "5.0.3",
+ "publishConfig": {
+ "registry": "https://zowe.jfrog.io/zowe/api/npm/npm-local-release/"
+ },
+ "repository": "https://github.com/zowe/cics-for-zowe-client",
+ "workspaces": [
+ "./packages/*"
+ ],
"scripts": {
"build": "turbo build",
"watch": "turbo watch",
@@ -13,10 +21,6 @@
"prepare": "husky install",
"license": "node scripts/updateLicenses.js"
},
- "repository": "https://github.com/zowe/cics-for-zowe-client",
- "workspaces": [
- "./packages/*"
- ],
"devDependencies": {
"@types/glob": "^7.2.0",
"@types/jest": "^29.5.0",
@@ -62,4 +66,4 @@
"typescript": "^5.0.3",
"uuid": "^9.0.0"
}
-}
+}
\ No newline at end of file
diff --git a/packages/vsce/README.md b/packages/vsce/README.md
index cf97b923..26082726 100644
--- a/packages/vsce/README.md
+++ b/packages/vsce/README.md
@@ -1,7 +1,7 @@
# Zowe CICS Explorer
-[](https://vsmarketplacebadge.apphb.com/version-short/Zowe.cics-extension-for-zowe.svg)
-[](https://vsmarketplacebadge.apphb.com/downloads-short/Zowe.cics-extension-for-zowe.svg)
+[](https://img.shields.io/visual-studio-marketplace/v/zowe.cics-extension-for-zowe.svg)
+[](https://img.shields.io/visual-studio-marketplace/v/zowe.cics-extension-for-zowe.svg)
[](https://openmainframeproject.slack.com/archives/CUVE37Z5F)
[](https://github.com/zowe/vscode-extension-for-cics/issues)
@@ -80,7 +80,7 @@ If you don't have an existing Zowe CICS CLI profile, follow these steps to creat
5. Select the **+** button in the CICS tree and click the newly created profile to load it into view.
-
+
Here's an example of a CICS profile entry in the config file:
@@ -116,7 +116,7 @@ Here's an example of a CICS profile entry in the config file:
Configuring a CICS region to have a connection is a system programmer task and more details can be found in [Setting up CMCI with CICSPlex SM](https://www.ibm.com/docs/en/cics-ts/5.3?topic=explorer-setting-up-cmci-cicsplex-sm) or [Setting up CMCI in a stand-alone CICS region](https://www.ibm.com/docs/en/cics-ts/5.3?topic=suace-setting-up-cmci-in-stand-alone-cics-region). If your CMCI connection is configured to use a self-signed certificate that your PC's trust store doesn't recognize, see [Untrusted TLS certificates](#untrusted-tls-certificates).
-
+
To show more than one CICS profiles in the tree, select the **+** button and choose from the list of profiles. Only profiles that not already included in the CICS tree will be shown.
@@ -149,7 +149,7 @@ To show more than one CICS profile in the tree, select the + button and choose f
4. Refresh the Zowe Explorer for IBM CICS extension by either clicking the button at the top level of the CICS view, or the `Zowe Explorer for IBM CICS: Refresh` command palette option.
-
+
#### Using Zowe v1 profiles
@@ -163,7 +163,7 @@ To show more than one CICS profile in the tree, select the + button and choose f
3. Once the details are updated, click the **Update Profile** button to apply the changes to the profile.
-
+
### Hiding Profiles
@@ -171,7 +171,7 @@ To show more than one CICS profile in the tree, select the + button and choose f
Open the menu actions for a profile by right-clicking a profile and select `Hide Profile` to hide it from the CICS view. To add the profile back, click the + button and select the profile from the quick pick list.
-
+
### Deleting Profiles
@@ -187,7 +187,7 @@ Open the menu actions for a profile by right-clicking a profile and select `Hide
4. Refresh the Zowe Explorer for IBM CICS extension by either clicking the button at the top level of the CICS view, or the `Zowe Explorer for IBM CICS: Refresh` command palette option.
-
+
#### Using Zowe v1 profiles
@@ -197,7 +197,7 @@ Open the menu actions for a profile by right-clicking a profile and select `Hide
2. Select **Delete Profile** and click the **Yes** button when prompted to confirm the action of permanently deleting the profile. The functionality deletes the CICS profile from the persistent storage directory `~/.zowe/profiles/cics`.
-
+
## CICS Resources
@@ -213,7 +213,7 @@ The list of resources are pre-filtered to exclude many of the IBM supplied ones
To reset the filter to its initial criteria use the clear filter icon
against the resource type. If you wish to see all resources in a region (including IBM supplied ones) you can use "\*" as a filter.
-
+
**Tip:** To apply multiple filters, separate entries with a comma. You can append any filter with an \*, which indicates wildcard searching.
@@ -225,7 +225,7 @@ Similar to filtering resources in a region, it is also possible to apply a filte
To reset the filter to its initial criteria use the clear filter icon
against the `Regions` tree. This will open a drop-down menu which gives the option to clear the filter for all the `Regions`, `Programs`, `Local Transactions` or `Local Files` in the plex, and an option to otherwise clear `All` filters within the plex.
-
+
**Tip:** To apply multiple filters, separate entries with a comma. You can append any filter with an \*, which indicates wildcard searching.
@@ -237,7 +237,7 @@ Plexes contain an `All Programs`, `All Local Transactions`, `All Local Files` an
To view resources under these trees, use the search icon
inline with the tree and apply a filter.
-
+
If the applied filter results in over 500 records, either change the filter to narrow down the search, or click the `view X more ...` item to retrieve 'X' more resources.
@@ -245,7 +245,7 @@ If the applied filter results in over 500 records, either change the filter to n
**Tip:** The default 500 count can be modified via the `Record Count Increment` property in Settings (UI).
-
+
### Show Attributes
@@ -253,7 +253,7 @@ If the applied filter results in over 500 records, either change the filter to n
Right-click and use the pop-up menu against a program to list the available actions that can be performed. For every resource, including a CICS region, `Show Attributes` opens a viewer listing all attributes and their values. The attributes page has a filter box at the top that lets you search for attributes matching the criteria.
-
+
### Enable and Disable
@@ -261,7 +261,7 @@ Right-click and use the pop-up menu against a program to list the available acti
Right-click against a program, local transaction or local file to open up the pop-up menu and click `Disable [CICS resource]` to disable the resource. When a resource is already disabled the first option becomes `Enable [CICS resource]` to allow its enablement state to be toggled. A disabled resource is identified by a `(Disabled)` text next to its name.
-
+
### New Copy and Phase In
@@ -271,7 +271,7 @@ Use `New Copy`
-
+
### Open and Close Local Files
@@ -281,7 +281,7 @@ Right-click against a closed local file and perform the `Open Local File` menu a
To close a local file, right-click against an open local file and perform the `Close Local File` menu action. This will bring up a prompt on the bottom right corner requesting to choose one of `Wait`, `No Wait` or `Force` for the file busy condition. Once an option has been selected, the local file name will be appended with a `(Closed)` label upon success.
-
+
### Purge Task
@@ -291,7 +291,7 @@ Right-click against a task and click the `Purge Task` command. This will open a
Select the appropriate condition to perform the purge.
-
+
### Inquire Functionality
@@ -301,7 +301,7 @@ Right-click against a Task and perform the `Inquire Transaction` command. This w
The same can be done on a Local Transaction to find the associated Program by executing the `Inquire Program` right-click menu action against a Local Transaction.
-
+
### View Datasets under Libraries
@@ -309,7 +309,7 @@ The same can be done on a Local Transaction to find the associated Program by ex
Expand libraries of a region to view specific datasets belonging to a library. Right-click on libraries to `Show Attributes` to view library attributes. Similarly, right-click on datasets to `Show Attributes` to view dataset attributes.
-
+
### View four CICS Web Resources under the Web Folder
@@ -317,7 +317,7 @@ Expand libraries of a region to view specific datasets belonging to a library. R
Expand the Web folder to view TCPIP Services, URI Maps, Pipelines and Web Services. Each of these resources can be expanded and allows for right-click functionality on the specific resource to execute the `Show Attributes` command. Use the search icon to filter down specific resources by applying a filter.
-
+
## Untrusted TLS Certificates
@@ -327,7 +327,7 @@ If the CMCI connection is using a TLS certificate that your PC doesn't have in i
If you define a profile as only accepting trusted TLS certificates when the Zowe Explorer first connects it will detect the mismatch and allow you to override the setting and proceed. This is done through a pop-up message with a `Yes` button to accept the untrusted certificate authority, which changes the profile's setting.
-
+
## Usage tips
@@ -345,7 +345,7 @@ If you define a profile as only accepting trusted TLS certificates when the Zowe
Before filing an issue, check if an error is arising from the Zowe Explorer for IBM CICS extension and not the Zowe Explorer extension by expanding the error message and checking if the `Source` is `Zowe Explorer for IBM CICS (Extension)`.
-
+
Error messages arising from the Zowe Explorer extension will have the `Source` as `Zowe Explorer(Extension)`.
diff --git a/packages/vsce/src/commands/refreshCommand.ts b/packages/vsce/src/commands/refreshCommand.ts
index 45abbde4..6f8f58f5 100644
--- a/packages/vsce/src/commands/refreshCommand.ts
+++ b/packages/vsce/src/commands/refreshCommand.ts
@@ -23,9 +23,7 @@ export function getRefreshCommand(tree: CICSTree) {
cancellable: false,
},
async () => {
- tree.clearLoadedProfiles();
- await ProfileManagement.profilesCacheRefresh();
- await tree.loadStoredProfileNames();
+ await tree.refreshLoadedProfiles();
}
);
} catch (error) {
diff --git a/packages/vsce/src/extension.ts b/packages/vsce/src/extension.ts
index 4a65aec4..e2f6a81d 100644
--- a/packages/vsce/src/extension.ts
+++ b/packages/vsce/src/extension.ts
@@ -85,6 +85,7 @@ import { getInquireProgramCommand } from "./commands/inquireProgram";
*/
export async function activate(context: ExtensionContext) {
const zeVersion = getZoweExplorerVersion();
+ let treeDataProv: CICSTree = null;
if (!zeVersion) {
window.showErrorMessage("Zowe Explorer was not found: Please ensure Zowe Explorer v2.0.0 or higher is installed");
return;
@@ -97,7 +98,13 @@ export async function activate(context: ExtensionContext) {
// Register 'cics' profiles as a ZE extender
await ProfileManagement.registerCICSProfiles();
ProfileManagement.getProfilesCache().registerCustomProfilesType("cics");
- await ProfileManagement.getExplorerApis().getExplorerExtenderApi().reloadProfiles();
+ const apiRegister = await ProfileManagement.getExplorerApis();
+ await apiRegister.getExplorerExtenderApi().reloadProfiles();
+ if (apiRegister.onProfilesUpdate) {
+ apiRegister.onProfilesUpdate(async () => {
+ await treeDataProv.refreshLoadedProfiles();
+ });
+ }
window.showInformationMessage("Zowe Explorer was modified for the CICS Extension.");
} catch (error) {
console.log(error);
@@ -111,7 +118,7 @@ export async function activate(context: ExtensionContext) {
return;
}
- const treeDataProv = new CICSTree();
+ treeDataProv = new CICSTree();
const treeview = window.createTreeView("cics-view", {
treeDataProvider: treeDataProv,
showCollapseAll: true,
diff --git a/packages/vsce/src/trees/CICSTree.ts b/packages/vsce/src/trees/CICSTree.ts
index dd9fc44e..e7d7907a 100644
--- a/packages/vsce/src/trees/CICSTree.ts
+++ b/packages/vsce/src/trees/CICSTree.ts
@@ -19,6 +19,7 @@ import {
TreeItem,
WebviewPanel,
window,
+ commands
} from "vscode";
import { PersistentStorage } from "../utils/PersistentStorage";
import { InfoLoaded, ProfileManagement } from "../utils/profileManagement";
@@ -40,6 +41,11 @@ export class CICSTree implements TreeDataProvider {
return this.loadedProfiles;
}
+ public async refreshLoadedProfiles() {
+ this.clearLoadedProfiles();
+ await this.loadStoredProfileNames();
+ commands.executeCommand('workbench.actions.treeView.cics-view.collapseAll');
+ }
public clearLoadedProfiles() {
this.loadedProfiles = [];
this._onDidChangeTreeData.fire(undefined);
diff --git a/packages/vsce/src/utils/expansionHandler.ts b/packages/vsce/src/utils/expansionHandler.ts
index 7f45b5b9..b9a71bde 100644
--- a/packages/vsce/src/utils/expansionHandler.ts
+++ b/packages/vsce/src/utils/expansionHandler.ts
@@ -18,6 +18,9 @@ import { ProfileManagement } from "./profileManagement";
export async function sessionExpansionHandler(session: CICSSessionTree, tree: CICSTree) {
const profile = await ProfileManagement.getProfilesCache().getLoadedProfConfig(session.label?.toString()!);
+ if (profile == null) {
+ throw new Error("sessionExpansionHandler: Profile is not defined");
+ }
await tree.loadProfile(profile, tree.getLoadedProfiles().indexOf(session), session);
}
diff --git a/scripts/bundleTgz.js b/scripts/bundleTgz.js
index 840679d6..0a1ada83 100644
--- a/scripts/bundleTgz.js
+++ b/scripts/bundleTgz.js
@@ -50,8 +50,12 @@ fsE.copyFileSync(pkgJsonFile, pkgJsonFile + ".bak");
try {
// Install node_modules directly inside packages/cli
execCmd("npm run preshrinkwrap");
-
- execCmd(`${npmInstallCmd} ${path.relative(__dirname, "../dist/zowe-cics-for-zowe-sdk-" + tempPkgJson.version + ".tgz")}`);
+ try {
+ execCmd(`npm view @zowe/cics-for-zowe-sdk`);
+ } catch (err) {
+ const sdkTgzPath = path.relative(__dirname, "../dist/zowe-cics-for-zowe-sdk-" + tempPkgJson.version + ".tgz");
+ execCmd(`${npmInstallCmd} ${sdkTgzPath}`);
+ }
execCmd(npmInstallCmd);
for (const zowePkgDir of fsE.readdirSync(path.join(cliPkgDir, "node_modules", "@zowe"))) {
const srcDir = path.join("node_modules", "@zowe", zowePkgDir);