@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.
@@ -283,7 +283,6 @@ function resolveImportedType(name, sourceFile, project) {
283
283
  if (!namedImport) continue;
284
284
  const moduleSpecifier = importDecl.getModuleSpecifierValue();
285
285
  const candidates = resolveModuleSpecifier(moduleSpecifier, sourceFile, project);
286
- if (candidates.length === 0) continue;
287
286
  for (const candidate of candidates) {
288
287
  let importedFile = project.getSourceFile(candidate);
289
288
  if (!importedFile) {
@@ -298,9 +297,25 @@ function resolveImportedType(name, sourceFile, project) {
298
297
  const viaReExport = resolveReExportedType(name, importedFile, project, /* @__PURE__ */ new Set());
299
298
  if (viaReExport) return viaReExport;
300
299
  }
300
+ if (candidates.length === 0) {
301
+ const viaCompiler = resolveBareSpecifierType(name, importDecl, project);
302
+ if (viaCompiler) return viaCompiler;
303
+ }
301
304
  }
302
305
  return resolveReExportedType(name, sourceFile, project, /* @__PURE__ */ new Set());
303
306
  }
307
+ function resolveBareSpecifierType(name, importDecl, project) {
308
+ let target;
309
+ try {
310
+ target = importDecl.getModuleSpecifierSourceFile();
311
+ } catch {
312
+ return null;
313
+ }
314
+ if (!target) return null;
315
+ const direct = findTypeInFile(name, target);
316
+ if (direct) return direct;
317
+ return resolveReExportedType(name, target, project, /* @__PURE__ */ new Set());
318
+ }
304
319
  function resolveReExportedType(name, file, project, seen) {
305
320
  const filePath = file.getFilePath();
306
321
  if (seen.has(filePath)) return null;