@lowerdeck/rpc-client 1.0.0 → 1.0.1

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.
@@ -1,11 +1,17 @@
1
1
 
2
2
  $ microbundle
3
- Build "@lowerdeck/anonymize-ip" to dist:
4
- 857 B: index.cjs.gz
5
- 760 B: index.cjs.br
6
- 798 B: index.module.js.gz
7
- 713 B: index.module.js.br
8
- 863 B: index.module.js.gz
9
- 759 B: index.module.js.br
10
- 917 B: index.umd.js.gz
11
- 805 B: index.umd.js.br
3
+ No name was provided for external module '@lowerdeck/canonicalize' in output.globals – guessing 'canonicalize'
4
+ No name was provided for external module '@lowerdeck/error' in output.globals – guessing 'error'
5
+ No name was provided for external module '@lowerdeck/serialize' in output.globals – guessing 'serialize'
6
+ No name was provided for external module '@lowerdeck/id' in output.globals – guessing 'id'
7
+ No name was provided for external module '@lowerdeck/memo' in output.globals – guessing 'memo'
8
+ No name was provided for external module '@lowerdeck/proxy' in output.globals – guessing 'proxy'
9
+ Build "@lowerdeck/rpc-client" to dist:
10
+ 2.4 kB: index.cjs.gz
11
+ 2.16 kB: index.cjs.br
12
+ 1383 B: index.module.js.gz
13
+ 1212 B: index.module.js.br
14
+ 2.39 kB: index.module.js.gz
15
+ 2.16 kB: index.module.js.br
16
+ 2.5 kB: index.umd.js.gz
17
+ 2.27 kB: index.umd.js.br
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @lowerdeck/rpc-client
2
+
3
+ ## 1.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - add readmes
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # `@lowerdeck/rpc-client`
2
+
3
+ Type-safe RPC client for making remote procedure calls. Provides automatic serialization, error handling, and request memoization.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @lowerdeck/rpc-client
9
+ yarn add @lowerdeck/rpc-client
10
+ bun add @lowerdeck/rpc-client
11
+ pnpm add @lowerdeck/rpc-client
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ ```typescript
17
+ import { createClient } from '@lowerdeck/rpc-client';
18
+
19
+ // Define your API interface
20
+ interface API {
21
+ getUser(id: string): Promise<{ name: string; email: string }>;
22
+ createPost(data: { title: string; content: string }): Promise<{ id: string }>;
23
+ }
24
+
25
+ // Create a type-safe client
26
+ const client = createClient<API>({
27
+ url: 'https://api.example.com/rpc'
28
+ });
29
+
30
+ // Make RPC calls with full type safety
31
+ const user = await client.getUser('user_123');
32
+ console.log(user.name);
33
+
34
+ const post = await client.createPost({
35
+ title: 'Hello World',
36
+ content: 'This is my first post'
37
+ });
38
+ console.log(post.id);
39
+ ```
40
+
41
+ ## License
42
+
43
+ This project is licensed under the Apache License 2.0.
44
+
45
+ <div align="center">
46
+ <sub>Built with ❤️ by <a href="https://metorial.com">Metorial</a></sub>
47
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowerdeck/rpc-client",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },