@lightsparkdev/core 0.1.4 → 0.1.6

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.
@@ -5,10 +5,10 @@ CLI tsup v6.7.0
5
5
  CLI Target: esnext
6
6
  CJS Build start
7
7
  ESM Build start
8
- CJS dist/index.cjs 20.06 KB
9
- CJS ⚡️ Build success in 17ms
10
- ESM dist/index.js 17.38 KB
11
- ESM ⚡️ Build success in 17ms
8
+ CJS dist/index.cjs 20.07 KB
9
+ CJS ⚡️ Build success in 50ms
10
+ ESM dist/index.js 17.39 KB
11
+ ESM ⚡️ Build success in 50ms
12
12
  DTS Build start
13
- DTS ⚡️ Build success in 683ms
14
- DTS dist/index.d.ts 6.43 KB
13
+ DTS ⚡️ Build success in 667ms
14
+ DTS dist/index.d.ts 6.45 KB
@@ -0,0 +1,3 @@
1
+ $ npx prettier --check ./src
2
+ Checking formatting...
3
+ All matched files use Prettier code style!
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @lightsparkdev/core
2
2
 
3
+ ## 0.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Rename server-sdk to lightspark-sdk. It can be used from a browser.
8
+
9
+ ## 0.1.5
10
+
11
+ ### Patch Changes
12
+
13
+ - Fixing subscription authentication for the wallet-sdk
14
+
3
15
  ## 0.1.4
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -88,7 +88,7 @@ var StubAuthProvider = class {
88
88
  async isAuthorized() {
89
89
  return false;
90
90
  }
91
- addWsConnectionParams(params) {
91
+ async addWsConnectionParams(params) {
92
92
  return params;
93
93
  }
94
94
  };
@@ -391,7 +391,7 @@ var Requester = class {
391
391
  }
392
392
  this.wsClient = (0, import_graphql_ws.createClient)({
393
393
  url: `wss://${this.baseUrl}/${this.schemaEndpoint}`,
394
- connectionParams: authProvider.addWsConnectionParams({}),
394
+ connectionParams: () => authProvider.addWsConnectionParams({}),
395
395
  webSocketImpl: websocketImpl
396
396
  });
397
397
  (0, import_auto_bind2.default)(this);
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { Observable } from 'zen-observable-ts';
3
3
  interface AuthProvider {
4
4
  addAuthHeaders(headers: any): Promise<any>;
5
5
  isAuthorized(): Promise<boolean>;
6
- addWsConnectionParams(params: any): any;
6
+ addWsConnectionParams(params: any): Promise<any>;
7
7
  }
8
8
 
9
9
  declare class LightsparkException extends Error {
@@ -20,7 +20,7 @@ declare class LightsparkAuthException extends LightsparkException {
20
20
  declare class StubAuthProvider implements AuthProvider {
21
21
  addAuthHeaders(headers: any): Promise<any>;
22
22
  isAuthorized(): Promise<boolean>;
23
- addWsConnectionParams(params: any): any;
23
+ addWsConnectionParams(params: any): Promise<any>;
24
24
  }
25
25
 
26
26
  declare class LightsparkSigningException extends LightsparkException {
package/dist/index.js CHANGED
@@ -28,7 +28,7 @@ var StubAuthProvider = class {
28
28
  async isAuthorized() {
29
29
  return false;
30
30
  }
31
- addWsConnectionParams(params) {
31
+ async addWsConnectionParams(params) {
32
32
  return params;
33
33
  }
34
34
  };
@@ -331,7 +331,7 @@ var Requester = class {
331
331
  }
332
332
  this.wsClient = createClient({
333
333
  url: `wss://${this.baseUrl}/${this.schemaEndpoint}`,
334
- connectionParams: authProvider.addWsConnectionParams({}),
334
+ connectionParams: () => authProvider.addWsConnectionParams({}),
335
335
  webSocketImpl: websocketImpl
336
336
  });
337
337
  autoBind2(this);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightsparkdev/core",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Lightspark JS SDK",
5
5
  "author": "Lightspark Inc.",
6
6
  "keywords": [
@@ -3,5 +3,5 @@
3
3
  export default interface AuthProvider {
4
4
  addAuthHeaders(headers: any): Promise<any>;
5
5
  isAuthorized(): Promise<boolean>;
6
- addWsConnectionParams(params: any): any;
6
+ addWsConnectionParams(params: any): Promise<any>;
7
7
  }
@@ -10,7 +10,7 @@ export default class StubAuthProvider implements AuthProvider {
10
10
  return false;
11
11
  }
12
12
 
13
- addWsConnectionParams(params: any): any {
13
+ async addWsConnectionParams(params: any): Promise<any> {
14
14
  return params;
15
15
  }
16
16
  }
@@ -41,7 +41,7 @@ class Requester {
41
41
  }
42
42
  this.wsClient = createClient({
43
43
  url: `wss://${this.baseUrl}/${this.schemaEndpoint}`,
44
- connectionParams: authProvider.addWsConnectionParams({}),
44
+ connectionParams: () => authProvider.addWsConnectionParams({}),
45
45
  webSocketImpl: websocketImpl,
46
46
  });
47
47
  autoBind(this);