Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
Signed-off-by: enam-khan <[email protected]>
  • Loading branch information
enamkhan committed Feb 14, 2025
1 parent 6244de8 commit 6e32281
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
14 changes: 9 additions & 5 deletions packages/vsce/src/utils/profileManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ export class ProfileManagement {
const { response } = await runGetResource({
session,
resourceName: CicsCmciConstants.CICS_CMCI_REGION_GROUP,
profile,
...profile?.regionName && { regionName: profile.regionName },
...profile?.cicsPlex && {cicsPlex: profile.cicsPlex },
params: { criteria: `GROUP=${profile.regionName}`, queryParams: { summonly: true, nodiscard: false } }
});

Expand Down Expand Up @@ -158,7 +159,8 @@ export class ProfileManagement {
const { response } = await runGetResource({
session,
resourceName: CicsCmciConstants.CICS_CMCI_MANAGED_REGION,
profile,
...profile?.regionName && { regionName: profile.regionName },
...profile?.cicsPlex && {cicsPlex: profile.cicsPlex },
});

if (response.records?.cicsmanagedregion) {
Expand Down Expand Up @@ -199,7 +201,8 @@ export class ProfileManagement {

const { response } = await runGetResource({
session,
profile,
...profile?.regionName && { regionName: profile.regionName },
...profile?.cicsPlex && {cicsPlex: profile.cicsPlex },
resourceName: CicsCmciConstants.CICS_CMCI_MANAGED_REGION,
});

Expand Down Expand Up @@ -242,7 +245,8 @@ export class ProfileManagement {
try {
const { response } = await runGetResource({
session,
profile,
...profile?.regionName && { regionName: profile.regionName },
...profile?.cicsPlex && {cicsPlex: profile.cicsPlex },
resourceName: CicsCmciConstants.CICS_CMCI_REGION,
});

Expand Down Expand Up @@ -360,7 +364,7 @@ export class ProfileManagement {
const { response } = await runGetResource({
session,
resourceName: CicsCmciConstants.CICS_CMCI_MANAGED_REGION,
profile: { cicsPlex: plex.getPlexName() }
cicsPlex: plex.getPlexName()

Check failure on line 367 in packages/vsce/src/utils/profileManagement.ts

View workflow job for this annotation

GitHub Actions / lint

Expected indentation of 8 spaces but found 9
});
if (response.resultsummary?.api_response1 === `${CicsCmciConstants.RESPONSE_1_CODES.OK}` && response.records?.cicsmanagedregion) {
return toArray(response.records.cicsmanagedregion);
Expand Down
7 changes: 2 additions & 5 deletions packages/vsce/src/utils/resourceUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ import { imperative } from "@zowe/zowe-explorer-api";
import constants from "./constants";
import { getErrorCode } from "./errorUtils";

export async function runGetResource({ session, resourceName, profile, regionName, cicsPlex, params }: {
export async function runGetResource({ session, resourceName, regionName, cicsPlex, params }: {
session: Session,
resourceName: string,
profile?: imperative.IProfile,
regionName?: string,
cicsPlex?: string,
params?: { criteria?: string, parameter?: string; queryParams?: IResourceQueryParams; };
Expand All @@ -31,8 +30,6 @@ export async function runGetResource({ session, resourceName, profile, regionNam
try {
const response = await getResource(session, {
name: resourceName,
...profile?.regionName && { regionName: profile.regionName },
...profile?.cicsPlex && { cicsPlex: profile.cicsPlex },
...regionName && { regionName: regionName},
...cicsPlex && { cicsPlex: regionName },
...params?.criteria && { criteria: params.criteria },
Expand All @@ -53,4 +50,4 @@ export async function runGetResource({ session, resourceName, profile, regionNam
throw error;
}
}
}
}
1 change: 1 addition & 0 deletions packages/vsce/tsup.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"external": [
"vscode"
],
"minify": "terser",
"noExternal": []
}

0 comments on commit 6e32281

Please sign in to comment.