create-velox-app 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,10 +1,18 @@
1
1
  # create-velox-app
2
2
 
3
+ ## 0.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - feat(cli): auto-populate Zod schemas from Prisma model fields
8
+
3
9
  ## 0.7.2
4
10
 
5
11
  ### Patch Changes
6
12
 
7
- - chore(auth,core,create,cli,client,orm,mcp,router,validation,web): simplify code for clarity and maintainability
13
+ - simplify code for clarity and maintainability
14
+ - Updated dependencies
15
+ - @veloxts/core@0.7.2
8
16
 
9
17
  ## 0.7.1
10
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-velox-app",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Project scaffolder for VeloxTS framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -133,7 +133,7 @@ export const userProcedures = procedures('users', {
133
133
  getPublicProfile: procedure()
134
134
  .query(async ({ input, ctx }) => {
135
135
  const user = await ctx.db.user.findUnique({ where: { id: input.id } });
136
- return resource(user, UserSchema).forAnonymous();
136
+ return resource(user, UserSchema.public);
137
137
  }),
138
138
 
139
139
  // Authenticated: returns { id, name, email }
@@ -141,7 +141,7 @@ export const userProcedures = procedures('users', {
141
141
  .guard(authenticated)
142
142
  .query(async ({ input, ctx }) => {
143
143
  const user = await ctx.db.user.findUnique({ where: { id: input.id } });
144
- return resource(user, UserSchema).forAuthenticated();
144
+ return resource(user, UserSchema.authenticated);
145
145
  }),
146
146
 
147
147
  // Admin: returns all fields
@@ -149,7 +149,7 @@ export const userProcedures = procedures('users', {
149
149
  .guard(hasRole('admin'))
150
150
  .query(async ({ input, ctx }) => {
151
151
  const user = await ctx.db.user.findUnique({ where: { id: input.id } });
152
- return resource(user, UserSchema).forAdmin();
152
+ return resource(user, UserSchema.admin);
153
153
  }),
154
154
  });
155
155
  ```
@@ -131,7 +131,7 @@ export const userProcedures = procedures('users', {
131
131
  getPublicProfile: procedure()
132
132
  .query(async ({ input, ctx }) => {
133
133
  const user = await ctx.db.user.findUnique({ where: { id: input.id } });
134
- return resource(user, UserSchema).forAnonymous();
134
+ return resource(user, UserSchema.public);
135
135
  }),
136
136
 
137
137
  // Authenticated: returns { id, name, email }
@@ -139,7 +139,7 @@ export const userProcedures = procedures('users', {
139
139
  .guard(authenticated)
140
140
  .query(async ({ input, ctx }) => {
141
141
  const user = await ctx.db.user.findUnique({ where: { id: input.id } });
142
- return resource(user, UserSchema).forAuthenticated();
142
+ return resource(user, UserSchema.authenticated);
143
143
  }),
144
144
  });
145
145
  ```
@@ -153,14 +153,14 @@ export const userProcedures = procedures('users', {
153
153
  publicProfile: procedure()
154
154
  .query(async ({ input, ctx }) => {
155
155
  const user = await ctx.db.user.findUnique({ where: { id: input.id } });
156
- return resource(user, UserSchema).forAnonymous();
156
+ return resource(user, UserSchema.public);
157
157
  }),
158
158
 
159
159
  // Authenticated: returns { id, name, email }
160
160
  profile: procedure()
161
161
  .query(async ({ input, ctx }) => {
162
162
  const user = await ctx.db.user.findUnique({ where: { id: input.id } });
163
- return resource(user, UserSchema).forAuthenticated();
163
+ return resource(user, UserSchema.authenticated);
164
164
  }),
165
165
  });
166
166
  ```