typia 7.0.0-dev.20241002-2 → 7.0.0-dev.20241003

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.
Files changed (97) hide show
  1. package/lib/factories/JsonMetadataFactory.js +4 -1
  2. package/lib/factories/JsonMetadataFactory.js.map +1 -1
  3. package/lib/factories/ProtobufFactory.js +4 -1
  4. package/lib/factories/ProtobufFactory.js.map +1 -1
  5. package/lib/programmers/AssertProgrammer.js +0 -24
  6. package/lib/programmers/AssertProgrammer.js.map +1 -1
  7. package/lib/programmers/CheckerProgrammer.js +9 -6
  8. package/lib/programmers/CheckerProgrammer.js.map +1 -1
  9. package/lib/programmers/RandomProgrammer.js +4 -1
  10. package/lib/programmers/RandomProgrammer.js.map +1 -1
  11. package/lib/programmers/functional/FunctionalAssertFunctionProgrammer.js +4 -1
  12. package/lib/programmers/functional/FunctionalAssertFunctionProgrammer.js.map +1 -1
  13. package/lib/programmers/functional/FunctionalAssertParametersProgrammer.js +0 -12
  14. package/lib/programmers/functional/FunctionalAssertParametersProgrammer.js.map +1 -1
  15. package/lib/programmers/functional/FunctionalIsReturnProgrammer.js +4 -1
  16. package/lib/programmers/functional/FunctionalIsReturnProgrammer.js.map +1 -1
  17. package/lib/programmers/functional/FunctionalValidateParametersProgrammer.js +4 -1
  18. package/lib/programmers/functional/FunctionalValidateParametersProgrammer.js.map +1 -1
  19. package/lib/programmers/functional/FunctionalValidateReturnProgrammer.js +4 -1
  20. package/lib/programmers/functional/FunctionalValidateReturnProgrammer.js.map +1 -1
  21. package/lib/programmers/http/HttpFormDataProgrammer.js +4 -1
  22. package/lib/programmers/http/HttpFormDataProgrammer.js.map +1 -1
  23. package/lib/programmers/http/HttpHeadersProgrammer.js +4 -1
  24. package/lib/programmers/http/HttpHeadersProgrammer.js.map +1 -1
  25. package/lib/programmers/http/HttpParameterProgrammer.js +4 -1
  26. package/lib/programmers/http/HttpParameterProgrammer.js.map +1 -1
  27. package/lib/programmers/http/HttpQueryProgrammer.js +4 -1
  28. package/lib/programmers/http/HttpQueryProgrammer.js.map +1 -1
  29. package/lib/programmers/misc/MiscCloneProgrammer.js +4 -1
  30. package/lib/programmers/misc/MiscCloneProgrammer.js.map +1 -1
  31. package/lib/programmers/misc/MiscLiteralsProgrammer.js +4 -1
  32. package/lib/programmers/misc/MiscLiteralsProgrammer.js.map +1 -1
  33. package/lib/programmers/misc/MiscPruneProgrammer.js +4 -1
  34. package/lib/programmers/misc/MiscPruneProgrammer.js.map +1 -1
  35. package/lib/programmers/notations/NotationGeneralProgrammer.js +24 -17
  36. package/lib/programmers/notations/NotationGeneralProgrammer.js.map +1 -1
  37. package/lib/transformers/CallExpressionTransformer.d.ts +4 -1
  38. package/lib/transformers/CallExpressionTransformer.js +30 -32
  39. package/lib/transformers/CallExpressionTransformer.js.map +1 -1
  40. package/lib/transformers/FileTransformer.js +36 -30
  41. package/lib/transformers/FileTransformer.js.map +1 -1
  42. package/lib/transformers/NodeTransformer.d.ts +4 -1
  43. package/lib/transformers/NodeTransformer.js +7 -6
  44. package/lib/transformers/NodeTransformer.js.map +1 -1
  45. package/lib/transformers/TransformerError.d.ts +4 -1
  46. package/lib/transformers/TransformerError.js +21 -23
  47. package/lib/transformers/TransformerError.js.map +1 -1
  48. package/lib/transformers/features/json/JsonApplicationTransformer.js +4 -1
  49. package/lib/transformers/features/json/JsonApplicationTransformer.js.map +1 -1
  50. package/lib/transformers/features/llm/LlmApplicationTransformer.js +4 -1
  51. package/lib/transformers/features/llm/LlmApplicationTransformer.js.map +1 -1
  52. package/lib/transformers/features/llm/LlmSchemaTransformer.js +4 -1
  53. package/lib/transformers/features/llm/LlmSchemaTransformer.js.map +1 -1
  54. package/lib/transformers/features/reflect/ReflectMetadataTransformer.js +4 -1
  55. package/lib/transformers/features/reflect/ReflectMetadataTransformer.js.map +1 -1
  56. package/lib/transformers/features/reflect/ReflectNameTransformer.js +4 -1
  57. package/lib/transformers/features/reflect/ReflectNameTransformer.js.map +1 -1
  58. package/lib/utils/StringUtil/StringUtil.d.ts +5 -1
  59. package/lib/utils/StringUtil/StringUtil.js +8 -4
  60. package/lib/utils/StringUtil/StringUtil.js.map +1 -1
  61. package/package.json +1 -1
  62. package/src/factories/JsonMetadataFactory.ts +4 -1
  63. package/src/factories/ProtobufFactory.ts +4 -3
  64. package/src/programmers/AssertProgrammer.ts +0 -24
  65. package/src/programmers/CheckerProgrammer.ts +9 -8
  66. package/src/programmers/RandomProgrammer.ts +4 -3
  67. package/src/programmers/functional/FunctionalAssertFunctionProgrammer.ts +4 -3
  68. package/src/programmers/functional/FunctionalAssertParametersProgrammer.ts +0 -12
  69. package/src/programmers/functional/FunctionalIsReturnProgrammer.ts +4 -3
  70. package/src/programmers/functional/FunctionalValidateParametersProgrammer.ts +4 -3
  71. package/src/programmers/functional/FunctionalValidateReturnProgrammer.ts +4 -3
  72. package/src/programmers/http/HttpFormDataProgrammer.ts +4 -3
  73. package/src/programmers/http/HttpHeadersProgrammer.ts +4 -3
  74. package/src/programmers/http/HttpParameterProgrammer.ts +4 -1
  75. package/src/programmers/http/HttpQueryProgrammer.ts +4 -3
  76. package/src/programmers/misc/MiscCloneProgrammer.ts +4 -3
  77. package/src/programmers/misc/MiscLiteralsProgrammer.ts +4 -1
  78. package/src/programmers/misc/MiscPruneProgrammer.ts +4 -3
  79. package/src/programmers/notations/NotationGeneralProgrammer.ts +28 -20
  80. package/src/transformers/CallExpressionTransformer.ts +36 -36
  81. package/src/transformers/FileTransformer.ts +42 -32
  82. package/src/transformers/NodeTransformer.ts +10 -6
  83. package/src/transformers/TransformerError.ts +26 -27
  84. package/src/transformers/features/json/JsonApplicationTransformer.ts +4 -1
  85. package/src/transformers/features/llm/LlmApplicationTransformer.ts +4 -1
  86. package/src/transformers/features/llm/LlmSchemaTransformer.ts +4 -1
  87. package/src/transformers/features/reflect/ReflectMetadataTransformer.ts +4 -1
  88. package/src/transformers/features/reflect/ReflectNameTransformer.ts +4 -1
  89. package/src/utils/StringUtil/StringUtil.ts +11 -4
  90. package/lib/functional/$varint.d.ts +0 -6
  91. package/lib/functional/$varint.js +0 -99
  92. package/lib/functional/$varint.js.map +0 -1
  93. package/lib/functional/$zigzag.d.ts +0 -4
  94. package/lib/functional/$zigzag.js +0 -35
  95. package/lib/functional/$zigzag.js.map +0 -1
  96. package/src/functional/$varint.ts +0 -130
  97. package/src/functional/$zigzag.ts +0 -39
