@omnifyjp/ts 7.3.0 → 7.3.1

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.
@@ -80,9 +80,7 @@ function generateFileResourceUser(config) {
80
80
  */
81
81
 
82
82
  namespace ${resourceNamespace};
83
-
84
- use ${baseNamespace}\\FileResourceBase;
85
-
83
+ ${baseNamespace === resourceNamespace ? '' : `\nuse ${baseNamespace}\\FileResourceBase;\n`}
86
84
  /**
87
85
  * FileResource — add project-specific serialization here.
88
86
  */
@@ -190,6 +190,7 @@ function generateBaseModel(name, schema, reader, config) {
190
190
  * The database connection for the model.
191
191
  */
192
192
  protected $connection = '${connectionName}';
193
+
193
194
  `
194
195
  : '';
195
196
  const isAuthenticatable = options['authenticatable'] ?? false;
@@ -312,8 +313,7 @@ namespace ${baseNamespace};
312
313
  ${imports}
313
314
  /**
314
315
  * ${modelName}BaseModel
315
- *
316
- ${docProperties} */
316
+ ${docProperties ? ` *\n${docProperties}` : ''} */
317
317
  class ${modelName}BaseModel extends ${baseClass}${implementsClause}
318
318
  {
319
319
  ${traits}${connectionSection} /**
@@ -1071,6 +1071,7 @@ function buildInverseRelations(parentName, modelNamespace, reader, declaredMetho
1071
1071
  methods.push(`
1072
1072
  /**
1073
1073
  * Auto-generated inverse of ${childName}.${childPropName} (${relation}).
1074
+ *
1074
1075
  * @return ${returnType}<${fqcn}, $this>
1075
1076
  */
1076
1077
  public function ${methodName}(): ${returnType}
@@ -66,6 +66,7 @@ function generateTranslationBaseModel(name, translatableFields, enforceLanguageF
66
66
  * The database connection for the model.
67
67
  */
68
68
  protected $connection = '${connectionName}';
69
+
69
70
  `
70
71
  : '';
71
72
  // Issue #98 v5.8.2: consolidate every Translation model under one
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnifyjp/ts",
3
- "version": "7.3.0",
3
+ "version": "7.3.1",
4
4
  "description": "TypeScript model type generator from Omnify schemas.json",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",