-
Notifications
You must be signed in to change notification settings - Fork 30
fix: @id always optional for default values #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jsbrain
wants to merge
9
commits into
adeyahya:master
Choose a base branch
from
jsbrain:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5839caf
fix: @id always optional for default values
jsbrain 7c87376
fix: @id always optional for default values
jsbrain 956ddba
fix: @id always optional for default values
jsbrain f669cc9
feat: job creation via api
jsbrain 79f8718
feat: add option to exclude relations
jsbrain 9c730a1
chore: update deps
jsbrain 596b4f7
chore: update readme
jsbrain a835170
feat: add prefix option
jsbrain 404fb17
fix: enum imports
jsbrain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "prisma-typebox-generator", | ||
"version": "2.0.2", | ||
"name": "jsbrain-prisma-typebox-generator", | ||
"version": "2.0.6", | ||
"main": "dist/index.js", | ||
"license": "MIT", | ||
"files": [ | ||
|
@@ -20,44 +20,44 @@ | |
"typebox", | ||
"typebox-generator" | ||
], | ||
"homepage": "https://github.com/adeyahya/prisma-typebox-generator", | ||
"homepage": "https://github.com/jsbrain/prisma-typebox-generator", | ||
"repository": { | ||
"url": "https://github.com/adeyahya/prisma-typebox-generator.git" | ||
"url": "https://github.com/jsbrain/prisma-typebox-generator.git" | ||
}, | ||
"bugs": { | ||
"email": "[email protected]", | ||
"url": "https://github.com/adeyahya/prisma-typebox-generator/issues" | ||
"url": "https://github.com/jsbrain/prisma-typebox-generator/issues" | ||
}, | ||
"dependencies": { | ||
"@prisma/generator-helper": "^2.20.1", | ||
"@prisma/sdk": "^2.20.1", | ||
"@prisma/generator-helper": "^4.5.0", | ||
"@prisma/sdk": "^4.0.0", | ||
"core-js": "3.10.0", | ||
"prettier": "^2.3.0" | ||
"prettier": "^2.7.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.13.14", | ||
"@babel/core": "^7.13.14", | ||
"@babel/preset-env": "^7.13.12", | ||
"@babel/preset-typescript": "^7.13.0", | ||
"@prisma/client": "^2.20.1", | ||
"@prisma/client": "^4.5.0", | ||
"@semantic-release/changelog": "^5.0.1", | ||
"@semantic-release/commit-analyzer": "^8.0.1", | ||
"@semantic-release/git": "^9.0.0", | ||
"@semantic-release/github": "^7.2.0", | ||
"@semantic-release/npm": "^7.1.0", | ||
"@semantic-release/release-notes-generator": "^9.0.2", | ||
"@sinclair/typebox": "^0.16.7", | ||
"@sinclair/typebox": "^0.25.2", | ||
"@types/jest": "26.0.22", | ||
"@types/node": "^14.14.37", | ||
"ajv": "^8.0.5", | ||
"ajv-formats": "^2.0.2", | ||
"ajv": "^8.11.0", | ||
"ajv-formats": "^2.1.1", | ||
"babel-jest": "^26.6.3", | ||
"jest": "26.6.3", | ||
"prisma": "^2.20.1", | ||
"prisma": "^4.5.0", | ||
"semantic-release": "^17.4.2", | ||
"ts-jest": "^26.5.4", | ||
"ts-node": "^9.1.1", | ||
"typescript": "^4.2.3" | ||
"typescript": "^4.8.4" | ||
}, | ||
"scripts": { | ||
"generate": "prisma generate", | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,9 @@ | ||
import { Type, Static } from "@sinclair/typebox"; | ||
import { Role } from "./Role"; | ||
import { tbx_Role } from "./Role"; | ||
|
||
export const Post = Type.Object({ | ||
export const tbx_Post = Type.Object({ | ||
id: Type.Number(), | ||
user: Type.Optional( | ||
Type.Object({ | ||
id: Type.Number(), | ||
createdAt: Type.Optional(Type.String()), | ||
email: Type.String(), | ||
weight: Type.Optional(Type.Number()), | ||
is18: Type.Optional(Type.Boolean()), | ||
name: Type.Optional(Type.String()), | ||
successorId: Type.Optional(Type.Number()), | ||
role: Type.Optional(Role), | ||
keywords: Type.Array(Type.String()), | ||
biography: Type.String(), | ||
decimal: Type.Number(), | ||
biginteger: Type.Integer(), | ||
}) | ||
), | ||
userId: Type.Optional(Type.Number()), | ||
}); | ||
|
||
export type PostType = Static<typeof Post>; | ||
export type tbx_PostType = Static<typeof tbx_Post>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,9 @@ | ||
import { Type, Static } from "@sinclair/typebox"; | ||
import { Role } from "./Role"; | ||
import { tbx_Role } from "./Role"; | ||
|
||
export const PostInput = Type.Object({ | ||
export const tbx_PostInput = Type.Object({ | ||
id: Type.Optional(Type.Number()), | ||
user: Type.Optional( | ||
Type.Object({ | ||
id: Type.Optional(Type.Number()), | ||
createdAt: Type.Optional(Type.String()), | ||
email: Type.String(), | ||
weight: Type.Optional(Type.Number()), | ||
is18: Type.Optional(Type.Boolean()), | ||
name: Type.Optional(Type.String()), | ||
successorId: Type.Optional(Type.Number()), | ||
role: Type.Optional(Role), | ||
keywords: Type.Array(Type.String()), | ||
biography: Type.String(), | ||
decimal: Type.Number(), | ||
biginteger: Type.Integer(), | ||
}) | ||
), | ||
userId: Type.Optional(Type.Number()), | ||
}); | ||
|
||
export type PostInputType = Static<typeof PostInput>; | ||
export type tbx_PostInputType = Static<typeof tbx_PostInput>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Type, Static } from "@sinclair/typebox"; | ||
|
||
export const RoleConst = { | ||
export const tbx_RoleConst = { | ||
USER: Type.Literal("USER"), | ||
ADMIN: Type.Literal("ADMIN"), | ||
}; | ||
|
||
export const Role = Type.KeyOf(Type.Object(RoleConst)); | ||
export const tbx_Role = Type.KeyOf(Type.Object(tbx_RoleConst)); | ||
|
||
export type RoleType = Static<typeof Role>; | ||
export type tbx_RoleType = Static<typeof tbx_Role>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,19 @@ | ||
import { Type, Static } from "@sinclair/typebox"; | ||
import { Role } from "./Role"; | ||
import { tbx_Role } from "./Role"; | ||
|
||
export const User = Type.Object({ | ||
export const tbx_User = Type.Object({ | ||
id: Type.Number(), | ||
createdAt: Type.Optional(Type.String()), | ||
email: Type.String(), | ||
weight: Type.Optional(Type.Number()), | ||
is18: Type.Optional(Type.Boolean()), | ||
name: Type.Optional(Type.String()), | ||
successorId: Type.Optional(Type.Number()), | ||
role: Type.Optional(Role), | ||
posts: Type.Array( | ||
Type.Object({ | ||
id: Type.Number(), | ||
userId: Type.Optional(Type.Number()), | ||
}) | ||
), | ||
role: Type.Optional(tbx_Role), | ||
keywords: Type.Array(Type.String()), | ||
biography: Type.String(), | ||
decimal: Type.Number(), | ||
biginteger: Type.Integer(), | ||
}); | ||
|
||
export type UserType = Static<typeof User>; | ||
export type tbx_UserType = Static<typeof tbx_User>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,19 @@ | ||
import { Type, Static } from "@sinclair/typebox"; | ||
import { Role } from "./Role"; | ||
import { tbx_Role } from "./Role"; | ||
|
||
export const UserInput = Type.Object({ | ||
export const tbx_UserInput = Type.Object({ | ||
id: Type.Optional(Type.Number()), | ||
createdAt: Type.Optional(Type.String()), | ||
email: Type.String(), | ||
weight: Type.Optional(Type.Number()), | ||
is18: Type.Optional(Type.Boolean()), | ||
name: Type.Optional(Type.String()), | ||
successorId: Type.Optional(Type.Number()), | ||
role: Type.Optional(Role), | ||
posts: Type.Array( | ||
Type.Object({ | ||
id: Type.Optional(Type.Number()), | ||
userId: Type.Optional(Type.Number()), | ||
}) | ||
), | ||
role: Type.Optional(tbx_Role), | ||
keywords: Type.Array(Type.String()), | ||
biography: Type.String(), | ||
decimal: Type.Number(), | ||
biginteger: Type.Integer(), | ||
}); | ||
|
||
export type UserInputType = Static<typeof UserInput>; | ||
export type tbx_UserInputType = Static<typeof tbx_UserInput>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export * from './User'; | ||
export * from './Post'; | ||
export * from './UserInput'; | ||
export * from './PostInput'; | ||
export * from './Role'; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please dont change this unless you want to fork it and create different distribution