@strapi/strapi
Version:
An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite
29 lines (26 loc) • 686 B
JavaScript
import path from 'path';
import readPkgUp from 'read-pkg-up';
/**
* Load information about the strapi CMS monorepo (if applicable)
*
* @internal
*/ async function loadStrapiMonorepo(cwd) {
let p = cwd;
while(p !== '/'){
const readResult = await readPkgUp({
cwd: p
});
if (!readResult) {
return undefined;
}
if (readResult.packageJson.isStrapiMonorepo) {
return {
path: path.dirname(readResult.path)
};
}
p = path.dirname(path.dirname(readResult.path));
}
return undefined;
}
export { loadStrapiMonorepo };
//# sourceMappingURL=monorepo.mjs.map