@dudousxd/nestjs-codegen 0.27.1 → 0.27.2
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 +6 -0
- package/dist/cli/main.cjs +11 -5
- package/dist/cli/main.cjs.map +1 -1
- package/dist/cli/main.js +11 -5
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +11 -5
- 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 +11 -5
- package/dist/index.js.map +1 -1
- package/dist/nest/index.cjs +11 -5
- package/dist/nest/index.cjs.map +1 -1
- package/dist/nest/index.js +11 -5
- package/dist/nest/index.js.map +1 -1
- package/package.json +1 -1
package/dist/nest/index.cjs
CHANGED
|
@@ -279,12 +279,18 @@ function findTypeInFile(name, file) {
|
|
|
279
279
|
function resolveModuleSpecifier(moduleSpecifier, sourceFile, project) {
|
|
280
280
|
if (moduleSpecifier.startsWith(".")) {
|
|
281
281
|
const dir = (0, import_node_path2.dirname)(sourceFile.getFilePath());
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
|
|
282
|
+
const ext = /\.(c|m)?(j|t)sx?$/.exec(moduleSpecifier)?.[0];
|
|
283
|
+
const base = ext ? moduleSpecifier.slice(0, -ext.length) : moduleSpecifier;
|
|
284
|
+
const flavour = ext?.startsWith(".c") ? "c" : ext?.startsWith(".m") ? "m" : "";
|
|
285
|
+
const candidates = [
|
|
286
|
+
(0, import_node_path2.resolve)(dir, `${base}.${flavour}ts`),
|
|
287
|
+
...flavour === "" ? [(0, import_node_path2.resolve)(dir, `${base}.tsx`)] : [],
|
|
285
288
|
(0, import_node_path2.resolve)(dir, `${moduleSpecifier}.ts`),
|
|
286
|
-
(0, import_node_path2.resolve)(dir, moduleSpecifier, "index.ts")
|
|
289
|
+
(0, import_node_path2.resolve)(dir, moduleSpecifier, "index.ts"),
|
|
290
|
+
(0, import_node_path2.resolve)(dir, `${base}.d.${flavour}ts`),
|
|
291
|
+
...ext === void 0 ? [(0, import_node_path2.resolve)(dir, moduleSpecifier, "index.d.ts")] : []
|
|
287
292
|
];
|
|
293
|
+
return [...new Set(candidates)];
|
|
288
294
|
}
|
|
289
295
|
const ctx = _ctxFor(project);
|
|
290
296
|
const baseUrl = ctx.pathsBase ?? ctx.projectRoot;
|
|
@@ -5806,7 +5812,7 @@ async function watch(config, onChange, options = {}) {
|
|
|
5806
5812
|
}
|
|
5807
5813
|
|
|
5808
5814
|
// src/index.ts
|
|
5809
|
-
var VERSION = "0.27.
|
|
5815
|
+
var VERSION = "0.27.2";
|
|
5810
5816
|
|
|
5811
5817
|
// src/generate-manifest.ts
|
|
5812
5818
|
var MANIFEST_FILE = ".codegen-manifest.json";
|