From 837752311d86ba9cccbd3efc42780d0cb1a5620f Mon Sep 17 00:00:00 2001 From: Quinn Turner Date: Mon, 23 May 2022 16:44:22 -0300 Subject: [PATCH] feat: Add support for importing audit-ci (#271) --- 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 0b18e54f..104d6cb3 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": {