6 Commits

Author SHA1 Message Date
a7525184ef 0.0.15 2016-07-12 18:00:15 +02:00
ae9865749a use interface for Cert constructor 2016-07-12 18:00:08 +02:00
b2482b3cfd 0.0.14 2016-07-12 16:36:34 +02:00
41988da3ed fix types 2016-07-12 16:36:29 +02:00
55d450be69 0.0.13 2016-07-06 03:23:54 +02:00
ae2ade8680 updated test 2016-07-06 03:23:51 +02:00
7 changed files with 25 additions and 21 deletions

0
dist/cert.hook.js vendored Executable file → Normal file
View File

15
dist/index.d.ts vendored
View File

@ -1,5 +1,12 @@
/// <reference types="q" /> /// <reference types="q" />
import * as plugins from "./cert.plugins"; import * as plugins from "./cert.plugins";
export interface CertConstructorOptions {
cfEmail: string;
cfKey: string;
sslDir: string;
gitOriginRepo?: string;
testMode?: boolean;
}
export declare class Cert { export declare class Cert {
private _cfEmail; private _cfEmail;
private _cfKey; private _cfKey;
@ -8,13 +15,7 @@ export declare class Cert {
private _testMode; private _testMode;
certificatesPresent: Certificate[]; certificatesPresent: Certificate[];
certificatesValid: Certificate[]; certificatesValid: Certificate[];
constructor(optionsArg: { constructor(optionsArg: CertConstructorOptions);
cfEmail: string;
cfKey: string;
sslDir: string;
gitOriginRepo?: string;
testMode?: boolean;
});
sslGitOriginPull: () => void; sslGitOriginPull: () => void;
sslGitOriginAddCommitPush: () => void; sslGitOriginAddCommitPush: () => void;
getDomainCert(domainNameArg: string, optionsArg?: { getDomainCert(domainNameArg: string, optionsArg?: {

3
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "cert", "name": "cert",
"version": "0.0.12", "version": "0.0.15",
"description": "Easily obain SSL certificates from LetsEncrypt. Supports DNS-01 challenge. TypeScript ready.", "description": "Easily obain SSL certificates from LetsEncrypt. Supports DNS-01 challenge. TypeScript ready.",
"main": "dist/index.js", "main": "dist/index.js",
"typings": "dist/index.d.ts", "typings": "dist/index.d.ts",
@ -27,9 +27,9 @@
}, },
"homepage": "https://gitlab.com/pushrocks/cert#readme", "homepage": "https://gitlab.com/pushrocks/cert#readme",
"dependencies": { "dependencies": {
"@types/minimatch": "^2.0.26-alpha", "@types/minimatch": "*",
"@types/q": "0.0.25-alpha", "@types/q": "*",
"@types/shelljs": "^0.3.25-alpha", "@types/shelljs": "*",
"beautylog": "^5.0.13", "beautylog": "^5.0.13",
"cflare": "0.0.9", "cflare": "0.0.9",
"fs-extra": "^0.30.0", "fs-extra": "^0.30.0",

View File

@ -30,7 +30,7 @@ describe("cert", function () {
}); });
it("should get a valid certificate", function (done) { it("should get a valid certificate", function (done) {
this.timeout(120000); this.timeout(120000);
testCert.getDomainCert("hello1.bleu.de").then(function () { testCert.getDomainCert("hello2.bleu.de").then(function () {
done(); done();
}); });
}); });

View File

@ -34,7 +34,7 @@ describe("cert",function(){
}) })
it("should get a valid certificate",function(done){ it("should get a valid certificate",function(done){
this.timeout(120000); this.timeout(120000);
testCert.getDomainCert("hello1.bleu.de").then(() => { testCert.getDomainCert("hello2.bleu.de").then(() => {
done(); done();
}); });
}) })

View File

@ -1,6 +1,14 @@
import * as plugins from "./cert.plugins"; import * as plugins from "./cert.plugins";
import * as paths from "./cert.paths"; import * as paths from "./cert.paths";
export interface CertConstructorOptions {
cfEmail: string,
cfKey: string,
sslDir: string,
gitOriginRepo?: string,
testMode?: boolean
};
export class Cert { export class Cert {
private _cfEmail: string; private _cfEmail: string;
private _cfKey: string; private _cfKey: string;
@ -9,13 +17,7 @@ export class Cert {
private _testMode: boolean private _testMode: boolean
certificatesPresent: Certificate[]; certificatesPresent: Certificate[];
certificatesValid: Certificate[]; certificatesValid: Certificate[];
constructor(optionsArg: { constructor(optionsArg:CertConstructorOptions) {
cfEmail: string,
cfKey: string,
sslDir: string,
gitOriginRepo?: string,
testMode?: boolean
}) {
this._cfEmail = optionsArg.cfEmail; this._cfEmail = optionsArg.cfEmail;
this._cfKey = optionsArg.cfKey; this._cfKey = optionsArg.cfKey;
this._sslDir = optionsArg.sslDir; this._sslDir = optionsArg.sslDir;