mirror of
https://github.com/koush/scrypted.git
synced 2026-02-03 14:13:28 +00:00
client: rename
This commit is contained in:
@@ -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({
|
||||
@@ -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",
|
||||
@@ -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",
|
||||
@@ -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);
|
||||
Reference in New Issue
Block a user