vmsan 0.1.0-alpha.22 → 0.1.0-alpha.23

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.
@@ -1423,6 +1423,8 @@ var Jailer = class {
1423
1423
  mkdirSync(wantsDir, { recursive: true });
1424
1424
  execSync(`ln -sf /etc/systemd/system/vmsan-agent.service "${join(wantsDir, "vmsan-agent.service")}"`, { stdio: "pipe" });
1425
1425
  }
1426
+ const ubuntuHome = join(tmpMount, "home", "ubuntu");
1427
+ if (existsSync(ubuntuHome)) execSync(`sudo chown 1000:1000 "${ubuntuHome}"`, { stdio: "pipe" });
1426
1428
  execSync(`sudo umount "${tmpMount}"`, { stdio: "pipe" });
1427
1429
  } catch {
1428
1430
  try {
@@ -117,6 +117,18 @@ var ShellSession = class {
117
117
  cleanup();
118
118
  resolve({ sessionDestroyed: reason.toString() === "session destroyed" });
119
119
  });
120
+ this.ws.on("unexpected-response", (_req, res) => {
121
+ const maxBytes = 4096;
122
+ let body = "";
123
+ res.on("data", (chunk) => {
124
+ if (body.length < maxBytes) body += chunk.toString().slice(0, maxBytes - body.length);
125
+ });
126
+ res.on("end", () => {
127
+ cleanup();
128
+ const detail = body.trim() || "no response body";
129
+ reject(/* @__PURE__ */ new Error(`Shell connection failed (HTTP ${res.statusCode}): ${detail}`));
130
+ });
131
+ });
120
132
  this.ws.on("error", (err) => {
121
133
  cleanup();
122
134
  reject(err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vmsan",
3
- "version": "0.1.0-alpha.22",
3
+ "version": "0.1.0-alpha.23",
4
4
  "description": "Firecracker microVM sandbox toolkit",
5
5
  "homepage": "https://github.com/angelorc/vmsan",
6
6
  "bugs": "https://github.com/angelorc/vmsan/issues",