orpc-file-based-router 0.0.17 → 0.0.18
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/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +7 -3
package/dist/index.cjs
CHANGED
|
@@ -50,7 +50,7 @@ async function generateRouter(routesDir, outputFile) {
|
|
|
50
50
|
`;
|
|
51
51
|
routerContent += importPaths.map((x, i) => `import { ${Object.keys(exports[i].exports).join(", ")} } from "./${x}"`).join("\n");
|
|
52
52
|
routerContent += "\n\nexport const router = ";
|
|
53
|
-
routerContent += JSON.stringify(content, null, 2).replace(/"/g, "");
|
|
53
|
+
routerContent += JSON.stringify(content, null, 2).replace(/"/g, "").replace(/(\s*)([a-zA-Z0-9]+-[a-zA-Z0-9-]+):/g, '$1"$2":');
|
|
54
54
|
node_fs.writeFileSync(path.join(outputFile), routerContent);
|
|
55
55
|
}
|
|
56
56
|
function buildRoutePath(parsedFile) {
|
package/dist/index.mjs
CHANGED
|
@@ -44,7 +44,7 @@ async function generateRouter(routesDir, outputFile) {
|
|
|
44
44
|
`;
|
|
45
45
|
routerContent += importPaths.map((x, i) => `import { ${Object.keys(exports[i].exports).join(", ")} } from "./${x}"`).join("\n");
|
|
46
46
|
routerContent += "\n\nexport const router = ";
|
|
47
|
-
routerContent += JSON.stringify(content, null, 2).replace(/"/g, "");
|
|
47
|
+
routerContent += JSON.stringify(content, null, 2).replace(/"/g, "").replace(/(\s*)([a-zA-Z0-9]+-[a-zA-Z0-9-]+):/g, '$1"$2":');
|
|
48
48
|
writeFileSync(join(outputFile), routerContent);
|
|
49
49
|
}
|
|
50
50
|
function buildRoutePath(parsedFile) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orpc-file-based-router",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "File-based router plugin for oRPC - automatically generate oRPC router from your file structure",
|
|
5
5
|
"author": "zeeeeby",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,7 +33,11 @@
|
|
|
33
33
|
"type-check": "tsc --noEmit"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
+
"@orpc/client": "^1.8.5",
|
|
37
|
+
"@orpc/server": "^1.8.5",
|
|
36
38
|
"@types/node": "^22.14.0",
|
|
37
|
-
"unbuild": "^3.5.0"
|
|
39
|
+
"unbuild": "^3.5.0",
|
|
40
|
+
"vitest": "^3.2.4",
|
|
41
|
+
"zod": "^4.1.3"
|
|
38
42
|
}
|
|
39
|
-
}
|
|
43
|
+
}
|