@lasso-ai/cli 1.4.2 → 1.4.3

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.
@@ -211,9 +211,21 @@ async function installMkcert() {
211
211
  }
212
212
  async function ensureHostCertificate(onProgress) {
213
213
  node_fs_1.default.mkdirSync(paths_1.HOST_DIR, { recursive: true, mode: 0o700 });
214
+ // Check if certificate exists and is trusted
214
215
  if (hasCertificate()) {
215
216
  const certStatus = hostCertificateStatus();
216
- return { ok: true, trusted: certStatus.trusted };
217
+ // If certificate exists but is not trusted and mkcert is available, regenerate it
218
+ if (!certStatus.trusted && isMkcertInstalled()) {
219
+ onProgress?.("Regenerating certificate with mkcert for trusted SSL...");
220
+ try {
221
+ node_fs_1.default.unlinkSync(exports.TLS_CERT_FILE);
222
+ node_fs_1.default.unlinkSync(exports.TLS_KEY_FILE);
223
+ }
224
+ catch { }
225
+ }
226
+ else {
227
+ return { ok: true, trusted: certStatus.trusted };
228
+ }
217
229
  }
218
230
  onProgress?.("Generating SSL certificate...");
219
231
  // Try mkcert first - it creates system-trusted certificates
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lasso-ai/cli",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "Select any part of your running app, describe a change, and let AI edit the real source code.",
5
5
  "type": "commonjs",
6
6
  "main": "dist/cli/index.js",