From bbee7923e4e3afe7b743fbd0a8937c03792b97c4 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sat, 18 Jun 2016 15:59:03 +0200 Subject: [PATCH] more structure --- README.md | 7 +++++-- package.json | 4 +++- ts/cert.paths.ts | 3 +++ ts/cert.plugins.ts | 0 ts/index.ts | 28 ++++++++++++++++++++++++++++ 5 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 ts/cert.plugins.ts diff --git a/README.md b/README.md index 92de391..5e92846 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,11 @@ import {Cert} from "cert"; let myCert = new Cert({ cfEmail = "some@cloudflare.email", cfKey = "someCloudflareApiKey", - outputPath = "someOutputPath" // NOTE: if you already have certificates, make sure you put them in here, so cert only requires the missing ones + sslDir = "someOutputPath" // NOTE: if you already have certificates, make sure you put them in here, so cert only requires the missing ones }); myCert.getDomainCert("example.com"); -``` \ No newline at end of file +``` + +### sslDir +to use the certificates it is important to understand what the structure of the ssl directory looks like. \ No newline at end of file diff --git a/package.json b/package.json index 06e3a78..7206d94 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,9 @@ "cflare": "0.0.2", "letsencrypt": "^1.4.4", "smartcli": "^1.0.2", - "smartfile": "^3.0.10" + "smartfile": "^3.0.10", + "smartgit": "0.0.10", + "typings-global": "^1.0.3" }, "devDependencies": { "npmts-g": "^5.2.6" diff --git a/ts/cert.paths.ts b/ts/cert.paths.ts index e69de29..68d0fa0 100644 --- a/ts/cert.paths.ts +++ b/ts/cert.paths.ts @@ -0,0 +1,3 @@ +import "typings-global"; +export import path = require("path"); + diff --git a/ts/cert.plugins.ts b/ts/cert.plugins.ts new file mode 100644 index 0000000..e69de29 diff --git a/ts/index.ts b/ts/index.ts index e69de29..315d54f 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -0,0 +1,28 @@ +import * as paths from "./cert.paths"; + +export class Cert { + cfEmail:string; + cfKey:string; + sslDir:string; + certificatesPresent; + certificatesValid; + gitOriginRepo; + constructor(optionsArg:{ + cfEmail:string, + cfKey:string, + sslDir:string, + gitOriginRepo:string + }){ + this.cfEmail = optionsArg.cfEmail; + this.cfKey = optionsArg.cfKey; + this.sslDir = optionsArg.sslDir; + this.gitOriginRepo = optionsArg.gitOriginRepo; + }; + getDomainCert(){}; +} + +export class Certificate { + constructor(){ + + }; +} \ No newline at end of file