Skip to content

Commit

Permalink
keep the option but hide the help
Browse files Browse the repository at this point in the history
  • Loading branch information
ymc9 committed Dec 8, 2023
1 parent 03a9f00 commit e786a51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/schema/src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export function createProgram() {
`schema file (with extension ${schemaExtensions}). Defaults to "schema.zmodel" unless specified in package.json.`
);

const configOption = new Option('-c, --config [file]', 'config file').hideHelp();
const pmOption = new Option('-p, --package-manager <pm>', 'package manager to use').choices([
'npm',
'yarn',
Expand All @@ -98,6 +99,7 @@ export function createProgram() {
program
.command('init')
.description('Initialize an existing project for ZenStack.')
.addOption(configOption)
.addOption(pmOption)
.addOption(new Option('--prisma <file>', 'location of Prisma schema file to bootstrap from'))
.addOption(new Option('--tag <tag>', 'the NPM package tag to use when installing dependencies'))
Expand All @@ -110,6 +112,7 @@ export function createProgram() {
.description('Run code generation.')
.addOption(schemaOption)
.addOption(new Option('-o, --output <path>', 'default output directory for built-in plugins'))
.addOption(configOption)
.addOption(new Option('--no-default-plugins', 'do not run default plugins'))
.addOption(new Option('--no-compile', 'do not compile the output of built-in plugins'))
.addOption(noVersionCheckOption)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/tests/cli/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import * as fs from 'fs';
import * as tmp from 'tmp';
import { createProgram } from '../../../../packages/schema/src/cli';
import { CliError } from '../../../../packages/schema/src/cli/cli-error';

describe('CLI Config Tests', () => {
let origDir: string;
Expand Down

0 comments on commit e786a51

Please sign in to comment.