async function getNodeManifest({
  srcDir, glob
}) {
  let manifest = {
    path: '',
    json: undefined,
  };
  let files;
  if (glob === true) {
    files = await globFiles({ srcDir, glob });
    for (const file of files) {
      if (path.basename(file) === 'package.json' && manifest.json === undefined) {
        manifest.path = file;
        manifest.json = JSON.parse(await fs.promises.readFile(file));
      }
    }
  } else {
    manifest.path = path.resolve(srcDir, 'package.json');
    manifest.json = JSON.parse(await fs.promises.readFile(path.resolve(srcDir, 'package.json')));
  }

  if (manifest.json === undefined) {
    throw new Error('package.json not found in srcDir file glob patterns.');
  }

  return manifest;
}
Get Node manifest.
@async
@function
@param  {object}             options         - node manifest options
@param  {string | string []} options.srcDir  - src dir
@param  {boolean}            options.glob    - glob flag
@returns {Promise.<{path: string, json: object}>}      - Node manifest