@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/cli/main.js
CHANGED
|
@@ -685,12 +685,18 @@ function findTypeInFile(name, file) {
|
|
|
685
685
|
function resolveModuleSpecifier(moduleSpecifier, sourceFile, project) {
|
|
686
686
|
if (moduleSpecifier.startsWith(".")) {
|
|
687
687
|
const dir = dirname(sourceFile.getFilePath());
|
|
688
|
-
const
|
|
689
|
-
|
|
690
|
-
|
|
688
|
+
const ext = /\.(c|m)?(j|t)sx?$/.exec(moduleSpecifier)?.[0];
|
|
689
|
+
const base = ext ? moduleSpecifier.slice(0, -ext.length) : moduleSpecifier;
|
|
690
|
+
const flavour = ext?.startsWith(".c") ? "c" : ext?.startsWith(".m") ? "m" : "";
|
|
691
|
+
const candidates = [
|
|
692
|
+
resolve2(dir, `${base}.${flavour}ts`),
|
|
693
|
+
...flavour === "" ? [resolve2(dir, `${base}.tsx`)] : [],
|
|
691
694
|
resolve2(dir, `${moduleSpecifier}.ts`),
|
|
692
|
-
resolve2(dir, moduleSpecifier, "index.ts")
|
|
695
|
+
resolve2(dir, moduleSpecifier, "index.ts"),
|
|
696
|
+
resolve2(dir, `${base}.d.${flavour}ts`),
|
|
697
|
+
...ext === void 0 ? [resolve2(dir, moduleSpecifier, "index.d.ts")] : []
|
|
693
698
|
];
|
|
699
|
+
return [...new Set(candidates)];
|
|
694
700
|
}
|
|
695
701
|
const ctx = _ctxFor(project);
|
|
696
702
|
const baseUrl = ctx.pathsBase ?? ctx.projectRoot;
|
|
@@ -6005,7 +6011,7 @@ async function watch(config, onChange, options = {}) {
|
|
|
6005
6011
|
}
|
|
6006
6012
|
|
|
6007
6013
|
// src/index.ts
|
|
6008
|
-
var VERSION = "0.27.
|
|
6014
|
+
var VERSION = "0.27.2";
|
|
6009
6015
|
|
|
6010
6016
|
// src/cli/codegen.ts
|
|
6011
6017
|
async function runCodegen(opts = {}) {
|