@rpcbase/client 0.161.0 → 0.163.0

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.
@@ -6,9 +6,9 @@ import _set from "lodash/set"
6
6
 
7
7
  import get_txn_id from "@rpcbase/std/get_txn_id"
8
8
 
9
- import getBaseUrl from "./getBaseUrl"
10
- import getTenantId from "./auth/getTenantId"
11
- import {add_local_txn} from "./rts/rts"
9
+ import getBaseUrl from "../getBaseUrl"
10
+ import getTenantId from "../auth/getTenantId"
11
+ import {add_local_txn} from "../rts/rts"
12
12
 
13
13
  const TENANT_ID_HEADER = "rb-tenant-id"
14
14
 
@@ -19,7 +19,7 @@ const client = axios.create({
19
19
  },
20
20
  })
21
21
 
22
- const rpc_post = async(url, payload, options = {}) => {
22
+ const postRPC = async(url, payload, options = {}) => {
23
23
  if (!options?.headers?.["rts-txn-id"]) {
24
24
  _set(options, ["headers", "rts-txn-id"], get_txn_id())
25
25
  }
@@ -33,10 +33,10 @@ const rpc_post = async(url, payload, options = {}) => {
33
33
  const res = await client.post(`${getBaseUrl()}${url}`, payload, options)
34
34
 
35
35
  if (res.data === "") {
36
- console.warn("rpc_post:error: got empty res", res)
36
+ console.warn("postRPC:error: got empty res", res)
37
37
  }
38
38
 
39
39
  return res.data
40
40
  }
41
41
 
42
- export default rpc_post
42
+ export default postRPC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/client",
3
- "version": "0.161.0",
3
+ "version": "0.163.0",
4
4
  "scripts": {
5
5
  "test": "../../node_modules/.bin/wireit"
6
6
  },
@@ -95,13 +95,13 @@
95
95
  "socket.io-client": "4.7.5"
96
96
  },
97
97
  "devDependencies": {
98
- "@babel/core": "7.24.0",
99
- "@babel/plugin-transform-modules-commonjs": "7.23.3",
100
- "@babel/plugin-transform-runtime": "7.24.0",
98
+ "@babel/core": "7.24.3",
99
+ "@babel/plugin-transform-modules-commonjs": "7.24.1",
100
+ "@babel/plugin-transform-runtime": "7.24.3",
101
101
  "@babel/preset-react": "7.23.3",
102
102
  "@testing-library/react": "14.2.1",
103
103
  "@testing-library/react-hooks": "8.0.1",
104
- "axios": "1.6.7",
104
+ "axios": "1.6.8",
105
105
  "babel-jest": "29.7.0",
106
106
  "bluebird": "3.7.2",
107
107
  "jest": "29.7.0",
package/page.js ADDED
@@ -0,0 +1,8 @@
1
+ /* @flow */
2
+ import page from "page"
3
+
4
+ import {hashStateMiddleware} from "@rpcbase/client/hashState"
5
+
6
+ page(hashStateMiddleware)
7
+
8
+ export default page