repo-root.mjs
sha256:8915fe406161f95c1681f9469375e7bae5b28c884f00bedbdef65e4b0cd0738d
docs(flow): commit FLOW-V0-SPEC.md hygiene for 7A-INT merge
Human
13 hours ago
| 1 | /** |
| 2 | * Repo root for path resolution. On Netlify/AWS Lambda, bundled code may have a broken |
| 3 | * import.meta.url; cwd is the function bundle root and matches hub/bridge serverless handling. |
| 4 | */ |
| 5 | import path from 'path'; |
| 6 | import { fileURLToPath } from 'url'; |
| 7 | |
| 8 | export function getRepoRoot() { |
| 9 | if (process.env.AWS_LAMBDA_FUNCTION_NAME || process.env.NETLIFY) { |
| 10 | return process.cwd(); |
| 11 | } |
| 12 | const here = path.dirname(fileURLToPath(import.meta.url)); |
| 13 | return path.resolve(here, '..'); |
| 14 | } |
File History
1 commit
sha256:8915fe406161f95c1681f9469375e7bae5b28c884f00bedbdef65e4b0cd0738d
docs(flow): commit FLOW-V0-SPEC.md hygiene for 7A-INT merge
Human
13 hours ago