@yume-chan/adb 0.0.16 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +12 -0
- package/CHANGELOG.md +8 -1
- package/esm/adb.d.ts +8 -3
- package/esm/adb.d.ts.map +1 -1
- package/esm/adb.js +11 -6
- package/esm/adb.js.map +1 -1
- package/esm/auth.d.ts.map +1 -1
- package/esm/auth.js.map +1 -1
- package/esm/backend.d.ts +2 -2
- package/esm/backend.d.ts.map +1 -1
- package/esm/commands/base.d.ts.map +1 -1
- package/esm/commands/base.js.map +1 -1
- package/esm/commands/framebuffer.d.ts +17 -1
- package/esm/commands/framebuffer.d.ts.map +1 -1
- package/esm/commands/framebuffer.js +4 -15
- package/esm/commands/framebuffer.js.map +1 -1
- package/esm/commands/install.d.ts +2 -2
- package/esm/commands/install.d.ts.map +1 -1
- package/esm/commands/install.js +3 -2
- package/esm/commands/install.js.map +1 -1
- package/esm/commands/power.d.ts +1 -1
- package/esm/commands/power.js +1 -1
- package/esm/commands/reverse.d.ts +3 -3
- package/esm/commands/reverse.d.ts.map +1 -1
- package/esm/commands/reverse.js +9 -9
- package/esm/commands/reverse.js.map +1 -1
- package/esm/commands/subprocess/command.d.ts +52 -0
- package/esm/commands/subprocess/command.d.ts.map +1 -0
- package/esm/commands/subprocess/command.js +83 -0
- package/esm/commands/subprocess/command.js.map +1 -0
- package/esm/commands/subprocess/index.d.ts +1 -53
- package/esm/commands/subprocess/index.d.ts.map +1 -1
- package/esm/commands/subprocess/index.js +1 -85
- package/esm/commands/subprocess/index.js.map +1 -1
- package/esm/commands/subprocess/protocols/none.d.ts +4 -4
- package/esm/commands/subprocess/protocols/none.d.ts.map +1 -1
- package/esm/commands/subprocess/protocols/none.js +5 -3
- package/esm/commands/subprocess/protocols/none.js.map +1 -1
- package/esm/commands/subprocess/protocols/shell.d.ts +4 -4
- package/esm/commands/subprocess/protocols/shell.d.ts.map +1 -1
- package/esm/commands/subprocess/protocols/shell.js +6 -6
- package/esm/commands/subprocess/protocols/shell.js.map +1 -1
- package/esm/commands/subprocess/protocols/types.d.ts +7 -7
- package/esm/commands/subprocess/protocols/types.d.ts.map +1 -1
- package/esm/commands/sync/index.d.ts +1 -1
- package/esm/commands/sync/index.d.ts.map +1 -1
- package/esm/commands/sync/index.js +1 -1
- package/esm/commands/sync/index.js.map +1 -1
- package/esm/commands/sync/list.d.ts +2 -2
- package/esm/commands/sync/list.d.ts.map +1 -1
- package/esm/commands/sync/list.js +15 -43
- package/esm/commands/sync/list.js.map +1 -1
- package/esm/commands/sync/pull.d.ts +3 -2
- package/esm/commands/sync/pull.d.ts.map +1 -1
- package/esm/commands/sync/pull.js +15 -17
- package/esm/commands/sync/pull.js.map +1 -1
- package/esm/commands/sync/push.d.ts +2 -2
- package/esm/commands/sync/push.d.ts.map +1 -1
- package/esm/commands/sync/push.js +2 -5
- package/esm/commands/sync/push.js.map +1 -1
- package/esm/commands/sync/request.d.ts +1 -1
- package/esm/commands/sync/request.d.ts.map +1 -1
- package/esm/commands/sync/request.js +1 -1
- package/esm/commands/sync/request.js.map +1 -1
- package/esm/commands/sync/response.d.ts +4 -9
- package/esm/commands/sync/response.d.ts.map +1 -1
- package/esm/commands/sync/response.js +32 -23
- package/esm/commands/sync/response.js.map +1 -1
- package/esm/commands/sync/stat.d.ts +3 -3
- package/esm/commands/sync/stat.d.ts.map +1 -1
- package/esm/commands/sync/stat.js +13 -30
- package/esm/commands/sync/stat.js.map +1 -1
- package/esm/commands/sync/sync.d.ts +2 -2
- package/esm/commands/sync/sync.d.ts.map +1 -1
- package/esm/commands/sync/sync.js +7 -5
- package/esm/commands/sync/sync.js.map +1 -1
- package/esm/crypto.js +1 -1
- package/esm/crypto.js.map +1 -1
- package/esm/index.d.ts +0 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +0 -1
- package/esm/index.js.map +1 -1
- package/esm/packet.d.ts +1 -1
- package/esm/packet.d.ts.map +1 -1
- package/esm/packet.js +1 -1
- package/esm/packet.js.map +1 -1
- package/esm/socket/dispatcher.d.ts +8 -3
- package/esm/socket/dispatcher.d.ts.map +1 -1
- package/esm/socket/dispatcher.js +9 -4
- package/esm/socket/dispatcher.js.map +1 -1
- package/esm/socket/index.d.ts +1 -1
- package/esm/socket/index.d.ts.map +1 -1
- package/esm/socket/index.js +1 -1
- package/esm/socket/index.js.map +1 -1
- package/esm/socket/socket.d.ts +3 -3
- package/esm/socket/socket.d.ts.map +1 -1
- package/esm/socket/socket.js +3 -3
- package/esm/socket/socket.js.map +1 -1
- package/esm/utils/base64.d.ts +23 -0
- package/esm/utils/base64.d.ts.map +1 -1
- package/esm/utils/base64.js +6 -0
- package/esm/utils/base64.js.map +1 -1
- package/package.json +13 -14
- package/src/adb.ts +12 -7
- package/src/auth.ts +1 -0
- package/src/backend.ts +3 -2
- package/src/commands/base.ts +1 -0
- package/src/commands/framebuffer.ts +21 -16
- package/src/commands/install.ts +6 -4
- package/src/commands/power.ts +1 -1
- package/src/commands/reverse.ts +11 -10
- package/src/commands/subprocess/command.ts +131 -0
- package/src/commands/subprocess/index.ts +1 -137
- package/src/commands/subprocess/protocols/none.ts +9 -6
- package/src/commands/subprocess/protocols/shell.ts +11 -10
- package/src/commands/subprocess/protocols/types.ts +8 -7
- package/src/commands/sync/index.ts +1 -1
- package/src/commands/sync/list.ts +18 -50
- package/src/commands/sync/pull.ts +17 -18
- package/src/commands/sync/push.ts +4 -7
- package/src/commands/sync/request.ts +3 -2
- package/src/commands/sync/response.ts +43 -39
- package/src/commands/sync/stat.ts +17 -39
- package/src/commands/sync/sync.ts +13 -12
- package/src/crypto.ts +1 -1
- package/src/features.ts +1 -1
- package/src/index.ts +0 -1
- package/src/packet.ts +1 -1
- package/src/socket/dispatcher.ts +9 -4
- package/src/socket/index.ts +1 -1
- package/src/socket/socket.ts +5 -4
- package/src/utils/base64.ts +23 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/esm/stream/buffered.d.ts +0 -39
- package/esm/stream/buffered.d.ts.map +0 -1
- package/esm/stream/buffered.js +0 -143
- package/esm/stream/buffered.js.map +0 -1
- package/esm/stream/detect.d.ts +0 -2
- package/esm/stream/detect.d.ts.map +0 -1
- package/esm/stream/detect.js +0 -6
- package/esm/stream/detect.js.map +0 -1
- package/esm/stream/detect.native.d.ts +0 -240
- package/esm/stream/detect.native.d.ts.map +0 -1
- package/esm/stream/detect.native.js +0 -60
- package/esm/stream/detect.native.js.map +0 -1
- package/esm/stream/detect.polyfill.d.ts +0 -18
- package/esm/stream/detect.polyfill.d.ts.map +0 -1
- package/esm/stream/detect.polyfill.js +0 -4
- package/esm/stream/detect.polyfill.js.map +0 -1
- package/esm/stream/index.d.ts +0 -4
- package/esm/stream/index.d.ts.map +0 -1
- package/esm/stream/index.js +0 -4
- package/esm/stream/index.js.map +0 -1
- package/esm/stream/transform.d.ts +0 -124
- package/esm/stream/transform.d.ts.map +0 -1
- package/esm/stream/transform.js +0 -379
- package/esm/stream/transform.js.map +0 -1
- package/src/stream/buffered.ts +0 -168
- package/src/stream/detect.native.ts +0 -362
- package/src/stream/detect.polyfill.ts +0 -22
- package/src/stream/detect.ts +0 -7
- package/src/stream/index.ts +0 -3
- package/src/stream/transform.ts +0 -474
- package/tsconfig.test.json +0 -9
- package/web-streams-polyfill-4.0.0-beta.2.tgz +0 -0
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
/** A controller object that allows you to abort one or more DOM requests as and when desired. */
|
|
2
|
-
export interface AbortController {
|
|
3
|
-
/**
|
|
4
|
-
* Returns the AbortSignal object associated with this object.
|
|
5
|
-
*/
|
|
6
|
-
readonly signal: AbortSignal;
|
|
7
|
-
/**
|
|
8
|
-
* Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
|
|
9
|
-
*/
|
|
10
|
-
abort(): void;
|
|
11
|
-
}
|
|
12
|
-
export interface AbortSignalEventMap {
|
|
13
|
-
"abort": any;
|
|
14
|
-
}
|
|
15
|
-
export interface EventListenerOptions {
|
|
16
|
-
capture?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export interface AddEventListenerOptions extends EventListenerOptions {
|
|
19
|
-
once?: boolean;
|
|
20
|
-
passive?: boolean;
|
|
21
|
-
signal?: AbortSignal;
|
|
22
|
-
}
|
|
23
|
-
/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
|
|
24
|
-
export interface AbortSignal {
|
|
25
|
-
/**
|
|
26
|
-
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
|
|
27
|
-
*/
|
|
28
|
-
readonly aborted: boolean;
|
|
29
|
-
onabort: ((this: AbortSignal, ev: any) => any) | null;
|
|
30
|
-
addEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
31
|
-
addEventListener(type: string, listener: (ev: any) => void, options?: boolean | AddEventListenerOptions): void;
|
|
32
|
-
removeEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
33
|
-
removeEventListener(type: string, listener: (ev: any) => void, options?: boolean | EventListenerOptions): void;
|
|
34
|
-
}
|
|
35
|
-
export declare let AbortController: {
|
|
36
|
-
prototype: AbortController;
|
|
37
|
-
new (): AbortController;
|
|
38
|
-
};
|
|
39
|
-
export declare let AbortSignal: {
|
|
40
|
-
prototype: AbortSignal;
|
|
41
|
-
new (): AbortSignal;
|
|
42
|
-
};
|
|
43
|
-
export interface QueuingStrategy<T = any> {
|
|
44
|
-
highWaterMark?: number;
|
|
45
|
-
size?: QueuingStrategySize<T>;
|
|
46
|
-
}
|
|
47
|
-
export interface QueuingStrategyInit {
|
|
48
|
-
/**
|
|
49
|
-
* Creates a new ByteLengthQueuingStrategy with the provided high water mark.
|
|
50
|
-
*
|
|
51
|
-
* Note that the provided high water mark will not be validated ahead of time. Instead, if it is negative, NaN, or not a number, the resulting ByteLengthQueuingStrategy will cause the corresponding stream constructor to throw.
|
|
52
|
-
*/
|
|
53
|
-
highWaterMark: number;
|
|
54
|
-
}
|
|
55
|
-
export interface ReadableStreamDefaultReadDoneResult {
|
|
56
|
-
done: true;
|
|
57
|
-
value?: undefined;
|
|
58
|
-
}
|
|
59
|
-
export interface ReadableStreamDefaultReadValueResult<T> {
|
|
60
|
-
done: false;
|
|
61
|
-
value: T;
|
|
62
|
-
}
|
|
63
|
-
export interface ReadableWritablePair<R = any, W = any> {
|
|
64
|
-
readable: ReadableStream<R>;
|
|
65
|
-
/**
|
|
66
|
-
* Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use.
|
|
67
|
-
*
|
|
68
|
-
* Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
|
|
69
|
-
*/
|
|
70
|
-
writable: WritableStream<W>;
|
|
71
|
-
}
|
|
72
|
-
export interface StreamPipeOptions {
|
|
73
|
-
preventAbort?: boolean;
|
|
74
|
-
preventCancel?: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
|
|
77
|
-
*
|
|
78
|
-
* Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
|
|
79
|
-
*
|
|
80
|
-
* Errors and closures of the source and destination streams propagate as follows:
|
|
81
|
-
*
|
|
82
|
-
* An error in this source readable stream will abort destination, unless preventAbort is truthy. The returned promise will be rejected with the source's error, or with any error that occurs during aborting the destination.
|
|
83
|
-
*
|
|
84
|
-
* An error in destination will cancel this source readable stream, unless preventCancel is truthy. The returned promise will be rejected with the destination's error, or with any error that occurs during canceling the source.
|
|
85
|
-
*
|
|
86
|
-
* When this source readable stream closes, destination will be closed, unless preventClose is truthy. The returned promise will be fulfilled once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.
|
|
87
|
-
*
|
|
88
|
-
* If destination starts out closed or closing, this source readable stream will be canceled, unless preventCancel is true. The returned promise will be rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.
|
|
89
|
-
*
|
|
90
|
-
* The signal option can be set to an AbortSignal to allow aborting an ongoing pipe operation via the corresponding AbortController. In this case, this source readable stream will be canceled, and destination aborted, unless the respective options preventCancel or preventAbort are set.
|
|
91
|
-
*/
|
|
92
|
-
preventClose?: boolean;
|
|
93
|
-
signal?: AbortSignal;
|
|
94
|
-
}
|
|
95
|
-
export interface Transformer<I = any, O = any> {
|
|
96
|
-
flush?: TransformerFlushCallback<O>;
|
|
97
|
-
readableType?: undefined;
|
|
98
|
-
start?: TransformerStartCallback<O>;
|
|
99
|
-
transform?: TransformerTransformCallback<I, O>;
|
|
100
|
-
writableType?: undefined;
|
|
101
|
-
}
|
|
102
|
-
/** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */
|
|
103
|
-
export interface ReadableStream<R = any> {
|
|
104
|
-
readonly locked: boolean;
|
|
105
|
-
cancel(reason?: any): Promise<void>;
|
|
106
|
-
getReader(): ReadableStreamDefaultReader<R>;
|
|
107
|
-
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
|
|
108
|
-
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
|
|
109
|
-
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
110
|
-
}
|
|
111
|
-
export declare let ReadableStream: {
|
|
112
|
-
prototype: ReadableStream;
|
|
113
|
-
new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
|
|
114
|
-
};
|
|
115
|
-
export interface ReadableStreamDefaultController<R = any> {
|
|
116
|
-
readonly desiredSize: number | null;
|
|
117
|
-
close(): void;
|
|
118
|
-
enqueue(chunk?: R): void;
|
|
119
|
-
error(e?: any): void;
|
|
120
|
-
}
|
|
121
|
-
export declare let ReadableStreamDefaultController: {
|
|
122
|
-
prototype: ReadableStreamDefaultController;
|
|
123
|
-
new (): ReadableStreamDefaultController;
|
|
124
|
-
};
|
|
125
|
-
export interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
|
|
126
|
-
read(): Promise<ReadableStreamDefaultReadResult<R>>;
|
|
127
|
-
releaseLock(): void;
|
|
128
|
-
}
|
|
129
|
-
export declare let ReadableStreamDefaultReader: {
|
|
130
|
-
prototype: ReadableStreamDefaultReader;
|
|
131
|
-
new <R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
|
|
132
|
-
};
|
|
133
|
-
export interface ReadableStreamGenericReader {
|
|
134
|
-
readonly closed: Promise<undefined>;
|
|
135
|
-
cancel(reason?: any): Promise<void>;
|
|
136
|
-
}
|
|
137
|
-
export interface TransformStream<I = any, O = any> {
|
|
138
|
-
readonly readable: ReadableStream<O>;
|
|
139
|
-
readonly writable: WritableStream<I>;
|
|
140
|
-
}
|
|
141
|
-
export declare let TransformStream: {
|
|
142
|
-
prototype: TransformStream;
|
|
143
|
-
new <I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
|
|
144
|
-
};
|
|
145
|
-
export interface TransformStreamDefaultController<O = any> {
|
|
146
|
-
readonly desiredSize: number | null;
|
|
147
|
-
enqueue(chunk?: O): void;
|
|
148
|
-
error(reason?: any): void;
|
|
149
|
-
terminate(): void;
|
|
150
|
-
}
|
|
151
|
-
export declare let TransformStreamDefaultController: {
|
|
152
|
-
prototype: TransformStreamDefaultController;
|
|
153
|
-
new (): TransformStreamDefaultController;
|
|
154
|
-
};
|
|
155
|
-
/** This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing. */
|
|
156
|
-
export interface WritableStream<W = any> {
|
|
157
|
-
readonly locked: boolean;
|
|
158
|
-
abort(reason?: any): Promise<void>;
|
|
159
|
-
close(): Promise<void>;
|
|
160
|
-
getWriter(): WritableStreamDefaultWriter<W>;
|
|
161
|
-
}
|
|
162
|
-
export declare let WritableStream: {
|
|
163
|
-
prototype: WritableStream;
|
|
164
|
-
new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
|
|
165
|
-
};
|
|
166
|
-
/** This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate. */
|
|
167
|
-
export interface WritableStreamDefaultController {
|
|
168
|
-
error(e?: any): void;
|
|
169
|
-
}
|
|
170
|
-
export declare let WritableStreamDefaultController: {
|
|
171
|
-
prototype: WritableStreamDefaultController;
|
|
172
|
-
new (): WritableStreamDefaultController;
|
|
173
|
-
};
|
|
174
|
-
/** This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink. */
|
|
175
|
-
export interface WritableStreamDefaultWriter<W = any> {
|
|
176
|
-
readonly closed: Promise<undefined>;
|
|
177
|
-
readonly desiredSize: number | null;
|
|
178
|
-
readonly ready: Promise<undefined>;
|
|
179
|
-
abort(reason?: any): Promise<void>;
|
|
180
|
-
close(): Promise<void>;
|
|
181
|
-
releaseLock(): void;
|
|
182
|
-
write(chunk?: W): Promise<void>;
|
|
183
|
-
}
|
|
184
|
-
export declare let WritableStreamDefaultWriter: {
|
|
185
|
-
prototype: WritableStreamDefaultWriter;
|
|
186
|
-
new <W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
|
|
187
|
-
};
|
|
188
|
-
export interface QueuingStrategySize<T = any> {
|
|
189
|
-
(chunk: T): number;
|
|
190
|
-
}
|
|
191
|
-
export interface TransformerFlushCallback<O> {
|
|
192
|
-
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
|
|
193
|
-
}
|
|
194
|
-
export interface TransformerStartCallback<O> {
|
|
195
|
-
(controller: TransformStreamDefaultController<O>): any;
|
|
196
|
-
}
|
|
197
|
-
export interface TransformerTransformCallback<I, O> {
|
|
198
|
-
(chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
|
|
199
|
-
}
|
|
200
|
-
export interface UnderlyingSink<W = any> {
|
|
201
|
-
abort?: UnderlyingSinkAbortCallback;
|
|
202
|
-
close?: UnderlyingSinkCloseCallback;
|
|
203
|
-
start?: UnderlyingSinkStartCallback;
|
|
204
|
-
type?: undefined;
|
|
205
|
-
write?: UnderlyingSinkWriteCallback<W>;
|
|
206
|
-
}
|
|
207
|
-
export interface UnderlyingSource<R = any> {
|
|
208
|
-
cancel?: UnderlyingSourceCancelCallback;
|
|
209
|
-
pull?: UnderlyingSourcePullCallback<R> | undefined;
|
|
210
|
-
start?: UnderlyingSourceStartCallback<R>;
|
|
211
|
-
type?: undefined;
|
|
212
|
-
}
|
|
213
|
-
export interface UnderlyingSinkAbortCallback {
|
|
214
|
-
(reason?: any): void | PromiseLike<void>;
|
|
215
|
-
}
|
|
216
|
-
export interface UnderlyingSinkCloseCallback {
|
|
217
|
-
(): void | PromiseLike<void>;
|
|
218
|
-
}
|
|
219
|
-
export interface UnderlyingSinkStartCallback {
|
|
220
|
-
(controller: WritableStreamDefaultController): any;
|
|
221
|
-
}
|
|
222
|
-
export interface UnderlyingSinkWriteCallback<W> {
|
|
223
|
-
(chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
|
|
224
|
-
}
|
|
225
|
-
export interface UnderlyingSourceCancelCallback {
|
|
226
|
-
(reason?: any): void | PromiseLike<void>;
|
|
227
|
-
}
|
|
228
|
-
export interface UnderlyingSourcePullCallback<R> {
|
|
229
|
-
(controller: ReadableStreamController<R>): void | PromiseLike<void>;
|
|
230
|
-
}
|
|
231
|
-
export interface UnderlyingSourceStartCallback<R> {
|
|
232
|
-
(controller: ReadableStreamController<R>): any;
|
|
233
|
-
}
|
|
234
|
-
export declare type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
|
|
235
|
-
export declare type ReadableStreamDefaultReadResult<T> = ReadableStreamDefaultReadValueResult<T> | ReadableStreamDefaultReadDoneResult;
|
|
236
|
-
export declare type ReadableStreamReader<T> = ReadableStreamDefaultReader<T>;
|
|
237
|
-
export interface ReadableStreamIteratorOptions {
|
|
238
|
-
preventCancel?: boolean;
|
|
239
|
-
}
|
|
240
|
-
//# sourceMappingURL=detect.native.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"detect.native.d.ts","sourceRoot":"","sources":["../../src/stream/detect.native.ts"],"names":[],"mappings":"AAaA,iGAAiG;AACjG,MAAM,WAAW,eAAe;IAC5B;;OAEG;IAEH,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;CACjB;AAGD,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE,GAAG,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,uBAAwB,SAAQ,oBAAoB;IACjE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,WAAW,CAAC;CACxB;AAED,kJAAkJ;AAClJ,MAAM,WAAW,WAAW;IACxB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC;IACtD,gBAAgB,CAAC,CAAC,SAAS,MAAM,mBAAmB,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,OAAO,CAA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AAC,CAAC;IAC1C,CAAC,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,+BAA+B,GAAG,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;CACrF;AAED,MAAM,WAAW,8BAA8B;IAC3C,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,4BAA4B,CAAC,CAAC;IAC3C,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;CACvE;AAED,MAAM,WAAW,6BAA6B,CAAC,CAAC;IAC5C,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;CAClD;AAGD,oBAAY,wBAAwB,CAAC,CAAC,IAAI,+BAA+B,CAAC,CAAC,CAAC,CAAC;AAC7E,oBAAY,+BAA+B,CAAC,CAAC,IAAI,oCAAoC,CAAC,CAAC,CAAC,GAAG,mCAAmC,CAAC;AAC/H,oBAAY,oBAAoB,CAAC,CAAC,IAAI,2BAA2B,CAAC,CAAC,CAAC,CAAC;AAGrE,MAAM,WAAW,6BAA6B;IAC1C,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// cspell: ignore chainable
|
|
2
|
-
// cspell: ignore backpressure
|
|
3
|
-
// cspell: ignore endregion
|
|
4
|
-
export let AbortController;
|
|
5
|
-
export let AbortSignal;
|
|
6
|
-
({ AbortController, AbortSignal } = globalThis);
|
|
7
|
-
export let ReadableStream;
|
|
8
|
-
export let ReadableStreamDefaultController;
|
|
9
|
-
export let ReadableStreamDefaultReader;
|
|
10
|
-
export let TransformStream;
|
|
11
|
-
export let TransformStreamDefaultController;
|
|
12
|
-
export let WritableStream;
|
|
13
|
-
export let WritableStreamDefaultController;
|
|
14
|
-
export let WritableStreamDefaultWriter;
|
|
15
|
-
// This library can't use `@types/node` or `lib: dom`
|
|
16
|
-
// because they will pollute the global scope
|
|
17
|
-
// So `ReadableStream`, `WritableStream` and `TransformStream` are not available
|
|
18
|
-
if ('ReadableStream' in globalThis && 'WritableStream' in globalThis && 'TransformStream' in globalThis) {
|
|
19
|
-
({
|
|
20
|
-
ReadableStream,
|
|
21
|
-
ReadableStreamDefaultController,
|
|
22
|
-
ReadableStreamDefaultReader,
|
|
23
|
-
TransformStream,
|
|
24
|
-
TransformStreamDefaultController,
|
|
25
|
-
WritableStream,
|
|
26
|
-
WritableStreamDefaultController,
|
|
27
|
-
WritableStreamDefaultWriter,
|
|
28
|
-
} = globalThis);
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
try {
|
|
32
|
-
// // Node.js 16 has Web Streams types in `stream/web` module
|
|
33
|
-
({
|
|
34
|
-
// @ts-ignore
|
|
35
|
-
ReadableStream,
|
|
36
|
-
// @ts-ignore
|
|
37
|
-
ReadableStreamDefaultController,
|
|
38
|
-
// @ts-ignore
|
|
39
|
-
ReadableStreamDefaultReader,
|
|
40
|
-
// @ts-ignore
|
|
41
|
-
TransformStream,
|
|
42
|
-
// @ts-ignore
|
|
43
|
-
TransformStreamDefaultController,
|
|
44
|
-
// @ts-ignore
|
|
45
|
-
WritableStream,
|
|
46
|
-
// @ts-ignore
|
|
47
|
-
WritableStreamDefaultController,
|
|
48
|
-
// @ts-ignore
|
|
49
|
-
WritableStreamDefaultWriter,
|
|
50
|
-
// @ts-ignore
|
|
51
|
-
} = await import(/* webpackIgnore: true */ 'stream/web'));
|
|
52
|
-
}
|
|
53
|
-
catch { }
|
|
54
|
-
}
|
|
55
|
-
// TODO: stream/detect: Load some polyfills
|
|
56
|
-
// @ts-ignore
|
|
57
|
-
if (!ReadableStream || !WritableStream || !TransformStream) {
|
|
58
|
-
// throw new Error('Web Streams API is not available');
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=detect.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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ACb,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,IAAI,CAAC,eAAe,EAAE;IACxD,uDAAuD;CAC1D"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { AbortSignal } from "web-streams-polyfill";
|
|
2
|
-
export * from 'web-streams-polyfill';
|
|
3
|
-
/** A controller object that allows you to abort one or more DOM requests as and when desired. */
|
|
4
|
-
export interface AbortController {
|
|
5
|
-
/**
|
|
6
|
-
* Returns the AbortSignal object associated with this object.
|
|
7
|
-
*/
|
|
8
|
-
readonly signal: AbortSignal;
|
|
9
|
-
/**
|
|
10
|
-
* Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
|
|
11
|
-
*/
|
|
12
|
-
abort(reason?: any): void;
|
|
13
|
-
}
|
|
14
|
-
export declare let AbortController: {
|
|
15
|
-
prototype: AbortController;
|
|
16
|
-
new (): AbortController;
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=detect.polyfill.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"detect.polyfill.d.ts","sourceRoot":"","sources":["../../src/stream/detect.polyfill.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,cAAc,sBAAsB,CAAC;AAErC,iGAAiG;AACjG,MAAM,WAAW,eAAe;IAC5B;;OAEG;IAEH,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;CAC7B;AAED,eAAO,IAAI,eAAe,EAAE;IACxB,SAAS,EAAE,eAAe,CAAC;IAC3B,QAAO,eAAe,CAAC;CAC1B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"detect.polyfill.js","sourceRoot":"","sources":["../../src/stream/detect.polyfill.ts"],"names":[],"mappings":"AACA,cAAc,sBAAsB,CAAC;AAerC,MAAM,CAAC,IAAI,eAGV,CAAC;AAEF,CAAC,EAAE,eAAe,EAAE,GAAG,UAAiB,CAAC,CAAC"}
|
package/esm/stream/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stream/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
package/esm/stream/index.js
DELETED
package/esm/stream/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/stream/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import type Struct from "@yume-chan/struct";
|
|
2
|
-
import type { StructValueType, ValueOrPromise } from "@yume-chan/struct";
|
|
3
|
-
import { AbortSignal, ReadableStream, TransformStream, WritableStream, type QueuingStrategy, type ReadableStreamDefaultController, type ReadableWritablePair } from "./detect.js";
|
|
4
|
-
export interface DuplexStreamFactoryOptions {
|
|
5
|
-
/**
|
|
6
|
-
* Callback when any `ReadableStream` is cancelled (the user doesn't need any more data),
|
|
7
|
-
* or `WritableStream` is ended (the user won't produce any more data),
|
|
8
|
-
* or `DuplexStreamFactory#close` is called.
|
|
9
|
-
*
|
|
10
|
-
* Usually you want to let the other peer know that the duplex stream should be clsoed.
|
|
11
|
-
*
|
|
12
|
-
* `dispose` will automatically be called after `close` completes,
|
|
13
|
-
* but if you want to wait another peer for a close confirmation and call
|
|
14
|
-
* `DuplexStreamFactory#dispose` yourself, you can return `false`
|
|
15
|
-
* (or a `Promise` that resolves to `false`) to disable the automatic call.
|
|
16
|
-
*/
|
|
17
|
-
close?: (() => ValueOrPromise<boolean | void>) | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* Callback when any `ReadableStream` is closed (the other peer doesn't produce any more data),
|
|
20
|
-
* or `WritableStream` is aborted (the other peer can't receive any more data),
|
|
21
|
-
* or `DuplexStreamFactory#abort` is called.
|
|
22
|
-
*
|
|
23
|
-
* Usually indicates the other peer has closed the duplex stream. You can clean up
|
|
24
|
-
* any resources you have allocated now.
|
|
25
|
-
*/
|
|
26
|
-
dispose?: (() => void | Promise<void>) | undefined;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* A factory for creating a duplex stream.
|
|
30
|
-
*
|
|
31
|
-
* It can create multiple `ReadableStream`s and `WritableStream`s,
|
|
32
|
-
* when any of them is closed, all other streams will be closed as well.
|
|
33
|
-
*/
|
|
34
|
-
export declare class DuplexStreamFactory<R, W> {
|
|
35
|
-
private readableControllers;
|
|
36
|
-
private writers;
|
|
37
|
-
private _writableClosed;
|
|
38
|
-
get writableClosed(): boolean;
|
|
39
|
-
private _closed;
|
|
40
|
-
get closed(): Promise<void>;
|
|
41
|
-
private options;
|
|
42
|
-
constructor(options?: DuplexStreamFactoryOptions);
|
|
43
|
-
wrapReadable(readable: ReadableStream<R>): WrapReadableStream<R>;
|
|
44
|
-
createWritable(stream: WritableStream<W>): WritableStream<W>;
|
|
45
|
-
close(): Promise<void>;
|
|
46
|
-
dispose(): Promise<void>;
|
|
47
|
-
}
|
|
48
|
-
export declare class DecodeUtf8Stream extends TransformStream<Uint8Array, string> {
|
|
49
|
-
constructor();
|
|
50
|
-
}
|
|
51
|
-
export declare class GatherStringStream extends WritableStream<string> {
|
|
52
|
-
private _result;
|
|
53
|
-
get result(): string;
|
|
54
|
-
constructor();
|
|
55
|
-
}
|
|
56
|
-
export declare class StructDeserializeStream<T extends Struct<any, any, any, any>> implements ReadableWritablePair<Uint8Array, StructValueType<T>> {
|
|
57
|
-
private _readable;
|
|
58
|
-
get readable(): ReadableStream<Awaited<ReturnType<T["deserialize"]>>>;
|
|
59
|
-
private _writable;
|
|
60
|
-
get writable(): WritableStream<Uint8Array>;
|
|
61
|
-
constructor(struct: T);
|
|
62
|
-
}
|
|
63
|
-
export declare class StructSerializeStream<T extends Struct<any, any, any, any>> extends TransformStream<T['TInit'], Uint8Array> {
|
|
64
|
-
constructor(struct: T);
|
|
65
|
-
}
|
|
66
|
-
export declare type WrapWritableStreamStart<T> = () => ValueOrPromise<WritableStream<T>>;
|
|
67
|
-
export interface WritableStreamWrapper<T> {
|
|
68
|
-
start: WrapWritableStreamStart<T>;
|
|
69
|
-
close?(): Promise<void>;
|
|
70
|
-
}
|
|
71
|
-
export declare class WrapWritableStream<T> extends WritableStream<T> {
|
|
72
|
-
writable: WritableStream<T>;
|
|
73
|
-
private writer;
|
|
74
|
-
constructor(wrapper: WritableStream<T> | WrapWritableStreamStart<T> | WritableStreamWrapper<T>);
|
|
75
|
-
}
|
|
76
|
-
export declare type WrapReadableStreamStart<T> = (controller: ReadableStreamDefaultController<T>) => ValueOrPromise<ReadableStream<T>>;
|
|
77
|
-
export interface ReadableStreamWrapper<T> {
|
|
78
|
-
start: WrapReadableStreamStart<T>;
|
|
79
|
-
cancel?(reason?: any): ValueOrPromise<void>;
|
|
80
|
-
close?(): ValueOrPromise<void>;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* This class has multiple usages:
|
|
84
|
-
*
|
|
85
|
-
* 1. Get notified when the stream is cancelled or closed.
|
|
86
|
-
* 2. Synchronously create a `ReadableStream` by asynchronously return another `ReadableStream`.
|
|
87
|
-
* 3. Convert native `ReadableStream`s to polyfilled ones so they can `pipe` between.
|
|
88
|
-
*/
|
|
89
|
-
export declare class WrapReadableStream<T> extends ReadableStream<T> {
|
|
90
|
-
readable: ReadableStream<T>;
|
|
91
|
-
private reader;
|
|
92
|
-
constructor(wrapper: ReadableStream<T> | WrapReadableStreamStart<T> | ReadableStreamWrapper<T>);
|
|
93
|
-
}
|
|
94
|
-
export declare class ChunkStream extends TransformStream<Uint8Array, Uint8Array> {
|
|
95
|
-
constructor(size: number);
|
|
96
|
-
}
|
|
97
|
-
export declare class SplitLineStream extends TransformStream<string, string> {
|
|
98
|
-
constructor();
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Create a new `WritableStream` that, when written to, will write that chunk to
|
|
102
|
-
* `pair.writable`, when pipe `pair.readable` to `writable`.
|
|
103
|
-
*
|
|
104
|
-
* It's the opposite of `ReadableStream.pipeThrough`.
|
|
105
|
-
*
|
|
106
|
-
* @param writable The `WritableStream` to write to.
|
|
107
|
-
* @param pair A `TransformStream` that converts chunks.
|
|
108
|
-
* @returns A new `WritableStream`.
|
|
109
|
-
*/
|
|
110
|
-
export declare function pipeFrom<W, T>(writable: WritableStream<W>, pair: ReadableWritablePair<W, T>): WritableStream<T>;
|
|
111
|
-
export declare class InspectStream<T> extends TransformStream<T, T> {
|
|
112
|
-
constructor(callback: (value: T) => void);
|
|
113
|
-
}
|
|
114
|
-
export interface PushReadableStreamController<T> {
|
|
115
|
-
abortSignal: AbortSignal;
|
|
116
|
-
enqueue(chunk: T): Promise<void>;
|
|
117
|
-
close(): void;
|
|
118
|
-
error(e?: any): void;
|
|
119
|
-
}
|
|
120
|
-
export declare type PushReadableStreamSource<T> = (controller: PushReadableStreamController<T>) => void;
|
|
121
|
-
export declare class PushReadableStream<T> extends ReadableStream<T> {
|
|
122
|
-
constructor(source: PushReadableStreamSource<T>, strategy?: QueuingStrategy<T>);
|
|
123
|
-
}
|
|
124
|
-
//# sourceMappingURL=transform.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/stream/transform.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGzE,OAAO,EAAmB,WAAW,EAAE,cAAc,EAA+B,eAAe,EAAE,cAAc,EAA+B,KAAK,eAAe,EAAE,KAAK,+BAA+B,EAAE,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