add type TRecord, update ci

This commit is contained in:
Philipp Kunz 2017-06-04 18:09:46 +02:00
parent 3503fbc7b3
commit 2f065b57fc
7 changed files with 25 additions and 13 deletions

View File

@ -1,4 +1,10 @@
image: hosttoday/ht-docker-node:npmts
# gitzone standard
image: hosttoday/ht-docker-node:npmci
cache:
paths:
- .yarn/
key: "$CI_BUILD_STAGE"
stages:
- test
@ -10,6 +16,7 @@ testLEGACY:
stage: test
script:
- npmci test legacy
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
allow_failure: true
@ -18,6 +25,7 @@ testLTS:
stage: test
script:
- npmci test lts
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
@ -25,6 +33,7 @@ testSTABLE:
stage: test
script:
- npmci test stable
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
@ -47,10 +56,13 @@ trigger:
- docker
pages:
image: hosttoday/ht-docker-node:npmpage
image: hosttoday/ht-docker-node:npmci
stage: pages
script:
- npmci command npmpage --publish gitlab
- npmci command yarn global add npmpage
- npmci command npmpage
tags:
- docker
only:
- tags
artifacts:

View File

@ -9,9 +9,9 @@ export declare class CflareAccount {
key: string;
}): void;
getZoneId(domainName: string): Promise<string>;
getRecord(domainNameArg: string, typeArg: string): Promise<interfaces.ICflareRecord>;
createRecord(domainNameArg: string, typeArg: string, contentArg: string): Promise<{}>;
removeRecord(domainNameArg: string, typeArg: string): Promise<{}>;
getRecord(domainNameArg: string, typeArg: interfaces.TRecord): Promise<interfaces.ICflareRecord>;
createRecord(domainNameArg: string, typeArg: interfaces.TRecord, contentArg: string): Promise<{}>;
removeRecord(domainNameArg: string, typeArg: interfaces.TRecord): Promise<{}>;
updateRecord(domainNameArg: string, typeArg: string, valueArg: any): Promise<{}>;
/**
* list all records of a specified domain name

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
export declare type TRecord = '';
export declare type TRecord = 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SRV' | 'LOC' | 'MX' | 'NS' | 'SPF';
export interface ICflareZone {
'id': string;
'name': string;

View File

@ -27,7 +27,7 @@ export class CflareAccount {
}
}
getRecord (domainNameArg: string, typeArg: string): Promise<interfaces.ICflareRecord> {
getRecord (domainNameArg: string, typeArg: interfaces.TRecord): Promise<interfaces.ICflareRecord> {
let done = plugins.q.defer()
let result: interfaces.ICflareRecord
@ -42,7 +42,7 @@ export class CflareAccount {
return done.promise
}
async createRecord (domainNameArg: string, typeArg: string, contentArg: string) {
async createRecord (domainNameArg: string, typeArg: interfaces.TRecord, contentArg: string) {
let done = plugins.q.defer()
let domain = new plugins.smartstring.Domain(domainNameArg)
let domainIdArg = await this.getZoneId(domain.zoneName)
@ -58,7 +58,7 @@ export class CflareAccount {
return done.promise
}
removeRecord (domainNameArg: string, typeArg: string) {
removeRecord (domainNameArg: string, typeArg: interfaces.TRecord) {
let done = plugins.q.defer()
let domain = new plugins.smartstring.Domain(domainNameArg)
this.getRecord(domain.fullName, typeArg)

View File

@ -1,6 +1,6 @@
import * as plugins from './cflare.plugins'
export type TRecord = ''
export type TRecord = 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SRV' | 'LOC' | 'MX' | 'NS' | 'SPF'
export interface ICflareZone {
'id': string

View File

@ -1,2 +1,2 @@
import "typings-global";
import 'typings-global'
export {CflareAccount} from "./cflare.classes.cflareaccount";