@seam-rpc/server 4.3.21 → 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.
- package/dist/bin/generate.js +2 -2
- package/package.json +1 -1
package/dist/bin/generate.js
CHANGED
|
@@ -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 =
|
|
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 = [];
|