@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.
package/dist/index.cjs CHANGED
@@ -1401,6 +1401,7 @@ function classifyTypeKeyword(raw) {
1401
1401
  function markNullable(r, nullable) {
1402
1402
  return nullable ? { ...r, nullable: true } : r;
1403
1403
  }
1404
+ var TRANSPARENT_TYPE_BRANDS = /* @__PURE__ */ new Set(["Opt", "Hidden"]);
1404
1405
  function classifyTypeNode(typeNode, sourceFile, project, opts) {
1405
1406
  if (import_ts_morph4.Node.isUnionTypeNode(typeNode)) {
1406
1407
  let nullable = false;
@@ -1459,6 +1460,11 @@ function classifyTypeNode(typeNode, sourceFile, project, opts) {
1459
1460
  const refName = typeNode.getTypeName().getText();
1460
1461
  if (refName === "Date") return { kind: "date" };
1461
1462
  if (refName === "Record" || refName === "Object") return { kind: "json" };
1463
+ const unwrapped = TRANSPARENT_TYPE_BRANDS.has(refName) ? typeNode.getTypeArguments()[0] : void 0;
1464
+ if (unwrapped) {
1465
+ const inner = classifyTypeNode(unwrapped, sourceFile, project, opts);
1466
+ return inner;
1467
+ }
1462
1468
  const typeRef = opts?.resolveRef?.(refName) ?? null;
1463
1469
  const en = resolveEnumValues(refName, sourceFile, project);
1464
1470
  if (en) {
@@ -5371,7 +5377,7 @@ function createChainModuleRenderer(opts) {
5371
5377
  }
5372
5378
 
5373
5379
  // src/index.ts
5374
- var VERSION = "0.22.1";
5380
+ var VERSION = "0.23.0";
5375
5381
  // Annotate the CommonJS export names for ESM import in node:
5376
5382
  0 && (module.exports = {
5377
5383
  CodegenError,