Skip to content

OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security

chore(deps): bump pdfjs-dist from 5.6.205 to 6.2.108 in /sdk/typescript (#314)

dependabot[bot]2af050843c06
diff --git a/sdk/typescript/package.json b/sdk/typescript/package.json
index d99211ed2..91cb9193e 100644
--- a/sdk/typescript/package.json
+++ b/sdk/typescript/package.json
@@ -63,7 +63,7 @@
"fflate": "0.8.2",
"incur": "0.4.13",
"papaparse": "5.5.3",
- "pdfjs-dist": "5.6.205",
+ "pdfjs-dist": "6.2.108",
"smol-toml": "1.6.1"
},
"devDependencies": {
diff --git a/sdk/typescript/pnpm-lock.yaml b/sdk/typescript/pnpm-lock.yaml
index f65005c81..388e49e40 100644
--- a/sdk/typescript/pnpm-lock.yaml
+++ b/sdk/typescript/pnpm-lock.yaml
@@ -39,8 +39,8 @@ importers:
specifier: 5.5.3
version: 5.5.3
pdfjs-dist:
- specifier: 5.6.205
- version: 5.6.205
+ specifier: 6.2.108
+ version: 6.2.108
smol-toml:
specifier: 1.6.1
version: 1.6.1
@@ -218,79 +218,79 @@ packages:
resolution: {integrity: sha512-pjMZcNEt1dOq0aJCcY3b7w1Ayh+qmQN2xlfTELcGV9yiAjEGIczBPBLWWW0k0zzo5T8kiv15jtKPsWeHGxLvLg==}
engines: {node: '>=20'}
- '@napi-rs/[email protected]':
- resolution: {integrity: sha512-hjhCKhntPv9+t4ckHymdx0phYNcVW+GKQR6Lzw2zE+pOVjOplSmtx9nNNknTjbEDLcuLZqA1y8ufKg1XfgftzQ==}
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-7kSCdUhoXiO+AaIMXdBGdtp6EctZNkmF62Rea/BmVQlwKaM3bBhOzyGUzxyxz9dv5vdBfpyAaxhSRSJF4kqK4A==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [android]
- '@napi-rs/[email protected]':
- resolution: {integrity: sha512-2PcswRaC7Ly645DGt88///zuFDhJxJYdKAs1uU3mfk1atYkXufgcgLfBpk6Tm12nCQBaNt1wpybuPZ4qOhTo8A==}
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-ds14V1BPagLszQyaDTeggny5fNeTCqsUQ5QhFj9VDxSEfzrVxXtdbR0LoFyKa0Siaaw8KvqSk4t7k/WoZJwvbg==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [darwin]
- '@napi-rs/[email protected]':
- resolution: {integrity: sha512-ePNZtj7pNIva/siZMg+HmbeozkIjqUIYdoymH8HaA3qK7LfzFN4WMBM8G6HQ9ZC+H3+Dnn5pqtiXpgLykaPOhw==}
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-qof3LRAAycmkV2I1izZo9RoSHF8kCQr5O05sFwv0jK8rSdYV6KHVwimo6Qb7RxZj40WHKbLHm5JDaUF0o5XUAA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
- '@napi-rs/[email protected]':
- resolution: {integrity: sha512-d5cDB48oWFGU8/XPhUOFAlySgb/VAu7D+s8fi55K1Pcfg8aPplHWqMgibhVLU8ky7Pyg/fuiVLz4Nf3JrSTuUA==}
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-FU2kKZLmolHA9+KcUA+l1+xH3WTLUUTQDU/kLv9SEUr2TrRPu94aytOeizFJDHPs/QBcw4QL1mCQhetQXYBbag==}
engines: {node: '>= 10'}
cpu: [arm]
os: [linux]
- '@napi-rs/[email protected]':
- resolution: {integrity: sha512-rDxgxRu69RvDlX/bh9o22DxLsGr8EqsNgotL9+RwQE1S0b0cqeatqsw6aW45mukm0B42DIAaAacKaYQ8cqS1nw==}
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-GVSjntxKeA+/y/ZKf1F+cmUw1WeIkE5aMRPqnZUlBTBvBcrvgWccJAWuYCKPX4QJQwZILIIwhgdAbl51yj6fpA==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
libc: [glibc]
- '@napi-rs/[email protected]':
- resolution: {integrity: sha512-K3mDW66N+xT2/V439u1alFANiBUjdEx2gLiNYnCmUsva5jZMxWTjafBYwTzYK+EMFMHrUoabuU+T1BIP5CgbYQ==}
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-J51oK/axyZ13kxycumSMfLiDZMdWdOVvqDFI28BpuViZHE3A0bQfr8B5vg8YnPEnqLD3BSn1hkdlh2buspEcNQ==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
libc: [musl]
- '@napi-rs/[email protected]':
- resolution: {integrity: sha512-mooqUBTIsccZpnoQC4NgrC1v6C1vof39etLNMnBwCY+p0gajWJvAHLGQ6g/gGyS5YrpDW+GefSN4+Cvcr08UWw==}
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-CtQgQjoVTX67jS9XuCTtJ40Sl7wRLMguoFnnGnfDmCWf7kzKFZVwj5ynqUOIGKFMSB61ZCuQlwPvVNxYTTseaw==}
engines: {node: '>= 10'}
cpu: [riscv64]
os: [linux]
libc: [glibc]
- '@napi-rs/[email protected]':
- resolution: {integrity: sha512-1eCvkDCazm7FFhsT7DfGOdSaHgZVK3bt/dSBl5EWHOWmnz+I7j8tPseJqqD81NF+MH21jKUK4wQSDjN0mdhnTg==}
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-jtfzAHFp+FRaR7zGT4jyCe6wUgAG/dVb5A4Apd8FY9jKarntDfUAlJXscugiH7ZF5kKnu7/lHFk9LaDPcrGEVQ==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
libc: [glibc]
- '@napi-rs/[email protected]':
- resolution: {integrity: sha512-20arT6lnI19S68qNlii73TSEDbECNgzMz2EpldC1V3mZFuRkeujXkcebRk0LRJe9SEUAooYiLokfMViY8IX7yA==}
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-xTzaUCKUHTY4bCGadeeRZggbRVbGUT1petg7Z8r9AJR2+D9Bqu6nQAgqBGC6D47tA70LjaaaLTrJ7wNY1T74dg==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
libc: [musl]
- '@napi-rs/[email protected]':
- resolution: {integrity: sha512-DZFFT1wIAg37LJw37yhMRFfjATd3vTQzjZ1Yki8u2vhO6Hi5VE6BVaGQ1aaDu7xb4iMErz+9EOwjpS7xcxFeBw==}
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-ktVLuBkI6QVOm5BwO/WbdGwxgeetAMJa7TTmR8qBarXF0OU2NKjvjUtPJAl2y8t+zBRczJl/1VOl9gua6WcK2g==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [win32]
- '@napi-rs/[email protected]':
- resolution: {integrity: sha512-MyT1j3mHC2+Lu4pBi9mKyMJhtP6U7k7EldY7sj/uS5gJA65gTXt8MefJQXLJo5d/vZbuWmfxzkEUNc/urV3pHA==}
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-SGhlQ8bDjL1Cz2KnsKMasr/5sTcwG/SZkB6WCJxLsmSm/3aS2C+3p39bA7iZ2/94+NkVDySZfbiGoaSZSFHYxA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [win32]
- '@napi-rs/[email protected]':
- resolution: {integrity: sha512-xglYA6q3XO5P3BNJYxVZ1IV7DLVjp1Py6nwag88YntrS+3vKHyYcMqXVS4ZztJmwz2uGvz1FWhI/4LgbR5uQDA==}
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-OlI657a5XXvKGFX7kNeIzJ8rO7IXt87Mqu2H8rXE46viAuOfum/JA7ysX7+eBhxNKznT+RCZh418mndlcFX3+w==}
engines: {node: '>= 10'}
'@octokit/[email protected]':
@@ -515,18 +515,15 @@ packages:
resolution: {integrity: sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==}
engines: {node: ^20.17.0 || >=22.9.0}
- resolution: {integrity: sha512-/cMZNI34v//jUTrI+UIo4ieHAB5EZRY/+7OmXZgBxaWBMcW2tGdceIw06RFxWxrKZ5Jp3sI2i5TsRo+CBhtVLQ==}
-
resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
resolution: {integrity: sha512-5QvjGxYVjxO59MGU2lHVYpRWBBtKHnlIAcSe1uNFCkkptUh63NFRj0FJQm7nR67puEruUci/ZkjmEFrjCAyP4A==}
- resolution: {integrity: sha512-tlUj+2IDa7G1SbvBNN74UHRLJybZDWYom+k6p5KIZl7huBvsA4APi6mKL+zCxd3tLjN5hOOEE9Tv7VdzO88pfg==}
- engines: {node: '>=20.19.0 || >=22.13.0 || >=24'}
+ resolution: {integrity: sha512-YxFb+SQcodN2rnX9Tn3dHYlqfb7NjlzzfONPpJd+AKoKtUjEdevTfbC07d5TcczzOK6261auRkP/M8OBHs9vFQ==}
+ engines: {node: '>=22.13.0 || >=24'}
resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==}
@@ -730,52 +727,52 @@ snapshots:
'@modelcontextprotocol/core': 2.0.0-beta.4
zod: 4.4.3
- '@napi-rs/[email protected]':
+ '@napi-rs/[email protected]':
optional: true
- '@napi-rs/[email protected]':
+ '@napi-rs/[email protected]':
optional: true
- '@napi-rs/[email protected]':
+ '@napi-rs/[email protected]':
optional: true
- '@napi-rs/[email protected]':
+ '@napi-rs/[email protected]':
optional: true
- '@napi-rs/[email protected]':
+ '@napi-rs/[email protected]':
optional: true
- '@napi-rs/[email protected]':
+ '@napi-rs/[email protected]':
optional: true
- '@napi-rs/[email protected]':
+ '@napi-rs/[email protected]':
optional: true
- '@napi-rs/[email protected]':
+ '@napi-rs/[email protected]':
optional: true
- '@napi-rs/[email protected]':
+ '@napi-rs/[email protected]':
optional: true
- '@napi-rs/[email protected]':
+ '@napi-rs/[email protected]':
optional: true
- '@napi-rs/[email protected]':
+ '@napi-rs/[email protected]':
optional: true
- '@napi-rs/[email protected]':
+ '@napi-rs/[email protected]':
optionalDependencies:
- '@napi-rs/canvas-android-arm64': 0.1.100
- '@napi-rs/canvas-darwin-arm64': 0.1.100
- '@napi-rs/canvas-darwin-x64': 0.1.100
- '@napi-rs/canvas-linux-arm-gnueabihf': 0.1.100
- '@napi-rs/canvas-linux-arm64-gnu': 0.1.100
- '@napi-rs/canvas-linux-arm64-musl': 0.1.100
- '@napi-rs/canvas-linux-riscv64-gnu': 0.1.100
- '@napi-rs/canvas-linux-x64-gnu': 0.1.100
- '@napi-rs/canvas-linux-x64-musl': 0.1.100
- '@napi-rs/canvas-win32-arm64-msvc': 0.1.100
- '@napi-rs/canvas-win32-x64-msvc': 0.1.100
+ '@napi-rs/canvas-android-arm64': 1.0.3
+ '@napi-rs/canvas-darwin-arm64': 1.0.3
+ '@napi-rs/canvas-darwin-x64': 1.0.3
+ '@napi-rs/canvas-linux-arm-gnueabihf': 1.0.3
+ '@napi-rs/canvas-linux-arm64-gnu': 1.0.3
+ '@napi-rs/canvas-linux-arm64-musl': 1.0.3
+ '@napi-rs/canvas-linux-riscv64-gnu': 1.0.3
+ '@napi-rs/canvas-linux-x64-gnu': 1.0.3
+ '@napi-rs/canvas-linux-x64-musl': 1.0.3
+ '@napi-rs/canvas-win32-arm64-msvc': 1.0.3
+ '@napi-rs/canvas-win32-x64-msvc': 1.0.3
optional: true
'@octokit/[email protected]': {}
@@ -993,19 +990,15 @@ snapshots:
- optional: true
-
dependencies:
wrappy: 1.0.2
optionalDependencies:
- '@napi-rs/canvas': 0.1.100
- node-readable-to-web-readable-stream: 0.4.2
+ '@napi-rs/canvas': 1.0.3
diff --git a/sdk/typescript/src/knowledge-base.ts b/sdk/typescript/src/knowledge-base.ts
index ad82a3c53..d019e7cfe 100644
--- a/sdk/typescript/src/knowledge-base.ts
+++ b/sdk/typescript/src/knowledge-base.ts
@@ -144,13 +144,13 @@ async function extractPdf(path: string, bytes: Uint8Array): Promise<string> {
const { getDocument, VerbosityLevel } = await import(
"pdfjs-dist/legacy/build/pdf.mjs"
);
- const document = await getDocument({
+ const loadingTask = getDocument({
data: new Uint8Array(bytes),
- isEvalSupported: false,
stopAtErrors: true,
verbosity: VerbosityLevel.ERRORS,
- }).promise;
+ });
try {
+ const document = await loadingTask.promise;
const pages: string[] = [];
for (let number = 1; number <= document.numPages; number++) {
const content = await (await document.getPage(number)).getTextContent();
@@ -162,7 +162,7 @@ async function extractPdf(path: string, bytes: Uint8Array): Promise<string> {
}
return pages.join("\n");
} finally {
- await document.destroy();
+ await loadingTask.destroy();
}
} catch (error) {
throw new Error(`Cannot extract text from knowledge base PDF: ${path}`, {