tthr 0.0.49 → 0.0.51

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -191,7 +191,8 @@ async function deployFunctionsToServer(projectId, token, functionsDir, environme
191
191
  functions: functions.map((fn) => ({
192
192
  name: fn.name,
193
193
  type: fn.type,
194
- source: fn.source
194
+ source: fn.source,
195
+ args: fn.args
195
196
  }))
196
197
  })
197
198
  });
@@ -380,11 +381,17 @@ function parseFunctions(moduleName, source) {
380
381
  endIndex = i;
381
382
  }
382
383
  const fnBody = source.slice(startIndex, endIndex);
384
+ let args;
385
+ const argsMatch = fnBody.match(/args\s*:\s*(z\.object\s*\(\s*\{[\s\S]*?\}\s*\))/);
386
+ if (argsMatch) {
387
+ args = argsMatch[1];
388
+ }
383
389
  functions.push({
384
390
  name: `${moduleName}.${fnName}`,
385
391
  type: fnType,
386
392
  file: `${moduleName}.ts`,
387
- source: `${fnType}(${fnBody})`
393
+ source: `${fnType}(${fnBody})`,
394
+ args
388
395
  });
389
396
  }
390
397
  return functions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tthr",
3
- "version": "0.0.49",
3
+ "version": "0.0.51",
4
4
  "description": "Tether CLI - project scaffolding and deployment",
5
5
  "type": "module",
6
6
  "bin": {