@atsignal/node 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 SignalNodeClient = 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,iBAAkB,SAAQ,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC;IACtE,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,EAAE,eAAe,CAAC;QAC3B,KAAK,CAAC,EAAE,iBAAiB,CAAC;KAC3B,CAAC;CACH;AAED,qBAAa,gBAAiB,SAAQ,YAAY,CAAC,iBAAiB,CAAC;cAChD,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,GAAG,YAAY;CAY/E;AAED,wBAAgB,WAAW,IAAI,gBAAgB,CAE9C;AAED,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG;IAC1C,WAAW,EAAE,OAAO,WAAW,CAAC;CACjC,CAAC;AAEF,QAAA,MAAM,MAAM,EAEN,UAAU,CAAC;AAEjB,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 SignalNodeClient = 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 SignalNodeClient();
1
+ import { InMemoryStorage, SignalClient, createFetchTransport, } from "@atsignal/js-core";
2
+ export class SignalNodeClient 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 SignalNodeClient(), {
25
- newInstance
16
+ export function newInstance() {
17
+ return new SignalNodeClient();
18
+ }
19
+ const signal = Object.assign(new SignalNodeClient(), {
20
+ newInstance,
26
21
  });
27
- var index_default = signal;
28
- export {
29
- SignalNodeClient,
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,gBAAiB,SAAQ,YAA+B;IAChD,iBAAiB,CAAC,OAA0B;;QAC7D,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,gBAAgB,EAAE,CAAC;AAChC,CAAC;AAMD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,gBAAgB,EAAE,EAAE;IACnD,WAAW;CACZ,CAAe,CAAC;AAEjB,eAAe,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atsignal/node",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "Node.js 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",