Skip to content

Commit

Permalink
final changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoalbanese committed Feb 5, 2024
1 parent 7e9cc7e commit aedfd57
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kirimase",
"version": "0.0.51",
"version": "0.0.52",
"description": "A Rails-like CLI for building full-stack Next.js apps faster",
"main": "index.js",
"type": "module",
Expand Down
2 changes: 2 additions & 0 deletions src/commands/generate/generators/model/queries/generators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ const generateDrizzleGetByIdQuery = (schema: Schema, relations: DBField[]) => {
.join("")
: ""
};
if (row === undefined) return {};
const ${tableNameFirstChar} = ${
relations.length > 0
? ` { ...row.${tableNameSingular}, ${relations
Expand Down Expand Up @@ -257,6 +258,7 @@ const generateDrizzleGetByIdWithChildrenQuery = (
.join("")
: ""
};
if (rows.length === 0) return {};
const ${tableNameFirstChar} = rows[0].${tableNameSingular};
${
children.length > 0
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { buildSchema } from "./commands/generate/index.js";
import { addPackage } from "./commands/add/index.js";

const program = new Command();
program.name("kirimase").description("Kirimase CLI").version("0.0.51");
program.name("kirimase").description("Kirimase CLI").version("0.0.52");

addCommonOptions(program.command("init"))
.description("initialise and configure kirimase within directory")
Expand Down

0 comments on commit aedfd57

Please sign in to comment.