@gjsify/web-streams 0.1.0
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/README.md +30 -0
- package/lib/esm/index.js +121 -0
- package/lib/esm/queuing-strategies.js +56 -0
- package/lib/esm/readable-stream.js +1064 -0
- package/lib/esm/text-decoder-stream.js +126 -0
- package/lib/esm/text-encoder-stream.js +46 -0
- package/lib/esm/transform-stream.js +336 -0
- package/lib/esm/util.js +161 -0
- package/lib/esm/writable-stream.js +676 -0
- package/lib/types/index.d.ts +77 -0
- package/lib/types/queuing-strategies.d.ts +18 -0
- package/lib/types/readable-stream.d.ts +61 -0
- package/lib/types/text-decoder-stream.d.ts +16 -0
- package/lib/types/text-encoder-stream.d.ts +15 -0
- package/lib/types/transform-stream.d.ts +21 -0
- package/lib/types/util.d.ts +40 -0
- package/lib/types/writable-stream.d.ts +49 -0
- package/package.json +44 -0
- package/src/index.spec.ts +2043 -0
- package/src/index.ts +131 -0
- package/src/queuing-strategies.ts +67 -0
- package/src/readable-stream.ts +1337 -0
- package/src/test.mts +6 -0
- package/src/text-decoder-stream.ts +183 -0
- package/src/text-encoder-stream.ts +62 -0
- package/src/transform-stream.ts +410 -0
- package/src/util.ts +170 -0
- package/src/writable-stream.ts +773 -0
- package/tsconfig.json +32 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ReadableStream } from './readable-stream.js';
|
|
2
|
+
import { TransformStream } from './transform-stream.js';
|
|
3
|
+
import { TextEncoderStream } from './text-encoder-stream.js';
|
|
4
|
+
declare const _ReadableStream: typeof ReadableStream | {
|
|
5
|
+
new (underlyingSource: UnderlyingByteSource, strategy?: {
|
|
6
|
+
highWaterMark?: number;
|
|
7
|
+
}): globalThis.ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
8
|
+
new <R = any>(underlyingSource: UnderlyingDefaultSource<R>, strategy?: QueuingStrategy<R>): globalThis.ReadableStream<R>;
|
|
9
|
+
new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): globalThis.ReadableStream<R>;
|
|
10
|
+
prototype: globalThis.ReadableStream;
|
|
11
|
+
};
|
|
12
|
+
declare const _WritableStream: {
|
|
13
|
+
new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): globalThis.WritableStream<W>;
|
|
14
|
+
prototype: globalThis.WritableStream;
|
|
15
|
+
};
|
|
16
|
+
declare const _TransformStream: typeof TransformStream | {
|
|
17
|
+
new <I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): globalThis.TransformStream<I, O>;
|
|
18
|
+
prototype: globalThis.TransformStream;
|
|
19
|
+
};
|
|
20
|
+
declare const _ByteLengthQueuingStrategy: {
|
|
21
|
+
new (init: QueuingStrategyInit): globalThis.ByteLengthQueuingStrategy;
|
|
22
|
+
prototype: globalThis.ByteLengthQueuingStrategy;
|
|
23
|
+
};
|
|
24
|
+
declare const _CountQueuingStrategy: {
|
|
25
|
+
new (init: QueuingStrategyInit): globalThis.CountQueuingStrategy;
|
|
26
|
+
prototype: globalThis.CountQueuingStrategy;
|
|
27
|
+
};
|
|
28
|
+
declare const _TextEncoderStream: typeof TextEncoderStream | {
|
|
29
|
+
new (): globalThis.TextEncoderStream;
|
|
30
|
+
prototype: globalThis.TextEncoderStream;
|
|
31
|
+
};
|
|
32
|
+
declare const _TextDecoderStream: {
|
|
33
|
+
new (label?: string, options?: TextDecoderOptions): globalThis.TextDecoderStream;
|
|
34
|
+
prototype: globalThis.TextDecoderStream;
|
|
35
|
+
};
|
|
36
|
+
export { _WritableStream as WritableStream, _ReadableStream as ReadableStream, _TransformStream as TransformStream, _ByteLengthQueuingStrategy as ByteLengthQueuingStrategy, _CountQueuingStrategy as CountQueuingStrategy, _TextEncoderStream as TextEncoderStream, _TextDecoderStream as TextDecoderStream, };
|
|
37
|
+
export { WritableStreamDefaultWriter, WritableStreamDefaultController } from './writable-stream.js';
|
|
38
|
+
export { ReadableStreamDefaultReader, ReadableStreamDefaultController } from './readable-stream.js';
|
|
39
|
+
export { TransformStreamDefaultController } from './transform-stream.js';
|
|
40
|
+
export { isWritableStream, isWritableStreamLocked, writableStreamAbort, writableStreamClose, writableStreamCloseQueuedOrInFlight, writableStreamDefaultWriterCloseWithErrorPropagation, writableStreamDefaultControllerErrorIfNeeded, createWritableStream, } from './writable-stream.js';
|
|
41
|
+
export { isReadableStream, isReadableStreamLocked, readableStreamCancel, readableStreamClose, readableStreamError, readableStreamDefaultControllerClose, readableStreamDefaultControllerEnqueue, readableStreamDefaultControllerError, readableStreamDefaultControllerGetDesiredSize, readableStreamDefaultControllerCanCloseOrEnqueue, readableStreamDefaultControllerHasBackpressure, setupReadableStreamDefaultController, createReadableStream, } from './readable-stream.js';
|
|
42
|
+
export { isTransformStream, isTransformStreamDefaultController, } from './transform-stream.js';
|
|
43
|
+
declare const _default: {
|
|
44
|
+
WritableStream: {
|
|
45
|
+
new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): globalThis.WritableStream<W>;
|
|
46
|
+
prototype: globalThis.WritableStream;
|
|
47
|
+
};
|
|
48
|
+
ReadableStream: typeof ReadableStream | {
|
|
49
|
+
new (underlyingSource: UnderlyingByteSource, strategy?: {
|
|
50
|
+
highWaterMark?: number;
|
|
51
|
+
}): globalThis.ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
52
|
+
new <R = any>(underlyingSource: UnderlyingDefaultSource<R>, strategy?: QueuingStrategy<R>): globalThis.ReadableStream<R>;
|
|
53
|
+
new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): globalThis.ReadableStream<R>;
|
|
54
|
+
prototype: globalThis.ReadableStream;
|
|
55
|
+
};
|
|
56
|
+
TransformStream: typeof TransformStream | {
|
|
57
|
+
new <I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): globalThis.TransformStream<I, O>;
|
|
58
|
+
prototype: globalThis.TransformStream;
|
|
59
|
+
};
|
|
60
|
+
ByteLengthQueuingStrategy: {
|
|
61
|
+
new (init: QueuingStrategyInit): globalThis.ByteLengthQueuingStrategy;
|
|
62
|
+
prototype: globalThis.ByteLengthQueuingStrategy;
|
|
63
|
+
};
|
|
64
|
+
CountQueuingStrategy: {
|
|
65
|
+
new (init: QueuingStrategyInit): globalThis.CountQueuingStrategy;
|
|
66
|
+
prototype: globalThis.CountQueuingStrategy;
|
|
67
|
+
};
|
|
68
|
+
TextEncoderStream: typeof TextEncoderStream | {
|
|
69
|
+
new (): globalThis.TextEncoderStream;
|
|
70
|
+
prototype: globalThis.TextEncoderStream;
|
|
71
|
+
};
|
|
72
|
+
TextDecoderStream: {
|
|
73
|
+
new (label?: string, options?: TextDecoderOptions): globalThis.TextDecoderStream;
|
|
74
|
+
prototype: globalThis.TextDecoderStream;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare class ByteLengthQueuingStrategy {
|
|
2
|
+
#private;
|
|
3
|
+
constructor(init: {
|
|
4
|
+
highWaterMark: number;
|
|
5
|
+
});
|
|
6
|
+
get highWaterMark(): number;
|
|
7
|
+
get size(): (chunk: any) => number;
|
|
8
|
+
get [Symbol.toStringTag](): string;
|
|
9
|
+
}
|
|
10
|
+
export declare class CountQueuingStrategy {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(init: {
|
|
13
|
+
highWaterMark: number;
|
|
14
|
+
});
|
|
15
|
+
get highWaterMark(): number;
|
|
16
|
+
get size(): (chunk: any) => number;
|
|
17
|
+
get [Symbol.toStringTag](): string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { kState, kType } from './util.js';
|
|
2
|
+
declare const kCancel: unique symbol;
|
|
3
|
+
declare const kPull: unique symbol;
|
|
4
|
+
declare const kRelease: unique symbol;
|
|
5
|
+
declare class ReadableStream {
|
|
6
|
+
[kType]: string;
|
|
7
|
+
[kState]: any;
|
|
8
|
+
constructor(source?: any, strategy?: any);
|
|
9
|
+
get locked(): boolean;
|
|
10
|
+
static from(iterable: unknown): ReadableStream;
|
|
11
|
+
cancel(reason?: unknown): Promise<void>;
|
|
12
|
+
getReader(options?: any): ReadableStreamDefaultReader;
|
|
13
|
+
pipeThrough(transform: any, options?: any): ReadableStream;
|
|
14
|
+
pipeTo(destination: any, options?: any): Promise<void>;
|
|
15
|
+
tee(): [ReadableStream, ReadableStream];
|
|
16
|
+
values(options?: any): AsyncIterableIterator<any>;
|
|
17
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<any>;
|
|
18
|
+
get [Symbol.toStringTag](): string;
|
|
19
|
+
}
|
|
20
|
+
declare class ReadableStreamDefaultReader {
|
|
21
|
+
[kType]: string;
|
|
22
|
+
[kState]: any;
|
|
23
|
+
constructor(stream: ReadableStream);
|
|
24
|
+
read(): Promise<{
|
|
25
|
+
value: any;
|
|
26
|
+
done: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
releaseLock(): void;
|
|
29
|
+
get closed(): Promise<void>;
|
|
30
|
+
cancel(reason?: unknown): Promise<void>;
|
|
31
|
+
get [Symbol.toStringTag](): string;
|
|
32
|
+
}
|
|
33
|
+
declare class ReadableStreamDefaultController {
|
|
34
|
+
[kType]: string;
|
|
35
|
+
[kState]: any;
|
|
36
|
+
constructor(skipThrowSymbol?: symbol);
|
|
37
|
+
get desiredSize(): number | null;
|
|
38
|
+
close(): void;
|
|
39
|
+
enqueue(chunk?: any): void;
|
|
40
|
+
error(error?: unknown): void;
|
|
41
|
+
[kCancel](reason: unknown): Promise<void>;
|
|
42
|
+
[kPull](readRequest: any): void;
|
|
43
|
+
[kRelease](): void;
|
|
44
|
+
get [Symbol.toStringTag](): string;
|
|
45
|
+
}
|
|
46
|
+
declare const isReadableStream: (value: unknown) => boolean;
|
|
47
|
+
declare const isReadableStreamDefaultController: (value: unknown) => boolean;
|
|
48
|
+
declare const isReadableStreamDefaultReader: (value: unknown) => boolean;
|
|
49
|
+
declare function isReadableStreamLocked(stream: any): boolean;
|
|
50
|
+
declare function readableStreamCancel(stream: any, reason: unknown): Promise<void>;
|
|
51
|
+
declare function readableStreamClose(stream: any): void;
|
|
52
|
+
declare function readableStreamError(stream: any, error: unknown): void;
|
|
53
|
+
declare function readableStreamDefaultControllerClose(controller: any): void;
|
|
54
|
+
declare function readableStreamDefaultControllerEnqueue(controller: any, chunk: any): void;
|
|
55
|
+
declare function readableStreamDefaultControllerCanCloseOrEnqueue(controller: any): boolean;
|
|
56
|
+
declare function readableStreamDefaultControllerGetDesiredSize(controller: any): number | null;
|
|
57
|
+
declare function readableStreamDefaultControllerHasBackpressure(controller: any): boolean;
|
|
58
|
+
declare function readableStreamDefaultControllerError(controller: any, error: unknown): void;
|
|
59
|
+
declare function setupReadableStreamDefaultController(stream: any, controller: any, startAlgorithm: Function, pullAlgorithm: Function, cancelAlgorithm: Function, highWaterMark: number, sizeAlgorithm: (chunk: any) => number): void;
|
|
60
|
+
declare function createReadableStream(start: Function, pull: Function, cancel: Function, highWaterMark?: number, size?: (chunk: any) => number): ReadableStream;
|
|
61
|
+
export { ReadableStream, ReadableStreamDefaultReader, ReadableStreamDefaultController, isReadableStream, isReadableStreamLocked, isReadableStreamDefaultReader, isReadableStreamDefaultController, readableStreamCancel, readableStreamClose, readableStreamError, readableStreamDefaultControllerClose, readableStreamDefaultControllerEnqueue, readableStreamDefaultControllerError, readableStreamDefaultControllerGetDesiredSize, readableStreamDefaultControllerCanCloseOrEnqueue, readableStreamDefaultControllerHasBackpressure, setupReadableStreamDefaultController, createReadableStream, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TextDecoderStream decodes a stream of bytes into strings.
|
|
3
|
+
*
|
|
4
|
+
* Uses TextDecoder with `stream: true` when available (Node.js, browsers).
|
|
5
|
+
* On GJS where `stream` option is not supported, manually buffers incomplete
|
|
6
|
+
* multi-byte UTF-8 sequences across chunks.
|
|
7
|
+
*/
|
|
8
|
+
export declare class TextDecoderStream {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(label?: string, options?: TextDecoderOptions);
|
|
11
|
+
get encoding(): string;
|
|
12
|
+
get fatal(): boolean;
|
|
13
|
+
get ignoreBOM(): boolean;
|
|
14
|
+
get readable(): ReadableStream<string>;
|
|
15
|
+
get writable(): WritableStream<BufferSource>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TextEncoderStream encodes a stream of strings into UTF-8 encoded bytes.
|
|
3
|
+
*
|
|
4
|
+
* Handles surrogate pairs split across chunks: if the last code unit of a
|
|
5
|
+
* chunk is a high surrogate (0xD800–0xDBFF), it is held until the next chunk.
|
|
6
|
+
* If the stream ends with a pending high surrogate, U+FFFD replacement bytes
|
|
7
|
+
* are emitted.
|
|
8
|
+
*/
|
|
9
|
+
export declare class TextEncoderStream {
|
|
10
|
+
#private;
|
|
11
|
+
constructor();
|
|
12
|
+
get encoding(): string;
|
|
13
|
+
get readable(): ReadableStream<Uint8Array>;
|
|
14
|
+
get writable(): WritableStream<string>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { kState, kType } from './util.js';
|
|
2
|
+
export declare class TransformStream {
|
|
3
|
+
[kType]: string;
|
|
4
|
+
[kState]: any;
|
|
5
|
+
constructor(transformer?: any, writableStrategy?: any, readableStrategy?: any);
|
|
6
|
+
get readable(): any;
|
|
7
|
+
get writable(): any;
|
|
8
|
+
get [Symbol.toStringTag](): string;
|
|
9
|
+
}
|
|
10
|
+
export declare class TransformStreamDefaultController {
|
|
11
|
+
[kType]: string;
|
|
12
|
+
[kState]: any;
|
|
13
|
+
constructor(skipThrowSymbol?: symbol);
|
|
14
|
+
get desiredSize(): number | null;
|
|
15
|
+
enqueue(chunk?: any): void;
|
|
16
|
+
error(reason?: unknown): void;
|
|
17
|
+
terminate(): void;
|
|
18
|
+
get [Symbol.toStringTag](): string;
|
|
19
|
+
}
|
|
20
|
+
export declare const isTransformStream: (value: unknown) => boolean;
|
|
21
|
+
export declare const isTransformStreamDefaultController: (value: unknown) => boolean;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const kState: unique symbol;
|
|
2
|
+
export declare const kType: unique symbol;
|
|
3
|
+
export declare function isBrandCheck(brand: string): (value: unknown) => boolean;
|
|
4
|
+
export declare function dequeueValue(controller: any): any;
|
|
5
|
+
export declare function resetQueue(controller: any): void;
|
|
6
|
+
export declare function peekQueueValue(controller: any): any;
|
|
7
|
+
export declare function enqueueValueWithSize(controller: any, value: any, size: number): void;
|
|
8
|
+
export declare function extractHighWaterMark(value: number | undefined, defaultHWM: number): number;
|
|
9
|
+
export declare function extractSizeAlgorithm(size: ((chunk: any) => number) | undefined): (chunk: any) => number;
|
|
10
|
+
export declare function cloneAsUint8Array(view: ArrayBufferView): Uint8Array;
|
|
11
|
+
export declare function ArrayBufferViewGetBuffer(view: ArrayBufferView): ArrayBuffer;
|
|
12
|
+
export declare function ArrayBufferViewGetByteLength(view: ArrayBufferView): number;
|
|
13
|
+
export declare function ArrayBufferViewGetByteOffset(view: ArrayBufferView): number;
|
|
14
|
+
export declare function setPromiseHandled(promise: Promise<unknown>): void;
|
|
15
|
+
export declare function createPromiseCallback(name: string, fn: Function, thisArg: unknown): (...args: unknown[]) => Promise<any>;
|
|
16
|
+
export declare function nonOpFlush(): Promise<void>;
|
|
17
|
+
export declare function nonOpStart(): void;
|
|
18
|
+
export declare function nonOpPull(): Promise<void>;
|
|
19
|
+
export declare function nonOpCancel(): Promise<void>;
|
|
20
|
+
export declare function nonOpWrite(): Promise<void>;
|
|
21
|
+
export declare const AsyncIterator: {
|
|
22
|
+
__proto__: any;
|
|
23
|
+
next: (() => Promise<IteratorResult<unknown>>) | undefined;
|
|
24
|
+
return: ((value?: unknown) => Promise<IteratorResult<unknown>>) | undefined;
|
|
25
|
+
};
|
|
26
|
+
export declare function createAsyncFromSyncIterator(syncIteratorRecord: {
|
|
27
|
+
iterator: Iterator<unknown>;
|
|
28
|
+
nextMethod: Function;
|
|
29
|
+
done: boolean;
|
|
30
|
+
}): {
|
|
31
|
+
iterator: AsyncGenerator<unknown, any, any>;
|
|
32
|
+
nextMethod: (...[value]: [] | [any]) => Promise<IteratorResult<unknown, any>>;
|
|
33
|
+
done: boolean;
|
|
34
|
+
};
|
|
35
|
+
export declare function getIterator(obj: Record<string | symbol, unknown>, kind?: 'sync' | 'async', method?: Function): any;
|
|
36
|
+
export declare function iteratorNext(iteratorRecord: {
|
|
37
|
+
iterator: unknown;
|
|
38
|
+
nextMethod: Function;
|
|
39
|
+
done: boolean;
|
|
40
|
+
}, value?: unknown): any;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { kState, kType } from './util.js';
|
|
2
|
+
declare const kAbort: unique symbol;
|
|
3
|
+
declare const kError: unique symbol;
|
|
4
|
+
export declare class WritableStream {
|
|
5
|
+
[kType]: string;
|
|
6
|
+
[kState]: any;
|
|
7
|
+
constructor(sink?: any, strategy?: any);
|
|
8
|
+
get locked(): boolean;
|
|
9
|
+
abort(reason?: unknown): Promise<void>;
|
|
10
|
+
close(): Promise<void>;
|
|
11
|
+
getWriter(): WritableStreamDefaultWriter;
|
|
12
|
+
get [Symbol.toStringTag](): string;
|
|
13
|
+
}
|
|
14
|
+
export declare class WritableStreamDefaultWriter {
|
|
15
|
+
[kType]: string;
|
|
16
|
+
[kState]: any;
|
|
17
|
+
constructor(stream: WritableStream);
|
|
18
|
+
get closed(): Promise<void>;
|
|
19
|
+
get desiredSize(): number | null;
|
|
20
|
+
get ready(): Promise<void>;
|
|
21
|
+
abort(reason?: unknown): Promise<void>;
|
|
22
|
+
close(): Promise<void>;
|
|
23
|
+
releaseLock(): void;
|
|
24
|
+
write(chunk?: any): Promise<void>;
|
|
25
|
+
get [Symbol.toStringTag](): string;
|
|
26
|
+
}
|
|
27
|
+
export declare class WritableStreamDefaultController {
|
|
28
|
+
[kType]: string;
|
|
29
|
+
[kState]: any;
|
|
30
|
+
constructor(skipThrowSymbol?: symbol);
|
|
31
|
+
[kAbort](reason: unknown): any;
|
|
32
|
+
[kError](): void;
|
|
33
|
+
get signal(): AbortSignal;
|
|
34
|
+
error(error?: unknown): void;
|
|
35
|
+
get [Symbol.toStringTag](): string;
|
|
36
|
+
}
|
|
37
|
+
export declare const isWritableStream: (value: unknown) => boolean;
|
|
38
|
+
export declare const isWritableStreamDefaultWriter: (value: unknown) => boolean;
|
|
39
|
+
export declare const isWritableStreamDefaultController: (value: unknown) => boolean;
|
|
40
|
+
export declare function isWritableStreamLocked(stream: any): boolean;
|
|
41
|
+
export declare function writableStreamAbort(stream: any, reason?: unknown): Promise<void>;
|
|
42
|
+
export declare function writableStreamClose(stream: any): Promise<void>;
|
|
43
|
+
export declare function writableStreamCloseQueuedOrInFlight(stream: any): boolean;
|
|
44
|
+
export declare function writableStreamDefaultWriterWrite(writer: any, chunk: any): Promise<void>;
|
|
45
|
+
export declare function writableStreamDefaultWriterRelease(writer: any): void;
|
|
46
|
+
export declare function writableStreamDefaultWriterCloseWithErrorPropagation(writer: any): Promise<void>;
|
|
47
|
+
export declare function writableStreamDefaultControllerErrorIfNeeded(controller: any, error: unknown): void;
|
|
48
|
+
export declare function createWritableStream(start: Function, write: Function, close: Function, abort: Function, highWaterMark?: number, size?: (chunk: any) => number): WritableStream;
|
|
49
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gjsify/web-streams",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "WHATWG Streams API (ReadableStream, WritableStream, TransformStream) for GJS",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "lib/esm/index.js",
|
|
7
|
+
"types": "lib/types/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/types/index.d.ts",
|
|
11
|
+
"default": "./lib/esm/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"clear": "rm -rf lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.gjs.mjs test.node.mjs || exit 0",
|
|
16
|
+
"check": "tsc --noEmit",
|
|
17
|
+
"build": "yarn build:gjsify && yarn build:types",
|
|
18
|
+
"build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.{mts,ts}'",
|
|
19
|
+
"build:types": "tsc",
|
|
20
|
+
"build:test": "yarn build:test:gjs && yarn build:test:node",
|
|
21
|
+
"build:test:gjs": "gjsify build src/test.mts --app gjs --outfile test.gjs.mjs",
|
|
22
|
+
"build:test:node": "gjsify build src/test.mts --app node --outfile test.node.mjs",
|
|
23
|
+
"test": "yarn build:gjsify && yarn build:test && yarn test:node && yarn test:gjs",
|
|
24
|
+
"test:gjs": "gjs -m test.gjs.mjs",
|
|
25
|
+
"test:node": "node test.node.mjs"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"gjs",
|
|
29
|
+
"web",
|
|
30
|
+
"streams",
|
|
31
|
+
"readable",
|
|
32
|
+
"writable",
|
|
33
|
+
"transform"
|
|
34
|
+
],
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@gjsify/utils": "^0.1.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@gjsify/cli": "^0.1.0",
|
|
40
|
+
"@gjsify/unit": "^0.1.0",
|
|
41
|
+
"@types/node": "^25.5.0",
|
|
42
|
+
"typescript": "^6.0.2"
|
|
43
|
+
}
|
|
44
|
+
}
|