install step now working
This commit is contained in:
parent
5e10df8e5a
commit
1cdcd332d4
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
node_modules
|
||||
docs/
|
||||
coverage/
|
||||
coverage/
|
||||
.nogit/
|
1054
dist/assets/le.sh
vendored
Normal file
1054
dist/assets/le.sh
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5
dist/index.d.ts
vendored
5
dist/index.d.ts
vendored
@ -9,10 +9,13 @@ export declare class Cert {
|
||||
cfEmail: string;
|
||||
cfKey: string;
|
||||
sslDir: string;
|
||||
gitOriginRepo: string;
|
||||
gitOriginRepo?: string;
|
||||
});
|
||||
getDomainCert(): void;
|
||||
}
|
||||
export declare class Certificate {
|
||||
domainName: string;
|
||||
creationDate: Date;
|
||||
expiryDate: Date;
|
||||
constructor();
|
||||
}
|
||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -20,4 +20,4 @@ var Certificate = (function () {
|
||||
}());
|
||||
exports.Certificate = Certificate;
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFFQTtJQU9JLGNBQVksVUFLWDtRQUNHLElBQUksQ0FBQyxPQUFPLEdBQUcsVUFBVSxDQUFDLE9BQU8sQ0FBQztRQUNsQyxJQUFJLENBQUMsS0FBSyxHQUFHLFVBQVUsQ0FBQyxLQUFLLENBQUM7UUFDOUIsSUFBSSxDQUFDLE1BQU0sR0FBRyxVQUFVLENBQUMsTUFBTSxDQUFDO1FBQ2hDLElBQUksQ0FBQyxhQUFhLEdBQUcsVUFBVSxDQUFDLGFBQWEsQ0FBQztJQUNsRCxDQUFDOztJQUNELDRCQUFhLEdBQWIsY0FBZ0IsQ0FBQzs7SUFDckIsV0FBQztBQUFELENBbkJBLEFBbUJDLElBQUE7QUFuQlksWUFBSSxPQW1CaEIsQ0FBQTtBQUVE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B0aGlzLmNmS2V5ID0gb3B0aW9uc0FyZy5jZktleTtcbiAgICAgICAgdGhpcy5zc2xEaXIgPSBvcHRpb25zQXJnLnNzbERpcjtcbiAgICAgICAgdGhpcy5naXRPcmlnaW5SZXBvID0gb3B0aW9uc0FyZy5naXRPcmlnaW5SZXBvO1xuICAgIH07XG4gICAgZ2V0RG9tYWluQ2VydCgpe307XG59XG5cbmV4cG9ydCBjbGFzcyBDZXJ0aWZpY2F0ZSB7XG4gICAgZG9tYWluTmFtZTpzdHJpbmc7XG4gICAgY3JlYXRpb25EYXRlOkRhdGU7XG4gICAgZXhwaXJ5RGF0ZTpEYXRlO1xuICAgIGNvbnN0cnVjdG9yKCl7XG5cbiAgICB9O1xufSJdfQ==
|
||||
|
4
dist/install.js
vendored
4
dist/install.js
vendored
@ -2,9 +2,11 @@
|
||||
var beautylog = require("beautylog");
|
||||
var path = require("path");
|
||||
var smartfile = require("smartfile");
|
||||
var fs = require("fs-extra");
|
||||
beautylog.info("installing letsencrypt.sh locally...");
|
||||
fs.ensureDir(path.join(__dirname, "assets/"));
|
||||
smartfile.remote.toFs("https://raw.githubusercontent.com/lukas2511/letsencrypt.sh/master/letsencrypt.sh", path.join(__dirname, "assets/", "le.sh")).then(function () {
|
||||
beautylog.success("Done!");
|
||||
});
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluc3RhbGwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLElBQVksU0FBUyxXQUFNLFdBQVcsQ0FBQyxDQUFBO0FBQ3ZDLElBQVksSUFBSSxXQUFNLE1BQU0sQ0FBQyxDQUFBO0FBQzdCLElBQVksU0FBUyxXQUFNLFdBQVcsQ0FBQyxDQUFBO0FBQ3ZDLFNBQVMsQ0FBQyxJQUFJLENBQUMsc0NBQXNDLENBQUMsQ0FBQztBQUN2RCxTQUFTLENBQUMsTUFBTSxDQUFDLElBQUksQ0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S5zaFwiKVxuKS50aGVuKCgpID0+IHtcbiAgICBiZWF1dHlsb2cuc3VjY2VzcyhcIkRvbmUhXCIpO1xufSk7Il19
|
||||
|
10
package.json
10
package.json
@ -4,7 +4,8 @@
|
||||
"description": "Easily obain SSL certificates from LetsEncrypt. Supports DNS-01 challenge. TypeScript ready.",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"test": "(npmts)"
|
||||
"test": "(npmts)",
|
||||
"install": "node dist/install.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -24,7 +25,8 @@
|
||||
"homepage": "https://gitlab.com/pushrocks/cert#readme",
|
||||
"dependencies": {
|
||||
"beautylog": "^5.0.12",
|
||||
"cflare": "0.0.2",
|
||||
"cflare": "0.0.6",
|
||||
"fs-extra": "^0.30.0",
|
||||
"letsencrypt": "^1.4.4",
|
||||
"smartcli": "^1.0.2",
|
||||
"smartfile": "^3.0.10",
|
||||
@ -32,6 +34,8 @@
|
||||
"typings-global": "^1.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"npmts-g": "^5.2.6"
|
||||
"npmts-g": "^5.2.6",
|
||||
"qenv": "^1.0.8",
|
||||
"typings-test": "^1.0.1"
|
||||
}
|
||||
}
|
||||
|
6
test/test.ts
Normal file
6
test/test.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import "typings-test";
|
||||
import "should";
|
||||
import * as cert from "../dist/index";
|
||||
import {Qenv} from "qenv";
|
||||
|
||||
let testQenv = new Qenv(process.cwd(), process.cwd() + "/.nogit");
|
@ -11,7 +11,7 @@ export class Cert {
|
||||
cfEmail:string,
|
||||
cfKey:string,
|
||||
sslDir:string,
|
||||
gitOriginRepo:string
|
||||
gitOriginRepo?:string
|
||||
}){
|
||||
this.cfEmail = optionsArg.cfEmail;
|
||||
this.cfKey = optionsArg.cfKey;
|
||||
@ -22,6 +22,9 @@ export class Cert {
|
||||
}
|
||||
|
||||
export class Certificate {
|
||||
domainName:string;
|
||||
creationDate:Date;
|
||||
expiryDate:Date;
|
||||
constructor(){
|
||||
|
||||
};
|
||||
|
@ -1,7 +1,10 @@
|
||||
import * as beautylog from "beautylog";
|
||||
import * as path from "path";
|
||||
import * as smartfile from "smartfile";
|
||||
let fs = require("fs-extra");
|
||||
beautylog.info("installing letsencrypt.sh locally...");
|
||||
|
||||
fs.ensureDir(path.join(__dirname,"assets/"));
|
||||
smartfile.remote.toFs(
|
||||
"https://raw.githubusercontent.com/lukas2511/letsencrypt.sh/master/letsencrypt.sh",
|
||||
path.join(__dirname,"assets/","le.sh")
|
||||
|
Loading…
Reference in New Issue
Block a user