(pkgNameWithVersion: string)
| 76 | * @memberof OnlineAccesser |
| 77 | */ |
| 78 | export function getPkgNameAndVersion(pkgNameWithVersion: string): { [key: string]: any } { |
| 79 | const matches = pkgNameWithVersion.match(/(@[^/]+)$/); |
| 80 | if (!matches) { |
| 81 | return { |
| 82 | name: pkgNameWithVersion, |
| 83 | }; |
| 84 | } |
| 85 | const name = pkgNameWithVersion.replace(matches[0], ''); |
| 86 | return { |
| 87 | version: matches[0].slice(1), |
| 88 | name, |
| 89 | }; |
| 90 | } |
| 91 | |
| 92 | // 将问题转化为本地物料化场景 |
| 93 | export default async function localize(options: IMaterializeOnlineOptions): Promise<{ |
no test coverage detected
searching dependent graphs…