From e020594ce6ffb2a88c221d34b17329806c0a31e9 Mon Sep 17 00:00:00 2001 From: Aleksandra Date: Fri, 3 Dec 2021 13:59:52 +0100 Subject: [PATCH] update commands flags --- packages/cli/src/commands/db.ts | 4 ++++ packages/cli/src/commands/prisma.ts | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/commands/db.ts b/packages/cli/src/commands/db.ts index e02da6ccf3..2e1fcc6b0d 100644 --- a/packages/cli/src/commands/db.ts +++ b/packages/cli/src/commands/db.ts @@ -69,6 +69,10 @@ ${require("chalk").bold("seed")} Generates seeded data in database via Prisma. char: "f", description: `Path to the seeds file, relative to the project root folder. Examples: db/seeds, db/seeds.ts, db/seeds/index.ts, db/my-seeds`, }), + env: flags.string({ + char: "e", + description: "Set app environment name", + }), } static strict = false diff --git a/packages/cli/src/commands/prisma.ts b/packages/cli/src/commands/prisma.ts index 4a42a2e26c..dd59668a55 100644 --- a/packages/cli/src/commands/prisma.ts +++ b/packages/cli/src/commands/prisma.ts @@ -1,4 +1,4 @@ -import {Command} from "@oclif/command" +import {Command, flags} from "@oclif/command" import {Readable} from "stream" const getPrismaBin = async () => { @@ -55,6 +55,13 @@ export class PrismaCommand extends Command { static description = "Loads env variables then proxies all args to Prisma CLI" static aliases = ["p"] + static flags = { + env: flags.string({ + char: "e", + description: "Set app environment name", + }), + } + static strict = false async run() {