Skip to content

Commit

Permalink
Merge pull request #2490 from zowe/fix-code-smells
Browse files Browse the repository at this point in the history
Fix Coverity issue and use local ZE API in samples
  • Loading branch information
t1m0thyj authored Oct 2, 2023
2 parents 553ceaa + 2a21496 commit 18c221b
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 41 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/zowe-explorer-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@ jobs:
# install yarn
- run: npm install -g yarn

- run: yarn config set network-timeout 60000 && yarn install --frozen-lockfile

- run: for dir in samples/*; do pushd $dir && yarn && yarn run compile && popd; done
shell: bash
2 changes: 1 addition & 1 deletion packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export class ZoweDatasetNode extends ZoweTreeNode implements IZoweDatasetTreeNod
),
];
const mvsApi = ZoweExplorerApiRegister.getMvsApi(cachedProfile);
if (!mvsApi.getSession(mvsApi?.profile)) {
if (!mvsApi.getSession(cachedProfile)) {
throw new zowe.imperative.ImperativeError({
msg: localize("getDataSets.error.sessionMissing", "Profile auth error"),
additionalDetails: localize("getDataSets.error.additionalDetails", "Profile is not authenticated, please log in to continue"),
Expand Down
2 changes: 1 addition & 1 deletion samples/menu-item-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"watch": "tsc -watch -p ./"
},
"dependencies": {
"@zowe/zowe-explorer-api": "^2.10.0"
"@zowe/zowe-explorer-api": "file:../../packages/zowe-explorer-api"
},
"devDependencies": {
"@types/node": "^16.18.34",
Expand Down
16 changes: 7 additions & 9 deletions samples/menu-item-sample/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@
resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.0.tgz#d7974ac234e79ce220e15fc4f7f17d880754b739"
integrity sha512-lWs7oVjXpotWw8bu4NxPszu+MiTJgzdiYgj/0q0OBYLJdoZtKBTGRSohtoLZWpu6mfObiEICI1k8UDE8v7xbPw==

"@zowe/[email protected].1":
version "7.18.1"
resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.1.tgz#546a63f5ed880418f0e0496d0218c284c815c3ee"
integrity sha512-bcAnauDpTQXCPT8rMx2wrZwhg6xih1lDujG20h1sUGJC5eqvsNCq6gvpOtcahEpUF25oBJ931dKlIu1T99LQ7w==
"@zowe/[email protected].4":
version "7.18.4"
resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.4.tgz#b755a063217a45bdffffb8d21c30afaad136b08c"
integrity sha512-eeVYZ+s9OlgqnHVVopJj3Bz4Ir6gDos5ZiT9Zf+gB6DQaeHFyvC4a2JZrLu9bEMAiVyiCTJydRaspcN4xoEi9Q==

"@zowe/[email protected]":
version "7.18.0"
Expand Down Expand Up @@ -412,14 +412,12 @@
resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.18.0.tgz#1d7be74dae8a7844386a50b3b581046dd8febe2c"
integrity sha512-rrk/fQEOb7izgZnlsxFcniuY+NZaDZPDI90/ePzdWSQZPeA1lzq42Wzww9KXMpnZa3sliXXe9qfLBnrCnZYCbg==

"@zowe/zowe-explorer-api@^2.10.0":
version "2.10.0"
resolved "https://registry.npmjs.org/@zowe/zowe-explorer-api/-/zowe-explorer-api-2.10.0.tgz#a015dfb5dfb47549b86fc13359e9116cd150f39a"
integrity sha512-wx/IikaoMYWD/MCkSlSAGcDVC9JopF7jh321cTNRn/sAWpvBxVywaQ9YQniKZ9ADy6FyDIOR8/gTWLb47TElrQ==
"@zowe/zowe-explorer-api@file:../../packages/zowe-explorer-api":
version "2.12.0-SNAPSHOT"
dependencies:
"@types/vscode" "^1.53.2"
"@zowe/cli" "^7.18.0"
"@zowe/secrets-for-zowe-sdk" "7.18.1"
"@zowe/secrets-for-zowe-sdk" "7.18.4"
handlebars "^4.7.7"
semver "^7.5.3"

Expand Down
2 changes: 1 addition & 1 deletion samples/tree-view-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
"dependencies": {
"@zowe/imperative": "^5.18.0",
"@zowe/zowe-explorer-api": "^2.10.0"
"@zowe/zowe-explorer-api": "file:../../packages/zowe-explorer-api"
},
"devDependencies": {
"@types/node": "^16.18.34",
Expand Down
16 changes: 7 additions & 9 deletions samples/tree-view-sample/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@
resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.0.tgz#d7974ac234e79ce220e15fc4f7f17d880754b739"
integrity sha512-lWs7oVjXpotWw8bu4NxPszu+MiTJgzdiYgj/0q0OBYLJdoZtKBTGRSohtoLZWpu6mfObiEICI1k8UDE8v7xbPw==

"@zowe/[email protected].1":
version "7.18.1"
resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.1.tgz#546a63f5ed880418f0e0496d0218c284c815c3ee"
integrity sha512-bcAnauDpTQXCPT8rMx2wrZwhg6xih1lDujG20h1sUGJC5eqvsNCq6gvpOtcahEpUF25oBJ931dKlIu1T99LQ7w==
"@zowe/[email protected].4":
version "7.18.4"
resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.4.tgz#b755a063217a45bdffffb8d21c30afaad136b08c"
integrity sha512-eeVYZ+s9OlgqnHVVopJj3Bz4Ir6gDos5ZiT9Zf+gB6DQaeHFyvC4a2JZrLu9bEMAiVyiCTJydRaspcN4xoEi9Q==

"@zowe/[email protected]":
version "7.18.0"
Expand Down Expand Up @@ -412,14 +412,12 @@
resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.18.0.tgz#1d7be74dae8a7844386a50b3b581046dd8febe2c"
integrity sha512-rrk/fQEOb7izgZnlsxFcniuY+NZaDZPDI90/ePzdWSQZPeA1lzq42Wzww9KXMpnZa3sliXXe9qfLBnrCnZYCbg==

"@zowe/zowe-explorer-api@^2.10.0":
version "2.10.0"
resolved "https://registry.npmjs.org/@zowe/zowe-explorer-api/-/zowe-explorer-api-2.10.0.tgz#a015dfb5dfb47549b86fc13359e9116cd150f39a"
integrity sha512-wx/IikaoMYWD/MCkSlSAGcDVC9JopF7jh321cTNRn/sAWpvBxVywaQ9YQniKZ9ADy6FyDIOR8/gTWLb47TElrQ==
"@zowe/zowe-explorer-api@file:../../packages/zowe-explorer-api":
version "2.12.0-SNAPSHOT"
dependencies:
"@types/vscode" "^1.53.2"
"@zowe/cli" "^7.18.0"
"@zowe/secrets-for-zowe-sdk" "7.18.1"
"@zowe/secrets-for-zowe-sdk" "7.18.4"
handlebars "^4.7.7"
semver "^7.5.3"

Expand Down
2 changes: 1 addition & 1 deletion samples/uss-profile-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"dependencies": {
"@zowe/cli": "^7.18.0",
"@zowe/zowe-explorer-api": "^2.10.0",
"@zowe/zowe-explorer-api": "file:../../packages/zowe-explorer-api",
"ssh2-sftp-client": "^9.1.0"
},
"devDependencies": {
Expand Down
16 changes: 7 additions & 9 deletions samples/uss-profile-sample/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,10 @@
resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.0.tgz#d7974ac234e79ce220e15fc4f7f17d880754b739"
integrity sha512-lWs7oVjXpotWw8bu4NxPszu+MiTJgzdiYgj/0q0OBYLJdoZtKBTGRSohtoLZWpu6mfObiEICI1k8UDE8v7xbPw==

"@zowe/[email protected].1":
version "7.18.1"
resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.1.tgz#546a63f5ed880418f0e0496d0218c284c815c3ee"
integrity sha512-bcAnauDpTQXCPT8rMx2wrZwhg6xih1lDujG20h1sUGJC5eqvsNCq6gvpOtcahEpUF25oBJ931dKlIu1T99LQ7w==
"@zowe/[email protected].4":
version "7.18.4"
resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.4.tgz#b755a063217a45bdffffb8d21c30afaad136b08c"
integrity sha512-eeVYZ+s9OlgqnHVVopJj3Bz4Ir6gDos5ZiT9Zf+gB6DQaeHFyvC4a2JZrLu9bEMAiVyiCTJydRaspcN4xoEi9Q==

"@zowe/[email protected]":
version "7.18.0"
Expand Down Expand Up @@ -431,14 +431,12 @@
resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.18.0.tgz#1d7be74dae8a7844386a50b3b581046dd8febe2c"
integrity sha512-rrk/fQEOb7izgZnlsxFcniuY+NZaDZPDI90/ePzdWSQZPeA1lzq42Wzww9KXMpnZa3sliXXe9qfLBnrCnZYCbg==

"@zowe/zowe-explorer-api@^2.10.0":
version "2.10.0"
resolved "https://registry.npmjs.org/@zowe/zowe-explorer-api/-/zowe-explorer-api-2.10.0.tgz#a015dfb5dfb47549b86fc13359e9116cd150f39a"
integrity sha512-wx/IikaoMYWD/MCkSlSAGcDVC9JopF7jh321cTNRn/sAWpvBxVywaQ9YQniKZ9ADy6FyDIOR8/gTWLb47TElrQ==
"@zowe/zowe-explorer-api@file:../../packages/zowe-explorer-api":
version "2.12.0-SNAPSHOT"
dependencies:
"@types/vscode" "^1.53.2"
"@zowe/cli" "^7.18.0"
"@zowe/secrets-for-zowe-sdk" "7.18.1"
"@zowe/secrets-for-zowe-sdk" "7.18.4"
handlebars "^4.7.7"
semver "^7.5.3"

Expand Down
2 changes: 1 addition & 1 deletion samples/vue-webview-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"watch": "npx tsc -watch -p ./"
},
"dependencies": {
"@zowe/zowe-explorer-api": "^2.10.0"
"@zowe/zowe-explorer-api": "file:../../packages/zowe-explorer-api"
},
"devDependencies": {
"@types/node": "^16.18.41",
Expand Down
16 changes: 7 additions & 9 deletions samples/vue-webview-sample/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,10 @@
resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.0.tgz#d7974ac234e79ce220e15fc4f7f17d880754b739"
integrity sha512-lWs7oVjXpotWw8bu4NxPszu+MiTJgzdiYgj/0q0OBYLJdoZtKBTGRSohtoLZWpu6mfObiEICI1k8UDE8v7xbPw==

"@zowe/[email protected].1":
version "7.18.1"
resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.1.tgz#546a63f5ed880418f0e0496d0218c284c815c3ee"
integrity sha512-bcAnauDpTQXCPT8rMx2wrZwhg6xih1lDujG20h1sUGJC5eqvsNCq6gvpOtcahEpUF25oBJ931dKlIu1T99LQ7w==
"@zowe/[email protected].4":
version "7.18.4"
resolved "https://registry.npmjs.org/@zowe/secrets-for-zowe-sdk/-/secrets-for-zowe-sdk-7.18.4.tgz#b755a063217a45bdffffb8d21c30afaad136b08c"
integrity sha512-eeVYZ+s9OlgqnHVVopJj3Bz4Ir6gDos5ZiT9Zf+gB6DQaeHFyvC4a2JZrLu9bEMAiVyiCTJydRaspcN4xoEi9Q==

"@zowe/[email protected]":
version "7.18.0"
Expand Down Expand Up @@ -490,14 +490,12 @@
resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-7.18.0.tgz#1d7be74dae8a7844386a50b3b581046dd8febe2c"
integrity sha512-rrk/fQEOb7izgZnlsxFcniuY+NZaDZPDI90/ePzdWSQZPeA1lzq42Wzww9KXMpnZa3sliXXe9qfLBnrCnZYCbg==

"@zowe/zowe-explorer-api@^2.10.0":
version "2.10.0"
resolved "https://registry.npmjs.org/@zowe/zowe-explorer-api/-/zowe-explorer-api-2.10.0.tgz#a015dfb5dfb47549b86fc13359e9116cd150f39a"
integrity sha512-wx/IikaoMYWD/MCkSlSAGcDVC9JopF7jh321cTNRn/sAWpvBxVywaQ9YQniKZ9ADy6FyDIOR8/gTWLb47TElrQ==
"@zowe/zowe-explorer-api@file:../../packages/zowe-explorer-api":
version "2.12.0-SNAPSHOT"
dependencies:
"@types/vscode" "^1.53.2"
"@zowe/cli" "^7.18.0"
"@zowe/secrets-for-zowe-sdk" "7.18.1"
"@zowe/secrets-for-zowe-sdk" "7.18.4"
handlebars "^4.7.7"
semver "^7.5.3"

Expand Down

0 comments on commit 18c221b

Please sign in to comment.