@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.d.cts CHANGED
@@ -382,6 +382,6 @@ interface FastDiscoveryOptions {
382
382
  }
383
383
  declare function discoverContractsFast(opts: FastDiscoveryOptions): Promise<RouteDescriptor[]>;
384
384
 
385
- declare const VERSION = "0.22.1";
385
+ declare const VERSION = "0.23.0";
386
386
 
387
387
  export { type ChainModuleRendererOptions, CodegenError, type CodegenManifest, ConfigError, DriftGuardError, type EntryPoint, type FastDiscoveryOptions, type JsonSchema, type MocksEmitOptions, type OpenApiDocument, type OpenApiEmitOptions, type OpenApiInfo, RenderContext, RenderedModule, ResolvedConfig, RouteDescriptor, SchemaModule, SchemaNode, type TsTypeContext, UserConfig, VERSION, ValidationAdapter, type WatchOptions, type Watcher, acquireLock, buildMocksFile, buildOpenApiSpec, createChainModuleRenderer, defineConfig, discoverContractsFast, emitApi, emitForms, emitMocks, emitOpenApi, emitRoutes, extractSchemaFromDto, generate, loadConfig, renderTsType, resolveConfig, schemaModuleToJsonSchema, schemaNodeToJsonSchema, toObjectKey, typeNameFor, watch };
package/dist/index.d.ts CHANGED
@@ -382,6 +382,6 @@ interface FastDiscoveryOptions {
382
382
  }
383
383
  declare function discoverContractsFast(opts: FastDiscoveryOptions): Promise<RouteDescriptor[]>;
384
384
 
385
- declare const VERSION = "0.22.1";
385
+ declare const VERSION = "0.23.0";
386
386
 
387
387
  export { type ChainModuleRendererOptions, CodegenError, type CodegenManifest, ConfigError, DriftGuardError, type EntryPoint, type FastDiscoveryOptions, type JsonSchema, type MocksEmitOptions, type OpenApiDocument, type OpenApiEmitOptions, type OpenApiInfo, RenderContext, RenderedModule, ResolvedConfig, RouteDescriptor, SchemaModule, SchemaNode, type TsTypeContext, UserConfig, VERSION, ValidationAdapter, type WatchOptions, type Watcher, acquireLock, buildMocksFile, buildOpenApiSpec, createChainModuleRenderer, defineConfig, discoverContractsFast, emitApi, emitForms, emitMocks, emitOpenApi, emitRoutes, extractSchemaFromDto, generate, loadConfig, renderTsType, resolveConfig, schemaModuleToJsonSchema, schemaNodeToJsonSchema, toObjectKey, typeNameFor, watch };
package/dist/index.js CHANGED
@@ -1356,6 +1356,7 @@ function classifyTypeKeyword(raw) {
1356
1356
  function markNullable(r, nullable) {
1357
1357
  return nullable ? { ...r, nullable: true } : r;
1358
1358
  }
1359
+ var TRANSPARENT_TYPE_BRANDS = /* @__PURE__ */ new Set(["Opt", "Hidden"]);
1359
1360
  function classifyTypeNode(typeNode, sourceFile, project, opts) {
1360
1361
  if (Node4.isUnionTypeNode(typeNode)) {
1361
1362
  let nullable = false;
@@ -1414,6 +1415,11 @@ function classifyTypeNode(typeNode, sourceFile, project, opts) {
1414
1415
  const refName = typeNode.getTypeName().getText();
1415
1416
  if (refName === "Date") return { kind: "date" };
1416
1417
  if (refName === "Record" || refName === "Object") return { kind: "json" };
1418
+ const unwrapped = TRANSPARENT_TYPE_BRANDS.has(refName) ? typeNode.getTypeArguments()[0] : void 0;
1419
+ if (unwrapped) {
1420
+ const inner = classifyTypeNode(unwrapped, sourceFile, project, opts);
1421
+ return inner;
1422
+ }
1417
1423
  const typeRef = opts?.resolveRef?.(refName) ?? null;
1418
1424
  const en = resolveEnumValues(refName, sourceFile, project);
1419
1425
  if (en) {
@@ -5326,7 +5332,7 @@ function createChainModuleRenderer(opts) {
5326
5332
  }
5327
5333
 
5328
5334
  // src/index.ts
5329
- var VERSION = "0.22.1";
5335
+ var VERSION = "0.23.0";
5330
5336
  export {
5331
5337
  CodegenError,
5332
5338
  ConfigError,