mirror of
https://github.com/koush/scrypted.git
synced 2026-02-13 10:22:57 +00:00
client: add login flow, publish
This commit is contained in:
4
packages/client/package-lock.json
generated
4
packages/client/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/client",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.12",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/client",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.12",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@scrypted/rpc": "^1.0.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/client",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.12",
|
||||
"description": "",
|
||||
"main": "dist/packages/client/src/index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { SocketOptions } from 'engine.io-client';
|
||||
import * as eio from 'engine.io-client';
|
||||
import { attachPluginRemote } from '../../../server/src/plugin/plugin-remote';
|
||||
import { RpcPeer } from '../../../server/src/rpc';
|
||||
import { IOSocket } from '../../../server/src/io';
|
||||
import type { IOSocket } from '../../../server/src/io';
|
||||
import axios, { AxiosRequestConfig } from 'axios';
|
||||
import https from 'https';
|
||||
|
||||
@@ -61,8 +61,8 @@ export async function loginScryptedClient(options: ScryptedLoginOptions) {
|
||||
};
|
||||
}
|
||||
|
||||
export async function checkScryptedClientLogin(options: ScryptedConnectionOptions) {
|
||||
let { baseUrl } = options;
|
||||
export async function checkScryptedClientLogin(options?: ScryptedConnectionOptions) {
|
||||
let { baseUrl } = options || {};
|
||||
const url = `${baseUrl || ''}/login`;
|
||||
const response = await axios.get(url, {
|
||||
withCredentials: true,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Server, Socket } from "engine.io";
|
||||
import { Server } from "engine.io";
|
||||
|
||||
export type IOServer<T> = {
|
||||
on(ev: 'connection' | 'drain', fn: (socket: IOSocket & T) => void): IOServer<T>;
|
||||
|
||||
Reference in New Issue
Block a user