create-velox-app 0.6.98 → 0.6.99

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,5 +1,11 @@
1
1
  # create-velox-app
2
2
 
3
+ ## 0.6.99
4
+
5
+ ### Patch Changes
6
+
7
+ - Updates to documentation and mark as beta 0.6.x
8
+
3
9
  ## 0.6.98
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # create-velox-app
2
2
 
3
- > **Early Preview (v0.6.x)** - APIs are stabilizing but may still change. Do not use in production yet.
3
+ > **Beta (v0.6.x)**
4
4
 
5
5
  Interactive project scaffolder for VeloxTS Framework - creates production-ready applications with batteries included. Learn more at [@veloxts/velox](https://www.npmjs.com/package/@veloxts/velox).
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-velox-app",
3
- "version": "0.6.98",
3
+ "version": "0.6.99",
4
4
  "description": "Project scaffolder for VeloxTS framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -232,17 +232,24 @@ export const authProcedures = procedures('auth', {
232
232
  .guard(authenticated)
233
233
  .output(UserResponse)
234
234
  .query(async ({ ctx }) => {
235
- const user = ctx.user;
235
+ if (!ctx.user) {
236
+ throw new AuthError('Not authenticated', 401, 'NOT_AUTHENTICATED');
237
+ }
238
+
239
+ // ctx.user only has id/email from the JWT payload — query the DB for the full profile
240
+ const user = await ctx.db.user.findUnique({
241
+ where: { id: ctx.user.id },
242
+ });
236
243
 
237
244
  if (!user) {
238
- throw new AuthError('Not authenticated', 401, 'NOT_AUTHENTICATED');
245
+ throw new AuthError('User not found', 404, 'USER_NOT_FOUND');
239
246
  }
240
247
 
241
248
  return {
242
249
  id: user.id,
243
250
  name: user.name ?? '',
244
251
  email: user.email,
245
- roles: Array.isArray(user.roles) ? user.roles : ['user'],
252
+ roles: parseUserRoles(user.roles),
246
253
  };
247
254
  }),
248
255
  });