Socket
Socket
Sign inDemoInstall

domeneshop.js

Package Overview
Dependencies
4
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.3 to 0.1.4

examples/dns_failover.js

14

CHANGELOG.md

@@ -7,2 +7,15 @@ # Changelog

## [0.1.4] - 2019-05-31
### Added
- New example with dns failover
- Added DNS-record type TXT
### Changed
- Removed unused variable in example
- Updated Axios to version 0.19.0
- Make type in DNS-record check case insensitive
### Removed
- Removed old duplicate files from dist
## [0.1.3] - 2019-05-21

@@ -30,2 +43,3 @@ ### Added

[0.1.4]: https://github.com/domeneshop/domeneshop.js/compare/v0.1.3...v0.1.4
[0.1.3]: https://github.com/domeneshop/domeneshop.js/compare/v0.1.2...v0.1.3

@@ -32,0 +46,0 @@ [0.1.2]: https://github.com/domeneshop/domeneshop.js/compare/v0.1.1...v0.1.2

2

dist/domeneshop.js

@@ -20,3 +20,3 @@ "use strict";

constructor(token, secret) {
this.version = "0.1.0";
this.version = "0.1.3";
this.api = new api_1.default(token, secret);

@@ -23,0 +23,0 @@ this.dns = new dns_1.default(this.api);

@@ -1,2 +0,2 @@

import { AxiosResponse } from "axios";
import { AxiosResponse, Method } from "axios";
/**

@@ -24,3 +24,3 @@ * Class for Domeneshop API calls.

*/
apiCall(method?: string, endpoint?: string, data?: any, params?: {
apiCall(method?: Method, endpoint?: string, data?: any, params?: {
[key: string]: any;

@@ -27,0 +27,0 @@ }): Promise<AxiosResponse>;

@@ -18,2 +18,8 @@ /**

/**
* Interface for an A-record
*/
export interface IDnsRecordTXT extends IDnsRecordBase {
type: "TXT";
}
/**
* Interface for an AAAA-record

@@ -81,3 +87,3 @@ */

*/
export declare type DnsRecord = IDnsRecordA | IDnsRecordAAAA | IDnsRecordCname | IDnsRecordAname | IDnsRecordMX | IDnsRecordSRV | IDnsRecordTLSA | IDnsRecordDS | IDnsRecordCAA;
export declare type DnsRecord = IDnsRecordA | IDnsRecordAAAA | IDnsRecordCname | IDnsRecordAname | IDnsRecordMX | IDnsRecordSRV | IDnsRecordTLSA | IDnsRecordTXT | IDnsRecordDS | IDnsRecordCAA;
/**

@@ -84,0 +90,0 @@ * Performs a simple validation a DNS-record.

@@ -19,2 +19,3 @@ "use strict";

TLSA: ["usage", "selector", "dtype"],
TXT: [],
};

@@ -24,6 +25,6 @@ if (!params.hasOwnProperty("type")) {

}
if (!types.hasOwnProperty(params.type)) {
if (!types.hasOwnProperty(params.type.toUpperCase())) {
throw new Error("Record has an unknown type");
}
const special = types[params.type];
const special = types[params.type.toUpperCase()];
const fields = common.concat(special);

@@ -30,0 +31,0 @@ if (params.hasOwnProperty("id")) {

@@ -10,3 +10,2 @@ "use strict";

const Domeneshop = require('domeneshop.js');
const axios = require('axios');

@@ -13,0 +12,0 @@ /**

{
"name": "domeneshop.js",
"version": "0.1.3",
"version": "0.1.4",
"description": "Javascript package for the Domeneshop API",

@@ -22,10 +22,10 @@ "main": "dist/domeneshop.js",

"devDependencies": {
"@types/node": "^11.13.4",
"@types/node": "^11.13.13",
"chai": "^4.2.0",
"mocha": "^6.1.4",
"tslint": "^5.14.0",
"typescript": "^3.3.4000"
"tslint": "^5.17.0",
"typescript": "^3.5.1"
},
"dependencies": {
"axios": "^0.18.0"
"axios": "^0.19.0"
},

@@ -32,0 +32,0 @@ "keywords": [

import axios from "axios";
import { AxiosRequestConfig, AxiosResponse } from "axios";
import { AxiosRequestConfig, AxiosResponse, Method } from "axios";

@@ -32,3 +32,3 @@ /**

public apiCall(
method: string = "GET",
method: Method = "GET",
endpoint: string = "/",

@@ -35,0 +35,0 @@ data?: any,

@@ -20,2 +20,9 @@ /**

/**
* Interface for an A-record
*/
export interface IDnsRecordTXT extends IDnsRecordBase {
type: "TXT";
}
/**
* Interface for an AAAA-record

@@ -98,2 +105,3 @@ */

IDnsRecordTLSA |
IDnsRecordTXT |
IDnsRecordDS |

@@ -118,2 +126,3 @@ IDnsRecordCAA;

TLSA: ["usage", "selector", "dtype"],
TXT: [],
};

@@ -124,7 +133,8 @@

}
if (!types.hasOwnProperty(params.type)) {
if (!types.hasOwnProperty(params.type.toUpperCase())) {
throw new Error("Record has an unknown type");
}
const special: string[] = types[params.type];
const special: string[] = types[params.type.toUpperCase()];
const fields = common.concat(special);

@@ -131,0 +141,0 @@

@@ -89,2 +89,11 @@ var expect = require("chai").expect;

});
it("should return true on valid TXT-record", function () {
var validA = dnsrecord.validate({
type: "TXT",
ttl: 3600,
data: 'test',
host: 'localhost',
});
expect(validA).to.true;
});
});

@@ -91,0 +100,0 @@

Sorry, the diff of this file is not supported yet

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