This commit is contained in:
Joey Yakimowich-Payne 2026-01-23 14:57:49 -07:00
commit e301d9d1eb
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
2 changed files with 24 additions and 8 deletions

View file

@ -1,8 +1,8 @@
import officeParser from 'officeparser';
import WordExtractor from 'word-extractor';
import * as XLSX from 'xlsx';
import * as PPT from 'ppt';
import * as CFB from 'cfb';
import PPT from 'ppt';
import CFB from 'cfb';
export const GEMINI_NATIVE_TYPES = [
'application/pdf',

View file

@ -20,9 +20,15 @@ declare module 'ppt' {
to_text(pres: PPTPresentation): string[];
}
export function readFile(filename: string, opts?: { WTF?: number; dump?: number }): PPTPresentation;
export function parse_pptcfb(cfb: CFB.Container, opts?: object): PPTPresentation;
export const utils: PPTUtils;
interface PPTModule {
version: string;
readFile(filename: string, opts?: { WTF?: number; dump?: number }): PPTPresentation;
parse_pptcfb(cfb: CFBContainer, opts?: object): PPTPresentation;
utils: PPTUtils;
}
const PPT: PPTModule;
export default PPT;
}
declare module 'cfb' {
@ -32,7 +38,7 @@ declare module 'cfb' {
content?: Buffer;
}
interface Container {
interface CFBContainer {
FileIndex: CFBEntry[];
FullPaths: string[];
}
@ -41,6 +47,16 @@ declare module 'cfb' {
type?: 'file' | 'buffer' | 'base64' | 'binary' | 'array';
}
export function read(data: Buffer | string | ArrayBuffer, opts?: ReadOptions): Container;
export function parse(data: Buffer | number[]): Container;
interface CFBModule {
read(data: Buffer | string | ArrayBuffer, opts?: ReadOptions): CFBContainer;
parse(data: Buffer | number[]): CFBContainer;
}
const CFB: CFBModule;
export default CFB;
}
// Re-export for global use
declare global {
type CFBContainer = import('cfb').CFBContainer;
}