Skip to content

Commit

Permalink
Merge branch 'user/amitjoshi/pacUiHack' of https://github.com/microso…
Browse files Browse the repository at this point in the history
…ft/powerplatform-vscode into user/amitjoshi/pacUiHack
  • Loading branch information
amitjoshi committed Apr 19, 2024
2 parents 8b63e73 + 19854d9 commit c34c060
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
31 changes: 31 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,29 @@
"command": "powerpages.websitePanel.bootstrap-migration",
"title": "Bootstrap Migration"
},
{
"command": "powerpages.websitePanel.refresh",
"title": "Refresh",
"icon": "$(refresh)"
},
{
"command": "powerpages.websitePanel.downloadWebsite",
"title": "Download Website",
"icon": "$(arrow-down)"
},
{
"command": "powerpages.websitePanel.uploadWebsite",
"title": "Upload Website",
"icon": "$(arrow-up)"
},
{
"command": "powerpages.websitePanel.uploadWebsiteForceAll",
"title": "Upload Website (force all)"
},
{
"command": "powerpages.websitePanel.bootstrap-migration",
"title": "Bootstrap Migration"
},
{
"command": "microsoft-powerapps-portals.webpage",
"category": "Powerpages",
Expand Down Expand Up @@ -1005,6 +1028,14 @@
{
"id": "microsoft-powerapps-portals.powerpages-copilot",
"label": "Copilot In Power Pages"
},
{
"id": "microsoft-powerpages-download",
"label": "Download"
},
{
"id": "microsoft-powerpages-upload",
"label": "Upload"
}
],
"viewsContainers": {
Expand Down
11 changes: 11 additions & 0 deletions src/client/pac/PacTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,14 @@ export type WebsiteListing = {


export type PacOrgWhoOutput = PacOutputWithResult<ActiveOrgOutput>;

export type WebsiteListOutput = PacOutput & {
Results: WebsiteListing[];
}

export type WebsiteListing = {
Index: number;
WebsiteId: string;
WebsiteName: string;
}

6 changes: 5 additions & 1 deletion src/client/pac/PacWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as fs from "fs-extra";
import { ChildProcessWithoutNullStreams, spawn } from "child_process";
import { BlockingQueue } from "../../common/utilities/BlockingQueue";
import { ITelemetry } from "../telemetry/ITelemetry";
import { PacOutput, PacAdminListOutput, PacAuthListOutput, PacSolutionListOutput, PacOrgListOutput, PacOrgWhoOutput, WebsiteListOutput } from "./PacTypes";
import { PacOutput, PacAdminListOutput, PacAuthListOutput, PacSolutionListOutput, PacOrgListOutput, PacOrgWhoOutput, WebsiteListOutput, WebsiteListOutput } from "./PacTypes";
import { v4 } from "uuid";
import { oneDSLoggerWrapper } from "../../common/OneDSLoggerTelemetry/oneDSLoggerWrapper";

Expand Down Expand Up @@ -184,6 +184,10 @@ export class PacWrapper {
return this.executeCommandAndParseResults<WebsiteListOutput>(new PacArguments("paportal", "list"));
}

public async websiteList(): Promise<WebsiteListOutput> {
return this.executeCommandAndParseResults<WebsiteListOutput>(new PacArguments("paportal", "list"));
}

public exit() : void {
this.pacInterop.exit();
}
Expand Down

0 comments on commit c34c060

Please sign in to comment.