Skip to content

Commit 62ff745

Browse files
konardclaude
andcommitted
style(lib): apply linter auto-formatting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 88a5957 commit 62ff745

10 files changed

Lines changed: 51 additions & 33 deletions

File tree

packages/lib/src/core/command-builders.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ const buildTemplateConfig = ({
216216
dockerSharedNetworkName,
217217
enableMcpPlaywright,
218218
gitTokenLabel,
219-
skipGithubAuth,
220219
names,
221220
paths,
222221
ramLimit,
223-
repo
222+
repo,
223+
skipGithubAuth
224224
}: BuildTemplateConfigInput): CreateCommand["config"] => ({
225225
containerName: names.containerName,
226226
serviceName: names.serviceName,

packages/lib/src/core/domain.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export type {
66
AuthClaudeLoginCommand,
77
AuthClaudeLogoutCommand,
88
AuthClaudeStatusCommand,
9-
AuthCodexLoginCommand,
109
AuthCodexImportCommand,
10+
AuthCodexLoginCommand,
1111
AuthCodexLogoutCommand,
1212
AuthCodexStatusCommand,
1313
AuthCommand,

packages/lib/src/core/templates/docker-compose.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {
2-
resolveComposeProjectName,
32
dockerGitSharedCacheVolumeName,
43
dockerGitSharedCodexVolumeName,
54
resolveComposeNetworkName,
5+
resolveComposeProjectName,
66
resolveProjectBootstrapVolumeName,
77
type TemplateConfig
88
} from "../domain.js"

packages/lib/src/shell/docker.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ import { ExitCode } from "@effect/platform/CommandExecutor"
44
import type { PlatformError } from "@effect/platform/Error"
55
import { Duration, Effect, pipe, Schedule } from "effect"
66

7-
import { runCommandCapture, runCommandExitCode, runCommandWithCapturedOutput, runCommandWithExitCodes } from "./command-runner.js"
7+
import {
8+
runCommandCapture,
9+
runCommandExitCode,
10+
runCommandWithCapturedOutput,
11+
runCommandWithExitCodes
12+
} from "./command-runner.js"
813
import { composeSpec, resolveDockerComposeEnv } from "./docker-compose-env.js"
914
import { parseInspectNetworkEntry } from "./docker-inspect-parse.js"
1015
import { CommandFailedError, DockerCommandError } from "./errors.js"

packages/lib/src/usecases/actions/prepare-files.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,14 @@ export const prepareProjectFiles = (
275275
const rewriteManagedFiles = options.force || options.forceEnv
276276
const envOnlyRefresh = options.forceEnv && !options.force
277277
const createdFiles = yield* _(writeProjectFiles(resolvedOutDir, projectConfig, rewriteManagedFiles))
278-
yield* _(ensureAuthorizedKeys(resolvedOutDir, projectConfig.authorizedKeysPath, globalConfig.authorizedKeysPath, options.force))
278+
yield* _(
279+
ensureAuthorizedKeys(
280+
resolvedOutDir,
281+
projectConfig.authorizedKeysPath,
282+
globalConfig.authorizedKeysPath,
283+
options.force
284+
)
285+
)
279286
yield* _(ensureEnvFile(resolvedOutDir, projectConfig.envGlobalPath, defaultGlobalEnvContents))
280287
yield* _(ensureEnvFile(resolvedOutDir, projectConfig.envProjectPath, defaultProjectEnvContents, envOnlyRefresh))
281288
yield* _(ensureCodexConfigFile(baseDir, globalConfig.codexAuthPath))

packages/lib/src/usecases/auth-codex.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ export const authCodexLogin = (
187187
runCodexLogin(cwd, accountPath).pipe(
188188
Effect.flatMap((output) => (output.length === 0 ? Effect.void : Effect.log(output)))
189189
)).pipe(
190-
Effect.zipRight(autoSyncState(`chore(state): auth codex ${normalizeAccountLabel(command.label, "default")}`))
191-
)
190+
Effect.zipRight(autoSyncState(`chore(state): auth codex ${normalizeAccountLabel(command.label, "default")}`))
191+
)
192192

193193
// CHANGE: show Codex auth status for a given label
194194
// WHY: make it obvious whether Codex is connected

packages/lib/src/usecases/auth-sync.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,14 @@ export const syncAuthArtifacts = (
168168
yield* _(copyFileIfNeeded(sourceGlobal, targetGlobal))
169169
yield* _(syncGithubTokenKeysInFile(sourceGlobal, targetGlobal))
170170
yield* _(copyFileIfNeeded(sourceProject, targetProject))
171-
yield* _(copyCodexFile(fs, path, { sourceDir: sourceCodex, targetDir: targetCodex, fileName: "auth.json", label: "auth" }))
171+
yield* _(
172+
copyCodexFile(fs, path, {
173+
sourceDir: sourceCodex,
174+
targetDir: targetCodex,
175+
fileName: "auth.json",
176+
label: "auth"
177+
})
178+
)
172179
if (sourceCodex !== targetCodex) {
173180
yield* _(
174181
copyCodexFile(fs, path, {

packages/lib/src/usecases/github-token-preflight.ts

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@ import {
1616

1717
export { githubInvalidTokenMessage } from "./github-token-validation.js"
1818

19-
export const githubMissingTokenMessage =
20-
[
21-
"GitHub auth is missing: no GitHub token/key was found for this repository.",
22-
"If the repository requires access, run: docker-git auth github login --web"
23-
].join("\n")
24-
export const githubRepoAccessWarning =
25-
"Unable to validate GitHub repository access before start; continuing."
19+
export const githubMissingTokenMessage = [
20+
"GitHub auth is missing: no GitHub token/key was found for this repository.",
21+
"If the repository requires access, run: docker-git auth github login --web"
22+
].join("\n")
23+
export const githubRepoAccessWarning = "Unable to validate GitHub repository access before start; continuing."
2624

2725
export type GithubRepoAccessStatus = "accessible" | "notAccessible" | "unknown"
2826

@@ -167,16 +165,15 @@ export const validateGithubCloneAuthTokenPreflight = (
167165
return
168166
}
169167

170-
const token =
171-
config.skipGithubAuth === true
172-
? null
173-
: yield* _(
174-
Effect.gen(function*(__) {
175-
const fs = yield* __(FileSystem.FileSystem)
176-
const envText = yield* __(readEnvText(fs, config.envGlobalPath))
177-
return resolveGithubCloneAuthToken(envText, config)
178-
})
179-
)
168+
const token = config.skipGithubAuth
169+
? null
170+
: yield* _(
171+
Effect.gen(function*(__) {
172+
const fs = yield* __(FileSystem.FileSystem)
173+
const envText = yield* __(readEnvText(fs, config.envGlobalPath))
174+
return resolveGithubCloneAuthToken(envText, config)
175+
})
176+
)
180177

181178
if (token !== null) {
182179
const validation = yield* _(validateGithubToken(token))
@@ -196,7 +193,8 @@ export const validateGithubCloneAuthTokenPreflight = (
196193
Match.when("accessible", () => Effect.void),
197194
Match.when("notAccessible", () =>
198195
Effect.fail(new AuthError({ message: githubRepoAccessMessage(config.repoUrl, token !== null) }))),
199-
Match.when("unknown", () => Effect.logWarning(githubRepoAccessWarning)),
196+
Match.when("unknown", () =>
197+
Effect.logWarning(githubRepoAccessWarning)),
200198
Match.exhaustive
201199
)
202200
)

packages/lib/src/usecases/github-token-validation.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ import { Effect, Either } from "effect"
66
const githubTokenValidationUrl = "https://api.github.com/user"
77

88
export const githubTokenValidationWarning = "Unable to validate GitHub token before start; continuing."
9-
export const githubInvalidTokenMessage =
10-
[
11-
"GitHub auth is invalid: the stored token is dead, revoked, expired, or malformed.",
12-
"To restore access, run: docker-git auth github login --web"
13-
].join("\n")
9+
export const githubInvalidTokenMessage = [
10+
"GitHub auth is invalid: the stored token is dead, revoked, expired, or malformed.",
11+
"To restore access, run: docker-git auth github login --web"
12+
].join("\n")
1413

1514
type GithubUser = {
1615
readonly login: string

packages/lib/src/usecases/shared-volume-seed.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,9 @@ const copyBootstrapSnapshotAuthDirs = (
203203
yield* _(copyLabeledCodexFiles(fs, path, sources.codexAuthSource, targets.projectCodexTarget, "auth.json"))
204204
yield* _(copyLabeledCodexFiles(fs, path, sources.codexAuthSource, targets.projectCodexTarget, "config.toml"))
205205
yield* _(copyDirRecursive(fs, path, sources.claudeAuthSource, targets.projectClaudeTarget))
206-
yield* _(copyCodexAuthFileIfPresent(fs, path, sources.codexSharedAuthSource, targets.sharedCodexTarget, "auth.json"))
206+
yield* _(
207+
copyCodexAuthFileIfPresent(fs, path, sources.codexSharedAuthSource, targets.sharedCodexTarget, "auth.json")
208+
)
207209
yield* _(copyLabeledCodexFiles(fs, path, sources.codexSharedAuthSource, targets.sharedCodexTarget, "auth.json"))
208210
})
209211

0 commit comments

Comments
 (0)