UNPKG

radashi-helper

Version:
13 lines (9 loc) 662 B
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/util/getRadashiGroups.ts var _promises = require('fs/promises'); var _path = require('path'); async function getRadashiGroups(env) { const upstreamDir = _path.join.call(void 0, _nullishCoalesce(env.radashiDir, () => ( env.root)), "src"); const existingDirs = await _promises.readdir.call(void 0, upstreamDir, { withFileTypes: true }); return existingDirs.filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name); } exports.getRadashiGroups = getRadashiGroups;