@dudousxd/nestjs-codegen 0.7.0 → 0.7.1
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 +16 -11
- package/dist/cli/main.cjs.map +1 -1
- package/dist/cli/main.js +16 -11
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +16 -11
- 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 +16 -11
- package/dist/index.js.map +1 -1
- package/dist/nest/index.cjs.map +1 -1
- package/dist/nest/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @dudousxd/nestjs-codegen
|
|
2
2
|
|
|
3
|
+
## 0.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b8a8ce4: fix(core): load the TypeScript config via Node's native type-stripping first, falling back to tsx — unblocks the codegen CLI on Node 25 where tsx 4.22.4's resolver appends a `?namespace=<ts>` query that Node 25's stricter `finalizeResolution` rejects with `ERR_MODULE_NOT_FOUND`. tsx remains the fallback for older Node versions without native type stripping.
|
|
8
|
+
|
|
3
9
|
## 0.7.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/cli/main.cjs
CHANGED
|
@@ -78,18 +78,23 @@ async function fileExists(filePath) {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
async function importTs(filePath) {
|
|
81
|
-
|
|
81
|
+
const fileUrl = (0, import_node_url.pathToFileURL)(filePath).href;
|
|
82
82
|
try {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
return await import(fileUrl);
|
|
84
|
+
} catch (nativeError) {
|
|
85
|
+
let tsImport;
|
|
86
|
+
try {
|
|
87
|
+
const tsxEsm = await import("tsx/esm/api");
|
|
88
|
+
tsImport = tsxEsm.tsImport;
|
|
89
|
+
} catch {
|
|
90
|
+
throw new ConfigError(
|
|
91
|
+
"Failed to load config: `tsx` is required for loading TypeScript config files. Install it as a dev dependency: pnpm add -D tsx",
|
|
92
|
+
{ cause: nativeError }
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
const parentURL = (0, import_node_url.pathToFileURL)(`${filePath}__parent__`).href;
|
|
96
|
+
return tsImport(fileUrl, { parentURL });
|
|
89
97
|
}
|
|
90
|
-
const parentURL = (0, import_node_url.pathToFileURL)(`${filePath}__parent__`).href;
|
|
91
|
-
const fileUrl = (0, import_node_url.pathToFileURL)(filePath).href;
|
|
92
|
-
return tsImport(fileUrl, { parentURL });
|
|
93
98
|
}
|
|
94
99
|
function resolveAbsolute(cwd, p) {
|
|
95
100
|
if ((0, import_node_path.isAbsolute)(p)) return p;
|
|
@@ -4476,7 +4481,7 @@ async function watch(config, onChange) {
|
|
|
4476
4481
|
}
|
|
4477
4482
|
|
|
4478
4483
|
// src/index.ts
|
|
4479
|
-
var VERSION = "0.7.
|
|
4484
|
+
var VERSION = "0.7.1";
|
|
4480
4485
|
|
|
4481
4486
|
// src/cli/codegen.ts
|
|
4482
4487
|
async function runCodegen(opts = {}) {
|