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

refactor(packaging): simplify inventory checks and build fixtures (#1389)

mldangelo-oai13fa310d75c8
diff --git a/sdk/typescript/scripts/check-package.mjs b/sdk/typescript/scripts/check-package.mjs
index cdfb5e2b2..b32a64c38 100644
--- a/sdk/typescript/scripts/check-package.mjs
+++ b/sdk/typescript/scripts/check-package.mjs
@@ -139,6 +139,7 @@ if (new Set(pluginPaths).size !== pluginPaths.length) {
const allowedFiles = new Set([
...required,
+ ...pluginPaths.map((file) => `package/_bundled_plugin/${file}`),
"package/dist/server/dashboard/index.html",
"package/dist/server/dashboard/app.js",
"package/dist/server/dashboard/app.css",
@@ -248,14 +249,6 @@ const allowedFiles = new Set([
),
),
]);
-for (const file of pluginPaths) {
- const archivePath = `package/_bundled_plugin/${file}`;
- allowedFiles.add(archivePath);
- if (!files.has(archivePath)) {
- throw new Error(`npm tarball is missing ${archivePath}.`);
- }
-}
-
for (const file of [...allowedFiles]) {
if (!files.has(file)) throw new Error(`npm tarball is missing ${file}.`);
const parts = file.split("/");