AbstractCollection
@agros/common / AbstractCollection
Class: AbstractCollection
Table of contents
Constructors
Properties
Methods
- generate
- getEntityDescriptor
- modulesPath
- projectPath
- srcPath
- updateEntities
- writeBinaryFile
- writeFile
- writeTemplateFile
Constructors
constructor
• new AbstractCollection()
Defined in
packages/agros-common/src/collection.ts:40
Properties
entities
• Protected
entities: EntityDescriptor
[] = []
Defined in
packages/agros-common/src/collection.ts:38
projectConfig
• Protected
Readonly
projectConfig: ProjectConfigParser
Defined in
packages/agros-common/src/collection.ts:37
Methods
generate
▸ Abstract
generate(props
): Promise
<CollectionGenerateResult
>
Parameters
Name | Type |
---|---|
props | any |
Returns
Promise
<CollectionGenerateResult
>
Defined in
packages/agros-common/src/collection.ts:142
getEntityDescriptor
▸ Protected
getEntityDescriptor(pathname
): EntityDescriptor
Parameters
Name | Type |
---|---|
pathname | string |
Returns
Defined in
packages/agros-common/src/collection.ts:119
modulesPath
▸ Protected
modulesPath(pathname?
): string
Parameters
Name | Type |
---|---|
pathname? | string |
Returns
string
Defined in
packages/agros-common/src/collection.ts:65
projectPath
▸ Protected
projectPath(pathname?
): string
Parameters
Name | Type |
---|---|
pathname? | string |
Returns
string
Defined in
packages/agros-common/src/collection.ts:49
srcPath
▸ Protected
srcPath(pathname?
): string
Parameters
Name | Type |
---|---|
pathname? | string |
Returns
string
Defined in
packages/agros-common/src/collection.ts:57
updateEntities
▸ Protected
updateEntities(): void
Returns
void
Defined in
packages/agros-common/src/collection.ts:45
writeBinaryFile
▸ Private
writeBinaryFile(pathname
, buffer
): void
Parameters
Name | Type |
---|---|
pathname | string |
buffer | Buffer |
Returns
void
Defined in
packages/agros-common/src/collection.ts:128
writeFile
▸ Protected
writeFile(pathname
, content
, options?
): Promise
<void
>
Parameters
Name | Type |
---|---|
pathname | string |
content | string |
options | CollectionWriteFileOptions |
Returns
Promise
<void
>
Defined in
packages/agros-common/src/collection.ts:73
writeTemplateFile
▸ Protected
writeTemplateFile(source
, target
, props?
, options?
): Promise
<void
>
Parameters
Name | Type |
---|---|
source | string |
target | string |
props | Record <string , any > |
options | CollectionWriteFileOptions |
Returns
Promise
<void
>