I've created a .bcup file using the windows desktop tool. Now I wan't to open it using this code from the example:
const credentials = Credentials.fromDatasource({
path: './data.bcup'
}, 'password');
const fileDatasource = new FileDatasource(credentials);
// @ts-ignore
const archive = await fileDatasource.load(credentials).then(Vault.createFromHistory);
I'm getting the following exception:
Error: Provided credentials don't allow vault decryption
at FileDatasource.load (webpack://kurserio-api/./node_modules/buttercup/dist/datasources/TextDatasource.js?:131:35)
at eval (webpack://kurserio-api/./node_modules/buttercup/dist/datasources/FileDatasource.js?:93:30)
Also the sample gives me a type error at the part then(Vault.createFromHistory);
:
TS2345: Argument of type '(history: History, format?: any) => Vault' is not assignable to parameter of type '(value: DatasourceLoadedData) => Vault | PromiseLike<Vault>'. ??Types of parameters 'history' and 'value' are incompatible. ????Type 'DatasourceLoadedData' is missing the following properties from type 'History': length, pop, push, concat, and 26 more.
question from:
https://stackoverflow.com/questions/66064338/how-to-load-a-file-generated-with-buttercup-desktop-in-buttercup-node-js 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…