mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-03 17:59:50 +02:00
refactor: extract common types to @yume-chan/async
package
This commit is contained in:
parent
6cb0a589fa
commit
db8466f6ee
58 changed files with 337 additions and 267 deletions
5
.changeset/brown-badgers-stare.md
Normal file
5
.changeset/brown-badgers-stare.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@yume-chan/scrcpy-decoder-tinyh264": patch
|
||||
---
|
||||
|
||||
Add support for rendering into `OffscreenCanvas`
|
8
.changeset/eighty-spies-run.md
Normal file
8
.changeset/eighty-spies-run.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
"@yume-chan/adb": patch
|
||||
"@yume-chan/adb-scrcpy": patch
|
||||
"@yume-chan/scrcpy": patch
|
||||
"@yume-chan/struct": patch
|
||||
---
|
||||
|
||||
Rewrite the struct API completely
|
5
.changeset/fifty-knives-hunt.md
Normal file
5
.changeset/fifty-knives-hunt.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@yume-chan/adb-daemon-webusb": patch
|
||||
---
|
||||
|
||||
Accept standard `USBDeviceFilter` type and fill in default interface filters automatically
|
6
.changeset/fifty-points-protect.md
Normal file
6
.changeset/fifty-points-protect.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
"@yume-chan/adb": patch
|
||||
"@yume-chan/adb-credential-web": patch
|
||||
---
|
||||
|
||||
Add common interface for device observers
|
5
.changeset/four-pets-shave.md
Normal file
5
.changeset/four-pets-shave.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@yume-chan/scrcpy-decoder-webcodecs": patch
|
||||
---
|
||||
|
||||
Fix H.265 rendering in Microsoft Edge
|
5
.changeset/gold-dancers-turn.md
Normal file
5
.changeset/gold-dancers-turn.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@yume-chan/adb-daemon-webusb": patch
|
||||
---
|
||||
|
||||
Throw `DeviceBusyError` when interface can't be claimed
|
7
.changeset/slow-dodos-train.md
Normal file
7
.changeset/slow-dodos-train.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
"@yume-chan/adb": patch
|
||||
"@yume-chan/scrcpy": patch
|
||||
"@yume-chan/struct": patch
|
||||
---
|
||||
|
||||
Improve tree-shaking by removing TypeScript enum and namespace
|
5
.changeset/twelve-rivers-remain.md
Normal file
5
.changeset/twelve-rivers-remain.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@yume-chan/scrcpy-decoder-webcodecs": patch
|
||||
---
|
||||
|
||||
Add a `snapshot` method to convert the last rendered frame into PNG
|
5
.changeset/wicked-llamas-lick.md
Normal file
5
.changeset/wicked-llamas-lick.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@yume-chan/adb-scrcpy": patch
|
||||
---
|
||||
|
||||
Fix automatically switching to forward tunnel when reverse tunnel is not supported
|
|
@ -41,7 +41,7 @@
|
|||
"source-map-support": "^0.5.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/node": "^22.9.1",
|
||||
"@yume-chan/eslint-config": "workspace:^",
|
||||
"@yume-chan/tsconfig": "workspace:^",
|
||||
"prettier": "^3.3.3",
|
||||
|
|
|
@ -5,10 +5,5 @@
|
|||
"ESNext",
|
||||
"DOM"
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../adb/tsconfig.build.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.test.json"
|
||||
},
|
||||
{
|
||||
"path": "../adb/tsconfig.build.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
"@yume-chan/struct": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/node": "^22.9.1",
|
||||
"@yume-chan/eslint-config": "workspace:^",
|
||||
"@yume-chan/test-runner": "workspace:^",
|
||||
"@yume-chan/tsconfig": "workspace:^",
|
||||
|
|
|
@ -17,17 +17,17 @@ export class AdbDaemonWebUsbDeviceObserver
|
|||
#filters: UsbInterfaceFilter[];
|
||||
#usbManager: USB;
|
||||
|
||||
#deviceAdded = new EventEmitter<AdbDaemonWebUsbDevice[]>();
|
||||
deviceAdded = this.#deviceAdded.event;
|
||||
#onError = new EventEmitter<Error>();
|
||||
onError = this.#onError.event;
|
||||
|
||||
#deviceRemoved = new EventEmitter<AdbDaemonWebUsbDevice[]>();
|
||||
deviceRemoved = this.#deviceRemoved.event;
|
||||
#onDeviceAdd = new EventEmitter<AdbDaemonWebUsbDevice[]>();
|
||||
onDeviceAdd = this.#onDeviceAdd.event;
|
||||
|
||||
#deviceChanged = new EventEmitter<AdbDaemonWebUsbDevice[]>();
|
||||
deviceChanged = this.#deviceChanged.event;
|
||||
#onDeviceRemove = new EventEmitter<AdbDaemonWebUsbDevice[]>();
|
||||
onDeviceRemove = this.#onDeviceRemove.event;
|
||||
|
||||
#listChanged = new EventEmitter<AdbDaemonWebUsbDevice[]>();
|
||||
listChanged = this.#listChanged.event;
|
||||
#onListChange = new EventEmitter<AdbDaemonWebUsbDevice[]>();
|
||||
onListChange = this.#onListChange.event;
|
||||
|
||||
current: AdbDaemonWebUsbDevice[] = [];
|
||||
|
||||
|
@ -49,9 +49,9 @@ export class AdbDaemonWebUsbDeviceObserver
|
|||
this.#filters,
|
||||
this.#usbManager,
|
||||
);
|
||||
this.#deviceAdded.fire([device]);
|
||||
this.#onDeviceAdd.fire([device]);
|
||||
this.current.push(device);
|
||||
this.#listChanged.fire(this.current);
|
||||
this.#onListChange.fire(this.current);
|
||||
};
|
||||
|
||||
#handleDisconnect = (e: USBConnectionEvent) => {
|
||||
|
@ -60,10 +60,10 @@ export class AdbDaemonWebUsbDeviceObserver
|
|||
);
|
||||
if (index !== -1) {
|
||||
const device = this.current[index]!;
|
||||
this.#deviceRemoved.fire([device]);
|
||||
this.#onDeviceRemove.fire([device]);
|
||||
this.current[index] = this.current[this.current.length - 1]!;
|
||||
this.current.length -= 1;
|
||||
this.#listChanged.fire(this.current);
|
||||
this.#onListChange.fire(this.current);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@yume-chan/adb": "workspace:^",
|
||||
"@yume-chan/async": "^4.0.0",
|
||||
"@yume-chan/async": "^4.0.2",
|
||||
"@yume-chan/event": "workspace:^",
|
||||
"@yume-chan/scrcpy": "workspace:^",
|
||||
"@yume-chan/stream-extra": "workspace:^",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import type { Adb, AdbSocket } from "@yume-chan/adb";
|
||||
import { AdbReverseNotSupportedError, NOOP } from "@yume-chan/adb";
|
||||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import { delay } from "@yume-chan/async";
|
||||
import type { Disposable } from "@yume-chan/event";
|
||||
import type {
|
||||
|
@ -13,7 +14,6 @@ import {
|
|||
BufferedReadableStream,
|
||||
PushReadableStream,
|
||||
} from "@yume-chan/stream-extra";
|
||||
import type { MaybePromiseLike } from "@yume-chan/struct";
|
||||
|
||||
export interface AdbScrcpyConnectionOptions {
|
||||
scid: number;
|
||||
|
|
|
@ -33,11 +33,12 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@yume-chan/adb": "workspace:^",
|
||||
"@yume-chan/async": "^4.0.2",
|
||||
"@yume-chan/stream-extra": "workspace:^",
|
||||
"@yume-chan/struct": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/node": "^22.9.1",
|
||||
"@yume-chan/eslint-config": "workspace:^",
|
||||
"@yume-chan/tsconfig": "workspace:^",
|
||||
"prettier": "^3.3.3",
|
||||
|
|
|
@ -2,12 +2,12 @@ import type { AddressInfo, SocketConnectOpts } from "net";
|
|||
import { Server, Socket } from "net";
|
||||
|
||||
import type { AdbIncomingSocketHandler, AdbServerClient } from "@yume-chan/adb";
|
||||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import {
|
||||
MaybeConsumable,
|
||||
PushReadableStream,
|
||||
tryClose,
|
||||
} from "@yume-chan/stream-extra";
|
||||
import type { MaybePromiseLike } from "@yume-chan/struct";
|
||||
|
||||
function nodeSocketToConnection(
|
||||
socket: Socket,
|
||||
|
|
|
@ -32,14 +32,14 @@
|
|||
"test": "run-test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@yume-chan/async": "^4.0.0",
|
||||
"@yume-chan/async": "^4.0.2",
|
||||
"@yume-chan/event": "workspace:^",
|
||||
"@yume-chan/no-data-view": "workspace:^",
|
||||
"@yume-chan/stream-extra": "workspace:^",
|
||||
"@yume-chan/struct": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/node": "^22.9.1",
|
||||
"@yume-chan/eslint-config": "workspace:^",
|
||||
"@yume-chan/test-runner": "workspace:^",
|
||||
"@yume-chan/tsconfig": "workspace:^",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import type {
|
||||
MaybeConsumable,
|
||||
ReadableWritablePair,
|
||||
} from "@yume-chan/stream-extra";
|
||||
import { ConcatStringStream, TextDecoderStream } from "@yume-chan/stream-extra";
|
||||
import type { MaybePromiseLike } from "@yume-chan/struct";
|
||||
|
||||
import type { AdbBanner } from "./banner.js";
|
||||
import type { AdbFrameBuffer } from "./commands/index.js";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import type {
|
||||
MaybeConsumable,
|
||||
ReadableStream,
|
||||
WritableStream,
|
||||
} from "@yume-chan/stream-extra";
|
||||
import type { MaybePromiseLike } from "@yume-chan/struct";
|
||||
|
||||
import type { Adb, AdbSocket } from "../../../adb.js";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import { PromiseResolver } from "@yume-chan/async";
|
||||
import type { Disposable } from "@yume-chan/event";
|
||||
import type { MaybePromiseLike } from "@yume-chan/struct";
|
||||
import { EmptyUint8Array } from "@yume-chan/struct";
|
||||
|
||||
import {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import type { Consumable, ReadableWritablePair } from "@yume-chan/stream-extra";
|
||||
import type { MaybePromiseLike } from "@yume-chan/struct";
|
||||
|
||||
import type { AdbPacketData, AdbPacketInit } from "./packet.js";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import { PromiseResolver } from "@yume-chan/async";
|
||||
import type { ReadableWritablePair } from "@yume-chan/stream-extra";
|
||||
import {
|
||||
|
@ -5,7 +6,6 @@ import {
|
|||
Consumable,
|
||||
WritableStream,
|
||||
} from "@yume-chan/stream-extra";
|
||||
import type { MaybePromiseLike } from "@yume-chan/struct";
|
||||
import { decodeUtf8, encodeUtf8 } from "@yume-chan/struct";
|
||||
|
||||
import type {
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import type { Event } from "@yume-chan/event";
|
||||
import type { MaybePromiseLike } from "@yume-chan/struct";
|
||||
|
||||
export interface DeviceObserver<T> {
|
||||
deviceAdded: Event<T[]>;
|
||||
deviceRemoved: Event<T[]>;
|
||||
listChanged: Event<T[]>;
|
||||
onError: Event<Error>;
|
||||
onDeviceAdd: Event<T[]>;
|
||||
onDeviceRemove: Event<T[]>;
|
||||
onListChange: Event<T[]>;
|
||||
current: T[];
|
||||
stop(): MaybePromiseLike<void>;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// cspell:ignore tport
|
||||
|
||||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import { PromiseResolver } from "@yume-chan/async";
|
||||
import { EventEmitter } from "@yume-chan/event";
|
||||
import { getUint64LittleEndian } from "@yume-chan/no-data-view";
|
||||
|
@ -14,7 +15,6 @@ import {
|
|||
tryCancel,
|
||||
tryClose,
|
||||
} from "@yume-chan/stream-extra";
|
||||
import type { MaybePromiseLike } from "@yume-chan/struct";
|
||||
import {
|
||||
bipedal,
|
||||
decodeUtf8,
|
||||
|
@ -297,46 +297,52 @@ export class AdbServerClient {
|
|||
const connection = await this.createConnection("host:track-devices-l");
|
||||
|
||||
let current: AdbServerClient.Device[] = [];
|
||||
const deviceAddedEvent = new EventEmitter<AdbServerClient.Device[]>();
|
||||
const deviceRemovedEvent = new EventEmitter<AdbServerClient.Device[]>();
|
||||
const listChangedEvent = new EventEmitter<AdbServerClient.Device[]>();
|
||||
const onError = new EventEmitter<Error>();
|
||||
const onDeviceAdd = new EventEmitter<AdbServerClient.Device[]>();
|
||||
const onDeviceRemove = new EventEmitter<AdbServerClient.Device[]>();
|
||||
const onListChange = new EventEmitter<AdbServerClient.Device[]>();
|
||||
|
||||
void (async () => {
|
||||
while (true) {
|
||||
const response = await connection.readString();
|
||||
const next = AdbServerClient.parseDeviceList(response);
|
||||
try {
|
||||
while (true) {
|
||||
const response = await connection.readString();
|
||||
const next = AdbServerClient.parseDeviceList(response);
|
||||
|
||||
const added: AdbServerClient.Device[] = [];
|
||||
for (const nextDevice of next) {
|
||||
const index = current.findIndex(
|
||||
(device) =>
|
||||
device.transportId === nextDevice.transportId,
|
||||
);
|
||||
if (index === -1) {
|
||||
added.push(nextDevice);
|
||||
continue;
|
||||
const added: AdbServerClient.Device[] = [];
|
||||
for (const nextDevice of next) {
|
||||
const index = current.findIndex(
|
||||
(device) =>
|
||||
device.transportId === nextDevice.transportId,
|
||||
);
|
||||
if (index === -1) {
|
||||
added.push(nextDevice);
|
||||
continue;
|
||||
}
|
||||
|
||||
current[index] = current[current.length - 1]!;
|
||||
current.length -= 1;
|
||||
}
|
||||
|
||||
current[index] = current[current.length - 1]!;
|
||||
current.length -= 1;
|
||||
}
|
||||
if (added.length) {
|
||||
onDeviceAdd.fire(added);
|
||||
}
|
||||
if (current.length) {
|
||||
onDeviceRemove.fire(current);
|
||||
}
|
||||
|
||||
if (added.length) {
|
||||
deviceAddedEvent.fire(added);
|
||||
current = next;
|
||||
onListChange.fire(current);
|
||||
}
|
||||
if (current.length) {
|
||||
deviceRemovedEvent.fire(current);
|
||||
}
|
||||
|
||||
current = next;
|
||||
listChangedEvent.fire(current);
|
||||
} catch (e) {
|
||||
onError.fire(e as Error);
|
||||
}
|
||||
})();
|
||||
|
||||
return {
|
||||
deviceAdded: deviceAddedEvent.event,
|
||||
deviceRemoved: deviceRemovedEvent.event,
|
||||
listChanged: listChangedEvent.event,
|
||||
onError: onError.event,
|
||||
onDeviceAdd: onDeviceAdd.event,
|
||||
onDeviceRemove: onDeviceRemove.event,
|
||||
onListChange: onListChange.event,
|
||||
get current() {
|
||||
return current;
|
||||
},
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import { PromiseResolver } from "@yume-chan/async";
|
||||
import { AbortController } from "@yume-chan/stream-extra";
|
||||
|
||||
|
@ -95,7 +96,7 @@ export class AdbServerTransport implements AdbTransport {
|
|||
await this.#client.connector.clearReverseTunnels();
|
||||
}
|
||||
|
||||
close(): void | Promise<void> {
|
||||
close(): MaybePromiseLike<void> {
|
||||
this.#closed.resolve();
|
||||
this.#waitAbortController.abort();
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
"@yume-chan/struct": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/node": "^22.9.1",
|
||||
"@yume-chan/eslint-config": "workspace:^",
|
||||
"@yume-chan/test-runner": "workspace:^",
|
||||
"@yume-chan/tsconfig": "workspace:^",
|
||||
|
|
|
@ -33,10 +33,10 @@
|
|||
"test": "run-test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@yume-chan/async": "^4.0.0"
|
||||
"@yume-chan/async": "^4.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/node": "^22.9.1",
|
||||
"@yume-chan/eslint-config": "workspace:^",
|
||||
"@yume-chan/test-runner": "workspace:^",
|
||||
"@yume-chan/tsconfig": "workspace:^",
|
||||
|
|
|
@ -31,6 +31,6 @@
|
|||
"gh-release-fetch": "^4.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.9.0"
|
||||
"@types/node": "^22.9.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"test": "run-test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/node": "^22.9.1",
|
||||
"@yume-chan/eslint-config": "workspace:^",
|
||||
"@yume-chan/test-runner": "workspace:^",
|
||||
"@yume-chan/tsconfig": "workspace:^",
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
"prepublishOnly": "npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@yume-chan/async": "^4.0.0",
|
||||
"@yume-chan/async": "^4.0.2",
|
||||
"@yume-chan/event": "workspace:^",
|
||||
"@yume-chan/scrcpy": "workspace:^",
|
||||
"@yume-chan/stream-extra": "workspace:^",
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
"prepublishOnly": "npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@yume-chan/async": "^4.0.2",
|
||||
"@yume-chan/event": "workspace:^",
|
||||
"@yume-chan/no-data-view": "workspace:^",
|
||||
"@yume-chan/scrcpy": "workspace:^",
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
|
||||
export interface WebCodecsVideoDecoderRenderer {
|
||||
setSize(width: number, height: number): void;
|
||||
|
||||
draw(frame: VideoFrame): Promise<void>;
|
||||
draw(frame: VideoFrame): MaybePromiseLike<void>;
|
||||
}
|
||||
|
|
|
@ -33,13 +33,13 @@
|
|||
"test": "run-test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@yume-chan/async": "^4.0.0",
|
||||
"@yume-chan/async": "^4.0.2",
|
||||
"@yume-chan/no-data-view": "workspace:^",
|
||||
"@yume-chan/stream-extra": "workspace:^",
|
||||
"@yume-chan/struct": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/node": "^22.9.1",
|
||||
"@yume-chan/eslint-config": "workspace:^",
|
||||
"@yume-chan/test-runner": "workspace:^",
|
||||
"@yume-chan/tsconfig": "workspace:^",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import {
|
||||
getUint16BigEndian,
|
||||
getUint32BigEndian,
|
||||
|
@ -12,7 +13,7 @@ import {
|
|||
StructDeserializeStream,
|
||||
TransformStream,
|
||||
} from "@yume-chan/stream-extra";
|
||||
import type { AsyncExactReadable, MaybePromiseLike } from "@yume-chan/struct";
|
||||
import type { AsyncExactReadable } from "@yume-chan/struct";
|
||||
import { decodeUtf8 } from "@yume-chan/struct";
|
||||
|
||||
import type {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import type { ReadableStream } from "@yume-chan/stream-extra";
|
||||
import type { MaybePromiseLike } from "@yume-chan/struct";
|
||||
|
||||
import type { ScrcpyScrollController } from "../1_16/index.js";
|
||||
import { ScrcpyOptions1_21 } from "../1_21.js";
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import { getUint32BigEndian } from "@yume-chan/no-data-view";
|
||||
import type { ReadableStream } from "@yume-chan/stream-extra";
|
||||
import {
|
||||
BufferedReadableStream,
|
||||
PushReadableStream,
|
||||
} from "@yume-chan/stream-extra";
|
||||
import type { MaybePromiseLike, StructInit } from "@yume-chan/struct";
|
||||
import type { StructInit } from "@yume-chan/struct";
|
||||
import { struct, u16, u32, u64, u8 } from "@yume-chan/struct";
|
||||
|
||||
import type {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import type { ReadableStream } from "@yume-chan/stream-extra";
|
||||
import type { MaybePromiseLike } from "@yume-chan/struct";
|
||||
|
||||
import { ScrcpyOptions1_21 } from "./1_21.js";
|
||||
import { ScrcpyOptions2_0 } from "./2_0.js";
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import type { ReadableStream, TransformStream } from "@yume-chan/stream-extra";
|
||||
import type { AsyncExactReadable, MaybePromiseLike } from "@yume-chan/struct";
|
||||
import type { AsyncExactReadable } from "@yume-chan/struct";
|
||||
|
||||
import type {
|
||||
ScrcpyBackOrScreenOnControlMessage,
|
||||
|
|
|
@ -32,11 +32,11 @@
|
|||
"test": "run-test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@yume-chan/async": "^4.0.0",
|
||||
"@yume-chan/async": "^4.0.2",
|
||||
"@yume-chan/struct": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/node": "^22.9.1",
|
||||
"@yume-chan/eslint-config": "workspace:^",
|
||||
"@yume-chan/test-runner": "workspace:^",
|
||||
"@yume-chan/tsconfig": "workspace:^",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/struct";
|
||||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import { StructEmptyError } from "@yume-chan/struct";
|
||||
|
||||
import { BufferedReadableStream } from "./buffered.js";
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import type { AsyncExactReadable, MaybePromiseLike } from "@yume-chan/struct";
|
||||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import type { AsyncExactReadable } from "@yume-chan/struct";
|
||||
import { bipedal, ExactReadableEndedError } from "@yume-chan/struct";
|
||||
|
||||
import { PushReadableStream } from "./push-readable.js";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { PromiseResolver } from "@yume-chan/async";
|
||||
import { PromiseResolver, isPromiseLike } from "@yume-chan/async";
|
||||
|
||||
import type {
|
||||
QueuingStrategy,
|
||||
|
@ -12,125 +12,122 @@ import {
|
|||
import type { Task } from "./task.js";
|
||||
import { createTask } from "./task.js";
|
||||
|
||||
function isPromiseLike(value: unknown): value is PromiseLike<unknown> {
|
||||
return typeof value === "object" && value !== null && "then" in value;
|
||||
// Workaround https://github.com/evanw/esbuild/issues/3923
|
||||
class WritableStream<in T> extends NativeWritableStream<Consumable<T>> {
|
||||
static async write<T>(
|
||||
writer: WritableStreamDefaultWriter<Consumable<T>>,
|
||||
value: T,
|
||||
) {
|
||||
const consumable = new Consumable(value);
|
||||
await writer.write(consumable);
|
||||
await consumable.consumed;
|
||||
}
|
||||
|
||||
constructor(
|
||||
sink: Consumable.WritableStreamSink<T>,
|
||||
strategy?: QueuingStrategy<T>,
|
||||
) {
|
||||
let wrappedStrategy: QueuingStrategy<Consumable<T>> | undefined;
|
||||
if (strategy) {
|
||||
wrappedStrategy = {};
|
||||
if ("highWaterMark" in strategy) {
|
||||
wrappedStrategy.highWaterMark = strategy.highWaterMark;
|
||||
}
|
||||
if ("size" in strategy) {
|
||||
wrappedStrategy.size = (chunk) => {
|
||||
return strategy.size!(
|
||||
chunk instanceof Consumable ? chunk.value : chunk,
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
super(
|
||||
{
|
||||
start(controller) {
|
||||
return sink.start?.(controller);
|
||||
},
|
||||
async write(chunk, controller) {
|
||||
await chunk.tryConsume((chunk) =>
|
||||
sink.write?.(chunk, controller),
|
||||
);
|
||||
},
|
||||
abort(reason) {
|
||||
return sink.abort?.(reason);
|
||||
},
|
||||
close() {
|
||||
return sink.close?.();
|
||||
},
|
||||
},
|
||||
wrappedStrategy,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ReadableStream<T> extends NativeReadableStream<Consumable<T>> {
|
||||
static async enqueue<T>(
|
||||
controller: { enqueue: (chunk: Consumable<T>) => void },
|
||||
chunk: T,
|
||||
) {
|
||||
const output = new Consumable(chunk);
|
||||
controller.enqueue(output);
|
||||
await output.consumed;
|
||||
}
|
||||
|
||||
constructor(
|
||||
source: Consumable.ReadableStreamSource<T>,
|
||||
strategy?: QueuingStrategy<T>,
|
||||
) {
|
||||
let wrappedController:
|
||||
| Consumable.ReadableStreamController<T>
|
||||
| undefined;
|
||||
|
||||
let wrappedStrategy: QueuingStrategy<Consumable<T>> | undefined;
|
||||
if (strategy) {
|
||||
wrappedStrategy = {};
|
||||
if ("highWaterMark" in strategy) {
|
||||
wrappedStrategy.highWaterMark = strategy.highWaterMark;
|
||||
}
|
||||
if ("size" in strategy) {
|
||||
wrappedStrategy.size = (chunk) => {
|
||||
return strategy.size!(chunk.value);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
super(
|
||||
{
|
||||
async start(controller) {
|
||||
wrappedController = {
|
||||
async enqueue(chunk) {
|
||||
await ReadableStream.enqueue(controller, chunk);
|
||||
},
|
||||
close() {
|
||||
controller.close();
|
||||
},
|
||||
error(reason) {
|
||||
controller.error(reason);
|
||||
},
|
||||
};
|
||||
|
||||
await source.start?.(wrappedController);
|
||||
},
|
||||
async pull() {
|
||||
await source.pull?.(wrappedController!);
|
||||
},
|
||||
async cancel(reason) {
|
||||
await source.cancel?.(reason);
|
||||
},
|
||||
},
|
||||
wrappedStrategy,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export class Consumable<T> {
|
||||
static readonly WritableStream = class WritableStream<
|
||||
in T,
|
||||
> extends NativeWritableStream<Consumable<T>> {
|
||||
static async write<T>(
|
||||
writer: WritableStreamDefaultWriter<Consumable<T>>,
|
||||
value: T,
|
||||
) {
|
||||
const consumable = new Consumable(value);
|
||||
await writer.write(consumable);
|
||||
await consumable.consumed;
|
||||
}
|
||||
static readonly WritableStream = WritableStream;
|
||||
|
||||
constructor(
|
||||
sink: Consumable.WritableStreamSink<T>,
|
||||
strategy?: QueuingStrategy<T>,
|
||||
) {
|
||||
let wrappedStrategy: QueuingStrategy<Consumable<T>> | undefined;
|
||||
if (strategy) {
|
||||
wrappedStrategy = {};
|
||||
if ("highWaterMark" in strategy) {
|
||||
wrappedStrategy.highWaterMark = strategy.highWaterMark;
|
||||
}
|
||||
if ("size" in strategy) {
|
||||
wrappedStrategy.size = (chunk) => {
|
||||
return strategy.size!(
|
||||
chunk instanceof Consumable ? chunk.value : chunk,
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
super(
|
||||
{
|
||||
start(controller) {
|
||||
return sink.start?.(controller);
|
||||
},
|
||||
async write(chunk, controller) {
|
||||
await chunk.tryConsume((chunk) =>
|
||||
sink.write?.(chunk, controller),
|
||||
);
|
||||
},
|
||||
abort(reason) {
|
||||
return sink.abort?.(reason);
|
||||
},
|
||||
close() {
|
||||
return sink.close?.();
|
||||
},
|
||||
},
|
||||
wrappedStrategy,
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static readonly ReadableStream = class ReadableStream<
|
||||
T,
|
||||
> extends NativeReadableStream<Consumable<T>> {
|
||||
static async enqueue<T>(
|
||||
controller: { enqueue: (chunk: Consumable<T>) => void },
|
||||
chunk: T,
|
||||
) {
|
||||
const output = new Consumable(chunk);
|
||||
controller.enqueue(output);
|
||||
await output.consumed;
|
||||
}
|
||||
|
||||
constructor(
|
||||
source: Consumable.ReadableStreamSource<T>,
|
||||
strategy?: QueuingStrategy<T>,
|
||||
) {
|
||||
let wrappedController:
|
||||
| Consumable.ReadableStreamController<T>
|
||||
| undefined;
|
||||
|
||||
let wrappedStrategy: QueuingStrategy<Consumable<T>> | undefined;
|
||||
if (strategy) {
|
||||
wrappedStrategy = {};
|
||||
if ("highWaterMark" in strategy) {
|
||||
wrappedStrategy.highWaterMark = strategy.highWaterMark;
|
||||
}
|
||||
if ("size" in strategy) {
|
||||
wrappedStrategy.size = (chunk) => {
|
||||
return strategy.size!(chunk.value);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
super(
|
||||
{
|
||||
async start(controller) {
|
||||
wrappedController = {
|
||||
async enqueue(chunk) {
|
||||
await ReadableStream.enqueue(controller, chunk);
|
||||
},
|
||||
close() {
|
||||
controller.close();
|
||||
},
|
||||
error(reason) {
|
||||
controller.error(reason);
|
||||
},
|
||||
};
|
||||
|
||||
await source.start?.(wrappedController);
|
||||
},
|
||||
async pull() {
|
||||
await source.pull?.(wrappedController!);
|
||||
},
|
||||
async cancel(reason) {
|
||||
await source.cancel?.(reason);
|
||||
},
|
||||
},
|
||||
wrappedStrategy,
|
||||
);
|
||||
}
|
||||
};
|
||||
static readonly ReadableStream = ReadableStream;
|
||||
|
||||
readonly #task: Task;
|
||||
readonly #resolver: PromiseResolver<void>;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import { PromiseResolver } from "@yume-chan/async";
|
||||
import type { MaybePromiseLike } from "@yume-chan/struct";
|
||||
|
||||
import type {
|
||||
QueuingStrategy,
|
||||
|
|
|
@ -75,7 +75,7 @@ export class PushReadableStream<T> extends ReadableStream<T> {
|
|||
// But in `PushReadableStream`, `enqueue` is an async function,
|
||||
// the producer can't just check `abortSignal.aborted`
|
||||
// before calling `enqueue`, as it might change when waiting
|
||||
// for the backpressure to be resolved.
|
||||
// for the backpressure to be reduced.
|
||||
//
|
||||
// So IMO it's better to handle this for the producer
|
||||
// by simply ignoring the `enqueue` call.
|
||||
|
@ -85,7 +85,7 @@ export class PushReadableStream<T> extends ReadableStream<T> {
|
|||
// they called `close` or `error`.
|
||||
//
|
||||
// Obviously, the producer should listen to the `abortSignal` and
|
||||
// stop producing, but most pushing data sources can't be stopped.
|
||||
// stop producing, but most pushing data sources don't support that.
|
||||
logger?.({
|
||||
source: "producer",
|
||||
operation: "enqueue",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/struct";
|
||||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
|
||||
import type {
|
||||
QueuingStrategy,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/struct";
|
||||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
|
||||
import type { TransformStream, WritableStreamDefaultWriter } from "./stream.js";
|
||||
import { WritableStream } from "./stream.js";
|
||||
|
|
|
@ -34,10 +34,11 @@
|
|||
"test": "run-test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@yume-chan/async": "^4.0.2",
|
||||
"@yume-chan/no-data-view": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/node": "^22.9.1",
|
||||
"@yume-chan/eslint-config": "workspace:^",
|
||||
"@yume-chan/test-runner": "workspace:^",
|
||||
"@yume-chan/tsconfig": "workspace:^",
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
import type { MaybePromiseLike } from "./utils.js";
|
||||
|
||||
function isPromiseLike<T>(value: unknown): value is PromiseLike<T> {
|
||||
return typeof value === "object" && value !== null && "then" in value;
|
||||
}
|
||||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
import { isPromiseLike } from "@yume-chan/async";
|
||||
|
||||
function advance<T>(
|
||||
iterator: Iterator<unknown, T, unknown>,
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
|
||||
import type { AsyncExactReadable } from "./readable.js";
|
||||
import type { MaybePromiseLike } from "./utils.js";
|
||||
|
||||
export interface SerializeContext {
|
||||
buffer: Uint8Array;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// TODO: allow over reading (returning a `Uint8Array`, an `offset` and a `length`) to avoid copying
|
||||
|
||||
import type { MaybePromiseLike } from "./utils.js";
|
||||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
|
||||
export class ExactReadableEndedError extends Error {
|
||||
constructor() {
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import type { MaybePromiseLike } from "@yume-chan/async";
|
||||
|
||||
import { bipedal } from "./bipedal.js";
|
||||
import type { DeserializeContext, Field, SerializeContext } from "./field.js";
|
||||
import type { AsyncExactReadable, ExactReadable } from "./readable.js";
|
||||
import { ExactReadableEndedError } from "./readable.js";
|
||||
import type { MaybePromiseLike } from "./utils.js";
|
||||
|
||||
export type FieldsType<
|
||||
T extends Record<string, Field<unknown, string, unknown>>,
|
||||
|
|
|
@ -38,7 +38,3 @@ export function decodeUtf8(buffer: ArrayBufferView | ArrayBuffer): string {
|
|||
// but this method is not for stream mode, so the instance can be reused
|
||||
return SharedDecoder.decode(buffer);
|
||||
}
|
||||
|
||||
export type MaybePromise<T> = T | Promise<T>;
|
||||
|
||||
export type MaybePromiseLike<T> = T | PromiseLike<T>;
|
||||
|
|
101
pnpm-lock.yaml
generated
101
pnpm-lock.yaml
generated
|
@ -34,8 +34,8 @@ importers:
|
|||
version: 0.5.21
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
specifier: ^22.9.1
|
||||
version: 22.9.1
|
||||
'@yume-chan/eslint-config':
|
||||
specifier: workspace:^
|
||||
version: link:../../toolchain/eslint-config
|
||||
|
@ -52,8 +52,8 @@ importers:
|
|||
libraries/adb:
|
||||
dependencies:
|
||||
'@yume-chan/async':
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
specifier: ^4.0.2
|
||||
version: 4.0.2
|
||||
'@yume-chan/event':
|
||||
specifier: workspace:^
|
||||
version: link:../event
|
||||
|
@ -68,8 +68,8 @@ importers:
|
|||
version: link:../struct
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
specifier: ^22.9.1
|
||||
version: 22.9.1
|
||||
'@yume-chan/eslint-config':
|
||||
specifier: workspace:^
|
||||
version: link:../../toolchain/eslint-config
|
||||
|
@ -124,8 +124,8 @@ importers:
|
|||
version: link:../struct
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
specifier: ^22.9.1
|
||||
version: 22.9.1
|
||||
'@yume-chan/eslint-config':
|
||||
specifier: workspace:^
|
||||
version: link:../../toolchain/eslint-config
|
||||
|
@ -148,8 +148,8 @@ importers:
|
|||
specifier: workspace:^
|
||||
version: link:../adb
|
||||
'@yume-chan/async':
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
specifier: ^4.0.2
|
||||
version: 4.0.2
|
||||
'@yume-chan/event':
|
||||
specifier: workspace:^
|
||||
version: link:../event
|
||||
|
@ -181,6 +181,9 @@ importers:
|
|||
'@yume-chan/adb':
|
||||
specifier: workspace:^
|
||||
version: link:../adb
|
||||
'@yume-chan/async':
|
||||
specifier: ^4.0.2
|
||||
version: 4.0.2
|
||||
'@yume-chan/stream-extra':
|
||||
specifier: workspace:^
|
||||
version: link:../stream-extra
|
||||
|
@ -189,8 +192,8 @@ importers:
|
|||
version: link:../struct
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
specifier: ^22.9.1
|
||||
version: 22.9.1
|
||||
'@yume-chan/eslint-config':
|
||||
specifier: workspace:^
|
||||
version: link:../../toolchain/eslint-config
|
||||
|
@ -217,8 +220,8 @@ importers:
|
|||
version: link:../struct
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
specifier: ^22.9.1
|
||||
version: 22.9.1
|
||||
'@yume-chan/eslint-config':
|
||||
specifier: workspace:^
|
||||
version: link:../../toolchain/eslint-config
|
||||
|
@ -257,12 +260,12 @@ importers:
|
|||
libraries/event:
|
||||
dependencies:
|
||||
'@yume-chan/async':
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
specifier: ^4.0.2
|
||||
version: 4.0.2
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
specifier: ^22.9.1
|
||||
version: 22.9.1
|
||||
'@yume-chan/eslint-config':
|
||||
specifier: workspace:^
|
||||
version: link:../../toolchain/eslint-config
|
||||
|
@ -286,14 +289,14 @@ importers:
|
|||
version: 4.0.3
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
specifier: ^22.9.1
|
||||
version: 22.9.1
|
||||
|
||||
libraries/no-data-view:
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
specifier: ^22.9.1
|
||||
version: 22.9.1
|
||||
'@yume-chan/eslint-config':
|
||||
specifier: workspace:^
|
||||
version: link:../../toolchain/eslint-config
|
||||
|
@ -334,8 +337,8 @@ importers:
|
|||
libraries/scrcpy:
|
||||
dependencies:
|
||||
'@yume-chan/async':
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
specifier: ^4.0.2
|
||||
version: 4.0.2
|
||||
'@yume-chan/no-data-view':
|
||||
specifier: workspace:^
|
||||
version: link:../no-data-view
|
||||
|
@ -347,8 +350,8 @@ importers:
|
|||
version: link:../struct
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
specifier: ^22.9.1
|
||||
version: 22.9.1
|
||||
'@yume-chan/eslint-config':
|
||||
specifier: workspace:^
|
||||
version: link:../../toolchain/eslint-config
|
||||
|
@ -368,8 +371,8 @@ importers:
|
|||
libraries/scrcpy-decoder-tinyh264:
|
||||
dependencies:
|
||||
'@yume-chan/async':
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
specifier: ^4.0.2
|
||||
version: 4.0.2
|
||||
'@yume-chan/event':
|
||||
specifier: workspace:^
|
||||
version: link:../event
|
||||
|
@ -404,6 +407,9 @@ importers:
|
|||
|
||||
libraries/scrcpy-decoder-webcodecs:
|
||||
dependencies:
|
||||
'@yume-chan/async':
|
||||
specifier: ^4.0.2
|
||||
version: 4.0.2
|
||||
'@yume-chan/event':
|
||||
specifier: workspace:^
|
||||
version: link:../event
|
||||
|
@ -436,15 +442,15 @@ importers:
|
|||
libraries/stream-extra:
|
||||
dependencies:
|
||||
'@yume-chan/async':
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
specifier: ^4.0.2
|
||||
version: 4.0.2
|
||||
'@yume-chan/struct':
|
||||
specifier: workspace:^
|
||||
version: link:../struct
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
specifier: ^22.9.1
|
||||
version: 22.9.1
|
||||
'@yume-chan/eslint-config':
|
||||
specifier: workspace:^
|
||||
version: link:../../toolchain/eslint-config
|
||||
|
@ -463,13 +469,16 @@ importers:
|
|||
|
||||
libraries/struct:
|
||||
dependencies:
|
||||
'@yume-chan/async':
|
||||
specifier: ^4.0.2
|
||||
version: 4.0.2
|
||||
'@yume-chan/no-data-view':
|
||||
specifier: workspace:^
|
||||
version: link:../no-data-view
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
specifier: ^22.9.1
|
||||
version: 22.9.1
|
||||
'@yume-chan/eslint-config':
|
||||
specifier: workspace:^
|
||||
version: link:../../toolchain/eslint-config
|
||||
|
@ -492,8 +501,8 @@ importers:
|
|||
specifier: ^9.15.0
|
||||
version: 9.15.0
|
||||
'@types/node':
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
specifier: ^22.9.1
|
||||
version: 22.9.1
|
||||
eslint:
|
||||
specifier: ^9.15.0
|
||||
version: 9.15.0
|
||||
|
@ -514,8 +523,8 @@ importers:
|
|||
toolchain/package-lint:
|
||||
dependencies:
|
||||
'@types/node':
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
specifier: ^22.9.1
|
||||
version: 22.9.1
|
||||
json5:
|
||||
specifier: ^2.2.3
|
||||
version: 2.2.3
|
||||
|
@ -523,8 +532,8 @@ importers:
|
|||
toolchain/test-runner:
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
specifier: ^22.9.1
|
||||
version: 22.9.1
|
||||
typescript:
|
||||
specifier: ^5.6.3
|
||||
version: 5.6.3
|
||||
|
@ -694,8 +703,8 @@ packages:
|
|||
'@types/node@12.20.55':
|
||||
resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==}
|
||||
|
||||
'@types/node@22.9.0':
|
||||
resolution: {integrity: sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==}
|
||||
'@types/node@22.9.1':
|
||||
resolution: {integrity: sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==}
|
||||
|
||||
'@types/w3c-web-usb@1.0.10':
|
||||
resolution: {integrity: sha512-CHgUI5kTc/QLMP8hODUHhge0D4vx+9UiAwIGiT0sTy/B2XpdX1U5rJt6JSISgr6ikRT7vxV9EVAFeYZqUnl1gQ==}
|
||||
|
@ -790,8 +799,8 @@ packages:
|
|||
resolution: {integrity: sha512-mBvWew1kZJHfNQVVfVllMjUDwCGN9apPa0t4/z1zaUJ9MzpXjRL3w8fsfJKB8gHN/h4rik9HneKfDbh2fErN+w==}
|
||||
engines: {node: ^14.14.0 || >=16.0.0}
|
||||
|
||||
'@yume-chan/async@4.0.0':
|
||||
resolution: {integrity: sha512-T4DOnvaVqrx+PQh8bESdS6y2ozii7M0isJ5MpGU0girfz9kmwOaJ+rF1oeTJGZ0k+v92+eo/q6SpJjcjnO9tuQ==}
|
||||
'@yume-chan/async@4.0.2':
|
||||
resolution: {integrity: sha512-YP5Hg4DZoq6CXzeTsiOu6rDNUaWw8SMiM4cB2rHam4zRTatgUHCWpSKMawQt0+nUro/+IeNTZLh2QpIFyxuGzg==}
|
||||
|
||||
acorn-jsx@5.3.2:
|
||||
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
||||
|
@ -1978,7 +1987,7 @@ snapshots:
|
|||
|
||||
'@types/node@12.20.55': {}
|
||||
|
||||
'@types/node@22.9.0':
|
||||
'@types/node@22.9.1':
|
||||
dependencies:
|
||||
undici-types: 6.19.8
|
||||
|
||||
|
@ -2119,7 +2128,7 @@ snapshots:
|
|||
merge-options: 3.0.4
|
||||
p-event: 5.0.1
|
||||
|
||||
'@yume-chan/async@4.0.0': {}
|
||||
'@yume-chan/async@4.0.2': {}
|
||||
|
||||
acorn-jsx@5.3.2(acorn@8.14.0):
|
||||
dependencies:
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@eslint/js": "^9.15.0",
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/node": "^22.9.1",
|
||||
"eslint": "^9.15.0",
|
||||
"eslint-plugin-import-x": "^4.4.2",
|
||||
"typescript": "^5.6.3",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"scripts": {},
|
||||
"keywords": [],
|
||||
"dependencies": {
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/node": "^22.9.1",
|
||||
"json5": "^2.2.3"
|
||||
},
|
||||
"author": "",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"run-test": "wrapper.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/node": "^22.9.1",
|
||||
"typescript": "^5.6.3"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue