mock-tls-server 0.0.2 → 1.0.1

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/types/ca.d.ts CHANGED
@@ -22,41 +22,42 @@ export class CertificateAuthority {
22
22
  /**
23
23
  * Creates an instance of CertificateAuthority.
24
24
  *
25
- * @param {CertOpts} [opts={}] CA cert options.
25
+ * @param {CertOpts} [options={}] CA cert options.
26
26
  */
27
- constructor(opts?: CertOpts);
27
+ constructor(options?: CertOpts | undefined);
28
28
  subject: string;
29
29
  /** @type {string} */
30
30
  cert_pem: string;
31
31
  /**
32
32
  * Creates and signs a server certificate.
33
33
  *
34
- * @param {CertOpts} [opts={}] Server cert options.
34
+ * @param {CertOpts} [options={}] Server cert options.
35
35
  * @returns {ServerProperties} Information about the created certificate.
36
36
  * @throws {Error} No subject or names.
37
37
  */
38
- issue(opts?: CertOpts): ServerProperties;
38
+ issue(options?: CertOpts | undefined): ServerProperties;
39
+ #private;
39
40
  }
40
41
  export type CertOpts = {
41
42
  /**
42
43
  * Certificate not valid after this
43
44
  * date.
44
45
  */
45
- notafter?: Date;
46
+ notafter?: Date | undefined;
46
47
  /**
47
48
  * Certificate not valid before this
48
49
  * date.
49
50
  */
50
- notbefore?: Date;
51
+ notbefore?: Date | undefined;
51
52
  /**
52
53
  * Subject Distinguished Name (DN).
53
54
  */
54
- subject?: string;
55
+ subject?: string | undefined;
55
56
  /**
56
57
  * DNS Subject Alternative Names
57
58
  * for the cert. Ignored for the CA cert.
58
59
  */
59
- names?: string[];
60
+ names?: string[] | undefined;
60
61
  };
61
62
  export type ServerProperties = {
62
63
  /**