@veloxts/cli 0.6.102 → 0.6.104

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,29 @@
1
1
  # @veloxts/cli
2
2
 
3
+ ## 0.6.104
4
+
5
+ ### Patch Changes
6
+
7
+ - feat(client): smart convention-based route inference, eliminate routes.ts
8
+ - Updated dependencies
9
+ - @veloxts/auth@0.6.104
10
+ - @veloxts/core@0.6.104
11
+ - @veloxts/orm@0.6.104
12
+ - @veloxts/router@0.6.104
13
+ - @veloxts/validation@0.6.104
14
+
15
+ ## 0.6.103
16
+
17
+ ### Patch Changes
18
+
19
+ - chore(deps): upgrade Zod from v3 to v4
20
+ - Updated dependencies
21
+ - @veloxts/auth@0.6.103
22
+ - @veloxts/core@0.6.103
23
+ - @veloxts/orm@0.6.103
24
+ - @veloxts/router@0.6.103
25
+ - @veloxts/validation@0.6.103
26
+
3
27
  ## 0.6.102
4
28
 
5
29
  ### Patch Changes
@@ -56,7 +56,7 @@ export const FIELD_TYPES = [
56
56
  label: 'JSON',
57
57
  description: 'JSON data',
58
58
  prismaType: 'Json',
59
- zodSchema: 'z.record(z.unknown())',
59
+ zodSchema: 'z.record(z.string(), z.unknown())',
60
60
  },
61
61
  {
62
62
  type: 'enum',
@@ -138,7 +138,9 @@ export const submit${entity.pascal}Form = createFormAction(async (formData, ctx)
138
138
  if (!result.success) {
139
139
  return {
140
140
  success: false,
141
- errors: result.error.flatten().fieldErrors,
141
+ errors: Object.fromEntries(
142
+ result.error.issues.map(i => [i.path.join('.') || '_root', i.message])
143
+ ),
142
144
  };
143
145
  }
144
146
 
@@ -404,7 +404,7 @@ export const ${entity.camel}Procedures = procedures('${entity.plural}', {
404
404
  * PUT /${entity.plural}/:id
405
405
  */
406
406
  update${entity.pascal}: procedure()
407
- .input(z.object({ id: z.string().uuid() }).merge(Update${entity.pascal}Input))
407
+ .input(z.object({ id: z.string().uuid() }).extend(Update${entity.pascal}Input.shape))
408
408
  .output(${entity.pascal}Schema)
409
409
  .mutation(async ({ input, ctx }) => {
410
410
  const { id, ...data } = input;
@@ -420,7 +420,7 @@ export const ${entity.camel}Procedures = procedures('${entity.plural}', {
420
420
  * PATCH /${entity.plural}/:id
421
421
  */
422
422
  patch${entity.pascal}: procedure()
423
- .input(z.object({ id: z.string().uuid() }).merge(Update${entity.pascal}Input))
423
+ .input(z.object({ id: z.string().uuid() }).extend(Update${entity.pascal}Input.shape))
424
424
  .output(${entity.pascal}Schema)
425
425
  .mutation(async ({ input, ctx }) => {
426
426
  const { id, ...data } = input;
@@ -140,7 +140,7 @@ export const ${entity.camel}Procedures = procedures('${entity.plural}', {
140
140
  * PUT /${entity.plural}/:id
141
141
  */
142
142
  update${entity.pascal}: procedure()
143
- .input(z.object({ id: z.string().uuid() }).merge(Update${entity.pascal}Input))
143
+ .input(z.object({ id: z.string().uuid() }).extend(Update${entity.pascal}Input.shape))
144
144
  .output(${entity.pascal}Schema)
145
145
  .mutation(async ({ input, ctx }) => {
146
146
  const { id, ...data } = input;
@@ -181,7 +181,7 @@ export const ${entity.camel}Procedures = procedures('${entity.plural}', {
181
181
  * PUT /${entity.plural}/:id
182
182
  */
183
183
  update${entity.pascal}: procedure()
184
- .input(z.object({ id: z.string().uuid() }).merge(Update${entity.pascal}Input))
184
+ .input(z.object({ id: z.string().uuid() }).extend(Update${entity.pascal}Input.shape))
185
185
  .output(${entity.pascal}Schema)
186
186
  .mutation(async ({ input, ctx }) => {
187
187
  const { id, ...data } = input;
@@ -197,7 +197,7 @@ export const ${entity.camel}Procedures = procedures('${entity.plural}', {
197
197
  * PATCH /${entity.plural}/:id
198
198
  */
199
199
  patch${entity.pascal}: procedure()
200
- .input(z.object({ id: z.string().uuid() }).merge(Update${entity.pascal}Input))
200
+ .input(z.object({ id: z.string().uuid() }).extend(Update${entity.pascal}Input.shape))
201
201
  .output(${entity.pascal}Schema)
202
202
  .mutation(async ({ input, ctx }) => {
203
203
  const { id, ...data } = input;
@@ -478,7 +478,7 @@ ${paginationCode}
478
478
  * PUT /api/${kebab}s/:id
479
479
  */
480
480
  update${pascal}: procedure
481
- .input(${camel}IdParamSchema.merge(update${pascal}InputSchema))
481
+ .input(${camel}IdParamSchema.extend(update${pascal}InputSchema.shape))
482
482
  .output(${camel}Schema)
483
483
  .mutation(async ({ input, ctx }) => {
484
484
  const { id, ...data } = input;
@@ -493,7 +493,7 @@ ${paginationCode}
493
493
  * PATCH /api/${kebab}s/:id
494
494
  */
495
495
  patch${pascal}: procedure
496
- .input(${camel}IdParamSchema.merge(patch${pascal}InputSchema))
496
+ .input(${camel}IdParamSchema.extend(patch${pascal}InputSchema.shape))
497
497
  .output(${camel}Schema)
498
498
  .mutation(async ({ input, ctx }) => {
499
499
  const { id, ...data } = input;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/cli",
3
- "version": "0.6.102",
3
+ "version": "0.6.104",
4
4
  "description": "Developer tooling and CLI commands for VeloxTS framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -41,11 +41,11 @@
41
41
  "pluralize": "8.0.0",
42
42
  "tsx": "4.21.0",
43
43
  "yaml": "2.8.2",
44
- "@veloxts/auth": "0.6.102",
45
- "@veloxts/core": "0.6.102",
46
- "@veloxts/router": "0.6.102",
47
- "@veloxts/validation": "0.6.102",
48
- "@veloxts/orm": "0.6.102"
44
+ "@veloxts/auth": "0.6.104",
45
+ "@veloxts/core": "0.6.104",
46
+ "@veloxts/orm": "0.6.104",
47
+ "@veloxts/router": "0.6.104",
48
+ "@veloxts/validation": "0.6.104"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@prisma/client": ">=7.0.0"