@postxl/generator 0.73.4 → 0.73.5

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.
@@ -18,10 +18,6 @@ export declare const toPascalCase: (str: string) => string;
18
18
  * Returns a pluralized version of the given string based on the count.
19
19
  */
20
20
  export declare const pluralize: (s: string, count?: number) => string;
21
- /**
22
- * Returns true if the given string is already pluralized.
23
- */
24
- export declare const isPlural: (s: string) => boolean;
25
21
  /**
26
22
  * Converts each line of a string to a commented line
27
23
  */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.conjugateNames = exports.commentLines = exports.isPlural = exports.pluralize = exports.toPascalCase = exports.toCamelCase = exports.capitalize = exports.uncapitalize = void 0;
3
+ exports.conjugateNames = exports.commentLines = exports.pluralize = exports.toPascalCase = exports.toCamelCase = exports.capitalize = exports.uncapitalize = void 0;
4
4
  /**
5
5
  * Returns the same string with a lowercase first letter.
6
6
  */
@@ -102,14 +102,6 @@ const pluralize = (s, count = 2) => {
102
102
  return s + 's';
103
103
  };
104
104
  exports.pluralize = pluralize;
105
- /**
106
- * Returns true if the given string is already pluralized.
107
- */
108
- const isPlural = (s) => {
109
- const plural = (0, exports.pluralize)(s);
110
- return plural === s;
111
- };
112
- exports.isPlural = isPlural;
113
105
  /**
114
106
  * Converts each line of a string to a commented line
115
107
  */
@@ -79,9 +79,6 @@ function isModelNotIgnored(model) {
79
79
  * Parses the core properties of a model without fields.
80
80
  */
81
81
  function parseModelCore({ dmmfModel, config, }) {
82
- if ((0, string_1.isPlural)(dmmfModel.name)) {
83
- (0, error_1.throwError)(`Model ${dmmfModel.name} is plural. Please use singular names for models.`);
84
- }
85
82
  const attributes = (0, attributes_1.getModelAttributes)(dmmfModel);
86
83
  return {
87
84
  name: Types.toModelName((0, string_1.toPascalCase)(dmmfModel.name)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postxl/generator",
3
- "version": "0.73.4",
3
+ "version": "0.73.5",
4
4
  "main": "./dist/generator.js",
5
5
  "typings": "./dist/generator.d.ts",
6
6
  "bin": {