
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
@devly/devly-hosts
Advanced tools
Hosts plugin for @devly
. Assumes env uses apache proxy-server.
For more on hosts file see: https://en.wikipedia.org/wiki/Hosts_(file).
To add devly-hosts plugin to your project, first make sure your project is set-up to consume Devly plugins (see https://github.com/aorinevo/devly-example#introduction).
Next, install @devly/devly-hosts
:
npm i @devly/devly-hosts
Use addHostsConfig
action creator to update the hosts state in the devly-store. It is recommneded to place the initialState for hosts in a manifests/hosts.js
file and requiring that file within the file that dispatches the action.
// mainfests/hosts.js
module.exports = {
filePath: '/etc/hosts',
projectPath: '/etc',
hosts: [
{
ip: '127.0.0.1',
dns: 'some.dns.example1.com'
},
{
ip: '127.0.0.1',
dns: 'some.dns.example2.com'
},
{
ip: '127.0.0.1',
dns: 'some.dns.example3.com'
}
]
};
It is recommended that the consumer create a plugins/index.js
barrel file for the devly plugins it consumes.
// plugins/index.js
require('./hosts.js');
// plugins/hosts.js
const {store} = require('@devly/devly-store');
const {addHostsConfig, addHostsCommands} = require('@devly/devly-hosts/actions');
const {dispatch} = store;
require('@devly/devly-hosts');
dispatch(addHostsConfig(require('./manifests/hosts')));
dispatch(addHostsCommands());
All devly plugins assume that the consumer has the following directory structure somewhere in their working directory:
├── cli.js
├── actions
└── index.js
├── reducers
└── index.js
└── index.js
Dynamically add reducers to the store using devly's reducerRegistry
method.
const {store, reducerRegistry} = require('@devly/devly-store');
reducerRegistry.register('hosts', require('./reducers'));
Actions and reducers are the same actions and reducers from redux. For more information on either, visit
cli.js
const store = require('../scripts/reapps/store');
const yargs = require('yargs');
const {addHostsConfig, addHostsCommands} = require('@devly/devly-hosts/actions');
const Hosts = require('@devly/devly-hosts/scripts/hosts');
store.dispatch(addHostsConfig(require('../manifests/hosts')));
store.dispatch(addHostsCommands(yargs, new Hosts(store)));
module.exports = yargs;
FAQs
Hosts plugin for `@devly`.
The npm package @devly/devly-hosts receives a total of 1 weekly downloads. As such, @devly/devly-hosts popularity was classified as not popular.
We found that @devly/devly-hosts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.