feat(core): add location-scoped config loading (#29625)

This commit is contained in:
Dax 2026-05-30 00:06:08 -04:00 committed by GitHub
commit 9583e08be4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
89 changed files with 3509 additions and 527 deletions

View file

@ -25,7 +25,6 @@ export type Vcs = typeof Vcs.Type
export class Info extends Schema.Class<Info>("Project.Info")({
id: ID,
vcs: Schema.optional(Vcs),
}) {}
export interface Interface {
@ -105,7 +104,7 @@ export const layer = Layer.effect(
const resolve = Effect.fn("Project.resolve")(function* (input: AbsolutePath) {
const repo = yield* git.find(input)
if (!repo) return { id: ID.global, directory: input, vcs: undefined }
if (!repo) return { id: ID.global, directory: AbsolutePath.make(path.parse(input).root), vcs: undefined }
const previous = yield* cached(repo.store)
const id = (yield* remote(repo)) ?? previous ?? (yield* root(repo))