DOPA.Cli 0.43.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package DOPA.Cli --version 0.43.0                
NuGet\Install-Package DOPA.Cli -Version 0.43.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DOPA.Cli" Version="0.43.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DOPA.Cli --version 0.43.0                
#r "nuget: DOPA.Cli, 0.43.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DOPA.Cli as a Cake Addin
#addin nuget:?package=DOPA.Cli&version=0.43.0

// Install DOPA.Cli as a Cake Tool
#tool nuget:?package=DOPA.Cli&version=0.43.0                

DOPA.Cli

Build status Latest version

A dotnet wrapper on the OPA binaries designed primarily for DOPA to create WebAssembly bundles on the fly.

Usage

opa commands are made available off the static Opa class. Args are added with a fluent syntax, and then run with Execute() or ExecuteAsync().

This document refers to the test files found in test/DOPA.Cli.Tests/policies.

Implemented commands

DOPA.Cli is not a complete replacement for running opa, but it can help simplfy some automation. If you have a need for another arg, or command, PRs are welcome. Priority will be given to features needed by DOPA.

Currently, the following commands are implemented with a subset of the possible args.

Build

The build command is supported with optional capabilities, and the ability to build a WebAssembly module.

The Build command returns a disposable Bundle. A Bundle contains the path to the generated opa bundle, and can extract contents from the bundle. The underlying file will be deleted when the Bundle is disposed.

// Default
using Bundle bundle = Opa.Build.Files("policies/example.rego").Execute();
using Stream dataJson = bundle.ExtractData();

// WebAssembly
using Bundle bundle = await Opa.Build
            .WebAssembly()
            .Files("policies/builtins.rego")
            .Entrypoints("builtins/firstValue")
            .Capabilities("policies/builtins.capabilities.json")
            .ExecuteAsync();
using Stream wasm = bundle.ExtractWebAssemblyModule();

Versioning

DOPA.Cli uses a Major.Minor.Patch.Revision versioning scheme, where Major.Minor.Patch match the corresponding Major.Minor.Patch of the opa binary used to run commands. e.g. DOPA.Cli@0.43.0.12 equates to revision 12 of opa@0.43.0.

Contributing

Pull requests and issues are appreciated and encouraged.

License

DOPA is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.68.0 2,583 8/30/2024
0.67.1 1,052 8/12/2024
0.67.0 286 7/26/2024
0.66.0 1,045 6/28/2024
0.65.0 977 6/1/2024
0.64.1 1,220 5/1/2024
0.63.0.1 1,011 4/6/2024
0.63.0 669 3/29/2024
0.62.1 543 3/8/2024
0.62.0 542 3/1/2024
0.58.0 1,469 10/30/2023
0.57.1 549 10/30/2023
0.57.0 2,495 10/3/2023
0.55.0 1,976 7/28/2023
0.54.0 1,198 6/30/2023
0.53.1 656 6/10/2023
0.53.0.1 528 6/3/2023
0.53.0 390 5/27/2023
0.52.0 502 5/2/2023
0.51.0 652 4/1/2023
0.50.0 583 3/12/2023
0.49.2 710 2/26/2023
0.49.1 628 2/22/2023
0.49.0 658 2/10/2023
0.48.0 2,845 1/12/2023
0.47.4 842 12/21/2022
0.47.3 775 12/13/2022
0.47.2 644 12/10/2022
0.47.1 703 12/8/2022
0.47.0 722 12/6/2022
0.46.1 810 11/4/2022
0.45.0 884 10/8/2022
0.44.0.1 778 10/6/2022
0.44.0 992 9/8/2022
0.43.1 859 9/7/2022
0.43.0.1 1,507 8/21/2022
0.43.0 1,010 8/19/2022

Initial release.