fix(core): update
This commit is contained in:
parent
0d1ebf2d1a
commit
a0c0230419
@ -35,7 +35,7 @@
|
|||||||
"@pushrocks/smartstring": "^3.0.8",
|
"@pushrocks/smartstring": "^3.0.8",
|
||||||
"@pushrocks/smarttime": "^3.0.5",
|
"@pushrocks/smarttime": "^3.0.5",
|
||||||
"@pushrocks/smartunique": "^3.0.1",
|
"@pushrocks/smartunique": "^3.0.1",
|
||||||
"acme-client": "^2.2.2"
|
"acme-client": "2.2.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.4",
|
"@gitzone/tsbuild": "^2.1.4",
|
||||||
|
@ -35,7 +35,7 @@ export class CertManager {
|
|||||||
|
|
||||||
// Pending Map
|
// Pending Map
|
||||||
this.pendingMap = new plugins.lik.Stringmap();
|
this.pendingMap = new plugins.lik.Stringmap();
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* retrieves a certificate
|
* retrieves a certificate
|
||||||
|
@ -16,6 +16,7 @@ export interface ISmartAcmeOptions {
|
|||||||
setChallenge: (domainName: string, keyAuthorization: string) => Promise<any>;
|
setChallenge: (domainName: string, keyAuthorization: string) => Promise<any>;
|
||||||
removeChallenge: (domainName: string) => Promise<any>;
|
removeChallenge: (domainName: string) => Promise<any>;
|
||||||
validateRemoteRequest: () => Promise<boolean>;
|
validateRemoteRequest: () => Promise<boolean>;
|
||||||
|
environment: 'production' | 'integration';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -107,7 +108,13 @@ export class SmartAcme {
|
|||||||
|
|
||||||
// ACME Client
|
// ACME Client
|
||||||
this.client = new plugins.acme.Client({
|
this.client = new plugins.acme.Client({
|
||||||
directoryUrl: plugins.acme.directory.letsencrypt.staging,
|
directoryUrl: (() => {
|
||||||
|
if(this.options.environment === 'production') {
|
||||||
|
return plugins.acme.directory.letsencrypt.production;
|
||||||
|
} else {
|
||||||
|
return plugins.acme.directory.letsencrypt.staging;
|
||||||
|
}
|
||||||
|
})(),
|
||||||
accountKey: this.privateKey
|
accountKey: this.privateKey
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user