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.
cloudflare
Advanced tools
An edible "BREAD" (Browse, Read, Edit, Add, and Delete) API Client for the CloudFlare v4 Client API.
With this API client, you'll get the following features:
This CloudFlare API client supports Node.js v4 and greater.
var CFClient = require('cloudflare');
var client = new CFClient({
email: 'you@example.com',
key: 'deadbeef'
});
Zone
A normalized representation of a CloudFlare Zone. Properties that were
snake_cased
have been aliased to camelCased
. TODO: document all the known
properties.
Zone.create(properties): Zone
Zone
object.Zone
object.Creates a new Zone
object with the provided properties. The returned object
can be used with the below methods that accept a Zone
object.
Zone.is(z): boolean
Zone
object.true
if the parameter is a Zone
object, otherwise false
.browseZones([query, [options]]): Promise<PaginatedResponse<Zone[]>>
Zone
objects wrapped in a PaginatedResponse
Retrives the list of Zone
objects, optionally filtered and sorted by query
options.
readZone(z_id, [options]): Promise<Zone>
Zone
Retrives the Zone
for the zone identifier z_id
.
editZone(z, [options]): Promise<Zone>
Zone
objectZone
.Saves the modifications to the Zone
object.
Note: The CloudFlare API currently doesn't support patching multiple properties at once. This method executes the modifications in series, but if an error occurs, there are no guarantees which properties would have been applied.
addZone(z, [jumpstart, [options]]): Promise<Zone>
Zone
objecttrue
to automatically fetch existing DNS records
(default). false
to disable this behavior.Add a zone to an account or organization.
deleteZone(z, [options]): Promise<{id: string}>
Zone
object or string zone idDeletes the Zone
from CloudFlare. A tombstone stub is returned.
deleteCache(z, query, [options]): Promise<bool>
Zone
object or string zone idpurge_everything
: Delete all of the zone's content from the CloudFlare
cache. Note: This may cause an increase in connections to your server
after performing this action.files
: An array of URLs that should be removed from cache.tags
: Removes assets from cache that were served with a Cache-Tag header
that matches a string in this array.true
.Purges content from CloudFlare's cache. Please note that query
is required for
this API call.
The CloudFlare API client makes it easy to manage DNS records for domains on CloudFlare.
DNSRecord
A normalized representation of a CloudFlare DNS Record type. Properties that
were snake_cased
have been aliased to be camelCased
.
DNSRecord.create(properties): DNSRecord
DNSRecord
object.DNSRecord
object.Creates a new DNSRecord
object with the provided properties. The returned
object can be used with the below methods that accept a DNSRecord
object.
DNSRecord.is(rr): boolean
DNSRecord
object.true
if the parameter is a DNSRecord
object, otherwise false
.browseDNS(z, [query, [options]]): Promise<PaginatedResponse<DNSRecord[]>>
Zone
object or string zone idDNSRecord
objects wrapped in a PaginatedResponse
Retrives the listing of DNSRecord
objects for a Zone
(or zone id).
readDNS(dns_id, z, [options]): Promise<DNSRecord>
Zone
object or string zone idDNSRecord
Retrive the DNSRecord
for a identifier did
from Zone
(or zone id).
editDNS(d, [options]): Promise<DNSRecord>
DNSRecord
to be savedDNSRecord
Save the modifications to the DNSRecord
.
addDNS(d, [options]): Promise<DNSRecord>
DNSRecord
to be addedDNSRecord
Create a DNS Record corresponding to the provided DNSRecord
. A new DNSRecord
with an id field is returned.
deleteDNS(d, [options]): Promise<{id: string}>
DNSRecord
to be deletedDeletes the DNSRecord
from the DNS. A tombstone stub is returned.
IPRanges
Normalized representation of the CloudFlare IP Ranges.
IPRanges{
IPv4CIDRs: [
'199.27.128.0/21'
],
IPv6CIDRs: [
'2400:cb00::/32'
]
}
IPRanges.is(ip): boolean
IPRanges
object.true
if the parameter is a IPRanges
object, otherwise false
.readIPs(): Promise<IPRanges>
IPRanges
Retrieves the CloudFlare Edge IP addresses. These are the IP addresses used by CloudFlare to connect to your server.
FAQs
The official TypeScript library for the Cloudflare API
The npm package cloudflare receives a total of 53,067 weekly downloads. As such, cloudflare popularity was classified as popular.
We found that cloudflare demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.