@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 +16 -26
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
# Let's Encrypt certificates
|
|
2
2
|
|
|
3
|
-
|
|
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.
|
|
13
|
-
|
|
14
|
-
le.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
**
|
|
34
|
+
**Remove a certificate**
|
|
51
35
|
|
|
52
36
|
```
|
|
53
|
-
|
|
37
|
+
cy cert.remove --domain example.com
|
|
54
38
|
```
|
|
55
39
|
|
|
56
40
|
**Check if a certificate exists**
|
|
57
41
|
|
|
58
42
|
```
|
|
59
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
4
|
+
add(certificate) {
|
|
5
5
|
return manager.createCertificate(certificate);
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
remove(options) {
|
|
8
8
|
return manager.removeCertificate(options);
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
list() {
|
|
11
11
|
return manager.getCertificateList();
|
|
12
12
|
},
|
|
13
|
-
|
|
13
|
+
exists(options) {
|
|
14
14
|
return manager.certificateExists(options);
|
|
15
15
|
},
|
|
16
16
|
};
|