New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@yume-chan/adb-server-node-tcp

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yume-chan/adb-server-node-tcp - npm Package Compare versions

Comparing version 0.0.23 to 0.0.24

6

CHANGELOG.json

@@ -5,2 +5,8 @@ {

{
"version": "0.0.24",
"tag": "@yume-chan/adb-server-node-tcp_v0.0.24",
"date": "Tue, 18 Jun 2024 02:49:43 GMT",
"comments": {}
},
{
"version": "0.0.23",

@@ -7,0 +13,0 @@ "tag": "@yume-chan/adb-server-node-tcp_v0.0.23",

7

CHANGELOG.md
# Change Log - @yume-chan/adb-server-node-tcp
This log was last generated on Thu, 21 Mar 2024 03:15:10 GMT and should not be manually modified.
This log was last generated on Tue, 18 Jun 2024 02:49:43 GMT and should not be manually modified.
## 0.0.24
Tue, 18 Jun 2024 02:49:43 GMT
_Version update only_
## 0.0.23

@@ -6,0 +11,0 @@ Thu, 21 Mar 2024 03:15:10 GMT

6

esm/index.d.ts
/// <reference types="node" resolution-mode="require"/>
import type { SocketConnectOpts } from "net";
import type { AdbIncomingSocketHandler, AdbServerConnection, AdbServerConnectionOptions, AdbServerConnector } from "@yume-chan/adb";
import type { AdbIncomingSocketHandler, AdbServerClient } from "@yume-chan/adb";
import type { ValueOrPromise } from "@yume-chan/struct";
export declare class AdbServerNodeTcpConnector implements AdbServerConnector {
export declare class AdbServerNodeTcpConnector implements AdbServerClient.ServerConnector {
#private;
readonly spec: SocketConnectOpts;
constructor(spec: SocketConnectOpts);
connect({ unref }?: AdbServerConnectionOptions): Promise<AdbServerConnection>;
connect({ unref }?: AdbServerClient.ServerConnectionOptions): Promise<AdbServerClient.ServerConnection>;
addReverseTunnel(handler: AdbIncomingSocketHandler, address?: string): Promise<string>;

@@ -11,0 +11,0 @@ removeReverseTunnel(address: string): ValueOrPromise<void>;

import { Server, Socket } from "net";
import { PushReadableStream, UnwrapConsumableStream, WrapWritableStream, WritableStream, } from "@yume-chan/stream-extra";
import { MaybeConsumable, PushReadableStream, WrapWritableStream, WritableStream, } from "@yume-chan/stream-extra";
function nodeSocketToConnection(socket) {

@@ -76,3 +76,3 @@ socket.setNoDelay(true);

readable: connection.readable,
writable: new WrapWritableStream(connection.writable).bePipedThroughFrom(new UnwrapConsumableStream()),
writable: new WrapWritableStream(connection.writable).bePipedThroughFrom(new MaybeConsumable.UnwrapStream()),
get closed() {

@@ -99,3 +99,3 @@ return connection.closed;

else {
throw new Error(`Unsupported protocol ${url.protocol}`);
throw new TypeError(`Unsupported protocol ${url.protocol}`);
}

@@ -102,0 +102,0 @@ }

{
"name": "@yume-chan/adb-server-node-tcp",
"version": "0.0.23",
"version": "0.0.24",
"description": "ADB server connector for `@yume-chan/adb` using Node.js' `net` module",

@@ -30,15 +30,13 @@ "keywords": [

"dependencies": {
"@yume-chan/adb": "^0.0.23",
"@yume-chan/stream-extra": "^0.0.23",
"@yume-chan/struct": "^0.0.23",
"tslib": "^2.6.2"
"@yume-chan/adb": "^0.0.24",
"@yume-chan/stream-extra": "^0.0.24",
"@yume-chan/struct": "^0.0.24"
},
"devDependencies": {
"@types/node": "^20.11.28",
"@types/node": "^20.14.2",
"@yume-chan/eslint-config": "^1.0.0",
"@yume-chan/tsconfig": "^1.0.0",
"eslint": "^8.57.0",
"jest": "^30.0.0-alpha.3",
"prettier": "^3.2.5",
"typescript": "^5.4.2"
"jest": "^30.0.0-alpha.4",
"prettier": "^3.3.2",
"typescript": "^5.4.5"
},

@@ -48,4 +46,4 @@ "scripts": {

"build:watch": "tsc -b tsconfig.build.json",
"lint": "eslint src/**/*.ts --fix"
"lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4"
}
}
import type { AddressInfo, SocketConnectOpts } from "net";
import { Server, Socket } from "net";
import type {
AdbIncomingSocketHandler,
AdbServerConnection,
AdbServerConnectionOptions,
AdbServerConnector,
} from "@yume-chan/adb";
import type { AdbIncomingSocketHandler, AdbServerClient } from "@yume-chan/adb";
import {
MaybeConsumable,
PushReadableStream,
UnwrapConsumableStream,
WrapWritableStream,

@@ -18,3 +13,5 @@ WritableStream,

function nodeSocketToConnection(socket: Socket): AdbServerConnection {
function nodeSocketToConnection(
socket: Socket,
): AdbServerClient.ServerConnection {
socket.setNoDelay(true);

@@ -68,3 +65,5 @@

export class AdbServerNodeTcpConnector implements AdbServerConnector {
export class AdbServerNodeTcpConnector
implements AdbServerClient.ServerConnector
{
readonly spec: SocketConnectOpts;

@@ -79,4 +78,4 @@

async connect(
{ unref }: AdbServerConnectionOptions = { unref: false },
): Promise<AdbServerConnection> {
{ unref }: AdbServerClient.ServerConnectionOptions = { unref: false },
): Promise<AdbServerClient.ServerConnection> {
const socket = new Socket();

@@ -107,3 +106,3 @@ if (unref) {

connection.writable,
).bePipedThroughFrom(new UnwrapConsumableStream()),
).bePipedThroughFrom(new MaybeConsumable.UnwrapStream()),
get closed() {

@@ -128,3 +127,3 @@ return connection.closed;

} else {
throw new Error(`Unsupported protocol ${url.protocol}`);
throw new TypeError(`Unsupported protocol ${url.protocol}`);
}

@@ -131,0 +130,0 @@ } else {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc