@cocreate/acme 1.2.1 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.2.3](https://github.com/CoCreate-app/CoCreate-acme/compare/v1.2.2...v1.2.3) (2024-01-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update to logging ([8e3946d](https://github.com/CoCreate-app/CoCreate-acme/commit/8e3946d6dc8af2719c9d76484e2f35d5b3dbee7b))
7
+
8
+ ## [1.2.2](https://github.com/CoCreate-app/CoCreate-acme/compare/v1.2.1...v1.2.2) (2024-01-08)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * ssl syncing ([65b226a](https://github.com/CoCreate-app/CoCreate-acme/commit/65b226a16487f3b8b6862092f6b3e83d8f119f51))
14
+
1
15
  ## [1.2.1](https://github.com/CoCreate-app/CoCreate-acme/compare/v1.2.0...v1.2.1) (2024-01-08)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/acme",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "An intergration with ACME and CoCreateJS.",
5
5
  "keywords": [
6
6
  "acme",
package/src/index.js CHANGED
@@ -169,8 +169,6 @@ class CoCreateAcme {
169
169
  expires = expires.notAfter;
170
170
  this.setCertificate(host, expires, organization_id, hostKeyPath, cert, key)
171
171
 
172
- console.log(`saving host: ${host} at postion: ${hostPosition}`)
173
-
174
172
  this.crud.send({
175
173
  method: 'object.update',
176
174
  host,
@@ -243,8 +241,8 @@ class CoCreateAcme {
243
241
 
244
242
  const hostKeyPath = keyPath + host + '/';
245
243
  if (fs.existsSync(hostKeyPath + 'fullchain.pem')) {
246
- let expires = fs.readFileSync(hostKeyPath + 'fullchain.pem', 'utf8');
247
- expires = await forge.readCertificateInfo(expires);
244
+ let cert = fs.readFileSync(hostKeyPath + 'fullchain.pem', 'utf8');
245
+ let expires = await forge.readCertificateInfo(cert);
248
246
  expires = expires.notAfter;
249
247
  if (this.isValid(expires)) {
250
248
  this.setCertificate(host, expires, organization_id)