update sslDir handling
This commit is contained in:
parent
a7525184ef
commit
d06a2cee2f
1
dist/cert.paths.d.ts
vendored
1
dist/cert.paths.d.ts
vendored
@ -3,4 +3,5 @@ export declare let config: string;
|
|||||||
export declare let leShConfig: string;
|
export declare let leShConfig: string;
|
||||||
export declare let letsencryptSh: string;
|
export declare let letsencryptSh: string;
|
||||||
export declare let certDir: string;
|
export declare let certDir: string;
|
||||||
|
export declare let defaultSslDir: string;
|
||||||
export declare let assetDir: string;
|
export declare let assetDir: string;
|
||||||
|
7
dist/cert.paths.js
vendored
7
dist/cert.paths.js
vendored
@ -6,6 +6,7 @@ exports.config = plugins.path.join(__dirname, "assets/config.json");
|
|||||||
exports.leShConfig = plugins.path.join(__dirname, "assets/leshconfig.json");
|
exports.leShConfig = plugins.path.join(__dirname, "assets/leshconfig.json");
|
||||||
exports.letsencryptSh = plugins.path.join(__dirname, "assets/letsencrypt.sh");
|
exports.letsencryptSh = plugins.path.join(__dirname, "assets/letsencrypt.sh");
|
||||||
//dirs
|
//dirs
|
||||||
exports.certDir = plugins.path.join(__dirname, "/assets/certs");
|
exports.certDir = plugins.path.join(__dirname, "assets/certs");
|
||||||
exports.assetDir = plugins.path.join(__dirname, "/assets/");
|
exports.defaultSslDir = plugins.path.join(__dirname, "assets/defaultSslDir");
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VydC5wYXRocy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2NlcnQucGF0aHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLElBQVksT0FBTyxXQUFNLGdCQUFnQixDQUFDLENBQUE7QUFFMUMsUUFBUTtBQUNHLGdCQUFRLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFDLGNBQWMsQ0FBQyxDQUFDO0FBQ3ZELGNBQU0sR0FBRyxPQUFPLENBQUMsSUF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T0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFDLHVCQUF1QixDQUFDLENBQUM7QUFFaEYsTUFBTTtBQUNLLGVBQU8sR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxTQUFTLEVBQUMsY0FBYyxDQUFDLENBQUM7QUFDdEQscUJBQWEsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxTQUFTLEVBQUMsc0JBQXNCLENBQUMsQ0FBQztBQUNwRSxnQkFBUSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLFNBQVMsRUFBQyxTQUFTLENBQUMsQ0FBQyJ9
|
6
dist/index.d.ts
vendored
6
dist/index.d.ts
vendored
@ -1,9 +1,9 @@
|
|||||||
/// <reference types="q" />
|
/// <reference types="q" />
|
||||||
import * as plugins from "./cert.plugins";
|
import * as plugins from "./cert.plugins";
|
||||||
export interface CertConstructorOptions {
|
export interface ICertConstructorOptions {
|
||||||
cfEmail: string;
|
cfEmail: string;
|
||||||
cfKey: string;
|
cfKey: string;
|
||||||
sslDir: string;
|
sslDir?: string;
|
||||||
gitOriginRepo?: string;
|
gitOriginRepo?: string;
|
||||||
testMode?: boolean;
|
testMode?: boolean;
|
||||||
}
|
}
|
||||||
@ -15,7 +15,7 @@ export declare class Cert {
|
|||||||
private _testMode;
|
private _testMode;
|
||||||
certificatesPresent: Certificate[];
|
certificatesPresent: Certificate[];
|
||||||
certificatesValid: Certificate[];
|
certificatesValid: Certificate[];
|
||||||
constructor(optionsArg: CertConstructorOptions);
|
constructor(optionsArg: ICertConstructorOptions);
|
||||||
sslGitOriginPull: () => void;
|
sslGitOriginPull: () => void;
|
||||||
sslGitOriginAddCommitPush: () => void;
|
sslGitOriginAddCommitPush: () => void;
|
||||||
getDomainCert(domainNameArg: string, optionsArg?: {
|
getDomainCert(domainNameArg: string, optionsArg?: {
|
||||||
|
5
dist/index.js
vendored
5
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@ -7,5 +7,6 @@ export let leShConfig = plugins.path.join(__dirname,"assets/leshconfig.json");
|
|||||||
export let letsencryptSh = plugins.path.join(__dirname,"assets/letsencrypt.sh");
|
export let letsencryptSh = plugins.path.join(__dirname,"assets/letsencrypt.sh");
|
||||||
|
|
||||||
//dirs
|
//dirs
|
||||||
export let certDir = plugins.path.join(__dirname,"/assets/certs");
|
export let certDir = plugins.path.join(__dirname,"assets/certs");
|
||||||
export let assetDir = plugins.path.join(__dirname,"/assets/");
|
export let defaultSslDir = plugins.path.join(__dirname,"assets/defaultSslDir");
|
||||||
|
export let assetDir = plugins.path.join(__dirname,"assets/");
|
@ -1,10 +1,10 @@
|
|||||||
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 {
|
export interface ICertConstructorOptions {
|
||||||
cfEmail: string,
|
cfEmail: string,
|
||||||
cfKey: string,
|
cfKey: string,
|
||||||
sslDir: string,
|
sslDir?: string,
|
||||||
gitOriginRepo?: string,
|
gitOriginRepo?: string,
|
||||||
testMode?: boolean
|
testMode?: boolean
|
||||||
};
|
};
|
||||||
@ -17,7 +17,7 @@ export class Cert {
|
|||||||
private _testMode: boolean
|
private _testMode: boolean
|
||||||
certificatesPresent: Certificate[];
|
certificatesPresent: Certificate[];
|
||||||
certificatesValid: Certificate[];
|
certificatesValid: Certificate[];
|
||||||
constructor(optionsArg:CertConstructorOptions) {
|
constructor(optionsArg:ICertConstructorOptions) {
|
||||||
this._cfEmail = optionsArg.cfEmail;
|
this._cfEmail = optionsArg.cfEmail;
|
||||||
this._cfKey = optionsArg.cfKey;
|
this._cfKey = optionsArg.cfKey;
|
||||||
this._sslDir = optionsArg.sslDir;
|
this._sslDir = optionsArg.sslDir;
|
||||||
@ -32,6 +32,8 @@ export class Cert {
|
|||||||
JSON.stringify(config),
|
JSON.stringify(config),
|
||||||
plugins.path.join(__dirname, "assets/config.json")
|
plugins.path.join(__dirname, "assets/config.json")
|
||||||
);
|
);
|
||||||
|
// setup sslDir
|
||||||
|
if (!this._sslDir) this._sslDir = paths.defaultSslDir;
|
||||||
// setup Git
|
// setup Git
|
||||||
if (this._gitOriginRepo) {
|
if (this._gitOriginRepo) {
|
||||||
plugins.smartgit.init(this._sslDir);
|
plugins.smartgit.init(this._sslDir);
|
||||||
|
Loading…
Reference in New Issue
Block a user