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