chore: update wasm dep & release 1.0.7
This commit is contained in:
40
.github/workflows/release.yml
vendored
Normal file
40
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Authenticate with npm registry
|
||||||
|
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
|
- name: Config npm
|
||||||
|
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
||||||
|
env:
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
|
- name: Publish
|
||||||
|
env:
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
run: npm publish -r --access public --no-git-checks
|
||||||
17
README.md
17
README.md
@@ -15,14 +15,14 @@ For the SDK reference, see [https://docs.openim.io/sdks/quickstart/electron](htt
|
|||||||
### Adding Dependencies
|
### Adding Dependencies
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm install open-im-sdk-wasm @openim/electron-client-sdk --save
|
npm install @openim/wasm-client-sdk @openim/electron-client-sdk --save
|
||||||
```
|
```
|
||||||
|
|
||||||
### Obtaining Required Static Resources for WASM
|
### Obtaining Required Static Resources for WASM
|
||||||
|
|
||||||
Follow these steps to obtain the static resources required for WebAssembly (WASM):
|
Follow these steps to obtain the static resources required for WebAssembly (WASM):
|
||||||
|
|
||||||
1. Locate the `open-im-sdk-wasm` subdirectory in the `node_modules` directory of your project. Copy all the files in the `assets` folder to your project's public resource directory.
|
1. Locate the `@openim/wasm-client-sdk` subdirectory in the `node_modules` directory of your project. Copy all the files in the `assets` folder to your project's public resource directory.
|
||||||
|
|
||||||
The files to be copied are:
|
The files to be copied are:
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ Follow these steps to obtain the static resources required for WebAssembly (WASM
|
|||||||
|
|
||||||
### Possible Issues ❗
|
### Possible Issues ❗
|
||||||
|
|
||||||
> if you are using webpack4, you may flow this issue [How to import open-im-sdk-wasm in webpack4.x](https://github.com/openimsdk/open-im-sdk-web-wasm/issues/73).
|
> if you are using webpack4, you may flow this issue [How to import @openim/wasm-client-sdk in webpack4.x](https://github.com/openimsdk/open-im-sdk-web-wasm/issues/73).
|
||||||
|
|
||||||
## Usage 🚀
|
## Usage 🚀
|
||||||
|
|
||||||
@@ -73,8 +73,8 @@ export const IMSDK = instance;
|
|||||||
> Note: You need to [deploy](https://github.com/openimsdk/open-im-server#rocket-quick-start) OpenIM Server first, the default port of OpenIM Server is 10001, 10002.
|
> Note: You need to [deploy](https://github.com/openimsdk/open-im-server#rocket-quick-start) OpenIM Server first, the default port of OpenIM Server is 10001, 10002.
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { CbEvents, LogLevel } from 'open-im-sdk-wasm';
|
import { CbEvents, LogLevel } from '@openim/wasm-client-sdk';
|
||||||
import type { WSEvent } from 'open-im-sdk-wasm/lib/types/entity';
|
import type { WSEvent } from '@openim/wasm-client-sdk/lib/types/entity';
|
||||||
|
|
||||||
IMSDK.on(CbEvents.OnConnecting, handleConnecting);
|
IMSDK.on(CbEvents.OnConnecting, handleConnecting);
|
||||||
IMSDK.on(CbEvents.OnConnectFailed, handleConnectFailed);
|
IMSDK.on(CbEvents.OnConnectFailed, handleConnectFailed);
|
||||||
@@ -127,8 +127,11 @@ To log into the IM server, you need to create an account and obtain a user ID an
|
|||||||
OpenIM makes it easy to send and receive messages. By default, there is no restriction on having a friend relationship to send messages (although you can configure other policies on the server). If you know the user ID of the recipient, you can conveniently send a message to them.
|
OpenIM makes it easy to send and receive messages. By default, there is no restriction on having a friend relationship to send messages (although you can configure other policies on the server). If you know the user ID of the recipient, you can conveniently send a message to them.
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { CbEvents } from 'open-im-sdk-wasm';
|
import { CbEvents } from '@openim/wasm-client-sdk';
|
||||||
import type { WSEvent, MessageItem } from 'open-im-sdk-wasm/lib/types/entity';
|
import type {
|
||||||
|
WSEvent,
|
||||||
|
MessageItem,
|
||||||
|
} from '@openim/wasm-client-sdk/lib/types/entity';
|
||||||
|
|
||||||
// Listenfor new messages 📩
|
// Listenfor new messages 📩
|
||||||
IMSDK.on(CbEvents.OnRecvNewMessages, handleNewMessages);
|
IMSDK.on(CbEvents.OnRecvNewMessages, handleNewMessages);
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
27
package-lock.json
generated
27
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@openim/electron-client-sdk",
|
"name": "@openim/electron-client-sdk",
|
||||||
"version": "1.0.2",
|
"version": "1.0.6",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@openim/electron-client-sdk",
|
"name": "@openim/electron-client-sdk",
|
||||||
"version": "1.0.2",
|
"version": "1.0.6",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"koffi": "^2.8.0",
|
"koffi": "^2.8.0",
|
||||||
@@ -31,7 +31,6 @@
|
|||||||
"husky": "^6.0.0",
|
"husky": "^6.0.0",
|
||||||
"jest": "^27.2.0",
|
"jest": "^27.2.0",
|
||||||
"lint-staged": "^10.5.4",
|
"lint-staged": "^10.5.4",
|
||||||
"open-im-sdk-wasm": "^3.5.3-alpha.3",
|
|
||||||
"prettier": "^2.2.1",
|
"prettier": "^2.2.1",
|
||||||
"rollup": "^2.79.1",
|
"rollup": "^2.79.1",
|
||||||
"rollup-plugin-typescript2": "^0.36.0",
|
"rollup-plugin-typescript2": "^0.36.0",
|
||||||
@@ -43,8 +42,8 @@
|
|||||||
"node": ">=12.0"
|
"node": ">=12.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"electron": ">=12.0.0",
|
"@openim/wasm-client-sdk": "^3.8.0-rc.0",
|
||||||
"open-im-sdk-wasm": "^3.5.3-alpha.5"
|
"electron": ">=12.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@aashutoshrathi/word-wrap": {
|
"node_modules/@aashutoshrathi/word-wrap": {
|
||||||
@@ -1881,6 +1880,15 @@
|
|||||||
"@octokit/openapi-types": "^18.0.0"
|
"@octokit/openapi-types": "^18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@openim/wasm-client-sdk": {
|
||||||
|
"version": "3.8.0-rc.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@openim/wasm-client-sdk/-/wasm-client-sdk-3.8.0-rc.0.tgz",
|
||||||
|
"integrity": "sha512-SGd0Yu4tUQfs9FDkR3x49NjX0jPO1W0ETxGYqKO1BMmIyhwVGeKQMpfHD2QXPh2yefhT4OLoNBffHihopUrK6Q==",
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@pnpm/config.env-replace": {
|
"node_modules/@pnpm/config.env-replace": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz",
|
||||||
@@ -10172,15 +10180,6 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/open-im-sdk-wasm": {
|
|
||||||
"version": "3.5.3-alpha.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/open-im-sdk-wasm/-/open-im-sdk-wasm-3.5.3-alpha.3.tgz",
|
|
||||||
"integrity": "sha512-J3NMi+G3LM1yjogl47dOR3LS4RD2fyTzn6NzVg9uKcgik2GD5zlopbX9IxH9AMBWEint/f9TpMe3qSF9+9NBBQ==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/optionator": {
|
"node_modules/optionator": {
|
||||||
"version": "0.9.3",
|
"version": "0.9.3",
|
||||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
|
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@openim/electron-client-sdk",
|
"name": "@openim/electron-client-sdk",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"description": "open im sdk for node",
|
"description": "open im sdk for node",
|
||||||
"source": "src/index.ts",
|
"source": "src/index.ts",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
@@ -45,6 +45,7 @@
|
|||||||
"@commitlint/config-conventional": "^16.2.4",
|
"@commitlint/config-conventional": "^16.2.4",
|
||||||
"@rollup/plugin-alias": "^5.1.0",
|
"@rollup/plugin-alias": "^5.1.0",
|
||||||
"@rollup/plugin-terser": "^0.4.4",
|
"@rollup/plugin-terser": "^0.4.4",
|
||||||
|
"@openim/wasm-client-sdk": "^3.8.0",
|
||||||
"@types/ffi-napi": "^4.0.10",
|
"@types/ffi-napi": "^4.0.10",
|
||||||
"@types/node": "^12.20.55",
|
"@types/node": "^12.20.55",
|
||||||
"@types/uuid": "^8.3.4",
|
"@types/uuid": "^8.3.4",
|
||||||
@@ -59,7 +60,6 @@
|
|||||||
"husky": "^6.0.0",
|
"husky": "^6.0.0",
|
||||||
"jest": "^27.2.0",
|
"jest": "^27.2.0",
|
||||||
"lint-staged": "^10.5.4",
|
"lint-staged": "^10.5.4",
|
||||||
"open-im-sdk-wasm": "^3.5.3-alpha.6",
|
|
||||||
"prettier": "^2.2.1",
|
"prettier": "^2.2.1",
|
||||||
"rollup": "^2.79.1",
|
"rollup": "^2.79.1",
|
||||||
"rollup-plugin-typescript2": "^0.36.0",
|
"rollup-plugin-typescript2": "^0.36.0",
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
"uuid": "^9.0.0"
|
"uuid": "^9.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"electron": ">=12.0.0",
|
"@openim/wasm-client-sdk": "^3.8.0",
|
||||||
"open-im-sdk-wasm": "^3.8.0-rc.8"
|
"electron": ">=12.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { CbEvents } from 'open-im-sdk-wasm';
|
import { CbEvents } from '@openim/wasm-client-sdk';
|
||||||
export enum NativeEvent {
|
export enum NativeEvent {
|
||||||
CONNECTING,
|
CONNECTING,
|
||||||
CONNECT_SUCCESS,
|
CONNECT_SUCCESS,
|
||||||
|
|||||||
@@ -14,13 +14,13 @@ import {
|
|||||||
setupConversationModule,
|
setupConversationModule,
|
||||||
} from './modules/conversation';
|
} from './modules/conversation';
|
||||||
import { type MessageModuleApi, setupMessageModule } from './modules/message';
|
import { type MessageModuleApi, setupMessageModule } from './modules/message';
|
||||||
import { CbEvents, LoginStatus } from 'open-im-sdk-wasm';
|
import { CbEvents, LoginStatus } from '@openim/wasm-client-sdk';
|
||||||
import { SelfUserInfo } from 'open-im-sdk-wasm/lib/types/entity';
|
import { SelfUserInfo } from '@openim/wasm-client-sdk/lib/types/entity';
|
||||||
import {
|
import {
|
||||||
SetConversationExParams,
|
SetConversationExParams,
|
||||||
SetFriendExParams,
|
SetFriendExParams,
|
||||||
UploadFileParams,
|
UploadFileParams,
|
||||||
} from 'open-im-sdk-wasm/lib/types/params';
|
} from '@openim/wasm-client-sdk/lib/types/params';
|
||||||
import {
|
import {
|
||||||
type SignalingModuleApi,
|
type SignalingModuleApi,
|
||||||
setupSignalingModule,
|
setupSignalingModule,
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import {
|
|||||||
SetConversationExParams,
|
SetConversationExParams,
|
||||||
SetConversationMsgDestructTimeParams,
|
SetConversationMsgDestructTimeParams,
|
||||||
SetConversationMsgDestructParams,
|
SetConversationMsgDestructParams,
|
||||||
} from 'open-im-sdk-wasm/lib/types/params';
|
} from '@openim/wasm-client-sdk/lib/types/params';
|
||||||
import { ConversationItem } from 'open-im-sdk-wasm/lib/types/entity';
|
import { ConversationItem } from '@openim/wasm-client-sdk/lib/types/entity';
|
||||||
|
|
||||||
export function setupConversationModule(openIMSDK: OpenIMSDK) {
|
export function setupConversationModule(openIMSDK: OpenIMSDK) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -10,14 +10,14 @@ import {
|
|||||||
RemarkFriendParams,
|
RemarkFriendParams,
|
||||||
SearchFriendParams,
|
SearchFriendParams,
|
||||||
SetFriendExParams,
|
SetFriendExParams,
|
||||||
} from 'open-im-sdk-wasm/lib/types/params';
|
} from '@openim/wasm-client-sdk/lib/types/params';
|
||||||
import {
|
import {
|
||||||
FriendshipInfo,
|
FriendshipInfo,
|
||||||
BlackUserItem,
|
BlackUserItem,
|
||||||
FriendApplicationItem,
|
FriendApplicationItem,
|
||||||
FullUserItem,
|
FullUserItem,
|
||||||
SearchedFriendsInfo,
|
SearchedFriendsInfo,
|
||||||
} from 'open-im-sdk-wasm/lib/types/entity';
|
} from '@openim/wasm-client-sdk/lib/types/entity';
|
||||||
|
|
||||||
export function setupFriendModule(openIMSDK: OpenIMSDK) {
|
export function setupFriendModule(openIMSDK: OpenIMSDK) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
GroupItem,
|
GroupItem,
|
||||||
GroupApplicationItem,
|
GroupApplicationItem,
|
||||||
GroupMemberItem,
|
GroupMemberItem,
|
||||||
} from 'open-im-sdk-wasm/lib/types/entity';
|
} from '@openim/wasm-client-sdk/lib/types/entity';
|
||||||
import {
|
import {
|
||||||
CreateGroupParams,
|
CreateGroupParams,
|
||||||
JoinGroupParams,
|
JoinGroupParams,
|
||||||
@@ -20,7 +20,7 @@ import {
|
|||||||
TransferGroupParams,
|
TransferGroupParams,
|
||||||
AccessToGroupParams,
|
AccessToGroupParams,
|
||||||
OffsetParams,
|
OffsetParams,
|
||||||
} from 'open-im-sdk-wasm/lib/types/params';
|
} from '@openim/wasm-client-sdk/lib/types/params';
|
||||||
|
|
||||||
export function setupGroupModule(openIMSDK: OpenIMSDK) {
|
export function setupGroupModule(openIMSDK: OpenIMSDK) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
MessageItem,
|
MessageItem,
|
||||||
CardElem,
|
CardElem,
|
||||||
AdvancedGetMessageResult,
|
AdvancedGetMessageResult,
|
||||||
} from 'open-im-sdk-wasm/lib/types/entity';
|
} from '@openim/wasm-client-sdk/lib/types/entity';
|
||||||
import {
|
import {
|
||||||
AtMsgParams,
|
AtMsgParams,
|
||||||
LocationMsgParams,
|
LocationMsgParams,
|
||||||
@@ -28,7 +28,7 @@ import {
|
|||||||
SoundMsgParamsByURL,
|
SoundMsgParamsByURL,
|
||||||
SendGroupReadReceiptParams,
|
SendGroupReadReceiptParams,
|
||||||
GetGroupMessageReaderParams,
|
GetGroupMessageReaderParams,
|
||||||
} from 'open-im-sdk-wasm/lib/types/params';
|
} from '@openim/wasm-client-sdk/lib/types/params';
|
||||||
import {
|
import {
|
||||||
VideoMsgByPathParams,
|
VideoMsgByPathParams,
|
||||||
SoundMsgByPathParams,
|
SoundMsgByPathParams,
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ import {
|
|||||||
RtcActionParams,
|
RtcActionParams,
|
||||||
SignalingInviteParams,
|
SignalingInviteParams,
|
||||||
UpdateMeetingParams,
|
UpdateMeetingParams,
|
||||||
} from 'open-im-sdk-wasm/lib/types/params';
|
} from '@openim/wasm-client-sdk/lib/types/params';
|
||||||
import {
|
import {
|
||||||
RtcInviteResults,
|
RtcInviteResults,
|
||||||
CallingRoomData,
|
CallingRoomData,
|
||||||
MeetingRecord,
|
MeetingRecord,
|
||||||
} from 'open-im-sdk-wasm/lib/types/entity';
|
} from '@openim/wasm-client-sdk/lib/types/entity';
|
||||||
|
|
||||||
export function setupSignalingModule(openIMSDK: OpenIMSDK) {
|
export function setupSignalingModule(openIMSDK: OpenIMSDK) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
import { v4 as uuidV4 } from 'uuid';
|
import { v4 as uuidV4 } from 'uuid';
|
||||||
import { BaseResponse } from '@/types/entity';
|
import { BaseResponse } from '@/types/entity';
|
||||||
import OpenIMSDK from '..';
|
import OpenIMSDK from '..';
|
||||||
import { MessageReceiveOptType } from 'open-im-sdk-wasm';
|
import { MessageReceiveOptType } from '@openim/wasm-client-sdk';
|
||||||
import {
|
import {
|
||||||
SelfUserInfo,
|
SelfUserInfo,
|
||||||
FullUserItemWithCache,
|
FullUserItemWithCache,
|
||||||
UserOnlineState,
|
UserOnlineState,
|
||||||
} from 'open-im-sdk-wasm/lib/types/entity';
|
} from '@openim/wasm-client-sdk/lib/types/entity';
|
||||||
import {
|
import {
|
||||||
GetUserInfoWithCacheParams,
|
GetUserInfoWithCacheParams,
|
||||||
PartialUserItem,
|
PartialUserItem,
|
||||||
} from 'open-im-sdk-wasm/lib/types/params';
|
} from '@openim/wasm-client-sdk/lib/types/params';
|
||||||
|
|
||||||
export function setupUserModule(openIMSDK: OpenIMSDK) {
|
export function setupUserModule(openIMSDK: OpenIMSDK) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ipcMain, WebContents } from 'electron';
|
import { ipcMain, WebContents } from 'electron';
|
||||||
import { CbEvents } from 'open-im-sdk-wasm';
|
import { CbEvents } from '@openim/wasm-client-sdk';
|
||||||
import OpenIMSDK from './core';
|
import OpenIMSDK from './core';
|
||||||
|
|
||||||
class OpenIMSDKMain {
|
class OpenIMSDKMain {
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
import { CbEvents, getSDK as WasmGetSDK } from 'open-im-sdk-wasm';
|
import { CbEvents, getSDK as WasmGetSDK } from '@openim/wasm-client-sdk';
|
||||||
import { MessageItem, WsResponse } from 'open-im-sdk-wasm/lib/types/entity';
|
import {
|
||||||
|
MessageItem,
|
||||||
|
WsResponse,
|
||||||
|
} from '@openim/wasm-client-sdk/lib/types/entity';
|
||||||
import {
|
import {
|
||||||
WasmPathConfig,
|
WasmPathConfig,
|
||||||
InitAndLoginConfig,
|
InitAndLoginConfig,
|
||||||
} from 'open-im-sdk-wasm/lib/types/params';
|
} from '@openim/wasm-client-sdk/lib/types/params';
|
||||||
import Emitter from './utils/emitter';
|
import Emitter from './utils/emitter';
|
||||||
import {
|
import {
|
||||||
InitConfig,
|
InitConfig,
|
||||||
@@ -109,7 +112,7 @@ const methodCache = new WeakMap<Function, any>();
|
|||||||
|
|
||||||
async function createWasmSDK(wasmConfig?: WasmPathConfig): Promise<void> {
|
async function createWasmSDK(wasmConfig?: WasmPathConfig): Promise<void> {
|
||||||
if (!wasmSDK) {
|
if (!wasmSDK) {
|
||||||
const { getSDK } = await import('open-im-sdk-wasm');
|
const { getSDK } = await import('@openim/wasm-client-sdk');
|
||||||
wasmSDK = getSDK(wasmConfig) as unknown as IMSDKInterface;
|
wasmSDK = getSDK(wasmConfig) as unknown as IMSDKInterface;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -148,6 +151,7 @@ export function getWithRenderProcess(
|
|||||||
return cachedMethod(...args);
|
return cachedMethod(...args);
|
||||||
}
|
}
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
// eslint-disable-next-line
|
||||||
const method = async (...args: any[]) => wasmSDK;
|
const method = async (...args: any[]) => wasmSDK;
|
||||||
methodCache.set(wasmSDK![prop], method);
|
methodCache.set(wasmSDK![prop], method);
|
||||||
return method(...args);
|
return method(...args);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { CbEvents } from 'open-im-sdk-wasm';
|
import { CbEvents } from '@openim/wasm-client-sdk';
|
||||||
|
|
||||||
export type EmitProxy = (event: CbEvents, ...args: any[]) => void;
|
export type EmitProxy = (event: CbEvents, ...args: any[]) => void;
|
||||||
|
|
||||||
|
|||||||
2
src/types/global.d.ts
vendored
2
src/types/global.d.ts
vendored
@@ -1,4 +1,4 @@
|
|||||||
import { WsResponse } from 'open-im-sdk-wasm/lib/types/entity';
|
import { WsResponse } from '@openim/wasm-client-sdk/lib/types/entity';
|
||||||
|
|
||||||
export interface IOpenIMRenderAPI {
|
export interface IOpenIMRenderAPI {
|
||||||
subscribe: (
|
subscribe: (
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { LogLevel } from 'open-im-sdk-wasm';
|
import { LogLevel } from '@openim/wasm-client-sdk';
|
||||||
export interface InitConfig {
|
export interface InitConfig {
|
||||||
apiAddr: string;
|
apiAddr: string;
|
||||||
wsAddr: string;
|
wsAddr: string;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { CbEvents } from 'open-im-sdk-wasm';
|
import { CbEvents } from '@openim/wasm-client-sdk';
|
||||||
|
|
||||||
interface Events {
|
interface Events {
|
||||||
[key: string]: Cbfn[];
|
[key: string]: Cbfn[];
|
||||||
|
|||||||
Reference in New Issue
Block a user