( name: string, value: string )
| 168 | } |
| 169 | |
| 170 | function parseEntrypoint( |
| 171 | name: string, |
| 172 | value: string |
| 173 | ): { moduleName: string; variableName: string; filePath: string } { |
| 174 | const match = MODULE_ATTR_RE.exec(value); |
| 175 | if (!match) { |
| 176 | throw subscriberError( |
| 177 | `subscriber "${name}" has invalid entrypoint "${value}". Use "module:object"` |
| 178 | ); |
| 179 | } |
| 180 | |
| 181 | return { |
| 182 | moduleName: match[1], |
| 183 | variableName: match[2], |
| 184 | filePath: `${match[1].replace(/\./g, '/')}.py`, |
| 185 | }; |
| 186 | } |
| 187 | |
| 188 | async function resolveExistingEntrypoint( |
| 189 | workPath: string, |
no test coverage detected