From 03c4e35717318c90a35c5df6ca0af9a6669394c1 Mon Sep 17 00:00:00 2001 From: Quinn Turner Date: Fri, 20 May 2022 11:12:31 -0300 Subject: [PATCH] feat: Add support for importing audit-ci Now, you can interact with audit-ci using code! I haven't written the documentation for this yet. Also, since this is the first release of programmatic usage, the API is not expected to stay stable. --- lib/index.ts | 15 +++++++++++++++ package.json | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 lib/index.ts diff --git a/lib/index.ts b/lib/index.ts new file mode 100644 index 00000000..340853f2 --- /dev/null +++ b/lib/index.ts @@ -0,0 +1,15 @@ +export { default as Allowlist } from "./allowlist"; +export { runAuditCi } from "./audit-ci"; +export { + gitHubAdvisoryIdToUrl, + gitHubAdvisoryUrlToAdvisoryId, + isGitHubAdvisoryId, +} from "./common"; +export { AuditCiConfig, AuditCiPreprocessedConfig } from "./config"; +export { + mapVulnerabilityLevelInput, + VulnerabilityLevels, +} from "./map-vulnerability"; +export { audit as npmAudit } from "./npm-auditer"; +export { audit as pnpmAudit } from "./pnpm-auditer"; +export { audit as yarnAudit } from "./yarn-auditer"; diff --git a/package.json b/package.json index 5229da69..addb9ecb 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "version": "6.2.1", "description": "Audits NPM, Yarn, and PNPM projects in CI environments", "license": "Apache-2.0", - "main": "./dist/audit-ci.js", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", "homepage": "https://github.com/IBM/audit-ci", "bugs": "https://github.com/IBM/audit-ci/issues", "repository": {