@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.
- package/dist/cli/agent.d.ts +9 -89
- package/dist/cli/agent.js +66 -1412
- package/dist/cli/bridge-old.d.ts +259 -0
- package/dist/cli/bridge-old.js +1350 -0
- package/dist/cli/bridge.d.ts +19 -12
- package/dist/cli/bridge.js +625 -1181
- package/dist/cli/host/certificates.js +5 -4
- package/dist/cli/host/next-host-entry.js +0 -2
- package/dist/cli/host/vite-host-entry.js +1 -3
- package/dist/cli/oneshot.js +159 -961
- package/dist/cli/runtime-client.d.ts +229 -0
- package/dist/cli/runtime-client.js +143 -0
- package/dist/cli/snapshot.d.ts +3 -1
- package/dist/cli/snapshot.js +8 -1
- package/package.json +1 -1
|
@@ -282,12 +282,13 @@ function hostCertificateStatus() {
|
|
|
282
282
|
let trusted = false;
|
|
283
283
|
if (hasCertificate()) {
|
|
284
284
|
try {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
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
|
|
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
|
-
|
|
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
|
})();
|