@lookiero/checkout 0.6.0-beta.27 → 0.6.0-beta.28

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.
@@ -4,6 +4,6 @@ import { ReactNativeTransportOptions } from "@sentry/react-native/dist/js/option
4
4
  import { Transport, Integration } from "@sentry/types";
5
5
  import { ComponentType } from "react";
6
6
  declare const transport: (options: ReactNativeTransportOptions) => Transport;
7
- declare const integrations: Integration[];
7
+ declare const integrations: (basename: string) => Integration[];
8
8
  declare const wrap: <P>(Component: ComponentType<P>) => ComponentType<P>;
9
9
  export { BrowserClient as Client, Hub, ErrorBoundary, transport, integrations, wrap };
@@ -2,12 +2,13 @@ import { BrowserClient, Hub, makeFetchTransport, defaultIntegrations } from "@se
2
2
  import { ErrorBoundary, reactRouterV6Instrumentation } from "@sentry/react";
3
3
  import { BrowserTracing } from "@sentry/tracing";
4
4
  import { useEffect } from "react";
5
- import { createRoutesFromChildren, matchRoutes, useLocation, useNavigationType } from "react-router-native";
5
+ import { createRoutesFromChildren, useLocation, useNavigationType } from "react-router-native";
6
+ import { matchRoutesForBasename } from "./matchRoutes";
6
7
  const transport = (options, nativeFetch) => makeFetchTransport(options, nativeFetch);
7
- const integrations = [
8
+ const integrations = (basename) => [
8
9
  ...defaultIntegrations,
9
10
  new BrowserTracing({
10
- routingInstrumentation: reactRouterV6Instrumentation(useEffect, useLocation, useNavigationType, createRoutesFromChildren, matchRoutes),
11
+ routingInstrumentation: reactRouterV6Instrumentation(useEffect, useLocation, useNavigationType, createRoutesFromChildren, matchRoutesForBasename(basename)),
11
12
  }),
12
13
  ];
13
14
  const wrap = (Component) => Component;
@@ -3,6 +3,6 @@ import { ReactNativeTransportOptions } from "@sentry/react-native/dist/js/option
3
3
  import { Transport, Integration } from "@sentry/types";
4
4
  import { ComponentType } from "react";
5
5
  declare const transport: (options: ReactNativeTransportOptions) => Transport;
6
- declare const integrations: Integration[];
6
+ declare const integrations: () => Integration[];
7
7
  declare const wrap: <P>(Component: ComponentType<P>) => ComponentType<P>;
8
8
  export { ReactNativeClient as Client, Hub, ErrorBoundary, transport, integrations, wrap };
@@ -3,6 +3,6 @@ import { ReactNativeClient, Hub, ErrorBoundary, wrap as sentryWrap } from "@sent
3
3
  import { makeReactNativeTransport } from "@sentry/react-native/dist/js/transports/native";
4
4
  import { NATIVE } from "@sentry/react-native/dist/js/wrapper";
5
5
  const transport = (options, nativeFetch) => NATIVE.isNativeTransportAvailable() ? makeReactNativeTransport(options) : makeFetchTransport(options, nativeFetch);
6
- const integrations = [];
6
+ const integrations = () => [];
7
7
  const wrap = (Component) => sentryWrap(Component);
8
8
  export { ReactNativeClient as Client, Hub, ErrorBoundary, transport, integrations, wrap };
@@ -1,6 +1,7 @@
1
1
  import { ComponentType } from "react";
2
2
  import { Platform } from "react-native";
3
3
  interface SentryLoggerFunctionArgs {
4
+ readonly routerBasename: string;
4
5
  readonly publicKey: string;
5
6
  readonly environment: `${typeof Platform.OS}-${"DEV" | "PROD"}`;
6
7
  readonly release: string;
@@ -5,13 +5,13 @@ import React, { useEffect } from "react";
5
5
  import { Platform } from "react-native";
6
6
  import { Routes as ReactRouterRoutes } from "react-router-native";
7
7
  import { Client, Hub, ErrorBoundary, transport, integrations, wrap } from "./SentryDependencies";
8
- const sentryLogger = ({ publicKey, environment, release, project }) => {
8
+ const sentryLogger = ({ routerBasename, publicKey, environment, release, project }) => {
9
9
  let mainHub;
10
10
  const client = new Client({
11
11
  environment,
12
12
  release,
13
13
  dsn: `https://${publicKey}@o179049.ingest.sentry.io/${project}`,
14
- integrations,
14
+ integrations: integrations(routerBasename),
15
15
  tracesSampleRate: 1.0,
16
16
  debug: true,
17
17
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -0,0 +1,6 @@
1
+ import { matchRoutes } from "@remix-run/router";
2
+ interface MatchRoutesForBasenameFunction {
3
+ (basename: string): typeof matchRoutes;
4
+ }
5
+ declare const matchRoutesForBasename: MatchRoutesForBasenameFunction;
6
+ export { matchRoutesForBasename };
@@ -0,0 +1,3 @@
1
+ import { matchRoutes } from "@remix-run/router";
2
+ const matchRoutesForBasename = (basename) => (routes, locationArg) => matchRoutes(routes, locationArg, basename);
3
+ export { matchRoutesForBasename };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "0.6.0-beta.27",
3
+ "version": "0.6.0-beta.28",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [