| 176 | } |
| 177 | }); |
| 178 | |
| 179 | async function parseSdkData() { |
| 180 | const cfgData = await fs.readFile("sdk.cfg"); |
| 181 | const cfgLines = cfgData.toString().split("\n"); |
| 182 | |
| 183 | const sdkData = {}; |
| 184 | |
| 185 | for (let line of cfgLines) { |
| 186 | line = line.trim(); |
| 187 | if (line.startsWith("#") || line == "") { |
| 188 | continue; |
| 189 | } |
| 190 | |
| 191 | // Parse the line |
| 192 | const parts = line.split(","); |
| 193 | |
| 194 | //get and remove the item at 0 |
| 195 | const packageName = parts.shift(); |
| 196 | const clientName = parts.shift(); |
| 197 | |
| 198 | //get and remove the last item |
| 199 | const fullSdkOnly = parts.pop() == 1; |
| 200 | |
| 201 | const endpoints = parts; |
| 202 | |
| 203 | // Log or store parsed information |
| 204 | sdkData[packageName] = [clientName, endpoints, fullSdkOnly]; |
| 205 | } |
| 206 | return sdkData; |
| 207 | } |
| 208 | |
| 209 | function resolveDefaultsModeConfigWrapper(config) { |