@fkn/lib 0.6.0 → 0.6.2
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/account.d.ts +15 -0
- package/api-B0jZnr_N.d.ts +554 -0
- package/cloud/dgram.d.ts +2 -0
- package/cloud/dns.d.ts +3 -0
- package/cloud/fs/promises.d.ts +9 -0
- package/cloud/fs.d.ts +3 -0
- package/cloud/http.d.ts +2 -0
- package/cloud/net.d.ts +2 -0
- package/cloud-B4KIFGwa.cjs +1 -0
- package/{cloud-BFyf2uC7.js → cloud-Dsb33tl6.js} +29 -15
- package/cloud-jJi2d0cs.d.ts +41 -0
- package/cloud.cjs +1 -1
- package/cloud.d.ts +7 -0
- package/cloud.js +1 -1
- package/connect-button-D8KXSL6s.d.ts +4 -0
- package/desktop.d.ts +52 -0
- package/dgram.d.ts +91 -0
- package/dns.d.ts +12 -0
- package/extension-3pxUYwrA.d.ts +16 -0
- package/extension.d.ts +3 -0
- package/fs/promises.d.ts +12 -0
- package/fs-K7ROdxDx.d.ts +41 -0
- package/fs.d.ts +92 -0
- package/http.d.ts +186 -0
- package/index-BJztAQIP.d.ts +721 -0
- package/index-C6ZoDJg8.d.ts +31 -0
- package/index.cjs +1 -1
- package/index.d.ts +28 -0
- package/index.js +1 -1
- package/lookup-BtwWaCZJ.d.ts +7 -0
- package/net-5SVFcuzM.d.ts +140 -0
- package/net.d.ts +2 -0
- package/opfs/promises.d.ts +12 -0
- package/opfs.d.ts +90 -0
- package/package.json +23 -23
- package/packages-D36R2vBv.d.ts +108 -0
- package/packages.d.ts +2 -0
- package/react.d.ts +14 -0
- package/api/account.d.ts +0 -7
- package/api/broker-bridge.d.ts +0 -12
- package/api/connect-store.d.ts +0 -9
- package/api/connect.d.ts +0 -2
- package/api/data-plane.d.ts +0 -28
- package/api/dns/index.d.ts +0 -1
- package/api/dns/lookup.d.ts +0 -8
- package/api/index.d.ts +0 -78
- package/api/install-prompt.d.ts +0 -2
- package/api/local-net/index.d.ts +0 -43
- package/api/overlay-mount.d.ts +0 -2
- package/api/overlay.d.ts +0 -17
- package/api/packages/host.d.ts +0 -12
- package/api/packages/identity.d.ts +0 -1
- package/api/packages/index.d.ts +0 -34
- package/api/packages/picker.d.ts +0 -28
- package/api/packages/registry.d.ts +0 -20
- package/api/packages/store.d.ts +0 -6
- package/api/packages/types.d.ts +0 -56
- package/api/preconnect.d.ts +0 -1
- package/api/proxy/index.d.ts +0 -1
- package/api/proxy/proxy-fetch.d.ts +0 -5
- package/api/quota.d.ts +0 -10
- package/api/rate-token.d.ts +0 -3
- package/api/session-limit.d.ts +0 -1
- package/api/storage.d.ts +0 -20
- package/api/toast.d.ts +0 -1
- package/api/token-source.d.ts +0 -4
- package/api/ui-events.d.ts +0 -8
- package/api/ui-host.d.ts +0 -2
- package/api/webvpn/index.d.ts +0 -3
- package/api/webvpn/packets/metadata.d.ts +0 -31
- package/api/webvpn/packets/tcp-listener.d.ts +0 -39
- package/api/webvpn/packets/tcp.d.ts +0 -88
- package/api/webvpn/packets/udp.d.ts +0 -183
- package/api/webvpn/packets/utils.d.ts +0 -24
- package/api/webvpn/tcp-listener.d.ts +0 -11
- package/api/webvpn/tcp.d.ts +0 -33
- package/api/webvpn/udp.d.ts +0 -33
- package/api/webvpn/utils.d.ts +0 -26
- package/api/webvpn/webtransport.d.ts +0 -62
- package/api/worker/client.d.ts +0 -3
- package/api/worker/protocol.d.ts +0 -15
- package/cloud-5o7yJHeX.cjs +0 -1
- package/lib/account.d.ts +0 -14
- package/lib/api.d.ts +0 -300
- package/lib/auto.d.ts +0 -5
- package/lib/cloud/dgram.d.ts +0 -2
- package/lib/cloud/dns.d.ts +0 -1
- package/lib/cloud/frame.d.ts +0 -3
- package/lib/cloud/fs-promises.d.ts +0 -5
- package/lib/cloud/fs.d.ts +0 -22
- package/lib/cloud/http.d.ts +0 -2
- package/lib/cloud/net.d.ts +0 -2
- package/lib/cloud.d.ts +0 -10
- package/lib/connect-button.d.ts +0 -1
- package/lib/connect.d.ts +0 -1
- package/lib/desktop.d.ts +0 -47
- package/lib/dns.d.ts +0 -6
- package/lib/dom.d.ts +0 -2
- package/lib/extension-prompt.d.ts +0 -1
- package/lib/extension.d.ts +0 -4
- package/lib/fkn-target.d.ts +0 -1
- package/lib/frame.d.ts +0 -2
- package/lib/fs/content-type.d.ts +0 -1
- package/lib/fs/hybrid.d.ts +0 -10
- package/lib/fs/index.d.ts +0 -87
- package/lib/fs/opfs.d.ts +0 -8
- package/lib/fs/promises.d.ts +0 -8
- package/lib/fs/types.d.ts +0 -16
- package/lib/index.d.ts +0 -18
- package/lib/node-fs/index.d.ts +0 -95
- package/lib/node-fs/shared.d.ts +0 -39
- package/lib/node-fs/store.d.ts +0 -21
- package/lib/opfs/index.d.ts +0 -84
- package/lib/opfs/promises.d.ts +0 -8
- package/lib/overlay.d.ts +0 -14
- package/lib/packages.d.ts +0 -69
- package/lib/proxy.d.ts +0 -5
- package/lib/quota.d.ts +0 -20
- package/lib/react.d.ts +0 -7
- package/lib/relay.d.ts +0 -5
- package/lib/storage.d.ts +0 -22
- package/lib/webvpn/dgram.d.ts +0 -86
- package/lib/webvpn/http.d.ts +0 -180
- package/lib/webvpn/index.d.ts +0 -1
- package/lib/webvpn/net.d.ts +0 -132
- package/lib/webvpn/utils.d.ts +0 -32
- package/sandbox.d.ts +0 -7
package/http.d.ts
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { n as Socket, t as Server$1 } from "./net-5SVFcuzM.js";
|
|
2
|
+
import { Buffer } from "buffer";
|
|
3
|
+
import { Stream } from "stream";
|
|
4
|
+
import { IncomingHttpHeaders, OutgoingHttpHeaders, RequestOptions } from "http";
|
|
5
|
+
|
|
6
|
+
//#region src/lib/webvpn/http.d.ts
|
|
7
|
+
declare namespace http_d_exports {
|
|
8
|
+
export { Agent, ClientRequest, ClientRequestArgs, HTTPParser, IncomingMessage, METHODS, ParsedHead, RequestListener, STATUS_CODES, Server, ServerResponse, ServerResponseOptions, _default, createServer, _default as default, get, globalAgent, request };
|
|
9
|
+
}
|
|
10
|
+
declare const METHODS: string[];
|
|
11
|
+
declare const STATUS_CODES: Record<number, string>;
|
|
12
|
+
interface ParsedHead {
|
|
13
|
+
/** request only */
|
|
14
|
+
method?: string;
|
|
15
|
+
/** request only */
|
|
16
|
+
url?: string;
|
|
17
|
+
/** response only */
|
|
18
|
+
statusCode?: number;
|
|
19
|
+
/** response only */
|
|
20
|
+
statusMessage?: string;
|
|
21
|
+
httpVersionMajor: number;
|
|
22
|
+
httpVersionMinor: number;
|
|
23
|
+
httpVersion: string;
|
|
24
|
+
headers: IncomingHttpHeaders;
|
|
25
|
+
rawHeaders: string[];
|
|
26
|
+
}
|
|
27
|
+
interface ParserHandlers {
|
|
28
|
+
onHeaders: (head: ParsedHead) => void;
|
|
29
|
+
onBody: (chunk: Uint8Array) => void;
|
|
30
|
+
onComplete: () => void;
|
|
31
|
+
}
|
|
32
|
+
declare class HTTPParser {
|
|
33
|
+
private readonly mode;
|
|
34
|
+
private readonly handlers;
|
|
35
|
+
private buf;
|
|
36
|
+
private state;
|
|
37
|
+
private framing;
|
|
38
|
+
private bodyRemaining;
|
|
39
|
+
private chunkState;
|
|
40
|
+
skipBody: boolean;
|
|
41
|
+
constructor(mode: 'request' | 'response', handlers: ParserHandlers);
|
|
42
|
+
execute(chunk: Uint8Array): void;
|
|
43
|
+
finish(): void;
|
|
44
|
+
private reset;
|
|
45
|
+
private parseHead;
|
|
46
|
+
private applyVersion;
|
|
47
|
+
private addHeader;
|
|
48
|
+
private setupBody;
|
|
49
|
+
private consumeBody;
|
|
50
|
+
private consumeChunked;
|
|
51
|
+
}
|
|
52
|
+
declare class IncomingMessage extends Stream.Readable {
|
|
53
|
+
httpVersion: string;
|
|
54
|
+
httpVersionMajor: number;
|
|
55
|
+
httpVersionMinor: number;
|
|
56
|
+
headers: IncomingHttpHeaders;
|
|
57
|
+
rawHeaders: string[];
|
|
58
|
+
trailers: Record<string, string>;
|
|
59
|
+
rawTrailers: string[];
|
|
60
|
+
/** request only */
|
|
61
|
+
method?: string;
|
|
62
|
+
/** request only */
|
|
63
|
+
url?: string;
|
|
64
|
+
/** response only */
|
|
65
|
+
statusCode?: number;
|
|
66
|
+
/** response only */
|
|
67
|
+
statusMessage?: string;
|
|
68
|
+
complete: boolean;
|
|
69
|
+
socket: Socket;
|
|
70
|
+
constructor(socket: Socket);
|
|
71
|
+
get connection(): Socket;
|
|
72
|
+
_applyHead(head: ParsedHead): void;
|
|
73
|
+
_read(): void;
|
|
74
|
+
setTimeout(msecs: number, callback?: () => void): this;
|
|
75
|
+
}
|
|
76
|
+
declare abstract class OutgoingMessage extends Stream.Writable {
|
|
77
|
+
private _headerStore;
|
|
78
|
+
headersSent: boolean;
|
|
79
|
+
chunkedEncoding: boolean;
|
|
80
|
+
finished: boolean;
|
|
81
|
+
protected _bodyWritten: boolean;
|
|
82
|
+
abstract socket: Socket | null;
|
|
83
|
+
setHeader(name: string, value: number | string | readonly string[]): this;
|
|
84
|
+
getHeader(name: string): number | string | string[] | undefined;
|
|
85
|
+
getHeaderNames(): string[];
|
|
86
|
+
getHeaders(): OutgoingHttpHeaders;
|
|
87
|
+
hasHeader(name: string): boolean;
|
|
88
|
+
removeHeader(name: string): void;
|
|
89
|
+
protected _storeHeader(startLine: string): string;
|
|
90
|
+
protected abstract _shouldSendBody(): boolean;
|
|
91
|
+
protected abstract _implicitHeader(): void;
|
|
92
|
+
protected _writeToSocket(data: Buffer, callback: (error?: Error | null) => void): void;
|
|
93
|
+
write(chunk: unknown, encoding?: BufferEncoding | ((error: Error | null | undefined) => void), callback?: (error: Error | null | undefined) => void): boolean;
|
|
94
|
+
_write(chunk: Buffer, _encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
95
|
+
_final(callback: (error?: Error | null) => void): void;
|
|
96
|
+
end(chunk?: unknown, encoding?: BufferEncoding | (() => void), callback?: () => void): this;
|
|
97
|
+
protected _headBlock?: string;
|
|
98
|
+
}
|
|
99
|
+
interface ServerResponseOptions {
|
|
100
|
+
req: IncomingMessage;
|
|
101
|
+
}
|
|
102
|
+
declare class ServerResponse extends OutgoingMessage {
|
|
103
|
+
statusCode: number;
|
|
104
|
+
statusMessage?: string;
|
|
105
|
+
private _writeHeadCalled;
|
|
106
|
+
sendDate: boolean;
|
|
107
|
+
req: IncomingMessage;
|
|
108
|
+
socket: Socket | null;
|
|
109
|
+
_keepAlive: boolean;
|
|
110
|
+
constructor(req: IncomingMessage);
|
|
111
|
+
protected _shouldSendBody(): boolean;
|
|
112
|
+
writeHead(statusCode: number, statusMessage?: string | OutgoingHttpHeaders | OutgoingHttpHeaders[keyof OutgoingHttpHeaders][], headers?: OutgoingHttpHeaders): this;
|
|
113
|
+
private _appendHeader;
|
|
114
|
+
protected _implicitHeader(): void;
|
|
115
|
+
writeContinue(): void;
|
|
116
|
+
setTimeout(msecs: number, callback?: () => void): this;
|
|
117
|
+
}
|
|
118
|
+
interface ClientRequestArgs extends RequestOptions {
|
|
119
|
+
host?: string;
|
|
120
|
+
hostname?: string;
|
|
121
|
+
port?: number | string;
|
|
122
|
+
path?: string;
|
|
123
|
+
}
|
|
124
|
+
declare class ClientRequest extends OutgoingMessage {
|
|
125
|
+
method: string;
|
|
126
|
+
path: string;
|
|
127
|
+
host: string;
|
|
128
|
+
protocol: string;
|
|
129
|
+
socket: Socket;
|
|
130
|
+
/** alias retained for Node compatibility */
|
|
131
|
+
get connection(): Socket;
|
|
132
|
+
res: IncomingMessage | null;
|
|
133
|
+
aborted: boolean;
|
|
134
|
+
private _aborted;
|
|
135
|
+
constructor(options: ClientRequestArgs, callback?: (res: IncomingMessage) => void);
|
|
136
|
+
protected _shouldSendBody(): boolean;
|
|
137
|
+
protected _implicitHeader(): void;
|
|
138
|
+
private _attachResponseParser;
|
|
139
|
+
abort(): void;
|
|
140
|
+
destroy(error?: Error): this;
|
|
141
|
+
end(chunk?: unknown, encoding?: unknown, callback?: unknown): this;
|
|
142
|
+
protected _writeToSocket(data: Buffer, callback: (error?: Error | null) => void): void;
|
|
143
|
+
setTimeout(timeout: number, callback?: () => void): this;
|
|
144
|
+
setNoDelay(noDelay?: boolean): void;
|
|
145
|
+
setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
|
|
146
|
+
}
|
|
147
|
+
type RequestListener = (req: IncomingMessage, res: ServerResponse) => void;
|
|
148
|
+
declare class ServerImpl extends Server$1 {
|
|
149
|
+
constructor(options?: object | RequestListener, requestListener?: RequestListener);
|
|
150
|
+
private _handleConnection;
|
|
151
|
+
}
|
|
152
|
+
declare const Server: typeof ServerImpl;
|
|
153
|
+
type Server = ServerImpl;
|
|
154
|
+
declare class Agent {
|
|
155
|
+
maxSockets: number;
|
|
156
|
+
maxFreeSockets: number;
|
|
157
|
+
keepAlive: boolean;
|
|
158
|
+
options: Record<string, unknown>;
|
|
159
|
+
constructor(options?: Record<string, unknown>);
|
|
160
|
+
getName(options?: {
|
|
161
|
+
host?: string;
|
|
162
|
+
port?: number;
|
|
163
|
+
localAddress?: string;
|
|
164
|
+
}): string;
|
|
165
|
+
destroy(): void;
|
|
166
|
+
}
|
|
167
|
+
declare const globalAgent: Agent;
|
|
168
|
+
declare const request: (...args: [options: string | URL | ClientRequestArgs, callback?: (res: IncomingMessage) => void] | [url: string | URL, options: ClientRequestArgs, callback?: (res: IncomingMessage) => void]) => ClientRequest;
|
|
169
|
+
declare const get: (...args: [options: string | URL | ClientRequestArgs, callback?: (res: IncomingMessage) => void] | [url: string | URL, options: ClientRequestArgs, callback?: (res: IncomingMessage) => void]) => ClientRequest;
|
|
170
|
+
declare const createServer: (options?: object | RequestListener, requestListener?: RequestListener) => Server;
|
|
171
|
+
declare const _default: {
|
|
172
|
+
METHODS: string[];
|
|
173
|
+
STATUS_CODES: Record<number, string>;
|
|
174
|
+
Agent: typeof Agent;
|
|
175
|
+
globalAgent: Agent;
|
|
176
|
+
Server: typeof ServerImpl;
|
|
177
|
+
ServerResponse: typeof ServerResponse;
|
|
178
|
+
IncomingMessage: typeof IncomingMessage;
|
|
179
|
+
ClientRequest: typeof ClientRequest;
|
|
180
|
+
OutgoingMessage: typeof OutgoingMessage;
|
|
181
|
+
createServer: (options?: object | RequestListener, requestListener?: RequestListener) => Server;
|
|
182
|
+
request: (...args: [options: string | URL | ClientRequestArgs, callback?: (res: IncomingMessage) => void] | [url: string | URL, options: ClientRequestArgs, callback?: (res: IncomingMessage) => void]) => ClientRequest;
|
|
183
|
+
get: (...args: [options: string | URL | ClientRequestArgs, callback?: (res: IncomingMessage) => void] | [url: string | URL, options: ClientRequestArgs, callback?: (res: IncomingMessage) => void]) => ClientRequest;
|
|
184
|
+
};
|
|
185
|
+
//#endregion
|
|
186
|
+
export { Agent, ClientRequest, ClientRequestArgs, HTTPParser, IncomingMessage, METHODS, ParsedHead, RequestListener, STATUS_CODES, Server, ServerResponse, ServerResponseOptions, _default, _default as default, createServer, get, globalAgent, request, http_d_exports as t };
|