@lasso-ai/cli 1.3.6 → 1.3.7
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/server/next.js +18 -4
- package/package.json +2 -1
package/dist/cli/server/next.js
CHANGED
|
@@ -13,10 +13,24 @@ const node_child_process_1 = require("node:child_process");
|
|
|
13
13
|
const PUBLIC_PORT = 3000; // what the user opens in the browser
|
|
14
14
|
const INTERNAL_PORT = 3055; // where the real `next dev` actually runs
|
|
15
15
|
function serveOverlayBundle(res, cwd) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
// Try multiple possible paths for the overlay bundle
|
|
17
|
+
const possiblePaths = [
|
|
18
|
+
(0, node_path_1.resolve)(cwd, "node_modules/@lasso-ai/cli/dist/overlay.js"),
|
|
19
|
+
(0, node_path_1.resolve)(cwd, "node_modules/lasso/dist/overlay.js"),
|
|
20
|
+
(0, node_path_1.resolve)(__dirname, "../../overlay.js"), // When running from Lasso repo
|
|
21
|
+
];
|
|
22
|
+
let bundlePath;
|
|
23
|
+
for (const path of possiblePaths) {
|
|
24
|
+
if ((0, node_fs_1.existsSync)(path)) {
|
|
25
|
+
bundlePath = path;
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (!bundlePath) {
|
|
30
|
+
res.writeHead(404, { "Content-Type": "text/plain" });
|
|
31
|
+
res.end("Lasso overlay bundle not found. Make sure @lasso-ai/cli is installed.");
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
20
34
|
res.setHeader("Content-Type", "application/javascript");
|
|
21
35
|
res.end((0, node_fs_1.readFileSync)(bundlePath, "utf-8"));
|
|
22
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lasso-ai/cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
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",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"start": "node dist/cli/index.js",
|
|
32
32
|
"prepublishOnly": "npm run build",
|
|
33
33
|
"format": "prettier --write .",
|
|
34
|
+
"deploy": "pnpm build && npm publish --access public",
|
|
34
35
|
"format:check": "prettier --check .",
|
|
35
36
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
36
37
|
},
|