@typed-assistant/builder 0.0.14 → 0.0.16

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typed-assistant/builder",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
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/logger": "0.0.5",
25
26
  "@typed-assistant/typescript-config": "0.0.4",
26
- "@typed-assistant/utils": "0.0.7",
27
- "@typed-assistant/logger": "0.0.5"
27
+ "@typed-assistant/utils": "0.0.7"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "home-assistant-js-websocket": "^8.2.0"
@@ -69,13 +69,16 @@ export const startWebappServer = async ({
69
69
  log("💄 Tailwind built successfully")
70
70
 
71
71
  const indexHtml = (await Bun.file(indexHtmlFilePath).text())
72
- .replace("{{ STYLESHEET }}", `/assets/${basename(cssOutputFile)}`)
72
+ .replace(
73
+ "{{ STYLESHEET }}",
74
+ `${basePath}/assets/${basename(cssOutputFile)}`,
75
+ )
73
76
  .replace(
74
77
  "{{ SCRIPTS }}",
75
78
  buildResult.outputs
76
79
  .map(
77
80
  (output) =>
78
- `<script type="module" src="/assets/${basename(output.path)}"></script>`,
81
+ `<script type="module" src="${basePath}/assets/${basename(output.path)}"></script>`,
79
82
  )
80
83
  .join("\n"),
81
84
  )
@@ -102,13 +105,21 @@ export const startWebappServer = async ({
102
105
  },
103
106
  })
104
107
 
105
- server.get(`/assets/${basename(cssOutputFile)}`, Bun.file(cssOutputFile), {
106
- headers: { "content-type": "text/css" },
107
- })
108
+ server.get(
109
+ `/assets/${basename(cssOutputFile)}`,
110
+ () =>
111
+ new Response(Bun.file(cssOutputFile), {
112
+ headers: { "content-type": "text/css" },
113
+ }),
114
+ )
108
115
  buildResult.outputs.forEach((output) => {
109
- server.get(`/assets/${basename(output.path)}`, Bun.file(output.path), {
110
- headers: { "content-type": "text/javascript" },
111
- })
116
+ server.get(
117
+ `/assets/${basename(output.path)}`,
118
+ () =>
119
+ new Response(Bun.file(output.path), {
120
+ headers: { "content-type": "text/javascript" },
121
+ }),
122
+ )
112
123
  })
113
124
 
114
125
  server.listen(8099)