Skip to content

Commit 3610670

Browse files
authored
Merge pull request #403 from ProverCoderAI/renovate/all
chore(deps): update all dependencies
2 parents 9a54fde + ea1bcbe commit 3610670

273 files changed

Lines changed: 2198 additions & 2049 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bun.lock

Lines changed: 85 additions & 93 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/api/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
"@eslint/js": "10.0.1",
4545
"@types/node": "^25.9.3",
4646
"@types/ws": "^8.18.1",
47-
"@typescript-eslint/eslint-plugin": "^8.61.0",
48-
"@typescript-eslint/parser": "^8.61.0",
47+
"@typescript-eslint/eslint-plugin": "^8.61.1",
48+
"@typescript-eslint/parser": "^8.61.1",
4949
"eslint": "^10.5.0",
5050
"fast-check": "4.8.0",
5151
"globals": "^17.6.0",
5252
"typescript": "^6.0.3",
53-
"vitest": "^4.1.8"
53+
"vitest": "^4.1.9"
5454
}
5555
}

packages/app/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@
101101
"@types/react": "^19.2.17",
102102
"@types/react-dom": "^19.2.3",
103103
"@types/ws": "^8.18.1",
104-
"@typescript-eslint/eslint-plugin": "^8.61.0",
105-
"@typescript-eslint/parser": "^8.61.0",
104+
"@typescript-eslint/eslint-plugin": "^8.61.1",
105+
"@typescript-eslint/parser": "^8.61.1",
106106
"@vitejs/plugin-react": "^6.0.2",
107-
"@vitest/coverage-v8": "^4.1.8",
107+
"@vitest/coverage-v8": "^4.1.9",
108108
"@vitest/eslint-plugin": "^1.6.20",
109109
"biome": "npm:@biomejs/biome@^2.5.0",
110110
"eslint": "^10.5.0",
@@ -114,14 +114,14 @@
114114
"eslint-plugin-simple-import-sort": "^13.0.0",
115115
"eslint-plugin-sonarjs": "^4.0.3",
116116
"eslint-plugin-sort-destructure-keys": "^3.0.0",
117-
"eslint-plugin-unicorn": "^65.0.1",
117+
"eslint-plugin-unicorn": "^67.0.0",
118118
"fast-check": "4.8.0",
119119
"globals": "^17.6.0",
120120
"jscpd": "^5.0.9",
121121
"typescript": "^6.0.3",
122-
"typescript-eslint": "^8.61.0",
122+
"typescript-eslint": "^8.61.1",
123123
"vite": "^8.0.16",
124-
"vitest": "^4.1.8",
124+
"vitest": "^4.1.9",
125125
"ws": "^8.21.0"
126126
}
127127
}

