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 officeParser from 'officeparser';
import WordExtractor from 'word-extractor'; import WordExtractor from 'word-extractor';
import * as XLSX from 'xlsx'; import * as XLSX from 'xlsx';
import * as PPT from 'ppt'; import PPT from 'ppt';
import * as CFB from 'cfb'; import CFB from 'cfb';
export const GEMINI_NATIVE_TYPES = [ export const GEMINI_NATIVE_TYPES = [
'application/pdf', 'application/pdf',

View file

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