Skip to main content

Class: Project

Defined in: ../../skaff-lib/src/models/project.ts:66

Constructors

Constructor

new Project(absDir, absSettingsPath, projectSettings, rootTemplate, gitStatus?, outdatedTemplate?): Project

Defined in: ../../skaff-lib/src/models/project.ts:78

Parameters

absDir

string

absSettingsPath

string

projectSettings
instantiatedTemplates

object[]

projectAuthor

string

projectName

string

rootTemplateName

string

rootTemplate

Template

gitStatus?

GitStatus

outdatedTemplate?

boolean = false

Returns

Project

Properties

absoluteRootDir

absoluteRootDir: string

Defined in: ../../skaff-lib/src/models/project.ts:67


absoluteSettingsPath

absoluteSettingsPath: string

Defined in: ../../skaff-lib/src/models/project.ts:69


gitStatus?

optional gitStatus: GitStatus

Defined in: ../../skaff-lib/src/models/project.ts:75


instantiatedProjectSettings

instantiatedProjectSettings: object

Defined in: ../../skaff-lib/src/models/project.ts:71

instantiatedTemplates

instantiatedTemplates: object[]

projectAuthor

projectAuthor: string

projectName

projectName: string

rootTemplateName

rootTemplateName: string


outdatedTemplate

outdatedTemplate: boolean

Defined in: ../../skaff-lib/src/models/project.ts:76


rootTemplate

rootTemplate: Template

Defined in: ../../skaff-lib/src/models/project.ts:73

Methods

executeTemplateCommand()

executeTemplateCommand(templateInstanceId, commandTitle): Promise<Result<string>>

Defined in: ../../skaff-lib/src/models/project.ts:333

Parameters

templateInstanceId

string

commandTitle

string

Returns

Promise<Result<string>>


mapToDTO()

mapToDTO(): Result<ProjectDTO>

Defined in: ../../skaff-lib/src/models/project.ts:412

Returns

Result<ProjectDTO>


create()

static create(absDir): Promise<Result<Project>>

Defined in: ../../skaff-lib/src/models/project.ts:280

Parameters

absDir

string

Returns

Promise<Result<Project>>


getFinalTemplateSettings()

static getFinalTemplateSettings(template, projectSettings, userProvidedSettings, parentInstanceId?): Result<FinalTemplateSettings>

Defined in: ../../skaff-lib/src/models/project.ts:104

Retrieves the final template settings for a given template and user provided settings. If the template has a parent, it will also retrieve the parent's final settings.

Parameters

template

Template

The template to get the final settings for.

projectSettings

The project settings containing instantiated templates.

instantiatedTemplates

object[]

projectAuthor

string

projectName

string

rootTemplateName

string

userProvidedSettings

UserTemplateSettings

The user provided settings for the template.

parentInstanceId?

string

Optional ID of the parent instance if applicable.

Returns

Result<FinalTemplateSettings>

Result containing FinalTemplateSettings or an error message.


getFinalTemplateSettingsForInstantiatedTemplate()

static getFinalTemplateSettingsForInstantiatedTemplate(template, instanceId, instantiatedProjectSettings): Result<FinalTemplateSettings>

Defined in: ../../skaff-lib/src/models/project.ts:185

Retrieves the final template settings for an instantiated template.

Parameters

template

Template

instanceId

string

instantiatedProjectSettings
instantiatedTemplates

object[]

projectAuthor

string

projectName

string

rootTemplateName

string

Returns

Result<FinalTemplateSettings>