more structure
This commit is contained in:
		@@ -9,8 +9,11 @@ import {Cert} from "cert";
 | 
				
			|||||||
let myCert = new Cert({
 | 
					let myCert = new Cert({
 | 
				
			||||||
    cfEmail = "some@cloudflare.email",
 | 
					    cfEmail = "some@cloudflare.email",
 | 
				
			||||||
    cfKey = "someCloudflareApiKey",
 | 
					    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");
 | 
					myCert.getDomainCert("example.com");
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### sslDir
 | 
				
			||||||
 | 
					to use the certificates it is important to understand what the structure of the ssl directory looks like.
 | 
				
			||||||
@@ -27,7 +27,9 @@
 | 
				
			|||||||
    "cflare": "0.0.2",
 | 
					    "cflare": "0.0.2",
 | 
				
			||||||
    "letsencrypt": "^1.4.4",
 | 
					    "letsencrypt": "^1.4.4",
 | 
				
			||||||
    "smartcli": "^1.0.2",
 | 
					    "smartcli": "^1.0.2",
 | 
				
			||||||
    "smartfile": "^3.0.10"
 | 
					    "smartfile": "^3.0.10",
 | 
				
			||||||
 | 
					    "smartgit": "0.0.10",
 | 
				
			||||||
 | 
					    "typings-global": "^1.0.3"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
    "npmts-g": "^5.2.6"
 | 
					    "npmts-g": "^5.2.6"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					import "typings-global";
 | 
				
			||||||
 | 
					export import path = require("path");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										0
									
								
								ts/cert.plugins.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								ts/cert.plugins.ts
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										28
									
								
								ts/index.ts
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								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(){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user