wechaty-puppet-service
Version:
Puppet Service for Wechaty
22 lines • 837 B
JavaScript
import { packFileBoxToChunk, unpackFileBoxFromChunk, } from './file-box-chunk.js';
import { packFileBoxChunkToPb, unpackFileBoxChunkFromPb, } from './chunk-pb.js';
/**
* @deprecated Will be removed after Dec 31, 2022
*/
function packFileBoxToPb(PbConstructor) {
return async (fileBox) => {
const fileBoxChunkStream = await packFileBoxToChunk(fileBox);
const pbFileBox = packFileBoxChunkToPb(PbConstructor)(fileBoxChunkStream);
return pbFileBox;
};
}
/**
* @deprecated Will be removed after Dec 31, 2022
*/
async function unpackFileBoxFromPb(pbStream) {
const fileBoxChunkStream = unpackFileBoxChunkFromPb(pbStream);
const fileBox = await unpackFileBoxFromChunk(fileBoxChunkStream);
return fileBox;
}
export { packFileBoxToPb, unpackFileBoxFromPb, };
//# sourceMappingURL=file-box-pb.js.map