@reproapp/react-sdk 0.0.1 → 0.0.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/README.md CHANGED
@@ -65,7 +65,7 @@ export default function App() {
65
65
  ```
66
66
 
67
67
  Notes:
68
- - `apiBase` defaults to `http://localhost:4000`.
68
+ - `apiBase` defaults to `https://repro-api-d7288.ondigitalocean.app/api`.
69
69
  - `button.text` overrides the floating button label (same label for Record and Stop).
70
70
  - `attachAxios` works with any Axios instance; `window.axios` is auto-attached if present.
71
71
  - This SDK runs in the browser; for Next.js use a client component.
@@ -92,7 +92,7 @@ Notes:
92
92
  type Props = {
93
93
  appId: string;
94
94
  tenantId: string;
95
- apiBase?: string; // default: http://localhost:4000
95
+ apiBase?: string; // default: https://repro-api-d7288.ondigitalocean.app/api
96
96
  children: React.ReactNode;
97
97
  button?: { text?: string };
98
98
  masking?: MaskingOptions;
package/dist/index.d.ts CHANGED
@@ -17,8 +17,9 @@ type Props = {
17
17
  text?: string;
18
18
  };
19
19
  masking?: MaskingOptions;
20
+ apiBase?: string;
20
21
  };
21
22
  /** Manually attach Repro to any Axios instance (no recursion). */
22
23
  export declare function attachAxios(axiosInstance: any): void;
23
- export declare function ReproProvider({ appId, children, button, masking }: Props): import("react/jsx-runtime").JSX.Element;
24
+ export declare function ReproProvider({ appId, children, button, masking, apiBase }: Props): import("react/jsx-runtime").JSX.Element;
24
25
  export default ReproProvider;
package/dist/index.js CHANGED
@@ -47,7 +47,7 @@ const INTERNAL_HEADER = "X-Repro-Internal";
47
47
  const REQUEST_START_HEADER = "X-Bug-Request-Start";
48
48
  const NGROK_SKIP_HEADER = "ngrok-skip-browser-warning";
49
49
  const NGROK_SKIP_VALUE = "true";
50
- const API_BASE = "https://oozy-loreta-gully.ngrok-free.dev";
50
+ const API_BASE = "https://repro-api-d7288.ondigitalocean.app/api";
51
51
  let __reproCtx = null;
52
52
  /** Manually attach Repro to any Axios instance (no recursion). */
53
53
  export function attachAxios(axiosInstance) {
@@ -126,8 +126,8 @@ export function attachAxios(axiosInstance) {
126
126
  return Promise.reject(err);
127
127
  });
128
128
  }
129
- export function ReproProvider({ appId, children, button, masking }) {
130
- const base = API_BASE;
129
+ export function ReproProvider({ appId, children, button, masking, apiBase }) {
130
+ const base = apiBase?.trim() ? apiBase.trim() : API_BASE;
131
131
  const storageKey = `repro-auth-${appId}`;
132
132
  const initialAuth = (() => {
133
133
  if (typeof window === "undefined")
@@ -536,7 +536,7 @@ export function ReproProvider({ appId, children, button, masking }) {
536
536
  return;
537
537
  const sid = sessionIdRef.current;
538
538
  const token = sdkTokenRef.current;
539
- const baseUrl = API_BASE;
539
+ const baseUrl = base;
540
540
  if (!sid || !token)
541
541
  return;
542
542
  if (!rrBufferRef.current.length)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reproapp/react-sdk",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Repro React SDK (MVP)",
5
5
  "license": "MIT",
6
6