@dudousxd/nestjs-inertia-codegen 1.0.4 → 1.0.5
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 +9 -0
- package/dist/cli/main.cjs +16 -2
- package/dist/cli/main.cjs.map +1 -1
- package/dist/cli/main.js +16 -2
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +16 -2
- 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 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog — @dudousxd/nestjs-inertia-codegen
|
|
2
2
|
|
|
3
|
+
## 1.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix(codegen): consistent camelCase route names for all routes (not just @ApplyContract)
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @dudousxd/nestjs-inertia@1.0.5
|
|
11
|
+
|
|
3
12
|
## 1.0.4
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/cli/main.cjs
CHANGED
|
@@ -1186,7 +1186,21 @@ function extractFromSourceFile(sourceFile, project) {
|
|
|
1186
1186
|
const combined = joinPaths(prefix, handlerPath);
|
|
1187
1187
|
const params = extractParams(combined);
|
|
1188
1188
|
const methodName = method.getName();
|
|
1189
|
-
const
|
|
1189
|
+
const classAsDecorator = cls.getDecorator("As");
|
|
1190
|
+
let classAs;
|
|
1191
|
+
if (classAsDecorator) {
|
|
1192
|
+
const classAsArgs = classAsDecorator.getArguments();
|
|
1193
|
+
const classAsName = decoratorStringArg(classAsArgs[0]);
|
|
1194
|
+
if (classAsName) classAs = classAsName;
|
|
1195
|
+
}
|
|
1196
|
+
const methodAsDecorator = method.getDecorator("As");
|
|
1197
|
+
let methodAs;
|
|
1198
|
+
if (methodAsDecorator) {
|
|
1199
|
+
const methodAsArgs = methodAsDecorator.getArguments();
|
|
1200
|
+
const methodAsName = decoratorStringArg(methodAsArgs[0]);
|
|
1201
|
+
if (methodAsName) methodAs = methodAsName;
|
|
1202
|
+
}
|
|
1203
|
+
const routeName = resolveRouteName(className, methodName, classAs, methodAs);
|
|
1190
1204
|
const dtoContract = extractDtoContract(method, sourceFile, project);
|
|
1191
1205
|
routes.push({
|
|
1192
1206
|
method: httpMethod,
|
|
@@ -1372,7 +1386,7 @@ async function watch(config, onChange) {
|
|
|
1372
1386
|
__name(watch, "watch");
|
|
1373
1387
|
|
|
1374
1388
|
// src/index.ts
|
|
1375
|
-
var VERSION = "1.0.
|
|
1389
|
+
var VERSION = "1.0.5";
|
|
1376
1390
|
|
|
1377
1391
|
// src/cli/codegen.ts
|
|
1378
1392
|
async function runCodegen(opts = {}) {
|