@typed-assistant/builder 0.0.90 ā 0.0.91
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/CHANGELOG.md +15 -0
- package/package.json +3 -3
- package/src/appProcess.tsx +9 -4
- package/src/setupWebserver.tsx +1 -1
- package/src/webserver/AppSection.tsx +1 -1
- package/src/webserver/useWS.tsx +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @typed-assistant/builder
|
|
2
2
|
|
|
3
|
+
## 0.0.91
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix security, reliability, and performance issues
|
|
8
|
+
|
|
9
|
+
- Fix XSS: pass `escapeXML: true` to ansi-to-html `Convert` constructor
|
|
10
|
+
- Fix regex injection: escape `entryFile` metacharacters before `RegExp`
|
|
11
|
+
- Fix crash: wrap `.gitignore` read in try/catch with fallback warning
|
|
12
|
+
- Fix error handling: normalize caught values to `Error` in `withErrorHandling` and `generateTypes`
|
|
13
|
+
- Fix preinstall: wrap in async IIFE so `Promise.all` is properly awaited
|
|
14
|
+
- Fix performance: replace listeners array with `Set` in `entityStore`
|
|
15
|
+
- Fix WebSocket: add exponential backoff (1sā30s cap) on reconnect
|
|
16
|
+
- Fix TS: import `JSX` type from react in `AppSection`
|
|
17
|
+
|
|
3
18
|
## 0.0.90
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typed-assistant/builder",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.91",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/TypedAssistant/TypedAssistant.git",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"ts-toolbelt": "^9.6.0",
|
|
39
39
|
"typescript": "^5.4.0",
|
|
40
40
|
"@typed-assistant/eslint-config": "0.0.11",
|
|
41
|
-
"@typed-assistant/
|
|
41
|
+
"@typed-assistant/utils": "0.0.21",
|
|
42
42
|
"@typed-assistant/typescript-config": "0.0.12",
|
|
43
|
-
"@typed-assistant/
|
|
43
|
+
"@typed-assistant/logger": "0.0.23"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"lint": "tsc --noEmit && eslint ."
|
package/src/appProcess.tsx
CHANGED
|
@@ -151,7 +151,8 @@ const checkProcesses = (
|
|
|
151
151
|
const interval = setInterval(async () => {
|
|
152
152
|
const ps = await $`ps -f`.text()
|
|
153
153
|
logger.debug({ emoji: "š" }, `Checking processes...\n${ps}`)
|
|
154
|
-
const
|
|
154
|
+
const escapedEntryFile = entryFile.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
|
155
|
+
const matches = ps.match(new RegExp(`bun .+${escapedEntryFile}`, "gmi")) ?? []
|
|
155
156
|
|
|
156
157
|
if (matches.length > 1) {
|
|
157
158
|
multipleProcessesErrorCount++
|
|
@@ -208,9 +209,13 @@ const setupGitSync = async ({
|
|
|
208
209
|
return setupGitPoller({ onChangesPulled })
|
|
209
210
|
}
|
|
210
211
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
)
|
|
212
|
+
let gitignoreContent = ".git"
|
|
213
|
+
try {
|
|
214
|
+
gitignoreContent = `${readFileSync(join(process.cwd(), ".gitignore")).toString()}\n.git`
|
|
215
|
+
} catch {
|
|
216
|
+
logger.warn({ emoji: "ā ļø" }, "No .gitignore found, watching all files")
|
|
217
|
+
}
|
|
218
|
+
const ig = ignore().add(gitignoreContent)
|
|
214
219
|
const shouldIgnoreFileOrFolder = (filename: string) =>
|
|
215
220
|
ig.ignores(relative(process.cwd(), filename))
|
|
216
221
|
|
package/src/setupWebserver.tsx
CHANGED
package/src/webserver/useWS.tsx
CHANGED
|
@@ -12,12 +12,19 @@ export function useWS({
|
|
|
12
12
|
|
|
13
13
|
useEffect(() => {
|
|
14
14
|
let timeout: ReturnType<typeof setTimeout>
|
|
15
|
+
let retryCount = 0
|
|
16
|
+
|
|
17
|
+
ws.ws.onopen = function () {
|
|
18
|
+
retryCount = 0
|
|
19
|
+
}
|
|
15
20
|
|
|
16
21
|
ws.ws.onclose = function () {
|
|
22
|
+
const delay = Math.min(1000 * 2 ** retryCount, 30000)
|
|
23
|
+
retryCount++
|
|
17
24
|
timeout = setTimeout(() => {
|
|
18
25
|
if (ws.ws.readyState === WebSocket.OPEN) return
|
|
19
26
|
setWS(subscribe)
|
|
20
|
-
},
|
|
27
|
+
}, delay)
|
|
21
28
|
}
|
|
22
29
|
|
|
23
30
|
ws.ws.onmessage = function (event) {
|