import Parser from './Parser'; import { SoftwarePackage } from '@stencila/schema'; /** * Dockter `Parser` class for Node.js. */ export default class JavascriptParser extends Parser { /** * Parse a folder to detect any `package.json` or `*.js` source code files * and return a `SoftwarePackage` instance */ parse(): Promise; /** * Create a `SoftwarePackage` instance from a Node.js package meta-data object * * Meta-data for a packages dependencies is obtained from https://registry.npmjs.org/ using the * JSON API documented at https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md * and https://github.com/npm/registry/blob/master/docs/REGISTRY-API.md. * Currently we fetch the abbreviated metadata because the full meta data can be very large. * * The column "NodeJS" in https://github.com/codemeta/codemeta/blob/master/crosswalk.csv * is used to translate package meta-data into a `SoftwarePackage` instance. * * @param data Package object */ private createPackage; }