@cloud-cli/le 1.0.1 → 1.0.2

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/README.md CHANGED
@@ -1,19 +1,15 @@
1
- ## LE
1
+ # Let's Encrypt certificates
2
2
 
3
- Lets Encrypt API
4
-
5
- #### Usage
3
+ ## Usage
6
4
 
7
5
  As a module:
8
6
 
9
7
  ```ts
10
8
  import le from '@cloud-cli/le';
11
9
 
12
- le.start({ port: 4567 });
13
-
14
- le.certificateExists({ domain: 'example.com' });
15
- le.createCertificate({ domain: 'example.com', useWildcard: true });
16
- le.removeCertificate({ domain: 'example.com' };
10
+ le.exists({ domain: 'example.com' });
11
+ le.add({ domain: 'example.com', useWildcard: true });
12
+ le.remove({ domain: 'example.com' };
17
13
 
18
14
  ```
19
15
 
@@ -26,35 +22,29 @@ import { cli } from '@cloud-cli/cy';
26
22
  cli.add('le', le);
27
23
  ```
28
24
 
29
- **start() options**
30
-
31
- | Property | Type | Default |
32
- | -------- | ------ | ----------- |
33
- | `host` | String | '127.0.0.1' |
34
- | `port` | Number | |
35
-
36
- #### HTTP API
25
+ ## API
37
26
 
38
27
  **Create a certificate**
39
28
 
40
29
  ```
41
- POST /certificates
42
-
43
- {
44
- "domain": "example.com",
45
- "useWildcard": true,
46
- }
30
+ cy cert.add --domain example.com --useWildcard
47
31
 
48
32
  ```
49
33
 
50
- **Delete a certificate**
34
+ **Remove a certificate**
51
35
 
52
36
  ```
53
- DELETE /certificates/example.com
37
+ cy cert.remove --domain example.com
54
38
  ```
55
39
 
56
40
  **Check if a certificate exists**
57
41
 
58
42
  ```
59
- HEAD /certificates/example.com
43
+ cy cert.exists --domain example.com
60
44
  ```
45
+ **List certificates**
46
+
47
+ ```
48
+ cy cert.list
49
+ ```
50
+
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { CertificateOptions, CreateCertificateOptions } from './certificate-manager.js';
2
2
  declare const _default: {
3
- createCertificate(certificate: CreateCertificateOptions): "OK" | Promise<string>;
4
- removeCertificate(options: CertificateOptions): void;
5
- listCertificates(): string[];
6
- certificateExists(options: CertificateOptions): boolean;
3
+ add(certificate: CreateCertificateOptions): "OK" | Promise<string>;
4
+ remove(options: CertificateOptions): void;
5
+ list(): string[];
6
+ exists(options: CertificateOptions): boolean;
7
7
  };
8
8
  export default _default;
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { CertificateManager } from './certificate-manager.js';
2
2
  const manager = new CertificateManager();
3
3
  export default {
4
- createCertificate(certificate) {
4
+ add(certificate) {
5
5
  return manager.createCertificate(certificate);
6
6
  },
7
- removeCertificate(options) {
7
+ remove(options) {
8
8
  return manager.removeCertificate(options);
9
9
  },
10
- listCertificates() {
10
+ list() {
11
11
  return manager.getCertificateList();
12
12
  },
13
- certificateExists(options) {
13
+ exists(options) {
14
14
  return manager.certificateExists(options);
15
15
  },
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud-cli/le",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Reverse Proxy API/module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",