@kokimoki/app 0.6.7 → 0.6.9
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/kokimoki-client.d.ts +1 -0
- package/dist/kokimoki-client.js +11 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/kokimoki-client.js
CHANGED
|
@@ -81,9 +81,12 @@ export class KokimokiClient extends EventEmitter {
|
|
|
81
81
|
});
|
|
82
82
|
// Ping interval
|
|
83
83
|
setInterval(() => {
|
|
84
|
-
this.checkConnectionState();
|
|
85
84
|
this._providers.forEach((provider) => provider.sendStateless("ping"));
|
|
86
85
|
}, 5000);
|
|
86
|
+
// Connection state interval
|
|
87
|
+
setInterval(() => {
|
|
88
|
+
this.checkConnectionState();
|
|
89
|
+
}, 1000);
|
|
87
90
|
// Check initial connected state
|
|
88
91
|
this.receivePong();
|
|
89
92
|
}
|
|
@@ -124,7 +127,7 @@ export class KokimokiClient extends EventEmitter {
|
|
|
124
127
|
// Handle incoming stateless messages
|
|
125
128
|
provider.on("stateless", (e) => {
|
|
126
129
|
if (e.payload === "pong") {
|
|
127
|
-
this.
|
|
130
|
+
this.receivePong();
|
|
128
131
|
return;
|
|
129
132
|
}
|
|
130
133
|
const payload = JSON.parse(e.payload);
|
|
@@ -238,4 +241,10 @@ export class KokimokiClient extends EventEmitter {
|
|
|
238
241
|
});
|
|
239
242
|
return await res.json();
|
|
240
243
|
}
|
|
244
|
+
async exposeScriptingContext(context) {
|
|
245
|
+
// @ts-ignore
|
|
246
|
+
window.KM_SCRIPTING_CONTEXT = context;
|
|
247
|
+
// @ts-ignore
|
|
248
|
+
window.dispatchEvent(new CustomEvent("km:scriptingContextExposed"));
|
|
249
|
+
}
|
|
241
250
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const KOKIMOKI_APP_VERSION = "0.6.
|
|
1
|
+
export declare const KOKIMOKI_APP_VERSION = "0.6.9";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const KOKIMOKI_APP_VERSION = "0.6.
|
|
1
|
+
export const KOKIMOKI_APP_VERSION = "0.6.9";
|