Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 721e14fa authored by Simon Chan's avatar Simon Chan
Browse files

feat(stream): improve ConcatStringStream

parent e3bfd159
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@
        "Demuxer",
        "Deserialization",
        "DESERIALIZERS",
        "diskstats",
        "dumpsys",
        "ebml",
        "Embedder",
        "entrypoints",
+2 −0
Original line number Diff line number Diff line
/// <reference types="node" />

import "source-map-support/register.js";

import { Adb, AdbServerClient } from "@yume-chan/adb";
+3 −3
Original line number Diff line number Diff line
@@ -24,9 +24,8 @@ function pipe(value, ...callbacks) {
    return value;
}

/** @type {import('next').NextConfig} */
module.exports = pipe(
    {
    /** @type {import('next').NextConfig} */ ({
        basePath,
        pageExtensions: ["js", "jsx", "ts", "tsx", "md", "mdx"],
        reactStrictMode: false,
@@ -72,7 +71,8 @@ module.exports = pipe(
                },
            ];
        },
    },
        poweredByHeader: false,
    }),
    withBundleAnalyzer,
    withPwa,
    withMDX
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
    "private": true,
    "scripts": {
        "postinstall": "fetch-scrcpy-server 2.1 && node scripts/manifest.mjs",
        "dev": "next dev",
        "dev": "next dev -p 5000",
        "build": "next build",
        "start": "next start",
        "lint": "next lint"
+8 −8
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ import {
import { makeStyles } from "@griffel/react";
import { AdbSyncError } from "@yume-chan/adb";
import { AdbScrcpyClient, AdbScrcpyOptionsLatest } from "@yume-chan/adb-scrcpy";
import { VERSION } from "@yume-chan/fetch-scrcpy-server";
import {
    DEFAULT_SERVER_PATH,
    ScrcpyDisplay,
@@ -26,8 +27,7 @@ import {
    ScrcpyVideoDecoderConstructor,
    TinyH264Decoder,
} from "@yume-chan/scrcpy-decoder-tinyh264";
import { VERSION } from "@yume-chan/fetch-scrcpy-server";
import { DecodeUtf8Stream, GatherStringStream } from "@yume-chan/stream-extra";
import { ConcatStringStream, DecodeUtf8Stream } from "@yume-chan/stream-extra";
import {
    autorun,
    computed,
@@ -223,12 +223,12 @@ autorun(() => {
        (async () => {
            const sync = await GLOBAL_STATE.adb!.sync();
            try {
                const content = new GatherStringStream();
                const settings = JSON.parse(
                    await sync
                        .read(SCRCPY_SETTINGS_FILENAME)
                        .pipeThrough(new DecodeUtf8Stream())
                    .pipeTo(content);
                const settings = JSON.parse(content.result);
                        .pipeThrough(new ConcatStringStream())
                );
                runInAction(() => {
                    SETTING_STATE.settings = {
                        ...DEFAULT_SETTINGS,
Loading