@atsignal/react-native 0.1.2 → 0.2.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/index.cjs CHANGED
@@ -32,7 +32,7 @@ var SignalReactNativeClient = class extends import_js_core.SignalClient {
32
32
  const queueStorage = options.persistQueue === false ? void 0 : (_a = options.storage) == null ? void 0 : _a.queue;
33
33
  return {
34
34
  ...options,
35
- transportFactory: (_b = options.transportFactory) != null ? _b : (0, import_js_core.createFetchTransport)(),
35
+ transport: (_b = options.transport) != null ? _b : (0, import_js_core.createFetchTransport)(),
36
36
  storage: {
37
37
  identity: (_d = (_c = options.storage) == null ? void 0 : _c.identity) != null ? _d : new import_js_core.InMemoryStorage(),
38
38
  ...queueStorage !== void 0 ? { queue: queueStorage } : {}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC;IAC7E,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,EAAE,eAAe,CAAC;QAC3B,KAAK,CAAC,EAAE,iBAAiB,CAAC;KAC3B,CAAC;CACH;AAED,qBAAa,uBAAwB,SAAQ,YAAY,CAAC,wBAAwB,CAAC;cAC9D,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,YAAY;CAYtF;AAED,wBAAgB,WAAW,IAAI,uBAAuB,CAErD;AAED,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG;IACxD,WAAW,EAAE,OAAO,WAAW,CAAC;CACjC,CAAC;AAEF,QAAA,MAAM,MAAM,EAEN,iBAAiB,CAAC;AAExB,eAAe,MAAM,CAAC"}
package/dist/index.js CHANGED
@@ -1,32 +1,23 @@
1
- // src/index.ts
2
- import {
3
- InMemoryStorage,
4
- SignalClient,
5
- createFetchTransport
6
- } from "@atsignal/js-core";
7
- var SignalReactNativeClient = class extends SignalClient {
8
- resolveInitConfig(options) {
9
- var _a, _b, _c, _d;
10
- const queueStorage = options.persistQueue === false ? void 0 : (_a = options.storage) == null ? void 0 : _a.queue;
11
- return {
12
- ...options,
13
- transportFactory: (_b = options.transportFactory) != null ? _b : createFetchTransport(),
14
- storage: {
15
- identity: (_d = (_c = options.storage) == null ? void 0 : _c.identity) != null ? _d : new InMemoryStorage(),
16
- ...queueStorage !== void 0 ? { queue: queueStorage } : {}
17
- }
18
- };
19
- }
20
- };
21
- function newInstance() {
22
- return new SignalReactNativeClient();
1
+ import { InMemoryStorage, SignalClient, createFetchTransport, } from "@atsignal/js-core";
2
+ export class SignalReactNativeClient extends SignalClient {
3
+ resolveInitConfig(options) {
4
+ var _a, _b, _c, _d;
5
+ const queueStorage = options.persistQueue === false ? undefined : (_a = options.storage) === null || _a === void 0 ? void 0 : _a.queue;
6
+ return {
7
+ ...options,
8
+ transport: (_b = options.transport) !== null && _b !== void 0 ? _b : createFetchTransport(),
9
+ storage: {
10
+ identity: (_d = (_c = options.storage) === null || _c === void 0 ? void 0 : _c.identity) !== null && _d !== void 0 ? _d : new InMemoryStorage(),
11
+ ...(queueStorage !== undefined ? { queue: queueStorage } : {}),
12
+ },
13
+ };
14
+ }
23
15
  }
24
- var signal = Object.assign(new SignalReactNativeClient(), {
25
- newInstance
16
+ export function newInstance() {
17
+ return new SignalReactNativeClient();
18
+ }
19
+ const signal = Object.assign(new SignalReactNativeClient(), {
20
+ newInstance,
26
21
  });
27
- var index_default = signal;
28
- export {
29
- SignalReactNativeClient,
30
- index_default as default,
31
- newInstance
32
- };
22
+ export default signal;
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAGf,YAAY,EACZ,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAS3B,MAAM,OAAO,uBAAwB,SAAQ,YAAsC;IAC9D,iBAAiB,CAAC,OAAiC;;QACpE,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAA,OAAO,CAAC,OAAO,0CAAE,KAAK,CAAC;QAEzF,OAAO;YACL,GAAG,OAAO;YACV,SAAS,EAAE,MAAA,OAAO,CAAC,SAAS,mCAAI,oBAAoB,EAAE;YACtD,OAAO,EAAE;gBACP,QAAQ,EAAE,MAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,QAAQ,mCAAI,IAAI,eAAe,EAAE;gBAC5D,GAAG,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC/D;SACF,CAAC;IACJ,CAAC;CACF;AAED,MAAM,UAAU,WAAW;IACzB,OAAO,IAAI,uBAAuB,EAAE,CAAC;AACvC,CAAC;AAMD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,uBAAuB,EAAE,EAAE;IAC1D,WAAW;CACZ,CAAsB,CAAC;AAExB,eAAe,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atsignal/react-native",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "React Native SDK for Signal.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  "dist"
28
28
  ],
29
29
  "dependencies": {
30
- "@atsignal/js-core": "0.1.2"
30
+ "@atsignal/js-core": "0.2.0"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public",