@typed-assistant/builder 0.0.3 → 0.0.5
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 +10 -10
- package/src/appProcess.tsx +2 -1
- package/src/pullChanges.tsx +3 -2
- package/.turbo/turbo-lint.log +0 -1
package/package.json
CHANGED
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typed-assistant/builder",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"exports": {
|
|
5
5
|
"./appProcess": "./src/appProcess.tsx",
|
|
6
6
|
"./bunInstall": "./src/bunInstall.tsx",
|
|
7
7
|
"./getSpawnText": "./src/getSpawnText.tsx",
|
|
8
8
|
"./pullChanges": "./src/pullChanges.tsx"
|
|
9
9
|
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"lint": "eslint . --max-warnings 0"
|
|
12
|
-
},
|
|
13
10
|
"dependencies": {
|
|
14
11
|
"@mdi/svg": "^7.3.67",
|
|
15
12
|
"ignore": "^5.3.0"
|
|
16
13
|
},
|
|
17
14
|
"devDependencies": {
|
|
18
|
-
"@typed-assistant/eslint-config": "workspace:*",
|
|
19
|
-
"@typed-assistant/logger": "workspace:*",
|
|
20
|
-
"@typed-assistant/typescript-config": "workspace:*",
|
|
21
|
-
"@typed-assistant/utils": "workspace:*",
|
|
22
15
|
"@types/node": "^20.10.6",
|
|
23
16
|
"@types/eslint": "^8.56.1",
|
|
24
17
|
"eslint": "^8.56.0",
|
|
25
18
|
"home-assistant-js-websocket": "^8.2.0",
|
|
26
|
-
"typescript": "^5.3.3"
|
|
19
|
+
"typescript": "^5.3.3",
|
|
20
|
+
"@typed-assistant/typescript-config": "0.0.3",
|
|
21
|
+
"@typed-assistant/eslint-config": "0.0.3",
|
|
22
|
+
"@typed-assistant/utils": "0.0.4",
|
|
23
|
+
"@typed-assistant/logger": "0.0.4"
|
|
27
24
|
},
|
|
28
25
|
"peerDependencies": {
|
|
29
26
|
"home-assistant-js-websocket": "^8.2.0"
|
|
@@ -31,5 +28,8 @@
|
|
|
31
28
|
"publishConfig": {
|
|
32
29
|
"access": "public",
|
|
33
30
|
"registry": "https://registry.npmjs.org/"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"lint": "eslint . --max-warnings 0"
|
|
34
34
|
}
|
|
35
|
-
}
|
|
35
|
+
}
|
package/src/appProcess.tsx
CHANGED
|
@@ -82,7 +82,8 @@ const setupGitSync = async ({
|
|
|
82
82
|
gitPullPollDuration?: number
|
|
83
83
|
} = {}) => {
|
|
84
84
|
const duration = gitPullPollDuration ?? 5
|
|
85
|
-
await pullChanges()
|
|
85
|
+
const { error } = await pullChanges()
|
|
86
|
+
if (error) return
|
|
86
87
|
log(` ⏳ Pulling changes again in ${duration} seconds...`)
|
|
87
88
|
|
|
88
89
|
setTimeout(() => {
|
package/src/pullChanges.tsx
CHANGED
|
@@ -11,7 +11,7 @@ export const pullChanges = async () => {
|
|
|
11
11
|
log(
|
|
12
12
|
"⚠️ Cannot pull changes without GITHUB_TOKEN, GITHUB_USERNAME, and GITHUB_REPO environment variables.",
|
|
13
13
|
)
|
|
14
|
-
return
|
|
14
|
+
return { error: {} }
|
|
15
15
|
}
|
|
16
16
|
log("⬇️ Pulling changes...")
|
|
17
17
|
const gitPullText = await getSpawnText(["git", "pull"])
|
|
@@ -19,7 +19,7 @@ export const pullChanges = async () => {
|
|
|
19
19
|
const nothingNew = /Already up to date./.test(gitPullText)
|
|
20
20
|
if (nothingNew) {
|
|
21
21
|
log(" 👌 No new changes.")
|
|
22
|
-
return
|
|
22
|
+
return {}
|
|
23
23
|
} else {
|
|
24
24
|
log(" 👍 Changes pulled.")
|
|
25
25
|
}
|
|
@@ -28,4 +28,5 @@ export const pullChanges = async () => {
|
|
|
28
28
|
const { error } = await bunInstall()
|
|
29
29
|
if (error) throw new Error(error.text)
|
|
30
30
|
}
|
|
31
|
+
return {}
|
|
31
32
|
}
|
package/.turbo/turbo-lint.log
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
$ eslint . --max-warnings 0
|