Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
v2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisCates committed Jun 25, 2023
1 parent fd38d3a commit 75b3a6b
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# 🛠️ CHANGELOG

## v2.0.2

- Ensure API routes have `application/json` header

- Fix `printer prisma` `?` error

## v2.0.1

- Fix injectable formatting issues
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Automation Tooling for Next, Redux and Prisma

![license](https://img.shields.io/badge/license-AGPLv3-blue.svg)
![version](https://img.shields.io/badge/version-2.0.0-blue.svg)
![version](https://img.shields.io/badge/version-2.0.2-blue.svg)
[![CircleCI](https://circleci.com/gh/PrinterFramework/CLI.svg?style=svg)](https://circleci.com/gh/PrinterFramework/CLI)
[![codecov](https://codecov.io/gh/PrinterFramework/CLI/branch/master/graph/badge.svg)](https://codecov.io/gh/PrinterFramework/CLI)

Expand Down
2 changes: 1 addition & 1 deletion dist/src/generators/prisma.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/generators/prisma.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/printer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/src/templates/api.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export async function GET(req: NextRequest) {
const res = new NextResponse()
const session = await getSession(req, res)
const { searchParams } = new URL(req.url)
res.headers.set('Content-Type', 'application/json')

try {
return createResponse(
Expand Down
2 changes: 1 addition & 1 deletion src/generators/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function formatModel (models: ModelType[]): ModelType[] {
const names = models.map((item) => item.name.toUpperCase())

for (const model of models) {
const type = model.type.toUpperCase().trim()
const type = model.type.toUpperCase().trim().replaceAll('?', '')
const tm = type.replaceAll('[]', '')
let imported = false
let newType = 'any'
Expand Down
2 changes: 1 addition & 1 deletion src/printer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { SuperagentTypes, injectSupergent } from './generators/superagent'
export const Printer = new Command('🖨️ Printer')

Printer
.version('2.0.1')
.version('2.0.2')
.description('🖨️ Printer: Automation Tooling for Next, Redux and Prisma.')
.option('-a, --no-action', 'do not inject actions', false)
.option('-s, --no-state', 'do not inject state', false)
Expand Down
1 change: 1 addition & 0 deletions src/templates/api.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export async function GET(req: NextRequest) {
const res = new NextResponse()
const session = await getSession(req, res)
const { searchParams } = new URL(req.url)
res.headers.set('Content-Type', 'application/json')

try {
return createResponse(
Expand Down

0 comments on commit 75b3a6b

Please sign in to comment.