rafters 0.0.24 → 0.0.25
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/index.js +7 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -61341,6 +61341,13 @@ function studioApiPlugin() {
|
|
|
61341
61341
|
next();
|
|
61342
61342
|
return;
|
|
61343
61343
|
}
|
|
61344
|
+
if (pathname === "/api/shutdown" && req.method === "POST") {
|
|
61345
|
+
res.setHeader("Content-Type", "application/json");
|
|
61346
|
+
res.end(JSON.stringify({ ok: true, message: "Shutting down" }));
|
|
61347
|
+
console.log("[rafters] Studio shutting down...");
|
|
61348
|
+
setTimeout(() => server.close(), 100);
|
|
61349
|
+
return;
|
|
61350
|
+
}
|
|
61344
61351
|
if (pathname === "/api/color/build") {
|
|
61345
61352
|
res.setHeader("Content-Type", "application/json");
|
|
61346
61353
|
if (req.method !== "POST") {
|