@dudousxd/nestjs-codegen 0.5.2 → 0.6.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
@@ -2304,7 +2304,6 @@ function resolveImportedType(name, sourceFile, project) {
2304
2304
  if (!namedImport) continue;
2305
2305
  const moduleSpecifier = importDecl.getModuleSpecifierValue();
2306
2306
  const candidates = resolveModuleSpecifier(moduleSpecifier, sourceFile, project);
2307
- if (candidates.length === 0) continue;
2308
2307
  for (const candidate of candidates) {
2309
2308
  let importedFile = project.getSourceFile(candidate);
2310
2309
  if (!importedFile) {
@@ -2319,9 +2318,25 @@ function resolveImportedType(name, sourceFile, project) {
2319
2318
  const viaReExport = resolveReExportedType(name, importedFile, project, /* @__PURE__ */ new Set());
2320
2319
  if (viaReExport) return viaReExport;
2321
2320
  }
2321
+ if (candidates.length === 0) {
2322
+ const viaCompiler = resolveBareSpecifierType(name, importDecl, project);
2323
+ if (viaCompiler) return viaCompiler;
2324
+ }
2322
2325
  }
2323
2326
  return resolveReExportedType(name, sourceFile, project, /* @__PURE__ */ new Set());
2324
2327
  }
2328
+ function resolveBareSpecifierType(name, importDecl, project) {
2329
+ let target;
2330
+ try {
2331
+ target = importDecl.getModuleSpecifierSourceFile();
2332
+ } catch {
2333
+ return null;
2334
+ }
2335
+ if (!target) return null;
2336
+ const direct = findTypeInFile(name, target);
2337
+ if (direct) return direct;
2338
+ return resolveReExportedType(name, target, project, /* @__PURE__ */ new Set());
2339
+ }
2325
2340
  function resolveReExportedType(name, file, project, seen) {
2326
2341
  const filePath = file.getFilePath();
2327
2342
  if (seen.has(filePath)) return null;
@@ -4565,7 +4580,7 @@ function createChainModuleRenderer(opts) {
4565
4580
  }
4566
4581
 
4567
4582
  // src/index.ts
4568
- var VERSION = "0.5.2";
4583
+ var VERSION = "0.6.0";
4569
4584
  // Annotate the CommonJS export names for ESM import in node:
4570
4585
  0 && (module.exports = {
4571
4586
  CodegenError,