UNPKG

@digicms/cms

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

27 lines (20 loc) 621 B
'use strict'; const tsUtils = require('@strapi/typescript-utils'); const strapi = require('../../index'); module.exports = async function ({ outDir, file, verbose, silent }) { if (verbose && silent) { console.error('You cannot enable verbose and silent flags at the same time, exiting...'); process.exit(1); } const appContext = await strapi.compile(); const app = await strapi(appContext).register(); await tsUtils.generators.generateSchemasDefinitions({ strapi: app, outDir: outDir || appContext.appDir, file, dirs: appContext, verbose, silent, }); app.destroy(); };