@@ -41,7 +41,10 @@ var LlmSchemaTransformer;
41
41
  type: type,
42
42
  });
43
43
  if (result.success === false)
44
- throw TransformerError_1.TransformerError.from("typia.llm.schema")(result.errors);
44
+ throw TransformerError_1.TransformerError.from({
45
+ code: "typia.llm.schema",
46
+ errors: result.errors,
47
+ });
45
48
  // GENERATE LLM SCHEMA
46
49
  var schema = LlmSchemaProgrammer_1.LlmSchemaProgrammer.write(result.data);
47
50
  return LiteralFactory_1.LiteralFactory.generate(schema);
@@ -1 +1 @@
1
- {"version":3,"file":"LlmSchemaTransformer.js","sourceRoot":"","sources":["../../../../src/transformers/features/llm/LlmSchemaTransformer.ts"],"names":[],"mappings":";;;;;;AACA,0DAA4B;AAE5B,oEAAmE;AACnE,4EAA2E;AAC3E,sEAAqE;AAIrE,oFAAmF;AAKnF,2DAA0D;AAE1D,IAAiB,oBAAoB,CAuCpC;AAvCD,WAAiB,oBAAoB;IACtB,8BAAS,GAAG,UACvB,KAAsC;;QAEtC,uBAAuB;QACvB,IAAI,CAAC,CAAA,MAAA,KAAK,CAAC,UAAU,CAAC,aAAa,0CAAE,MAAM,CAAA;YACzC,MAAM,IAAI,mCAAgB,CAAC;gBACzB,IAAI,EAAE,kBAAkB;gBACxB,OAAO,EAAE,sBAAsB;aAChC,CAAC,CAAC;QAEL,IAAM,GAAG,GAAY,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAE,CAAC;QACxD,IAAI,oBAAE,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,KAAK;YAAE,OAAO,KAAK,CAAC,UAAU,CAAC;QAE1D,WAAW;QACX,IAAM,IAAI,GAAY,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;QACrE,IAAM,UAAU,GAAuB,IAAI,uCAAkB,CAAC;YAC5D,OAAO,EAAE,uCAAkB,CAAC,OAAO;SACpC,CAAC,CAAC;QACH,IAAM,MAAM,GACV,iCAAe,CAAC,OAAO,CAAC;YACtB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO;YAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;YACtC,OAAO,EAAE;gBACP,MAAM,EAAE,IAAI;gBACZ,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,KAAK;gBACb,QAAQ,EAAE,yCAAmB,CAAC,QAAQ;aACvC;YACD,UAAU,YAAA;YACV,IAAI,MAAA;SACL,CAAC,CAAC;QACL,IAAI,MAAM,CAAC,OAAO,KAAK,KAAK;YAC1B,MAAM,mCAAgB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEjE,sBAAsB;QACtB,IAAM,MAAM,GAAe,yCAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAClE,OAAO,+BAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC,CAAC;AACJ,CAAC,EAvCgB,oBAAoB,oCAApB,oBAAoB,QAuCpC"}
1
+ {"version":3,"file":"LlmSchemaTransformer.js","sourceRoot":"","sources":["../../../../src/transformers/features/llm/LlmSchemaTransformer.ts"],"names":[],"mappings":";;;;;;AACA,0DAA4B;AAE5B,oEAAmE;AACnE,4EAA2E;AAC3E,sEAAqE;AAIrE,oFAAmF;AAKnF,2DAA0D;AAE1D,IAAiB,oBAAoB,CA0CpC;AA1CD,WAAiB,oBAAoB;IACtB,8BAAS,GAAG,UACvB,KAAsC;;QAEtC,uBAAuB;QACvB,IAAI,CAAC,CAAA,MAAA,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AoB,oCAApB,oBAAoB,QA0CpC"}
@@ -49,7 +49,10 @@ var ReflectMetadataTransformer;
49
49
  type: type,
50
50
  });
51
51
  if (result.success === false)
52
- throw TransformerError_1.TransformerError.from("typia.reflect.metadata")(result.errors);
52
+ throw TransformerError_1.TransformerError.from({
53
+ code: "typia.reflect.metadata",
54
+ errors: result.errors,
55
+ });
53
56
  return result.data;
54
57
  });
55
58
  // CONVERT TO PRIMITIVE TYPE
@@ -1 +1 @@
1
- {"version":3,"file":"ReflectMetadataTransformer.js","sourceRoot":"","sources":["../../../../src/transformers/features/reflect/ReflectMetadataTransformer.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA4B;AAE5B,oEAAmE;AACnE,4EAA2E;AAC3E,sEAAqE;AAMrE,2DAA0D;AAE1D,IAAiB,0BAA0B,CAqD1C;AArDD,WAAiB,0BAA0B;IAC5B,oCAAS,GAAG,UACvB,KAAsD;;QAEtD,IAAI,CAAC,CAAA,MAAA,KAAK,CAAC,UAAU,CAAC,aAAa,0CAAE,MAAM,CAAA;YACzC,MAAM,IAAI,mCAAgB,CAAC;gBACzB,IAAI,EAAE,wBAAwB;gBAC9B,OAAO,EAAE,sBAAsB;aAChC,CAAC,CAAC;QAEL,2BAA2B;QAC3B,IAAM,GAAG,GAAY,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAE,CAAC;QACxD,IAAI,CAAC,oBAAE,CAAC,eAAe,CAAC,GAAG,CAAC;YAAE,OAAO,KAAK,CAAC,UAAU,CAAC;aACjD,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAC,KAAK,IAAK,OAAA,CAAC,oBAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EAArB,CAAqB,CAAC;YAC1D,OAAO,KAAK,CAAC,UAAU,CAAC;QAE1B,YAAY;QACZ,IAAM,KAAK,GAAc,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAC,KAAK;YAC9C,OAAA,KAAK,CAAC,OAAO,CA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0B,0CAA1B,0BAA0B,QAqD1C"}
1
+ {"version":3,"file":"ReflectMetadataTransformer.js","sourceRoot":"","sources":["../../../../src/transformers/features/reflect/ReflectMetadataTransformer.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA4B;AAE5B,oEAAmE;AACnE,4EAA2E;AAC3E,sEAAqE;AAMrE,2DAA0D;AAE1D,IAAiB,0BAA0B,CAwD1C;AAxDD,WAAiB,0BAA0B;IAC5B,oCAAS,GAAG,UACvB,KAAsD;;QAEtD,IAAI,CAAC,CAAA,MAAA,KAAK,CAAC,UAAU,CAAC,aAAa,0CAAE,MAAM,CAAA;YACzC,MAAM,IAAI,mCAAgB,CAAC;gBACzB,IAAI,EAAE,wBAAwB;gBAC9B,OAAO,EAAE,sBAAsB;aAChC,CAAC,CAAC;QAEL,2BAA2B;QAC3B,IAAM,GAAG,GAAY,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAE,CAAC;QACxD,IAAI,CAAC,oBAAE,CAAC,eAAe,CAAC,GAAG,CAAC;YAAE,OAAO,KAAK,CAAC,UAAU,CAAC;aACjD,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAC,KAAK,IAAK,OAAA,CAAC,oBAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EAArB,CAAqB,CAAC;YAC1D,OAAO,KAAK,CAAC,UAAU,CAAC;QAE1B,YAAY;QACZ,IAAM,KAAK,GAAc,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAC,KAAK;YAC9C,OAAA,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,KAAoB,CAAC;QAA/D,CAA+D,CAChE,CAAC;QACF,IAAI,KAAK,CAAC,IAAI,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,eAAe,EAAE,EAAnB,CAAmB,CAAC;YACxC,MAAM,IAAI,mCAAgB,CAAC;gBACzB,IAAI,EAAE,wBAAwB;gBAC9B,OAAO,EAAE,oCAAoC;aAC9C,CAAC,CAAC;QAEL,WAAW;QACX,IAAM,UAAU,GAAuB,IAAI,uCAAkB,EAAE,CAAC;QAChE,IAAM,SAAS,GAAoB,KAAK,CAAC,GAAG,CAAC,UAAC,IAAI;YAChD,IAAM,MAAM,GAAG,iCAAe,CAAC,OAAO,CAAC;gBACrC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO;gBAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;gBACtC,OAAO,EAAE;oBACP,MAAM,EAAE,IAAI;oBACZ,QAAQ,EAAE,IAAI;oBACd,MAAM,EAAE,IAAI;oBACZ,UAAU,EAAE,IAAI;iBACjB;gBACD,UAAU,YAAA;gBACV,IAAI,MAAA;aACL,CAAC,CAAC;YACH,IAAI,MAAM,CAAC,OAAO,KAAK,KAAK;gBAC1B,MAAM,mCAAgB,CAAC,IAAI,CAAC;oBAC1B,IAAI,EAAE,wBAAwB;oBAC9B,MAAM,EAAE,MAAM,CAAC,MAAM;iBACtB,CAAC,CAAC;YACL,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC,CAAC,CAAC;QAEH,4BAA4B;QAC5B,IAAM,GAAG,GAAyB;YAChC,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,MAAM,EAAE,EAAjB,CAAiB,CAAC;YACzD,UAAU,EAAE,UAAU,CAAC,MAAM,EAAE;SAChC,CAAC;QACF,OAAO,+BAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC,CAAC;AACJ,CAAC,EAxDgB,0BAA0B,0CAA1B,0BAA0B,QAwD1C"}
@@ -61,7 +61,10 @@ var getMetadata = function (props) {
61
61
  type: type,
62
62
  });
63
63
  if (result.success === false)
64
- throw TransformerError_1.TransformerError.from("typia.reflect.name")(result.errors);
64
+ throw TransformerError_1.TransformerError.from({
65
+ code: "typia.reflect.name",
66
+ errors: result.errors,
67
+ });
65
68
  return result.data;
66
69
  };
67
70
  //# sourceMappingURL=ReflectNameTransformer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ReflectNameTransformer.js","sourceRoot":"","sources":["../../../../src/transformers/features/reflect/ReflectNameTransformer.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA4B;AAE5B,4EAA2E;AAC3E,sEAAqE;AAQrE,2DAA0D;AAE1D,IAAiB,sBAAsB,CAsCtC;AAtCD,WAAiB,sBAAsB;IACxB,gCAAS,GAAG,UACvB,KAAsD;;QAEtD,IAAI,CAAC,CAAA,MAAA,KAAK,CAAC,UAAU,CAAC,aAAa,0CAAE,MAAM,CAAA;YACzC,MAAM,IAAI,mCAAgB,CAAC;gBACzB,IAAI,EAAE,wBAAwB;gBAC9B,OAAO,EAAE,sBAAsB;aAChC,CAAC,CAAC;QACL,IAAM,GAAG,GAAY,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAE,CAAC;QACxD,IAAM,OAAO,GAAY,CAAC;YACxB,kCAAkC;YAClC,IAAM,MAAM,GAAwB,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAE,CAAC;YACvE,IAAI,MAAM,KAAK,SAAS;gBAAE,OAAO,KAAK,CAAC;YAEvC,oBAAoB;YACpB,IAAM,KAAK,GAAa,WAAW,CAAC;gBAClC,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,IAAI,EAAE,MAAM;aACb,CAAC,CAAC;YACH,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC;gBACvB,KAAK,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC;gBAC5B,KAAK,CAAC,SAAS,CAAC,CAAC,CAAE,CAAC,IAAI,KAAK,SAAS;gBACtC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAE,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;gBACvC,CAAC,CAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAE,CAAC,MAAM,CAAC,CAAC,CAAE,CAAC,KAAiB;gBACnD,CAAC,CAAC,KAAK,CAAC;QACZ,CAAC,CAAC,EAAE,CAAC;QAEL,eAAe;QACf,OAAO,oBAAE,CAAC,OAAO,CAAC,mBAAmB,CACnC,OAAO;YACL,CAAC,CAAC,WAAW,CAAC;gBACV,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,IAAI,EAAE,GAAG;aACV,CAAC,CAAC,OAAO,EAAE;YACd,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,CACtB,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,EAtCgB,sBAAsB,sCAAtB,sBAAsB,QAsCtC;AAED,IAAM,WAAW,GAAG,UAAC,KAGpB;IACC,IAAM,IAAI,GAAY,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAC7D,KAAK,CAAC,IAAmB,CAC1B,CAAC;IACF,IAAM,UAAU,GAAuB,IAAI,uCAAkB,CAAC;QAC5D,OAAO,EAAE,uCAAkB,CAAC,OAAO;KACpC,CAAC,CAAC;IACH,IAAM,MAAM,GACV,iCAAe,CAAC,OAAO,CAAC;QACtB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;QACtC,OAAO,EAAE;YACP,MAAM,EAAE,KAAK;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,KAAK;SACd;QACD,UAAU,YAAA;QACV,IAAI,MAAA;KACL,CAAC,CAAC;IACL,IAAI,MAAM,CAAC,OAAO,KAAK,KAAK;QAC1B,MAAM,mCAAgB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACnE,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC,CAAC"}
1
+ {"version":3,"file":"ReflectNameTransformer.js","sourceRoot":"","sources":["../../../../src/transformers/features/reflect/ReflectNameTransformer.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA4B;AAE5B,4EA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AAO;gBACtB,IAAI,EAAE,GAAG;aACV,CAAC,CAAC,OAAO,EAAE;YACd,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,CACtB,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,EAtCgB,sBAAsB,sCAAtB,sBAAsB,QAsCtC;AAED,IAAM,WAAW,GAAG,UAAC,KAGpB;IACC,IAAM,IAAI,GAAY,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAC7D,KAAK,CAAC,IAAmB,CAC1B,CAAC;IACF,IAAM,UAAU,GAAuB,IAAI,uCAAkB,CAAC;QAC5D,OAAO,EAAE,uCAAkB,CAAC,OAAO;KACpC,CAAC,CAAC;IACH,IAAM,MAAM,GACV,iCAAe,CAAC,OAAO,CAAC;QACtB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;QACtC,OAAO,EAAE;YACP,MAAM,EAAE,KAAK;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,KAAK;SACd;QACD,UAAU,YAAA;QACV,IAAI,MAAA;KACL,CAAC,CAAC;IACL,IAAI,MAAM,CAAC,OAAO,KAAK,KAAK;QAC1B,MAAM,mCAAgB,CAAC,IAAI,CAAC;YAC1B,IAAI,EAAE,oBAAoB;YAC1B,MAAM,EAAE,MAAM,CAAC,MAAM;SACtB,CAAC,CAAC;IACL,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC,CAAC"}
@@ -1,2 +1,6 @@
1
1
  export declare const capitalize: (str: string) => string;
2
- export declare const escapeDuplicate: (keep: string[]) => (change: string) => string;
2
+ export declare const escapeDuplicate: (props: {
3
+ keep: string[];
4
+ input: string;
5
+ escape?: (str: string) => string;
6
+ }) => string;
@@ -5,10 +5,14 @@ var capitalize = function (str) {
5
5
  return str.length ? str[0].toUpperCase() + str.slice(1).toLowerCase() : str;
6
6
  };
7
7
  exports.capitalize = capitalize;
8
- var escapeDuplicate = function (keep) {
9
- return function (change) {
10
- return keep.includes(change) ? (0, exports.escapeDuplicate)(keep)("_".concat(change)) : change;
11
- };
8
+ var escapeDuplicate = function (props) {
9
+ var _a;
10
+ return props.keep.includes(props.input)
11
+ ? (0, exports.escapeDuplicate)({
12
+ keep: props.keep,
13
+ input: ((_a = props.escape) !== null && _a !== void 0 ? _a : (function (str) { return "_".concat(str); }))(props.input),
14
+ })
15
+ : props.input;
12
16
  };
13
17
  exports.escapeDuplicate = escapeDuplicate;
14
18
  //# sourceMappingURL=StringUtil.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StringUtil.js","sourceRoot":"","sources":["../../../src/utils/StringUtil/StringUtil.ts"],"names":[],"mappings":";;;AAAO,IAAM,UAAU,GAAG,UAAC,GAAW;IACpC,OAAA,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAE,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,GAAG;AAArE,CAAqE,CAAC;AAD3D,QAAA,UAAU,cACiD;AAEjE,IAAM,eAAe,GAC1B,UAAC,IAAc;IACf,OAAA,UAAC,MAAc;QACb,OAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAA,uBAAe,EAAC,IAAI,CAAC,CAAC,WAAI,MAAM,CAAE,CAAC,CAAC,CAAC,CAAC,MAAM;IAApE,CAAoE;AADtE,CACsE,CAAC;AAH5D,QAAA,eAAe,mBAG6C"}
1
+ {"version":3,"file":"StringUtil.js","sourceRoot":"","sources":["../../../src/utils/StringUtil/StringUtil.ts"],"names":[],"mappings":";;;AAAO,IAAM,UAAU,GAAG,UAAC,GAAW;IACpC,OAAA,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAE,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,GAAG;AAArE,CAAqE,CAAC;AAD3D,QAAA,UAAU,cACiD;AAEjE,IAAM,eAAe,GAAG,UAAC,KAI/B;;IACC,OAAA,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC;QAC9B,CAAC,CAAC,IAAA,uBAAe,EAAC;YACd,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,KAAK,EAAE,CAAC,MAAA,KAAK,CAAC,MAAM,mCAAI,CAAC,UAAC,GAAG,IAAK,OAAA,WAAI,GAAG,CAAE,EAAT,CAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC;SAC3D,CAAC;QACJ,CAAC,CAAC,KAAK,CAAC,KAAK,CAAA;CAAA,CAAC;AAVL,QAAA,eAAe,mBAUV"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typia",
3
- "version": "7.0.0-dev.20241002-2",
3
+ "version": "7.0.0-dev.20241003",
4
4
  "description": "Superfast runtime validators with only one line",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -32,7 +32,10 @@ export namespace JsonMetadataFactory {
32
32
  type: props.type,
33
33
  });
34
34
  if (result.success === false)
35
- throw TransformerError.from(props.method)(result.errors);
35
+ throw TransformerError.from({
36
+ code: props.method,
37
+ errors: result.errors,
38
+ });
36
39
  return [collection, result.data];
37
40
  };
38
41
 
@@ -37,9 +37,10 @@ export namespace ProtobufFactory {
37
37
  },
38
38
  });
39
39
  if (result.success === false)
40
- throw TransformerError.from(`typia.protobuf.${props.method}`)(
41
- result.errors,
42
- );
40
+ throw TransformerError.from({
41
+ code: `typia.protobuf.${props.method}`,
42
+ errors: result.errors,
43
+ });
43
44
  return result.data;
44
45
  };
45
46
 
@@ -282,30 +282,6 @@ export namespace AssertProgrammer {
282
282
  input: next.input,
283
283
  }),
284
284
  );
285
- // : (() => {
286
- // const addicted = binaries.slice();
287
- // if (
288
- // addicted[addicted.length - 1]!.combined === false
289
- // ) {
290
- // addicted.push({
291
- // combined: true,
292
- // expression: create_guard_call(importer)(
293
- // explore.source === "top"
294
- // ? ts.factory.createTrue()
295
- // : ts.factory.createIdentifier(
296
- // "_exceptionable",
297
- // ),
298
- // )(
299
- // ts.factory.createIdentifier(path),
300
- // expected,
301
- // input,
302
- // ),
303
- // });
304
- // }
305
- // return addicted
306
- // .map((b) => b.expression)
307
- // .reduce(ts.factory.createLogicalOr);
308
- // })();
309
285
  };
310
286
 
311
287
  const assert_object = (props: {
@@ -276,9 +276,10 @@ export namespace CheckerProgrammer {
276
276
  type: next.type,
277
277
  });
278
278
  if (result.success === false)
279
- throw TransformerError.from(`typia.${next.importer.method}`)(
280
- result.errors,
281
- );
279
+ throw TransformerError.from({
280
+ code: `typia.${next.importer.method}`,
281
+ errors: result.errors,
282
+ });
282
283
  return [collection, result.data];
283
284
  },
284
285
  addition: props.config.addition,
@@ -827,15 +828,15 @@ export namespace CheckerProgrammer {
827
828
 
828
829
  if (instances.length) {
829
830
  const transformer =
830
- (merger: (x: ts.Expression, y: ts.Expression) => ts.Expression) =>
831
- (ins: IInstance) =>
832
- ins.body
831
+ (merge: (x: ts.Expression, y: ts.Expression) => ts.Expression) =>
832
+ (instance: IInstance) =>
833
+ instance.body
833
834
  ? {
834
- expression: merger(ins.head, ins.body),
835
+ expression: merge(instance.head, instance.body),
835
836
  combined: true,
836
837
  }
837
838
  : {
838
- expression: ins.head,
839
+ expression: instance.head,
839
840
  combined: false,
840
841
  };
841
842
  if (instances.length === 1)
@@ -69,9 +69,10 @@ export namespace RandomProgrammer {
69
69
  type: props.type,
70
70
  });
71
71
  if (result.success === false)
72
- throw TransformerError.from(`typia.${props.importer.method}`)(
73
- result.errors,
74
- );
72
+ throw TransformerError.from({
73
+ code: `typia.${props.importer.method}`,
74
+ errors: result.errors,
75
+ });
75
76
 
76
77
  // GENERATE FUNCTION
77
78
  const functions: Record<string, ts.VariableStatement> = Object.fromEntries([
@@ -81,9 +81,10 @@ export namespace FunctionalAssertFunctionProgrammer {
81
81
  name: string;
82
82
  variable: ts.VariableStatement;
83
83
  } => {
84
- const name: string = StringUtil.escapeDuplicate(
85
- props.parameters.map((p) => p.name.getText()),
86
- )("errorFactoryWrapper");
84
+ const name: string = StringUtil.escapeDuplicate({
85
+ keep: props.parameters.map((p) => p.name.getText()),
86
+ input: "errorFactoryWrapper",
87
+ });
87
88
  const variable: ts.VariableStatement = ts.factory.createVariableStatement(
88
89
  undefined,
89
90
  ts.factory.createVariableDeclarationList(
@@ -112,18 +112,6 @@ export namespace FunctionalAssertParametersProgrammer {
112
112
  replacer: `$input.parameters[${i}]`,
113
113
  }),
114
114
  }),
115
- // project)(modulo)(equals)(
116
- // p.type
117
- // ? project.checker.getTypeFromTypeNode(p.type)
118
- // : project.checker.getTypeFromTypeNode(TypeFactory.keyword("any")),
119
- // undefined,
120
- // FunctionalAssertFunctionProgrammer.hookPath({
121
- // wrapper: props.wrapper,
122
- // replacer: `$input.parameters[${i}]`,
123
- // }),
124
- // ),
125
- // undefined,
126
- // [ts.factory.createIdentifier(p.name.getText())],
127
115
  }),
128
116
  ),
129
117
  expressions: props.parameters.map((p, i) =>
@@ -75,9 +75,10 @@ export namespace FunctionalIsReturnProgrammer {
75
75
  ts.factory.createIdentifier(p.name.getText()),
76
76
  ),
77
77
  );
78
- const name: string = StringUtil.escapeDuplicate(
79
- props.declaration.parameters.map((p) => p.name.getText()),
80
- )("result");
78
+ const name: string = StringUtil.escapeDuplicate({
79
+ keep: props.declaration.parameters.map((p) => p.name.getText()),
80
+ input: "result",
81
+ });
81
82
  return {
82
83
  async,
83
84
  functions: [
@@ -101,9 +101,10 @@ export namespace FunctionalValidateParametersProgrammer {
101
101
  };
102
102
 
103
103
  export const decompose = (props: IDecomposeProps): IDecomposeOutput => {
104
- const resultName: string = StringUtil.escapeDuplicate(
105
- props.declaration.parameters.map((p) => p.name.getText()),
106
- )("paramErrorResults");
104
+ const resultName: string = StringUtil.escapeDuplicate({
105
+ keep: props.declaration.parameters.map((p) => p.name.getText()),
106
+ input: "paramErrorResults",
107
+ });
107
108
  const validationResultArray: ts.ArrayLiteralExpression =
108
109
  ts.factory.createArrayLiteralExpression(
109
110
  props.declaration.parameters.map((p, i) =>
@@ -76,9 +76,10 @@ export namespace FunctionalValidateReturnProgrammer {
76
76
  ),
77
77
  );
78
78
 
79
- const name: string = StringUtil.escapeDuplicate(
80
- props.declaration.parameters.map((p) => p.name.getText()),
81
- )("result");
79
+ const name: string = StringUtil.escapeDuplicate({
80
+ keep: props.declaration.parameters.map((p) => p.name.getText()),
81
+ input: "result",
82
+ });
82
83
  return {
83
84
  async,
84
85
  functions: [
@@ -45,9 +45,10 @@ export namespace HttpFormDataProgrammer {
45
45
  type: props.type,
46
46
  });
47
47
  if (result.success === false)
48
- throw TransformerError.from(`typia.http.${props.importer.method}`)(
49
- result.errors,
50
- );
48
+ throw TransformerError.from({
49
+ code: `typia.http.${props.importer.method}`,
50
+ errors: result.errors,
51
+ });
51
52
 
52
53
  // DO TRANSFORM
53
54
  const object: MetadataObject = result.data.objects[0]!;
@@ -49,9 +49,10 @@ export namespace HttpHeadersProgrammer {
49
49
  type: props.type,
50
50
  });
51
51
  if (result.success === false)
52
- throw TransformerError.from(`typia.http.${props.importer.method}`)(
53
- result.errors,
54
- );
52
+ throw TransformerError.from({
53
+ code: `typia.http.${props.importer.method}`,
54
+ errors: result.errors,
55
+ });
55
56
 
56
57
  // DO TRANSFORM
57
58
  const object: MetadataObject = result.data.objects[0]!;
@@ -30,7 +30,10 @@ export namespace HttpParameterProgrammer {
30
30
  type: props.type,
31
31
  });
32
32
  if (result.success === false)
33
- throw TransformerError.from(props.modulo.getText())(result.errors);
33
+ throw TransformerError.from({
34
+ code: props.modulo.getText(),
35
+ errors: result.errors,
36
+ });
34
37
 
35
38
  const atomic = [...HttpMetadataUtil.atomics(result.data)][0]!;
36
39
  const importer: FunctionImporter = new FunctionImporter(
@@ -53,9 +53,10 @@ export namespace HttpQueryProgrammer {
53
53
  type: props.type,
54
54
  });
55
55
  if (result.success === false)
56
- throw TransformerError.from(`typia.http.${props.importer.method}`)(
57
- result.errors,
58
- );
56
+ throw TransformerError.from({
57
+ code: `typia.http.${props.importer.method}`,
58
+ errors: result.errors,
59
+ });
59
60
 
60
61
  // DO TRANSFORM
61
62
  const object: MetadataObject = result.data.objects[0]!;
@@ -977,9 +977,10 @@ export namespace MiscCloneProgrammer {
977
977
  type: props.type,
978
978
  });
979
979
  if (result.success === false)
980
- throw TransformerError.from(`typia.misc.${props.importer.method}`)(
981
- result.errors,
982
- );
980
+ throw TransformerError.from({
981
+ code: `typia.misc.${props.importer.method}`,
982
+ errors: result.errors,
983
+ });
983
984
  return [collection, result.data];
984
985
  };
985
986
 
@@ -39,7 +39,10 @@ export namespace MiscLiteralsProgrammer {
39
39
  type: props.type,
40
40
  });
41
41
  if (result.success === false)
42
- throw TransformerError.from(`typia.misc.literals`)(result.errors);
42
+ throw TransformerError.from({
43
+ code: `typia.misc.literals`,
44
+ errors: result.errors,
45
+ });
43
46
 
44
47
  const metadata: Metadata = result.data;
45
48
  const values: Set<Atomic.Type | null> = new Set([
@@ -684,9 +684,10 @@ export namespace MiscPruneProgrammer {
684
684
  type: props.type,
685
685
  });
686
686
  if (result.success === false)
687
- throw TransformerError.from(`typia.misc.${props.importer.method}`)(
688
- result.errors,
689
- );
687
+ throw TransformerError.from({
688
+ code: `typia.misc.${props.importer.method}`,
689
+ errors: result.errors,
690
+ });
690
691
  return [collection, result.data];
691
692
  };
692
693
 
