( rootPath: string, source: OpenSpecRootSource, storeId?: string )
| 106 | } |
| 107 | |
| 108 | function makeRoot( |
| 109 | rootPath: string, |
| 110 | source: OpenSpecRootSource, |
| 111 | storeId?: string |
| 112 | ): ResolvedOpenSpecRoot { |
| 113 | return { |
| 114 | path: rootPath, |
| 115 | changesDir: path.join(rootPath, 'openspec', 'changes'), |
| 116 | specsDir: path.join(rootPath, 'openspec', 'specs'), |
| 117 | archiveDir: path.join(rootPath, 'openspec', 'changes', 'archive'), |
| 118 | defaultSchema: 'spec-driven', |
| 119 | source, |
| 120 | ...(storeId ? { storeId } : {}), |
| 121 | }; |
| 122 | } |
| 123 | |
| 124 | function canonicalDirectory(startPath: string): string { |
| 125 | const resolved = path.resolve(startPath); |
no outgoing calls
no test coverage detected