add type TRecord, update ci
This commit is contained in:
parent
3503fbc7b3
commit
2f065b57fc
@ -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:
|
||||
|
6
dist/cflare.classes.cflareaccount.d.ts
vendored
6
dist/cflare.classes.cflareaccount.d.ts
vendored
@ -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
|
||||
|
2
dist/cflare.classes.cflareaccount.js
vendored
2
dist/cflare.classes.cflareaccount.js
vendored
File diff suppressed because one or more lines are too long
2
dist/cflare.interfaces.d.ts
vendored
2
dist/cflare.interfaces.d.ts
vendored
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -1,2 +1,2 @@
|
||||
import "typings-global";
|
||||
import 'typings-global'
|
||||
export {CflareAccount} from "./cflare.classes.cflareaccount";
|
Loading…
Reference in New Issue
Block a user