(runtime: string, parseOpt: ParseParam)
| 136 | } |
| 137 | |
| 138 | function parseRuntime(runtime: string, parseOpt: ParseParam): Runtime | undefined { |
| 139 | const matches = runtime.match(/(?<name>[a-zA-Z]+)?-?(?<version>[\d+.?]+)/); |
| 140 | if (matches?.groups) { |
| 141 | const name = matches.groups['name'] |
| 142 | const version = parseVersion(matches.groups['version'], parseOpt) |
| 143 | return { |
| 144 | ...name && { name }, |
| 145 | version |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | parseOpt.errorCallback('runtime', runtime, parseOpt.primaryKey); |
| 150 | return undefined; |
| 151 | } |
| 152 | |
| 153 | function parseRaw(raw: string, parseOpt: ParseParam): ClientDetail | undefined { |
| 154 | const tokenize = raw.split('/') |
no test coverage detected