Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cloudflare

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudflare - npm Package Compare versions

Comparing version 1.0.5 to 1.1.0

2

index.js

@@ -22,2 +22,3 @@ 'use strict';

this.perPage = info.per_page;
this.totalPages = info.total_pages;
this.count = info.count;

@@ -78,2 +79,3 @@ this.total = info.total_count;

addZone: zones.add,
checkZoneActivation: zones.activationCheck,
deleteZone: zones.delete,

@@ -80,0 +82,0 @@ deleteCache: purge.delete,

2

lib/dns.js

@@ -98,3 +98,3 @@ 'use strict';

var uri = join('zones', zid, 'dns_records');
var body = pick(rr.toJSON({useAliases: true}), ['type', 'name', 'content', 'ttl', 'proxied']);
var body = pick(rr.toJSON({useAliases: true}), ['type', 'name', 'content', 'ttl', 'proxied', 'data']);
options.method = 'POST';

@@ -101,0 +101,0 @@ options.body = JSON.stringify(body);

@@ -148,2 +148,14 @@ 'use strict';

function activationCheck(z) {
var zid = Zone.is(z) ? z.id : z;
var uri = join('zones', zid, 'activation_check');
var options = {
method: 'PUT'
};
return this._got(uri, options).then(function (response) {
return response.body.result;
});
}
module.exports.browse = browse;

@@ -154,2 +166,3 @@ module.exports.read = read;

module.exports.delete = remove;
module.exports.activationCheck = activationCheck;
module.exports.Zone = Zone;

@@ -5,3 +5,3 @@ {

"author": "Terin Stock <terinjokes@gmail.com>",
"version": "1.0.5",
"version": "1.1.0",
"bugs": {

@@ -16,3 +16,3 @@ "url": "https://github.com/cloudflare/node-cloudflare/issues"

"url-join": "^1.1.0",
"verymodel": "git+https://github.com/terinjokes/VeryModel.git#old_data"
"verymodel": "^3.6.0"
},

@@ -19,0 +19,0 @@ "devDependencies": {

@@ -94,2 +94,9 @@ # CloudFlare API Client for Node.js

#### `checkZoneActivation(z): Promise<{id: string}>`
* z: `Zone` object
* *API Reference*: [Initiate another zone activation check](https://api.cloudflare.com/#zone-initiate-another-zone-activation-check)
Initiate another zone activation check.
#### `deleteZone(z, [options]): Promise<{id: string}>`

@@ -165,3 +172,3 @@

Retrive the `DNSRecord` for a identifier `did` from `Zone` (or zone id).
Retrive the `DNSRecord` for an identifier `did` from `Zone` (or zone id).

@@ -168,0 +175,0 @@ #### `editDNS(d, [options]): Promise<DNSRecord>`

@@ -298,1 +298,35 @@ /* eslint-disable camelcase */

});
test('Initiate zone activation check by id', async t => {
nock('https://api.cloudflare.com')
.put('/client/v4/zones/1/activation_check')
.reply(200, {
result: {
id: '1'
}
});
let zone = await t.context.cf.checkZoneActivation('1');
t.false(Zone.is(zone));
t.true(zone.id === '1');
});
test('Initiate zone activation check by Zone', async t => {
let z = Zone.create({
id: '1',
name: 'example.com'
});
nock('https://api.cloudflare.com')
.put('/client/v4/zones/1/activation_check')
.reply(200, {
result: {
id: '1'
}
});
let zone = await t.context.cf.checkZoneActivation(z);
t.false(Zone.is(zone));
t.true(zone.id === '1');
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc