typia 9.4.0 → 9.5.0

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.
@@ -3,15 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.json_schema_title = void 0;
4
4
  const CommentFactory_1 = require("../../factories/CommentFactory");
5
5
  const json_schema_title = (schema) => {
6
- var _a, _b, _c;
6
+ var _a, _b;
7
7
  const info = (_a = schema.jsDocTags) === null || _a === void 0 ? void 0 : _a.find((tag) => tag.name === "title");
8
- if ((_b = info === null || info === void 0 ? void 0 : info.text) === null || _b === void 0 ? void 0 : _b.length)
9
- return CommentFactory_1.CommentFactory.merge(info.text);
10
- else if (!((_c = schema.description) === null || _c === void 0 ? void 0 : _c.length))
11
- return undefined;
12
- const index = schema.description.indexOf("\n");
13
- const top = (index === -1 ? schema.description : schema.description.substring(0, index)).trim();
14
- return top.endsWith(".") ? top.substring(0, top.length - 1) : undefined;
8
+ return !!((_b = info === null || info === void 0 ? void 0 : info.text) === null || _b === void 0 ? void 0 : _b.length) ? CommentFactory_1.CommentFactory.merge(info.text) : undefined;
15
9
  };
16
10
  exports.json_schema_title = json_schema_title;
17
11
  //# sourceMappingURL=json_schema_title.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"json_schema_title.js","sourceRoot":"","sources":["../../../src/programmers/internal/json_schema_title.ts"],"names":[],"mappings":";;;AAAA,mEAAgE;AAIzD,MAAM,iBAAiB,GAAG,CAAC,MAGjC,EAAsB,EAAE;;IACvB,MAAM,IAAI,GAA8B,MAAA,MAAM,CAAC,SAAS,0CAAE,IAAI,CAC5D,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,OAAO,CAC9B,CAAC;IACF,IAAI,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,MAAM;QAAE,OAAO,+BAAc,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC1D,IAAI,CAAC,CAAA,MAAA,MAAM,CAAC,WAAW,0CAAE,MAAM,CAAA;QAAE,OAAO,SAAS,CAAC;IAEvD,MAAM,KAAK,GAAW,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,MAAM,GAAG,GAAW,CAClB,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAC3E,CAAC,IAAI,EAAE,CAAC;IACT,OAAO,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1E,CAAC,CAAC;AAfW,QAAA,iBAAiB,qBAe5B"}
1
+ {"version":3,"file":"json_schema_title.js","sourceRoot":"","sources":["../../../src/programmers/internal/json_schema_title.ts"],"names":[],"mappings":";;;AAAA,mEAAgE;AAIzD,MAAM,iBAAiB,GAAG,CAAC,MAGjC,EAAsB,EAAE;;IACvB,MAAM,IAAI,GAA8B,MAAA,MAAM,CAAC,SAAS,0CAAE,IAAI,CAC5D,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,OAAO,CAC9B,CAAC;IACF,OAAO,CAAC,CAAC,CAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,MAAM,CAAA,CAAC,CAAC,CAAC,+BAAc,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC5E,CAAC,CAAC;AARW,QAAA,iBAAiB,qBAQ5B"}
@@ -2,13 +2,7 @@ import { CommentFactory } from '../../factories/CommentFactory.mjs';
2
2
 
3
3
  const json_schema_title = (schema) => {
4
4
  const info = schema.jsDocTags?.find((tag) => tag.name === "title");
5
- if (info?.text?.length)
6
- return CommentFactory.merge(info.text);
7
- else if (!schema.description?.length)
8
- return undefined;
9
- const index = schema.description.indexOf("\n");
10
- const top = (index === -1 ? schema.description : schema.description.substring(0, index)).trim();
11
- return top.endsWith(".") ? top.substring(0, top.length - 1) : undefined;
5
+ return !!info?.text?.length ? CommentFactory.merge(info.text) : undefined;
12
6
  };
13
7
 
14
8
  export { json_schema_title };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typia",
3
- "version": "9.4.0",
3
+ "version": "9.5.0",
4
4
  "description": "Superfast runtime validators with only one line",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "homepage": "https://typia.io",
43
43
  "dependencies": {
44
- "@samchon/openapi": "^4.4.1",
44
+ "@samchon/openapi": "^4.5.0",
45
45
  "@standard-schema/spec": "^1.0.0",
46
46
  "commander": "^10.0.0",
47
47
  "comment-json": "^4.2.3",
@@ -50,7 +50,6 @@
50
50
  "randexp": "^0.5.3"
51
51
  },
52
52
  "peerDependencies": {
53
- "@samchon/openapi": ">=4.4.1 <5.0.0",
54
53
  "typescript": ">=4.8.0 <5.9.0"
55
54
  },
56
55
  "devDependencies": {
@@ -9,12 +9,5 @@ export const json_schema_title = (schema: {
9
9
  const info: IJsDocTagInfo | undefined = schema.jsDocTags?.find(
10
10
  (tag) => tag.name === "title",
11
11
  );
12
- if (info?.text?.length) return CommentFactory.merge(info.text);
13
- else if (!schema.description?.length) return undefined;
14
-
15
- const index: number = schema.description.indexOf("\n");
16
- const top: string = (
17
- index === -1 ? schema.description : schema.description.substring(0, index)
18
- ).trim();
19
- return top.endsWith(".") ? top.substring(0, top.length - 1) : undefined;
12
+ return !!info?.text?.length ? CommentFactory.merge(info.text) : undefined;
20
13
  };