mikser-io-whitebox
v4.0.0
Published
WhiteBox integration for [Mikser](https://github.com/almero-digital-marketing/mikser-io). Pushes processed entities to a WhiteBox `feed` service and synchronises a watched folder with a WhiteBox `storage` service.
Downloads
132
Readme
mikser-io-whitebox
WhiteBox integration for Mikser. Pushes processed entities to a WhiteBox feed service and synchronises a watched folder with a WhiteBox storage service.
Install
npm install mikser-io-whiteboxUsage
// mikser.config.js
export default {
plugins: ['whitebox'],
whitebox: {
context: 'my-project',
services: {
feed: {
url: 'https://feed.example.com',
token: 'FEED_TOKEN',
expire: '10 days',
match: (entity) => entity.type === 'document'
},
storage: {
url: 'https://storage.example.com',
token: 'STORAGE_TOKEN',
storageFolder: 'storage',
expire: '10 days',
match: (entity) => entity.id.startsWith('/storage/')
}
}
}
}Either service is optional — omit services.feed or services.storage to disable that half. When context is not set, the plugin falls back to a per-machine id (machineId_hostname_username).
Feed
Catalogs entities matching feed.match (default: entity.type === 'document') into the WhiteBox feed on every processed phase, and expires/clears the cache after each run.
Storage
Watches storageFolder (default storage/) and uploads matching entities — by source on processed, and by render output on finalize. storage.match defaults to entity.id containing /storage/. Imports existing files on startup; with --clear the remote storage is wiped first.
License
MIT