@@ -722,19 +722,24 @@ export namespace NotationGeneralProgrammer {
722
722
  definitions: T[];
723
723
  explore: FeatureProgrammer.IExplore;
724
724
  }): ts.Expression => {
725
- const arrow =
726
- (parameters: ts.ParameterDeclaration[]) =>
727
- (explore: FeatureProgrammer.IExplore) =>
728
- (input: ts.Expression): ts.ArrowFunction =>
729
- props.factory({
730
- parameters,
731
- input,
732
- definitions: props.definitions,
733
- explore,
734
- });
725
+ const arrow = (next: {
726
+ parameters: ts.ParameterDeclaration[];
727
+ explore: FeatureProgrammer.IExplore;
728
+ input: ts.Expression;
729
+ }): ts.ArrowFunction =>
730
+ props.factory({
731
+ parameters: next.parameters,
732
+ definitions: props.definitions,
733
+ explore: next.explore,
734
+ input: next.input,
735
+ });
735
736
  if (props.definitions.every((e) => e.type.recursive === false))
736
737
  ts.factory.createCallExpression(
737
- arrow([])(props.explore)(props.input),
738
+ arrow({
739
+ parameters: [],
740
+ explore: props.explore,
741
+ input: props.input,
742
+ }),
738
743
  undefined,
739
744
  [],
740
745
  );
@@ -750,16 +755,18 @@ export namespace NotationGeneralProgrammer {
750
755
  props.config.prefix,
751
756
  props.definitions.map((e) => e.type.name).join(" | "),
752
757
  () =>
753
- arrow(
754
- FeatureProgrammer.parameterDeclarations({
758
+ arrow({
759
+ parameters: FeatureProgrammer.parameterDeclarations({
755
760
  config: props.config,
756
761
  type: TypeFactory.keyword("any"),
757
762
  input: ts.factory.createIdentifier("input"),
758
763
  }),
759
- )({
760
- ...arrayExplore,
761
- postfix: "",
762
- })(ts.factory.createIdentifier("input")),
764
+ explore: {
765
+ ...arrayExplore,
766
+ postfix: "",
767
+ },
768
+ input: ts.factory.createIdentifier("input"),
769
+ }),
763
770
  ),
764
771
  ),
765
772
  undefined,
@@ -904,9 +911,10 @@ export namespace NotationGeneralProgrammer {
904
911
  type: props.type,
905
912
  });
906
913
  if (result.success === false)
907
- throw TransformerError.from(`typia.misc.${props.importer.method}`)(
908
- result.errors,
909
- );
914
+ throw TransformerError.from({
915
+ code: `typia.misc.${props.importer.method}`,
916
+ errors: result.errors,
917
+ });
910
918
  return [collection, result.data];
911
919
  };
912
920
 
@@ -113,42 +113,42 @@ import { ReflectMetadataTransformer } from "./features/reflect/ReflectMetadataTr
113
113
  import { ReflectNameTransformer } from "./features/reflect/ReflectNameTransformer";
114
114
 
115
115
  export namespace CallExpressionTransformer {
116
- export const transform =
117
- (context: ITypiaContext) =>
118
- (expression: ts.CallExpression): ts.Expression | null => {
119
- //----
120
- // VALIDATIONS
121
- //----
122
- // SIGNATURE DECLARATION
123
- const declaration: ts.Declaration | undefined =
124
- context.checker.getResolvedSignature(expression)?.declaration;
125
- if (!declaration) return expression;
126
-
127
- // FILE PATH
128
- const location: string = path.resolve(
129
- declaration.getSourceFile().fileName,
130
- );
131
- if (isTarget(location) === false) return expression;
132
-
133
- //----
134
- // TRANSFORMATION
135
- //----
136
- // FUNCTION NAME
137
- const module: string = location.split(path.sep).at(-1)!.split(".")[0]!;
138
- const { name } = context.checker.getTypeAtLocation(declaration).symbol;
139
-
140
- // FIND TRANSFORMER
141
- const functor: (() => Task) | undefined = FUNCTORS[module]?.[name];
142
- if (functor === undefined) return expression;
143
-
144
- // RETURNS WITH TRANSFORMATION
145
- const result: ts.Expression | null = functor()({
146
- context,
147
- modulo: expression.expression,
148
- expression,
149
- });
150
- return result ?? expression;
151
- };
116
+ export const transform = (props: {
117
+ context: ITypiaContext;
118
+ expression: ts.CallExpression;
119
+ }): ts.Expression | null => {
120
+ //----
121
+ // VALIDATIONS
122
+ //----
123
+ // SIGNATURE DECLARATION
124
+ const declaration: ts.Declaration | undefined =
125
+ props.context.checker.getResolvedSignature(props.expression)?.declaration;
126
+ if (!declaration) return props.expression;
127
+
128
+ // FILE PATH
129
+ const location: string = path.resolve(declaration.getSourceFile().fileName);
130
+ if (isTarget(location) === false) return props.expression;
131
+
132
+ //----
133
+ // TRANSFORMATION
134
+ //----
135
+ // FUNCTION NAME
136
+ const module: string = location.split(path.sep).at(-1)!.split(".")[0]!;
137
+ const { name } =
138
+ props.context.checker.getTypeAtLocation(declaration).symbol;
139
+
140
+ // FIND TRANSFORMER
141
+ const functor: (() => Task) | undefined = FUNCTORS[module]?.[name];
142
+ if (functor === undefined) return props.expression;
143
+
144
+ // RETURNS WITH TRANSFORMATION
145
+ const result: ts.Expression | null = functor()({
146
+ context: props.context,
147
+ modulo: props.expression.expression,
148
+ expression: props.expression,
149
+ });
150
+ return result ?? props.expression;
151
+ };
152
152
 
153
153
  const isTarget = (location: string): boolean => {
154
154
  const files: string[] = Object.keys(FUNCTORS);