Skip to content

Commit

Permalink
fix(nx-prisma): fix generator option in prisma generate command
Browse files Browse the repository at this point in the history
  • Loading branch information
gperdomor committed Apr 25, 2024
1 parent 59573b4 commit a626413
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
interval: 'monthly'
timezone: 'America/Santiago'
commit-message:
prefix: 'ci'
Expand Down
8 changes: 7 additions & 1 deletion packages/nx-prisma/src/executors/generate/executor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,17 @@ describe('Generate Executor', () => {
const options: GenerateExecutorSchema = {
schema: 'my-schema.schema',
'data-proxy': true,
generator: 'sample-generator',
watch: true,
};
const output = await executor(options, mockContext as ExecutorContext);
expect(
expectCommandToHaveBeenCalled('npx prisma generate', ['--schema=my-schema.schema', '--data-proxy', '--watch'])
expectCommandToHaveBeenCalled('npx prisma generate', [
'--schema=my-schema.schema',
'--data-proxy',
'--generator=sample-generator',
'--watch',
])
);
expect(output.success).toBeTruthy();
});
Expand Down
2 changes: 1 addition & 1 deletion packages/nx-prisma/src/executors/generate/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const getArgs = (options: GenerateExecutorSchema, ctx: ExecutorContext): string[
}

if (generator) {
args.push('--generator=${generator}');
args.push(`--generator=${generator}`);
}

if (options?.watch) {
Expand Down

0 comments on commit a626413

Please sign in to comment.