Skip to content

Commit

Permalink
Merge branch 'close-connection' of github.com:tiantn/vscode-extension…
Browse files Browse the repository at this point in the history
…-for-zowe into close-connection
  • Loading branch information
lauren-li committed Jun 7, 2021
2 parents 47e3bcf + 17efef5 commit ce68885
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 70 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@
"vscode": "^1.43.0"
},
"dependencies": {
"@zowe/cli": "6.30.0",
"@zowe/cli": "6.31.1",
"vscode-nls": "4.1.2"
},
"devDependencies": {
"@types/mocha": "^2.2.42",
"@types/node": "^10.17.24",
"@types/vscode": "^1.43.0",
"@types/mocha": "^2.2.42",
"@typescript-eslint/eslint-plugin": "^4.9.0",
"@typescript-eslint/parser": "^4.9.0",
"typescript": "^3.8.3",
"eslint": "^7.14.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-prettier": "^3.1.4",
"vscode-test": "^1.4.0",
"vscode-nls-dev": "^3.3.2",
"vsce": "^1.81.1",
"mocha": "^4.0.0",
"prettier": "2.0.5",
"rimraf": "^3.0.2",
"typescript": "^3.8.3",
"vsce": "^1.81.1",
"vscode-nls-dev": "^3.3.2",
"vscode-test": "^1.4.0",
"yarn": "1.22.10"
},
"resolutions": {
Expand Down
2 changes: 1 addition & 1 deletion packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen
- Added the secure credentials support for Extenders API [#1306](https://github.com/zowe/vscode-extension-for-zowe/pull/1306). Thanks @JillieBeanSim
- Improved Zowe Explorer extenders. Zowe Explorer extenders can now utilize Extender API to have profile folder and meta file created upon initialization [#1282](https://github.com/zowe/vscode-extension-for-zowe/pull/1282). Thanks @JillieBeanSim
- Improved the Command Palette by adding "Zowe Explorer:" before all commands that are related to the extension. Removed some commands from the palette that caused issues [#1308](https://github.com/zowe/vscode-extension-for-zowe/pull/1308). Thanks @lauren-li
- Updated Theia Tests. Now you need to have Zowe CLI 6.30.0 and the latest .vsix file in the `theia/plugins` folder to run Theia tests [#1268](https://github.com/zowe/vscode-extension-for-zowe/pull/1268). Thanks @deepali-hub
- Updated Theia Tests. Now you need to have Zowe CLI 6.31.0 and the latest .vsix file in the `theia/plugins` folder to run Theia tests [#1268](https://github.com/zowe/vscode-extension-for-zowe/pull/1268). Thanks @deepali-hub
- Fixed the issue that prevented the `issue STOP command` function from executing correctly [#1304](https://github.com/zowe/vscode-extension-for-zowe/pull/1304). Thanks
@nickImbirev
- Fixed the issue that caused the Add Profile icon to disappear [#1307](https://github.com/zowe/vscode-extension-for-zowe/pull/1307). Thanks @lauren-li
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ describe("Extension Integration Tests", () => {
afterEach(async function () {
this.timeout(TIMEOUT);
const createTestFileName = pattern + ".EXT.CREATE.DATASET.TEST";
const allocateLikeFileName = pattern + ".EXT.ALLOC.LIKE";
try {
await zowe.Delete.dataSet(session, createTestFileName);
await zowe.Delete.dataSet(session, allocateLikeFileName);
} catch (err) {
// Do nothing
}
Expand Down Expand Up @@ -204,6 +206,27 @@ describe("Extension Integration Tests", () => {
}).timeout(TIMEOUT);
});

describe("Allocate Like", () => {
it("should allocate a copy of the requested data set", async () => {
const testOriginalName = pattern + ".EXT.SAMPLE.PDS";
const testOriginalNode = new ZoweDatasetNode(
testOriginalName,
vscode.TreeItemCollapsibleState.Collapsed,
sessionNode,
session
);
const testCopyName = pattern + ".EXT.ALLOC.LIKE";

const inputStub = sandbox.stub(vscode.window, "showInputBox");
inputStub.onCall(0).returns(testCopyName);

await dsActions.allocateLike(testTree, testOriginalNode);

const response = await zowe.List.dataSet(sessionNode.getSession(), testCopyName, {});
expect(response.success).to.equal(true);
}).timeout(TIMEOUT);
});

describe("Deactivate", () => {
it("should clean up the local files when deactivate is invoked", async () => {
try {
Expand Down
4 changes: 0 additions & 4 deletions packages/zowe-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1230,10 +1230,6 @@
"command": "zowe.deleteDataset",
"when": "never"
},
{
"command": "zowe.allocateLike",
"when": "never"
},
{
"command": "zowe.hMigrateDataSet",
"when": "never"
Expand Down
19 changes: 17 additions & 2 deletions packages/zowe-explorer/src/dataset/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export async function allocateLike(datasetProvider: IZoweTree<IZoweDatasetTreeNo
quickpick.ignoreFocusOut = true;

for (const thisSession of datasetProvider.mSessionNodes) {
qpItems.push(new FilterItem(thisSession.label.trim()));
if (!thisSession.label.trim().includes("Favorites")) {
qpItems.push(new FilterItem(thisSession.label.trim()));
}
}
quickpick.items = [...qpItems];

Expand All @@ -73,19 +75,32 @@ export async function allocateLike(datasetProvider: IZoweTree<IZoweDatasetTreeNo
vscode.window.showInformationMessage(localize("allocateLike.noSelection", "You must select a profile."));
return;
} else {
currSession = datasetProvider.mSessionNodes.find((thisSession) => thisSession.label === selection.label);
currSession = datasetProvider.mSessionNodes.find(
(thisSession) => thisSession.label.trim() === selection.label.trim()
);
profile = currSession.getProfile();
}
quickpick.dispose();

// The user must enter the name of a data set to copy
const currSelection =
datasetProvider.getTreeView().selection.length > 0
? datasetProvider.getTreeView().selection[0].label.trim()
: null;
likeDSName = await vscode.window.showInputBox({
ignoreFocusOut: true,
placeHolder: localize(
"allocateLike.enterLikePattern",
"Enter the name of the data set to copy attributes from"
),
value: currSelection,
});
if (!likeDSName) {
vscode.window.showInformationMessage(
localize("allocateLike.noNewName", "You must enter a new data set name.")
);
return;
}
} else {
// User called allocateLike by right-clicking a node
profile = node.getProfile();
Expand Down
1 change: 1 addition & 0 deletions scripts/systemTestEnv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export async function cleanupSystemTestEnvironment() {
await deleteDataset(`${normalPattern}.EXT.PDS`);
await deleteDataset(`${normalPattern}.EXT.PS`);
await deleteDataset(`${normalPattern}.EXT.SAMPLE.PDS`);
await deleteDataset(`${normalPattern}.EXT.ALLOC.LIKE`);
await deleteDataset(`${normalPattern}.PUBLIC.BIN`);
await deleteDataset(`${normalPattern}.PUBLIC.TCLASSIC`);
await deleteDataset(`${normalPattern}.PUBLIC.TPDS`);
Expand Down
114 changes: 57 additions & 57 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1967,36 +1967,36 @@
resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d"
integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==

"@zowe/cli@6.30.0":
version "6.30.0"
resolved "https://registry.npmjs.org/@zowe/cli/-/cli-6.30.0.tgz#e23f81ebd58acfd30de5410dc9c6edf1f480f23b"
integrity sha512-dH+1xhy6yNmHh2pOuDESftgN2XalKAbCcN+SteeIrHbYKAlyxl2xyouTuMXNFVoCpsJKFVGk5udd49JNfAN+Vw==
"@zowe/cli@6.31.1":
version "6.31.1"
resolved "https://registry.npmjs.org/@zowe/cli/-/cli-6.31.1.tgz#b47ea3b3a0271596eb5ee8d8047b55e06cee69f1"
integrity sha512-Ocvn5gl6N71PXMz4DZeeN0dry21XGYVrAZf/ZtKGlCtkO6g8p/1Ydd0xjzRx2z5dKEVi624PK8xHqi2g3iEOXQ==
dependencies:
"@zowe/core-for-zowe-sdk" "6.30.0"
"@zowe/imperative" "4.13.0"
"@zowe/core-for-zowe-sdk" "6.31.1"
"@zowe/imperative" "4.13.1"
"@zowe/perf-timing" "1.0.7"
"@zowe/provisioning-for-zowe-sdk" "6.30.0"
"@zowe/zos-console-for-zowe-sdk" "6.30.0"
"@zowe/zos-files-for-zowe-sdk" "6.30.0"
"@zowe/zos-jobs-for-zowe-sdk" "6.30.0"
"@zowe/zos-tso-for-zowe-sdk" "6.30.0"
"@zowe/zos-uss-for-zowe-sdk" "6.30.0"
"@zowe/zos-workflows-for-zowe-sdk" "6.30.0"
"@zowe/zosmf-for-zowe-sdk" "6.30.0"
"@zowe/provisioning-for-zowe-sdk" "6.31.1"
"@zowe/zos-console-for-zowe-sdk" "6.31.1"
"@zowe/zos-files-for-zowe-sdk" "6.31.1"
"@zowe/zos-jobs-for-zowe-sdk" "6.31.1"
"@zowe/zos-tso-for-zowe-sdk" "6.31.1"
"@zowe/zos-uss-for-zowe-sdk" "6.31.1"
"@zowe/zos-workflows-for-zowe-sdk" "6.31.1"
"@zowe/zosmf-for-zowe-sdk" "6.31.1"
get-stdin "7.0.0"
minimatch "3.0.4"

"@zowe/core-for-zowe-sdk@6.30.0":
version "6.30.0"
resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-6.30.0.tgz#197b5e8ff7a79eb6e936c57f4c1c1038d8d2f543"
integrity sha512-CY6gT28ZQBsxsqPDI9MRDmCHJZwM8ZauI7g6mwxleIrkNA1gTGiGeTmW7rAM3Pbj/+KvaBhtMhZPlaUSssXiDA==
"@zowe/core-for-zowe-sdk@6.31.1":
version "6.31.1"
resolved "https://registry.npmjs.org/@zowe/core-for-zowe-sdk/-/core-for-zowe-sdk-6.31.1.tgz#f5f7dbac406e7e7b0abd4a88d662f92cc68722c0"
integrity sha512-3KU4AK7x8wZcRRb0WSXynI4R3wONZVxwNUeywLsaib2ERJ0/xHp9rd04zGfOcF56Mm4glSkNri9lGl5IISsElg==
dependencies:
string-width "2.1.1"

"@zowe/imperative@4.13.0":
version "4.13.0"
resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-4.13.0.tgz#bbe74fead5be6fd86a5a2faae28423660b1b1cce"
integrity sha512-SVscKWn3v5BvUsshLFjwMeKYHmHacnXvuRS0oBMvTKkv89Lxxj7eIIE8wEQi3LDhF+mAnhTAo61/LQeKA/ItAQ==
"@zowe/imperative@4.13.1":
version "4.13.1"
resolved "https://registry.npmjs.org/@zowe/imperative/-/imperative-4.13.1.tgz#4fc6f10f7c4c30f013f50b208187f587c0e9ddb3"
integrity sha512-vGQeLHKHkNfTXEMN7ErKy9M1X/Tt96iTsg8oE3jhSuBZGogL04VSN0hNrhlAwpV91IWZlawAtrCAktt41qWr1g==
dependencies:
"@types/lodash-deep" "2.0.0"
"@types/yargs" "13.0.4"
Expand Down Expand Up @@ -2039,22 +2039,22 @@
fs-extra "8.1.0"
pkg-up "2.0.0"

"@zowe/provisioning-for-zowe-sdk@6.30.0":
version "6.30.0"
resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-6.30.0.tgz#deb69be022442b4a9e9f388b4496bd8c4c4ff953"
integrity sha512-Kid8kcXpdpS3AaorbJ7Dy+B49+qK9pU+K8PYvYmSjnjH5vJIxkUKyzIpwanV8SI1J5TXiJNMYXzppimO84eL0w==
"@zowe/provisioning-for-zowe-sdk@6.31.1":
version "6.31.1"
resolved "https://registry.npmjs.org/@zowe/provisioning-for-zowe-sdk/-/provisioning-for-zowe-sdk-6.31.1.tgz#61d2834a2249af49671f374c7d666acf2d235949"
integrity sha512-Pe08rxj+sEPU4nmm3PmnEFfVvnc9Ev/YfSnsCFVY8+Zq4daFVa9O7EMmFl3XVvlfMqLUrJUP7o9QZWtWg3yNTA==
dependencies:
js-yaml "3.13.1"

"@zowe/zos-console-for-zowe-sdk@6.30.0":
version "6.30.0"
resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-6.30.0.tgz#9e69b4536358b7c2dc58724d9abc7319bcdba5d1"
integrity sha512-3+EMdJtAk1YwQZ78V+6/6jOOOvoMjCZzlrEzYM1CqYq7LfkwjpKWarPGfu1e1Bn4LxVlANimeRM1ujeneRy+vQ==
"@zowe/zos-console-for-zowe-sdk@6.31.1":
version "6.31.1"
resolved "https://registry.npmjs.org/@zowe/zos-console-for-zowe-sdk/-/zos-console-for-zowe-sdk-6.31.1.tgz#b113892c0819272bdcd843aecc984a6dbc25e4f3"
integrity sha512-+P8LukMSoTPtKEFTbcj9nkVbg8Z8HYB1fhPFWdjg/NlhqqB2m1Ny4zJ+zLEUtcuCUj/6u3+k+tHauNHX3cEKRg==

"@zowe/zos-files-for-zowe-sdk@6.30.0":
version "6.30.0"
resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-6.30.0.tgz#dd55432d846c74146d42aec6b8cd2666bca082d7"
integrity sha512-9Wpy/5EQgoLLh6eWS2mo1i3Pcb7QVBsq4fXf51UVzLU6C0qUV7+ByPgv2cSo4KX7IxLXRuMIATDw06RKdg1c8A==
"@zowe/zos-files-for-zowe-sdk@6.31.1":
version "6.31.1"
resolved "https://registry.npmjs.org/@zowe/zos-files-for-zowe-sdk/-/zos-files-for-zowe-sdk-6.31.1.tgz#c05cadb273800f0456edcbfc4fef8d9f9e39539e"
integrity sha512-GBFeU+zrV6TGC+gP/DAB+qiXX0JBXSuzswLZxANOQurSVsI+KWqkR3NPGBMVvuLqzFYZJSpeDGNPZ1pe7+42GQ==
dependencies:
minimatch "3.0.4"

Expand All @@ -2065,38 +2065,38 @@
dependencies:
zos-node-accessor "^1.0.8"

"@zowe/zos-jobs-for-zowe-sdk@6.30.0":
version "6.30.0"
resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-6.30.0.tgz#d0e831946f385d3c0efd493aad6f758cc003eb65"
integrity sha512-9FMEp2Y3HqcHSbyI/lMDj9a4ieoGx7L15MNsVfkSOwpSYKWpEFEYbxwfHFgnGglzT9t+yweGwOmHQNlBexFBKA==
"@zowe/zos-jobs-for-zowe-sdk@6.31.1":
version "6.31.1"
resolved "https://registry.npmjs.org/@zowe/zos-jobs-for-zowe-sdk/-/zos-jobs-for-zowe-sdk-6.31.1.tgz#ace2d01d72a4bd3624d1f86227717b941c6ee4fb"
integrity sha512-47R95DHNxXOwzfkk5Um5bAxvGSGouBPuqHhzb5yC12GELmbPlL1uG2mtDL2TV9ditwAcb8mY66GrVdy/xUT6og==
dependencies:
"@zowe/zos-files-for-zowe-sdk" "6.30.0"
"@zowe/zos-files-for-zowe-sdk" "6.31.1"

"@zowe/zos-tso-for-zowe-sdk@6.30.0":
version "6.30.0"
resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-6.30.0.tgz#423be1bab6f708dd28f1d10ca119a18ac680986b"
integrity sha512-3IF7qMvEpVSmVve+anXEJW5EUDXgJQbnP4Z6cEdxYXIQ/XggdAzP6QhnXefte0UViXV7Rjex8XJw8xRHeaR2+g==
"@zowe/zos-tso-for-zowe-sdk@6.31.1":
version "6.31.1"
resolved "https://registry.npmjs.org/@zowe/zos-tso-for-zowe-sdk/-/zos-tso-for-zowe-sdk-6.31.1.tgz#dd16f900a7499182f528f324810df6220fe0f14b"
integrity sha512-mY1+C0R8oHdjEboRTtwCWWJG/lZO7Kw22b8MLbf9XDuFCy163+Pixh2iCwuSE1+23wvqP+RkO6ETQWHvC4ggZw==
dependencies:
"@zowe/zosmf-for-zowe-sdk" "6.30.0"
"@zowe/zosmf-for-zowe-sdk" "6.31.1"

"@zowe/zos-uss-for-zowe-sdk@6.30.0":
version "6.30.0"
resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-6.30.0.tgz#9da9e86cf5fe9482ae18265ddf303773e247d7d6"
integrity sha512-DIbs0dGvS4lN+Wy0S8XJ6Zt56YFgiqnL5Z0NLZS3klILzNBeeAbYrUw5EO7jN7sf3r8n5ZkJ45VzdCpA3SgqGA==
"@zowe/zos-uss-for-zowe-sdk@6.31.1":
version "6.31.1"
resolved "https://registry.npmjs.org/@zowe/zos-uss-for-zowe-sdk/-/zos-uss-for-zowe-sdk-6.31.1.tgz#0a1855592f3994be3e345be072cdf762b9756493"
integrity sha512-X48jtVKU7HivPqsSwr0x93iG8mpxNAMDcGD+xFvEpM2ze1TXCCDM31LJ41+gNIJu6v3xreE/sCcpDDogq20TiQ==
dependencies:
ssh2 "0.8.7"

"@zowe/zos-workflows-for-zowe-sdk@6.30.0":
version "6.30.0"
resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-6.30.0.tgz#ae36c83d3018de873ac80fe65db92855719332ab"
integrity sha512-4GrGUlylQOcgANljVYmb6Y6cZAbnII7Gtt7YgQ7A+b4h7ZLd8TDgcR2kTE7luswvWiAoTJ0336/3+2Mmby6RLg==
"@zowe/zos-workflows-for-zowe-sdk@6.31.1":
version "6.31.1"
resolved "https://registry.npmjs.org/@zowe/zos-workflows-for-zowe-sdk/-/zos-workflows-for-zowe-sdk-6.31.1.tgz#a79ac2f5b5afc7cbcd579a1df10be65c8752b978"
integrity sha512-f5/z3S5K28tmK4EoI5zeM7JbiiKrZC35m84nL2F8WLwGCgJwxWwg2zolMoTGGZmdk+dV8LmRZYMTF356AhBvsw==
dependencies:
"@zowe/zos-files-for-zowe-sdk" "6.30.0"
"@zowe/zos-files-for-zowe-sdk" "6.31.1"

"@zowe/zosmf-for-zowe-sdk@6.30.0":
version "6.30.0"
resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-6.30.0.tgz#2de516d96277d43b06c55b5ba012cf058a72b34b"
integrity sha512-xgT4xvevQTashfW5wchafz5aP4G9fceWeuNJrACo/XggkjJbPR/h1FstjG2D7SNK1HV8RoKO23mZT91Nb7YxKg==
"@zowe/zosmf-for-zowe-sdk@6.31.1":
version "6.31.1"
resolved "https://registry.npmjs.org/@zowe/zosmf-for-zowe-sdk/-/zosmf-for-zowe-sdk-6.31.1.tgz#e7eb5af29ce8f3ce16ce3e3043cf1e39a875ed72"
integrity sha512-yopao1OgY0L10KMnTiGKFTErLy/o9sNcGjSudC+UZ4tO84350qOekvv0vZEuSAVii5n4rAMnqlP2yFQzcvM0oA==

abab@^2.0.0, abab@^2.0.3:
version "2.0.5"
Expand Down

0 comments on commit ce68885

Please sign in to comment.