init
This commit is contained in:
commit
ec53fcbe95
1905 changed files with 513762 additions and 0 deletions
12
utils/memory/types.ts
Normal file
12
utils/memory/types.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { feature } from 'bun:bundle'
|
||||
|
||||
export const MEMORY_TYPE_VALUES = [
|
||||
'User',
|
||||
'Project',
|
||||
'Local',
|
||||
'Managed',
|
||||
'AutoMem',
|
||||
...(feature('TEAMMEM') ? (['TeamMem'] as const) : []),
|
||||
] as const
|
||||
|
||||
export type MemoryType = (typeof MEMORY_TYPE_VALUES)[number]
|
||||
8
utils/memory/versions.ts
Normal file
8
utils/memory/versions.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { findGitRoot } from '../git.js'
|
||||
|
||||
// Note: This is used to check git repo status synchronously
|
||||
// Uses findGitRoot which walks the filesystem (no subprocess)
|
||||
// Prefer `dirIsInGitRepo()` for async checks
|
||||
export function projectIsInGitRepo(cwd: string): boolean {
|
||||
return findGitRoot(cwd) !== null
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue