Update to Pac CLI v1.30.3 and update PacTypes `AuthProfileListing` to new schema coming from pac CLI (#796)

* Update to Pac CLI v1.30.3 - which includes the changes to auth profile json schema.

* Update PacTypes `AuthProfileListing` to new schema coming from pac CLI

* Update generated loc string updates

* Moved Release notes to CHANGELOG.md file per VS Code Marketplace integration guidelines.
This commit is contained in:
Joe Mayo (MSFT) 2024-01-24 14:09:48 -08:00 коммит произвёл GitHub
Родитель ef2624e674
Коммит 109b6d185f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
9 изменённых файлов: 218 добавлений и 206 удалений

169
CHANGELOG.md Normal file
Просмотреть файл

@ -0,0 +1,169 @@
# Change Log - Power Platform Extension
## NEXTRELEASE
- pac CLI 1.30.3, (January 2024 refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- Moved release notes to *CHANGELOG.md* file, per VS Code's [Marketplace integration](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#marketplace-integration) guidelines.
## 2.0.25
- pac CLI 1.29.11, (Update to October refresh to fix data import/export and paportal upload/download commands. See release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
## 2.0.21
- pac CLI 1.29.6 (October refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
## 2.0.13
- pac CLI 1.28.3 (September refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- Web Extension updates:
- Now Supporting image edit capability using Vscode extensions for Image editing (supported file extensions are png, jpg, webp, bmp, tga, ico, dib, jif, jpe, tpic, jpe, jpeg) #733
- File explorer now supports Power Pages actions for "Going back to Power pages Studio" and "Preview" of site's runtime instance. #697
- On browser refresh, Improved support for pre-emptive loading of image files active in editor. #736
## 2.0.11
- pac CLI 1.27.5 (August refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- (Preview) Added 'Copilot in Power Pages' to Web Extension
## 2.0.7
- QFE for styling files load for new data model schema
## 2.0.6
- QFE for styles rendering of power pages sites
## 2.0.4
- pac CLI 1.26.6 (QFE for `pac paportal bootstrap-migrate`)
## 2.0.3
- pac CLI 1.26.5 (July refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- Authentication Settings - Can now choose other Azure clouds for the "New Auth Profile" button to target [#619](https://github.com/microsoft/powerplatform-vscode/pull/619)
- Environments & Solutions panel improvements:
- Environments now display an icon for the active environment, and button added to select a different environment [#629](https://github.com/microsoft/powerplatform-vscode/pull/629)
- Solutions now have tooltip and icon to indicated managed vs. unmanaged solutions [#618](https://github.com/microsoft/powerplatform-vscode/pull/618)
- (Preview) Added AI code generation assistance with Power Pages Copilot
- Only supports vscode on the desktop currently, not available in the web extension
- Web Extension updates:
- Conflict resolution optimization for incoming changes accept scenario [#664](https://github.com/microsoft/powerplatform-vscode/pull/664)
- Optimized load of webfiles for old data model - media files are now loaded only on view a specific file action [#662](https://github.com/microsoft/powerplatform-vscode/pull/662)
- Performance optimizations and better support for revisit sessions file load [#646](https://github.com/microsoft/powerplatform-vscode/pull/646) [#668](https://github.com/microsoft/powerplatform-vscode/pull/668) [#669](https://github.com/microsoft/powerplatform-vscode/pull/669)
## 2.0.0
- pac CLI 1.25.2 (June refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- Power Pages site code edit support - in VScode web extension - for components like forms, content snippets, lists, and more
- Enhanced Power Pages (paportal) download to have CSS, JS and HTML files as placeholders always.
- Power Pages (paportal) commands to have better error handling for deployment profiles and unsupported web-files.
## 1.1.28
- pac CLI 1.24.3 (May refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- Linux and Mac - PAC switched to the [CrossPlat Dotnet Tool version](https://www.nuget.org/packages/Microsoft.PowerApps.CLI.Tool) from the x64 architectured [Linux x64](https://www.nuget.org/packages/Microsoft.PowerApps.CLI.Core.linux-x64) and [OSx x64](https://www.nuget.org/packages/Microsoft.PowerApps.CLI.Core.osx-x64) versions
- Apple Silicon arm64 machines (M1/M2) should no longer need the x64 version of the net6.0 SDK, just the ARM version
- Windows still uses the [Windows-only net48 version](https://www.nuget.org/packages/Microsoft.PowerApps.CLI), as there are still some verbs such as `pac data` which have full .NET Framework dependencies
- Optimized conflict detection for co-edits in VS Code for web
## 1.1.27
- pac CLI 1.23.3 (Apr refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- Conflict resolution support for co-edits in VS Code for web
## 1.1.25
- pac CLI 1.22.4 (see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
## 1.1.24
- hotfix to pac CLI 1.22.3 for `pac solution unpack` placing AppModule files in invalid directory
## 1.1.23
- pac CLI 1.22.2 (Mar refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- Improved Paportal manifest generation by maintaining a consistent order
## 1.1.19
- pac CLI 1.21.13 (Feb refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- Desktop extension now supports create, delete and rename for power pages site entities like webpage, webfile, templates and content-snippets
- Enhanced intellisense support - Auto-complete for Dataverse entity tags, template tags, filters, portal-specific liquid objects & their attributes
## 1.1.16
- pac CLI 1.21.8 (Dec refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
## 1.1.14
- pac CLI 1.21.4 (Nov refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- support for new data model for Power Pages in Studio web extension
## 1.1.9
- pac CLI 1.20.3 (Oct refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
## 1.1.4
- pac CLI 1.19.3 (Sept refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- fixes to Power Pages editing when hosted in vscode.dev (running as web extension)
## 1.1.2
- pac CLI 1.18.3 (Aug refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- added support for Power Pages editing when hosted in vscode.dev (running as web extension, no pac CLI supported)
## 1.0.21
- hotfix in pac CLI `pac paportal *` for #255
## 1.0.20
- PCF control debugging support in VS Code's debugger;
see for early details: https://github.com/microsoft/powerplatform-vscode/pull/231
- pac CLI 1.17.4 (July refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- when running on macOS on Apple Silicon (ARM M1/M2 CPU): make sure to also have the x64 version of the [.NET6 SDK](https://dotnet.microsoft.com/en-us/download) installed as well
## 1.0.16
- pac CLI 1.16.6 (May refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- the Power Platform panel now supports the new UNIVERSAL authentication kind that pac CLI 1.16.x introduced
## 1.0.9
- pac CLI 1.15.3 (April refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
## 1.0.5
- pac CLI 1.14.4 (March refresh QFE: pac admin backup: --notes parameter deprecated)
## 1.0.4
- pac CLI 1.14.1 (March refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
## 1.0.2
- pac CLI 1.13.6 (February refresh plus 2 fixes, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
## 1.0.1
- Extension is now released with General Availability
- New Activity Pane for this extension that lets user managed PowerPlatform credentials and shows visible PP environments
- pac CLI 1.13.4 (February refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
## 0.2.35
- pac CLI 1.12.2 (Dec/Jan refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
## 0.2.32
- pac CLI 1.11.8 (Fixes a regression in `pac solution check`)
## 0.2.31
- pac CLI 1.11.6 (Dec/Jan refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- fixed installation issue for Windows 11 Insider builds due to deprecation of WMIC
## 0.2.27
- pac CLI 1.10.4 (November refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- .NET 6 on Apple M1: pac CLI is targeting dotnetCore 5 for intel, but the .NET6 amd64 installer removes the net5 and x64 support. Users who have installed .NET 6 will need to uninstall all existing .NET bits and then install **both** the amd64 (Apple M1) and the x64 .NET 6 SDKs side by side.
- Documentation on this .NET issue can be found at [.NET Support for macOS 11 and Windows 11 for Arm64 and x64](https://github.com/dotnet/sdk/issues/22380)
- Users who only have .NET 5.0 installed do not need to take any action.
## 0.2.23
- pac CLI 1.9.8 (August refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- added pac CLI Linux support in terminal: on Windows 10, remote connect to WSL terminal (<https://code.visualstudio.com/docs/remote/wsl>)
## 0.2.19
- shortened the extension's friendly name
- pac CLI 1.9.4 (July refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- macOS: 'pac auth create' interactive login now works
## 0.2.14
- pac CLI 1.8.6 (pcf-scripts npm pkg hot fix for June refresh)
## 0.2.13
- pac CLI 1.8.5 (June refresh)
- added more Power Platform CLI command palette entries
- PA Portal editing support:
- Enhanced grammar to support include and editable tags
- Support multiple portal root folders for multi-rooted VSCode workspaces
## 0.2.9
- pac CLI 1.7.x, same as installed/updated via MSI/nuget.org
## 0.2.8
- initial public preview:
- pac CLI installed and runnable in VSCode terminal (cmd, PS, pwsh, git bash, any macOS shell like zsh, fish)
- PA Portal language services and auto complete
- known issues:
- macOS: no good check if the required separate install of dotnetCore 3.x or 5.x is present

168
README.md
Просмотреть файл

@ -18,174 +18,6 @@ Installing this extension will also make the latest Power Platform CLI (aka pac)
[Power Platform CLI Exposed](https://www.youtube.com/playlist?list=PLlrxD0HtieHhEdLHxQOU96ySSZpMCyAxf)
## Release Notes
2.0.25:
- pac CLI 1.29.11, (Update to October refresh to fix data import/export and paportal upload/download commands. See release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
2.0.21:
- pac CLI 1.29.6 (October refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
2.0.13:
- pac CLI 1.28.3 (September refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- Web Extension updates:
- Now Supporting image edit capability using Vscode extensions for Image editing (supported file extensions are png, jpg, webp, bmp, tga, ico, dib, jif, jpe, tpic, jpe, jpeg) #733
- File explorer now supports Power Pages actions for "Going back to Power pages Studio" and "Preview" of site's runtime instance. #697
- On browser refresh, Improved support for pre-emptive loading of image files active in editor. #736
2.0.11:
- pac CLI 1.27.5 (August refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- (Preview) Added 'Copilot in Power Pages' to Web Extension
2.0.7:
- QFE for styling files load for new data model schema
2.0.6:
- QFE for styles rendering of power pages sites
2.0.4:
- pac CLI 1.26.6 (QFE for `pac paportal bootstrap-migrate`)
2.0.3:
- pac CLI 1.26.5 (July refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- Authentication Settings - Can now choose other Azure clouds for the "New Auth Profile" button to target [#619](https://github.com/microsoft/powerplatform-vscode/pull/619)
- Environments & Solutions panel improvements:
- Environments now display an icon for the active environment, and button added to select a different environment [#629](https://github.com/microsoft/powerplatform-vscode/pull/629)
- Solutions now have tooltip and icon to indicated managed vs. unmanaged solutions [#618](https://github.com/microsoft/powerplatform-vscode/pull/618)
- (Preview) Added AI code generation assistance with Power Pages Copilot
- Only supports vscode on the desktop currently, not available in the web extension
- Web Extension updates:
- Conflict resolution optimization for incoming changes accept scenario [#664](https://github.com/microsoft/powerplatform-vscode/pull/664)
- Optimized load of webfiles for old data model - media files are now loaded only on view a specific file action [#662](https://github.com/microsoft/powerplatform-vscode/pull/662)
- Performance optimizations and better support for revisit sessions file load [#646](https://github.com/microsoft/powerplatform-vscode/pull/646) [#668](https://github.com/microsoft/powerplatform-vscode/pull/668) [#669](https://github.com/microsoft/powerplatform-vscode/pull/669)
2.0.0:
- pac CLI 1.25.2 (June refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- Power Pages site code edit support - in VScode web extension - for components like forms, content snippets, lists, and more
- Enhanced Power Pages (paportal) download to have CSS, JS and HTML files as placeholders always.
- Power Pages (paportal) commands to have better error handling for deployment profiles and unsupported web-files.
1.1.28:
- pac CLI 1.24.3 (May refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- Linux and Mac - PAC switched to the [CrossPlat Dotnet Tool version](https://www.nuget.org/packages/Microsoft.PowerApps.CLI.Tool) from the x64 architectured [Linux x64](https://www.nuget.org/packages/Microsoft.PowerApps.CLI.Core.linux-x64) and [OSx x64](https://www.nuget.org/packages/Microsoft.PowerApps.CLI.Core.osx-x64) versions
- Apple Silicon arm64 machines (M1/M2) should no longer need the x64 version of the net6.0 SDK, just the ARM version
- Windows still uses the [Windows-only net48 version](https://www.nuget.org/packages/Microsoft.PowerApps.CLI), as there are still some verbs such as `pac data` which have full .NET Framework dependencies
- Optimized conflict detection for co-edits in VS Code for web
1.1.27:
- pac CLI 1.23.3 (Apr refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- Conflict resolution support for co-edits in VS Code for web
1.1.25:
- pac CLI 1.22.4 (see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
1.1.24:
- hotfix to pac CLI 1.22.3 for `pac solution unpack` placing AppModule files in invalid directory
1.1.23:
- pac CLI 1.22.2 (Mar refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- Improved Paportal manifest generation by maintaining a consistent order
1.1.19:
- pac CLI 1.21.13 (Feb refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- Desktop extension now supports create, delete and rename for power pages site entities like webpage, webfile, templates and content-snippets
- Enhanced intellisense support - Auto-complete for Dataverse entity tags, template tags, filters, portal-specific liquid objects & their attributes
1.1.16:
- pac CLI 1.21.8 (Dec refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
1.1.14:
- pac CLI 1.21.4 (Nov refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- support for new data model for Power Pages in Studio web extension
1.1.9:
- pac CLI 1.20.3 (Oct refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
1.1.4:
- pac CLI 1.19.3 (Sept refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- fixes to Power Pages editing when hosted in vscode.dev (running as web extension)
1.1.2:
- pac CLI 1.18.3 (Aug refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- added support for Power Pages editing when hosted in vscode.dev (running as web extension, no pac CLI supported)
1.0.21:
- hotfix in pac CLI `pac paportal *` for #255
1.0.20:
- PCF control debugging support in VS Code's debugger;
see for early details: https://github.com/microsoft/powerplatform-vscode/pull/231
- pac CLI 1.17.4 (July refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- when running on macOS on Apple Silicon (ARM M1/M2 CPU): make sure to also have the x64 version of the [.NET6 SDK](https://dotnet.microsoft.com/en-us/download) installed as well
1.0.16:
- pac CLI 1.16.6 (May refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- the Power Platform panel now supports the new UNIVERSAL authentication kind that pac CLI 1.16.x introduced
1.0.9:
- pac CLI 1.15.3 (April refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
1.0.5:
- pac CLI 1.14.4 (March refresh QFE: pac admin backup: --notes parameter deprecated)
1.0.4:
- pac CLI 1.14.1 (March refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
1.0.2:
- pac CLI 1.13.6 (February refresh plus 2 fixes, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
1.0.1:
- Extension is now released with General Availability
- New Activity Pane for this extension that lets user managed PowerPlatform credentials and shows visible PP environments
- pac CLI 1.13.4 (February refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
0.2.35:
- pac CLI 1.12.2 (Dec/Jan refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
0.2.32:
- pac CLI 1.11.8 (Fixes a regression in `pac solution check`)
0.2.31:
- pac CLI 1.11.6 (Dec/Jan refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- fixed installation issue for Windows 11 Insider builds due to deprecation of WMIC
0.2.27:
- pac CLI 1.10.4 (November refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- .NET 6 on Apple M1: pac CLI is targeting dotnetCore 5 for intel, but the .NET6 amd64 installer removes the net5 and x64 support. Users who have installed .NET 6 will need to uninstall all existing .NET bits and then install **both** the amd64 (Apple M1) and the x64 .NET 6 SDKs side by side.
- Documentation on this .NET issue can be found at [.NET Support for macOS 11 and Windows 11 for Arm64 and x64](https://github.com/dotnet/sdk/issues/22380)
- Users who only have .NET 5.0 installed do not need to take any action.
0.2.23:
- pac CLI 1.9.8 (August refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- added pac CLI Linux support in terminal: on Windows 10, remote connect to WSL terminal (<https://code.visualstudio.com/docs/remote/wsl>)
0.2.19:
- shortened the extension's friendly name
- pac CLI 1.9.4 (July refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/))
- macOS: 'pac auth create' interactive login now works
0.2.14:
- pac CLI 1.8.6 (pcf-scripts npm pkg hot fix for June refresh)
0.2.13:
- pac CLI 1.8.5 (June refresh)
- added more Power Platform CLI command palette entries
- PA Portal editing support:
- Enhanced grammar to support include and editable tags
- Support multiple portal root folders for multi-rooted VSCode workspaces
0.2.9:
- pac CLI 1.7.x, same as installed/updated via MSI/nuget.org
0.2.8:
- initial public preview:
- pac CLI installed and runnable in VSCode terminal (cmd, PS, pwsh, git bash, any macOS shell like zsh, fish)
- PA Portal language services and auto complete
- known issues:
- macOS: no good check if the required separate install of dotnetCore 3.x or 5.x is present
## Requirements
- VSCode >= 1.73.0

Просмотреть файл

@ -336,7 +336,7 @@ async function snapshot() {
}
const feedName = 'CAP_ISVExp_Tools_Stable';
const cliVersion = '1.29.11';
const cliVersion = '1.30.3';
const recompile = gulp.series(
clean,

Просмотреть файл

@ -176,8 +176,8 @@
"The {0} represents the optional name the user provided for the profile)"
]
},
"Resource: {0}/The {0} represents profile's resource/environment URL": {
"message": "Resource: {0}",
"Default Environment: {0}/The {0} represents profile's resource/environment URL": {
"message": "Default Environment: {0}",
"comment": [
"The {0} represents profile's resource/environment URL"
]

Просмотреть файл

@ -69,6 +69,10 @@
<source xml:lang="en">Creating {0}...</source>
<note>{0} will be replaced by the entity type.</note>
</trans-unit>
<trans-unit id="++CODE++5bd78fcb75f98d65ab8f89a8f0b6681c25c13308fa8643c44ab459b7783c06c9">
<source xml:lang="en">Default Environment: {0}</source>
<note>The {0} represents profile's resource/environment URL</note>
</trans-unit>
<trans-unit id="++CODE++e9f79ac902b11087dd0d34e8afc1de54df4e48d45861a0c0b6e4edd3c204f314">
<source xml:lang="en">Display Name: {0}
Unique Name: {1}
@ -230,10 +234,6 @@ The {3} represents Dataverse Environment's Organization ID (GUID)</note>
<source xml:lang="en">Profile Kind: {0}</source>
<note>The {0} represents the profile type (Admin vs Dataverse)</note>
</trans-unit>
<trans-unit id="++CODE++0906cdfd1c60099397a97c4da29453b3f0cef126c408d6ba317e2d5e2d5e9e78">
<source xml:lang="en">Resource: {0}</source>
<note>The {0} represents profile's resource/environment URL</note>
</trans-unit>
<trans-unit id="++CODE++b62120c5416487f4c793d75aee7fea083971e5ac665a3f35767023f408f482e5">
<source xml:lang="en">Response data is empty</source>
</trans-unit>

Просмотреть файл

@ -104,7 +104,7 @@ export class AuthTreeView implements vscode.TreeDataProvider<AuthProfileTreeItem
const confirm = vscode.l10n.t("Confirm");
const confirmResult = await vscode.window.showWarningMessage(
vscode.l10n.t({ message: "Are you sure you want to delete the Auth Profile {0}-{1}?",
args: [item.model.User, item.model.Resource],
args: [item.model.User, item.model.ActiveOrganization?.EnvironmentUrl],
comment: ["{0} is the user name, {1} is the URL of environment of the auth profile"] }),
confirm,
vscode.l10n.t("Cancel"));
@ -125,7 +125,9 @@ export class AuthTreeView implements vscode.TreeDataProvider<AuthProfileTreeItem
}
}),
vscode.commands.registerCommand('pacCLI.authPanel.navigateToResource', (item: AuthProfileTreeItem) => {
vscode.env.openExternal(vscode.Uri.parse(item.model.Resource));
if (item.model.ActiveOrganization) {
vscode.env.openExternal(vscode.Uri.parse(item.model.ActiveOrganization.EnvironmentUrl));
}
}),
vscode.commands.registerCommand('pacCLI.authPanel.copyUser', (item: AuthProfileTreeItem) => {
vscode.env.clipboard.writeText(item.model.User);
@ -149,7 +151,7 @@ class AuthProfileTreeItem extends vscode.TreeItem {
} else if (profile.Kind === "ADMIN" || profile.Kind === "UNIVERSAL") {
return `${profile.Kind}: ${profile.User}`;
} else {
return `${profile.Kind}: ${profile.Resource}`;
return `${profile.Kind}: ${profile.ActiveOrganization?.EnvironmentUrl ?? profile.User}`;
}
}
private static createTooltip(profile: AuthProfileListing): string {
@ -165,10 +167,10 @@ class AuthProfileTreeItem extends vscode.TreeItem {
args: [profile.Name],
comment: ["The {0} represents the optional name the user provided for the profile)"]}));
}
if ((profile.Kind === "DATAVERSE" || profile.Kind === "UNIVERSAL") && profile.Resource) {
if ((profile.Kind === "DATAVERSE" || profile.Kind === "UNIVERSAL") && profile.ActiveOrganization) {
tooltip.push(vscode.l10n.t({
message: "Resource: {0}",
args: [profile.Resource],
message: "Default Environment: {0}",
args: [profile.ActiveOrganization.EnvironmentUrl],
comment: ["The {0} represents profile's resource/environment URL"]}));
}
tooltip.push(vscode.l10n.t({

Просмотреть файл

@ -9,23 +9,28 @@ export type PacOutput = {
Information: string[];
}
export type PacOutputWithResult<TResults> = PacOutput & {
Results: TResults
}
export type PacOutputWithResultList<TListItem> = PacOutput & {
Results: TListItem[]
}
export type AuthProfileListing = {
Index: number;
IsActive: boolean;
Kind: string;
Name: string;
Resource: string;
User: string;
CloudInstance: string;
ActiveOrganization?: {
FriendlyName: string;
EnvironmentUrl: string;
};
}
export type PacOutputWithResultList<T> = PacOutput & {
Results: T[]
}
export type PacAuthListOutput = PacOutput & {
Results: AuthProfileListing[];
}
export type PacAuthListOutput = PacOutputWithResultList<AuthProfileListing>;
export type AdminEnvironmentListing = {
DisplayName: string;
@ -35,9 +40,7 @@ export type AdminEnvironmentListing = {
OrganizationId: string;
}
export type PacAdminListOutput = PacOutput & {
Results: AdminEnvironmentListing[];
}
export type PacAdminListOutput = PacOutputWithResultList<AdminEnvironmentListing>;
export type SolutionListing = {
SolutionUniqueName: string;
@ -46,9 +49,7 @@ export type SolutionListing = {
IsManaged: boolean;
}
export type PacSolutionListOutput = PacOutput & {
Results: SolutionListing[];
}
export type PacSolutionListOutput = PacOutputWithResultList<SolutionListing>;
export type OrgListOutput = {
FriendlyName: string,
@ -58,13 +59,7 @@ export type OrgListOutput = {
IsActive: boolean
}
export type PacOrgListOutput = PacOutput & {
Results: OrgListOutput[];
}
export type PacActiveOrgListOutput = PacOutput & {
Results: ActiveOrgOutput;
}
export type PacOrgListOutput = PacOutputWithResultList<OrgListOutput>;
export type ActiveOrgOutput = {
OrgId: string,
@ -75,3 +70,5 @@ export type ActiveOrgOutput = {
UserId : string,
EnvironmentId: string,
}
export type PacOrgWhoOutput = PacOutputWithResult<ActiveOrgOutput>;

Просмотреть файл

@ -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, PacActiveOrgListOutput } from "./PacTypes";
import { PacOutput, PacAdminListOutput, PacAuthListOutput, PacSolutionListOutput, PacOrgListOutput, PacOrgWhoOutput } from "./PacTypes";
import { v4 } from "uuid";
export interface IPacWrapperContext {
@ -161,8 +161,8 @@ export class PacWrapper {
return this.executeCommandAndParseResults<PacOrgListOutput>(new PacArguments("org", "list"));
}
public async activeOrg(): Promise <PacActiveOrgListOutput> {
return this.executeCommandAndParseResults<PacActiveOrgListOutput>(new PacArguments("org", "who"));
public async activeOrg(): Promise <PacOrgWhoOutput> {
return this.executeCommandAndParseResults<PacOrgWhoOutput>(new PacArguments("org", "who"));
}
public async pcfInit(outputDirectory : string): Promise<PacOutput> {

Просмотреть файл

@ -33,7 +33,18 @@ class MockPacInterop implements IPacInterop {
describe('PacWrapper', () => {
it('AuthList parses correctly', async () => {
const interop = new MockPacInterop();
interop.executeReturnValue = "{\"Status\":\"Success\",\"Errors\":[],\"Information\":[\"Input commands: [\\\"auth\\\",\\\"list\\\"]\",\"Profiles (* indicates active):\"],\"Results\":[{\"Index\":1,\"IsActive\":true,\"Kind\":\"CDS\",\"Name\":\"cctest\",\"Resource\":\"https://contoso.example.com\",\"User\":\"bob@contoso.com\",\"CloudInstance\":\"Public\"}]}";
interop.executeReturnValue = "{\"Status\":\"Success\",\"Errors\":[],\"Information\":[\"Input commands: [\\\"auth\\\",\\\"list\\\"]\",\"Profiles (* indicates active):\"],"
+ "\"Results\":["
+ "{"
+ "\"Index\":1,"
+ "\"IsActive\":true,"
+ "\"Kind\":\"CDS\","
+ "\"Name\":\"cctest\","
+ "\"ActiveOrganization\":{\"EnvironmentUrl\":\"https://contoso-mock.crmtest.dynamics.com\",\"FriendlyName\":\"\"},"
+ "\"User\":\"bob@contoso.com\","
+ "\"CloudInstance\":\"Public\""
+ "}"
+ "]}";
const wrapper = new PacWrapper(new MockContext, interop);
const result = await wrapper.authList();
@ -41,5 +52,6 @@ describe('PacWrapper', () => {
expect(result.Errors.length === 0);
expect(result.Information.length > 0);
expect(result.Results && result.Results.length === 1 && result.Results[0].User === "bob@contoso.com").to.be.true;
expect(result.Results[0].ActiveOrganization?.EnvironmentUrl === "https://contoso-mock.crmtest.dynamics.com").to.be.true;
});
});