stackdeck 0.3.0 → 0.4.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/README.md +18 -7
- package/index.html +643 -134
- package/package.json +30 -7
- package/server.js +19 -1
package/package.json
CHANGED
|
@@ -1,17 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stackdeck",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Your projects folder, as a control panel. Browser dashboard to start, stop, and organize local dev services — git-branch aware, zero dependencies.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "beingmechon",
|
|
7
|
-
"bin": {
|
|
7
|
+
"bin": {
|
|
8
|
+
"stackdeck": "bin/stackdeck.js"
|
|
9
|
+
},
|
|
8
10
|
"main": "server.js",
|
|
9
|
-
"files": [
|
|
11
|
+
"files": [
|
|
12
|
+
"server.js",
|
|
13
|
+
"index.html",
|
|
14
|
+
"bin/",
|
|
15
|
+
"scripts/"
|
|
16
|
+
],
|
|
10
17
|
"scripts": {
|
|
11
18
|
"start": "node server.js"
|
|
12
19
|
},
|
|
13
|
-
"engines": {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=18.13"
|
|
22
|
+
},
|
|
23
|
+
"os": [
|
|
24
|
+
"darwin",
|
|
25
|
+
"linux"
|
|
26
|
+
],
|
|
27
|
+
"keywords": [
|
|
28
|
+
"process-manager",
|
|
29
|
+
"dev-server",
|
|
30
|
+
"dashboard",
|
|
31
|
+
"local-development",
|
|
32
|
+
"git",
|
|
33
|
+
"procfile",
|
|
34
|
+
"hotel"
|
|
35
|
+
],
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/beingmechon/stackdeck.git"
|
|
39
|
+
}
|
|
17
40
|
}
|
package/server.js
CHANGED
|
@@ -22,7 +22,7 @@ const path = require("path");
|
|
|
22
22
|
const os = require("os");
|
|
23
23
|
const { spawn, execFileSync } = require("child_process");
|
|
24
24
|
|
|
25
|
-
const VERSION = "0.
|
|
25
|
+
const VERSION = "0.4.0";
|
|
26
26
|
const ROOT = __dirname;
|
|
27
27
|
|
|
28
28
|
/* ---------- state directory & config ---------- */
|
|
@@ -1008,6 +1008,8 @@ const handle = async (req, res) => {
|
|
|
1008
1008
|
categoryOrder: cfg.categoryOrder || [],
|
|
1009
1009
|
excludes: cfg.excludes || [],
|
|
1010
1010
|
proxyPort: PROXY_PORT,
|
|
1011
|
+
theme: cfg.theme || "",
|
|
1012
|
+
themeTokens: cfg.themeTokens || null,
|
|
1011
1013
|
});
|
|
1012
1014
|
|
|
1013
1015
|
if (req.method === "POST" && url.pathname === "/api/config") {
|
|
@@ -1025,6 +1027,22 @@ const handle = async (req, res) => {
|
|
|
1025
1027
|
if (order !== null) cfg.categoryOrder = order;
|
|
1026
1028
|
const excludes = strList(b.excludes);
|
|
1027
1029
|
if (excludes !== null) cfg.excludes = excludes;
|
|
1030
|
+
if (b.theme !== undefined) {
|
|
1031
|
+
const t = String(b.theme);
|
|
1032
|
+
if (!["", "playful", "austere", "custom"].includes(t)) return json(res, 400, { error: "unknown theme" });
|
|
1033
|
+
cfg.theme = t;
|
|
1034
|
+
}
|
|
1035
|
+
if (b.themeTokens !== undefined && typeof b.themeTokens === "object" && b.themeTokens) {
|
|
1036
|
+
// numeric knobs only, clamped — nothing here ever reaches a shell or HTML
|
|
1037
|
+
const lim = { hue: [0, 360], tint: [0, 0.05], bgL: [0.08, 0.99], accentHue: [0, 360], accentC: [0, 0.25], radius: [0, 20] };
|
|
1038
|
+
const tk = {};
|
|
1039
|
+
for (const [k, [lo, hi]] of Object.entries(lim)) {
|
|
1040
|
+
const v = Number(b.themeTokens[k]);
|
|
1041
|
+
if (Number.isFinite(v)) tk[k] = Math.min(hi, Math.max(lo, v));
|
|
1042
|
+
}
|
|
1043
|
+
if (b.themeTokens.font === "mono" || b.themeTokens.font === "sans") tk.font = b.themeTokens.font;
|
|
1044
|
+
cfg.themeTokens = tk;
|
|
1045
|
+
}
|
|
1028
1046
|
saveCfg();
|
|
1029
1047
|
projCache.t = 0;
|
|
1030
1048
|
return json(res, 200, { ok: true });
|