@typed-assistant/builder 0.0.44 → 0.0.46

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.44",
3
+ "version": "0.0.46",
4
4
  "exports": {
5
5
  "./appProcess": "./src/appProcess.tsx",
6
6
  "./bunInstall": "./src/bunInstall.tsx",
@@ -31,6 +31,7 @@ export async function setup({
31
31
  const slug = addonInfo?.data.slug ?? ""
32
32
  const directoryToWatch = join(process.cwd(), "./src")
33
33
  const addonUrl = `${slug}/ingress`
34
+ const webhookUrl = `${process.env.HASS_EXTERNAL_URL}${basePath}/webhook`
34
35
 
35
36
  let subprocesses = await buildAndStartAppProcess(entryFile, {
36
37
  mdiPaths: mdiPaths,
@@ -51,7 +52,7 @@ export async function setup({
51
52
  })
52
53
 
53
54
  checkProcesses(entryFile, { addonUrl, onProcessError })
54
- await setupGitSync()
55
+ await setupGitSync(webhookUrl)
55
56
 
56
57
  return subprocesses
57
58
  }
@@ -145,7 +146,7 @@ const getAddonInfo = async () => {
145
146
  return data
146
147
  }
147
148
 
148
- const setupGitSync = async () => {
149
+ const setupGitSync = async (webhookUrl: string) => {
149
150
  if (
150
151
  !process.env.GITHUB_TOKEN ||
151
152
  !process.env.GITHUB_USERNAME ||
@@ -157,7 +158,7 @@ const setupGitSync = async () => {
157
158
  return { error: {} }
158
159
  }
159
160
  if (process.env.HASS_EXTERNAL_URL) {
160
- await setupWebhook()
161
+ await setupWebhook(webhookUrl)
161
162
  return
162
163
  }
163
164
  logger.warn("⚠️ No HASS_EXTERNAL_URL found. Setting up git poller...")
@@ -14,12 +14,10 @@ export const addSoftKillListener = (listener: () => void | Promise<void>) => {
14
14
 
15
15
  export async function callKillListeners() {
16
16
  await Promise.all(killListeners.map((listener) => listener()))
17
- logger.info("👋 Called all kill listeners!")
18
17
  }
19
18
 
20
19
  export async function callSoftKillListeners() {
21
20
  await Promise.all(softKillListeners.map((listener) => listener()))
22
- logger.info("👋 Called all soft kill listeners!")
23
21
  }
24
22
 
25
23
  export async function killSubprocess(subprocess: Subprocess) {