Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
@netlify/build-info
Advanced tools
Build information detection utility.
The purpose of this lib is to, given a project and a configuration, return a set of useful data for our build system. Currently it's used to detect:
But it's possible to extend it in the future to extract other bits of information, such as the heuristics present in the
build-image
.
const { getBuildInfo } = require('./src/main')
(async () => {
console.log(await getBuildInfo({ projectDir: 'path/to/site', rootDir: '/project/root/dir' }))
// {
// jsWorkspaces: {
// isRoot: false,
// packages: [
// 'path/to/site',
// 'path/to/component/library'
// 'path/to/utility/library'
// ]
// },
// frameworks: [
// {
// name: 'gatsby',
// category: 'static_site_generator',
// dev: {
// commands: ['gatsby develop'],
// port: 8000
// },
// build: {
// commands: ['gatsby build'],
// directory: 'public'
// },
// env: { GATSBY_LOGGER: 'yurnalist' },
// plugins: []
// }
// ]
// }
console.log(await getBuildInfo({ projectDir: '/project/root/dir' }))
// {
// jsWorkspaces: {
// isRoot: true,
// packages: [
// 'path/to/site',
// 'path/to/component/library'
// 'path/to/utility/library'
// ]
// },
// frameworks: []
// }
})();
$ build-info /project/root/dir
{
jsWorkspaces: {
isRoot: true,
packages: [
'path/to/site',
'path/to/component/library'
'path/to/utility/library'
]
},
frameworks: []
}
$ build-info path/to/site --rootDir /project/root/dir
{
jsWorkspaces: {
isRoot: false,
packages: [
'path/to/site',
'path/to/component/library'
'path/to/utility/library'
]
},
frameworks: [
{
name: 'gatsby',
category: 'static_site_generator',
dev: {
commands: ['gatsby develop'],
port: 8000
},
build: {
commands: ['gatsby build'],
directory: 'public'
},
env: { GATSBY_LOGGER: 'yurnalist' },
plugins: []
}
]
}
Please see CONTRIBUTING.md for instructions on how to set up and work on this repository. Thanks for contributing!
FAQs
Build info utility
The npm package @netlify/build-info receives a total of 85,360 weekly downloads. As such, @netlify/build-info popularity was classified as popular.
We found that @netlify/build-info demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 21 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.