@stacksjs/actions 0.70.190 → 0.70.191
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/dev/dashboard.js +26 -1
- package/package.json +17 -17
package/dist/dev/dashboard.js
CHANGED
|
@@ -56,7 +56,32 @@ async function startStxServer() {
|
|
|
56
56
|
} catch {}
|
|
57
57
|
const { listConfigFiles, readConfig, updateConfigKey } = await import(storagePath("framework/defaults/resources/functions/dashboard/config-io.ts")), depRoutes = {
|
|
58
58
|
"/__deps/charts.js": storagePath("framework/core/charts/dist/index.js")
|
|
59
|
-
}
|
|
59
|
+
};
|
|
60
|
+
let dashboardIconCss = null;
|
|
61
|
+
async function buildDashboardIconCss() {
|
|
62
|
+
const { generateCrosswindCSS } = await import("@stacksjs/stx"), dirs = [dashboardPath, userDashboardPath, storagePath("framework/defaults/resources/components/Dashboard")], icons = new Set;
|
|
63
|
+
for (const dir of dirs) {
|
|
64
|
+
if (!existsSync(dir))
|
|
65
|
+
continue;
|
|
66
|
+
const glob = new Bun.Glob("**/*.stx");
|
|
67
|
+
for await (const file of glob.scan({ cwd: dir, absolute: !0 })) {
|
|
68
|
+
const text = await Bun.file(file).text();
|
|
69
|
+
for (const match of text.matchAll(/\bi-[a-z][a-z0-9]*(?:-[a-z0-9]+)+/g))
|
|
70
|
+
icons.add(match[0]);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (icons.size === 0)
|
|
74
|
+
return "";
|
|
75
|
+
return generateCrosswindCSS(`<div class="${[...icons].join(" ")}"></div>`, process.cwd());
|
|
76
|
+
}
|
|
77
|
+
const configRoutes = {
|
|
78
|
+
"/__deps/dashboard-icons.css": async () => {
|
|
79
|
+
if (!dashboardIconCss)
|
|
80
|
+
dashboardIconCss = buildDashboardIconCss();
|
|
81
|
+
return new Response(await dashboardIconCss, {
|
|
82
|
+
headers: { "content-type": "text/css; charset=utf-8", "cache-control": "no-cache" }
|
|
83
|
+
});
|
|
84
|
+
},
|
|
60
85
|
...Object.fromEntries(Object.entries(depRoutes).map(([url, file]) => [
|
|
61
86
|
url,
|
|
62
87
|
async () => {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/actions",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.70.
|
|
5
|
+
"version": "0.70.191",
|
|
6
6
|
"description": "The Stacks actions.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -62,31 +62,31 @@
|
|
|
62
62
|
"prepublishOnly": "bun run build"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@stacksjs/config": "0.70.
|
|
65
|
+
"@stacksjs/config": "0.70.191",
|
|
66
66
|
"@stacksjs/bumpx": "^0.2.6",
|
|
67
67
|
"@stacksjs/bunpress": "^0.1.18",
|
|
68
68
|
"@stacksjs/logsmith": "^0.2.3",
|
|
69
|
-
"@stacksjs/registry": "0.70.
|
|
69
|
+
"@stacksjs/registry": "0.70.191",
|
|
70
70
|
"@stacksjs/ts-cloud": "^0.7.60",
|
|
71
71
|
"@stacksjs/ts-md": "^0.1.1"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@stacksjs/api": "0.70.
|
|
75
|
-
"@stacksjs/cli": "0.70.
|
|
76
|
-
"@stacksjs/database": "0.70.
|
|
74
|
+
"@stacksjs/api": "0.70.191",
|
|
75
|
+
"@stacksjs/cli": "0.70.191",
|
|
76
|
+
"@stacksjs/database": "0.70.191",
|
|
77
77
|
"@stacksjs/tlsx": "^0.13.2",
|
|
78
78
|
"better-dx": "^0.2.17",
|
|
79
|
-
"@stacksjs/dns": "0.70.
|
|
80
|
-
"@stacksjs/enums": "0.70.
|
|
81
|
-
"@stacksjs/env": "0.70.
|
|
82
|
-
"@stacksjs/error-handling": "0.70.
|
|
83
|
-
"@stacksjs/logging": "0.70.
|
|
84
|
-
"@stacksjs/path": "0.70.
|
|
85
|
-
"@stacksjs/security": "0.70.
|
|
86
|
-
"@stacksjs/storage": "0.70.
|
|
87
|
-
"@stacksjs/strings": "0.70.
|
|
88
|
-
"@stacksjs/utils": "0.70.
|
|
89
|
-
"@stacksjs/validation": "0.70.
|
|
79
|
+
"@stacksjs/dns": "0.70.191",
|
|
80
|
+
"@stacksjs/enums": "0.70.191",
|
|
81
|
+
"@stacksjs/env": "0.70.191",
|
|
82
|
+
"@stacksjs/error-handling": "0.70.191",
|
|
83
|
+
"@stacksjs/logging": "0.70.191",
|
|
84
|
+
"@stacksjs/path": "0.70.191",
|
|
85
|
+
"@stacksjs/security": "0.70.191",
|
|
86
|
+
"@stacksjs/storage": "0.70.191",
|
|
87
|
+
"@stacksjs/strings": "0.70.191",
|
|
88
|
+
"@stacksjs/utils": "0.70.191",
|
|
89
|
+
"@stacksjs/validation": "0.70.191"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"pickier": "^0.1.35"
|