@playerdata/verdaccio-storage-expiry
v1.2.13
Published
A plugin to automatically remove packages not used recently
Downloads
2
Keywords
Readme
verdaccio-storage-expiry
A plugin to automatically remove packages not used recently
Usage
Set it as a storage backend and load the middleware:
store:
"@playerdata/verdaccio-storage-expiry":
storage_maximum_usage_kb: SPACE_IN_KB
Configure your expiry policies per package group if storage_culling_enabled is not set it will be assumed false:
packages:
'**':
...
storage_culling_enabled: true
When the storage directory size exceeds storage_maximum_usage_kb the plugin will start deleting package versions. First ones that havent been accessed since the server started then the ones least recent used since the server started.
Development
Compile this repo:
yarn build
download verdaccio repo at the version you are developing for
configure it to use this plugin:
store:
storage-expiry:
# path to a directory with plugins to include
plugins: /PATH/TO/DIR/CONTAINING/THIS/ONE
and run its debug script npm run debug