packages/app/src/docker-git/api-client-auth.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { Effect } from "effect"
55
import {
66
authStreamMarkerExitCode,
77
type AuthStreamMarkers,
8-
authStreamSucceeded,
98
codexLoginFailureMessage,
109
codexLoginStreamMarkers,
10+
didAuthStreamSucceed,
1111
githubLoginFailureMessage,
1212
githubLoginStreamMarkers,
1313
gitlabLoginFailureMessage,
@@ -62,14 +62,14 @@ const requestMarkedAuthStream = (
6262
const output = yield* _(requestTextStream("POST", path, body, writer.writeChunk))
6363
writer.flushVisiblePending()
6464

65-
if (authStreamSucceeded(output, markers)) {
65+
if (didAuthStreamSucceed(output, markers)) {
6666
return output
6767
}
6868

69+
const exitCode = authStreamMarkerExitCode(output, markers)
70+
const message = failureMessage(output, exitCode)
6971
return yield* _(
70-
Effect.fail<ApiRequestError>(
71-
streamFailure("POST", path, failureMessage(output, authStreamMarkerExitCode(output, markers)))
72-
)
72+
Effect.fail<ApiRequestError>(streamFailure("POST", path, message))
7373
)
7474
})
7575

packages/app/src/docker-git/api-client-create.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ export const buildCreateProjectRequest = (
2525
containerName: config.containerName,
2626
serviceName: config.serviceName,
2727
volumeName: config.volumeName,
28-
authorizedKeysPath: resolvedPaths.authorizedKeysContents === undefined
29-
? resolvedPaths.authorizedKeysPath
30-
: defaultTemplateConfig.authorizedKeysPath,
28+
authorizedKeysPath: (resolvedPaths.authorizedKeysContents === undefined
29+
? resolvedPaths
30+
: defaultTemplateConfig).authorizedKeysPath,
3131
authorizedKeysContents: resolvedPaths.authorizedKeysContents,
3232
envGlobalPath: config.envGlobalPath,
3333
envProjectPath: config.envProjectPath,
@@ -55,6 +55,6 @@ export const buildCreateProjectRequest = (
5555
force: command.force,
5656
forceEnv: command.forceEnv,
5757
waitForClone: command.waitForClone,
58-
...(options?.async === true ? { async: true } : {})
58+
...((options?.async === true) && { async: true })
5959
} satisfies JsonRequest
6060
}

packages/app/src/docker-git/api-client-events.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,14 @@ export const waitForProjectCreation = (
206206
export const startProjectEventPolling = (projectId: string, initialCursor: number) =>
207207
Effect.gen(function*(_) {
208208
const cursorRef = yield* _(Ref.make(initialCursor))
209+
const pollSchedule = Schedule.addDelay(
210+
Schedule.forever,
211+
() => projectEventPollInterval
212+
)
209213
const fiber = yield* _(
210214
pollProjectEventsOnce(projectId, cursorRef).pipe(
211215
Effect.ignore,
212-
Effect.repeat(
213-
Schedule.addDelay(
214-
Schedule.forever,
215-
() => projectEventPollInterval
216-
)
217-
),
216+
Effect.repeat(pollSchedule),
218217
Effect.fork
219218
)
220219
)

packages/app/src/docker-git/api-client.ts

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,15 @@ const projectPath = (projectId: string, suffix = ""): string => `/projects/${enc
6060

6161
const decodeProjectResponse = (payload: JsonValue) => {
6262
const object = asObject(payload)
63-
return object === null
64-
? decodeProjectDetails(payload)
65-
: decodeProjectDetails(object["project"] ?? payload)
63+
return decodeProjectDetails(object === null ? payload : object["project"] ?? payload)
6664
}
6765

6866
const decodeProjectsResponse = <A>(
6967
payload: JsonValue,
7068
decode: (value: JsonValue) => A | null
7169
): ReadonlyArray<A> => {
7270
const object = asObject(payload)
73-
const items = object === null ? asArray(payload) : asArray(object["projects"])
71+
const items = asArray(object === null ? payload : object["projects"])
7472
return items
7573
.map((item) => decode(item))
7674
.filter((value): value is A => value !== null)
@@ -93,8 +91,8 @@ const createProjectAsync = (
9391
resolvedPaths: ResolvedCreateRequestPaths
9492
) =>
9593
Effect.gen(function*(_) {
96-
const createRequest = buildCreateProjectRequest(command, resolvedPaths, { async: true })
97-
const payload = yield* _(request("POST", "/projects", createRequest))
94+
const requestBody = buildCreateProjectRequest(command, resolvedPaths, { async: true })
95+
const payload = yield* _(request("POST", "/projects", requestBody))
9896
const accepted = decodeCreateProjectAccepted(payload)
9997
if (accepted === null) {
10098
return yield* _(Effect.fail(invalidCreateAcceptedResponse()))
@@ -141,8 +139,8 @@ const createProjectWithResolvedPaths = (
141139
return yield* _(createProjectAsync(command, resolvedPaths))
142140
}
143141

144-
const createRequest = buildCreateProjectRequest(command, resolvedPaths)
145-
const projectId = asString(createRequest.outDir)
142+
const requestBody = buildCreateProjectRequest(command, resolvedPaths)
143+
const projectId = asString(requestBody.outDir)
146144
const initialCursor = projectId === null
147145
? null
148146
: yield* _(
@@ -153,13 +151,12 @@ const createProjectWithResolvedPaths = (
153151
const eventPolling = projectId === null || initialCursor === null
154152
? null
155153
: yield* _(startProjectEventPolling(projectId, initialCursor))
154+
const ensureStopped = eventPolling === null
155+
? Effect.void
156+
: stopProjectEventPolling(eventPolling)
156157
const payload = yield* _(
157-
request("POST", "/projects", createRequest).pipe(
158-
Effect.ensuring(
159-
eventPolling === null
160-
? Effect.void
161-
: stopProjectEventPolling(eventPolling)
162-
)
158+
request("POST", "/projects", requestBody).pipe(
159+
Effect.ensuring(ensureStopped)
163160
)
164161
)
165162
return decodeProjectResponse(payload)
@@ -176,10 +173,9 @@ const withProjectEventPolling = <A, E, R>(
176173
)
177174
)
178175
const eventPolling = yield* _(startProjectEventPolling(projectId, initialCursor))
176+
const ensureStopped = stopProjectEventPolling(eventPolling)
179177
return yield* _(
180-
effect.pipe(
181-
Effect.ensuring(stopProjectEventPolling(eventPolling))
182-
)
178+
effect.pipe(Effect.ensuring(ensureStopped))
183179
)
184180
})
185181

@@ -236,8 +232,8 @@ export const readProjectLogs = (projectId: string) =>
236232
Effect.map((payload) => readProjectOutput(payload))
237233
)
238234

239-
export const readContainerTaskSnapshot = (projectId: string, includeDefault: boolean) =>
240-
request("GET", projectPath(projectId, `/tasks${includeDefault ? "?includeDefault=true" : ""}`)).pipe(
235+
export const readContainerTaskSnapshot = (projectId: string, shouldIncludeDefault: boolean) =>
236+
request("GET", projectPath(projectId, `/tasks${shouldIncludeDefault ? "?includeDefault=true" : ""}`)).pipe(
241237
Effect.map((payload) => decodeContainerTaskSnapshot(payload))
242238
)
243239

@@ -275,7 +271,8 @@ export const createAuthTerminalSession = (
275271

276272
export const deleteTerminalSessionByPath = (path: string) => requestVoid("DELETE", path)
277273

278-
export const applyAllProjects = (activeOnly: boolean) => requestVoid("POST", "/projects/apply-all", { activeOnly })
274+
export const applyAllProjects = (isActiveOnly: boolean) =>
275+
requestVoid("POST", "/projects/apply-all", { activeOnly: isActiveOnly })
279276

280277
export const downAllProjects = () => requestVoid("POST", "/projects/down-all")
281278

packages/app/src/docker-git/api-http.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ const readErrorPayload = (body: JsonValue): ApiErrorPayload | undefined => {
5353
const details = error["details"]
5454

5555
return {
56-
...(type === null ? {} : { type }),
57-
...(message === null ? {} : { message }),
58-
...(provider === null ? {} : { provider }),
59-
...(command === null ? {} : { command }),
60-
...(details === undefined ? {} : { details })
56+
...(type !== null && { type }),
57+
...(message !== null && { message }),
58+
...(provider !== null && { provider }),
59+
...(command !== null && { command }),
60+
...(details !== undefined && { details })
6161
}
6262
}
6363

packages/app/src/docker-git/api-json.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@ import { type JsonObject, type JsonValue, JsonValueSchema } from "../shared/json
66

77
export type { JsonObject, JsonValue } from "../shared/json-schema.js"
88

9-
export type JsonRequest =
10-
| boolean
11-
| number
12-
| string
13-
| null
14-
| { readonly [key: string]: JsonRequest | undefined }
15-
| ReadonlyArray<JsonRequest>
9+
export type JsonRequest = boolean | number | string | ReadonlyArray<JsonRequest> | {
10+
readonly [key: string]: JsonRequest | undefined
11+
} | null
1612

1713
const JsonValueFromStringSchema: Schema.Schema<JsonValue, string> = Schema.parseJson(JsonValueSchema)
1814

@@ -47,11 +43,12 @@ export const asString = (value: JsonValue | undefined): string | null => typeof
4743
const renderGithubStatusLine = (entry: JsonObject): string | null => {
4844
const label = asString(entry["label"])
4945
const status = asString(entry["status"])
50-
const login = asString(entry["login"])
5146
if (label === null || status === null) {
5247
return null
5348
}
5449

50+
const login = asString(entry["login"])
51+
5552
if (status === "valid") {
5653
return login === null
5754
? `- ${label}: valid (owner unavailable)`

packages/app/src/docker-git/browser-frontend-state.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ export const readBrowserFrontendState = (
112112
Effect.gen(function*(_) {
113113
const fs = yield* _(FileSystem.FileSystem)
114114
const exists = yield* _(Effect.either(fs.exists(statePath)))
115-
const fileExists = Either.match(exists, {
115+
const isFileExists = Either.match(exists, {
116116
onLeft: () => false,
117117
onRight: (value) => value
118118
})
119-
if (!fileExists) {
119+
if (!isFileExists) {
120120
return null
121121
}
122122

0 commit comments

Comments
 (0)