Skip to content

The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.

768 B
Raw Blame
import { getConfig } from "@/src/utils/get-config";
import { getProjectInfo } from "@/src/utils/get-project-info";
import { handleError } from "@/src/utils/handle-error";
import { logger } from "@/src/utils/logger";
import { Command } from "commander";

export const info = new Command()
  .name("info")
  .description("get information about your project")
  .option(
    "-c, --cwd <cwd>",
    "the working directory. defaults to the current directory.",
    process.cwd()
  )
  .action(async (opts) => {
    try {
      logger.info("> project info");
      console.log(await getProjectInfo(opts.cwd));
      logger.break();
      logger.info("> blocks.json");
      console.log(await getConfig(opts.cwd));
    } catch (error) {
      handleError(error);
    }
  });