import predicate type from @actions/attest (#10)
Signed-off-by: Brian DeHamer <bdehamer@github.com>
This commit is contained in:
1083
package-lock.json
generated
1083
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -68,6 +68,7 @@
|
||||
"@actions/core": "^1.10.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@actions/attest": "^1.0.0",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/node": "^20.11.20",
|
||||
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
import fs from 'fs'
|
||||
import * as path from 'path'
|
||||
|
||||
import type { Predicate } from '@actions/attest'
|
||||
|
||||
export type SBOM = {
|
||||
type: 'spdx' | 'cyclonedx'
|
||||
object: object
|
||||
}
|
||||
|
||||
type Predicate = {
|
||||
type: string
|
||||
params: object
|
||||
}
|
||||
|
||||
export async function parseSBOMFromPath(filePath: string): Promise<SBOM> {
|
||||
// Read the file content
|
||||
const fileContent = await fs.promises.readFile(filePath, 'utf8')
|
||||
|
||||
Reference in New Issue
Block a user