Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
}
],
"dependencies": {
"@cyclonedx/cyclonedx-library": "^8.4.0",
"@cyclonedx/cyclonedx-library": "portal:../cyclonedx-javascript-library",
"@yarnpkg/cli": "^4",
"@yarnpkg/core": "^4",
"@yarnpkg/fslib": "^3",
Expand Down
15 changes: 9 additions & 6 deletions src/_buildtimeInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ SPDX-License-Identifier: Apache-2.0
Copyright (c) OWASP Foundation. All Rights Reserved.
*/

import type { NodePackageJson } from "@cyclonedx/cyclonedx-library/Types";

interface BuildtimeInfo {
self: NodePackageJson
[key: string]: NodePackageJson
}

/* eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- dynamic import helper */
export async function getBuildtimeInfo () {
/*
The included file is generated by `../tools/gather-buildtime-info.cjs`.
Its content is pseudo-dynamic and so is the return type of this function.
*/
return (await import('./__buildtimeInfo.json')).default
export async function getBuildtimeInfo (): Promise<BuildtimeInfo> {
return (await import('./__buildtimeInfo.json')).default satisfies BuildtimeInfo
}
11 changes: 5 additions & 6 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading