mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-03 17:59:50 +02:00
fix(demo): adapt API changes
This commit is contained in:
parent
70b4d0817c
commit
c0d13f5a27
2 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,7 @@
|
|||
"build:watch": "lerna run --scope @yume-chan/adb-backend-web --stream build:watch",
|
||||
"build:demo": "lerna run --scope demo --stream build",
|
||||
"start:demo": "lerna run --scope demo --stream start",
|
||||
"test": "lerna run --stream test"
|
||||
"test": "lerna run --stream --no-bail coverage"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lerna": "3.22.1"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { IconButton, IListProps, List, mergeStyles, mergeStyleSets, Stack } from '@fluentui/react';
|
||||
import { AdbLogger, AdbPacket } from '@yume-chan/adb';
|
||||
import { AdbLogger, AdbPacket, AdbPacketInit } from '@yume-chan/adb';
|
||||
import { decodeUtf8 } from '@yume-chan/adb-backend-web';
|
||||
import { DisposableList, EventEmitter } from '@yume-chan/event';
|
||||
import React, { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
||||
|
@ -29,7 +29,7 @@ export class AdbEventLogger {
|
|||
private readonly _incomingPacketEvent = new EventEmitter<AdbPacket>();
|
||||
public get onIncomingPacket() { return this._incomingPacketEvent.event; }
|
||||
|
||||
private readonly _outgoingPacketEvent = new EventEmitter<AdbPacket>();
|
||||
private readonly _outgoingPacketEvent = new EventEmitter<AdbPacketInit>();
|
||||
public get onOutgoingPacket() { return this._outgoingPacketEvent.event; }
|
||||
|
||||
public constructor() {
|
||||
|
@ -44,7 +44,7 @@ export class AdbEventLogger {
|
|||
}
|
||||
}
|
||||
|
||||
function serializePacket(packet: AdbPacket) {
|
||||
function serializePacket(packet: AdbPacketInit) {
|
||||
const command = decodeUtf8(new Uint32Array([packet.command]).buffer);
|
||||
|
||||
const parts = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue