@f3liz/rescript-misskey-api 0.6.7 → 0.6.8

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.
@@ -1,8 +1,8 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as WebSocket from "../bindings/WebSocket.mjs";
4
3
  import * as Stdlib_Dict from "@rescript/runtime/lib/es6/Stdlib_Dict.js";
5
4
  import * as StreamProtocol from "./StreamProtocol.mjs";
5
+ import * as MisskeyWebSocket from "../bindings/MisskeyWebSocket.mjs";
6
6
  import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.js";
7
7
  import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
8
8
  import * as StreamConnection from "./StreamConnection.mjs";
@@ -106,7 +106,7 @@ function make(origin, credential, param) {
106
106
 
107
107
  function send(stream, msg) {
108
108
  let serialized = StreamProtocol.serializeOutgoing(msg);
109
- if (WebSocket.isOpen(stream.ws) && stream.pendingMessages.length === 0) {
109
+ if (MisskeyWebSocket.isOpen(stream.ws) && stream.pendingMessages.length === 0) {
110
110
  stream.ws.send(serialized);
111
111
  } else {
112
112
  stream.pendingMessages = stream.pendingMessages.concat([serialized]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@f3liz/rescript-misskey-api",
3
- "version": "0.6.7",
3
+ "version": "0.6.8",
4
4
  "description": "ReScript bindings for Misskey API using OpenAPI code generation",
5
5
  "keywords": [
6
6
  "misskey",
@@ -1,4 +1,4 @@
1
- // WebSocket.res - Browser WebSocket API bindings for ReScript
1
+ // MisskeyWebSocket.res - Browser WebSocket API bindings for ReScript
2
2
 
3
3
  // WebSocket ready state constants
4
4
  module ReadyState = {
@@ -40,11 +40,11 @@ let sendTyped = (stream: stream, type_: string, payload: JSON.t): unit => {
40
40
  let obj = Dict.make()
41
41
  obj->Dict.set("type", type_->JSON.Encode.string)
42
42
  obj->Dict.set("body", payload)
43
- stream.ws->WebSocket.send(obj->JSON.Encode.object->JSON.stringify)
43
+ stream.ws->MisskeyWebSocket.send(obj->JSON.Encode.object->JSON.stringify)
44
44
  }
45
45
 
46
46
  let sendRaw = (stream: stream, payload: JSON.t): unit => {
47
- stream.ws->WebSocket.send(payload->JSON.stringify)
47
+ stream.ws->MisskeyWebSocket.send(payload->JSON.stringify)
48
48
  }
49
49
 
50
50
  // Connection management
@@ -1,7 +1,7 @@
1
1
  // StreamClient.res - Native ReScript WebSocket streaming client
2
2
  // Pure ReScript implementation replacing misskey-js Stream class
3
3
 
4
- module WS = WebSocket
4
+ module WS = MisskeyWebSocket
5
5
  module Protocol = StreamProtocol
6
6
  module Connection = StreamConnection
7
7