* Get the platform-specific MDM configuration file path
()
| 141 | * Get the platform-specific MDM configuration file path |
| 142 | */ |
| 143 | private getMdmConfigPath(): string { |
| 144 | const platform = os.platform() |
| 145 | const isProduction = getClerkBaseUrl() === PRODUCTION_CLERK_BASE_URL |
| 146 | const configFileName = isProduction ? "mdm.json" : "mdm.dev.json" |
| 147 | |
| 148 | switch (platform) { |
| 149 | case "win32": { |
| 150 | // Windows: %ProgramData%\RooCode\mdm.json or mdm.dev.json |
| 151 | const programData = process.env.PROGRAMDATA || "C:\\ProgramData" |
| 152 | return path.join(programData, "RooCode", configFileName) |
| 153 | } |
| 154 | |
| 155 | case "darwin": |
| 156 | // macOS: /Library/Application Support/RooCode/mdm.json or mdm.dev.json |
| 157 | return `/Library/Application Support/RooCode/${configFileName}` |
| 158 | |
| 159 | case "linux": |
| 160 | default: |
| 161 | // Linux: /etc/roo-code/mdm.json or mdm.dev.json |
| 162 | return `/etc/roo-code/${configFileName}` |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | /** |
| 167 | * Get the singleton instance |
no test coverage detected