@cloud-cli/le 1.1.1 → 1.1.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.
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
export interface Certificate {
|
|
3
2
|
rootDomain: string;
|
|
4
3
|
certificate: string;
|
|
@@ -18,7 +17,7 @@ export declare class CertificateManager {
|
|
|
18
17
|
createCertificate({ domain, useWildcard, additionalOptions, update }: CreateCertificateOptions): true | Promise<string>;
|
|
19
18
|
removeCertificate({ domain }: CertificateOptions): boolean;
|
|
20
19
|
getCertificateList(): string[];
|
|
21
|
-
getCertificate({ domain }: CertificateOptions): Promise<
|
|
20
|
+
getCertificate({ domain }: CertificateOptions): Promise<string>;
|
|
22
21
|
getDomainsFromCert({ domain }: CertificateOptions): Promise<string[]>;
|
|
23
22
|
private isValidDomain;
|
|
24
23
|
}
|
|
@@ -44,7 +44,7 @@ export class CertificateManager {
|
|
|
44
44
|
getCertificate({ domain }) {
|
|
45
45
|
const pemFile = join(certificatesFolder, domain, 'cert.pem');
|
|
46
46
|
const out = sh('openssl', ['x509', '-in', pemFile, '-noout', '-text']);
|
|
47
|
-
return out.status !== 0 ? Promise.resolve(out.stdout) : Promise.reject(out.stderr);
|
|
47
|
+
return out.status !== 0 ? Promise.resolve(String(out.stdout)) : Promise.reject(String(out.stderr));
|
|
48
48
|
}
|
|
49
49
|
async getDomainsFromCert({ domain }) {
|
|
50
50
|
const cert = await this.getCertificate({ domain });
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { CertificateOptions, CreateCertificateOptions } from './certificate-manager.js';
|
|
3
2
|
declare const _default: {
|
|
4
3
|
add(certificate: CreateCertificateOptions): true | Promise<string>;
|
|
5
4
|
remove(options: CertificateOptions): boolean;
|
|
6
5
|
list(): string[];
|
|
7
6
|
exists(options: CertificateOptions): boolean;
|
|
8
|
-
show(options: CertificateOptions): Promise<
|
|
7
|
+
show(options: CertificateOptions): Promise<string>;
|
|
9
8
|
showDomains(options: CertificateOptions): Promise<string[]>;
|
|
10
9
|
};
|
|
11
10
|
export default _default;
|