Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
the node.js Dynect module provides a simple interface for making calls to the Dynect API.
API calls are serialized (by design), facilitated by an asynchronous queue and are therefore non-blocking.
the Dynect API connector for node.js is a work in progress and further functionality and examples will be provided soon.
contributions are welcome of course.
var Dynect = require('dynect');
var dynect = new Dynect(username, username, password);
dynect.on('enqueued', function (task) {
console.log('enqueued: ' + task.method + ' ' + task.path);
});
dynect.on('dequeued', function (task) {
console.log('dequeued ' + task.method + ' ' + task.path);
});
dynect.on('queueComplete', function () {
console.log('queue complete');
});
dynect.on('queueComplete', function () {
console.log('*');
});
dynect.on('error', function (task, err) {
console.log('error ' + task.method + ' ' + err);
});
dynect.on('response', function (task, response) {
if (response.msgs) {
for (var i = 0; i < response.msgs.length; i++) {
var msg = response.msgs[i];
if (msg.ERR_CD != null) {
console.log('= ' + task.method + ' ' + msg.ERR_CD);
}
else {
console.log('= ' + task.method + ' ' + msg.INFO);
}
}
}
else {
console.log('~ ' + task.method + ' ' + response);
}
});
add A record www.example.com (address '123.45.67.89', TTL 5 mins)
var zone = 'example.com';
dynect.on('connected', function () {
dynect.ARecord.add({
zone: zone,
fqdn: 'www.example.com',
data: {
rdata: { address: '123.45.67.89' },
ttl: 300,
}
});
dynect.publish(zone);
dynect.disconnect();
});
dynect.connect();
add CNAME record www.example.com (cname 'example.mydomain.com', TTL zone default)
var zone = 'example.com';
dynect.on('connected', function () {
dynect.CNAMERecord.add({
zone: zone,
fqdn: 'www.example.com',
data: {
rdata: { cname: 'example.mydomain.com' },
ttl: 0,
}
});
dynect.publish(zone);
dynect.disconnect();
});
dynect.connect();
add SRV records '_sip._tcp.example.com' (target 'voip.mydomain.com' on ports 5060 and 5070, replacing existing if any)
var zone = 'example.com';
var fqdn = '_sip._tcp.example.com';
var srvTarget = 'voip.mydomain.com';
var ports = [5060, 5070];
dynect.on('connected', function () {
dynect.SRVRecord.get({
zone: zone,
fqdn: fqdn
}, function (responses) {
for (var x = 0; x < responses.length; x++) {
var response = responses[x];
if (response.data.rdata.target === srvTarget + '.') {
dynect.SRVRecord.delete({
zone: zone,
fqdn: fqdn,
record_id: response.data.record_id
});
}
}
for (var y = 0; y < ports.length; y++) {
dynect.SRVRecord.add({
zone: zone,
fqdn: fqdn,
data: {
rdata: {
port: ports[y],
priority: 10,
target: srvTarget,
weight: 1
},
ttl: 60
}
});
}
dynect.publish(zone);
dynect.disconnect();
});
});
dynect.connect();
npm install dynect
(The MIT License)
Copyright (c) frisB.com <play@frisb.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Dynect API connector for node.js
The npm package dynect receives a total of 4 weekly downloads. As such, dynect popularity was classified as not popular.
We found that dynect 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.