@rpcbase/client 0.471.0 → 0.472.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/dist/browserNotifications.d.ts +1 -2
- package/dist/browserNotifications.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +91 -33
- package/dist/index.js.map +1 -1
- package/dist/initWithRoutes.d.ts.map +1 -1
- package/dist/instrument.js +1 -1
- package/dist/instrument.js.map +1 -1
- package/dist/notificationsRealtime.d.ts.map +1 -1
- package/dist/serviceWorker.d.ts +13 -0
- package/dist/serviceWorker.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initWithRoutes.d.ts","sourceRoot":"","sources":["../src/initWithRoutes.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAmC,MAAM,OAAO,CAAA;AAClE,OAAO,EAEL,wBAAwB,EAIzB,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"initWithRoutes.d.ts","sourceRoot":"","sources":["../src/initWithRoutes.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAmC,MAAM,OAAO,CAAA;AAClE,OAAO,EAEL,wBAAwB,EAIzB,MAAM,iBAAiB,CAAA;AAWxB,OAAO,EAGL,oBAAoB,EACrB,MAAM,iBAAiB,CAAA;AAsJxB,KAAK,qBAAqB,GAAG;IAC3B,0BAA0B,CAAC,EAAE,OAAO,CAAA;IACpC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,SAAS,CAAA;CAC9D,CAAA;AAED,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAA;AA0CnE,eAAO,MAAM,cAAc,GACzB,eAAe,aAAa,EAC5B,OAAO,qBAAqB,kBA8F7B,CAAA"}
|
package/dist/instrument.js
CHANGED
|
@@ -11,7 +11,7 @@ var instrument = async ({ posthogKey }) => {
|
|
|
11
11
|
capture_exceptions: {
|
|
12
12
|
capture_unhandled_errors: true,
|
|
13
13
|
capture_unhandled_rejections: true,
|
|
14
|
-
capture_console_errors:
|
|
14
|
+
capture_console_errors: false
|
|
15
15
|
},
|
|
16
16
|
capture_pageview: true,
|
|
17
17
|
autocapture: true,
|
package/dist/instrument.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrument.js","names":["setClientExceptionReporter","instrument","posthogKey","length","default","posthog","init","api_host","ui_host","person_profiles","session_recording","maskAllInputs","capture_exceptions","capture_unhandled_errors","capture_unhandled_rejections","capture_console_errors","capture_pageview","autocapture","disable_session_recording","disable_surveys","disable_surveys_automatic_display","error","context","captureException","err","console","warn"],"sources":["../src/instrument.ts"],"sourcesContent":["import { setClientExceptionReporter } from \"./errorReporting\"\n\n\nexport const instrument = async ({posthogKey}: {posthogKey?: string}) => {\n if (typeof posthogKey === \"string\" && posthogKey.length > 0) {\n try {\n const { default: posthog } = await import(\"posthog-js\")\n\n posthog.init(posthogKey, {\n api_host: \"/ingest\",\n ui_host: \"https://eu.posthog.com\",\n person_profiles: \"always\",\n session_recording: {\n maskAllInputs: false\n },\n capture_exceptions: {\n capture_unhandled_errors: true,\n capture_unhandled_rejections: true,\n capture_console_errors:
|
|
1
|
+
{"version":3,"file":"instrument.js","names":["setClientExceptionReporter","instrument","posthogKey","length","default","posthog","init","api_host","ui_host","person_profiles","session_recording","maskAllInputs","capture_exceptions","capture_unhandled_errors","capture_unhandled_rejections","capture_console_errors","capture_pageview","autocapture","disable_session_recording","disable_surveys","disable_surveys_automatic_display","error","context","captureException","err","console","warn"],"sources":["../src/instrument.ts"],"sourcesContent":["import { setClientExceptionReporter } from \"./errorReporting\"\n\n\nexport const instrument = async ({posthogKey}: {posthogKey?: string}) => {\n if (typeof posthogKey === \"string\" && posthogKey.length > 0) {\n try {\n const { default: posthog } = await import(\"posthog-js\")\n\n posthog.init(posthogKey, {\n api_host: \"/ingest\",\n ui_host: \"https://eu.posthog.com\",\n person_profiles: \"always\",\n session_recording: {\n maskAllInputs: false\n },\n capture_exceptions: {\n capture_unhandled_errors: true,\n capture_unhandled_rejections: true,\n capture_console_errors: false,\n },\n capture_pageview: true,\n autocapture: true,\n disable_session_recording: false,\n disable_surveys: true,\n disable_surveys_automatic_display: true,\n })\n\n setClientExceptionReporter((error, context) => {\n posthog.captureException(error, context)\n })\n } catch (err) {\n console.warn(\"instrument: failed to load posthog-js\", err)\n }\n } else {\n console.warn(\"instrument: missing posthogKey\")\n }\n}\n"],"mappings":";;AAGA,IAAaC,aAAa,OAAO,EAACC,iBAAuC;CACvE,IAAI,OAAOA,eAAe,YAAYA,WAAWC,SAAS,GACxD,IAAI;EACF,MAAM,EAAEC,SAASC,YAAY,MAAM,OAAO;EAE1CA,QAAQC,KAAKJ,YAAY;GACvBK,UAAU;GACVC,SAAS;GACTC,iBAAiB;GACjBC,mBAAmB,EACjBC,eAAe,MACjB;GACAC,oBAAoB;IAClBC,0BAA0B;IAC1BC,8BAA8B;IAC9BC,wBAAwB;GAC1B;GACAC,kBAAkB;GAClBC,aAAa;GACbC,2BAA2B;GAC3BC,iBAAiB;GACjBC,mCAAmC;EACrC,CAAC;EAEDpB,4BAA4BqB,OAAOC,YAAY;GAC7CjB,QAAQkB,iBAAiBF,OAAOC,OAAO;EACzC,CAAC;CACH,SAASE,KAAK;EACZC,QAAQC,KAAK,yCAAyCF,GAAG;CAC3D;MAEAC,QAAQC,KAAK,gCAAgC;AAEjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notificationsRealtime.d.ts","sourceRoot":"","sources":["../src/notificationsRealtime.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAK7F,OAAO,EAA8B,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AA6QnF,MAAM,MAAM,0BAA0B,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ACX,UAAiB,EACjB,uBAAuB,EACvB,QAAQ,GACT,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,uBAAuB,CAAC,EAAE,yBAAyB,CAAA;IACnD,QAAQ,EAAE,SAAS,CAAA;CACpB,2CAqOA;AAED,eAAO,MAAM,wBAAwB,QAAO,0BAA0B,GAAG,IAExE,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const RPCBASE_SERVICE_WORKER_PATH = "/rpcbase-service-worker.js";
|
|
2
|
+
export declare const RPCBASE_SERVICE_WORKER_SCOPE = "/";
|
|
3
|
+
export declare const RPCBASE_SERVICE_WORKER_MESSAGE_SOURCE: "@rpcbase/service-worker";
|
|
4
|
+
export type RpcbaseServiceWorkerMessage<TPayload = unknown> = {
|
|
5
|
+
source: typeof RPCBASE_SERVICE_WORKER_MESSAGE_SOURCE;
|
|
6
|
+
type: string;
|
|
7
|
+
payload?: TPayload;
|
|
8
|
+
};
|
|
9
|
+
export declare const registerRpcbaseServiceWorker: () => Promise<ServiceWorkerRegistration | null>;
|
|
10
|
+
export declare const scheduleRpcbaseServiceWorkerRegistration: () => void;
|
|
11
|
+
export declare const sendRpcbaseServiceWorkerMessage: <TPayload>(type: string, payload?: TPayload) => Promise<boolean>;
|
|
12
|
+
export declare const subscribeRpcbaseServiceWorkerMessages: <TPayload>(type: string, listener: (payload: TPayload | undefined, message: RpcbaseServiceWorkerMessage<TPayload>) => void) => (() => void);
|
|
13
|
+
//# sourceMappingURL=serviceWorker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serviceWorker.d.ts","sourceRoot":"","sources":["../src/serviceWorker.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,+BAA+B,CAAA;AACvE,eAAO,MAAM,4BAA4B,MAAM,CAAA;AAC/C,eAAO,MAAM,qCAAqC,EAAG,yBAAkC,CAAA;AAEvF,MAAM,MAAM,2BAA2B,CAAC,QAAQ,GAAG,OAAO,IAAI;IAC5D,MAAM,EAAE,OAAO,qCAAqC,CAAA;IACpD,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,QAAQ,CAAA;CACnB,CAAA;AA4CD,eAAO,MAAM,4BAA4B,QAAO,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAevF,CAAA;AAED,eAAO,MAAM,wCAAwC,QAAO,IAc3D,CAAA;AAED,eAAO,MAAM,+BAA+B,GAAU,QAAQ,EAC5D,MAAM,MAAM,EACZ,UAAU,QAAQ,KACjB,OAAO,CAAC,OAAO,CAejB,CAAA;AAED,eAAO,MAAM,qCAAqC,GAAI,QAAQ,EAC5D,MAAM,MAAM,EACZ,UAAU,CACR,OAAO,EAAE,QAAQ,GAAG,SAAS,EAC7B,OAAO,EAAE,2BAA2B,CAAC,QAAQ,CAAC,KAC3C,IAAI,KACR,CAAC,MAAM,IAAI,CAab,CAAA"}
|