wechaty-puppet-service
Version:
Puppet Service for Wechaty
26 lines • 1.05 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.unpackFileBoxFromPb = exports.packFileBoxToPb = void 0;
const file_box_chunk_js_1 = require("./file-box-chunk.js");
const chunk_pb_js_1 = require("./chunk-pb.js");
/**
* @deprecated Will be removed after Dec 31, 2022
*/
function packFileBoxToPb(PbConstructor) {
return async (fileBox) => {
const fileBoxChunkStream = await (0, file_box_chunk_js_1.packFileBoxToChunk)(fileBox);
const pbFileBox = (0, chunk_pb_js_1.packFileBoxChunkToPb)(PbConstructor)(fileBoxChunkStream);
return pbFileBox;
};
}
exports.packFileBoxToPb = packFileBoxToPb;
/**
* @deprecated Will be removed after Dec 31, 2022
*/
async function unpackFileBoxFromPb(pbStream) {
const fileBoxChunkStream = (0, chunk_pb_js_1.unpackFileBoxChunkFromPb)(pbStream);
const fileBox = await (0, file_box_chunk_js_1.unpackFileBoxFromChunk)(fileBoxChunkStream);
return fileBox;
}
exports.unpackFileBoxFromPb = unpackFileBoxFromPb;
//# sourceMappingURL=file-box-pb.js.map
;