@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/CHANGELOG.md +14 -0
- package/dist/cli/main.cjs +7 -1
- package/dist/cli/main.cjs.map +1 -1
- package/dist/cli/main.js +7 -1
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/nest/index.cjs +7 -1
- package/dist/nest/index.cjs.map +1 -1
- package/dist/nest/index.js +7 -1
- package/dist/nest/index.js.map +1 -1
- package/package.json +1 -1
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.
|
|
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,
|