@trycourier/react-provider 3.15.1-internal.631fee4.0 → 3.15.1-internal.97c4dbf.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.
@@ -42,11 +42,19 @@ var useTransport = function useTransport(_ref) {
42
42
  }
43
43
 
44
44
  if (!clientKey && !authorization) {
45
- throw new Error("Missing ClientKey or Authorization");
45
+ if (undefined !== "production") {
46
+ console.warn("Courier: Missing ClientKey or Authorization");
47
+ }
48
+
49
+ return;
46
50
  }
47
51
 
48
52
  if (!clientSourceId) {
49
- throw new Error("Missing ClientSourceId");
53
+ if (undefined !== "production") {
54
+ console.warn("Courier: Missing ClientSourceId");
55
+ }
56
+
57
+ return;
50
58
  }
51
59
 
52
60
  var newTransport = new _transports.CourierTransport({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trycourier/react-provider",
3
- "version": "3.15.1-internal.631fee4.0+631fee4",
3
+ "version": "3.15.1-internal.97c4dbf.0+97c4dbf",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "typings/index.d.ts",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "license": "ISC",
18
18
  "dependencies": {
19
- "@trycourier/client-graphql": "^3.15.1-internal.631fee4.0+631fee4",
19
+ "@trycourier/client-graphql": "^3.15.1-internal.97c4dbf.0+97c4dbf",
20
20
  "buffer": "^6.0.3",
21
21
  "jwt-decode": "^3.1.2",
22
22
  "react-use": "^17.2.1",
@@ -33,5 +33,5 @@
33
33
  "dist/",
34
34
  "typings/"
35
35
  ],
36
- "gitHead": "631fee43af28b4994eaf9112526e2868197d40db"
36
+ "gitHead": "97c4dbf5105eba1f5af7b0ef34c3acabdb55ebe3"
37
37
  }
@@ -8,6 +8,6 @@ declare const useTransport: ({ accountId, authorization, clientSourceId, clientK
8
8
  transport?: Transport | CourierTransport | undefined;
9
9
  userSignature?: string | undefined;
10
10
  wsOptions?: ITransportOptions["wsOptions"];
11
- }) => CourierTransport | Transport;
11
+ }) => CourierTransport | Transport | undefined;
12
12
  export default useTransport;
13
13
  //# sourceMappingURL=use-transport.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-transport.d.ts","sourceRoot":"","sources":["../../src/hooks/use-transport.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAM/D,QAAA,MAAM,YAAY;;;;;;;gBAeJ,iBAAiB,CAAC,WAAW,CAAC;MACxC,gBAAgB,GAAG,SAyDtB,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"use-transport.d.ts","sourceRoot":"","sources":["../../src/hooks/use-transport.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAM/D,QAAA,MAAM,YAAY;;;;;;;gBAeJ,iBAAiB,CAAC,WAAW,CAAC;MACxC,gBAAgB,GAAG,SAAS,GAAG,SAsElC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import React, { PropsWithChildren } from "react";
2
2
  import { Brand, EventType, ICourierContext, ICourierProviderProps, PinDetails, WSOptions, OnEvent } from "./types";
3
- import { IActionElemental, ICourierEventMessage, IInboxMessagePreview, ITextElemental } from "./transports/types";
3
+ import { IActionElemental, ICourierEventMessage, IInboxMessagePreview, ITextElemental, Interceptor } from "./transports/types";
4
4
  import { Middleware } from "./middleware";
5
5
  export * from "./transports";
6
6
  export * from "./hooks";
7
7
  export * from "./lib";
8
8
  export declare const registerReducer: (scope: any, reducer: any) => void;
9
9
  export declare const registerMiddleware: (id: string, middleware: Middleware) => void;
10
- export type { Brand, IActionElemental, ICourierContext, ICourierEventMessage, IInboxMessagePreview, ITextElemental, Middleware, PinDetails, WSOptions, EventType, OnEvent, };
10
+ export type { Brand, IActionElemental, ICourierContext, ICourierEventMessage, IInboxMessagePreview, ITextElemental, Middleware, PinDetails, WSOptions, EventType, OnEvent, Interceptor, };
11
11
  export declare const CourierContext: React.Context<ICourierContext | undefined>;
12
12
  export declare const CourierProvider: React.FunctionComponent<PropsWithChildren<ICourierProviderProps>>;
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAIZ,iBAAiB,EAClB,MAAM,OAAO,CAAC;AAGf,OAAO,EACL,KAAK,EACL,SAAS,EACT,eAAe,EACf,qBAAqB,EACrB,UAAU,EACV,SAAS,EACT,OAAO,EACR,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACf,MAAM,oBAAoB,CAAC;AAE5B,OAA0B,EAExB,UAAU,EACX,MAAM,cAAc,CAAC;AAMtB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AAEtB,eAAO,MAAM,eAAe,oCAAmB,CAAC;AAChD,eAAO,MAAM,kBAAkB,8CAAsB,CAAC;AAEtD,YAAY,EACV,KAAK,EACL,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACd,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,OAAO,GACR,CAAC;AAEF,eAAO,MAAM,cAAc,4CACkC,CAAC;AAE9D,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,iBAAiB,CACnD,iBAAiB,CAAC,qBAAqB,CAAC,CAmMzC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAIZ,iBAAiB,EAClB,MAAM,OAA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