
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@blast-engine/context
Advanced tools
This is a package to help control different contexts on your node/web application.
This is a package to help control different contexts on your node/web application.
Run yarn add @blast-engine/context or npm i @blast-engine/context.
Run yarn context:select to select a previously declared context.
Run yarn context:current to see the currently selected context.
Run yarn context:set [context] to explicitly set your current context to the specified context name.
On the root directory of your application, create a file called contexts.config.js. In this file, you need to declare your different contexts. Your contexts.config.js file should follow this format:
module.exports = () => ({
onSelect: context => null,
// after selecting a context using `yarn context:select`,
// this function will be called with the selected contexts values
// as a parameter to the function
contexts: {
prod: {
_showInSelect: true,
// if set to false, the context will not appear
// in `yarn context:select`
yourConfigKeys: {
apiKey: "apiKey"
},
importantEnvParamForContext: "super important"
},
dev1: {
_showInSelect: true,
yourConfigKeys: {
apiKey: "apiKey"
},
importantEnvParamForContext: "less important"
}
}
})
After selecting a context, a file called active-context will be automatically generated, listing your active context. Make sure to add active-context file to your .gitignore.
To have access to the environment parameters based on different context, you can edit the onSelect function such that it would write the specified parameters in the context into a file:
onSelect: context => fs.writeFileSync(
'./__env_config__.json',
JSON.stringify(context.yourConfigKeys)
)
FAQs
This is a package to help control different contexts on your node/web application.
The npm package @blast-engine/context receives a total of 5 weekly downloads. As such, @blast-engine/context popularity was classified as not popular.
We found that @blast-engine/context demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.