Skip to content

craft-hub / SetupProfileService

Class: SetupProfileService ​

Defined in: packages/craft-hub/src/setup-profile.ts:83

Save portable intent and compare it with fresh target observations; providers retain every write.

Constructors ​

Constructor ​

new SetupProfileService(dataDir, software, configurations, local?): SetupProfileService

Defined in: packages/craft-hub/src/setup-profile.ts:86

Parameters ​

dataDir ​

string

software ​

() => Promise<SoftwareCatalogSnapshot>

configurations ​

() => Promise<SetupConfigurationSource[]>

local? ​

boolean = true

Returns ​

SetupProfileService

Methods ​

import() ​

import(profile, revision): Promise<SetupProfileSnapshot>

Defined in: packages/craft-hub/src/setup-profile.ts:150

Validate and save portable intent only; target paths, trust and configuration are untouched.

Parameters ​

profile ​

unknown

revision ​

string

Returns ​

Promise<SetupProfileSnapshot>


inventory() ​

inventory(): Promise<SetupProfileInventory>

Defined in: packages/craft-hub/src/setup-profile.ts:111

Discover selectable software and managed global configuration without importing file contents.

Returns ​

Promise<SetupProfileInventory>


review() ​

review(): Promise<SetupProfileReview>

Defined in: packages/craft-hub/src/setup-profile.ts:156

Recheck the target, preserving unknown, changed and unavailable states rather than claiming readiness.

Returns ​

Promise<SetupProfileReview>


save() ​

save(command): Promise<SetupProfileSnapshot>

Defined in: packages/craft-hub/src/setup-profile.ts:135

Capture explicit selections from current providers; no browser-supplied metadata is trusted.

Parameters ​

command ​
configurations ​

object[] = ...

name ​

string = ...

operation ​

"save" = ...

revision ​

string = revisionSchema

software ​

object[] = ...

Returns ​

Promise<SetupProfileSnapshot>


snapshot() ​

snapshot(): Promise<SetupProfileSnapshot>

Defined in: packages/craft-hub/src/setup-profile.ts:91

Read the one locally saved profile without inspecting tools or contacting sources.

Returns ​

Promise<SetupProfileSnapshot>

Released under the MIT License.