Resolve merge conflicts with master
This commit is contained in:
Коммит
045e570466
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props')" />
|
||||
<Import Project="..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props')" />
|
||||
<Import Project="..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props')" />
|
||||
<Import Project="..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props')" />
|
||||
<Import Project="..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props" Condition="Exists('..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props')" />
|
||||
<Import Project="..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props" Condition="Exists('..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props')" />
|
||||
|
@ -68,12 +68,15 @@
|
|||
<ItemGroup>
|
||||
<Reference Include="CefSharp, Version=126.2.70.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.126.2.70\lib\net462\CefSharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="CefSharp.Core, Version=126.2.70.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.126.2.70\lib\net462\CefSharp.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="CefSharp.WinForms, Version=126.2.70.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.WinForms.126.2.70\lib\net462\CefSharp.WinForms.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AnalysisServices, Version=19.74.2.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AnalysisServices.retail.amd64.19.74.2\lib\net45\Microsoft.AnalysisServices.dll</HintPath>
|
||||
|
@ -296,12 +299,12 @@
|
|||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.targets')" />
|
||||
</Project>
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -38,7 +38,7 @@ export function getMonarchTokensDefinition(tmdlKeywords: string[], tmdlTypeKeywo
|
|||
[/^\s*\b\w+\b\s*$/, 'variable'], //Boolean properties
|
||||
[/(\w+)(\s+)(\w+)(\s+)(['"]?[\w-]+(?:\s+[\w-]+)*['"]?)$/, ['entity', '', 'identifier', '', 'meta']], // Reference objects
|
||||
[/(\w+)(\s+)('[\w\s.-:=]+'(?:\s*\.\s*'[\w\s.-:=]+')*|[\w-]+)$/, ['entity', '', 'identifier']], //Objects
|
||||
[/(\w+)(\s+)(['"]?.+[\w-]+(?:\s+.+)*['"]?)(\s*=\s*)(.*)$/, ['entity', '', 'identifier', '', 'attribute']], //Partition
|
||||
[/(\w+)(\s+)(['"]?[^=]+['"]?)(\s*=\s*)(.*)$/, ['entity', '', 'identifier', '', 'attribute']], //Partition
|
||||
[/(\w+)(\s+)(\w+)(\s*)(=)(\s*)([\[\{](?:"[^"]*"|\d+(?:\.\d+)*|[^[\]{}]+)*[\]\}]|\w+)/, ['entity', '', 'identifier', '', 'operators', '', 'attribute']], //Annotation
|
||||
[/(\w+)(\s+)(\w+)(\s*)(=)(\s*)(.*)/, ['entity', '', 'identifier', '', 'operators', 'attribute']],//Annotation
|
||||
[/(\w+)(\s*=\s*)(```)/, [{ token: 'variable' }, { token: 'operators' }, { token: 'attribute', next: '@exprWithBackticks' }]], //Expression enclosed with backticks (```)
|
||||
|
@ -66,7 +66,7 @@ export function getMonarchTokensDefinition(tmdlKeywords: string[], tmdlTypeKeywo
|
|||
propertyValue: [
|
||||
{ include: '@flowNumbers' },
|
||||
[
|
||||
/[\w-$()#.,;\\]+\s*/, // Match words followed by optional whitespace
|
||||
/[^\s*\n]+/, // Match any sequence of characters except newlines
|
||||
{
|
||||
cases: {
|
||||
'@tmdlTypeKeywords': 'keyword.type',
|
||||
|
@ -85,13 +85,13 @@ export function getMonarchTokensDefinition(tmdlKeywords: string[], tmdlTypeKeywo
|
|||
|
||||
],
|
||||
flowNumbers: [
|
||||
{ regex: /\b(?:0|[+-]?[0-9]+)(?![ \t]*\S+)\b/, action: { token: 'attribute' } }, // number
|
||||
{ regex: /\b(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?\b/, action: { token: 'attribute' } }, // number.float
|
||||
{ regex: /\b0o[0-7]+\b/, action: { token: 'attribute' } }, // number.octal
|
||||
{ regex: /\b0x[0-9a-fA-F]+\b/, action: { token: 'attribute' } }, // number.hex
|
||||
{ regex: /\b[+-]?\.(?:inf|Inf|INF)\b/, action: { token: 'attribute' } }, // number.infinity
|
||||
{ regex: /\b\.(?:nan|Nan|NAN)\b/, action: { token: 'attribute' } }, // number.nan
|
||||
{ regex: /\b\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?\b/, action: { token: 'attribute' } }, // number.date
|
||||
{ regex: /(?:0|[+-]?[0-9]+)(?=\s*$)/, action: { token: 'attribute' } }, // number
|
||||
{ regex: /(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?(?=\s*$)/, action: { token: 'attribute' } }, // number.float
|
||||
{ regex: /0o[0-7]+(?=\s*$)/, action: { token: 'attribute' } }, // number.octal
|
||||
{ regex: /0x[0-9a-fA-F]+(?=\s*$)/, action: { token: 'attribute' } }, // number.hex
|
||||
{ regex: /[+-]?\.(?:inf|Inf|INF)(?=\s*$)/, action: { token: 'attribute' } }, // number.infinity
|
||||
{ regex: /\.(?:nan|Nan|NAN)(?=\s*$)/, action: { token: 'attribute' } }, // number.nan
|
||||
{ regex: /\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?(?=\s*$)/, action: { token: 'attribute' } }, // number.date
|
||||
]
|
||||
}
|
||||
};
|
||||
|
|
|
@ -5,6 +5,14 @@
|
|||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="CefSharp.Core" publicKeyToken="40c4b6fc221f4138" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-125.0.210.0" newVersion="125.0.210.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="CefSharp" publicKeyToken="40c4b6fc221f4138" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-125.0.210.0" newVersion="125.0.210.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props')" />
|
||||
<Import Project="..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props')" />
|
||||
<Import Project="..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props')" />
|
||||
<Import Project="..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props" Condition="Exists('..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props')" />
|
||||
<Import Project="..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props" Condition="Exists('..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props')" />
|
||||
<Import Project="..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props')" />
|
||||
<Import Project="..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
|
@ -76,6 +76,9 @@
|
|||
<Reference Include="CefSharp.Core, Version=126.2.70.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.126.2.70\lib\net462\CefSharp.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CefSharp.WinForms, Version=126.2.70.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.WinForms.126.2.70\lib\net462\CefSharp.WinForms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
|
@ -119,10 +122,10 @@
|
|||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.targets'))" />
|
||||
</Target>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<package id="cef.redist.x64" version="120.2.5" targetFramework="net472" />
|
||||
<package id="cef.redist.x86" version="120.2.5" targetFramework="net472" />
|
||||
<package id="CefSharp.Common" version="126.2.70" targetFramework="net472" />
|
||||
<package id="CefSharp.WinForms" version="126.2.70" targetFramework="net472" />
|
||||
<package id="chromiumembeddedframework.runtime.win-x64" version="126.2.7" targetFramework="net472" />
|
||||
<package id="chromiumembeddedframework.runtime.win-x86" version="126.2.7" targetFramework="net472" />
|
||||
<package id="MSBuild.Extension.Pack" version="1.8.0" targetFramework="net452" />
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props')" />
|
||||
<Import Project="..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props')" />
|
||||
<Import Project="..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props')" />
|
||||
<Import Project="..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props" Condition="Exists('..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props')" />
|
||||
<Import Project="..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props" Condition="Exists('..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props')" />
|
||||
<Import Project="..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props')" />
|
||||
<Import Project="..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
|
@ -53,6 +53,10 @@
|
|||
<Reference Include="CefSharp.Core, Version=126.2.70.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.126.2.70\lib\net462\CefSharp.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CefSharp.WinForms, Version=126.2.70.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.WinForms.126.2.70\lib\net462\CefSharp.WinForms.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AnalysisServices, Version=19.74.2.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AnalysisServices.retail.amd64.19.74.2\lib\net45\Microsoft.AnalysisServices.dll</HintPath>
|
||||
</Reference>
|
||||
|
@ -152,10 +156,10 @@
|
|||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.targets'))" />
|
||||
</Target>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<package id="cef.redist.x64" version="120.2.5" targetFramework="net472" />
|
||||
<package id="cef.redist.x86" version="120.2.5" targetFramework="net472" />
|
||||
<package id="CefSharp.Common" version="126.2.70" targetFramework="net472" />
|
||||
<package id="CefSharp.WinForms" version="126.2.70" targetFramework="net472" />
|
||||
<package id="chromiumembeddedframework.runtime.win-x64" version="126.2.7" targetFramework="net472" />
|
||||
<package id="chromiumembeddedframework.runtime.win-x86" version="126.2.7" targetFramework="net472" />
|
||||
<package id="Microsoft.AnalysisServices.retail.amd64" version="19.74.2" targetFramework="net472" />
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props')" />
|
||||
<Import Project="..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props')" />
|
||||
<Import Project="..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props')" />
|
||||
<Import Project="..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props" Condition="Exists('..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props')" />
|
||||
<Import Project="..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props" Condition="Exists('..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props')" />
|
||||
<Import Project="..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props')" />
|
||||
<Import Project="..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
|
@ -56,6 +56,9 @@
|
|||
<Reference Include="CefSharp.Core, Version=126.2.70.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.126.2.70\lib\net462\CefSharp.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CefSharp.WinForms, Version=126.2.70.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.WinForms.126.2.70\lib\net462\CefSharp.WinForms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AnalysisServices, Version=19.74.2.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AnalysisServices.retail.amd64.19.74.2\lib\net45\Microsoft.AnalysisServices.dll</HintPath>
|
||||
</Reference>
|
||||
|
@ -398,12 +401,12 @@
|
|||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.120.2.5\build\cef.redist.x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\chromiumembeddedframework.runtime.win-x64.126.2.7\build\chromiumembeddedframework.runtime.win-x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\chromiumembeddedframework.runtime.win-x86.126.2.7\build\chromiumembeddedframework.runtime.win-x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.120.2.5\build\cef.redist.x64.props'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.126.2.70\build\CefSharp.Common.targets')" />
|
||||
</Project>
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="cef.redist.x64" version="120.2.5" targetFramework="net472" />
|
||||
<package id="cef.redist.x86" version="120.2.5" targetFramework="net472" />
|
||||
<package id="CefSharp.Common" version="126.2.70" targetFramework="net472" />
|
||||
<package id="CefSharp.WinForms" version="126.2.70" targetFramework="net472" />
|
||||
<package id="chromiumembeddedframework.runtime.win-x64" version="126.2.7" targetFramework="net472" />
|
||||
<package id="chromiumembeddedframework.runtime.win-x86" version="126.2.7" targetFramework="net472" />
|
||||
<package id="Microsoft.AnalysisServices.retail.amd64" version="19.74.2" targetFramework="net472" />
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"requires": true,
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"treekill": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/treekill/-/treekill-1.0.0.tgz",
|
||||
"integrity": "sha512-yRk5h+uZ6oFKQWf88pzuOSujKvpU8wqo9nuxCMUvWU55sC6A9J0EzjmEwpTjHydhBhBDDZKgA6992aIEWTxDkw=="
|
||||
}
|
||||
}
|
||||
}
|
|
@ -22,7 +22,7 @@ $nugets = @(
|
|||
|
||||
foreach ($nuget in $nugets)
|
||||
{
|
||||
if (!(Test-Path "$currentPath\.nuget\$($nuget.name).$($nuget.version)*" -PathType Container)) {
|
||||
if (!(Test-Path -path "$currentPath\.nuget\$($nuget.name).$($nuget.version)*" -PathType Container)) {
|
||||
|
||||
Write-Host "Downloading and installing Nuget: $($nuget.name)"
|
||||
|
||||
|
@ -33,7 +33,7 @@ foreach ($nuget in $nugets)
|
|||
{
|
||||
Write-Host "Loading assembly: '$nugetPath'"
|
||||
|
||||
$path = Resolve-Path (Join-Path "$currentPath\.nuget\$($nuget.name).$($nuget.Version)" $nugetPath)
|
||||
$path = Resolve-Path -LiteralPath (Join-Path "$currentPath\.nuget\$($nuget.name).$($nuget.Version)" $nugetPath)
|
||||
|
||||
Add-Type -Path $path -Verbose | Out-Null
|
||||
}
|
||||
|
@ -131,7 +131,6 @@ Function Invoke-FabricAPIRequest {
|
|||
[Parameter(Mandatory = $false)] [string] $contentType = "application/json; charset=utf-8",
|
||||
[Parameter(Mandatory = $false)] [int] $timeoutSec = 240,
|
||||
[Parameter(Mandatory = $false)] [int] $retryCount = 0
|
||||
|
||||
)
|
||||
|
||||
if ([string]::IsNullOrEmpty($authToken)) {
|
||||
|
@ -307,6 +306,7 @@ Function New-FabricWorkspace {
|
|||
[CmdletBinding()]
|
||||
param
|
||||
(
|
||||
[Parameter(Mandatory)]
|
||||
[string]$name
|
||||
,
|
||||
[switch]$skipErrorIfExists
|
||||
|
@ -356,6 +356,7 @@ Function Remove-FabricWorkspace {
|
|||
[CmdletBinding()]
|
||||
param
|
||||
(
|
||||
[Parameter(Mandatory)]
|
||||
[string]$workspaceId
|
||||
)
|
||||
|
||||
|
@ -377,6 +378,7 @@ Function Get-FabricWorkspace {
|
|||
[CmdletBinding()]
|
||||
param
|
||||
(
|
||||
[Parameter(Mandatory)]
|
||||
[string]$workspaceName
|
||||
)
|
||||
|
||||
|
@ -408,8 +410,10 @@ Function Set-FabricWorkspacePermissions {
|
|||
[CmdletBinding()]
|
||||
param
|
||||
(
|
||||
[Parameter(Mandatory)]
|
||||
[string]$workspaceId
|
||||
,
|
||||
[Parameter(Mandatory)]
|
||||
$permissions
|
||||
)
|
||||
|
||||
|
@ -457,82 +461,103 @@ Function Export-FabricItems {
|
|||
[CmdletBinding()]
|
||||
param
|
||||
(
|
||||
[string]$path = '.\pbipOutput'
|
||||
[Parameter(Mandatory)]
|
||||
[string]$path
|
||||
,
|
||||
[string]$workspaceId = ''
|
||||
[Parameter(Mandatory)]
|
||||
[string]$workspaceId
|
||||
,
|
||||
# Focus only on report and semantic model, there are items that are not exportable.
|
||||
[scriptblock]$filter = {$_.type -in @("report", "SemanticModel")}
|
||||
,
|
||||
[string]$format
|
||||
)
|
||||
|
||||
$items = Invoke-FabricAPIRequest -Uri "workspaces/$workspaceId/items" -Method Get
|
||||
|
||||
if ($filter) {
|
||||
#$items = $items | ? { $_.type -in $itemTypes }
|
||||
if ($filter) {
|
||||
$items = $items | Where-Object $filter
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "Existing items: $($items.Count)"
|
||||
|
||||
foreach ($item in $items) {
|
||||
|
||||
$itemId = $item.id
|
||||
$itemName = $item.displayName
|
||||
$itemType = $item.type
|
||||
$itemNamePath = $itemName.Split([IO.Path]::GetInvalidFileNameChars()) -join '_'
|
||||
$itemOutputPath = "$path\$workspaceId\$($itemNamePath).$($itemType)"
|
||||
#Resolve invalid filepath chars
|
||||
|
||||
$itemNamePath = $itemName.Split([IO.Path]::GetInvalidFileNameChars()) -join '_'
|
||||
$itemOutputPath = "$path\$workspaceId\$($itemNamePath).$($itemType)"
|
||||
|
||||
Export-FabricItem -workspaceId $workspaceId -itemId $itemId -path $itemOutputPath
|
||||
}
|
||||
}
|
||||
|
||||
if ($itemType -in @("report", "semanticmodel")) {
|
||||
Write-Host "Getting definition of: $itemId / $itemName / $itemType"
|
||||
Function Export-FabricItem {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Exports item from a Fabric workspace to a specified local file system destination.
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param
|
||||
(
|
||||
[Parameter(Mandatory)]
|
||||
[string]$workspaceId
|
||||
,
|
||||
[Parameter(Mandatory)]
|
||||
[string]$itemId
|
||||
,
|
||||
[Parameter(Mandatory)]
|
||||
[string]$path = '.\pbipOutput'
|
||||
,
|
||||
[string]$format
|
||||
)
|
||||
|
||||
#POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items/{itemId}/getDefinition
|
||||
$itemOutputPath = $path
|
||||
|
||||
$response = $null
|
||||
try {
|
||||
Write-Host "Getting definition of: $itemId"
|
||||
|
||||
$getDefinitionUrl = "workspaces/$workspaceId/items/$itemId/getDefinition"
|
||||
#POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items/{itemId}/getDefinition
|
||||
|
||||
if ($format)
|
||||
{
|
||||
$getDefinitionUrl += "?format=$format"
|
||||
}
|
||||
$response = $null
|
||||
|
||||
$response = Invoke-FabricAPIRequest -Uri $getDefinitionUrl -Method Post
|
||||
$getDefinitionUrl = "workspaces/$workspaceId/items/$itemId/getDefinition"
|
||||
|
||||
$partCount = $response.definition.parts.Count
|
||||
|
||||
Write-Host "Parts: $partCount"
|
||||
|
||||
if ($partCount -gt 0)
|
||||
{
|
||||
foreach ($part in $response.definition.parts) {
|
||||
Write-Host "Saving part: $($part.path)"
|
||||
|
||||
$outputFilePath = "$itemOutputPath\$($part.path.Replace("/", "\"))"
|
||||
|
||||
$parentFolderPath = Split-Path $outputFilePath -Parent
|
||||
|
||||
New-Item -ItemType Directory -Path $parentFolderPath -ErrorAction SilentlyContinue | Out-Null
|
||||
|
||||
$parentFolderPath = Resolve-Path $parentFolderPath
|
||||
|
||||
$bytes = [Convert]::FromBase64String($part.payload)
|
||||
|
||||
Set-Content -LiteralPath $outputFilePath $bytes -AsByteStream
|
||||
}
|
||||
|
||||
@{
|
||||
"type" = $itemType
|
||||
"displayName" = $itemName
|
||||
|
||||
} | ConvertTo-Json | Out-File "$itemOutputPath\item.metadata.json"
|
||||
}
|
||||
if ($format)
|
||||
{
|
||||
$getDefinitionUrl += "?format=$format"
|
||||
}
|
||||
else {
|
||||
Write-Host "Type '$itemType' not available for export."
|
||||
|
||||
$response = Invoke-FabricAPIRequest -Uri $getDefinitionUrl -Method Post
|
||||
|
||||
$partCount = $response.definition.parts.Count
|
||||
|
||||
Write-Host "Parts: $partCount"
|
||||
|
||||
if ($partCount -gt 0)
|
||||
{
|
||||
foreach ($part in $response.definition.parts) {
|
||||
Write-Host "Saving part: $($part.path)"
|
||||
|
||||
$outputFilePath = "$itemOutputPath\$($part.path.Replace("/", "\"))"
|
||||
|
||||
$parentFolderPath = Split-Path $outputFilePath -Parent
|
||||
|
||||
New-Item -ItemType Directory -Path $parentFolderPath -ErrorAction SilentlyContinue | Out-Null
|
||||
|
||||
$parentFolderPath = Resolve-Path -LiteralPath $parentFolderPath
|
||||
|
||||
$bytes = [Convert]::FromBase64String($part.payload)
|
||||
|
||||
Set-Content -LiteralPath $outputFilePath $bytes -AsByteStream
|
||||
}
|
||||
}
|
||||
}
|
||||
catch{
|
||||
$ex = $_.Exception
|
||||
|
||||
Write-Warning "Error exporting item '$itemId' - '$($ex.ToString())'"
|
||||
}
|
||||
}
|
||||
|
||||
Function Import-FabricItems {
|
||||
|
@ -550,8 +575,10 @@ Function Import-FabricItems {
|
|||
[CmdletBinding()]
|
||||
param
|
||||
(
|
||||
[Parameter(Mandatory)]
|
||||
[string]$path = '.\pbipOutput'
|
||||
,
|
||||
[Parameter(Mandatory)]
|
||||
[string]$workspaceId
|
||||
,
|
||||
[string[]]$filter = $null
|
||||
|
@ -563,7 +590,7 @@ Function Import-FabricItems {
|
|||
|
||||
# Search for folders with .pbir and .pbism in it
|
||||
|
||||
$itemsInFolder = Get-ChildItem -Path $path -recurse -include *.pbir, *.pbism
|
||||
$itemsInFolder = Get-ChildItem -LiteralPath $path -recurse -include *.pbir, *.pbism
|
||||
|
||||
if ($filter) {
|
||||
$itemsInFolder = $itemsInFolder | ? {
|
||||
|
@ -596,7 +623,7 @@ Function Import-FabricItems {
|
|||
|
||||
# If its a valid path, read it as byte[]
|
||||
|
||||
if (Test-Path $fileContent)
|
||||
if (Test-Path -LiteralPath $fileContent)
|
||||
{
|
||||
$fileContent = [System.IO.File]::ReadAllBytes($fileContent)
|
||||
}
|
||||
|
@ -634,7 +661,7 @@ Function Import-FabricItems {
|
|||
|
||||
write-host "Processing item: '$itemPath'"
|
||||
|
||||
$files = Get-ChildItem -Path $itemPath -Recurse -Attributes !Directory
|
||||
$files = Get-ChildItem -LiteralPath $itemPath -Recurse -Attributes !Directory
|
||||
|
||||
# Remove files not required for the API: item.*.json; cache.abf; .pbi folder
|
||||
|
||||
|
@ -659,9 +686,9 @@ Function Import-FabricItems {
|
|||
|
||||
# Try to read the item properties from the .platform file if not found in itemProperties
|
||||
|
||||
if ((!$itemType -or !$displayName) -and (Test-Path "$itemPath\.platform"))
|
||||
if ((!$itemType -or !$displayName) -and (Test-Path -LiteralPath "$itemPath\.platform"))
|
||||
{
|
||||
$itemMetadataStr = Get-Content "$itemPath\.platform"
|
||||
$itemMetadataStr = Get-Content -LiteralPath "$itemPath\.platform"
|
||||
|
||||
$fileOverrideMatch = $null
|
||||
if ($fileOverridesEncoded)
|
||||
|
@ -685,7 +712,7 @@ Function Import-FabricItems {
|
|||
throw "Cannot import item if any of the following properties is missing: itemType, displayName"
|
||||
}
|
||||
|
||||
$itemPathAbs = Resolve-Path $itemPath
|
||||
$itemPathAbs = Resolve-Path -LiteralPath $itemPath
|
||||
|
||||
$parts = $files | % {
|
||||
|
||||
|
@ -708,35 +735,49 @@ Function Import-FabricItems {
|
|||
else {
|
||||
if ($filePath -like "*.pbir") {
|
||||
|
||||
$fileContentText = Get-Content -Path $filePath
|
||||
$fileContentText = Get-Content -LiteralPath $filePath
|
||||
$pbirJson = $fileContentText | ConvertFrom-Json
|
||||
|
||||
if ($pbirJson.datasetReference.byPath -and $pbirJson.datasetReference.byPath.path) {
|
||||
|
||||
# try to swap byPath to byConnection
|
||||
|
||||
$reportDatasetPath = (Resolve-path (Join-Path $itemPath $pbirJson.datasetReference.byPath.path.Replace("/", "\"))).Path
|
||||
$reportDatasetPath = (Resolve-path -LiteralPath (Join-Path $itemPath $pbirJson.datasetReference.byPath.path.Replace("/", "\"))).Path
|
||||
|
||||
$datasetReference = $datasetReferences[$reportDatasetPath]
|
||||
|
||||
if ($datasetReference)
|
||||
{
|
||||
$datasetName = $datasetReference.name
|
||||
# $datasetName = $datasetReference.name
|
||||
|
||||
$datasetId = $datasetReference.id
|
||||
|
||||
$newPBIR = @{
|
||||
"version" = "1.0"
|
||||
"datasetReference" = @{
|
||||
"byConnection" = @{
|
||||
"connectionString" = $null
|
||||
"pbiServiceModelId" = $null
|
||||
"pbiModelVirtualServerName" = "sobe_wowvirtualserver"
|
||||
"pbiModelDatabaseName" = "$datasetId"
|
||||
"name" = "EntityDataSource"
|
||||
"connectionType" = "pbiServiceXmlaStyleLive"
|
||||
}
|
||||
}
|
||||
} | ConvertTo-Json
|
||||
$pbirJson.datasetReference.byPath = $null
|
||||
|
||||
$pbirJson.datasetReference.byConnection = @{
|
||||
"connectionString" = $null
|
||||
"pbiServiceModelId" = $null
|
||||
"pbiModelVirtualServerName" = "sobe_wowvirtualserver"
|
||||
"pbiModelDatabaseName" = "$datasetId"
|
||||
"name" = "EntityDataSource"
|
||||
"connectionType" = "pbiServiceXmlaStyleLive"
|
||||
}
|
||||
|
||||
$newPBIR = $pbirJson | ConvertTo-Json
|
||||
|
||||
# $newPBIR = @{
|
||||
# "version" = "1.0"
|
||||
# "datasetReference" = @{
|
||||
# "byConnection" = @{
|
||||
# "connectionString" = $null
|
||||
# "pbiServiceModelId" = $null
|
||||
# "pbiModelVirtualServerName" = "sobe_wowvirtualserver"
|
||||
# "pbiModelDatabaseName" = "$datasetId"
|
||||
# "name" = "EntityDataSource"
|
||||
# "connectionType" = "pbiServiceXmlaStyleLive"
|
||||
# }
|
||||
# }
|
||||
# } | ConvertTo-Json
|
||||
|
||||
$fileContent = [system.Text.Encoding]::UTF8.GetBytes($newPBIR)
|
||||
|
||||
|
@ -753,7 +794,7 @@ Function Import-FabricItems {
|
|||
}
|
||||
else
|
||||
{
|
||||
$fileContent = Get-Content -Path $filePath -AsByteStream -Raw
|
||||
$fileContent = Get-Content -LiteralPath $filePath -AsByteStream -Raw
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -855,8 +896,10 @@ Function Import-FabricItem {
|
|||
[CmdletBinding()]
|
||||
param
|
||||
(
|
||||
[Parameter(Mandatory)]
|
||||
[string]$path = '.\pbipOutput'
|
||||
,
|
||||
[Parameter(Mandatory)]
|
||||
[string]$workspaceId
|
||||
,
|
||||
[hashtable]$itemProperties
|
||||
|
@ -864,7 +907,7 @@ Function Import-FabricItem {
|
|||
|
||||
# Search for folders with .pbir and .pbism in it
|
||||
|
||||
$itemsInFolder = Get-ChildItem -Path $path |? {@(".pbism", ".pbir")-contains $_.Extension }
|
||||
$itemsInFolder = Get-ChildItem -LiteralPath $path |? {@(".pbism", ".pbir") -contains $_.Extension }
|
||||
|
||||
if ($itemsInFolder.Count -eq 0)
|
||||
{
|
||||
|
@ -889,7 +932,7 @@ Function Import-FabricItem {
|
|||
|
||||
Write-Host "Existing items in the workspace: $($items.Count)"
|
||||
|
||||
$files = Get-ChildItem -Path $path -Recurse -Attributes !Directory
|
||||
$files = Get-ChildItem -LiteralPath $path -Recurse -Attributes !Directory
|
||||
|
||||
# Remove files not required for the API: item.*.json; cache.abf; .pbi folder
|
||||
|
||||
|
@ -905,9 +948,9 @@ Function Import-FabricItem {
|
|||
|
||||
# Try to read the item properties from the .platform file if not found in itemProperties
|
||||
|
||||
if ((!$itemType -or !$displayName) -and (Test-Path "$path\.platform"))
|
||||
if ((!$itemType -or !$displayName) -and (Test-Path -LiteralPath "$path\.platform"))
|
||||
{
|
||||
$itemMetadataStr = Get-Content "$path\.platform"
|
||||
$itemMetadataStr = Get-Content -LiteralPath "$path\.platform"
|
||||
|
||||
$fileOverrideMatch = $null
|
||||
if ($fileOverridesEncoded)
|
||||
|
@ -931,7 +974,7 @@ Function Import-FabricItem {
|
|||
throw "Cannot import item if any of the following properties is missing: itemType, displayName"
|
||||
}
|
||||
|
||||
$itemPathAbs = Resolve-Path $path
|
||||
$itemPathAbs = Resolve-Path -LiteralPath $path
|
||||
|
||||
$parts = $files | % {
|
||||
|
||||
|
@ -939,7 +982,7 @@ Function Import-FabricItem {
|
|||
|
||||
if ($filePath -like "*.pbir") {
|
||||
|
||||
$fileContentText = Get-Content -Path $filePath
|
||||
$fileContentText = Get-Content -LiteralPath $filePath
|
||||
$pbirJson = $fileContentText | ConvertFrom-Json
|
||||
|
||||
if ($pbirJson.datasetReference.byPath -and $pbirJson.datasetReference.byPath.path) {
|
||||
|
@ -950,20 +993,33 @@ Function Import-FabricItem {
|
|||
{
|
||||
throw "Cannot import directly a report using byPath connection. You must first resolve the semantic model id and pass it through the 'itemProperties' parameter."
|
||||
}
|
||||
|
||||
$pbirJson.datasetReference.byPath = $null
|
||||
|
||||
$pbirJson.datasetReference.byConnection = @{
|
||||
"connectionString" = $null
|
||||
"pbiServiceModelId" = $null
|
||||
"pbiModelVirtualServerName" = "sobe_wowvirtualserver"
|
||||
"pbiModelDatabaseName" = "$datasetId"
|
||||
"name" = "EntityDataSource"
|
||||
"connectionType" = "pbiServiceXmlaStyleLive"
|
||||
}
|
||||
|
||||
$newPBIR = $pbirJson | ConvertTo-Json
|
||||
|
||||
$newPBIR = @{
|
||||
"version" = "1.0"
|
||||
"datasetReference" = @{
|
||||
"byConnection" = @{
|
||||
"connectionString" = $null
|
||||
"pbiServiceModelId" = $null
|
||||
"pbiModelVirtualServerName" = "sobe_wowvirtualserver"
|
||||
"pbiModelDatabaseName" = "$datasetId"
|
||||
"name" = "EntityDataSource"
|
||||
"connectionType" = "pbiServiceXmlaStyleLive"
|
||||
}
|
||||
}
|
||||
} | ConvertTo-Json
|
||||
# $newPBIR = @{
|
||||
# "version" = "1.0"
|
||||
# "datasetReference" = @{
|
||||
# "byConnection" = @{
|
||||
# "connectionString" = $null
|
||||
# "pbiServiceModelId" = $null
|
||||
# "pbiModelVirtualServerName" = "sobe_wowvirtualserver"
|
||||
# "pbiModelDatabaseName" = "$datasetId"
|
||||
# "name" = "EntityDataSource"
|
||||
# "connectionType" = "pbiServiceXmlaStyleLive"
|
||||
# }
|
||||
# }
|
||||
# } | ConvertTo-Json
|
||||
|
||||
$fileContent = [system.Text.Encoding]::UTF8.GetBytes($newPBIR)
|
||||
}
|
||||
|
@ -974,7 +1030,7 @@ Function Import-FabricItem {
|
|||
}
|
||||
else
|
||||
{
|
||||
$fileContent = Get-Content -Path $filePath -AsByteStream -Raw
|
||||
$fileContent = Get-Content -LiteralPath $filePath -AsByteStream -Raw
|
||||
}
|
||||
|
||||
$partPath = $filePath.Replace($itemPathAbs, "").TrimStart("\").Replace("\", "/")
|
||||
|
@ -1062,6 +1118,7 @@ Function Remove-FabricItems {
|
|||
[CmdletBinding()]
|
||||
param
|
||||
(
|
||||
[Parameter(Mandatory)]
|
||||
[string]$workspaceId = $null
|
||||
,
|
||||
[string]$filter = $null
|
||||
|
@ -1094,8 +1151,10 @@ Function Set-SemanticModelParameters {
|
|||
[CmdletBinding()]
|
||||
param
|
||||
(
|
||||
[Parameter(Mandatory)]
|
||||
[string]$path = $null
|
||||
,
|
||||
[Parameter(Mandatory)]
|
||||
[hashtable]$parameters = $null
|
||||
,
|
||||
[switch]$failIfNotFound
|
||||
|
@ -1105,13 +1164,13 @@ Function Set-SemanticModelParameters {
|
|||
|
||||
$isTMSL = $false
|
||||
|
||||
if (!(Test-Path $modelPath))
|
||||
if (!(Test-Path -LiteralPath $modelPath))
|
||||
{
|
||||
$modelPath = "$path\model.bim"
|
||||
$isTMSL = $true
|
||||
}
|
||||
|
||||
if (!(Test-Path $modelPath))
|
||||
if (!(Test-Path -LiteralPath $modelPath))
|
||||
{
|
||||
throw "Cannot find semantic model definition: '$modelPath'"
|
||||
}
|
||||
|
@ -1120,7 +1179,7 @@ Function Set-SemanticModelParameters {
|
|||
|
||||
if ($isTMSL)
|
||||
{
|
||||
$modelText = Get-Content $modelPath
|
||||
$modelText = Get-Content -LiteralPath $modelPath
|
||||
|
||||
$database = [Microsoft.AnalysisServices.Tabular.JsonSerializer]::DeserializeDatabase($modelText, $null, $compatibilityMode)
|
||||
}
|
||||
|
|
|
@ -58,6 +58,14 @@ Import-FabricItems -workspaceId "[Workspace Id]" -path "[PBIP file path]"
|
|||
|
||||
```
|
||||
|
||||
# Sample - Export item from workspace
|
||||
|
||||
```powershell
|
||||
|
||||
Export-FabricItem -workspaceId "[Workspace Id]" -itemId "[Item Id]" -path '[Export folder file path]'
|
||||
|
||||
```
|
||||
|
||||
# Sample - Import PBIP to workspace - item by item
|
||||
|
||||
```powershell
|
||||
|
|
|
@ -0,0 +1,110 @@
|
|||
parameters:
|
||||
- name: workspaceName
|
||||
displayName: Workspace name to deploy?
|
||||
type: string
|
||||
default: '[Workspace Name]'
|
||||
# Azure AD user object id, that will be added as admin in case the workspace does not exist. Learn more: https://learn.microsoft.com/en-us/partner-center/account-settings/find-ids-and-domain-names
|
||||
- name: adminPrincipalId
|
||||
displayName: Admin Principal Id to be added as workspace admin?
|
||||
type: string
|
||||
default: '[Azure AD object Id]'
|
||||
|
||||
trigger: none
|
||||
|
||||
pool:
|
||||
vmimage: 'windows-latest'
|
||||
|
||||
variables:
|
||||
# Variable group with AppId, AppSecret and TenantId configuration. Learn more: https://learn.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups?view=azure-devops&tabs=yaml
|
||||
- group: fabricAPISecrets
|
||||
|
||||
stages:
|
||||
- stage: Deploy
|
||||
jobs:
|
||||
|
||||
- job: Deploy
|
||||
steps:
|
||||
- checkout: self
|
||||
path: 'self'
|
||||
- task: PowerShell@2
|
||||
displayName: 'Download dependencies'
|
||||
inputs:
|
||||
pwsh: true
|
||||
targetType: inline
|
||||
script: |
|
||||
$path = "$(Build.SourcesDirectory)"
|
||||
|
||||
$workingFolder = "$path\.ado"
|
||||
|
||||
New-Item -ItemType Directory -Path "$workingFolder\modules" -ErrorAction SilentlyContinue | Out-Null
|
||||
|
||||
Write-Host "##[debug]Downloading FabricPS-PBIP module"
|
||||
|
||||
@(
|
||||
"https://raw.githubusercontent.com/microsoft/Analysis-Services/master/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1",
|
||||
"https://raw.githubusercontent.com/microsoft/Analysis-Services/master/pbidevmode/fabricps-pbip/FabricPS-PBIP.psd1") |% {
|
||||
|
||||
Invoke-WebRequest -Uri $_ -OutFile "$workingFolder\modules\$(Split-Path $_ -Leaf)"
|
||||
|
||||
}
|
||||
|
||||
Write-Host "##[debug]Installing Az.Accounts"
|
||||
|
||||
if(-not (Get-Module Az.Accounts -ListAvailable)){
|
||||
Install-Module Az.Accounts -Scope CurrentUser -Force
|
||||
}
|
||||
- task: PowerShell@2
|
||||
displayName: 'Deploy PBIP'
|
||||
# TODO: Must change the $pbipSemanticModelPath and $pbipReportPath to the path of the PBIP semantic model and report.
|
||||
inputs:
|
||||
pwsh: true
|
||||
targetType: inline
|
||||
script: |
|
||||
|
||||
$path = "$(Build.SourcesDirectory)"
|
||||
$appId = "$(appId)"
|
||||
$appSecret = "$(appSecret)"
|
||||
$tenantId = "$(tenantId)"
|
||||
$workspaceName = "${{ parameters.workspaceName }}"
|
||||
$adminPrincipalId = "${{ parameters.adminPrincipalId }}"
|
||||
|
||||
$pbipSemanticModelPath = "$path\[Semantic Model folder name].SemanticModel"
|
||||
$pbipReportPath = "$path\[Report folder name].Report"
|
||||
|
||||
$workingFolder = "$path\.ado"
|
||||
|
||||
Import-Module "$workingFolder\modules\FabricPS-PBIP" -Force
|
||||
|
||||
Write-Host "##[debug]Authentication with SPN"
|
||||
|
||||
Set-FabricAuthToken -servicePrincipalId $appId -servicePrincipalSecret $appSecret -tenantId $tenantId -reset
|
||||
|
||||
$workspacePermissions = @{
|
||||
"principal" = @{
|
||||
"id" = "$adminPrincipalId"
|
||||
"type" = "user"
|
||||
}
|
||||
"role"= "Admin"
|
||||
}
|
||||
|
||||
Write-Host "##[debug]Authentication with SPN"
|
||||
|
||||
Set-FabricAuthToken -servicePrincipalId $appId -servicePrincipalSecret $appSecret -tenantId $tenantId -reset
|
||||
|
||||
Write-Host "##[debug]Ensure Fabric Workspace & permissions"
|
||||
|
||||
$workspaceId = New-FabricWorkspace -name $workspaceName -skipErrorIfExists
|
||||
|
||||
Set-FabricWorkspacePermissions $workspaceId $workspacePermissions
|
||||
|
||||
Write-Host "##[debug]Publish Semantic Model"
|
||||
|
||||
$semanticModelImport = Import-FabricItem -workspaceId $workspaceId -path $pbipSemanticModelPath
|
||||
|
||||
Write-Host "##[debug]Publish Report"
|
||||
|
||||
# Import the report and ensure its binded to the previous imported report
|
||||
|
||||
$reportImport = Import-FabricItem -workspaceId $workspaceId -path $pbipReportPath -itemProperties @{"semanticModelId"=$semanticModelImport.Id}
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче