BdziamPak 0.0.13
dotnet add package BdziamPak --version 0.0.13
NuGet\Install-Package BdziamPak -Version 0.0.13
<PackageReference Include="BdziamPak" Version="0.0.13" />
paket add BdziamPak --version 0.0.13
#r "nuget: BdziamPak, 0.0.13"
// Install BdziamPak as a Cake Addin #addin nuget:?package=BdziamPak&version=0.0.13 // Install BdziamPak as a Cake Tool #tool nuget:?package=BdziamPak&version=0.0.13
BdziamPak
BdziamPak is a package management system designed to handle the installation and resolution of packages. This repository contains the core library, api, and unit tests for BdziamPak.
What
BdziamPak is a step-based package management system that allows for the resolution and installation of packages. It is designed to be extensible, enabling users to define custom processes and steps for package management.
Why
BdziamPak provides a flexible and modular approach to package management, making it easy to extend and customize the resolution process. This allows developers to tailor the package management system to their specific needs and workflows. I am planning to develop multiple plugin based solutions, and I needed a simple way to implement package management.
How
- BdziamPak can be used as-is with built-in steps for resolving other BdziamPak dependencies, installing NuGet packages, and cloning repositories.
- The step-based approach ensures that each part of the resolution process is modular and can be easily extended or replaced.
- It can be as simple or as complex as you need it to be.
Features
Package Sources
Sources for packages defined in one, easily hostable json file.
Example API with built in client
There is an example api project, that can serve as basis for more complex APIs, with client implemented. It has a dockerfile, so you can easily deploy it wherever you need. Keep in mind that you do not need this for Source management.
You can point to any url containing the json file
Package resolution
Resolution is described by a process, which contains multiple steps.
Steps can have executing conditions, so only the steps needed to resolve specific BdziamPak are executed.
You can define your own implementation of IResolveProcessService
to implement custom processes or just use BdziamPakResolveProcess
. See Docs for more details.
Built-in steps
- Cloning Repository by URL (With optional credentials via json file)
- Downloading and extracting NuGet packages with dependencies
- Resolving BdziamPaks which are dependencies of the main resolved bdziamPak
Example Clone Repository Step
public class CloneRepositoryStep(GitService gitService) : BdziamPakResolveStep
{
public override string StepName => "CloneRepository";
public override string StepDescription => "Clones the repository for the package.";
public override bool CanExecute(ICheckResolveContext context)
{
return context.HasMetadata("Repository");
}
public override async Task ExecuteAsync(IExecutionResolveContext context)
{
context.UpdateStatus("Cloning repository...");
var repo = context.GetMetadata<BdziamPakRepositoryReference>("Repository")!;
gitService.CloneRepo(context.ResolveDirectory, repo.Url, repo.CommitHash);
context.Complete();
}
}
Metadata
Each BdziamPakMetadata json can be extended with custom objects.
Getting Started
Prerequisites
- .NET 9.0 SDK
Installation
Clone the repository or install via NuGet:
dotnet add package BdziamPak
Running Tests
To run the unit tests, use the test runner integrated in your IDE or run the following command in the terminal:
dotnet test
Usage
Resolving a Package
To resolve a package, use the BdziamPakService
:
var bdziamPakService = serviceProvider.GetRequiredService<BdziamPakService>();
var progress = new Progress<BdziamPakResolveProgress>();
progress.ProgressChanged += (p, e) => Console.WriteLine($"{e.Percent}, Progress: {e.Message}");
var result = await bdziamPakService.ResolveBdziamPakAsync("packageId", "version", progress);
if (result.Success)
{
Console.WriteLine(result.Message);
}
else
{
Console.WriteLine($"Failed to resolve package: {result.Message}");
}
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
License
This project is licensed under the MPL 2.0 License. See the LICENSE
file for details.
Contact
For any inquiries, please contact the repository owner at pmikstacki.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net9.0
- Bdziam.ExternalDependencyResolver (>= 0.0.9)
- Downloader (>= 3.3.1)
- LibGit2Sharp (>= 0.31.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- NuGet.Common (>= 6.12.1)
- NuGet.Configuration (>= 6.12.1)
- NuGet.Packaging (>= 6.12.1)
- NuGet.Protocol (>= 6.12.1)
- NuGet.Resolver (>= 6.12.1)
- NuGet.Versioning (>= 6.12.1)
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.0.13 | 0 | 1/10/2025 |