From 9c036925fd3af5f2f9b36634806219c736bfc261 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sun, 11 Jun 2017 21:07:41 +0200 Subject: [PATCH] now using tsclass --- dist/cflare.classes.cflareaccount.d.ts | 7 ++++--- dist/cflare.classes.cflareaccount.js | 3 ++- dist/cflare.interfaces.d.ts | 1 - dist/cflare.plugins.d.ts | 12 +++++++----- dist/cflare.plugins.js | 19 +++++++++++++------ package.json | 1 + ts/cflare.classes.cflareaccount.ts | 11 +++++++---- ts/cflare.interfaces.ts | 2 -- ts/cflare.plugins.ts | 20 +++++++++++++++----- yarn.lock | 4 ++++ 10 files changed, 53 insertions(+), 27 deletions(-) diff --git a/dist/cflare.classes.cflareaccount.d.ts b/dist/cflare.classes.cflareaccount.d.ts index 5cc3485..64d7fd4 100644 --- a/dist/cflare.classes.cflareaccount.d.ts +++ b/dist/cflare.classes.cflareaccount.d.ts @@ -1,5 +1,6 @@ import 'typings-global'; import * as interfaces from './cflare.interfaces'; +import { TDnsRecord } from 'tsclass'; export declare class CflareAccount { private authEmail; private authKey; @@ -9,9 +10,9 @@ export declare class CflareAccount { key: string; }): void; getZoneId(domainName: string): Promise; - getRecord(domainNameArg: string, typeArg: interfaces.TRecord): Promise; - createRecord(domainNameArg: string, typeArg: interfaces.TRecord, contentArg: string): Promise<{}>; - removeRecord(domainNameArg: string, typeArg: interfaces.TRecord): Promise<{}>; + getRecord(domainNameArg: string, typeArg: TDnsRecord): Promise; + createRecord(domainNameArg: string, typeArg: TDnsRecord, contentArg: string): Promise<{}>; + removeRecord(domainNameArg: string, typeArg: TDnsRecord): Promise<{}>; updateRecord(domainNameArg: string, typeArg: string, valueArg: any): Promise<{}>; /** * list all records of a specified domain name diff --git a/dist/cflare.classes.cflareaccount.js b/dist/cflare.classes.cflareaccount.js index 3d3b00d..4aa4924 100644 --- a/dist/cflare.classes.cflareaccount.js +++ b/dist/cflare.classes.cflareaccount.js @@ -12,6 +12,7 @@ require("typings-global"); const plugins = require("./cflare.plugins"); class CflareAccount { constructor() { + // Nothing here } auth(optionsArg) { this.authEmail = optionsArg.email; @@ -175,4 +176,4 @@ class CflareAccount { } } exports.CflareAccount = CflareAccount; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2ZsYXJlLmNsYXNzZXMuY2ZsYXJlYWNjb3VudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2NmbGFyZS5jbGFzc2VzLmNmbGFyZWFjY291bnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDBCQUF1QjtBQUN2Qiw0Q0FBNEM7QUFHNUM7SUFHRTtJQUVBLENBQUM7SUFFRCxJQUFJLENBQUUsVUFBMEM7UUFDOUMsSUFBSSxDQUFDLFNBQVMsR0FBRyxVQUFVLENBQUMsS0FBSyxDQUFBO1FBQ2pDLElBQUksQ0FBQyxPQUFPLEdBQUcsVUFBVSxDQUFDLEdBQUcsQ0FBQTtJQUMvQixDQUFDO0lBRUssU0FBUyxDQUFFLFVBQWtCOztZQUNqQyxJQUFJLE1BQU0sR0FBRyxJQUFJLE9BQU8sQ0FBQyxXQUFXLENBQUMsTUFBTSxDQUFDLFVBQVUsQ0FBQyxDQUFBO1lBQ3ZELElBQUksU0FBUyxHQUFHLE1BQU0sSUFBSSxDQUFDLFNBQVMsQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLENBQUE7WUFDckQsSUFBSSxnQkFBZ0IsR0FBRyxTQUFTLENBQUMsTUFBTSxDQUFDLENBQUMsT0FBTztnQkFDOUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxJQUFJLEtBQUssVUFBVSxDQUFBO1lBQ3BDLENBQUMsQ0FBQyxDQUFBO1lBQ0YsRUFBRSxDQUFDLENBQUMsZ0JBQWdCLENBQUMsTUFBTSxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7Z0JBQ2pDLE1BQU0sQ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LENBQUMsQ0FBQTtZQUMvRCxNQUFNLE9BQU8sQ0FBQyxVQUFVLENBQUMsUUFBUSxDQUFDLFlBQVksQ0FBQyxDQUFBO1lBQy9DLEVBQUUsQ0FBQyxDQUFDLFVBQVUsR0FBRyxFQUFFLENBQUMsQ0FBQyxDQUFDO2dCQUNwQixVQUFVLEVBQUUsQ0FBQTtnQkFDWixNQUFNLENBQUMsTUFBTSxXQUFXLEVBQUUsQ0FBQTtZQUM1QixDQUFDO1FBQ0gsQ0FBQyxDQUFBLENBQUE7UUFDRCxXQUFXLEVBQUUsQ0FBQTtRQUNiLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFBO0lBQ3JCLENBQUM7SUFFTyxTQUFTO1FBQ2YsTUFBTSxDQUFDLENBQUMsSUFBSSxDQUFDLFNBQVMsSUFBSSxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUEsQ0FBQyw2QkFBNkI7SUFDdkUsQ0FBQztDQUNGO0FBektELHNDQXlLQyJ9 \ No newline at end of file diff --git a/dist/cflare.interfaces.d.ts b/dist/cflare.interfaces.d.ts index 6517de5..d793f57 100644 --- a/dist/cflare.interfaces.d.ts +++ b/dist/cflare.interfaces.d.ts @@ -1,4 +1,3 @@ -export declare type TRecord = 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SRV' | 'LOC' | 'MX' | 'NS' | 'SPF'; export interface ICflareZone { 'id': string; 'name': string; diff --git a/dist/cflare.plugins.d.ts b/dist/cflare.plugins.d.ts index 0f16cb8..01987a6 100644 --- a/dist/cflare.plugins.d.ts +++ b/dist/cflare.plugins.d.ts @@ -1,6 +1,8 @@ import 'typings-global'; -export declare let beautylog: any; -export import q = require('smartq'); -export import smartrequest = require('smartrequest'); -export import smartstring = require('smartstring'); -export import smartdelay = require('smartdelay'); +import * as beautylog from 'beautylog'; +import * as q from 'smartq'; +import * as smartdelay from 'smartdelay'; +import * as smartrequest from 'smartrequest'; +import * as smartstring from 'smartstring'; +import * as tsclass from 'tsclass'; +export { beautylog, q, smartdelay, smartrequest, smartstring, tsclass }; diff --git a/dist/cflare.plugins.js b/dist/cflare.plugins.js index a8ff5c7..65dfa5f 100644 --- a/dist/cflare.plugins.js +++ b/dist/cflare.plugins.js @@ -1,9 +1,16 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); require("typings-global"); -exports.beautylog = require('beautylog'); -exports.q = require("smartq"); -exports.smartrequest = require("smartrequest"); -exports.smartstring = require("smartstring"); -exports.smartdelay = require("smartdelay"); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2ZsYXJlLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9jZmxhcmUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUNaLFFBQUEsU0FBUyxHQUFHLE9BQU8sQ0FBQyxXQUFXLENBQUMsQ0FBQTtBQUMzQyw4QkFBbUM7QUFDbkMsK0NBQW9EO0FBQ3BELDZDQUFrRDtBQUNsRCwyQ0FBZ0QifQ== \ No newline at end of file +const beautylog = require("beautylog"); +exports.beautylog = beautylog; +const q = require("smartq"); +exports.q = q; +const smartdelay = require("smartdelay"); +exports.smartdelay = smartdelay; +const smartrequest = require("smartrequest"); +exports.smartrequest = smartrequest; +const smartstring = require("smartstring"); +exports.smartstring = smartstring; +const tsclass = require("tsclass"); +exports.tsclass = tsclass; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2ZsYXJlLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9jZmxhcmUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2Qix1Q0FBc0M7QUFRcEMsOEJBQVM7QUFQWCw0QkFBMkI7QUFRekIsY0FBQztBQVBILHlDQUF3QztBQVF0QyxnQ0FBVTtBQVBaLDZDQUE0QztBQVExQyxvQ0FBWTtBQVBkLDJDQUEwQztBQVF4QyxrQ0FBVztBQVBiLG1DQUFrQztBQVFoQywwQkFBTyJ9 \ No newline at end of file diff --git a/package.json b/package.json index a47c9f8..c2d856e 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "smartq": "^1.1.1", "smartrequest": "^1.0.6", "smartstring": "^2.0.24", + "tsclass": "^1.0.12", "typings-global": "^1.0.17" }, "devDependencies": { diff --git a/ts/cflare.classes.cflareaccount.ts b/ts/cflare.classes.cflareaccount.ts index 3a740e1..6a21608 100644 --- a/ts/cflare.classes.cflareaccount.ts +++ b/ts/cflare.classes.cflareaccount.ts @@ -2,11 +2,14 @@ import 'typings-global' import plugins = require('./cflare.plugins') import * as interfaces from './cflare.interfaces' +// interfaces +import { TDnsRecord } from 'tsclass' + export class CflareAccount { private authEmail: string private authKey: string constructor() { - + // Nothing here } auth (optionsArg: { email: string, key: string }) { @@ -28,7 +31,7 @@ export class CflareAccount { } } - getRecord (domainNameArg: string, typeArg: interfaces.TRecord): Promise { + getRecord (domainNameArg: string, typeArg: TDnsRecord): Promise { let done = plugins.q.defer() let result: interfaces.ICflareRecord @@ -43,7 +46,7 @@ export class CflareAccount { return done.promise } - async createRecord (domainNameArg: string, typeArg: interfaces.TRecord, contentArg: string) { + async createRecord (domainNameArg: string, typeArg: TDnsRecord, contentArg: string) { let done = plugins.q.defer() let domain = new plugins.smartstring.Domain(domainNameArg) let domainIdArg = await this.getZoneId(domain.zoneName) @@ -59,7 +62,7 @@ export class CflareAccount { return done.promise } - removeRecord (domainNameArg: string, typeArg: interfaces.TRecord) { + removeRecord (domainNameArg: string, typeArg: TDnsRecord) { let done = plugins.q.defer() let domain = new plugins.smartstring.Domain(domainNameArg) this.getRecord(domain.fullName, typeArg) diff --git a/ts/cflare.interfaces.ts b/ts/cflare.interfaces.ts index 0d50a45..8d15bec 100644 --- a/ts/cflare.interfaces.ts +++ b/ts/cflare.interfaces.ts @@ -1,7 +1,5 @@ import * as plugins from './cflare.plugins' -export type TRecord = 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SRV' | 'LOC' | 'MX' | 'NS' | 'SPF' - export interface ICflareZone { 'id': string 'name': string diff --git a/ts/cflare.plugins.ts b/ts/cflare.plugins.ts index f698319..c6252ff 100644 --- a/ts/cflare.plugins.ts +++ b/ts/cflare.plugins.ts @@ -1,6 +1,16 @@ import 'typings-global' -export let beautylog = require('beautylog') -export import q = require('smartq') -export import smartrequest = require('smartrequest') -export import smartstring = require('smartstring') -export import smartdelay = require('smartdelay') +import * as beautylog from 'beautylog' +import * as q from 'smartq' +import * as smartdelay from 'smartdelay' +import * as smartrequest from 'smartrequest' +import * as smartstring from 'smartstring' +import * as tsclass from 'tsclass' + +export { + beautylog, + q, + smartdelay, + smartrequest, + smartstring, + tsclass +} diff --git a/yarn.lock b/yarn.lock index 008815a..607be89 100644 --- a/yarn.lock +++ b/yarn.lock @@ -606,6 +606,10 @@ through2@^2.0.1: readable-stream "^2.1.5" xtend "~4.0.1" +tsclass@^1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/tsclass/-/tsclass-1.0.12.tgz#350c4e567ca7ae7fa426b95bbb77ec478ec0edef" + type-detect@0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"