@neohm/nh-cli 1.1.1 → 1.1.2

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/README.md CHANGED
@@ -90,13 +90,14 @@ created spreading `baseJobConstants` / `baseEntityConstants` /
90
90
  Generated artifacts extend the `@neohm/nestend` base classes:
91
91
 
92
92
  - Entity → `CommonEntity` (with an empty `attributes` jsonb column)
93
- - DTO → `CommonPayloadDto`
93
+ - DTO → `CommonDataDto`
94
94
  - Data processor → `CommonDataProcessor` (`process()` → `validate()` → `set()`)
95
95
  - Listing processor → `CommonListProcessor` (column allowlist config, `id` default sort). It takes `CommonListFilterDto` directly — no per-list DTO is generated, since paging, sorting, filters and free-text search all live on the base DTO and the filterable columns are declared in the processor's `columns` config.
96
96
 
97
97
  When both a controller and a listing processor are generated, the controller
98
98
  ships with a `POST list` endpoint that runs the listing processor (with
99
99
  `SqlService` injected via the constructor).
100
+
100
101
  - Migration → `MigrationUtility`
101
102
  - Seed → `SeederUtility`
102
103
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neohm/nh-cli",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "nh — Command Line Interface for neohm. NestJS projects",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -1,11 +1,16 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- const { toDotCase, toPascalCase, toKebabCase, toCamelCase } = require('./naming');
3
+ const {
4
+ toDotCase,
5
+ toPascalCase,
6
+ toKebabCase,
7
+ toCamelCase,
8
+ } = require("./naming");
4
9
 
5
10
  /**
6
11
  * Code templates. All generated code imports shared base classes from the
7
12
  * published library `@neohm/nestend` (verified exports: CommonEntity,
8
- * CommonPayloadDto, CommonDataProcessor, MigrationUtility, SeederUtility, etc.)
13
+ * CommonDataDto, CommonDataProcessor, MigrationUtility, SeederUtility, etc.)
9
14
  * and matches the dot.separated filename / PascalCase class conventions used
10
15
  * across nestjs-boilerplate.
11
16
  */
@@ -94,9 +99,9 @@ export class ${n.controllerClass} {
94
99
 
95
100
  function dto(base) {
96
101
  const n = names(base);
97
- return `import { CommonPayloadDto } from '@neohm/nestend';
102
+ return `import { CommonDataDto } from '@neohm/nestend';
98
103
 
99
- export class ${n.dtoClass} extends CommonPayloadDto {
104
+ export class ${n.dtoClass} extends CommonDataDto {
100
105
  // TODO: declare validated payload fields for ${n.pascal}.
101
106
  }
102
107
  `;
@@ -120,7 +125,7 @@ export class ${n.processorClass} extends CommonDataProcessor {
120
125
 
121
126
  private async validate() {
122
127
  // TODO: collect validation errors via this.addErrors({ column: 'message' }).
123
- this.throwExceptionOnError();
128
+ this.raiseExceptionOnValidationFailure();
124
129
  }
125
130
 
126
131
  private async set() {