Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@gasket/plugin-start
Advanced tools
Enables commands essential to building and running Gasket projects.
This is a default plugin in the Gasket CLI and is always available for use.
Executes the build
lifecycle. Use this to prepare your app for running, such
as bundling files, minifying code, processing assets, etc.
If you need to force the process to exit once the build lifecycle completes,
you can pass the --exit
flag. This should be used sparingly. Prefer to find
and fix lingering open handle issues which may be keeping the process running.
Executes the preboot
and start
lifecycles. Upon building your app, use this
command to run it.
Executes the build
, preboot
and start
lifecycles. This command defaults
the environment to local
, and is intended for local app development, only.
Plugins can hook the start
lifecycle, inspect the command id, and adjust
startup behavior based on if the start or local commands was used. This
is useful, for example, to enabling hot reload or disabling service worker
caching during development.
This simple example hooks the start lifecycle to start up a web server, and changes the port if using the local command.
// gasket-plugin-example.js
const http = require('http');
module.exports = {
name: 'example-server',
hooks: {
async start(gasket) {
// set things unique for the local command
const isLocal = gasket.command.id === 'local';
const port = isLocal ? 3000 : 8000;
const message = isLocal ? 'Hello.' : 'Hello World!';
http.createServer(function (req, res) {
res.write(message);
res.end();
}).listen(port);
}
}
}
Plugins should hook this lifecycle to prepare files for the app to be run.
This lifecycle can be used to run an app, such as by starting up a port listener. Generally, the start lifecycle should only be hooked by one plugin in an app.
This lifecycle can be hooked by plugins to prepare an app before startup. This should be used for in-memory setup, with an on disk prep handled during the build lifecycle.
FAQs
Adds commands for building and starting Gasket apps
The npm package @gasket/plugin-start receives a total of 148 weekly downloads. As such, @gasket/plugin-start popularity was classified as not popular.
We found that @gasket/plugin-start demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.