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
projectRepositoryName
string
rootTemplateName
string
rootTemplate
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?
optionalgitStatus: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
projectRepositoryName
projectRepositoryName:
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:319
Parameters
templateInstanceId
string
commandTitle
string
Returns
Promise<Result<string>>
mapToDTO()
mapToDTO():
Result<ProjectDTO>
Defined in: ../../skaff-lib/src/models/project.ts:398
Returns
create()
staticcreate(absDir):Promise<Result<Project>>
Defined in: ../../skaff-lib/src/models/project.ts:280
Parameters
absDir
string
Returns
Promise<Result<Project>>
getFinalTemplateSettings()
staticgetFinalTemplateSettings(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
The template to get the final settings for.
projectSettings
The project settings containing instantiated templates.
instantiatedTemplates
object[]
projectAuthor
string
projectRepositoryName
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()
staticgetFinalTemplateSettingsForInstantiatedTemplate(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
instanceId
string
instantiatedProjectSettings
instantiatedTemplates
object[]
projectAuthor
string
projectRepositoryName
string
rootTemplateName
string
Returns
Result<FinalTemplateSettings>