@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/dist/cli/main.js
CHANGED
|
@@ -1154,7 +1154,21 @@ function extractFromSourceFile(sourceFile, project) {
|
|
|
1154
1154
|
const combined = joinPaths(prefix, handlerPath);
|
|
1155
1155
|
const params = extractParams(combined);
|
|
1156
1156
|
const methodName = method.getName();
|
|
1157
|
-
const
|
|
1157
|
+
const classAsDecorator = cls.getDecorator("As");
|
|
1158
|
+
let classAs;
|
|
1159
|
+
if (classAsDecorator) {
|
|
1160
|
+
const classAsArgs = classAsDecorator.getArguments();
|
|
1161
|
+
const classAsName = decoratorStringArg(classAsArgs[0]);
|
|
1162
|
+
if (classAsName) classAs = classAsName;
|
|
1163
|
+
}
|
|
1164
|
+
const methodAsDecorator = method.getDecorator("As");
|
|
1165
|
+
let methodAs;
|
|
1166
|
+
if (methodAsDecorator) {
|
|
1167
|
+
const methodAsArgs = methodAsDecorator.getArguments();
|
|
1168
|
+
const methodAsName = decoratorStringArg(methodAsArgs[0]);
|
|
1169
|
+
if (methodAsName) methodAs = methodAsName;
|
|
1170
|
+
}
|
|
1171
|
+
const routeName = resolveRouteName(className, methodName, classAs, methodAs);
|
|
1158
1172
|
const dtoContract = extractDtoContract(method, sourceFile, project);
|
|
1159
1173
|
routes.push({
|
|
1160
1174
|
method: httpMethod,
|
|
@@ -1340,7 +1354,7 @@ async function watch(config, onChange) {
|
|
|
1340
1354
|
__name(watch, "watch");
|
|
1341
1355
|
|
|
1342
1356
|
// src/index.ts
|
|
1343
|
-
var VERSION = "1.0.
|
|
1357
|
+
var VERSION = "1.0.5";
|
|
1344
1358
|
|
|
1345
1359
|
// src/cli/codegen.ts
|
|
1346
1360
|
async function runCodegen(opts = {}) {
|