Skip to content

craft-hub / EnvironmentSourceService

Class: EnvironmentSourceService ​

Defined in: packages/craft-hub/src/environment-sources.ts:64

In-memory connection sessions; restart discards transient jobs and the owning tool retains validated bindings.

Constructors ​

Constructor ​

new EnvironmentSourceService(providers, local?): EnvironmentSourceService

Defined in: packages/craft-hub/src/environment-sources.ts:66

Parameters ​

providers ​

EnvironmentSourceProvider[]

local? ​

boolean = true

Returns ​

EnvironmentSourceService

Methods ​

close() ​

close(): Promise<void>

Defined in: packages/craft-hub/src/environment-sources.ts:167

Stop pending transports and discard all transient authentication on host shutdown.

Returns ​

Promise<void>


command() ​

command(input): EnvironmentSourceSnapshot

Defined in: packages/craft-hub/src/environment-sources.ts:83

Start, authenticate or cancel one explicitly requested source connection.

Parameters ​

input ​

{ kind: "public" | "private"; operation: "connect"; providerId: string; repository: string; } | { credentials: { token: string; username: string; }; id: string; operation: "authenticate"; } | { id: string; operation: "cancel"; }

Returns ​

EnvironmentSourceSnapshot


snapshot() ​

snapshot(): EnvironmentSourceSnapshot

Defined in: packages/craft-hub/src/environment-sources.ts:77

Read progress without contacting repositories or invoking credentials.

Returns ​

EnvironmentSourceSnapshot

Released under the MIT License.