@igniter-js/cli 0.1.2 → 0.1.3

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.
@@ -67,7 +67,7 @@ export interface Update{{pascalCase name}}DTO {
67
67
  /**
68
68
  * Query parameters for fetching Category entities
69
69
  */
70
- export interface CategoryQueryParams {
70
+ export interface {{pascalCase name}}QueryParams {
71
71
  /** Current page number for pagination */
72
72
  page?: number;
73
73
  /** Number of items to return per page */
@@ -1,4 +1,3 @@
1
- import { randomUUID } from "crypto";
2
1
  import { igniter } from "@/igniter";
3
2
  import type { {{pascalCase name}}, Create{{pascalCase name}}DTO, Update{{pascalCase name}}DTO, {{pascalCase name}}QueryParams } from "../{{kebabCase name}}.interface";
4
3
 
@@ -37,9 +36,10 @@ export const {{pascalCase name}}FeatureProcedure = igniter.procedure({
37
36
  create: async (input: Create{{pascalCase name}}DTO): Promise<{{pascalCase name}}> => {
38
37
  return context.providers.database.{{camelCase name}}.create({
39
38
  data: {
40
- id: randomUUID(),
41
39
  {{#each fields}}
40
+ {{#unless isRelation}}
42
41
  {{name}}: input.{{name}},
42
+ {{/unless}}
43
43
  {{/each}}
44
44
  }
45
45
  });
@@ -56,9 +56,10 @@ export const {{pascalCase name}}FeatureProcedure = igniter.procedure({
56
56
  where: { id: params.id },
57
57
  data: {
58
58
  {{#each fields}}
59
+ {{#unless isRelation}}
59
60
  {{name}}: params.{{name}},
61
+ {{/unless}}
60
62
  {{/each}}
61
- updatedAt: new Date()
62
63
  }
63
64
  });
64
65
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@igniter-js/cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Igniter CLI for projects using Igniter Framework",
5
5
  "main": "dist/index.js",
6
6
  "homepage": "https://felipebarcelospro.github.io/igniter",