@typed-assistant/builder 0.0.46 → 0.0.47
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 +1 -1
- package/src/pullChanges.tsx +7 -3
- package/src/setupGitPoller.tsx +1 -1
package/package.json
CHANGED
package/src/pullChanges.tsx
CHANGED
|
@@ -7,14 +7,18 @@ export const pullChanges = async () => {
|
|
|
7
7
|
const gitPullText = await $`git pull`.text()
|
|
8
8
|
const packageJSONUpdated = /package.json/.test(gitPullText)
|
|
9
9
|
const nothingNew = /Already up to date./.test(gitPullText)
|
|
10
|
+
if (!gitPullText) {
|
|
11
|
+
logger.error("⬇️🚨 Failed to pull changes.")
|
|
12
|
+
return { error: "Failed to pull changes." }
|
|
13
|
+
}
|
|
10
14
|
if (nothingNew) {
|
|
11
|
-
logger.info("
|
|
15
|
+
logger.info("⬇️👌 No new changes.")
|
|
12
16
|
return {}
|
|
13
17
|
} else {
|
|
14
|
-
logger.info("
|
|
18
|
+
logger.info("⬇️🆕 Changes pulled.")
|
|
15
19
|
}
|
|
16
20
|
if (packageJSONUpdated) {
|
|
17
|
-
logger.info("
|
|
21
|
+
logger.info("⬇️📦 package.json updated.")
|
|
18
22
|
await bunInstall()
|
|
19
23
|
}
|
|
20
24
|
return {}
|
package/src/setupGitPoller.tsx
CHANGED
|
@@ -10,7 +10,7 @@ export const setupGitPoller = async ({
|
|
|
10
10
|
gitPullPollDuration?: number
|
|
11
11
|
} = {}) => {
|
|
12
12
|
const duration = gitPullPollDuration ?? 30
|
|
13
|
-
const { error } = await
|
|
13
|
+
const { error } = await pullChanges()
|
|
14
14
|
if (error) return
|
|
15
15
|
logger.info(` ⏳ Pulling changes again in ${duration} seconds...`)
|
|
16
16
|
|