code: function getFlatFiles(mfsData, output, getAssetPermissions, curBase = "") {
    for (const path of Object.keys(mfsData)) {
      const item = mfsData[path];
      const curPath = `${curBase}/${path}`;
      // directory
      if (item[""] === true) getFlatFiles(item, output, getAssetPermissions, curPath);
      // file
      else if (!curPath.endsWith("/")) {
        output[curPath.substr(1)] = {
          source: mfsData[path],
          permissions: getAssetPermissions(curPath.substr(1))
        };
      }
    }
  }
docs: this could be rewritten with actual FS apis / globs, but this is simpler