Skip to content

FileSystemProvider

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/apps/cli/src/providers/filesystem.provider.ts

File system data provider Reads from local JSON files in outputDir

Implements: DataProvider

Methods

MethodSignatureReturns
initializeinitialize(config: DataProviderConfig)Promise<void>
getProjectMetadatagetProjectMetadata()Promise<ProjectMetadata>
getEntitiesgetEntities()Promise<Entity[]>
getEntitiesByTypegetEntitiesByType(type: string)Promise<Entity[]>
getEntityByIdgetEntityById(id: string)`Promise<Entity
getRelationshipsgetRelationships()Promise<Relationship[]>
getRelationshipsForEntitygetRelationshipsForEntity(entityId: string)Promise<Relationship[]>
saveParseResultssaveParseResults(results: ParseResult[], project: DetectedProject)Promise<void>
destroydestroy()Promise<void>

Where it refuses work

  • FileSystemProvider stops the work with Error when !this.metadata — “No metadata loaded. Run parse first or check outputDir.”.

When something fails

  • FileSystemProvider handles failure in 1 place: it discards it silently in all 1.

Was this page helpful?

Download as PDF