routesync 1.0.11 → 1.0.12
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/dist/cli.js +3 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -8620,7 +8620,7 @@ var SDKGenerator = class _SDKGenerator {
|
|
|
8620
8620
|
if (options.zod) {
|
|
8621
8621
|
for (const [group, routes] of Object.entries(grouped)) {
|
|
8622
8622
|
for (const route of routes) {
|
|
8623
|
-
if (route.
|
|
8623
|
+
if (route.schema?.rules) {
|
|
8624
8624
|
usesZod = true;
|
|
8625
8625
|
zodRoutes.add(`${group}.${route.actionName}`);
|
|
8626
8626
|
}
|
|
@@ -8643,8 +8643,8 @@ var SDKGenerator = class _SDKGenerator {
|
|
|
8643
8643
|
lines.push(` method: '${route.method}',`);
|
|
8644
8644
|
lines.push(` path: '${route.runtimePath}',`);
|
|
8645
8645
|
if (route.auth) lines.push(` auth: true,`);
|
|
8646
|
-
if (options.zod && route.
|
|
8647
|
-
const zodSchema = _SDKGenerator.translateRulesToZod(route.
|
|
8646
|
+
if (options.zod && route.schema?.rules) {
|
|
8647
|
+
const zodSchema = _SDKGenerator.translateRulesToZod(route.schema.rules);
|
|
8648
8648
|
lines.push(` schema: {`);
|
|
8649
8649
|
lines.push(` body: ${zodSchema}`);
|
|
8650
8650
|
lines.push(` },`);
|