-
Notifications
You must be signed in to change notification settings - Fork 0
PackageManager
gottabe-plugin-dev / Exports / PackageManager
Provide methods to manage packages
▸ downloadPackage(packageInfo, servers, arch?, platform?, toolchain?): Promise<PackageInfo>
Download a package from a list of servers. The method searches among the servers and downloads the package from the first it finds. Can be platform specific if it is specified.
| Name | Type |
|---|---|
packageInfo |
PackageInfo |
servers |
string[] |
arch? |
string |
platform? |
string |
toolchain? |
string |
Promise<PackageInfo>
a promise to the package info
▸ isInCache(packageInfo, arch, platform, toolchain): Promise<boolean>
Checks if the package is in cache. If architecture, platform and toolchain it checks only the platform specific files.
| Name | Type | Description |
|---|---|---|
packageInfo |
PackageInfo |
the package info |
arch |
string |
the architecture |
platform |
string |
the platform |
toolchain |
string |
the toolchain |
Promise<boolean>
true, if the package is in cache
▸ loadPackage(packageInfo, arch, platform, toolchain): Promise<PackageInfo[]>
Load a package into the build directory. If the package is not in cache, it throws an error.
| Name | Type |
|---|---|
packageInfo |
PackageInfo |
arch |
string |
platform |
string |
toolchain |
string |
Promise<PackageInfo[]>
an array with all dependency packages
▸ packageProject(project): Promise<PackageInfo>
Create a package for the project using a build previously made
| Name | Type |
|---|---|
project |
Project |
Promise<PackageInfo>
a promise to the package info
▸ publish(project, server, username, password): Promise<PackageInfo>
Publish the package in the specified server
| Name | Type |
|---|---|
project |
Project |
server |
string |
username |
string |
password |
string |
Promise<PackageInfo>
a promise to the package info
▸ publishLocal(project): Promise<PackageInfo>
Publish the package in the local repository
| Name | Type |
|---|---|
project |
Project |
Promise<PackageInfo>
a promise to the package info
▸ updatePackage(packageInfo, servers): Promise<PackageInfo>
Check in the servers if the checksum of the files is the same, otherwise update the files.
| Name | Type |
|---|---|
packageInfo |
PackageInfo |
servers |
string[] |
Promise<PackageInfo>
a promise to the package info