@rife/orpc 0.0.0-stage → 0.0.1-beta.2

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/app.mjs ADDED
@@ -0,0 +1,10 @@
1
+ // @ts-check
2
+ import { defineConfig } from '@rife/cli';
3
+ import { pluginRslib } from '@rife/plugin-rstack';
4
+
5
+ export default defineConfig([
6
+ {
7
+ name: 'app',
8
+ plugins: [pluginRslib({})],
9
+ },
10
+ ]);
package/package.json CHANGED
@@ -1,6 +1,41 @@
1
1
  {
2
2
  "name": "@rife/orpc",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.0.1-beta.2",
4
+ "description": "",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./src/index.ts",
9
+ "require": "./dist/cjs/index.cjs",
10
+ "import": "./dist/esm/index.mjs"
11
+ }
12
+ },
13
+ "dependencies": {
14
+ "zod": "^4.3.6",
15
+ "@orpc/server": "2.0.0-beta.43",
16
+ "@orpc/client": "2.0.0-beta.43",
17
+ "@orpc/pino": "2.0.0-beta.43",
18
+ "@orpc/contract": "2.0.0-beta.43",
19
+ "@orpc/openapi": "2.0.0-beta.43",
20
+ "@orpc/shared": "2.0.0-beta.43"
21
+ },
22
+ "devDependencies": {
23
+ "@rife/plugin-rstack": "0.0.1-beta.27"
24
+ },
25
+ "rife": {
26
+ "hostDependencies": {
27
+ "zod": true,
28
+ "@orpc/server": true,
29
+ "@orpc/client": true,
30
+ "@orpc/pino": true,
31
+ "@orpc/contract": true,
32
+ "@orpc/openapi": true,
33
+ "@orpc/shared": true
34
+ }
35
+ },
36
+ "scripts": {
37
+ "dev": "rife dev",
38
+ "build": "rife build",
39
+ "release": "rife release"
40
+ }
6
41
  }
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './util';
package/src/util.ts ADDED
@@ -0,0 +1,9 @@
1
+ import fs from 'fs-extra';
2
+ import { minifyRouterContract } from '@orpc/contract';
3
+ import { type AnyRouter, unlazyRouter } from '@orpc/server';
4
+
5
+ export async function exportContract(router: AnyRouter, file: string) {
6
+ const compatibleContract = await unlazyRouter(router);
7
+ const minifiedRouter = minifyRouterContract(compatibleContract);
8
+ fs.writeJSON(file, minifiedRouter, { spaces: 4 });
9
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "@rife/config/tsconfig.json", // 继承 packages 目录下通用配置
3
+ "compilerOptions": {
4
+ "rootDir": "./src",
5
+ "paths": {
6
+ "@/*": ["./src/*"]
7
+ },
8
+ "tsBuildInfoFile": "./node_modules/.cache/.tsbuildinfo"
9
+ },
10
+ "include": ["./src/**/*"]
11
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.