@typed-assistant/builder 0.0.25 → 0.0.26

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.25",
3
+ "version": "0.0.26",
4
4
  "exports": {
5
5
  "./appProcess": "./src/appProcess.tsx",
6
6
  "./bunInstall": "./src/bunInstall.tsx",
@@ -24,10 +24,10 @@
24
24
  "home-assistant-js-websocket": "^8.2.0",
25
25
  "ts-toolbelt": "^9.6.0",
26
26
  "typescript": "^5.3.3",
27
- "@typed-assistant/eslint-config": "0.0.5",
28
- "@typed-assistant/logger": "0.0.9",
29
- "@typed-assistant/utils": "0.0.8",
30
- "@typed-assistant/typescript-config": "0.0.5"
27
+ "@typed-assistant/eslint-config": "0.0.6",
28
+ "@typed-assistant/logger": "0.0.10",
29
+ "@typed-assistant/typescript-config": "0.0.6",
30
+ "@typed-assistant/utils": "0.0.9"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "home-assistant-js-websocket": "^8.2.0"
@@ -33,6 +33,13 @@ async function startApp(appSourceFile: string) {
33
33
  return Bun.spawn(["bun", path], {
34
34
  stderr: "pipe",
35
35
  env: { ...process.env, FORCE_COLOR: "1" },
36
+ onExit(proc, exitCode, signalCode, error) {
37
+ log("😅😅😅 ~ error:", error)
38
+ log("😅😅😅 ~ signalCode:", signalCode)
39
+ log("😅😅😅 ~ exitCode:", exitCode)
40
+ log("😅😅😅 ~ proc:", proc)
41
+ // exit handler
42
+ },
36
43
  })
37
44
  }
38
45
 
@@ -67,7 +74,7 @@ const checkProcesses = async (
67
74
  log(message)
68
75
  log(ps)
69
76
  onProcessError?.(message)
70
- restartAddon()
77
+ // restartAddon()
71
78
  }
72
79
  } else {
73
80
  multipleProcessesErrorCount = 0
@@ -80,7 +87,7 @@ const checkProcesses = async (
80
87
  log(message)
81
88
  log(ps)
82
89
  onProcessError?.(message)
83
- restartAddon()
90
+ // restartAddon()
84
91
  }
85
92
  } else {
86
93
  noProcessesErrorCount = 0
@@ -107,6 +114,7 @@ export async function setup({
107
114
  let subprocesses = await buildAndStartAppProcess(entryFile, {
108
115
  mdiPaths: mdiPaths,
109
116
  })
117
+
110
118
  startWebappServer({
111
119
  basePath,
112
120
  getSubprocesses: () => subprocesses,
@@ -180,12 +188,12 @@ function setupWatcher({
180
188
  }: {
181
189
  directoryToWatch: string
182
190
  onSubprocessChange: (newSubprosses: {
183
- app: Subprocess<"ignore", "pipe", "pipe">
191
+ app: Subprocess<"ignore", "pipe", "inherit">
184
192
  }) => void
185
193
  entryFile: string
186
194
  mdiPaths: string[] | undefined
187
195
  getSubprocesses: () => {
188
- app: Subprocess<"ignore", "pipe", "pipe">
196
+ app: Subprocess<"ignore", "pipe", "inherit">
189
197
  }
190
198
  }) {
191
199
  log("👀 Watching directory:", directoryToWatch)
@@ -49,7 +49,7 @@ export const startWebappServer = async ({
49
49
  }: {
50
50
  basePath: string
51
51
  getSubprocesses: () => {
52
- app: Subprocess<"ignore", "pipe", "pipe">
52
+ app: Subprocess<"ignore", "pipe", "inherit">
53
53
  }
54
54
  }) => {
55
55
  const buildResult = await Bun.build({