@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.
@@ -257,7 +257,6 @@ function resolveImportedType(name, sourceFile, project) {
257
257
  if (!namedImport) continue;
258
258
  const moduleSpecifier = importDecl.getModuleSpecifierValue();
259
259
  const candidates = resolveModuleSpecifier(moduleSpecifier, sourceFile, project);
260
- if (candidates.length === 0) continue;
261
260
  for (const candidate of candidates) {
262
261
  let importedFile = project.getSourceFile(candidate);
263
262
  if (!importedFile) {
@@ -272,9 +271,25 @@ function resolveImportedType(name, sourceFile, project) {
272
271
  const viaReExport = resolveReExportedType(name, importedFile, project, /* @__PURE__ */ new Set());
273
272
  if (viaReExport) return viaReExport;
274
273
  }
274
+ if (candidates.length === 0) {
275
+ const viaCompiler = resolveBareSpecifierType(name, importDecl, project);
276
+ if (viaCompiler) return viaCompiler;
277
+ }
275
278
  }
276
279
  return resolveReExportedType(name, sourceFile, project, /* @__PURE__ */ new Set());
277
280
  }
281
+ function resolveBareSpecifierType(name, importDecl, project) {
282
+ let target;
283
+ try {
284
+ target = importDecl.getModuleSpecifierSourceFile();
285
+ } catch {
286
+ return null;
287
+ }
288
+ if (!target) return null;
289
+ const direct = findTypeInFile(name, target);
290
+ if (direct) return direct;
291
+ return resolveReExportedType(name, target, project, /* @__PURE__ */ new Set());
292
+ }
278
293
  function resolveReExportedType(name, file, project, seen) {
279
294
  const filePath = file.getFilePath();
280
295
  if (seen.has(filePath)) return null;