@rushstack/debug-certificate-manager
Advanced tools
Comparing version 1.3.66 to 1.4.0
# Change Log - @rushstack/debug-certificate-manager | ||
This log was last generated on Fri, 13 Sep 2024 00:11:42 GMT and should not be manually modified. | ||
This log was last generated on Sat, 21 Sep 2024 00:10:27 GMT and should not be manually modified. | ||
## 1.4.0 | ||
Sat, 21 Sep 2024 00:10:27 GMT | ||
### Minor changes | ||
- Add a `skipCertificateTrust` option to `CertificateManager.ensureCertificateAsync` that skips automatically trusting the generated certificate and untrusting an existing certificate with issues. | ||
## 1.3.66 | ||
@@ -6,0 +13,0 @@ Fri, 13 Sep 2024 00:11:42 GMT |
@@ -33,3 +33,3 @@ /** | ||
*/ | ||
ensureCertificateAsync(canGenerateNewCertificate: boolean, terminal: ITerminal, generationOptions?: ICertificateGenerationOptions): Promise<ICertificate>; | ||
ensureCertificateAsync(canGenerateNewCertificate: boolean, terminal: ITerminal, options?: ICertificateGenerationOptions): Promise<ICertificate>; | ||
/** | ||
@@ -134,4 +134,8 @@ * Attempt to locate a previously generated debug certificate and untrust it. | ||
validityInDays?: number; | ||
/** | ||
* Skip trusting a certificate. Defaults to false. | ||
*/ | ||
skipCertificateTrust?: boolean; | ||
} | ||
export { } |
@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard. | ||
"packageName": "@microsoft/api-extractor", | ||
"packageVersion": "7.47.8" | ||
"packageVersion": "7.47.9" | ||
} | ||
] | ||
} |
@@ -52,2 +52,6 @@ import type { ITerminal } from '@rushstack/terminal'; | ||
validityInDays?: number; | ||
/** | ||
* Skip trusting a certificate. Defaults to false. | ||
*/ | ||
skipCertificateTrust?: boolean; | ||
} | ||
@@ -68,3 +72,3 @@ /** | ||
*/ | ||
ensureCertificateAsync(canGenerateNewCertificate: boolean, terminal: ITerminal, generationOptions?: ICertificateGenerationOptions): Promise<ICertificate>; | ||
ensureCertificateAsync(canGenerateNewCertificate: boolean, terminal: ITerminal, options?: ICertificateGenerationOptions): Promise<ICertificate>; | ||
/** | ||
@@ -71,0 +75,0 @@ * Attempt to locate a previously generated debug certificate and untrust it. |
@@ -68,4 +68,4 @@ "use strict"; | ||
*/ | ||
async ensureCertificateAsync(canGenerateNewCertificate, terminal, generationOptions) { | ||
const optionsWithDefaults = applyDefaultOptions(generationOptions); | ||
async ensureCertificateAsync(canGenerateNewCertificate, terminal, options) { | ||
const optionsWithDefaults = applyDefaultOptions(options); | ||
const { certificateData: existingCert, keyData: existingKey } = this._certificateStore; | ||
@@ -127,3 +127,5 @@ if (process.env[DISABLE_CERT_GENERATION_VARIABLE_NAME] === '1') { | ||
terminal.writeWarningLine(messages.join(' ')); | ||
await this.untrustCertificateAsync(terminal); | ||
if (!(options === null || options === void 0 ? void 0 : options.skipCertificateTrust)) { | ||
await this.untrustCertificateAsync(terminal); | ||
} | ||
return await this._ensureCertificateInternalAsync(optionsWithDefaults, terminal); | ||
@@ -534,3 +536,5 @@ } | ||
} | ||
const trustCertificateResult = await this._tryTrustCertificateAsync(tempCertificatePath, terminal); | ||
const trustCertificateResult = options.skipCertificateTrust | ||
? true | ||
: await this._tryTrustCertificateAsync(tempCertificatePath, terminal); | ||
let subjectAltNames; | ||
@@ -581,2 +585,3 @@ if (trustCertificateResult) { | ||
const subjectIpAddresses = options === null || options === void 0 ? void 0 : options.subjectIPAddresses; | ||
const skipCertificateTrust = (options === null || options === void 0 ? void 0 : options.skipCertificateTrust) || false; | ||
return { | ||
@@ -587,3 +592,4 @@ subjectAltNames: (subjectNames === null || subjectNames === void 0 ? void 0 : subjectNames.length) ? subjectNames : exports.DEFAULT_CERTIFICATE_SUBJECT_NAMES, | ||
: exports.DEFAULT_CERTIFICATE_SUBJECT_IP_ADDRESSES, | ||
validityInDays: Math.min(MAX_CERTIFICATE_VALIDITY_DAYS, (_a = options === null || options === void 0 ? void 0 : options.validityInDays) !== null && _a !== void 0 ? _a : MAX_CERTIFICATE_VALIDITY_DAYS) | ||
validityInDays: Math.min(MAX_CERTIFICATE_VALIDITY_DAYS, (_a = options === null || options === void 0 ? void 0 : options.validityInDays) !== null && _a !== void 0 ? _a : MAX_CERTIFICATE_VALIDITY_DAYS), | ||
skipCertificateTrust: skipCertificateTrust | ||
}; | ||
@@ -590,0 +596,0 @@ } |
{ | ||
"name": "@rushstack/debug-certificate-manager", | ||
"version": "1.3.66", | ||
"version": "1.4.0", | ||
"description": "Cross-platform functionality to create debug ssl certificates.", | ||
@@ -21,4 +21,4 @@ "main": "lib/index.js", | ||
"@types/node-forge": "1.0.4", | ||
"local-node-rig": "1.0.0", | ||
"@rushstack/heft": "0.67.2" | ||
"@rushstack/heft": "0.67.2", | ||
"local-node-rig": "1.0.0" | ||
}, | ||
@@ -25,0 +25,0 @@ "scripts": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
317361
7345