Updated interface \ncc\Interfaces > RepositorySourceInterface

https://git.n64.cc/nosial/ncc/-/issues/34
This commit is contained in:
Netkas 2022-12-15 17:59:55 -05:00
parent 259620079e
commit bfbd7b4828

View file

@ -4,18 +4,37 @@
use ncc\Objects\DefinedRemoteSource; use ncc\Objects\DefinedRemoteSource;
use ncc\Objects\RemotePackageInput; use ncc\Objects\RemotePackageInput;
use ncc\Objects\Vault\Entry;
interface RepositorySourceInterface interface RepositorySourceInterface
{ {
/** /**
* Fetches a package and all it's dependencies from the given remote source * Returns the git repository url of the repository, versions cannot be specified.
* and optionally converts and compiles it to a local package, returns the
* fetched package as a path to the ncc package file. This function uses
* a defined remote source to fetch the package or build the package from.
* *
* @param RemotePackageInput $packageInput * @param RemotePackageInput $packageInput
* @param DefinedRemoteSource $definedRemoteSource * @param DefinedRemoteSource $definedRemoteSource
* @param Entry|null $entry
* @return string * @return string
*/ */
public static function fetch(RemotePackageInput $packageInput, DefinedRemoteSource $definedRemoteSource): string; public static function fetchGitUri(RemotePackageInput $packageInput, DefinedRemoteSource $definedRemoteSource, ?Entry $entry=null): string;
/**
* Returns the release url of the repository, versions can be specified.
*
* @param RemotePackageInput $packageInput
* @param DefinedRemoteSource $definedRemoteSource
* @param Entry|null $entry
* @return string
*/
public static function getRelease(RemotePackageInput $packageInput, DefinedRemoteSource $definedRemoteSource, ?Entry $entry = null): string;
/**
* Returns the download URL of the pre-compiled .ncc package if available
*
* @param RemotePackageInput $packageInput
* @param DefinedRemoteSource $definedRemoteSource
* @param Entry|null $entry
* @return string
*/
public static function getNccPackage(RemotePackageInput $packageInput, DefinedRemoteSource $definedRemoteSource, ?Entry $entry = null): string;
} }