@cocreate/acme 1.2.9 → 1.2.11

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.11](https://github.com/CoCreate-app/CoCreate-acme/compare/v1.2.10...v1.2.11) (2024-06-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * demo css ([1f4a35c](https://github.com/CoCreate-app/CoCreate-acme/commit/1f4a35cdf2e101803c8eafc3fefa149ad2719016))
7
+
8
+ ## [1.2.10](https://github.com/CoCreate-app/CoCreate-acme/compare/v1.2.9...v1.2.10) (2024-04-26)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * merge hostObject to retain previous configuration reltaed to database ([c9d7c16](https://github.com/CoCreate-app/CoCreate-acme/commit/c9d7c160dfd07f3f5a91c9e2cebab5da2d86ec1c))
14
+
1
15
  ## [1.2.9](https://github.com/CoCreate-app/CoCreate-acme/compare/v1.2.8...v1.2.9) (2024-04-10)
2
16
 
3
17
 
package/demo/index.html CHANGED
@@ -24,7 +24,7 @@
24
24
  filter-sort-direction="asc"
25
25
  render-selector="[template]">
26
26
  <div
27
- class="background:gainsboro:hover border-bottom:1px_solid_darkgray"
27
+ class="border-bottom:1px_solid_darkgray"
28
28
  template
29
29
  object="{{object._id}}"
30
30
  toggle="selected">
package/docs/index.html CHANGED
@@ -81,52 +81,40 @@
81
81
  class="margin-right:15px"
82
82
  share-network="twitter"
83
83
  title="Share on twitter"
84
- ><i
85
- class="height:20px fill:#505050"
86
- src="/assets/svg/twitter.svg"></i
84
+ ><i src="/assets/svg/twitter.svg"></i
87
85
  ></a>
88
86
  <a
89
87
  class="margin-right:15px"
90
88
  share-network="facebook"
91
89
  title="Share on Facebook"
92
- ><i
93
- class="height:20px fill:#505050"
94
- src="/assets/svg/facebook.svg"></i
90
+ ><i src="/assets/svg/facebook.svg"></i
95
91
  ></a>
96
92
  <a
97
93
  class="margin-right:15px"
98
94
  share-network="instagram"
99
95
  title="Share on instagram"
100
- ><i
101
- class="height:20px fill:#505050"
102
- src="/assets/svg/instagram.svg"></i
96
+ ><i src="/assets/svg/instagram.svg"></i
103
97
  ></a>
104
98
  </div>
105
99
  <a
106
100
  class="margin-right:15px"
107
101
  share-network="share"
108
102
  title="Share on share"
109
- ><i
110
- class="height:20px fill:#505050"
111
- src="/assets/svg/share-alt.svg"></i
103
+ ><i src="/assets/svg/share-alt.svg"></i
112
104
  ></a>
113
105
  </div>
114
106
  <a
115
107
  class="margin-right:15px"
116
108
  share-network="share"
117
109
  title="Share on share"
118
- ><i
119
- class="height:20px fill:#505050"
120
- src="/assets/svg/share-alt.svg"></i
110
+ ><i src="/assets/svg/share-alt.svg"></i
121
111
  ></a>
122
112
  </div>
123
113
  <a
124
114
  href="https://github.com/CoCreate-app/CoCreate-acme"
125
115
  target="_blank"
126
116
  class=""
127
- ><i
128
- class="height:20px fill:#505050"
129
- src="/assets/svg/github.svg"></i
117
+ ><i src="/assets/svg/github.svg"></i
130
118
  ></a>
131
119
  </div>
132
120
 
@@ -155,9 +143,7 @@
155
143
  <a
156
144
  class="margin-left:10px display:none"
157
145
  href="#acme-install"
158
- ><i
159
- class="height:20px fill:#505050"
160
- src="/assets/svg/link.svg"></i
146
+ ><i src="/assets/svg/link.svg"></i
161
147
  ></a>
162
148
  </span>
163
149
  </div>
@@ -182,9 +168,7 @@
182
168
  <a
183
169
  class="margin-left:10px display:none"
184
170
  href="#acme-usage"
185
- ><i
186
- class="height:20px fill:#505050"
187
- src="/assets/svg/link.svg"></i
171
+ ><i src="/assets/svg/link.svg"></i
188
172
  ></a>
189
173
  </span>
190
174
  </div>
@@ -218,9 +202,7 @@
218
202
  <a
219
203
  class="margin-left:10px display:none"
220
204
  href="#acme-attributes"
221
- ><i
222
- class="height:20px fill:#505050"
223
- src="/assets/svg/link.svg"></i
205
+ ><i src="/assets/svg/link.svg"></i
224
206
  ></a>
225
207
  </span>
226
208
  </div>
@@ -272,9 +254,7 @@
272
254
  <a
273
255
  class="margin-left:10px display:none"
274
256
  href="#acme-demo"
275
- ><i
276
- class="height:20px fill:#505050"
277
- src="/assets/svg/link.svg"></i
257
+ ><i src="/assets/svg/link.svg"></i
278
258
  ></a>
279
259
  </span>
280
260
  </div>
@@ -319,7 +299,7 @@
319
299
  toggle="code-height"
320
300
  toggle-selector="#demo-code"
321
301
  ><i
322
- class="height:18px fill:#505050"
302
+ class="height:18px"
323
303
  src="/assets/svg/eye.svg"></i
324
304
  ></a>
325
305
  <a
@@ -330,18 +310,14 @@
330
310
  hide="#eye-slash"
331
311
  toggle="code-height"
332
312
  toggle-selector="#demo-code"
333
- ><i
334
- class="height:20px fill:#505050"
335
- src="/assets/svg/eye-slash.svg"></i
313
+ ><i src="/assets/svg/eye-slash.svg"></i
336
314
  ></a>
337
315
  <a
338
316
  class="margin-right:10px"
339
317
  id="code"
340
318
  show="#code-slash"
341
319
  hide="#code, #demo-code"
342
- ><i
343
- class="height:20px fill:#505050"
344
- src="/assets/svg/code.svg"></i
320
+ ><i src="/assets/svg/code.svg"></i
345
321
  ></a>
346
322
  <a
347
323
  class="margin-right:10px"
@@ -350,7 +326,7 @@
350
326
  show="#code, #demo-code"
351
327
  hide="#code-slash"
352
328
  ><i
353
- class="display:flex height:18px fill:#505050"
329
+ class="height:18px"
354
330
  src="/assets/svg/code.svg"></i
355
331
  ></a>
356
332
  <a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/acme",
3
- "version": "1.2.9",
3
+ "version": "1.2.11",
4
4
  "description": "Dynamic SSL certificate management leveraging the ACME protocol, designed for direct API accessibility within applications. Automates certificate creation, renewal, and retrieval, ideal for distributed applications requiring real-time, secure certificate operations.",
5
5
  "keywords": [
6
6
  "acme",
package/src/index.js CHANGED
@@ -76,7 +76,7 @@ class CoCreateAcme {
76
76
  }
77
77
  }
78
78
 
79
- async requestCertificate(host, hostPosition, organization_id, wildcard = false) {
79
+ async requestCertificate(host, hostPosition, hostObject, organization_id, wildcard = false) {
80
80
  try {
81
81
 
82
82
  const self = this
@@ -175,7 +175,7 @@ class CoCreateAcme {
175
175
  array: 'organizations',
176
176
  object: {
177
177
  _id: organization_id,
178
- [`host[${hostPosition}]`]: { name: host, cert, key, expires },
178
+ [`host[${hostPosition}]`]: { ...hostObject, name: host, cert, key, expires },
179
179
  },
180
180
  organization_id
181
181
  });
@@ -192,7 +192,7 @@ class CoCreateAcme {
192
192
 
193
193
  async getCertificate(host, organization_id) {
194
194
  const hostKeyPath = keyPath + host + '/';
195
- let hostPosition
195
+ let hostPosition, hostObject
196
196
 
197
197
  let organization = await this.crud.getOrganization({ host, organization_id });
198
198
  if (organization.error)
@@ -204,6 +204,7 @@ class CoCreateAcme {
204
204
  for (let i = 0; i < organization.host.length; i++) {
205
205
  if (organization.host[i].name === host) {
206
206
  hostPosition = i
207
+ hostObject = organization.host[i]
207
208
  if (organization.host[i].cert && organization.host[i].key) {
208
209
  let expires = await forge.readCertificateInfo(organization.host[i].cert);
209
210
  expires = expires.notAfter;
@@ -220,7 +221,7 @@ class CoCreateAcme {
220
221
  return false
221
222
  }
222
223
 
223
- return await this.requestCertificate(host, hostPosition, organization_id, false)
224
+ return await this.requestCertificate(host, hostPosition, hostObject, organization_id, false)
224
225
  }
225
226
 
226
227
  async checkCertificate(host, organization_id, pathname = '') {