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'
}
});
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)