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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # create-velox-app
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - feat(router): new simplified procedure builder
8
+
3
9
  ## 0.7.9
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # create-velox-app
2
2
 
3
- > **Early Access (v0.7.x)**
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-velox-app",
3
- "version": "0.7.9",
3
+ "version": "0.8.0",
4
4
  "description": "Project scaffolder for VeloxTS framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -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 procedure-level auto-projection: .expose(Schema.authenticated)
8
+ * Uses .guard(authenticated) + .output(Schema.authenticated)
9
9
  */
10
10
 
11
11
  import {
12
- authenticatedNarrow,
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
- .expose(UserProfileSchema.public)
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
- // Procedure-level auto-projection: .expose(Schema.authenticated) auto-projects the return value
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
- .guardNarrow(authenticatedNarrow)
51
+ .guard(authenticated)
52
52
  .input(z.object({ id: z.string().uuid() }))
53
- .expose(UserProfileSchema.authenticated)
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`);