// Stub for sharp. This app only uses text embeddings — image processing is never called. // @huggingface/transformers checks `if (sharp_default)` at module init; returning a // callable truthy value satisfies that check without loading any native binary. function sharpStub(input, options) { const self = { metadata: async () => ({ channels: 3, width: 0, height: 0 }), rotate: () => self, raw: () => self, toBuffer: async () => ({ data: Buffer.alloc(0), info: { width: 0, height: 0, channels: 3 } }) } return self } sharpStub.default = sharpStub module.exports = sharpStub