π Garment
Utility for managing published Tailor content. Provides ability to:
β list published repositoriesβ load Repository instance and all nested entities (Activities, Content Containers, Content Elements)β snapshot repositoryβ load from snapshotβ sign ContentElement assets for deliveryπ§ cache presigned Repository instance
Initialize garment by providing storage provider configuration.
const garment = new Garment({
provider: 'aws',
bucket: 'my-bucket',
aws: {
keyId: 'aws-key',
secretKey: 'aws-secret',
region: 'eu-central-1'
}
});
API
Fetching resources
Retrieve the list of published repositories
garment.source().list()
Retrieve repository from source dir (published version)
garment.source().get(id)
Retrieve repository snapshot
garment.snapshot().get(id, version)