@lasso-ai/cli 1.4.4 → 1.5.0

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.
@@ -282,12 +282,13 @@ function hostCertificateStatus() {
282
282
  let trusted = false;
283
283
  if (hasCertificate()) {
284
284
  try {
285
- const certContent = node_fs_1.default.readFileSync(exports.TLS_CERT_FILE, "utf8").toLowerCase();
286
- // mkcert certificates include "mkcert" in the issuer or subject (case-insensitive)
287
- 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");
288
289
  }
289
290
  catch {
290
- // If we can't read the cert, assume not trusted
291
+ // If openssl fails, assume not trusted
291
292
  }
292
293
  }
293
294
  return { present: hasCertificate(), certificate: exports.TLS_CERT_FILE, key: exports.TLS_KEY_FILE, trusted };
@@ -130,13 +130,11 @@ void (async () => {
130
130
  await waitForNext(nextPort, nextProcess);
131
131
  }
132
132
  catch (error) {
133
- bridge.close();
134
133
  nextProcess.kill("SIGTERM");
135
134
  throw error;
136
135
  }
137
136
  server.listen(publicPort, "127.0.0.1");
138
137
  const shutdown = () => {
139
- bridge.close();
140
138
  nextProcess.kill("SIGTERM");
141
139
  proxy.close();
142
140
  server.close(() => process.exit(0));
@@ -27,7 +27,7 @@ function lassoOverlayPlugin() {
27
27
  };
28
28
  }
29
29
  void (async () => {
30
- const bridge = await (0, bridge_1.startBridge)(cwd, null, bridgePort);
30
+ await (0, bridge_1.startBridge)(cwd, null, bridgePort);
31
31
  const require = (0, node_module_1.createRequire)(node_path_1.default.join(cwd, "package.json"));
32
32
  const viteEntry = require.resolve("vite");
33
33
  const { createServer } = await import((0, node_url_1.pathToFileURL)(viteEntry).href);
@@ -49,11 +49,9 @@ void (async () => {
49
49
  });
50
50
  await server.listen();
51
51
  process.on("SIGTERM", () => {
52
- bridge.close();
53
52
  void server.close().then(() => process.exit(0));
54
53
  });
55
54
  process.on("SIGINT", () => {
56
- bridge.close();
57
55
  void server.close().then(() => process.exit(0));
58
56
  });
59
57
  })();