client: rename

This commit is contained in:
Koushik Dutta
2022-02-11 15:34:29 -08:00
parent 77b59f9064
commit a3e296504d
8 changed files with 7 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
# Use the Scrypted SDK from the command line or web
```js
import { connectScryptedClient, OnOff } from '@scrypted/web-sdk';
import { connectScryptedClient, OnOff } from '@scrypted/client';
async function example() {
const sdk = await connectScryptedClient({

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/web-sdk",
"version": "1.0.7",
"version": "1.0.8",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/web-sdk",
"version": "1.0.7",
"version": "1.0.8",
"license": "ISC",
"dependencies": {
"@scrypted/rpc": "^1.0.4",

View File

@@ -1,8 +1,8 @@
{
"name": "@scrypted/web-sdk",
"version": "1.0.7",
"name": "@scrypted/client",
"version": "1.0.8",
"description": "",
"main": "dist/packages/web-sdk/src/index.js",
"main": "dist/packages/client/src/index.js",
"scripts": {
"prebuild": "rimraf dist",
"build": "tsc --outDir dist",

View File

@@ -64,7 +64,7 @@ export async function connectScryptedClient(options: ScryptedClientOptions): Pro
socket.on('open', async function () {
try {
const rpcPeer = new RpcPeer(clientName || 'web-sdk', "core", message => socket.send(JSON.stringify(message)));
const rpcPeer = new RpcPeer(clientName || 'engine.io-client', "core", message => socket.send(JSON.stringify(message)));
socket.on('message', data => rpcPeer.handleMessage(JSON.parse(data as string)));
const scrypted = await attachPluginRemote(rpcPeer, undefined);