@seam-rpc/server 4.3.20 → 4.3.22

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.
@@ -119,7 +119,7 @@ function convert(schema) {
119
119
  export async function generateClientFile({ tsPath, jsPath, outputPath, }) {
120
120
  const tsFile = path.resolve(process.cwd(), tsPath);
121
121
  const tsFileName = path.basename(tsFile).slice(0, -path.extname(tsFile).length);
122
- const routerName = path.basename(tsFile).slice(0, tsFile.indexOf("."));
122
+ const routerName = tsFileName.slice(0, tsFileName.indexOf("."));
123
123
  const jsFile = path.resolve(process.cwd(), path.join(jsPath, tsFileName + ".js"));
124
124
  if (!existsSync(tsFile)) {
125
125
  throw new Error(`TS file not found: ${tsFile}`);
@@ -138,7 +138,7 @@ export async function generateClientFile({ tsPath, jsPath, outputPath, }) {
138
138
  * +===================================+
139
139
  */
140
140
 
141
- import { callApi } from "@seam-rpc/client";
141
+ import { callApi, RpcError } from "@seam-rpc/client";
142
142
 
143
143
  `;
144
144
  const functions = [];
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import EventEmitter from "events";
3
3
  import express, { Express, NextFunction, Request, RequestHandler, Response } from "express";
4
4
  import * as z from "zod";
5
5
  export { RpcError };
6
+ export type { Result };
6
7
  export interface RouterDefinition {
7
8
  [procName: string]: (...args: any[]) => Promise<any>;
8
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seam-rpc/server",
3
- "version": "4.3.20",
3
+ "version": "4.3.22",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "bin": {