Socket
Socket
Sign inDemoInstall

@google-cloud/dns

Package Overview
Dependencies
118
Maintainers
16
Versions
47
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.7.0 to 0.7.1

12

package.json
{
"name": "@google-cloud/dns",
"description": "Cloud DNS Client Library for Node.js",
"version": "0.7.0",
"version": "0.7.1",
"license": "Apache-2.0",

@@ -54,3 +54,3 @@ "author": "Google Inc.",

"dependencies": {
"@google-cloud/common": "^0.13.0",
"@google-cloud/common": "^0.16.1",
"arrify": "^1.0.0",

@@ -64,8 +64,8 @@ "dns-zonefile": "0.2.2",

"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^2.0.9",
"@google-cloud/nodejs-repo-tools": "^2.1.0",
"async": "^2.1.4",
"codecov": "^2.3.1",
"codecov": "^3.0.0",
"eslint": "^4.9.0",
"eslint-config-prettier": "^2.6.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-node": "^6.0.0",
"eslint-plugin-prettier": "^2.3.1",

@@ -76,3 +76,3 @@ "extend": "^3.0.1",

"jsdoc": "^3.5.5",
"mocha": "^4.0.1",
"mocha": "^5.0.0",
"nyc": "^11.2.1",

@@ -79,0 +79,0 @@ "power-assert": "^1.4.4",

<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
# Google Cloud DNS: Node.js Client
# [Google Cloud DNS: Node.js Client](https://github.com/googleapis/nodejs-dns)
[![release level](https://img.shields.io/badge/release%20level-alpha-yellow.svg?style&#x3D;flat)](https://cloud.google.com/terms/launch-stages)
[![release level](https://img.shields.io/badge/release%20level-alpha-orange.svg?style&#x3D;flat)](https://cloud.google.com/terms/launch-stages)
[![CircleCI](https://img.shields.io/circleci/project/github/googleapis/nodejs-dns.svg?style=flat)](https://circleci.com/gh/googleapis/nodejs-dns)

@@ -14,3 +14,5 @@ [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/googleapis/nodejs-dns?branch=master&svg=true)](https://ci.appveyor.com/project/googleapis/nodejs-dns)

* [Cloud DNS Node.js Client API Reference][client-docs]
* [github.com/googleapis/nodejs-dns](https://github.com/googleapis/nodejs-dns)
* [Cloud DNS Documentation][product-docs]

@@ -92,8 +94,8 @@

Samples are in the [`samples/`](https://github.com/blob/master/samples) directory. The samples' `README.md`
Samples are in the [`samples/`](https://github.com/googleapis/nodejs-dns/tree/master/samples) directory. The samples' `README.md`
has instructions for running the samples.
| Sample | Source Code |
| --------------------------- | --------------------------------- |
| Zones | [source code](https://github.com/googleapis/nodejs-dns/blob/master/samples/zones.js) |
| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Zones | [source code](https://github.com/googleapis/nodejs-dns/blob/master/samples/zones.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dns&page=editor&open_in_editor=samples/zones.js,samples/README.md) |

@@ -117,3 +119,3 @@ The [Cloud DNS Node.js Client API Reference][client-docs] documentation

Contributions welcome! See the [Contributing Guide](.github/CONTRIBUTING.md).
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-dns/blob/master/.github/CONTRIBUTING.md).

@@ -124,5 +126,6 @@ ## License

See [LICENSE](LICENSE)
See [LICENSE](https://github.com/googleapis/nodejs-dns/blob/master/LICENSE)
[client-docs]: https://cloud.google.com/nodejs/docs/reference/dns/latest/
[product-docs]: https://cloud.google.com/dns/docs/
[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png

@@ -29,4 +29,6 @@ /*!

* @example
* var zone = dns.zone('zone-id');
* var change = zone.change('change-id');
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
* const change = zone.change('change-id');
*/

@@ -52,2 +54,7 @@ function Change(zone, id) {

* @example
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
* const change = zone.change('change-id');
*
* change.exists(function(err, exists) {});

@@ -91,2 +98,7 @@ *

* @example
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
* const change = zone.change('change-id');
*
* change.get(function(err, change, apiResponse) {

@@ -120,3 +132,3 @@ * // `change.metadata` has been populated.

*
* @resource [Changes: get API Documentation]{@link https://cloud.google.com/dns/api/v1/changes/get}
* @see [Changes: get API Documentation]{@link https://cloud.google.com/dns/api/v1/changes/get}
*

@@ -128,2 +140,7 @@ * @method Change#getMetadata

* @example
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
* const change = zone.change('change-id');
*
* change.getMetadata(function(err, metadata, apiResponse) {

@@ -188,3 +205,8 @@ * if (!err) {

* @example
* var config = {
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
* const change = zone.change('change-id');
*
* const config = {
* add: {

@@ -201,3 +223,2 @@ * // ...

*
*
* //-

@@ -207,4 +228,4 @@ * // If the callback is omitted, we'll return a Promise.

* change.create(config).then(function(data) {
* var change = data[0];
* var apiResponse = data[1];
* const change = data[0];
* const apiResponse = data[1];
* });

@@ -211,0 +232,0 @@ */

@@ -83,6 +83,7 @@ /*!

if (!(this instanceof DNS)) {
options = common.util.normalizeArguments(this, options);
return new DNS(options);
}
options = common.util.normalizeArguments(this, options);
var config = {

@@ -136,3 +137,6 @@ baseUrl: 'https://www.googleapis.com/dns/v1',

* @example
* var config = {
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
*
* const config = {
* dnsName: 'example.com.', // note the period at the end of the domain.

@@ -152,4 +156,4 @@ * description: 'This zone is awesome!'

* dns.createZone('my-awesome-zone', config).then(function(data) {
* var zone = data[0];
* var apiResponse = data[1];
* const zone = data[0];
* const apiResponse = data[1];
* });

@@ -226,2 +230,5 @@ */

* @example
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
*
* dns.getZones(function(err, zones, apiResponse) {});

@@ -233,3 +240,3 @@ *

* dns.getZones().then(function(data) {
* var zones = data[0];
* const zones = data[0];
* });

@@ -284,2 +291,5 @@ */

* @example
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
*
* dns.getZonesStream()

@@ -315,3 +325,6 @@ * .on('error', console.error)

* @example
* var zone = dns.zone('my-zone');
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
*
* const zone = dns.zone('my-zone');
*/

@@ -318,0 +331,0 @@ DNS.prototype.zone = function(name) {

@@ -40,5 +40,7 @@ /*!

* @example
* var zone = dns.zone('my-awesome-zone');
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('my-awesome-zone');
*
* var record = zone.record('a', {
* const record = zone.record('a', {
* name: 'example.com.',

@@ -137,2 +139,11 @@ * ttl: 86400,

* @example
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
* const record = zone.record('a', {
* name: 'example.com.',
* ttl: 86400,
* data: '1.2.3.4'
* });
*
* record.delete(function(err, change, apiResponse) {

@@ -139,0 +150,0 @@ * if (!err) {

@@ -39,3 +39,6 @@ /*!

* @example
* var zone = dns.zone('zone-id');
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
*
* const zone = dns.zone('zone-id');
*/

@@ -53,3 +56,6 @@ function Zone(dns, name) {

* @example
* var config = {
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
*
* const config = {
* dnsName: 'example.com.',

@@ -69,4 +75,4 @@ * // ...

* zone.create(config).then(function(data) {
* var zone = data[0];
* var apiResponse = data[1];
* const zone = data[0];
* const apiResponse = data[1];
* });

@@ -93,2 +99,6 @@ */

* @example
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
*
* zone.exists(function(err, exists) {});

@@ -100,3 +110,3 @@ *

* zone.exists().then(function(data) {
* var exists = data[0];
* const exists = data[0];
* });

@@ -133,2 +143,6 @@ */

* @example
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
*
* zone.get(function(err, zone, apiResponse) {

@@ -142,4 +156,4 @@ * // `zone.metadata` has been populated.

* zone.get().then(function(data) {
* var zone = data[0];
* var apiResponse = data[1];
* const zone = data[0];
* const apiResponse = data[1];
* });

@@ -170,2 +184,6 @@ */

* @example
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
*
* zone.getMetadata(function(err, metadata, apiResponse) {});

@@ -177,4 +195,4 @@ *

* zone.getMetadata().then(function(data) {
* var metadata = data[0];
* var apiResponse = data[1];
* const metadata = data[0];
* const apiResponse = data[1];
* });

@@ -254,3 +272,6 @@ */

* @example
* var change = zone.change('change-id');
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
* const change = zone.change('change-id');
*/

@@ -292,3 +313,7 @@ Zone.prototype.change = function(id) {

* @example
* var oldARecord = zone.record('a', {
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
*
* const oldARecord = zone.record('a', {
* name: 'example.com.',

@@ -299,3 +324,3 @@ * data: '1.2.3.4',

*
* var newARecord = zone.record('a', {
* const newARecord = zone.record('a', {
* name: 'example.com.',

@@ -306,3 +331,3 @@ * data: '5.6.7.8',

*
* var config = {
* const config = {
* add: newARecord,

@@ -322,4 +347,4 @@ * delete: oldARecord

* zone.createChange(config).then(function(data) {
* var change = data[0];
* var apiResponse = data[1];
* const change = data[0];
* const apiResponse = data[1];
* });

@@ -387,2 +412,6 @@ */

* @example
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
*
* zone.delete(function(err, apiResponse) {

@@ -409,3 +438,3 @@ * if (!err) {

* zone.delete().then(function(data) {
* var apiResponse = data[0];
* const apiResponse = data[0];
* });

@@ -458,3 +487,7 @@ */

* @example
* var oldARecord = zone.record('a', {
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
*
* const oldARecord = zone.record('a', {
* name: 'example.com.',

@@ -465,3 +498,3 @@ * data: '1.2.3.4',

*
* var callback = function(err, change, apiResponse) {
* const callback = function(err, change, apiResponse) {
* if (!err) {

@@ -477,3 +510,3 @@ * // Delete change modification was created.

* //-
* var oldNs1Record = zone.record('ns', {
* const oldNs1Record = zone.record('ns', {
* name: 'example.com.',

@@ -484,3 +517,3 @@ * data: 'ns-cloud1.googledomains.com.',

*
* var oldNs2Record = zone.record('ns', {
* const oldNs2Record = zone.record('ns', {
* name: 'example.com.',

@@ -511,4 +544,4 @@ * data: 'ns-cloud2.googledomains.com.',

* zone.deleteRecords(oldARecord).then(function(data) {
* var change = data[0];
* var apiResponse = data[1];
* const change = data[0];
* const apiResponse = data[1];
* });

@@ -594,4 +627,8 @@ */

* @example
* var zoneFilename = '/Users/stephen/zonefile.zone';
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
*
* const zoneFilename = '/Users/stephen/zonefile.zone';
*
* zone.export(zoneFilename, function(err) {

@@ -658,3 +695,6 @@ * if (!err) {

* @example
* var callback = function(err, changes, nextQuery, apiResponse) {
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
*
* const callback = function(err, changes, nextQuery, apiResponse) {
* // The `metadata` property is populated for you with the metadata at the

@@ -674,2 +714,4 @@ * // time of fetching.

*
* const zone = dns.zone('zone-id');
*
* zone.getChanges(callback);

@@ -681,3 +723,3 @@ *

* zone.getChanges().then(function(data) {
* var changes = data[0];
* const changes = data[0];
* });

@@ -793,3 +835,6 @@ */

* @example
* var callback = function(err, records, nextQuery, apiResponse) {
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
*
* const callback = function(err, records, nextQuery, apiResponse) {
* if (!err) {

@@ -804,2 +849,4 @@ * // records is an array of Record objects.

*
* const zone = dns.zone('zone-id');
*
* zone.getRecords(callback);

@@ -812,3 +859,3 @@ *

* // Get the namespace records for example.com.
* var query = {
* const query = {
* name: 'example.com.',

@@ -843,3 +890,3 @@ * type: 'NS'

* zone.getRecords(query).then(function(data) {
* var records = data[0];
* const records = data[0];
* });

@@ -914,2 +961,6 @@ */

* @example
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
*
* zone.getRecordsStream()

@@ -955,4 +1006,8 @@ * .on('error', console.error)

* @example
* var zoneFilename = '/Users/dave/zonefile.zone';
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
*
* const zoneFilename = '/Users/dave/zonefile.zone';
*
* zone.import(zoneFilename, function(err, change, apiResponse) {

@@ -968,4 +1023,4 @@ * if (!err) {

* zone.import(zoneFilename).then(function(data) {
* var change = data[0];
* var apiResponse = data[1];
* const change = data[0];
* const apiResponse = data[1];
* });

@@ -1019,6 +1074,11 @@ */

* @example
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
*
* const zone = dns.zone('zone-id');
*
* //-
* // Reference an existing record to delete from your zone.
* //-
* var oldARecord = zone.record('a', {
* const oldARecord = zone.record('a', {
* name: 'example.com.',

@@ -1032,3 +1092,3 @@ * data: '1.2.3.4',

* //-
* var newARecord = zone.record('a', {
* const newARecord = zone.record('a', {
* name: 'example.com.',

@@ -1078,3 +1138,8 @@ * data: '5.6.7.8',

* @example
* var newNs1Record = zone.record('ns', {
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
*
* const zone = dns.zone('zone-id');
*
* const newNs1Record = zone.record('ns', {
* name: 'example.com.',

@@ -1085,3 +1150,3 @@ * data: 'ns-cloud1.googledomains.com.',

*
* var newNs2Record = zone.record('ns', {
* const newNs2Record = zone.record('ns', {
* name: 'example.com.',

@@ -1092,3 +1157,3 @@ * data: 'ns-cloud2.googledomains.com.',

*
* var newNsRecords = [
* const newNsRecords = [
* newNs1Record,

@@ -1108,4 +1173,4 @@ * newNs2Record

* zone.replaceRecords('ns', newNsRecords).then(function(data) {
* var change = data[0];
* var apiResponse = data[1];
* const change = data[0];
* const apiResponse = data[1];
* });

@@ -1141,2 +1206,5 @@ */

* @example
* const DNS = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
* zone.deleteRecordsByType_(['NS', 'A'], function(err, change, apiResponse) {

@@ -1143,0 +1211,0 @@ * if (!err) {

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc