diff --git a/libraries/adb-credential-web/src/index.ts b/libraries/adb-credential-web/src/index.ts index dd992c4a2..70c731ad1 100644 --- a/libraries/adb-credential-web/src/index.ts +++ b/libraries/adb-credential-web/src/index.ts @@ -1,6 +1,6 @@ // cspell: ignore RSASSA -import type { AdbCredentialStore, AdbPrivateKey } from "@yume-chan/adb"; +import type { AdbCredentialStore, AdbPrivateKey } from "@gasol/adb"; function openDatabase() { return new Promise((resolve, reject) => { diff --git a/libraries/adb-daemon-webusb/src/device.ts b/libraries/adb-daemon-webusb/src/device.ts index 6595bdf93..62d436b60 100644 --- a/libraries/adb-daemon-webusb/src/device.ts +++ b/libraries/adb-daemon-webusb/src/device.ts @@ -2,25 +2,25 @@ import type { AdbDaemonDevice, AdbPacketData, AdbPacketInit, -} from "@yume-chan/adb"; +} from "@gasol/adb"; import { AdbPacketHeader, AdbPacketSerializeStream, unreachable, -} from "@yume-chan/adb"; +} from "@gasol/adb"; import type { Consumable, ReadableWritablePair, WritableStream, -} from "@yume-chan/stream-extra"; +} from "@gasol/stream-extra"; import { DuplexStreamFactory, MaybeConsumable, ReadableStream, pipeFrom, -} from "@yume-chan/stream-extra"; -import type { ExactReadable } from "@yume-chan/struct"; -import { EMPTY_UINT8_ARRAY } from "@yume-chan/struct"; +} from "@gasol/stream-extra"; +import type { ExactReadable } from "@gasol/struct"; +import { EMPTY_UINT8_ARRAY } from "@gasol/struct"; import type { UsbInterfaceFilter } from "./utils.js"; import { @@ -83,8 +83,7 @@ class Uint8ArrayExactReadable implements ExactReadable { } export class AdbDaemonWebUsbConnection - implements ReadableWritablePair> -{ + implements ReadableWritablePair> { #device: AdbDaemonWebUsbDevice; get device() { return this.#device; @@ -221,7 +220,7 @@ export class AdbDaemonWebUsbConnection // Add `payload` field to its type, it's assigned below. const packet = AdbPacketHeader.deserialize( stream, - ) as AdbPacketHeader & { payload: Uint8Array }; + ) as AdbPacketHeader & { payload: Uint8Array; }; if (packet.magic !== (packet.command ^ 0xffffffff)) { continue; diff --git a/libraries/adb-scrcpy/src/client.ts b/libraries/adb-scrcpy/src/client.ts index 2273532ac..016def1bc 100644 --- a/libraries/adb-scrcpy/src/client.ts +++ b/libraries/adb-scrcpy/src/client.ts @@ -1,8 +1,8 @@ -import type { Adb, AdbSubprocessProtocol } from "@yume-chan/adb"; +import type { Adb, AdbSubprocessProtocol } from "@gasol/adb"; import { AdbReverseNotSupportedError, AdbSubprocessNoneProtocol, -} from "@yume-chan/adb"; +} from "@gasol/adb"; import type { ScrcpyAudioStreamDisabledMetadata, ScrcpyAudioStreamErroredMetadata, @@ -11,7 +11,7 @@ import type { ScrcpyEncoder, ScrcpyMediaStreamPacket, ScrcpyVideoStreamMetadata, -} from "@yume-chan/scrcpy"; +} from "@gasol/scrcpy"; import { Av1, DEFAULT_SERVER_PATH, @@ -19,13 +19,13 @@ import { ScrcpyVideoCodecId, h264ParseConfiguration, h265ParseConfiguration, -} from "@yume-chan/scrcpy"; +} from "@gasol/scrcpy"; import type { Consumable, MaybeConsumable, ReadableStream, ReadableWritablePair, -} from "@yume-chan/stream-extra"; +} from "@gasol/stream-extra"; import { AbortController, BufferedReadableStream, @@ -34,8 +34,8 @@ import { SplitStringStream, TextDecoderStream, WritableStream, -} from "@yume-chan/stream-extra"; -import { ExactReadableEndedError } from "@yume-chan/struct"; +} from "@gasol/stream-extra"; +import { ExactReadableEndedError } from "@gasol/struct"; import type { AdbScrcpyConnection } from "./connection.js"; import type { AdbScrcpyOptions } from "./options/index.js"; @@ -80,8 +80,8 @@ interface AdbScrcpyClientInit { videoStream: ReadableStream | undefined; audioStream: ReadableStream | undefined; controlStream: - | ReadableWritablePair> - | undefined; + | ReadableWritablePair> + | undefined; } export interface AdbScrcpyVideoStream { @@ -327,7 +327,7 @@ export class AdbScrcpyClient { options, ); - this.#parseDeviceMessages(controlStream.readable).catch(() => {}); + this.#parseDeviceMessages(controlStream.readable).catch(() => { }); } } @@ -350,7 +350,7 @@ export class AdbScrcpyClient { } } catch (e) { await this.#options.endDeviceMessageStream(e); - buffered.cancel(e).catch(() => {}); + buffered.cancel(e).catch(() => { }); } } @@ -434,8 +434,7 @@ export class AdbScrcpyClient { }; default: throw new Error( - `Unexpected audio metadata type ${ - metadata["type"] as unknown as string + `Unexpected audio metadata type ${metadata["type"] as unknown as string }`, ); } diff --git a/libraries/adb-scrcpy/src/connection.ts b/libraries/adb-scrcpy/src/connection.ts index ef68711c3..26ec6dfbe 100644 --- a/libraries/adb-scrcpy/src/connection.ts +++ b/libraries/adb-scrcpy/src/connection.ts @@ -1,19 +1,19 @@ -import type { Adb, AdbSocket } from "@yume-chan/adb"; -import { AdbReverseNotSupportedError, NOOP } from "@yume-chan/adb"; +import type { Adb, AdbSocket } from "@gasol/adb"; +import { AdbReverseNotSupportedError, NOOP } from "@gasol/adb"; import { delay } from "@yume-chan/async"; -import type { Disposable } from "@yume-chan/event"; +import type { Disposable } from "@gasol/event"; import type { Consumable, PushReadableStreamController, ReadableStream, ReadableStreamDefaultReader, ReadableWritablePair, -} from "@yume-chan/stream-extra"; +} from "@gasol/stream-extra"; import { BufferedReadableStream, PushReadableStream, -} from "@yume-chan/stream-extra"; -import type { ValueOrPromise } from "@yume-chan/struct"; +} from "@gasol/stream-extra"; +import type { ValueOrPromise } from "@gasol/struct"; export interface AdbScrcpyConnectionOptions { scid: number; diff --git a/libraries/adb-scrcpy/src/options/1_16.ts b/libraries/adb-scrcpy/src/options/1_16.ts index 91945d898..45cad1ca0 100644 --- a/libraries/adb-scrcpy/src/options/1_16.ts +++ b/libraries/adb-scrcpy/src/options/1_16.ts @@ -1,10 +1,10 @@ -import type { Adb } from "@yume-chan/adb"; +import type { Adb } from "@gasol/adb"; import type { ScrcpyDisplay, ScrcpyEncoder, ScrcpyOptionsInit1_16, -} from "@yume-chan/scrcpy"; -import { WritableStream } from "@yume-chan/stream-extra"; +} from "@gasol/scrcpy"; +import { WritableStream } from "@gasol/stream-extra"; import { AdbScrcpyClient, AdbScrcpyExitedError } from "../client.js"; import type { diff --git a/libraries/adb-scrcpy/src/options/1_22.ts b/libraries/adb-scrcpy/src/options/1_22.ts index ac22a2fbe..7ede3d657 100644 --- a/libraries/adb-scrcpy/src/options/1_22.ts +++ b/libraries/adb-scrcpy/src/options/1_22.ts @@ -1,9 +1,9 @@ -import type { Adb } from "@yume-chan/adb"; +import type { Adb } from "@gasol/adb"; import type { ScrcpyDisplay, ScrcpyEncoder, ScrcpyOptionsInit1_22, -} from "@yume-chan/scrcpy"; +} from "@gasol/scrcpy"; import type { AdbScrcpyConnection } from "../connection.js"; diff --git a/libraries/adb-scrcpy/src/options/2_0.ts b/libraries/adb-scrcpy/src/options/2_0.ts index 122d222e6..238dbe9d2 100644 --- a/libraries/adb-scrcpy/src/options/2_0.ts +++ b/libraries/adb-scrcpy/src/options/2_0.ts @@ -1,9 +1,9 @@ -import type { Adb } from "@yume-chan/adb"; +import type { Adb } from "@gasol/adb"; import type { ScrcpyDisplay, ScrcpyEncoder, ScrcpyOptionsInit2_0, -} from "@yume-chan/scrcpy"; +} from "@gasol/scrcpy"; import { AdbScrcpyClient, AdbScrcpyExitedError } from "../client.js"; import type { AdbScrcpyConnection } from "../connection.js"; diff --git a/libraries/adb-scrcpy/src/options/2_1.ts b/libraries/adb-scrcpy/src/options/2_1.ts index 43376f65c..c96e37e6f 100644 --- a/libraries/adb-scrcpy/src/options/2_1.ts +++ b/libraries/adb-scrcpy/src/options/2_1.ts @@ -1,9 +1,9 @@ -import type { Adb } from "@yume-chan/adb"; +import type { Adb } from "@gasol/adb"; import type { ScrcpyDisplay, ScrcpyEncoder, ScrcpyOptionsInit2_1, -} from "@yume-chan/scrcpy"; +} from "@gasol/scrcpy"; import type { AdbScrcpyConnection } from "../connection.js"; diff --git a/libraries/adb-scrcpy/src/options/types.ts b/libraries/adb-scrcpy/src/options/types.ts index d62c999b3..4c3a4ce62 100644 --- a/libraries/adb-scrcpy/src/options/types.ts +++ b/libraries/adb-scrcpy/src/options/types.ts @@ -1,6 +1,6 @@ -import type { Adb } from "@yume-chan/adb"; -import type { ScrcpyDisplay, ScrcpyEncoder } from "@yume-chan/scrcpy"; -import { ScrcpyOptions } from "@yume-chan/scrcpy"; +import type { Adb } from "@gasol/adb"; +import type { ScrcpyDisplay, ScrcpyEncoder } from "@gasol/scrcpy"; +import { ScrcpyOptions } from "@gasol/scrcpy"; import type { AdbScrcpyConnection } from "../connection.js"; @@ -25,7 +25,7 @@ export abstract class AdbScrcpyOptions< // but we need to pass an instance here. // A normal `function` can be used as a constructor, and constructors can return // any object to override the default return value. - function () { + function() { return base; } as never, // HACK: `base.value` contains `SkipDefaultMark`, so it will be used as is, diff --git a/libraries/adb-server-node-tcp/src/index.ts b/libraries/adb-server-node-tcp/src/index.ts index e922e1056..b07fa5302 100644 --- a/libraries/adb-server-node-tcp/src/index.ts +++ b/libraries/adb-server-node-tcp/src/index.ts @@ -1,15 +1,15 @@ import type { AddressInfo, SocketConnectOpts } from "net"; import { Server, Socket } from "net"; -import type { AdbIncomingSocketHandler, AdbServerClient } from "@yume-chan/adb"; +import type { AdbIncomingSocketHandler, AdbServerClient } from "@gasol/adb"; import { MaybeConsumable, PushReadableStream, tryClose, WrapWritableStream, WritableStream, -} from "@yume-chan/stream-extra"; -import type { ValueOrPromise } from "@yume-chan/struct"; +} from "@gasol/stream-extra"; +import type { ValueOrPromise } from "@gasol/struct"; function nodeSocketToConnection( socket: Socket, @@ -59,8 +59,7 @@ function nodeSocketToConnection( } export class AdbServerNodeTcpConnector - implements AdbServerClient.ServerConnector -{ + implements AdbServerClient.ServerConnector { readonly spec: SocketConnectOpts; readonly #listeners = new Map(); diff --git a/libraries/adb/src/adb.ts b/libraries/adb/src/adb.ts index a43ffe73d..3e7f820d8 100644 --- a/libraries/adb/src/adb.ts +++ b/libraries/adb/src/adb.ts @@ -1,9 +1,9 @@ import type { MaybeConsumable, ReadableWritablePair, -} from "@yume-chan/stream-extra"; -import { ConcatStringStream, TextDecoderStream } from "@yume-chan/stream-extra"; -import type { ValueOrPromise } from "@yume-chan/struct"; +} from "@gasol/stream-extra"; +import { ConcatStringStream, TextDecoderStream } from "@gasol/stream-extra"; +import type { ValueOrPromise } from "@gasol/struct"; import type { AdbBanner } from "./banner.js"; import type { AdbFrameBuffer } from "./commands/index.js"; @@ -24,7 +24,7 @@ export interface Closeable { export interface AdbSocket extends ReadableWritablePair>, - Closeable { + Closeable { get service(): string; get closed(): Promise; @@ -126,7 +126,7 @@ export class Adb implements Closeable { async rm( filenames: string | string[], - options?: { recursive?: boolean; force?: boolean }, + options?: { recursive?: boolean; force?: boolean; }, ): Promise { const args = ["rm"]; if (options?.recursive) { diff --git a/libraries/adb/src/commands/base.ts b/libraries/adb/src/commands/base.ts index b1112271c..ef0bec443 100644 --- a/libraries/adb/src/commands/base.ts +++ b/libraries/adb/src/commands/base.ts @@ -1,4 +1,4 @@ -import { AutoDisposable } from "@yume-chan/event"; +import { AutoDisposable } from "@gasol/event"; import type { Adb } from "../adb.js"; diff --git a/libraries/adb/src/commands/framebuffer.ts b/libraries/adb/src/commands/framebuffer.ts index 49c24efb7..a0a6250c2 100644 --- a/libraries/adb/src/commands/framebuffer.ts +++ b/libraries/adb/src/commands/framebuffer.ts @@ -1,5 +1,5 @@ -import { BufferedReadableStream } from "@yume-chan/stream-extra"; -import Struct, { StructEmptyError } from "@yume-chan/struct"; +import { BufferedReadableStream } from "@gasol/stream-extra"; +import Struct, { StructEmptyError } from "@gasol/struct"; import type { Adb } from "../adb.js"; diff --git a/libraries/adb/src/commands/reverse.ts b/libraries/adb/src/commands/reverse.ts index 1f7619fa4..41dea473f 100644 --- a/libraries/adb/src/commands/reverse.ts +++ b/libraries/adb/src/commands/reverse.ts @@ -1,8 +1,8 @@ // cspell: ignore killforward -import { AutoDisposable } from "@yume-chan/event"; -import { BufferedReadableStream } from "@yume-chan/stream-extra"; -import Struct, { ExactReadableEndedError, encodeUtf8 } from "@yume-chan/struct"; +import { AutoDisposable } from "@gasol/event"; +import { BufferedReadableStream } from "@gasol/stream-extra"; +import Struct, { ExactReadableEndedError, encodeUtf8 } from "@gasol/struct"; import type { Adb, AdbIncomingSocketHandler } from "../adb.js"; import { hexToNumber, sequenceEqual } from "../utils/index.js"; diff --git a/libraries/adb/src/commands/subprocess/command.ts b/libraries/adb/src/commands/subprocess/command.ts index 27f8f80b4..149426054 100644 --- a/libraries/adb/src/commands/subprocess/command.ts +++ b/libraries/adb/src/commands/subprocess/command.ts @@ -1,4 +1,4 @@ -import { ConcatStringStream, TextDecoderStream } from "@yume-chan/stream-extra"; +import { ConcatStringStream, TextDecoderStream } from "@gasol/stream-extra"; import { AdbCommandBase } from "../base.js"; diff --git a/libraries/adb/src/commands/subprocess/protocols/none.spec.ts b/libraries/adb/src/commands/subprocess/protocols/none.spec.ts index 4a4a5a284..98066779b 100644 --- a/libraries/adb/src/commands/subprocess/protocols/none.spec.ts +++ b/libraries/adb/src/commands/subprocess/protocols/none.spec.ts @@ -2,7 +2,7 @@ import assert from "node:assert"; import { describe, it, mock } from "node:test"; import { PromiseResolver } from "@yume-chan/async"; -import { ReadableStream, WritableStream } from "@yume-chan/stream-extra"; +import { ReadableStream, WritableStream } from "@gasol/stream-extra"; import type { AdbSocket } from "../../../adb.js"; @@ -14,7 +14,7 @@ describe("AdbSubprocessNoneProtocol", () => { const closed = new PromiseResolver(); const socket: AdbSocket = { service: "", - close: mock.fn(() => {}), + close: mock.fn(() => { }), closed: closed.promise, readable: new ReadableStream({ async start(controller) { @@ -44,7 +44,7 @@ describe("AdbSubprocessNoneProtocol", () => { const closed = new PromiseResolver(); const socket: AdbSocket = { service: "", - close: mock.fn(() => {}), + close: mock.fn(() => { }), closed: closed.promise, readable: new ReadableStream({ async start(controller) { @@ -83,7 +83,7 @@ describe("AdbSubprocessNoneProtocol", () => { const closed = new PromiseResolver(); const socket: AdbSocket = { service: "", - close: mock.fn(() => {}), + close: mock.fn(() => { }), closed: closed.promise, readable: new ReadableStream({ async start(controller) { @@ -113,7 +113,7 @@ describe("AdbSubprocessNoneProtocol", () => { const closed = new PromiseResolver(); const socket: AdbSocket = { service: "", - close: mock.fn(() => {}), + close: mock.fn(() => { }), closed: closed.promise, readable: new ReadableStream(), writable: new WritableStream(), @@ -130,7 +130,7 @@ describe("AdbSubprocessNoneProtocol", () => { it("`resize` shouldn't throw any error", () => { const socket: AdbSocket = { service: "", - close: mock.fn(() => {}), + close: mock.fn(() => { }), closed: new PromiseResolver().promise, readable: new ReadableStream(), writable: new WritableStream(), @@ -141,7 +141,7 @@ describe("AdbSubprocessNoneProtocol", () => { }); it("`kill` should close `socket`", async () => { - const close = mock.fn(() => {}); + const close = mock.fn(() => { }); const socket: AdbSocket = { service: "", close, diff --git a/libraries/adb/src/commands/subprocess/protocols/none.ts b/libraries/adb/src/commands/subprocess/protocols/none.ts index 3ad575221..ef0613d2b 100644 --- a/libraries/adb/src/commands/subprocess/protocols/none.ts +++ b/libraries/adb/src/commands/subprocess/protocols/none.ts @@ -1,5 +1,5 @@ -import type { MaybeConsumable, WritableStream } from "@yume-chan/stream-extra"; -import { ReadableStream } from "@yume-chan/stream-extra"; +import type { MaybeConsumable, WritableStream } from "@gasol/stream-extra"; +import { ReadableStream } from "@gasol/stream-extra"; import type { Adb, AdbSocket } from "../../../adb.js"; import { unreachable } from "../../../utils/index.js"; diff --git a/libraries/adb/src/commands/subprocess/protocols/shell.spec.ts b/libraries/adb/src/commands/subprocess/protocols/shell.spec.ts index e89661890..ada540920 100644 --- a/libraries/adb/src/commands/subprocess/protocols/shell.spec.ts +++ b/libraries/adb/src/commands/subprocess/protocols/shell.spec.ts @@ -2,8 +2,8 @@ import assert from "node:assert"; import { describe, it } from "node:test"; import { PromiseResolver } from "@yume-chan/async"; -import type { ReadableStreamDefaultController } from "@yume-chan/stream-extra"; -import { ReadableStream, WritableStream } from "@yume-chan/stream-extra"; +import type { ReadableStreamDefaultController } from "@gasol/stream-extra"; +import { ReadableStream, WritableStream } from "@gasol/stream-extra"; import type { AdbSocket } from "../../../adb.js"; @@ -19,7 +19,7 @@ function createMockSocket( const closed = new PromiseResolver(); const socket: AdbSocket = { service: "", - close() {}, + close() { }, closed: closed.promise, readable: new ReadableStream({ async start(controller) { @@ -54,7 +54,7 @@ async function assertResolves(promise: Promise, expected: T) { describe("AdbSubprocessShellProtocol", () => { describe("`stdout` and `stderr`", () => { it("should parse data from `socket", () => { - const [socket] = createMockSocket(() => {}); + const [socket] = createMockSocket(() => { }); const process = new AdbSubprocessShellProtocol(socket); const stdoutReader = process.stdout.getReader(); diff --git a/libraries/adb/src/commands/subprocess/protocols/shell.ts b/libraries/adb/src/commands/subprocess/protocols/shell.ts index 47d5c56d1..3f1fc65b6 100644 --- a/libraries/adb/src/commands/subprocess/protocols/shell.ts +++ b/libraries/adb/src/commands/subprocess/protocols/shell.ts @@ -3,15 +3,15 @@ import type { PushReadableStreamController, ReadableStream, WritableStreamDefaultWriter, -} from "@yume-chan/stream-extra"; +} from "@gasol/stream-extra"; import { MaybeConsumable, PushReadableStream, StructDeserializeStream, WritableStream, -} from "@yume-chan/stream-extra"; -import type { StructValueType } from "@yume-chan/struct"; -import Struct, { placeholder } from "@yume-chan/struct"; +} from "@gasol/stream-extra"; +import type { StructValueType } from "@gasol/struct"; +import Struct, { placeholder } from "@gasol/struct"; import type { Adb, AdbSocket } from "../../../adb.js"; import { AdbFeature } from "../../../features.js"; diff --git a/libraries/adb/src/commands/subprocess/protocols/types.ts b/libraries/adb/src/commands/subprocess/protocols/types.ts index bfd86043a..f4a744007 100644 --- a/libraries/adb/src/commands/subprocess/protocols/types.ts +++ b/libraries/adb/src/commands/subprocess/protocols/types.ts @@ -2,8 +2,8 @@ import type { MaybeConsumable, ReadableStream, WritableStream, -} from "@yume-chan/stream-extra"; -import type { ValueOrPromise } from "@yume-chan/struct"; +} from "@gasol/stream-extra"; +import type { ValueOrPromise } from "@gasol/struct"; import type { Adb, AdbSocket } from "../../../adb.js"; @@ -59,5 +59,5 @@ export interface AdbSubprocessProtocolConstructor { raw(adb: Adb, command: string): ValueOrPromise; /** Creates a new `AdbShell` by attaching to an exist `AdbSocket` */ - new (socket: AdbSocket): AdbSubprocessProtocol; + new(socket: AdbSocket): AdbSubprocessProtocol; } diff --git a/libraries/adb/src/commands/sync/list.ts b/libraries/adb/src/commands/sync/list.ts index cd028dabb..970c97623 100644 --- a/libraries/adb/src/commands/sync/list.ts +++ b/libraries/adb/src/commands/sync/list.ts @@ -1,4 +1,4 @@ -import Struct from "@yume-chan/struct"; +import Struct from "@gasol/struct"; import { AdbSyncRequestId, adbSyncWriteRequest } from "./request.js"; import { AdbSyncResponseId, adbSyncReadResponses } from "./response.js"; diff --git a/libraries/adb/src/commands/sync/pull.ts b/libraries/adb/src/commands/sync/pull.ts index 60e977ec8..33b35e2b5 100644 --- a/libraries/adb/src/commands/sync/pull.ts +++ b/libraries/adb/src/commands/sync/pull.ts @@ -1,6 +1,6 @@ -import type { ReadableStream } from "@yume-chan/stream-extra"; -import { PushReadableStream } from "@yume-chan/stream-extra"; -import Struct from "@yume-chan/struct"; +import type { ReadableStream } from "@gasol/stream-extra"; +import { PushReadableStream } from "@gasol/stream-extra"; +import Struct from "@gasol/struct"; import { AdbSyncRequestId, adbSyncWriteRequest } from "./request.js"; import { AdbSyncResponseId, adbSyncReadResponses } from "./response.js"; diff --git a/libraries/adb/src/commands/sync/push.ts b/libraries/adb/src/commands/sync/push.ts index 9adff78a2..64b6e63c5 100644 --- a/libraries/adb/src/commands/sync/push.ts +++ b/libraries/adb/src/commands/sync/push.ts @@ -1,10 +1,10 @@ -import type { ReadableStream } from "@yume-chan/stream-extra"; +import type { ReadableStream } from "@gasol/stream-extra"; import { AbortController, DistributionStream, MaybeConsumable, -} from "@yume-chan/stream-extra"; -import Struct, { placeholder } from "@yume-chan/struct"; +} from "@gasol/stream-extra"; +import Struct, { placeholder } from "@gasol/struct"; import { NOOP } from "../../utils/index.js"; diff --git a/libraries/adb/src/commands/sync/request.ts b/libraries/adb/src/commands/sync/request.ts index 788a18b85..f68c1fd78 100644 --- a/libraries/adb/src/commands/sync/request.ts +++ b/libraries/adb/src/commands/sync/request.ts @@ -1,4 +1,4 @@ -import Struct from "@yume-chan/struct"; +import Struct from "@gasol/struct"; import { encodeUtf8 } from "../../utils/index.js"; diff --git a/libraries/adb/src/commands/sync/response.ts b/libraries/adb/src/commands/sync/response.ts index 4309041fa..d571c6506 100644 --- a/libraries/adb/src/commands/sync/response.ts +++ b/libraries/adb/src/commands/sync/response.ts @@ -1,10 +1,10 @@ -import { getUint32LittleEndian } from "@yume-chan/no-data-view"; +import { getUint32LittleEndian } from "@gasol/no-data-view"; import type { AsyncExactReadable, StructLike, StructValueType, -} from "@yume-chan/struct"; -import Struct, { decodeUtf8 } from "@yume-chan/struct"; +} from "@gasol/struct"; +import Struct, { decodeUtf8 } from "@gasol/struct"; function encodeAsciiUnchecked(value: string): Uint8Array { const result = new Uint8Array(value.length); @@ -36,7 +36,7 @@ export namespace AdbSyncResponseId { export const Fail = adbSyncEncodeId("FAIL"); } -export class AdbSyncError extends Error {} +export class AdbSyncError extends Error { } export const AdbSyncFailResponse = new Struct({ littleEndian: true }) .uint32("messageLength") diff --git a/libraries/adb/src/commands/sync/socket.spec.ts b/libraries/adb/src/commands/sync/socket.spec.ts index 4e343ffcf..3707e7ca3 100644 --- a/libraries/adb/src/commands/sync/socket.spec.ts +++ b/libraries/adb/src/commands/sync/socket.spec.ts @@ -1,7 +1,7 @@ import * as assert from "node:assert"; import { describe, it } from "node:test"; -import { ReadableStream, WritableStream } from "@yume-chan/stream-extra"; +import { ReadableStream, WritableStream } from "@gasol/stream-extra"; import { AdbSyncSocket } from "./socket.js"; @@ -13,7 +13,7 @@ describe("AdbSyncSocket", () => { const socket = new AdbSyncSocket( { service: "", - close() {}, + close() { }, closed: Promise.resolve(), readable: new ReadableStream(), writable: new WritableStream(), diff --git a/libraries/adb/src/commands/sync/socket.ts b/libraries/adb/src/commands/sync/socket.ts index 3ef72429b..eb9e7869e 100644 --- a/libraries/adb/src/commands/sync/socket.ts +++ b/libraries/adb/src/commands/sync/socket.ts @@ -1,13 +1,13 @@ import type { MaybeConsumable, WritableStreamDefaultWriter, -} from "@yume-chan/stream-extra"; +} from "@gasol/stream-extra"; import { BufferCombiner, BufferedReadableStream, Consumable, -} from "@yume-chan/stream-extra"; -import type { AsyncExactReadable } from "@yume-chan/struct"; +} from "@gasol/stream-extra"; +import type { AsyncExactReadable } from "@gasol/struct"; import type { AdbSocket } from "../../adb.js"; import { AutoResetEvent } from "../../utils/index.js"; diff --git a/libraries/adb/src/commands/sync/stat.ts b/libraries/adb/src/commands/sync/stat.ts index 130376560..f5a2dc5d6 100644 --- a/libraries/adb/src/commands/sync/stat.ts +++ b/libraries/adb/src/commands/sync/stat.ts @@ -1,4 +1,4 @@ -import Struct, { placeholder } from "@yume-chan/struct"; +import Struct, { placeholder } from "@gasol/struct"; import { AdbSyncRequestId, adbSyncWriteRequest } from "./request.js"; import { AdbSyncResponseId, adbSyncReadResponse } from "./response.js"; diff --git a/libraries/adb/src/commands/sync/sync.ts b/libraries/adb/src/commands/sync/sync.ts index 10b360e3b..2853752f5 100644 --- a/libraries/adb/src/commands/sync/sync.ts +++ b/libraries/adb/src/commands/sync/sync.ts @@ -1,5 +1,5 @@ -import { AutoDisposable } from "@yume-chan/event"; -import type { MaybeConsumable, ReadableStream } from "@yume-chan/stream-extra"; +import { AutoDisposable } from "@gasol/event"; +import type { MaybeConsumable, ReadableStream } from "@gasol/stream-extra"; import type { Adb, AdbSocket } from "../../adb.js"; import { AdbFeature } from "../../features.js"; diff --git a/libraries/adb/src/daemon/auth.spec.ts b/libraries/adb/src/daemon/auth.spec.ts index 7e41a0d7b..2eff9dbf7 100644 --- a/libraries/adb/src/daemon/auth.spec.ts +++ b/libraries/adb/src/daemon/auth.spec.ts @@ -1,7 +1,7 @@ import * as assert from "node:assert"; import { describe, it } from "node:test"; -import { EMPTY_UINT8_ARRAY, encodeUtf8 } from "@yume-chan/struct"; +import { EMPTY_UINT8_ARRAY, encodeUtf8 } from "@gasol/struct"; import { decodeBase64 } from "../utils/base64.js"; diff --git a/libraries/adb/src/daemon/auth.ts b/libraries/adb/src/daemon/auth.ts index ca5918829..f401ad748 100644 --- a/libraries/adb/src/daemon/auth.ts +++ b/libraries/adb/src/daemon/auth.ts @@ -1,7 +1,7 @@ import { PromiseResolver } from "@yume-chan/async"; -import type { Disposable } from "@yume-chan/event"; -import type { ValueOrPromise } from "@yume-chan/struct"; -import { EMPTY_UINT8_ARRAY } from "@yume-chan/struct"; +import type { Disposable } from "@gasol/event"; +import type { ValueOrPromise } from "@gasol/struct"; +import { EMPTY_UINT8_ARRAY } from "@gasol/struct"; import { calculateBase64EncodedLength, @@ -67,7 +67,7 @@ export interface AdbAuthenticator { ): AsyncIterable; } -export const AdbSignatureAuthenticator: AdbAuthenticator = async function* ( +export const AdbSignatureAuthenticator: AdbAuthenticator = async function*( credentialStore: AdbCredentialStore, getNextRequest: () => Promise, ): AsyncIterable { @@ -88,7 +88,7 @@ export const AdbSignatureAuthenticator: AdbAuthenticator = async function* ( } }; -export const AdbPublicKeyAuthenticator: AdbAuthenticator = async function* ( +export const AdbPublicKeyAuthenticator: AdbAuthenticator = async function*( credentialStore: AdbCredentialStore, getNextRequest: () => Promise, ): AsyncIterable { @@ -117,8 +117,8 @@ export const AdbPublicKeyAuthenticator: AdbAuthenticator = async function* ( : EMPTY_UINT8_ARRAY; const publicKeyBuffer = new Uint8Array( publicKeyBase64Length + - (nameBuffer.length ? nameBuffer.length + 1 : 0) + // Space character + name - 1, // Null character + (nameBuffer.length ? nameBuffer.length + 1 : 0) + // Space character + name + 1, // Null character ); adbGeneratePublicKey(privateKey.buffer, publicKeyBuffer); diff --git a/libraries/adb/src/daemon/crypto.ts b/libraries/adb/src/daemon/crypto.ts index e4c2e3a57..8445f093e 100644 --- a/libraries/adb/src/daemon/crypto.ts +++ b/libraries/adb/src/daemon/crypto.ts @@ -2,7 +2,7 @@ import { getUint64BigEndian, setInt64BigEndian, setInt64LittleEndian, -} from "@yume-chan/no-data-view"; +} from "@gasol/no-data-view"; /** * Gets the `BigInt` value at the specified byte offset and length from the start of the view. There is diff --git a/libraries/adb/src/daemon/device.ts b/libraries/adb/src/daemon/device.ts index 5691c818f..7b4cf79ee 100644 --- a/libraries/adb/src/daemon/device.ts +++ b/libraries/adb/src/daemon/device.ts @@ -1,5 +1,5 @@ -import type { Consumable, ReadableWritablePair } from "@yume-chan/stream-extra"; -import type { ValueOrPromise } from "@yume-chan/struct"; +import type { Consumable, ReadableWritablePair } from "@gasol/stream-extra"; +import type { ValueOrPromise } from "@gasol/struct"; import type { AdbPacketData, AdbPacketInit } from "./packet.js"; diff --git a/libraries/adb/src/daemon/dispatcher.ts b/libraries/adb/src/daemon/dispatcher.ts index 92e916e81..923e3747f 100644 --- a/libraries/adb/src/daemon/dispatcher.ts +++ b/libraries/adb/src/daemon/dispatcher.ts @@ -6,17 +6,17 @@ import { import { getUint32LittleEndian, setUint32LittleEndian, -} from "@yume-chan/no-data-view"; +} from "@gasol/no-data-view"; import type { ReadableWritablePair, WritableStreamDefaultWriter, -} from "@yume-chan/stream-extra"; +} from "@gasol/stream-extra"; import { AbortController, Consumable, WritableStream, -} from "@yume-chan/stream-extra"; -import { EMPTY_UINT8_ARRAY, decodeUtf8, encodeUtf8 } from "@yume-chan/struct"; +} from "@gasol/stream-extra"; +import { EMPTY_UINT8_ARRAY, decodeUtf8, encodeUtf8 } from "@gasol/struct"; import type { AdbIncomingSocketHandler, AdbSocket, Closeable } from "../adb.js"; diff --git a/libraries/adb/src/daemon/packet.ts b/libraries/adb/src/daemon/packet.ts index 995641cc1..882cccaa9 100644 --- a/libraries/adb/src/daemon/packet.ts +++ b/libraries/adb/src/daemon/packet.ts @@ -1,5 +1,5 @@ -import { Consumable, TransformStream } from "@yume-chan/stream-extra"; -import Struct from "@yume-chan/struct"; +import { Consumable, TransformStream } from "@gasol/stream-extra"; +import Struct from "@gasol/struct"; export enum AdbCommand { Auth = 0x48545541, // 'AUTH' diff --git a/libraries/adb/src/daemon/socket.ts b/libraries/adb/src/daemon/socket.ts index d1e6bb03a..e22b0353d 100644 --- a/libraries/adb/src/daemon/socket.ts +++ b/libraries/adb/src/daemon/socket.ts @@ -1,13 +1,13 @@ import { PromiseResolver } from "@yume-chan/async"; -import type { Disposable } from "@yume-chan/event"; +import type { Disposable } from "@gasol/event"; import type { PushReadableStreamController, ReadableStream, WritableStream, WritableStreamDefaultController, -} from "@yume-chan/stream-extra"; -import { MaybeConsumable, PushReadableStream } from "@yume-chan/stream-extra"; -import { EMPTY_UINT8_ARRAY } from "@yume-chan/struct"; +} from "@gasol/stream-extra"; +import { MaybeConsumable, PushReadableStream } from "@gasol/stream-extra"; +import { EMPTY_UINT8_ARRAY } from "@gasol/struct"; import type { AdbSocket } from "../adb.js"; @@ -34,8 +34,7 @@ export interface AdbDaemonSocketInit extends AdbDaemonSocketInfo { } export class AdbDaemonSocketController - implements AdbDaemonSocketInfo, AdbSocket, Disposable -{ + implements AdbDaemonSocketInfo, AdbSocket, Disposable { readonly #dispatcher!: AdbPacketDispatcher; readonly localId!: number; diff --git a/libraries/adb/src/daemon/transport.ts b/libraries/adb/src/daemon/transport.ts index 433060019..5f1f0e7bd 100644 --- a/libraries/adb/src/daemon/transport.ts +++ b/libraries/adb/src/daemon/transport.ts @@ -1,12 +1,12 @@ import { PromiseResolver } from "@yume-chan/async"; -import type { ReadableWritablePair } from "@yume-chan/stream-extra"; +import type { ReadableWritablePair } from "@gasol/stream-extra"; import { AbortController, Consumable, WritableStream, -} from "@yume-chan/stream-extra"; -import type { ValueOrPromise } from "@yume-chan/struct"; -import { decodeUtf8, encodeUtf8 } from "@yume-chan/struct"; +} from "@gasol/stream-extra"; +import type { ValueOrPromise } from "@gasol/struct"; +import { decodeUtf8, encodeUtf8 } from "@gasol/struct"; import type { AdbIncomingSocketHandler, diff --git a/libraries/adb/src/server/client.ts b/libraries/adb/src/server/client.ts index 407832204..bb7730ff0 100644 --- a/libraries/adb/src/server/client.ts +++ b/libraries/adb/src/server/client.ts @@ -1,26 +1,26 @@ // cspell:ignore tport import { PromiseResolver } from "@yume-chan/async"; -import { getUint64LittleEndian } from "@yume-chan/no-data-view"; +import { getUint64LittleEndian } from "@gasol/no-data-view"; import type { AbortSignal, ReadableWritablePair, WritableStreamDefaultWriter, -} from "@yume-chan/stream-extra"; +} from "@gasol/stream-extra"; import { BufferedReadableStream, MaybeConsumable, WrapWritableStream, tryCancel, tryClose, -} from "@yume-chan/stream-extra"; -import type { ValueOrPromise } from "@yume-chan/struct"; +} from "@gasol/stream-extra"; +import type { ValueOrPromise } from "@gasol/struct"; import { EMPTY_UINT8_ARRAY, SyncPromise, decodeUtf8, encodeUtf8, -} from "@yume-chan/struct"; +} from "@gasol/struct"; import type { AdbIncomingSocketHandler, AdbSocket, Closeable } from "../adb.js"; import { AdbBanner } from "../banner.js"; @@ -346,7 +346,7 @@ export class AdbServerClient { */ async getDeviceFeatures( device: AdbServerClient.DeviceSelector, - ): Promise<{ transportId: bigint; features: AdbFeature[] }> { + ): Promise<{ transportId: bigint; features: AdbFeature[]; }> { // On paper, `host:features` is a host service (device features are cached in host), // so it shouldn't use `createDeviceConnection`, // which is used to forward the service to the device. @@ -556,7 +556,7 @@ export namespace AdbServerClient { export interface ServerConnection extends ReadableWritablePair, - Closeable { + Closeable { get closed(): Promise; } @@ -580,10 +580,10 @@ export namespace AdbServerClient { } export type DeviceSelector = - | { transportId: bigint } - | { serial: string } - | { usb: true } - | { tcp: true } + | { transportId: bigint; } + | { serial: string; } + | { usb: true; } + | { tcp: true; } | undefined; export interface Device { diff --git a/libraries/adb/src/server/transport.ts b/libraries/adb/src/server/transport.ts index 7f49210a4..c7cbdc0b4 100644 --- a/libraries/adb/src/server/transport.ts +++ b/libraries/adb/src/server/transport.ts @@ -1,6 +1,6 @@ import { PromiseResolver } from "@yume-chan/async"; -import { AbortController } from "@yume-chan/stream-extra"; -import type { ValueOrPromise } from "@yume-chan/struct"; +import { AbortController } from "@gasol/stream-extra"; +import type { ValueOrPromise } from "@gasol/struct"; import type { AdbIncomingSocketHandler, diff --git a/libraries/adb/src/utils/auto-reset-event.ts b/libraries/adb/src/utils/auto-reset-event.ts index 6ccd23516..3d496ea09 100644 --- a/libraries/adb/src/utils/auto-reset-event.ts +++ b/libraries/adb/src/utils/auto-reset-event.ts @@ -1,5 +1,5 @@ import { PromiseResolver } from "@yume-chan/async"; -import type { Disposable } from "@yume-chan/event"; +import type { Disposable } from "@gasol/event"; export class AutoResetEvent implements Disposable { #set: boolean; diff --git a/libraries/android-bin/src/am.ts b/libraries/android-bin/src/am.ts index a3638088b..2380513ea 100644 --- a/libraries/android-bin/src/am.ts +++ b/libraries/android-bin/src/am.ts @@ -1,6 +1,6 @@ -import type { Adb } from "@yume-chan/adb"; -import { AdbCommandBase } from "@yume-chan/adb"; -import { ConcatStringStream, TextDecoderStream } from "@yume-chan/stream-extra"; +import type { Adb } from "@gasol/adb"; +import { AdbCommandBase } from "@gasol/adb"; +import { ConcatStringStream, TextDecoderStream } from "@gasol/stream-extra"; import { Cmd } from "./cmd.js"; import type { IntentBuilder } from "./intent.js"; diff --git a/libraries/android-bin/src/bu.ts b/libraries/android-bin/src/bu.ts index 7f0e45caa..447495b52 100644 --- a/libraries/android-bin/src/bu.ts +++ b/libraries/android-bin/src/bu.ts @@ -1,6 +1,6 @@ -import { AdbCommandBase } from "@yume-chan/adb"; -import type { MaybeConsumable, ReadableStream } from "@yume-chan/stream-extra"; -import { ConcatStringStream, TextDecoderStream } from "@yume-chan/stream-extra"; +import { AdbCommandBase } from "@gasol/adb"; +import type { MaybeConsumable, ReadableStream } from "@gasol/stream-extra"; +import { ConcatStringStream, TextDecoderStream } from "@gasol/stream-extra"; export interface AdbBackupOptions { user: number; diff --git a/libraries/android-bin/src/bug-report.ts b/libraries/android-bin/src/bug-report.ts index dafc3763e..63b9dfc2d 100644 --- a/libraries/android-bin/src/bug-report.ts +++ b/libraries/android-bin/src/bug-report.ts @@ -1,9 +1,9 @@ // cspell: ignore bugreport // cspell: ignore bugreportz -import type { Adb, AdbSync } from "@yume-chan/adb"; -import { AdbCommandBase, AdbSubprocessShellProtocol } from "@yume-chan/adb"; -import type { AbortSignal, ReadableStream } from "@yume-chan/stream-extra"; +import type { Adb, AdbSync } from "@gasol/adb"; +import { AdbCommandBase, AdbSubprocessShellProtocol } from "@gasol/adb"; +import type { AbortSignal, ReadableStream } from "@gasol/stream-extra"; import { AbortController, PushReadableStream, @@ -11,7 +11,7 @@ import { TextDecoderStream, WrapReadableStream, WritableStream, -} from "@yume-chan/stream-extra"; +} from "@gasol/stream-extra"; export interface BugReportCapabilities { supportsBugReport: boolean; @@ -251,7 +251,7 @@ export class BugReport extends AdbCommandBase { throw new Error("bugreportz did not return file name"); } - // Design choice: we don't automatically pull the file to avoid more dependency on `@yume-chan/adb` + // Design choice: we don't automatically pull the file to avoid more dependency on `@gasol/adb` return filename; } diff --git a/libraries/android-bin/src/cmd.ts b/libraries/android-bin/src/cmd.ts index 4b8068f10..fcf565ba4 100644 --- a/libraries/android-bin/src/cmd.ts +++ b/libraries/android-bin/src/cmd.ts @@ -3,14 +3,14 @@ import type { AdbSubprocessProtocol, AdbSubprocessProtocolConstructor, AdbSubprocessWaitResult, -} from "@yume-chan/adb"; +} from "@gasol/adb"; import { AdbCommandBase, AdbFeature, AdbSubprocessNoneProtocol, AdbSubprocessShellProtocol, -} from "@yume-chan/adb"; -import { ConcatStringStream, TextDecoderStream } from "@yume-chan/stream-extra"; +} from "@gasol/adb"; +import { ConcatStringStream, TextDecoderStream } from "@gasol/stream-extra"; export class Cmd extends AdbCommandBase { #supportsShellV2: boolean; diff --git a/libraries/android-bin/src/demo-mode.ts b/libraries/android-bin/src/demo-mode.ts index ed2e661bf..04fd8f258 100644 --- a/libraries/android-bin/src/demo-mode.ts +++ b/libraries/android-bin/src/demo-mode.ts @@ -4,8 +4,8 @@ // cspell: ignore systemui // cspell: ignore sysui -import type { Adb } from "@yume-chan/adb"; -import { AdbCommandBase } from "@yume-chan/adb"; +import type { Adb } from "@gasol/adb"; +import { AdbCommandBase } from "@gasol/adb"; import { Settings } from "./settings.js"; @@ -122,10 +122,10 @@ export class DemoMode extends AdbCommandBase { command, ...(extra ? Object.entries(extra).flatMap(([key, value]) => [ - "-e", - key, - value, - ]) + "-e", + key, + value, + ]) : []), ]); } diff --git a/libraries/android-bin/src/dumpsys.ts b/libraries/android-bin/src/dumpsys.ts index 71379de1b..aadfe6e9d 100644 --- a/libraries/android-bin/src/dumpsys.ts +++ b/libraries/android-bin/src/dumpsys.ts @@ -1,4 +1,4 @@ -import { AdbCommandBase } from "@yume-chan/adb"; +import { AdbCommandBase } from "@gasol/adb"; const BatteryDumpFields: Record< string, diff --git a/libraries/android-bin/src/logcat.ts b/libraries/android-bin/src/logcat.ts index 51c115bcd..e6c333e2c 100644 --- a/libraries/android-bin/src/logcat.ts +++ b/libraries/android-bin/src/logcat.ts @@ -1,17 +1,17 @@ // cspell: ignore logcat // cspell: ignore usec -import { AdbCommandBase, AdbSubprocessNoneProtocol } from "@yume-chan/adb"; -import type { ReadableStream } from "@yume-chan/stream-extra"; +import { AdbCommandBase, AdbSubprocessNoneProtocol } from "@gasol/adb"; +import type { ReadableStream } from "@gasol/stream-extra"; import { BufferedTransformStream, SplitStringStream, TextDecoderStream, WrapReadableStream, WritableStream, -} from "@yume-chan/stream-extra"; -import type { AsyncExactReadable } from "@yume-chan/struct"; -import Struct, { decodeUtf8 } from "@yume-chan/struct"; +} from "@gasol/stream-extra"; +import type { AsyncExactReadable } from "@gasol/struct"; +import Struct, { decodeUtf8 } from "@gasol/struct"; // `adb logcat` is an alias to `adb shell logcat` // so instead of adding to core library, it's implemented here @@ -44,17 +44,17 @@ export enum AndroidLogPriority { // https://cs.android.com/android/platform/superproject/+/master:system/logging/liblog/logprint.cpp;l=140;drc=8dbf3b2bb6b6d1652d9797e477b9abd03278bb79 export const AndroidLogPriorityToCharacter: Record = - { - [AndroidLogPriority.Unknown]: "?", - [AndroidLogPriority.Default]: "?", - [AndroidLogPriority.Verbose]: "V", - [AndroidLogPriority.Debug]: "D", - [AndroidLogPriority.Info]: "I", - [AndroidLogPriority.Warn]: "W", - [AndroidLogPriority.Error]: "E", - [AndroidLogPriority.Fatal]: "F", - [AndroidLogPriority.Silent]: "S", - }; +{ + [AndroidLogPriority.Unknown]: "?", + [AndroidLogPriority.Default]: "?", + [AndroidLogPriority.Verbose]: "V", + [AndroidLogPriority.Debug]: "D", + [AndroidLogPriority.Info]: "I", + [AndroidLogPriority.Warn]: "W", + [AndroidLogPriority.Error]: "E", + [AndroidLogPriority.Fatal]: "F", + [AndroidLogPriority.Silent]: "S", +}; export enum LogcatFormat { Brief, @@ -175,13 +175,10 @@ function formatTimezone(seconds: number, modifiers: LogcatFormatModifiers) { const minutes = absolute % 60; // prettier-ignore - return ` ${ - sign - }${ - hours.toString().padStart(2, "0") - }:${ - minutes.toString().padStart(2, "0") - }`; + return ` ${sign + }${hours.toString().padStart(2, "0") + }:${minutes.toString().padStart(2, "0") + }`; } function formatTime( @@ -213,73 +210,49 @@ function getFormatPrefix( // TODO: implement other formats case LogcatFormat.Tag: // prettier-ignore - return `${ - AndroidLogPriorityToCharacter[entry.priority] - }/${ - entry.tag.padEnd(8) - }: `; + return `${AndroidLogPriorityToCharacter[entry.priority] + }/${entry.tag.padEnd(8) + }: `; case LogcatFormat.Process: // prettier-ignore - return `${ - AndroidLogPriorityToCharacter[entry.priority] - }(${ - formatUid(entry.uid, modifiers, ":") - }${ - entry.pid.toString().padStart(5) - }) `; + return `${AndroidLogPriorityToCharacter[entry.priority] + }(${formatUid(entry.uid, modifiers, ":") + }${entry.pid.toString().padStart(5) + }) `; case LogcatFormat.Thread: // prettier-ignore - return `${ - AndroidLogPriorityToCharacter[entry.priority] - }(${ - formatUid(entry.uid, modifiers, ":") - }${ - entry.pid.toString().padStart(5) - }:${ - entry.tid.toString().padStart(5) - }) `; + return `${AndroidLogPriorityToCharacter[entry.priority] + }(${formatUid(entry.uid, modifiers, ":") + }${entry.pid.toString().padStart(5) + }:${entry.tid.toString().padStart(5) + }) `; case LogcatFormat.Raw: return ""; case LogcatFormat.Time: // prettier-ignore - return `${ - formatTime(entry.seconds, entry.nanoseconds, modifiers) - } ${ - AndroidLogPriorityToCharacter[entry.priority] - }/${ - entry.tag.padEnd(8) - }(${ - formatUid(entry.uid, modifiers, ":") - }${ - entry.pid.toString().padStart(5) - }): `; + return `${formatTime(entry.seconds, entry.nanoseconds, modifiers) + } ${AndroidLogPriorityToCharacter[entry.priority] + }/${entry.tag.padEnd(8) + }(${formatUid(entry.uid, modifiers, ":") + }${entry.pid.toString().padStart(5) + }): `; case LogcatFormat.ThreadTime: // prettier-ignore - return `${ - formatTime(entry.seconds, entry.nanoseconds, modifiers) - } ${ - formatUid(entry.uid, modifiers, " ") - }${ - entry.pid.toString().padStart(5) - } ${ - entry.tid.toString().padStart(5) - } ${ - AndroidLogPriorityToCharacter[entry.priority] - } ${ - entry.tag.toString().padEnd(8) - }: `; + return `${formatTime(entry.seconds, entry.nanoseconds, modifiers) + } ${formatUid(entry.uid, modifiers, " ") + }${entry.pid.toString().padStart(5) + } ${entry.tid.toString().padStart(5) + } ${AndroidLogPriorityToCharacter[entry.priority] + } ${entry.tag.toString().padEnd(8) + }: `; case LogcatFormat.Brief: default: // prettier-ignore - return `${ - AndroidLogPriorityToCharacter[entry.priority] - }/${ - entry.tag.padEnd(8) - }(${ - formatUid(entry.uid, modifiers, ":") - }${ - entry.pid.toString().padStart(5) - }): `; + return `${AndroidLogPriorityToCharacter[entry.priority] + }/${entry.tag.padEnd(8) + }(${formatUid(entry.uid, modifiers, ":") + }${entry.pid.toString().padStart(5) + }): `; } } @@ -312,21 +285,14 @@ function AndroidLogEntryToString( switch (format) { case LogcatFormat.Long: // prettier-ignore - return `[ ${ - formatTime(this.seconds, this.nanoseconds, modifiers) - } ${ - formatUid(this.uid, modifiers, ":") - }${ - this.pid.toString().padStart(5) - }:${ - this.tid.toString().padStart(5) - } ${ - AndroidLogPriorityToCharacter[this.priority] - }/${ - this.tag.padEnd(8) - } ]\n${ - this.message - }\n`; + return `[ ${formatTime(this.seconds, this.nanoseconds, modifiers) + } ${formatUid(this.uid, modifiers, ":") + }${this.pid.toString().padStart(5) + }:${this.tid.toString().padStart(5) + } ${AndroidLogPriorityToCharacter[this.priority] + }/${this.tag.padEnd(8) + } ]\n${this.message + }\n`; default: return formatEntryWrapLine(this, format, modifiers); } diff --git a/libraries/android-bin/src/overlay-display.ts b/libraries/android-bin/src/overlay-display.ts index ea4efdacd..b4aea5aad 100644 --- a/libraries/android-bin/src/overlay-display.ts +++ b/libraries/android-bin/src/overlay-display.ts @@ -1,5 +1,5 @@ -import type { Adb } from "@yume-chan/adb"; -import { AdbCommandBase } from "@yume-chan/adb"; +import type { Adb } from "@gasol/adb"; +import { AdbCommandBase } from "@gasol/adb"; import { Settings } from "./settings.js"; import { p } from "./string-format.js"; diff --git a/libraries/android-bin/src/pm.ts b/libraries/android-bin/src/pm.ts index 229ddddb9..ef17bc371 100644 --- a/libraries/android-bin/src/pm.ts +++ b/libraries/android-bin/src/pm.ts @@ -3,14 +3,14 @@ // cspell:ignore apks // cspell:ignore versioncode -import type { Adb } from "@yume-chan/adb"; -import { AdbCommandBase, escapeArg } from "@yume-chan/adb"; -import type { MaybeConsumable, ReadableStream } from "@yume-chan/stream-extra"; +import type { Adb } from "@gasol/adb"; +import { AdbCommandBase, escapeArg } from "@gasol/adb"; +import type { MaybeConsumable, ReadableStream } from "@gasol/stream-extra"; import { ConcatStringStream, SplitStringStream, TextDecoderStream, -} from "@yume-chan/stream-extra"; +} from "@gasol/stream-extra"; import { Cmd } from "./cmd.js"; import type { IntentBuilder } from "./intent.js"; diff --git a/libraries/android-bin/src/settings.ts b/libraries/android-bin/src/settings.ts index a93206533..87cd0d72a 100644 --- a/libraries/android-bin/src/settings.ts +++ b/libraries/android-bin/src/settings.ts @@ -1,5 +1,5 @@ -import type { Adb, AdbSubprocessWaitResult } from "@yume-chan/adb"; -import { AdbCommandBase } from "@yume-chan/adb"; +import type { Adb, AdbSubprocessWaitResult } from "@gasol/adb"; +import { AdbCommandBase } from "@gasol/adb"; import { Cmd } from "./cmd.js"; import type { SingleUser } from "./utils.js"; diff --git a/libraries/event/tsconfig.build.json b/libraries/event/tsconfig.build.json index 2cb23249f..c58378935 100644 --- a/libraries/event/tsconfig.build.json +++ b/libraries/event/tsconfig.build.json @@ -1,3 +1,3 @@ { - "extends": "./node_modules/@yume-chan/tsconfig/tsconfig.base.json" + "extends": "./node_modules/@gasol/tsconfig/tsconfig.base.json" } diff --git a/libraries/no-data-view/tsconfig.build.json b/libraries/no-data-view/tsconfig.build.json index 2cb23249f..c58378935 100644 --- a/libraries/no-data-view/tsconfig.build.json +++ b/libraries/no-data-view/tsconfig.build.json @@ -1,3 +1,3 @@ { - "extends": "./node_modules/@yume-chan/tsconfig/tsconfig.base.json" + "extends": "./node_modules/@gasol/tsconfig/tsconfig.base.json" } diff --git a/libraries/pcm-player/tsconfig.dom.json b/libraries/pcm-player/tsconfig.dom.json index 294e4ad79..cc601a405 100644 --- a/libraries/pcm-player/tsconfig.dom.json +++ b/libraries/pcm-player/tsconfig.dom.json @@ -1,5 +1,5 @@ { - "extends": "./node_modules/@yume-chan/tsconfig/tsconfig.base.json", + "extends": "./node_modules/@gasol/tsconfig/tsconfig.base.json", "compilerOptions": { "lib": [ "ESNext", diff --git a/libraries/pcm-player/tsconfig.worker.json b/libraries/pcm-player/tsconfig.worker.json index 17b943ae3..2ca5e401a 100644 --- a/libraries/pcm-player/tsconfig.worker.json +++ b/libraries/pcm-player/tsconfig.worker.json @@ -1,5 +1,5 @@ { - "extends": "./node_modules/@yume-chan/tsconfig/tsconfig.base.json", + "extends": "./node_modules/@gasol/tsconfig/tsconfig.base.json", "compilerOptions": { "lib": [ "ESNext" diff --git a/libraries/scrcpy-decoder-tinyh264/src/decoder.ts b/libraries/scrcpy-decoder-tinyh264/src/decoder.ts index 0e3037ba6..3c156178d 100644 --- a/libraries/scrcpy-decoder-tinyh264/src/decoder.ts +++ b/libraries/scrcpy-decoder-tinyh264/src/decoder.ts @@ -1,12 +1,12 @@ import { PromiseResolver } from "@yume-chan/async"; -import { EventEmitter } from "@yume-chan/event"; -import type { ScrcpyMediaStreamPacket } from "@yume-chan/scrcpy"; +import { EventEmitter } from "@gasol/event"; +import type { ScrcpyMediaStreamPacket } from "@gasol/scrcpy"; import { AndroidAvcLevel, AndroidAvcProfile, h264ParseConfiguration, -} from "@yume-chan/scrcpy"; -import { WritableStream } from "@yume-chan/stream-extra"; +} from "@gasol/scrcpy"; +import { WritableStream } from "@gasol/stream-extra"; import YuvBuffer from "yuv-buffer"; import YuvCanvas from "yuv-canvas"; @@ -54,7 +54,7 @@ export class TinyH264Decoder implements ScrcpyVideoDecoder { return this.#renderer; } - #sizeChanged = new EventEmitter<{ width: number; height: number }>(); + #sizeChanged = new EventEmitter<{ width: number; height: number; }>(); get sizeChanged() { return this.#sizeChanged.event; } diff --git a/libraries/scrcpy-decoder-tinyh264/src/types.ts b/libraries/scrcpy-decoder-tinyh264/src/types.ts index c384dee70..fb4b5fece 100644 --- a/libraries/scrcpy-decoder-tinyh264/src/types.ts +++ b/libraries/scrcpy-decoder-tinyh264/src/types.ts @@ -1,9 +1,9 @@ -import type { Disposable, Event } from "@yume-chan/event"; +import type { Disposable, Event } from "@gasol/event"; import type { ScrcpyMediaStreamPacket, ScrcpyVideoCodecId, -} from "@yume-chan/scrcpy"; -import type { WritableStream } from "@yume-chan/stream-extra"; +} from "@gasol/scrcpy"; +import type { WritableStream } from "@gasol/stream-extra"; export interface ScrcpyVideoDecoderCapability { maxProfile?: number; @@ -11,7 +11,7 @@ export interface ScrcpyVideoDecoderCapability { } export interface ScrcpyVideoDecoder extends Disposable { - readonly sizeChanged: Event<{ width: number; height: number }>; + readonly sizeChanged: Event<{ width: number; height: number; }>; readonly framesRendered: number; readonly framesSkipped: number; readonly writable: WritableStream; @@ -20,5 +20,5 @@ export interface ScrcpyVideoDecoder extends Disposable { export interface ScrcpyVideoDecoderConstructor { readonly capabilities: Record; - new (codec: ScrcpyVideoCodecId): ScrcpyVideoDecoder; + new(codec: ScrcpyVideoCodecId): ScrcpyVideoDecoder; } diff --git a/libraries/scrcpy-decoder-tinyh264/src/wrapper.ts b/libraries/scrcpy-decoder-tinyh264/src/wrapper.ts index e5ef78ea4..4f96006d8 100644 --- a/libraries/scrcpy-decoder-tinyh264/src/wrapper.ts +++ b/libraries/scrcpy-decoder-tinyh264/src/wrapper.ts @@ -1,6 +1,6 @@ import { PromiseResolver } from "@yume-chan/async"; -import type { Disposable } from "@yume-chan/event"; -import { AutoDisposable, EventEmitter } from "@yume-chan/event"; +import type { Disposable } from "@gasol/event"; +import { AutoDisposable, EventEmitter } from "@gasol/event"; let worker: Worker | undefined; let workerReady = false; @@ -88,7 +88,7 @@ interface TinyH264DecoderReadyMessage extends TinyH264MessageBase { interface TinyH264PictureReadyMessage extends TinyH264MessageBase, - PictureReadyEventArgs { + PictureReadyEventArgs { type: "pictureReady"; } diff --git a/libraries/scrcpy-decoder-tinyh264/tsconfig.build.json b/libraries/scrcpy-decoder-tinyh264/tsconfig.build.json index ff4d5014f..2edde1128 100644 --- a/libraries/scrcpy-decoder-tinyh264/tsconfig.build.json +++ b/libraries/scrcpy-decoder-tinyh264/tsconfig.build.json @@ -1,5 +1,5 @@ { - "extends": "./node_modules/@yume-chan/tsconfig/tsconfig.base.json", + "extends": "./node_modules/@gasol/tsconfig/tsconfig.base.json", "compilerOptions": { "lib": [ "ESNext", diff --git a/libraries/scrcpy-decoder-webcodecs/src/video/codec/av1.ts b/libraries/scrcpy-decoder-webcodecs/src/video/codec/av1.ts index e1b269d4f..b99730575 100644 --- a/libraries/scrcpy-decoder-webcodecs/src/video/codec/av1.ts +++ b/libraries/scrcpy-decoder-webcodecs/src/video/codec/av1.ts @@ -1,5 +1,5 @@ -import type { ScrcpyMediaStreamPacket } from "@yume-chan/scrcpy"; -import { Av1 } from "@yume-chan/scrcpy"; +import type { ScrcpyMediaStreamPacket } from "@gasol/scrcpy"; +import { Av1 } from "@gasol/scrcpy"; import type { CodecDecoder } from "./type.js"; import { decimalTwoDigits } from "./utils.js"; @@ -66,12 +66,12 @@ export class Av1Codec implements CodecDecoder { "av01", seqProfile.toString(16), decimalTwoDigits(seqLevelIdx) + - (sequenceHeader.seq_tier[0] ? "H" : "M"), + (sequenceHeader.seq_tier[0] ? "H" : "M"), decimalTwoDigits(BitDepth), monoChrome ? "1" : "0", (subsamplingX ? "1" : "0") + - (subsamplingY ? "1" : "0") + - chromaSamplePosition.toString(), + (subsamplingY ? "1" : "0") + + chromaSamplePosition.toString(), decimalTwoDigits(colorPrimaries), decimalTwoDigits(transferCharacteristics), decimalTwoDigits(matrixCoefficients), diff --git a/libraries/scrcpy-decoder-webcodecs/src/video/codec/h264.ts b/libraries/scrcpy-decoder-webcodecs/src/video/codec/h264.ts index c03ed06dd..d852a82b6 100644 --- a/libraries/scrcpy-decoder-webcodecs/src/video/codec/h264.ts +++ b/libraries/scrcpy-decoder-webcodecs/src/video/codec/h264.ts @@ -1,4 +1,4 @@ -import { h264ParseConfiguration } from "@yume-chan/scrcpy"; +import { h264ParseConfiguration } from "@gasol/scrcpy"; import { H26xDecoder } from "./h26x.js"; import { hexTwoDigits } from "./utils.js"; diff --git a/libraries/scrcpy-decoder-webcodecs/src/video/codec/h265.ts b/libraries/scrcpy-decoder-webcodecs/src/video/codec/h265.ts index abb7502ac..15e1b3408 100644 --- a/libraries/scrcpy-decoder-webcodecs/src/video/codec/h265.ts +++ b/libraries/scrcpy-decoder-webcodecs/src/video/codec/h265.ts @@ -1,5 +1,5 @@ -import { getUint32LittleEndian } from "@yume-chan/no-data-view"; -import { h265ParseConfiguration } from "@yume-chan/scrcpy"; +import { getUint32LittleEndian } from "@gasol/no-data-view"; +import { h265ParseConfiguration } from "@gasol/scrcpy"; import { H26xDecoder } from "./h26x.js"; import { hexDigits } from "./utils.js"; @@ -34,7 +34,7 @@ export class H265Decoder extends H26xDecoder { const codec = [ "hev1", ["", "A", "B", "C"][generalProfileSpace]! + - generalProfileIndex.toString(), + generalProfileIndex.toString(), hexDigits(getUint32LittleEndian(generalProfileCompatibilitySet, 0)), (generalTierFlag ? "H" : "L") + generalLevelIndex.toString(), ...Array.from(generalConstraintSet, hexDigits), diff --git a/libraries/scrcpy-decoder-webcodecs/src/video/codec/h26x.ts b/libraries/scrcpy-decoder-webcodecs/src/video/codec/h26x.ts index ee79e2e94..10dd1bf20 100644 --- a/libraries/scrcpy-decoder-webcodecs/src/video/codec/h26x.ts +++ b/libraries/scrcpy-decoder-webcodecs/src/video/codec/h26x.ts @@ -1,4 +1,4 @@ -import type { ScrcpyMediaStreamPacket } from "@yume-chan/scrcpy"; +import type { ScrcpyMediaStreamPacket } from "@gasol/scrcpy"; import type { CodecDecoder } from "./type.js"; diff --git a/libraries/scrcpy-decoder-webcodecs/src/video/codec/type.ts b/libraries/scrcpy-decoder-webcodecs/src/video/codec/type.ts index 1ed859b7b..46170c87a 100644 --- a/libraries/scrcpy-decoder-webcodecs/src/video/codec/type.ts +++ b/libraries/scrcpy-decoder-webcodecs/src/video/codec/type.ts @@ -1,11 +1,11 @@ -import type { ScrcpyMediaStreamPacket } from "@yume-chan/scrcpy"; +import type { ScrcpyMediaStreamPacket } from "@gasol/scrcpy"; export interface CodecDecoder { decode(packet: ScrcpyMediaStreamPacket): void; } export interface CodecDecoderConstructor { - new ( + new( decoder: VideoDecoder, updateSize: (width: number, height: number) => void, ): CodecDecoder; diff --git a/libraries/scrcpy-decoder-webcodecs/src/video/decoder.ts b/libraries/scrcpy-decoder-webcodecs/src/video/decoder.ts index 112e0f3b1..5003cdf4b 100644 --- a/libraries/scrcpy-decoder-webcodecs/src/video/decoder.ts +++ b/libraries/scrcpy-decoder-webcodecs/src/video/decoder.ts @@ -1,12 +1,12 @@ -import { EventEmitter } from "@yume-chan/event"; -import type { ScrcpyMediaStreamPacket } from "@yume-chan/scrcpy"; -import { ScrcpyVideoCodecId } from "@yume-chan/scrcpy"; +import { EventEmitter } from "@gasol/event"; +import type { ScrcpyMediaStreamPacket } from "@gasol/scrcpy"; +import { ScrcpyVideoCodecId } from "@gasol/scrcpy"; import type { ScrcpyVideoDecoder, ScrcpyVideoDecoderCapability, -} from "@yume-chan/scrcpy-decoder-tinyh264"; -import type { WritableStreamDefaultController } from "@yume-chan/stream-extra"; -import { WritableStream } from "@yume-chan/stream-extra"; +} from "@gasol/scrcpy-decoder-tinyh264"; +import type { WritableStreamDefaultController } from "@gasol/stream-extra"; +import { WritableStream } from "@gasol/stream-extra"; import { Av1Codec, H264Decoder, H265Decoder } from "./codec/index.js"; import type { CodecDecoder } from "./codec/type.js"; @@ -149,7 +149,7 @@ export class WebCodecsVideoDecoder implements ScrcpyVideoDecoder { return this.#framesSkipped; } - #sizeChanged = new EventEmitter<{ width: number; height: number }>(); + #sizeChanged = new EventEmitter<{ width: number; height: number; }>(); get sizeChanged() { return this.#sizeChanged.event; } diff --git a/libraries/scrcpy-decoder-webcodecs/src/video/render/canvas.ts b/libraries/scrcpy-decoder-webcodecs/src/video/render/canvas.ts index 8fda1698b..4c12bb8ea 100644 --- a/libraries/scrcpy-decoder-webcodecs/src/video/render/canvas.ts +++ b/libraries/scrcpy-decoder-webcodecs/src/video/render/canvas.ts @@ -1,10 +1,9 @@ -import { createCanvas } from "@yume-chan/scrcpy-decoder-tinyh264"; +import { createCanvas } from "@gasol/scrcpy-decoder-tinyh264"; import type { WebCodecsVideoDecoderRenderer } from "./type.js"; export abstract class CanvasWebCodecsVideoDecoderRenderer - implements WebCodecsVideoDecoderRenderer -{ + implements WebCodecsVideoDecoderRenderer { #canvas: HTMLCanvasElement | OffscreenCanvas; get canvas() { return this.#canvas; diff --git a/libraries/scrcpy-decoder-webcodecs/src/video/render/webgl.ts b/libraries/scrcpy-decoder-webcodecs/src/video/render/webgl.ts index 16b99a1ef..a672d3c6d 100644 --- a/libraries/scrcpy-decoder-webcodecs/src/video/render/webgl.ts +++ b/libraries/scrcpy-decoder-webcodecs/src/video/render/webgl.ts @@ -1,4 +1,4 @@ -import { createCanvas } from "@yume-chan/scrcpy-decoder-tinyh264"; +import { createCanvas } from "@gasol/scrcpy-decoder-tinyh264"; import { CanvasWebCodecsVideoDecoderRenderer } from "./canvas.js"; diff --git a/libraries/scrcpy-decoder-webcodecs/tsconfig.build.json b/libraries/scrcpy-decoder-webcodecs/tsconfig.build.json index 4bb2510ff..fd8027469 100644 --- a/libraries/scrcpy-decoder-webcodecs/tsconfig.build.json +++ b/libraries/scrcpy-decoder-webcodecs/tsconfig.build.json @@ -1,5 +1,5 @@ { - "extends": "./node_modules/@yume-chan/tsconfig/tsconfig.base.json", + "extends": "./node_modules/@gasol/tsconfig/tsconfig.base.json", "compilerOptions": { "lib": [ "ESNext", diff --git a/libraries/scrcpy/src/control/empty.ts b/libraries/scrcpy/src/control/empty.ts index a860e1219..803206fc2 100644 --- a/libraries/scrcpy/src/control/empty.ts +++ b/libraries/scrcpy/src/control/empty.ts @@ -1,3 +1,3 @@ -import { Struct } from "@yume-chan/struct"; +import { Struct } from "@gasol/struct"; export const EmptyControlMessage = new Struct().uint8("type"); diff --git a/libraries/scrcpy/src/control/inject-keycode.ts b/libraries/scrcpy/src/control/inject-keycode.ts index 9a3712a29..e5f11018a 100644 --- a/libraries/scrcpy/src/control/inject-keycode.ts +++ b/libraries/scrcpy/src/control/inject-keycode.ts @@ -1,4 +1,4 @@ -import Struct, { placeholder } from "@yume-chan/struct"; +import Struct, { placeholder } from "@gasol/struct"; export enum AndroidKeyEventAction { Down = 0, diff --git a/libraries/scrcpy/src/control/inject-text.ts b/libraries/scrcpy/src/control/inject-text.ts index adab62a02..b54e2942b 100644 --- a/libraries/scrcpy/src/control/inject-text.ts +++ b/libraries/scrcpy/src/control/inject-text.ts @@ -1,4 +1,4 @@ -import Struct from "@yume-chan/struct"; +import Struct from "@gasol/struct"; export const ScrcpyInjectTextControlMessage = new Struct() .uint8("type") diff --git a/libraries/scrcpy/src/control/set-screen-power-mode.ts b/libraries/scrcpy/src/control/set-screen-power-mode.ts index 6d45e2520..06dd81c40 100644 --- a/libraries/scrcpy/src/control/set-screen-power-mode.ts +++ b/libraries/scrcpy/src/control/set-screen-power-mode.ts @@ -1,4 +1,4 @@ -import Struct, { placeholder } from "@yume-chan/struct"; +import Struct, { placeholder } from "@gasol/struct"; // https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/android/view/SurfaceControl.java;l=659;drc=20303e05bf73796124ab70a279cf849b61b97905 export enum AndroidScreenPowerMode { diff --git a/libraries/scrcpy/src/control/writer.ts b/libraries/scrcpy/src/control/writer.ts index eed2c4a47..9fa299f82 100644 --- a/libraries/scrcpy/src/control/writer.ts +++ b/libraries/scrcpy/src/control/writer.ts @@ -1,5 +1,5 @@ -import type { WritableStreamDefaultWriter } from "@yume-chan/stream-extra"; -import { Consumable } from "@yume-chan/stream-extra"; +import type { WritableStreamDefaultWriter } from "@gasol/stream-extra"; +import { Consumable } from "@gasol/stream-extra"; import type { ScrcpyOptions } from "../options/index.js"; diff --git a/libraries/scrcpy/src/options/1_16/float.ts b/libraries/scrcpy/src/options/1_16/float.ts index c8acd737a..2ed7bb006 100644 --- a/libraries/scrcpy/src/options/1_16/float.ts +++ b/libraries/scrcpy/src/options/1_16/float.ts @@ -1,6 +1,6 @@ -import { getUint16, setUint16 } from "@yume-chan/no-data-view"; -import type { NumberFieldVariant } from "@yume-chan/struct"; -import { NumberFieldDefinition } from "@yume-chan/struct"; +import { getUint16, setUint16 } from "@gasol/no-data-view"; +import type { NumberFieldVariant } from "@gasol/struct"; +import { NumberFieldDefinition } from "@gasol/struct"; export function clamp(value: number, min: number, max: number): number { if (value < min) { diff --git a/libraries/scrcpy/src/options/1_16/message.ts b/libraries/scrcpy/src/options/1_16/message.ts index 1125501b0..6f45e7e27 100644 --- a/libraries/scrcpy/src/options/1_16/message.ts +++ b/libraries/scrcpy/src/options/1_16/message.ts @@ -1,4 +1,4 @@ -import Struct, { placeholder } from "@yume-chan/struct"; +import Struct, { placeholder } from "@gasol/struct"; import type { AndroidMotionEventAction } from "../../control/index.js"; import { diff --git a/libraries/scrcpy/src/options/1_16/options.ts b/libraries/scrcpy/src/options/1_16/options.ts index c3866a60c..d1708264c 100644 --- a/libraries/scrcpy/src/options/1_16/options.ts +++ b/libraries/scrcpy/src/options/1_16/options.ts @@ -1,19 +1,19 @@ import { getUint16BigEndian, getUint32BigEndian, -} from "@yume-chan/no-data-view"; +} from "@gasol/no-data-view"; import type { PushReadableStreamController, ReadableStream, -} from "@yume-chan/stream-extra"; +} from "@gasol/stream-extra"; import { BufferedReadableStream, PushReadableStream, StructDeserializeStream, TransformStream, -} from "@yume-chan/stream-extra"; -import type { AsyncExactReadable, ValueOrPromise } from "@yume-chan/struct"; -import { decodeUtf8 } from "@yume-chan/struct"; +} from "@gasol/stream-extra"; +import type { AsyncExactReadable, ValueOrPromise } from "@gasol/struct"; +import { decodeUtf8 } from "@gasol/struct"; import type { ScrcpyBackOrScreenOnControlMessage, diff --git a/libraries/scrcpy/src/options/1_16/scroll.ts b/libraries/scrcpy/src/options/1_16/scroll.ts index a3e85ac87..7d23260dd 100644 --- a/libraries/scrcpy/src/options/1_16/scroll.ts +++ b/libraries/scrcpy/src/options/1_16/scroll.ts @@ -1,4 +1,4 @@ -import Struct from "@yume-chan/struct"; +import Struct from "@gasol/struct"; import type { ScrcpyInjectScrollControlMessage } from "../../control/index.js"; diff --git a/libraries/scrcpy/src/options/1_18.ts b/libraries/scrcpy/src/options/1_18.ts index b6d6f9f49..65204f937 100644 --- a/libraries/scrcpy/src/options/1_18.ts +++ b/libraries/scrcpy/src/options/1_18.ts @@ -1,4 +1,4 @@ -import Struct, { placeholder } from "@yume-chan/struct"; +import Struct, { placeholder } from "@gasol/struct"; import type { AndroidKeyEventAction, diff --git a/libraries/scrcpy/src/options/1_21.ts b/libraries/scrcpy/src/options/1_21.ts index 03b0d74c5..d072a2a47 100644 --- a/libraries/scrcpy/src/options/1_21.ts +++ b/libraries/scrcpy/src/options/1_21.ts @@ -1,8 +1,8 @@ // cspell: ignore autosync import { PromiseResolver } from "@yume-chan/async"; -import type { AsyncExactReadable } from "@yume-chan/struct"; -import Struct, { placeholder } from "@yume-chan/struct"; +import type { AsyncExactReadable } from "@gasol/struct"; +import Struct, { placeholder } from "@gasol/struct"; import type { ScrcpySetClipboardControlMessage } from "../control/index.js"; diff --git a/libraries/scrcpy/src/options/1_22/options.ts b/libraries/scrcpy/src/options/1_22/options.ts index 12a4c71a8..20b96ae03 100644 --- a/libraries/scrcpy/src/options/1_22/options.ts +++ b/libraries/scrcpy/src/options/1_22/options.ts @@ -1,5 +1,5 @@ -import type { ReadableStream } from "@yume-chan/stream-extra"; -import type { ValueOrPromise } from "@yume-chan/struct"; +import type { ReadableStream } from "@gasol/stream-extra"; +import type { ValueOrPromise } from "@gasol/struct"; import type { ScrcpyScrollController } from "../1_16/index.js"; import { ScrcpyOptions1_21 } from "../1_21.js"; diff --git a/libraries/scrcpy/src/options/1_22/scroll.ts b/libraries/scrcpy/src/options/1_22/scroll.ts index b75e766d0..b7e07d47d 100644 --- a/libraries/scrcpy/src/options/1_22/scroll.ts +++ b/libraries/scrcpy/src/options/1_22/scroll.ts @@ -1,4 +1,4 @@ -import Struct from "@yume-chan/struct"; +import Struct from "@gasol/struct"; import { ScrcpyInjectScrollControlMessage1_16, diff --git a/libraries/scrcpy/src/options/1_23.ts b/libraries/scrcpy/src/options/1_23.ts index b5240bd4c..28c7ca93a 100644 --- a/libraries/scrcpy/src/options/1_23.ts +++ b/libraries/scrcpy/src/options/1_23.ts @@ -1,4 +1,4 @@ -import { TransformStream } from "@yume-chan/stream-extra"; +import { TransformStream } from "@gasol/stream-extra"; import { ScrcpyOptions1_21 } from "./1_21.js"; import type { ScrcpyOptionsInit1_22 } from "./1_22/index.js"; diff --git a/libraries/scrcpy/src/options/1_25/scroll.ts b/libraries/scrcpy/src/options/1_25/scroll.ts index d0fb19faa..a1590a1c0 100644 --- a/libraries/scrcpy/src/options/1_25/scroll.ts +++ b/libraries/scrcpy/src/options/1_25/scroll.ts @@ -1,6 +1,6 @@ -import { getInt16, setInt16 } from "@yume-chan/no-data-view"; -import type { NumberFieldVariant } from "@yume-chan/struct"; -import Struct, { NumberFieldDefinition } from "@yume-chan/struct"; +import { getInt16, setInt16 } from "@gasol/no-data-view"; +import type { NumberFieldVariant } from "@gasol/struct"; +import Struct, { NumberFieldDefinition } from "@gasol/struct"; import type { ScrcpyInjectScrollControlMessage } from "../../control/index.js"; import { ScrcpyControlMessageType } from "../../control/index.js"; diff --git a/libraries/scrcpy/src/options/2_0.ts b/libraries/scrcpy/src/options/2_0.ts index 07d4bb4b6..0cf4219a7 100644 --- a/libraries/scrcpy/src/options/2_0.ts +++ b/libraries/scrcpy/src/options/2_0.ts @@ -1,11 +1,11 @@ -import { getUint32BigEndian } from "@yume-chan/no-data-view"; -import type { ReadableStream } from "@yume-chan/stream-extra"; +import { getUint32BigEndian } from "@gasol/no-data-view"; +import type { ReadableStream } from "@gasol/stream-extra"; import { BufferedReadableStream, PushReadableStream, -} from "@yume-chan/stream-extra"; -import type { ValueOrPromise } from "@yume-chan/struct"; -import Struct, { placeholder } from "@yume-chan/struct"; +} from "@gasol/stream-extra"; +import type { ValueOrPromise } from "@gasol/struct"; +import Struct, { placeholder } from "@gasol/struct"; import type { AndroidMotionEventAction, diff --git a/libraries/scrcpy/src/options/2_3.ts b/libraries/scrcpy/src/options/2_3.ts index be21e5c72..35341ab84 100644 --- a/libraries/scrcpy/src/options/2_3.ts +++ b/libraries/scrcpy/src/options/2_3.ts @@ -1,5 +1,5 @@ -import type { ReadableStream } from "@yume-chan/stream-extra"; -import type { ValueOrPromise } from "@yume-chan/struct"; +import type { ReadableStream } from "@gasol/stream-extra"; +import type { ValueOrPromise } from "@gasol/struct"; import { ScrcpyOptions1_21 } from "./1_21.js"; import { ScrcpyOptions2_0 } from "./2_0.js"; diff --git a/libraries/scrcpy/src/options/codec.ts b/libraries/scrcpy/src/options/codec.ts index 02d07d561..f029fae0b 100644 --- a/libraries/scrcpy/src/options/codec.ts +++ b/libraries/scrcpy/src/options/codec.ts @@ -1,4 +1,4 @@ -import type { ReadableStream } from "@yume-chan/stream-extra"; +import type { ReadableStream } from "@gasol/stream-extra"; import type { ScrcpyOptionValue } from "./types.js"; diff --git a/libraries/scrcpy/src/options/types.ts b/libraries/scrcpy/src/options/types.ts index 73bd271ab..bf2d542b9 100644 --- a/libraries/scrcpy/src/options/types.ts +++ b/libraries/scrcpy/src/options/types.ts @@ -1,5 +1,5 @@ -import type { ReadableStream, TransformStream } from "@yume-chan/stream-extra"; -import type { AsyncExactReadable, ValueOrPromise } from "@yume-chan/struct"; +import type { ReadableStream, TransformStream } from "@gasol/stream-extra"; +import type { AsyncExactReadable, ValueOrPromise } from "@gasol/struct"; import type { ScrcpyBackOrScreenOnControlMessage, diff --git a/libraries/scrcpy/tsconfig.build.json b/libraries/scrcpy/tsconfig.build.json index 468186f0c..c4b618805 100644 --- a/libraries/scrcpy/tsconfig.build.json +++ b/libraries/scrcpy/tsconfig.build.json @@ -1,5 +1,5 @@ { - "extends": "./node_modules/@yume-chan/tsconfig/tsconfig.base.json", + "extends": "./node_modules/@gasol/tsconfig/tsconfig.base.json", "references": [ { "path": "../stream-extra/tsconfig.build.json" diff --git a/libraries/stream-extra/src/buffered-transform.ts b/libraries/stream-extra/src/buffered-transform.ts index 27b597072..32775ad03 100644 --- a/libraries/stream-extra/src/buffered-transform.ts +++ b/libraries/stream-extra/src/buffered-transform.ts @@ -1,5 +1,5 @@ -import type { ValueOrPromise } from "@yume-chan/struct"; -import { StructEmptyError } from "@yume-chan/struct"; +import type { ValueOrPromise } from "@gasol/struct"; +import { StructEmptyError } from "@gasol/struct"; import { BufferedReadableStream } from "./buffered.js"; import type { PushReadableStreamController } from "./push-readable.js"; @@ -9,8 +9,7 @@ import { ReadableStream, WritableStream } from "./stream.js"; // TODO: BufferedTransformStream: find better implementation export class BufferedTransformStream - implements ReadableWritablePair -{ + implements ReadableWritablePair { #readable: ReadableStream; get readable() { return this.#readable; diff --git a/libraries/stream-extra/src/buffered.ts b/libraries/stream-extra/src/buffered.ts index f1b4baa1b..7711fb4f7 100644 --- a/libraries/stream-extra/src/buffered.ts +++ b/libraries/stream-extra/src/buffered.ts @@ -1,5 +1,5 @@ -import type { AsyncExactReadable } from "@yume-chan/struct"; -import { ExactReadableEndedError } from "@yume-chan/struct"; +import type { AsyncExactReadable } from "@gasol/struct"; +import { ExactReadableEndedError } from "@gasol/struct"; import { PushReadableStream } from "./push-readable.js"; import type { ReadableStream, ReadableStreamDefaultReader } from "./stream.js"; diff --git a/libraries/stream-extra/src/concat.ts b/libraries/stream-extra/src/concat.ts index b605071a7..33dbb411e 100644 --- a/libraries/stream-extra/src/concat.ts +++ b/libraries/stream-extra/src/concat.ts @@ -1,12 +1,12 @@ import { PromiseResolver } from "@yume-chan/async"; -import { EMPTY_UINT8_ARRAY } from "@yume-chan/struct"; +import { EMPTY_UINT8_ARRAY } from "@gasol/struct"; import type { ReadableStreamDefaultController } from "./stream.js"; import { ReadableStream, WritableStream } from "./stream.js"; export interface ConcatStringReadableStream extends ReadableStream, - Promise {} + Promise { } // `TransformStream` only calls its `source.flush` method when its `readable` is being read. // If the user want to use the `Promise` interface, the `flush` method will never be called, @@ -76,7 +76,7 @@ export class ConcatStringStream { export interface ConcatBufferReadableStream extends ReadableStream, - Promise {} + Promise { } /** * A `TransformStream` that concatenates `Uint8Array`s. diff --git a/libraries/stream-extra/src/duplex.ts b/libraries/stream-extra/src/duplex.ts index 1139822a3..b60dae5ec 100644 --- a/libraries/stream-extra/src/duplex.ts +++ b/libraries/stream-extra/src/duplex.ts @@ -1,5 +1,5 @@ import { PromiseResolver } from "@yume-chan/async"; -import type { ValueOrPromise } from "@yume-chan/struct"; +import type { ValueOrPromise } from "@gasol/struct"; import type { QueuingStrategy, diff --git a/libraries/stream-extra/src/struct-deserialize.ts b/libraries/stream-extra/src/struct-deserialize.ts index 2297216f0..e55f54d76 100644 --- a/libraries/stream-extra/src/struct-deserialize.ts +++ b/libraries/stream-extra/src/struct-deserialize.ts @@ -1,5 +1,5 @@ -import type Struct from "@yume-chan/struct"; -import type { StructValueType } from "@yume-chan/struct"; +import type Struct from "@gasol/struct"; +import type { StructValueType } from "@gasol/struct"; import { BufferedTransformStream } from "./buffered-transform.js"; diff --git a/libraries/stream-extra/src/struct-serialize.ts b/libraries/stream-extra/src/struct-serialize.ts index 24023a3b8..68b852a7a 100644 --- a/libraries/stream-extra/src/struct-serialize.ts +++ b/libraries/stream-extra/src/struct-serialize.ts @@ -1,4 +1,4 @@ -import type Struct from "@yume-chan/struct"; +import type Struct from "@gasol/struct"; import { TransformStream } from "./stream.js"; diff --git a/libraries/stream-extra/src/wrap-readable.ts b/libraries/stream-extra/src/wrap-readable.ts index 3efcf26d1..c2a6ba041 100644 --- a/libraries/stream-extra/src/wrap-readable.ts +++ b/libraries/stream-extra/src/wrap-readable.ts @@ -1,4 +1,4 @@ -import type { ValueOrPromise } from "@yume-chan/struct"; +import type { ValueOrPromise } from "@gasol/struct"; import type { QueuingStrategy, diff --git a/libraries/stream-extra/src/wrap-writable.ts b/libraries/stream-extra/src/wrap-writable.ts index d53cf2853..13735fb92 100644 --- a/libraries/stream-extra/src/wrap-writable.ts +++ b/libraries/stream-extra/src/wrap-writable.ts @@ -1,4 +1,4 @@ -import type { ValueOrPromise } from "@yume-chan/struct"; +import type { ValueOrPromise } from "@gasol/struct"; import type { TransformStream, WritableStreamDefaultWriter } from "./stream.js"; import { WritableStream } from "./stream.js"; diff --git a/libraries/stream-extra/tsconfig.build.json b/libraries/stream-extra/tsconfig.build.json index 82cfa2cb3..4fc80d6fb 100644 --- a/libraries/stream-extra/tsconfig.build.json +++ b/libraries/stream-extra/tsconfig.build.json @@ -1,5 +1,5 @@ { - "extends": "./node_modules/@yume-chan/tsconfig/tsconfig.base.json", + "extends": "./node_modules/@gasol/tsconfig/tsconfig.base.json", "references": [ { "path": "../struct/tsconfig.build.json" diff --git a/libraries/struct/src/types/bigint.ts b/libraries/struct/src/types/bigint.ts index feec81d75..b531592a6 100644 --- a/libraries/struct/src/types/bigint.ts +++ b/libraries/struct/src/types/bigint.ts @@ -3,7 +3,7 @@ import { getUint64, setInt64, setUint64, -} from "@yume-chan/no-data-view"; +} from "@gasol/no-data-view"; import type { AsyncExactReadable, diff --git a/libraries/struct/src/types/number.ts b/libraries/struct/src/types/number.ts index e1a903f75..756f093eb 100644 --- a/libraries/struct/src/types/number.ts +++ b/libraries/struct/src/types/number.ts @@ -8,7 +8,7 @@ import { setInt32, setUint16, setUint32, -} from "@yume-chan/no-data-view"; +} from "@gasol/no-data-view"; import type { AsyncExactReadable, diff --git a/libraries/struct/tsconfig.build.json b/libraries/struct/tsconfig.build.json index 72df0da27..12230e14e 100644 --- a/libraries/struct/tsconfig.build.json +++ b/libraries/struct/tsconfig.build.json @@ -1,5 +1,5 @@ { - "extends": "./node_modules/@yume-chan/tsconfig/tsconfig.base.json", + "extends": "./node_modules/@gasol/tsconfig/tsconfig.base.json", "references": [ { "path": "../no-data-view/tsconfig.build.json"