@kokimoki/app 0.6.2 → 0.6.3

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.
@@ -24,7 +24,7 @@ export declare class KokimokiClient<StatelessDataT = any, ClientContextT = any>
24
24
  get token(): string;
25
25
  get apiUrl(): string;
26
26
  get apiHeaders(): Headers;
27
- get clientContext(): NonNullable<ClientContextT>;
27
+ get clientContext(): ClientContextT & ({} | null);
28
28
  connect(): Promise<void>;
29
29
  serverTimestamp(): number;
30
30
  private checkConnectionState;
@@ -49,7 +49,7 @@ export class KokimokiClient extends EventEmitter {
49
49
  return this._apiHeaders;
50
50
  }
51
51
  get clientContext() {
52
- if (!this._clientContext) {
52
+ if (this._clientContext === undefined) {
53
53
  throw new Error("Client not connected");
54
54
  }
55
55
  return this._clientContext;
@@ -58,7 +58,7 @@ export class KokimokiClient extends EventEmitter {
58
58
  // Fetch the auth token
59
59
  let clientToken = localStorage.getItem("KM_TOKEN");
60
60
  const startTime = Date.now();
61
- const res = await fetch(`${this.apiUrl}/auth/token?appId=${this.appId}&code=${this.code}`, {
61
+ const res = await fetch(`${this.apiUrl}/auth/token?appId=${this.appId}&code=${this.code}&clientVersion=${KOKIMOKI_APP_VERSION}`, {
62
62
  method: "GET",
63
63
  headers: new Headers({
64
64
  "Content-Type": "application/json",
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const KOKIMOKI_APP_VERSION = "0.6.2";
1
+ export declare const KOKIMOKI_APP_VERSION = "0.6.3";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const KOKIMOKI_APP_VERSION = "0.6.2";
1
+ export const KOKIMOKI_APP_VERSION = "0.6.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kokimoki/app",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "type": "module",
5
5
  "description": "Kokimoki app",
6
6
  "main": "dist/index.js",