@typed-assistant/builder 0.0.13 → 0.0.15
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/package.json +3 -3
- package/src/setupWebserver.tsx +15 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typed-assistant/builder",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"exports": {
|
|
5
5
|
"./appProcess": "./src/appProcess.tsx",
|
|
6
6
|
"./bunInstall": "./src/bunInstall.tsx",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"home-assistant-js-websocket": "^8.2.0",
|
|
23
23
|
"typescript": "^5.3.3",
|
|
24
24
|
"@typed-assistant/eslint-config": "0.0.4",
|
|
25
|
-
"@typed-assistant/
|
|
25
|
+
"@typed-assistant/logger": "0.0.5",
|
|
26
26
|
"@typed-assistant/utils": "0.0.7",
|
|
27
|
-
"@typed-assistant/
|
|
27
|
+
"@typed-assistant/typescript-config": "0.0.4"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"home-assistant-js-websocket": "^8.2.0"
|
package/src/setupWebserver.tsx
CHANGED
|
@@ -102,12 +102,25 @@ export const startWebappServer = async ({
|
|
|
102
102
|
},
|
|
103
103
|
})
|
|
104
104
|
|
|
105
|
-
server.get(
|
|
105
|
+
server.get(
|
|
106
|
+
`/assets/${basename(cssOutputFile)}`,
|
|
107
|
+
() =>
|
|
108
|
+
new Response(Bun.file(cssOutputFile), {
|
|
109
|
+
headers: { "content-type": "text/css" },
|
|
110
|
+
}),
|
|
111
|
+
)
|
|
106
112
|
buildResult.outputs.forEach((output) => {
|
|
107
|
-
server.get(
|
|
113
|
+
server.get(
|
|
114
|
+
`/assets/${basename(output.path)}`,
|
|
115
|
+
() =>
|
|
116
|
+
new Response(Bun.file(output.path), {
|
|
117
|
+
headers: { "content-type": "text/javascript" },
|
|
118
|
+
}),
|
|
119
|
+
)
|
|
108
120
|
})
|
|
109
121
|
|
|
110
122
|
server.listen(8099)
|
|
123
|
+
log("🌐 Web server listening on port 8099")
|
|
111
124
|
|
|
112
125
|
// eslint-disable-next-line no-constant-condition
|
|
113
126
|
while (true) {
|