chore: delete dead code, unused deps, and duplicate helpers (#9129)
Co-authored-by: Claude Fable 5.1 <[email protected]>
This commit is contained in:
1 parent
b21d87243e
commit
08aad594f0
103 files changed
+227
-3463
No files matched your search
@@ -1,4 +1,3 @@
|
||||
import * as NodeOS from "node:os";
|
||||
import * as Context from "effect/Context";
|
||||
import * as Effect from "effect/Effect";
|
||||
import * as FileSystem from "effect/FileSystem";
|
||||
@@ -20,6 +19,7 @@ import {
|
||||
} from "@t3tools/contracts";
|
||||
|
||||
import { ServerConfig } from "../config.ts";
|
||||
import { expandHomePathWith } from "../pathExpansion.ts";
|
||||
import * as GitVcsDriver from "../vcs/GitVcsDriver.ts";
|
||||
import * as SourceControlProviderRegistry from "./SourceControlProviderRegistry.ts";
|
||||
const isSourceControlRepositoryError = Schema.is(SourceControlRepositoryError);
|
||||
@@ -77,16 +77,6 @@ function selectRemoteUrl(
|
||||
}
|
||||
}
|
||||
|
||||
function expandHomePath(input: string, path: Path.Path): string {
|
||||
if (input === "~") {
|
||||
return NodeOS.homedir();
|
||||
}
|
||||
if (input.startsWith("~/") || input.startsWith("~\\")) {
|
||||
return path.join(NodeOS.homedir(), input.slice(2));
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
export const make = Effect.gen(function* () {
|
||||
const config = yield* ServerConfig;
|
||||
const fileSystem = yield* FileSystem.FileSystem;
|
||||
@@ -137,7 +127,7 @@ export const make = Effect.gen(function* () {
|
||||
});
|
||||
}
|
||||
|
||||
return path.resolve(expandHomePath(trimmed, path));
|
||||
return path.resolve(expandHomePathWith(trimmed, path));
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user