* Parses an extension * * @param extFilePath Path to the Extension Manifest (package.json) * @param type System or User extension * @returns Fully formed Extension
(extFilePath: string, type: ExtensionType)
| 135 | * @returns Fully formed Extension |
| 136 | */ |
| 137 | async function parseExtension(extFilePath: string, type: ExtensionType): Promise<IExtension> { |
| 138 | const data = await readJsonFile(extFilePath); |
| 139 | const manifest = await parseExtensionManifest(data); |
| 140 | return { |
| 141 | id: getExtensionID(manifest.author, manifest.name), |
| 142 | type: type, |
| 143 | manifest: manifest, |
| 144 | extensionPath: path.resolve(path.dirname(extFilePath)) |
| 145 | }; |
| 146 | } |
| 147 | |
| 148 | /** |
| 149 | * Parses the manifest file |
no test coverage detected