Skip to content

PackageManager

alanlohse edited this page Aug 8, 2021 · 1 revision

gottabe-plugin-dev / Exports / PackageManager

Interface: PackageManager

Provide methods to manage packages

Table of contents

Methods

Methods

downloadPackage

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.

Parameters

Name Type
packageInfo PackageInfo
servers string[]
arch? string
platform? string
toolchain? string

Returns

Promise<PackageInfo>

a promise to the package info

Defined in

gottabe_api.ts:297


isInCache

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.

Parameters

Name Type Description
packageInfo PackageInfo the package info
arch string the architecture
platform string the platform
toolchain string the toolchain

Returns

Promise<boolean>

true, if the package is in cache

Defined in

gottabe_api.ts:276


loadPackage

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.

Parameters

Name Type
packageInfo PackageInfo
arch string
platform string
toolchain string

Returns

Promise<PackageInfo[]>

an array with all dependency packages

Defined in

gottabe_api.ts:286


packageProject

packageProject(project): Promise<PackageInfo>

Create a package for the project using a build previously made

Parameters

Name Type
project Project

Returns

Promise<PackageInfo>

a promise to the package info

Defined in

gottabe_api.ts:332


publish

publish(project, server, username, password): Promise<PackageInfo>

Publish the package in the specified server

Parameters

Name Type
project Project
server string
username string
password string

Returns

Promise<PackageInfo>

a promise to the package info

Defined in

gottabe_api.ts:325


publishLocal

publishLocal(project): Promise<PackageInfo>

Publish the package in the local repository

Parameters

Name Type
project Project

Returns

Promise<PackageInfo>

a promise to the package info

Defined in

gottabe_api.ts:315


updatePackage

updatePackage(packageInfo, servers): Promise<PackageInfo>

Check in the servers if the checksum of the files is the same, otherwise update the files.

Parameters

Name Type
packageInfo PackageInfo
servers string[]

Returns

Promise<PackageInfo>

a promise to the package info

Defined in

gottabe_api.ts:308

Clone this wiki locally