create-velox-app 0.7.9 → 0.8.0
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 +6 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/templates/source/api/procedures/profiles.auth.ts +6 -6
- package/src/templates/source/root/CLAUDE.auth.md +82 -660
- package/src/templates/source/root/CLAUDE.default.md +56 -495
- package/src/templates/source/root/CLAUDE.trpc.md +40 -401
- package/src/templates/source/rsc/CLAUDE.md +61 -270
- package/src/templates/source/rsc-auth/CLAUDE.md +85 -407
- package/src/templates/source/rsc-auth/src/api/procedures/profiles.ts +6 -6
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# create-velox-app
|
|
2
2
|
|
|
3
|
-
> **Early Access (v0.
|
|
3
|
+
> **Early Access (v0.8.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
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* - Public: GET /api/profiles/:id → { id, name }
|
|
6
6
|
* Uses handler-level projection: resource(data, Schema.public)
|
|
7
7
|
* - Authenticated: GET /api/profiles/:id/full → { id, name, email }
|
|
8
|
-
* Uses
|
|
8
|
+
* Uses .guard(authenticated) + .output(Schema.authenticated)
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import {
|
|
12
|
-
|
|
12
|
+
authenticated,
|
|
13
13
|
NotFoundError,
|
|
14
14
|
procedure,
|
|
15
15
|
procedures,
|
|
@@ -37,7 +37,7 @@ export const profileProcedures = procedures('profiles', {
|
|
|
37
37
|
// Handler-level projection: resource(data, Schema.public) returns projected data directly
|
|
38
38
|
getProfile: procedure()
|
|
39
39
|
.input(z.object({ id: z.string().uuid() }))
|
|
40
|
-
.
|
|
40
|
+
.output(UserProfileSchema.public)
|
|
41
41
|
.query(async ({ input, ctx }) => {
|
|
42
42
|
const user = await ctx.db.user.findUnique({ where: { id: input.id } });
|
|
43
43
|
if (!user) throw new NotFoundError(`User '${input.id}' not found`);
|
|
@@ -45,12 +45,12 @@ export const profileProcedures = procedures('profiles', {
|
|
|
45
45
|
}),
|
|
46
46
|
|
|
47
47
|
// Authenticated: GET /api/profiles/:id/full → { id, name, email }
|
|
48
|
-
//
|
|
48
|
+
// Uses .guard(authenticated) + .output(Schema.authenticated) for field-level visibility
|
|
49
49
|
getFullProfile: procedure()
|
|
50
50
|
.rest({ method: 'GET', path: '/profiles/:id/full' })
|
|
51
|
-
.
|
|
51
|
+
.guard(authenticated)
|
|
52
52
|
.input(z.object({ id: z.string().uuid() }))
|
|
53
|
-
.
|
|
53
|
+
.output(UserProfileSchema.authenticated)
|
|
54
54
|
.query(async ({ input, ctx }) => {
|
|
55
55
|
const user = await ctx.db.user.findUnique({ where: { id: input.id } });
|
|
56
56
|
if (!user) throw new NotFoundError(`User '${input.id}' not found`);
|