@veloxts/cli 0.6.102 → 0.6.103
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 +12 -0
- package/dist/generators/fields/types.js +1 -1
- package/dist/generators/templates/action.js +3 -1
- package/dist/generators/templates/model.js +2 -2
- package/dist/generators/templates/namespace.js +1 -1
- package/dist/generators/templates/procedure.js +2 -2
- package/dist/generators/templates/resource.js +2 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @veloxts/cli
|
|
2
2
|
|
|
3
|
+
## 0.6.103
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- chore(deps): upgrade Zod from v3 to v4
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @veloxts/auth@0.6.103
|
|
10
|
+
- @veloxts/core@0.6.103
|
|
11
|
+
- @veloxts/orm@0.6.103
|
|
12
|
+
- @veloxts/router@0.6.103
|
|
13
|
+
- @veloxts/validation@0.6.103
|
|
14
|
+
|
|
3
15
|
## 0.6.102
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -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:
|
|
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() }).
|
|
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() }).
|
|
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() }).
|
|
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() }).
|
|
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() }).
|
|
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.
|
|
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.
|
|
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.
|
|
3
|
+
"version": "0.6.103",
|
|
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.
|
|
45
|
-
"@veloxts/core": "0.6.
|
|
46
|
-
"@veloxts/
|
|
47
|
-
"@veloxts/
|
|
48
|
-
"@veloxts/
|
|
44
|
+
"@veloxts/auth": "0.6.103",
|
|
45
|
+
"@veloxts/core": "0.6.103",
|
|
46
|
+
"@veloxts/orm": "0.6.103",
|
|
47
|
+
"@veloxts/router": "0.6.103",
|
|
48
|
+
"@veloxts/validation": "0.6.103"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@prisma/client": ">=7.0.0"
|