@rpcbase/client 0.268.0 → 0.269.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.
package/instrument.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as Sentry from "@sentry/react"
2
2
  import posthog from "posthog-js"
3
3
 
4
+
4
5
  const isProduction = import.meta.env.MODE === "production"
5
6
 
6
7
  if (isProduction) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/client",
3
- "version": "0.268.0",
3
+ "version": "0.269.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "scripts": {
@@ -79,7 +79,7 @@ export const getServerApiClient = async(app: Application) => {
79
79
  }
80
80
 
81
81
  if (layer.route.stack.length !== 1) {
82
- throw new Error(`expected only one handler per route for route: ${layer.route.path}`);
82
+ throw new Error(`expected only one handler per route for route: ${layer.route.path}`)
83
83
  }
84
84
 
85
85
  await runHandler(layer.route.stack[0].handle)
@@ -26,7 +26,7 @@ export type ApiClient = MethodRecord<ApiClientMethod>;
26
26
  let apiClient: ApiClient
27
27
 
28
28
  export const initApiClient = async (args?: ServerArgs) => {
29
- // @ts-ignore
29
+ // @ts-expect-error -- Suppress TS2339: Property 'env' does not exist on type 'ImportMeta'
30
30
  if (import.meta.env.SSR) {
31
31
  if (!args) {
32
32
  throw new Error("Server args must be provided in SSR mode")
@@ -3,6 +3,7 @@ import useMeasure from "react-use/lib/useMeasure"
3
3
  import _throttle from "lodash/throttle"
4
4
  import { deepEqual } from "fast-equals"
5
5
 
6
+
6
7
  const useMeasureHook = useMeasure.default || useMeasure
7
8
 
8
9
  const DEFAULT_THROTTLE_TIME = 16
package/src/types.ts CHANGED
@@ -1,6 +1,7 @@
1
- import { Ctx } from "@rpcbase/api";
1
+ import { Ctx } from "@rpcbase/api"
2
2
  import { Params } from "@rpcbase/router"
3
3
 
4
+
4
5
  export type LoaderArgs = {params: Params, ctx: Ctx}
5
6
 
6
7
  // eslint-disable-next-line @typescript-eslint/no-explicit-any