gencow 0.1.116 → 0.1.117

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/core/index.js CHANGED
@@ -1800,11 +1800,13 @@ function parseArgs(schema, args) {
1800
1800
  }
1801
1801
  }
1802
1802
  if (typeof schema === "object" && schema !== null) {
1803
+ const schemaKeys = Object.keys(schema);
1804
+ if (schemaKeys.length === 0) return args;
1803
1805
  if (typeof args !== "object" || args === null) {
1804
1806
  throw new GencowValidationError("Expected an object for arguments");
1805
1807
  }
1806
1808
  const result = {};
1807
- for (const key in schema) {
1809
+ for (const key of schemaKeys) {
1808
1810
  const validator = schema[key];
1809
1811
  if (validator && typeof validator.parse === "function") {
1810
1812
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gencow",
3
- "version": "0.1.116",
3
+ "version": "0.1.117",
4
4
  "description": "Gencow — AI Backend Engine",
5
5
  "type": "module",
6
6
  "bin": {
package/server/index.js CHANGED
@@ -1745,11 +1745,13 @@ function parseArgs(schema, args) {
1745
1745
  }
1746
1746
  }
1747
1747
  if (typeof schema === "object" && schema !== null) {
1748
+ const schemaKeys = Object.keys(schema);
1749
+ if (schemaKeys.length === 0) return args;
1748
1750
  if (typeof args !== "object" || args === null) {
1749
1751
  throw new GencowValidationError("Expected an object for arguments");
1750
1752
  }
1751
1753
  const result = {};
1752
- for (const key in schema) {
1754
+ for (const key of schemaKeys) {
1753
1755
  const validator = schema[key];
1754
1756
  if (validator && typeof validator.parse === "function") {
1755
1757
  try {
@@ -54258,6 +54260,7 @@ async function main() {
54258
54260
  if (contentType.includes("multipart/form-data")) {
54259
54261
  const body = await c.req.parseBody();
54260
54262
  name21 = body._mutation;
54263
+ delete body._mutation;
54261
54264
  args = body;
54262
54265
  } else {
54263
54266
  const body = await c.req.json().catch(() => ({}));