@fishjam-cloud/js-server-sdk 0.1.0 → 0.1.2
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/README.md +12 -28
- package/dist/chunk-PVJVFZZS.mjs +1 -0
- package/dist/index.d.mts +62 -0
- package/dist/index.d.ts +62 -1
- package/dist/index.js +1 -17
- package/dist/index.mjs +1 -0
- package/dist/proto.d.mts +1 -0
- package/dist/proto.d.ts +1 -0
- package/dist/proto.js +1 -0
- package/dist/proto.mjs +1 -0
- package/package.json +28 -16
- package/dist/openapi/api.d.ts +0 -1715
- package/dist/openapi/api.js +0 -1386
- package/dist/openapi/base.d.ts +0 -66
- package/dist/openapi/base.js +0 -71
- package/dist/openapi/common.d.ts +0 -66
- package/dist/openapi/common.js +0 -184
- package/dist/openapi/configuration.d.ts +0 -91
- package/dist/openapi/configuration.js +0 -99
- package/dist/openapi/index.d.ts +0 -13
- package/dist/openapi/index.js +0 -31
- package/dist/protos/fishjam/index.d.ts +0 -5
- package/dist/protos/fishjam/index.js +0 -21
- package/dist/protos/fishjam/server_notifications.d.ts +0 -1209
- package/dist/protos/fishjam/server_notifications.js +0 -1939
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Fishjam
|
|
1
|
+
# Fishjam Cloud Server SDK for JavaScript
|
|
2
2
|
|
|
3
|
-
JavaScript server-side SDK for [Fishjam](https://
|
|
3
|
+
JavaScript server-side SDK for [Fishjam Cloud](https://cloud.fishjam.stream).
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -10,45 +10,29 @@ You can install the library using `npm`:
|
|
|
10
10
|
npm install @fishjam-cloud/js-server-sdk
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
or `yarn`:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
yarn add @fishjam-cloud/js-server-sdk
|
|
17
|
+
```
|
|
18
|
+
|
|
13
19
|
## Documentation
|
|
14
20
|
|
|
15
|
-
The documentation for the latest release is available [here](https://fishjam-cloud.github.io/js-server-sdk/
|
|
21
|
+
The documentation for the latest release is available [here](https://fishjam-cloud.github.io/js-server-sdk/).
|
|
16
22
|
To generate it locally, run:
|
|
17
23
|
|
|
18
24
|
```bash
|
|
19
|
-
|
|
25
|
+
yarn docs
|
|
20
26
|
```
|
|
21
27
|
|
|
22
|
-
For more comprehensive tutorial on the Fishjam Server, its capabilites and production usage, refer to
|
|
23
|
-
[Fishjam docs](https://fishjam-cloud.github.io/fishjam-docs/).
|
|
24
|
-
|
|
25
28
|
## Examples
|
|
26
29
|
|
|
27
30
|
See [examples](https://github.com/fishjam-cloud/js-server-sdk/tree/main/examples) directory.
|
|
28
31
|
|
|
29
|
-
## Fishjam ecosystem
|
|
30
|
-
|
|
31
|
-
| | |
|
|
32
|
-
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
33
|
-
| 📱 Client SDKs | [TypeScript](https://github.com/fishjam-cloud/ts-client-sdk/) <br/> [React](https://github.com/fishjam-cloud/react-client-sdk) <br/> [iOS](https://github.com/fishjam-cloud/ios-client-sdk) <br/> [Android](https://github.com/fishjam-cloud/android-client-sdk) <br/> [React Native](https://github.com/fishjam-cloud/react-native-client-sdk) |
|
|
34
|
-
| ⚙️ Server SDKs | [JavaScript](https://github.com/fishjam-cloud/js-server-sdk) <br/> [Python](https://github.com/fishjam-cloud/python-server-sdk) <br/> [Elixir](https://github.com/fishjam-cloud/elixir_server_sdk) |
|
|
35
|
-
| 📚 Resources | [Fishjam Docs](https://fishjam-cloud.github.io/fishjam-docs/) <br/> [Membrane Framework](https://membrane.stream/) <br/> [Join Membrane Discord!](https://discord.gg/nwnfVSY) |
|
|
36
|
-
| 🪼 Services | [Videoroom](https://github.com/fishjam-cloud/fishjam-videoroom) <br/> A videoconferencing app built on top of Fishjam <br/><br/> [Dashboard](https://github.com/fishjam-cloud/fishjam-dashboard) <br/> An all-around development tool for Fishjam |
|
|
37
|
-
|
|
38
|
-
## Contributing
|
|
39
|
-
|
|
40
|
-
We welcome contributions to this SDK. Please report any bugs or issues you find or feel free to make a pull request
|
|
41
|
-
with your own bug fixes or features.
|
|
42
|
-
|
|
43
|
-
### Releasing new versions
|
|
44
|
-
|
|
45
|
-
To release a new version of the package, go to `Actions` > `Release package` workflow and trigger it with the chosen release type.
|
|
46
|
-
The workflow will bump the package version in `package.json`, release the package to NPM, create a new git tag and a GitHub release.
|
|
47
|
-
|
|
48
32
|
## Copyright and License
|
|
49
33
|
|
|
50
|
-
Copyright 2024, [Software Mansion](https://swmansion.com/?utm_source=git&utm_medium=readme&utm_campaign=fishjam)
|
|
34
|
+
Copyright 2024, [Software Mansion](https://swmansion.com/?utm_source=git&utm_medium=readme&utm_campaign=fishjam-js-server-sdk)
|
|
51
35
|
|
|
52
|
-
[](https://swmansion.com/?utm_source=git&utm_medium=readme&utm_campaign=fishjam-js-server-sdk)
|
|
53
37
|
|
|
54
38
|
Licensed under the [Apache License, Version 2.0](LICENSE)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ServerMessage as s,ServerMessage_AuthRequest as t,ServerMessage_EventType as v}from"@fishjam-cloud/fishjam-proto";export{s as a,t as b,v as c};
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Peer, RoomConfig, PeerOptions } from '@fishjam-cloud/fishjam-openapi';
|
|
2
|
+
export { Peer, PeerOptions, PeerStatus, RoomConfig } from '@fishjam-cloud/fishjam-openapi';
|
|
3
|
+
import TypedEmitter from 'typed-emitter';
|
|
4
|
+
import { ServerMessage } from '@fishjam-cloud/fishjam-proto';
|
|
5
|
+
|
|
6
|
+
type Room = {
|
|
7
|
+
id: string;
|
|
8
|
+
peers: Peer[];
|
|
9
|
+
config: RoomConfig;
|
|
10
|
+
};
|
|
11
|
+
type FishjamConfig = {
|
|
12
|
+
fishjamUrl: string;
|
|
13
|
+
serverToken: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
declare const allowedNotifications: readonly ["roomCreated", "roomDeleted", "roomCrashed", "peerAdded", "peerDeleted", "peerConnected", "peerDisconnected", "peerMetadataUpdated", "peerCrashed", "trackAdded", "trackRemoved", "trackMetadataUpdated"];
|
|
17
|
+
type ErrorEventHandler = (msg: Error) => void;
|
|
18
|
+
type CloseEventHandler = (code: number, reason: string) => void;
|
|
19
|
+
type NotificationEvents = Record<(typeof allowedNotifications)[number], (message: ServerMessage) => void>;
|
|
20
|
+
declare const FishjamWSNotifier_base: new () => TypedEmitter<NotificationEvents>;
|
|
21
|
+
declare class FishjamWSNotifier extends FishjamWSNotifier_base {
|
|
22
|
+
private readonly client;
|
|
23
|
+
constructor(config: FishjamConfig, onError: ErrorEventHandler, onClose: CloseEventHandler, onConnectionFailed: ErrorEventHandler);
|
|
24
|
+
private dispatchNotification;
|
|
25
|
+
private setupConnection;
|
|
26
|
+
private isAllowedNotification;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare class FishjamClient {
|
|
30
|
+
private readonly roomApi;
|
|
31
|
+
constructor(config: FishjamConfig);
|
|
32
|
+
createPeer(roomId: string, options?: PeerOptions): Promise<{
|
|
33
|
+
peer: Peer;
|
|
34
|
+
token: string;
|
|
35
|
+
}>;
|
|
36
|
+
createRoom(config?: RoomConfig): Promise<Room>;
|
|
37
|
+
getAllRooms(): Promise<Room[]>;
|
|
38
|
+
getRoom(roomId: string): Promise<Room>;
|
|
39
|
+
deletePeer(roomId: string, peerId: string): Promise<void>;
|
|
40
|
+
deleteRoom(roomId: string): Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare class BaseException extends Error {
|
|
44
|
+
constructor(message: string);
|
|
45
|
+
}
|
|
46
|
+
declare class BadRequestException extends BaseException {
|
|
47
|
+
constructor();
|
|
48
|
+
}
|
|
49
|
+
declare class UnauthorizedException extends BaseException {
|
|
50
|
+
constructor();
|
|
51
|
+
}
|
|
52
|
+
declare class RoomNotFoundException extends BaseException {
|
|
53
|
+
constructor();
|
|
54
|
+
}
|
|
55
|
+
declare class PeerNotFoundException extends BaseException {
|
|
56
|
+
constructor();
|
|
57
|
+
}
|
|
58
|
+
declare class ServiceUnavailableException extends BaseException {
|
|
59
|
+
constructor();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { BadRequestException, FishjamClient, type FishjamConfig, FishjamWSNotifier, PeerNotFoundException, type Room, RoomNotFoundException, ServiceUnavailableException, UnauthorizedException };
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,62 @@
|
|
|
1
|
-
|
|
1
|
+
import { Peer, RoomConfig, PeerOptions } from '@fishjam-cloud/fishjam-openapi';
|
|
2
|
+
export { Peer, PeerOptions, PeerStatus, RoomConfig } from '@fishjam-cloud/fishjam-openapi';
|
|
3
|
+
import TypedEmitter from 'typed-emitter';
|
|
4
|
+
import { ServerMessage } from '@fishjam-cloud/fishjam-proto';
|
|
5
|
+
|
|
6
|
+
type Room = {
|
|
7
|
+
id: string;
|
|
8
|
+
peers: Peer[];
|
|
9
|
+
config: RoomConfig;
|
|
10
|
+
};
|
|
11
|
+
type FishjamConfig = {
|
|
12
|
+
fishjamUrl: string;
|
|
13
|
+
serverToken: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
declare const allowedNotifications: readonly ["roomCreated", "roomDeleted", "roomCrashed", "peerAdded", "peerDeleted", "peerConnected", "peerDisconnected", "peerMetadataUpdated", "peerCrashed", "trackAdded", "trackRemoved", "trackMetadataUpdated"];
|
|
17
|
+
type ErrorEventHandler = (msg: Error) => void;
|
|
18
|
+
type CloseEventHandler = (code: number, reason: string) => void;
|
|
19
|
+
type NotificationEvents = Record<(typeof allowedNotifications)[number], (message: ServerMessage) => void>;
|
|
20
|
+
declare const FishjamWSNotifier_base: new () => TypedEmitter<NotificationEvents>;
|
|
21
|
+
declare class FishjamWSNotifier extends FishjamWSNotifier_base {
|
|
22
|
+
private readonly client;
|
|
23
|
+
constructor(config: FishjamConfig, onError: ErrorEventHandler, onClose: CloseEventHandler, onConnectionFailed: ErrorEventHandler);
|
|
24
|
+
private dispatchNotification;
|
|
25
|
+
private setupConnection;
|
|
26
|
+
private isAllowedNotification;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare class FishjamClient {
|
|
30
|
+
private readonly roomApi;
|
|
31
|
+
constructor(config: FishjamConfig);
|
|
32
|
+
createPeer(roomId: string, options?: PeerOptions): Promise<{
|
|
33
|
+
peer: Peer;
|
|
34
|
+
token: string;
|
|
35
|
+
}>;
|
|
36
|
+
createRoom(config?: RoomConfig): Promise<Room>;
|
|
37
|
+
getAllRooms(): Promise<Room[]>;
|
|
38
|
+
getRoom(roomId: string): Promise<Room>;
|
|
39
|
+
deletePeer(roomId: string, peerId: string): Promise<void>;
|
|
40
|
+
deleteRoom(roomId: string): Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare class BaseException extends Error {
|
|
44
|
+
constructor(message: string);
|
|
45
|
+
}
|
|
46
|
+
declare class BadRequestException extends BaseException {
|
|
47
|
+
constructor();
|
|
48
|
+
}
|
|
49
|
+
declare class UnauthorizedException extends BaseException {
|
|
50
|
+
constructor();
|
|
51
|
+
}
|
|
52
|
+
declare class RoomNotFoundException extends BaseException {
|
|
53
|
+
constructor();
|
|
54
|
+
}
|
|
55
|
+
declare class PeerNotFoundException extends BaseException {
|
|
56
|
+
constructor();
|
|
57
|
+
}
|
|
58
|
+
declare class ServiceUnavailableException extends BaseException {
|
|
59
|
+
constructor();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { BadRequestException, FishjamClient, type FishjamConfig, FishjamWSNotifier, PeerNotFoundException, type Room, RoomNotFoundException, ServiceUnavailableException, UnauthorizedException };
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./openapi"), exports);
|
|
1
|
+
"use strict";var S=Object.create;var v=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var j=(t,e)=>{for(var o in e)v(t,o,{get:e[o],enumerable:!0})},y=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of T(e))!_.call(t,s)&&s!==o&&v(t,s,{get:()=>e[s],enumerable:!(r=N(e,s))||r.enumerable});return t};var E=(t,e,o)=>(o=t!=null?S(M(t)):{},y(e||!t||!t.__esModule?v(o,"default",{value:t,enumerable:!0}):o,t)),U=t=>y(v({},"__esModule",{value:!0}),t);var H={};j(H,{BadRequestException:()=>d,FishjamClient:()=>w,FishjamWSNotifier:()=>g,Peer:()=>i.Peer,PeerNotFoundException:()=>f,PeerOptions:()=>i.PeerOptions,PeerStatus:()=>i.PeerStatus,RoomConfig:()=>i.RoomConfig,RoomNotFoundException:()=>u,ServiceUnavailableException:()=>h,UnauthorizedException:()=>l});module.exports=U(H);var i=require("@fishjam-cloud/fishjam-openapi");var x=E(require("websocket")),P=require("events");var n=require("@fishjam-cloud/fishjam-proto");var b=t=>{let e=new URL(t);return e.protocol=e.protocol.replace("http","ws"),e.href};var F=["roomCreated","roomDeleted","roomCrashed","peerAdded","peerDeleted","peerConnected","peerDisconnected","peerMetadataUpdated","peerCrashed","trackAdded","trackRemoved","trackMetadataUpdated"],g=class extends P.EventEmitter{client;constructor(e,o,r,s){super(),this.client=new x.client;let R=`${b(e.fishjamUrl)}/socket/server/websocket`;this.client.on("connectFailed",p=>s(p)),this.client.on("connect",p=>this.setupConnection(p,e.serverToken,o,r)),this.client.connect(R)}dispatchNotification(e){if(e.type=="utf8"){console.warn("UTF-8 is an invalid notification type");return}try{let o=n.ServerMessage.toJSON(n.ServerMessage.decode(e.binaryData)),[r]=Object.keys(o);if(!this.isAllowedNotification(r))return;this.emit(r,o)}catch(o){console.error("Couldn't decode websocket server message."),console.error(o),console.error(e)}}setupConnection(e,o,r,s){let R=n.ServerMessage.encode({authRequest:{token:o}}).finish(),p=n.ServerMessage.encode({subscribeRequest:{eventType:n.ServerMessage_EventType.EVENT_TYPE_SERVER_NOTIFICATION}}).finish();e.send(R),e.send(p),e.on("message",m=>this.dispatchNotification(m)),e.on("error",m=>r(m)),e.on("close",(m,C)=>s(m,C))}isAllowedNotification(e){return F.includes(e)}};var k=E(require("axios")),A=require("@fishjam-cloud/fishjam-openapi");var a=class extends Error{constructor(e){super(e),this.name=this.constructor.name}},d=class extends a{constructor(){super("Invalid request body structure")}},l=class extends a{constructor(){super("Unauthorized")}},u=class extends a{constructor(){super("Room not found")}},f=class extends a{constructor(){super("Peer not found")}},h=class extends a{constructor(){super("Service unavailable")}};var c=(t,e)=>{switch(t){case 400:throw new d;case 401:throw new l;case 404:switch(e){case"peer":throw new f;case"room":throw new u;default:return}case 503:throw new h;default:return}};var w=class{roomApi;constructor(e){let o=k.default.create({validateStatus:r=>[200,201,400,401,404,503].includes(r),headers:{Authorization:`Bearer ${e.serverToken}`}});this.roomApi=new A.RoomApi(void 0,e.fishjamUrl,o)}async createPeer(e,o={}){let r=await this.roomApi.addPeer(e,{type:"webrtc",options:o});c(r.status);let{data:{data:s}}=r;return{peer:s.peer,token:s.token}}async createRoom(e={}){let o=await this.roomApi.createRoom(e);c(o.status);let{data:{data:{room:{components:r,...s}}}}=o;return s}async getAllRooms(){let e=await this.roomApi.getAllRooms();return c(e.status),e.data.data.map(({components:o,...r})=>r)??[]}async getRoom(e){let o=await this.roomApi.getRoom(e);c(o.status,"room");let{components:r,...s}=o.data.data;return s}async deletePeer(e,o){let r=await this.roomApi.deletePeer(e,o);c(r.status,"peer")}async deleteRoom(e){let o=await this.roomApi.deleteRoom(e);c(o.status,"room")}};0&&(module.exports={BadRequestException,FishjamClient,FishjamWSNotifier,Peer,PeerNotFoundException,PeerOptions,PeerStatus,RoomConfig,RoomNotFoundException,ServiceUnavailableException,UnauthorizedException});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as p,c as g}from"./chunk-PVJVFZZS.mjs";import{Peer as V,PeerStatus as $,RoomConfig as J,PeerOptions as L}from"@fishjam-cloud/fishjam-openapi";import*as y from"websocket";import{EventEmitter as b}from"events";var R=r=>{let e=new URL(r);return e.protocol=e.protocol.replace("http","ws"),e.href};var x=["roomCreated","roomDeleted","roomCrashed","peerAdded","peerDeleted","peerConnected","peerDisconnected","peerMetadataUpdated","peerCrashed","trackAdded","trackRemoved","trackMetadataUpdated"],v=class extends b{client;constructor(e,o,t,s){super(),this.client=new y.client;let h=`${R(e.fishjamUrl)}/socket/server/websocket`;this.client.on("connectFailed",a=>s(a)),this.client.on("connect",a=>this.setupConnection(a,e.serverToken,o,t)),this.client.connect(h)}dispatchNotification(e){if(e.type=="utf8"){console.warn("UTF-8 is an invalid notification type");return}try{let o=p.toJSON(p.decode(e.binaryData)),[t]=Object.keys(o);if(!this.isAllowedNotification(t))return;this.emit(t,o)}catch(o){console.error("Couldn't decode websocket server message."),console.error(o),console.error(e)}}setupConnection(e,o,t,s){let h=p.encode({authRequest:{token:o}}).finish(),a=p.encode({subscribeRequest:{eventType:g.EVENT_TYPE_SERVER_NOTIFICATION}}).finish();e.send(h),e.send(a),e.on("message",c=>this.dispatchNotification(c)),e.on("error",c=>t(c)),e.on("close",(c,E)=>s(c,E))}isAllowedNotification(e){return x.includes(e)}};import P from"axios";import{RoomApi as k}from"@fishjam-cloud/fishjam-openapi";var n=class extends Error{constructor(e){super(e),this.name=this.constructor.name}},m=class extends n{constructor(){super("Invalid request body structure")}},d=class extends n{constructor(){super("Unauthorized")}},l=class extends n{constructor(){super("Room not found")}},u=class extends n{constructor(){super("Peer not found")}},f=class extends n{constructor(){super("Service unavailable")}};var i=(r,e)=>{switch(r){case 400:throw new m;case 401:throw new d;case 404:switch(e){case"peer":throw new u;case"room":throw new l;default:return}case 503:throw new f;default:return}};var w=class{roomApi;constructor(e){let o=P.create({validateStatus:t=>[200,201,400,401,404,503].includes(t),headers:{Authorization:`Bearer ${e.serverToken}`}});this.roomApi=new k(void 0,e.fishjamUrl,o)}async createPeer(e,o={}){let t=await this.roomApi.addPeer(e,{type:"webrtc",options:o});i(t.status);let{data:{data:s}}=t;return{peer:s.peer,token:s.token}}async createRoom(e={}){let o=await this.roomApi.createRoom(e);i(o.status);let{data:{data:{room:{components:t,...s}}}}=o;return s}async getAllRooms(){let e=await this.roomApi.getAllRooms();return i(e.status),e.data.data.map(({components:o,...t})=>t)??[]}async getRoom(e){let o=await this.roomApi.getRoom(e);i(o.status,"room");let{components:t,...s}=o.data.data;return s}async deletePeer(e,o){let t=await this.roomApi.deletePeer(e,o);i(t.status,"peer")}async deleteRoom(e){let o=await this.roomApi.deleteRoom(e);i(o.status,"room")}};export{m as BadRequestException,w as FishjamClient,v as FishjamWSNotifier,V as Peer,u as PeerNotFoundException,L as PeerOptions,$ as PeerStatus,J as RoomConfig,l as RoomNotFoundException,f as ServiceUnavailableException,d as UnauthorizedException};
|
package/dist/proto.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ServerMessage, ServerMessage_AuthRequest, ServerMessage_EventType } from '@fishjam-cloud/fishjam-proto';
|
package/dist/proto.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ServerMessage, ServerMessage_AuthRequest, ServerMessage_EventType } from '@fishjam-cloud/fishjam-proto';
|
package/dist/proto.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var p=(r,e)=>{for(var v in e)a(r,v,{get:e[v],enumerable:!0})},u=(r,e,v,g)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of S(e))!o.call(r,t)&&t!==v&&a(r,t,{get:()=>e[t],enumerable:!(g=M(e,t))||g.enumerable});return r};var _=r=>u(a({},"__esModule",{value:!0}),r);var f={};p(f,{ServerMessage:()=>s.ServerMessage,ServerMessage_AuthRequest:()=>s.ServerMessage_AuthRequest,ServerMessage_EventType:()=>s.ServerMessage_EventType});module.exports=_(f);var s=require("@fishjam-cloud/fishjam-proto");0&&(module.exports={ServerMessage,ServerMessage_AuthRequest,ServerMessage_EventType});
|
package/dist/proto.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c}from"./chunk-PVJVFZZS.mjs";export{a as ServerMessage,b as ServerMessage_AuthRequest,c as ServerMessage_EventType};
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fishjam-cloud/js-server-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Fishjam server SDK for JavaScript",
|
|
5
5
|
"homepage": "https://github.com/fishjam-cloud/js-server-sdk",
|
|
6
|
+
"author": "Fishjam Cloud Team",
|
|
6
7
|
"repository": {
|
|
7
8
|
"type": "git",
|
|
8
9
|
"url": "https://github.com/fishjam-cloud/js-server-sdk.git"
|
|
@@ -24,28 +25,39 @@
|
|
|
24
25
|
],
|
|
25
26
|
"exports": {
|
|
26
27
|
".": "./dist/index.js",
|
|
27
|
-
"./proto": "./dist/
|
|
28
|
+
"./proto": "./dist/proto.js"
|
|
28
29
|
},
|
|
29
30
|
"scripts": {
|
|
30
|
-
"build": "
|
|
31
|
-
"build:check": "tsc --noEmit",
|
|
31
|
+
"build": "tsup",
|
|
32
32
|
"format": "prettier --write .",
|
|
33
33
|
"format:check": "prettier --check .",
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
34
|
+
"typecheck": "tsc --noEmit"
|
|
35
|
+
},
|
|
36
|
+
"tsup": {
|
|
37
|
+
"entry": [
|
|
38
|
+
"src/index.ts",
|
|
39
|
+
"src/proto.ts"
|
|
40
|
+
],
|
|
41
|
+
"dts": true,
|
|
42
|
+
"minify": true,
|
|
43
|
+
"format": [
|
|
44
|
+
"cjs",
|
|
45
|
+
"esm"
|
|
46
|
+
],
|
|
47
|
+
"outDir": "dist"
|
|
38
48
|
},
|
|
39
49
|
"dependencies": {
|
|
40
|
-
"
|
|
41
|
-
"
|
|
50
|
+
"@fishjam-cloud/fishjam-openapi": "0.1.2",
|
|
51
|
+
"@fishjam-cloud/fishjam-proto": "0.1.2",
|
|
52
|
+
"axios": "^1.7.4",
|
|
53
|
+
"websocket": "^1.0.35"
|
|
42
54
|
},
|
|
43
55
|
"devDependencies": {
|
|
44
56
|
"@openapitools/openapi-generator-cli": "^2.13.4",
|
|
45
|
-
"@types/node": "^
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
57
|
+
"@types/node": "^22.4.1",
|
|
58
|
+
"@types/websocket": "^1.0.10",
|
|
59
|
+
"prettier": "3.3.3",
|
|
60
|
+
"tsup": "^8.2.4",
|
|
61
|
+
"typed-emitter": "^2.1.0"
|
|
50
62
|
}
|
|
51
|
-
}
|
|
63
|
+
}
|