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

Commit

Permalink
v1.3.2 (hotfix)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisCates committed Mar 20, 2023
1 parent 3c8c764 commit d8ec005
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 43 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 🛠️ CHANGELOG

## v1.3.2

- Updates prisma type generation nomenclature (hotfix)

## v1.3.1

- `superagent` command hotfix
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-1.3.1-blue.svg)
![version](https://img.shields.io/badge/version-1.3.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/generators/superagent.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.

34 changes: 17 additions & 17 deletions dist/src/templates/superagent.template
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
const [loading, setLoading] = useState(false)
const [error, setError] = useState(false)
const [errorMessage, setErrorMessage] = useState('')
const [loading, setLoading] = useState(false)
const [error, setError] = useState(false)
const [errorMessage, setErrorMessage] = useState('')

async function {{type}}Request() {
setLoading(true)
setError(false)
try {
const payload = await {{type}}('/api/url')
} catch (error) {
console.error(error)
setError(true)
setErrorMessage('Something went wrong...')
async function {{type}}Request() {
setLoading(true)
setError(false)
try {
const payload = await {{type}}('/api/url')
} catch (error) {
console.error(error)
setError(true)
setErrorMessage('Something went wrong...')
}
setLoading(false)
}
setLoading(false)
}

useEffect(() => {
{{type}}Request()
}, [loading])
useEffect(() => {
{{type}}Request()
}, [loading])
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@printerframework/cli",
"description": "🖨️ Automation Tooling for Next, Redux and Prisma.",
"version": "1.3.1",
"version": "1.3.2",
"private": false,
"preferGlobal": true,
"repository": "https:/PrinterFramework/CLI.git",
Expand Down Expand Up @@ -46,4 +46,4 @@
"fs-jetpack": "^4.3.0",
"prompts": "^2.4.2"
}
}
}
2 changes: 1 addition & 1 deletion src/generators/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export async function generatePrismaTypes () {
}

const dataMap = formatModel(models)
let typeFile = `export interface ${name} {{{injection}}}` + '\n\n' + `export default ${name}` + '\n'
let typeFile = `export interface ${name}Type {{{injection}}}` + '\n\n' + `export default ${name}Type` + '\n'
let typeInject = ''

for (const item of dataMap) {
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('1.3.1')
.version('1.3.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
34 changes: 17 additions & 17 deletions src/templates/superagent.template
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
const [loading, setLoading] = useState(false)
const [error, setError] = useState(false)
const [errorMessage, setErrorMessage] = useState('')
const [loading, setLoading] = useState(false)
const [error, setError] = useState(false)
const [errorMessage, setErrorMessage] = useState('')

async function {{type}}Request() {
setLoading(true)
setError(false)
try {
const payload = await {{type}}('/api/url')
} catch (error) {
console.error(error)
setError(true)
setErrorMessage('Something went wrong...')
async function {{type}}Request() {
setLoading(true)
setError(false)
try {
const payload = await {{type}}('/api/url')
} catch (error) {
console.error(error)
setError(true)
setErrorMessage('Something went wrong...')
}
setLoading(false)
}
setLoading(false)
}

useEffect(() => {
{{type}}Request()
}, [loading])
useEffect(() => {
{{type}}Request()
}, [loading])

0 comments on commit d8ec005

Please sign in to comment.