@anu8151/adonisjs-blueprint 0.4.3 → 0.4.4

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.
@@ -46,8 +46,9 @@ var ModelGenerator = class extends BaseGenerator {
46
46
  if (!processedAttributes.has("updatedAt")) attributes.push({ line: "@column.dateTime({ autoCreate: true, autoUpdate: true })\ndeclare updatedAt: DateTime" });
47
47
  await this.generateStub("make/model/main.stub", {
48
48
  entity,
49
- attributes,
50
- relationships,
49
+ attributes: attributes.map((a) => a.line).join("\n\n "),
50
+ relationshipsImports: relationships.map((r) => r.importLine).join("\n"),
51
+ relationshipsLines: relationships.map((r) => r.line).join("\n\n "),
51
52
  modelImports,
52
53
  modelSignature
53
54
  }, definition.stub);
@@ -4,16 +4,10 @@
4
4
  })
5
5
  }}}
6
6
  {{{ modelImports }}}
7
- @each(rel in relationships)
8
- {{{ rel.importLine }}}
9
- @end
7
+ {{{ relationshipsImports }}}
10
8
 
11
9
  {{{ modelSignature }}}
12
- @each(attr in attributes)
13
- {{{ attr.line }}}
14
- @end
10
+ {{{ attributes }}}
15
11
 
16
- @each(rel in relationships)
17
- {{{ rel.line }}}
18
- @end
12
+ {{{ relationshipsLines }}}
19
13
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@anu8151/adonisjs-blueprint",
3
3
  "description": "Blueprint for AdonisJS 7",
4
- "version": "0.4.3",
4
+ "version": "0.4.4",
5
5
  "engines": {
6
6
  "node": ">=24.0.0"
7
7
  },
@@ -4,16 +4,10 @@
4
4
  })
5
5
  }}}
6
6
  {{{ modelImports }}}
7
- @each(rel in relationships)
8
- {{{ rel.importLine }}}
9
- @end
7
+ {{{ relationshipsImports }}}
10
8
 
11
9
  {{{ modelSignature }}}
12
- @each(attr in attributes)
13
- {{{ attr.line }}}
14
- @end
10
+ {{{ attributes }}}
15
11
 
16
- @each(rel in relationships)
17
- {{{ rel.line }}}
18
- @end
12
+ {{{ relationshipsLines }}}
19
13
  }