@typed-assistant/builder 0.0.46 → 0.0.48

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.46",
3
+ "version": "0.0.48",
4
4
  "exports": {
5
5
  "./appProcess": "./src/appProcess.tsx",
6
6
  "./bunInstall": "./src/bunInstall.tsx",
@@ -4,17 +4,23 @@ import { bunInstall } from "./bunInstall"
4
4
 
5
5
  export const pullChanges = async () => {
6
6
  logger.info("⬇️ Pulling changes...")
7
- const gitPullText = await $`git pull`.text()
7
+ const { stderr, stdout } = await $`git pull`.quiet()
8
+ if (stderr.length > 0) {
9
+ logger.error(
10
+ `⬇️🚨 Failed to pull changes.\n (${stderr.toString().trim()})`,
11
+ )
12
+ }
13
+ const gitPullText = stdout.toString()
8
14
  const packageJSONUpdated = /package.json/.test(gitPullText)
9
15
  const nothingNew = /Already up to date./.test(gitPullText)
10
16
  if (nothingNew) {
11
- logger.info(" 👌 No new changes.")
17
+ logger.info("⬇️👌 No new changes.")
12
18
  return {}
13
19
  } else {
14
- logger.info(" 👍 Changes pulled.")
20
+ logger.info("⬇️🆕 Changes pulled.")
15
21
  }
16
22
  if (packageJSONUpdated) {
17
- logger.info(" 📦 package.json updated.")
23
+ logger.info("⬇️📦 package.json updated.")
18
24
  await bunInstall()
19
25
  }
20
26
  return {}
@@ -10,7 +10,7 @@ export const setupGitPoller = async ({
10
10
  gitPullPollDuration?: number
11
11
  } = {}) => {
12
12
  const duration = gitPullPollDuration ?? 30
13
- const { error } = await withErrorHandling(pullChanges)()
13
+ const { error } = await pullChanges()
14
14
  if (error) return
15
15
  logger.info(` ⏳ Pulling changes again in ${duration} seconds...`)
16
16