MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / loadMdmConfig

Method loadMdmConfig

src/services/mdm/MdmService.ts:119–138  ·  view source on GitHub ↗

* Load MDM configuration from system location

()

Source from the content-addressed store, hash-verified

117 * Load MDM configuration from system location
118 */
119 private async loadMdmConfig(): Promise<MdmConfig | null> {
120 const configPath = this.getMdmConfigPath()
121
122 try {
123 // Check if file exists
124 if (!fs.existsSync(configPath)) {
125 return null
126 }
127
128 // Read and parse the configuration file
129 const configContent = fs.readFileSync(configPath, "utf-8")
130 const parsedConfig = JSON.parse(configContent)
131
132 // Validate against schema
133 return mdmConfigSchema.parse(parsedConfig)
134 } catch (error) {
135 this.log(`[MDM] Error reading MDM config from ${configPath}:`, error)
136 return null
137 }
138 }
139
140 /**
141 * Get the platform-specific MDM configuration file path

Callers 1

initializeMethod · 0.95

Calls 3

getMdmConfigPathMethod · 0.95
parseMethod · 0.80
logMethod · 0.65

Tested by

no test coverage detected