@dudousxd/nestjs-codegen 0.22.1 → 0.23.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.
@@ -998,6 +998,7 @@ function classifyTypeKeyword(raw) {
998
998
  function markNullable(r, nullable) {
999
999
  return nullable ? { ...r, nullable: true } : r;
1000
1000
  }
1001
+ var TRANSPARENT_TYPE_BRANDS = /* @__PURE__ */ new Set(["Opt", "Hidden"]);
1001
1002
  function classifyTypeNode(typeNode, sourceFile, project, opts) {
1002
1003
  if (import_ts_morph3.Node.isUnionTypeNode(typeNode)) {
1003
1004
  let nullable = false;
@@ -1056,6 +1057,11 @@ function classifyTypeNode(typeNode, sourceFile, project, opts) {
1056
1057
  const refName = typeNode.getTypeName().getText();
1057
1058
  if (refName === "Date") return { kind: "date" };
1058
1059
  if (refName === "Record" || refName === "Object") return { kind: "json" };
1060
+ const unwrapped = TRANSPARENT_TYPE_BRANDS.has(refName) ? typeNode.getTypeArguments()[0] : void 0;
1061
+ if (unwrapped) {
1062
+ const inner = classifyTypeNode(unwrapped, sourceFile, project, opts);
1063
+ return inner;
1064
+ }
1059
1065
  const typeRef = opts?.resolveRef?.(refName) ?? null;
1060
1066
  const en = resolveEnumValues(refName, sourceFile, project);
1061
1067
  if (en) {
@@ -5039,7 +5045,7 @@ async function watch(config, onChange, options = {}) {
5039
5045
  }
5040
5046
 
5041
5047
  // src/index.ts
5042
- var VERSION = "0.22.1";
5048
+ var VERSION = "0.23.0";
5043
5049
 
5044
5050
  // src/generate-manifest.ts
5045
5051
  var MANIFEST_FILE = ".codegen-manifest.json";