@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/index.cjs
CHANGED
|
@@ -740,12 +740,18 @@ function findTypeInFile(name, file) {
|
|
|
740
740
|
function resolveModuleSpecifier(moduleSpecifier, sourceFile, project) {
|
|
741
741
|
if (moduleSpecifier.startsWith(".")) {
|
|
742
742
|
const dir = (0, import_node_path4.dirname)(sourceFile.getFilePath());
|
|
743
|
-
const
|
|
744
|
-
|
|
745
|
-
|
|
743
|
+
const ext = /\.(c|m)?(j|t)sx?$/.exec(moduleSpecifier)?.[0];
|
|
744
|
+
const base = ext ? moduleSpecifier.slice(0, -ext.length) : moduleSpecifier;
|
|
745
|
+
const flavour = ext?.startsWith(".c") ? "c" : ext?.startsWith(".m") ? "m" : "";
|
|
746
|
+
const candidates = [
|
|
747
|
+
(0, import_node_path4.resolve)(dir, `${base}.${flavour}ts`),
|
|
748
|
+
...flavour === "" ? [(0, import_node_path4.resolve)(dir, `${base}.tsx`)] : [],
|
|
746
749
|
(0, import_node_path4.resolve)(dir, `${moduleSpecifier}.ts`),
|
|
747
|
-
(0, import_node_path4.resolve)(dir, moduleSpecifier, "index.ts")
|
|
750
|
+
(0, import_node_path4.resolve)(dir, moduleSpecifier, "index.ts"),
|
|
751
|
+
(0, import_node_path4.resolve)(dir, `${base}.d.${flavour}ts`),
|
|
752
|
+
...ext === void 0 ? [(0, import_node_path4.resolve)(dir, moduleSpecifier, "index.d.ts")] : []
|
|
748
753
|
];
|
|
754
|
+
return [...new Set(candidates)];
|
|
749
755
|
}
|
|
750
756
|
const ctx = _ctxFor(project);
|
|
751
757
|
const baseUrl = ctx.pathsBase ?? ctx.projectRoot;
|
|
@@ -6139,7 +6145,7 @@ function createChainModuleRenderer(opts) {
|
|
|
6139
6145
|
}
|
|
6140
6146
|
|
|
6141
6147
|
// src/index.ts
|
|
6142
|
-
var VERSION = "0.27.
|
|
6148
|
+
var VERSION = "0.27.2";
|
|
6143
6149
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6144
6150
|
0 && (module.exports = {
|
|
6145
6151
|
CodegenError,
|