File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @interactivetraining/acme-client" ,
3
- "version" : " 0.0.4 " ,
3
+ "version" : " 0.0.5 " ,
4
4
"description" : " Simple scalable automatic solution for obtaining SSL certificates." ,
5
5
"keywords" : [
6
6
" acme client" ,
12
12
"main" : " dist/index.js" ,
13
13
"types" : " dist/index.d.ts" ,
14
14
"scripts" : {
15
- "build" : " tsc"
15
+ "build" : " tsc" ,
16
+ "npmjs.publish" : " npm publish --@interactivetraining:registry=https://registry.npmjs.org/ --access public"
16
17
},
17
18
"author" : " Interactive Training (http://interactive.training)" ,
18
19
"license" : " MIT" ,
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ export class AcmeClient {
23
23
getCert ( ) : Promise < { key : string , cert : string } > {
24
24
return new Promise ( async ( resolve1 ) => {
25
25
const currentCert = await this . gCloudStorage . read ( 'cert' ) ;
26
- if ( ! currentCert || ! ( currentCert && ( new Date ( ) . getTime ( ) - ( letiny . getExpirationDate ( currentCert ) as Date ) . getTime ( ) ) / ( 1000 * 60 * 60 * 24.0 ) ) ) {
26
+
27
+ if ( ! currentCert || ( currentCert && ( new Date ( ) . getTime ( ) + ( 60 * 60 * 24 * 28 ) ) >= ( letiny . getExpirationDate ( currentCert ) as Date ) . getTime ( ) ) ) {
27
28
letiny . getCert ( {
28
29
method : 'dns-01' ,
29
30
email : this . config . email ,
You can’t perform that action at this time.
0 commit comments