@lasso-ai/cli 1.4.3 → 1.4.5

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.
@@ -214,6 +214,7 @@ async function ensureHostCertificate(onProgress) {
214
214
  // Check if certificate exists and is trusted
215
215
  if (hasCertificate()) {
216
216
  const certStatus = hostCertificateStatus();
217
+ console.log(`[Lasso] Certificate exists, trusted: ${certStatus.trusted}`);
217
218
  // If certificate exists but is not trusted and mkcert is available, regenerate it
218
219
  if (!certStatus.trusted && isMkcertInstalled()) {
219
220
  onProgress?.("Regenerating certificate with mkcert for trusted SSL...");
@@ -231,23 +232,28 @@ async function ensureHostCertificate(onProgress) {
231
232
  // Try mkcert first - it creates system-trusted certificates
232
233
  if (!isMkcertInstalled()) {
233
234
  onProgress?.("mkcert not found, installing...");
235
+ console.log("[Lasso] mkcert not found, attempting installation...");
234
236
  const installResult = await installMkcert();
235
237
  if (!installResult.ok) {
236
238
  console.warn(`[Lasso] ${installResult.error}`);
237
239
  console.warn("[Lasso] Falling back to OpenSSL (certificate will show as not secure)");
238
240
  }
239
241
  }
242
+ else {
243
+ console.log("[Lasso] mkcert is installed");
244
+ }
240
245
  if (isMkcertInstalled()) {
241
246
  try {
242
247
  onProgress?.("Creating trusted certificate with mkcert...");
243
248
  const mkcertPath = getMkcertPath();
249
+ console.log(`[Lasso] Using mkcert at: ${mkcertPath}`);
244
250
  (0, node_child_process_1.execFileSync)(mkcertPath, ["-cert-file", exports.TLS_CERT_FILE, "-key-file", exports.TLS_KEY_FILE, "localhost", "127.0.0.1", "::1", "*.lasso"], { stdio: "ignore" });
245
251
  node_fs_1.default.chmodSync(exports.TLS_KEY_FILE, 0o600);
246
252
  onProgress?.("✓ SSL certificate ready (trusted)");
247
253
  return { ok: true, trusted: true };
248
254
  }
249
255
  catch (mkcertError) {
250
- console.warn("[Lasso] mkcert failed, falling back to OpenSSL");
256
+ console.warn("[Lasso] mkcert failed, falling back to OpenSSL:", mkcertError);
251
257
  }
252
258
  }
253
259
  // Fallback to OpenSSL - creates self-signed certificate (not trusted by browsers)
@@ -276,12 +282,13 @@ function hostCertificateStatus() {
276
282
  let trusted = false;
277
283
  if (hasCertificate()) {
278
284
  try {
279
- const certContent = node_fs_1.default.readFileSync(exports.TLS_CERT_FILE, "utf8");
280
- // mkcert certificates include "mkcert" in the issuer
281
- trusted = certContent.includes("mkcert");
285
+ // Use openssl to check the issuer of the certificate
286
+ const result = (0, node_child_process_1.execFileSync)("openssl", ["x509", "-noout", "-issuer", "-in", exports.TLS_CERT_FILE], { encoding: "utf8" });
287
+ // mkcert certificates have "mkcert" in the issuer
288
+ trusted = result.toLowerCase().includes("mkcert");
282
289
  }
283
290
  catch {
284
- // If we can't read the cert, assume not trusted
291
+ // If openssl fails, assume not trusted
285
292
  }
286
293
  }
287
294
  return { present: hasCertificate(), certificate: exports.TLS_CERT_FILE, key: exports.TLS_KEY_FILE, trusted };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lasso-ai/cli",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
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",