@fkn/lib 0.6.0 → 0.6.1
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-BYUraih6.d.ts +524 -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-gklfa4ZN.d.ts +41 -0
- package/cloud.d.ts +7 -0
- 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.d.ts +28 -0
- package/lookup-BtwWaCZJ.d.ts +7 -0
- package/net-BDW1AVX1.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/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/dgram.d.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { n as UdpSocketOption, t as Resolvers } from "./api-BYUraih6.js";
|
|
2
|
+
import { Buffer } from "buffer";
|
|
3
|
+
import { AddressInfo } from "net";
|
|
4
|
+
import { EventEmitter } from "events";
|
|
5
|
+
import { BindOptions, RemoteInfo, Socket as Socket$2, SocketOptions, SocketType } from "dgram";
|
|
6
|
+
|
|
7
|
+
//#region src/lib/webvpn/dgram.d.ts
|
|
8
|
+
declare namespace dgram_d_exports {
|
|
9
|
+
export { Socket, createSocket, _default as default };
|
|
10
|
+
}
|
|
11
|
+
type WebVpnUdpSocket = Resolvers['cloud']['webvpn']['udpSocket'];
|
|
12
|
+
interface EventEmitterOptions {
|
|
13
|
+
/**
|
|
14
|
+
* Enables automatic capturing of promise rejection.
|
|
15
|
+
*/
|
|
16
|
+
captureRejections?: boolean | undefined;
|
|
17
|
+
}
|
|
18
|
+
declare class Socket extends EventEmitter implements Socket$2 {
|
|
19
|
+
_type: 'udp4' | 'udp6';
|
|
20
|
+
_localAddress?: {
|
|
21
|
+
address: string;
|
|
22
|
+
family: string;
|
|
23
|
+
port: number;
|
|
24
|
+
};
|
|
25
|
+
_remoteAddress?: {
|
|
26
|
+
address: string;
|
|
27
|
+
family: string;
|
|
28
|
+
port: number;
|
|
29
|
+
};
|
|
30
|
+
_webVPNUdpSocketPromise?: Promise<Awaited<ReturnType<WebVpnUdpSocket>> | undefined>;
|
|
31
|
+
_dataPort?: MessagePort;
|
|
32
|
+
_socketId?: number;
|
|
33
|
+
_sendQueue: Uint8Array[];
|
|
34
|
+
_sendQueueBytes: number;
|
|
35
|
+
_sendFlushScheduled: boolean;
|
|
36
|
+
_peerTailCache: Map<string, Uint8Array<ArrayBufferLike>>;
|
|
37
|
+
constructor(options: SocketOptions & EventEmitterOptions & {
|
|
38
|
+
connection?: ReturnType<WebVpnUdpSocket>;
|
|
39
|
+
});
|
|
40
|
+
_lastRecvBufferSize: number;
|
|
41
|
+
_lastSendBufferSize: number;
|
|
42
|
+
_lastTtl: number;
|
|
43
|
+
_lastMulticastTtl: number;
|
|
44
|
+
_lastMulticastLoopback: boolean;
|
|
45
|
+
_setUdpOption(option: UdpSocketOption): void;
|
|
46
|
+
_onDataPortBatch(buffer: ArrayBuffer): void;
|
|
47
|
+
_peerTail(address: string | undefined, port: number | undefined): Uint8Array;
|
|
48
|
+
_portSend(message: Uint8Array, address: string | undefined, port: number | undefined): void;
|
|
49
|
+
addMembership(multicastAddress: string, multicastInterface?: string | undefined): void;
|
|
50
|
+
address(): AddressInfo;
|
|
51
|
+
bind(port?: number | undefined, address?: string | undefined, callback?: (() => void) | undefined): this;
|
|
52
|
+
bind(port?: number | undefined, callback?: (() => void) | undefined): this;
|
|
53
|
+
bind(callback?: (() => void) | undefined): this;
|
|
54
|
+
bind(options: BindOptions, callback?: (() => void) | undefined): this;
|
|
55
|
+
close(callback?: (() => void) | undefined): this;
|
|
56
|
+
connect(port: number, address?: string, callback?: () => void): void;
|
|
57
|
+
connect(port: number, callback: () => void): void;
|
|
58
|
+
disconnect(): void;
|
|
59
|
+
dropMembership(multicastAddress: string, multicastInterface?: string | undefined): void;
|
|
60
|
+
getRecvBufferSize(): number;
|
|
61
|
+
getSendBufferSize(): number;
|
|
62
|
+
getSendQueueSize(): number;
|
|
63
|
+
getSendQueueCount(): number;
|
|
64
|
+
ref(): this;
|
|
65
|
+
remoteAddress(): AddressInfo;
|
|
66
|
+
send(msg: string | readonly any[] | Uint8Array, port?: number | undefined, address?: string | undefined, callback?: ((error: Error | null, bytes: number) => void) | undefined): void;
|
|
67
|
+
send(msg: string | readonly any[] | Uint8Array, port?: number | undefined, callback?: ((error: Error | null, bytes: number) => void) | undefined): void;
|
|
68
|
+
send(msg: string | readonly any[] | Uint8Array, callback?: ((error: Error | null, bytes: number) => void) | undefined): void;
|
|
69
|
+
send(msg: string | Uint8Array, offset: number, length: number, port?: number | undefined, address?: string | undefined, callback?: ((error: Error | null, bytes: number) => void) | undefined): void;
|
|
70
|
+
send(msg: string | Uint8Array, offset: number, length: number, port?: number | undefined, callback?: ((error: Error | null, bytes: number) => void) | undefined): void;
|
|
71
|
+
send(msg: string | Uint8Array, offset: number, length: number, callback?: ((error: Error | null, bytes: number) => void) | undefined): void;
|
|
72
|
+
send(msg: unknown, offset?: unknown, length?: unknown, port?: unknown, address?: unknown, callback?: unknown): void;
|
|
73
|
+
setBroadcast(flag: boolean): void;
|
|
74
|
+
setMulticastInterface(multicastInterface: string): void;
|
|
75
|
+
setMulticastLoopback(flag: boolean): boolean;
|
|
76
|
+
setMulticastTTL(ttl: number): number;
|
|
77
|
+
setRecvBufferSize(size: number): void;
|
|
78
|
+
setSendBufferSize(size: number): void;
|
|
79
|
+
setTTL(ttl: number): number;
|
|
80
|
+
unref(): this;
|
|
81
|
+
addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string | undefined): void;
|
|
82
|
+
dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string | undefined): void;
|
|
83
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
84
|
+
}
|
|
85
|
+
declare const createSocket: (options: SocketType | SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void) => Socket;
|
|
86
|
+
declare const _default: {
|
|
87
|
+
Socket: typeof Socket;
|
|
88
|
+
createSocket: (options: SocketType | SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void) => Socket;
|
|
89
|
+
};
|
|
90
|
+
//#endregion
|
|
91
|
+
export { Socket, createSocket, _default as default, dgram_d_exports as t };
|
package/dns.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { t as AddressLookupResult } from "./lookup-BtwWaCZJ.js";
|
|
2
|
+
|
|
3
|
+
//#region src/lib/dns.d.ts
|
|
4
|
+
declare namespace dns_d_exports {
|
|
5
|
+
export { AddressLookupResult, lookup };
|
|
6
|
+
}
|
|
7
|
+
declare const lookup: <T extends boolean = false>(hostname: string, options?: {
|
|
8
|
+
all?: T;
|
|
9
|
+
family?: 0 | 4 | 6;
|
|
10
|
+
}) => Promise<T extends true ? AddressLookupResult[] : AddressLookupResult | undefined>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { type AddressLookupResult, lookup, dns_d_exports as t };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { A as RequestHeaderRule, B as assertFetchableUrl, C as attachFramePermission, D as assertLockdownApplicable, E as assertAttachableFrameUrl, F as SiteCookie, G as isBlockedFetchUrl, H as fetchCredentialedPermission, I as cookies, K as isLocalNetworkUrl, L as readCookiePermission, M as removeRequestHeaderRule, N as setRequestHeaderRule, O as isBlockedFrameUrl, P as CookieDetails, R as FetchInit, S as GotoOptions, T as gotoPermission, U as fetchLocalPermission, V as fetch$1, W as fetchPermission, _ as ATTACH_FRAME_EVENT_KEY, a as handleRevivableModules, b as Frame, c as VideoElementState, d as isType, f as revive, g as permissions, h as PermissionRequest, i as waitForExtensionExposure, j as modifyRequestHeadersPermission, k as HeaderOperation, l as box, m as PermissionGrant, n as isExtensionExposed, o as BoxedVideoElement, p as type, r as setMissingExtensionHandler, s as RemoteVideoElement, t as extension, u as createVideoElementHandle, v as attachFrame, w as createFrame, x as FrameBackend, y as AttachFrameOptions, z as ProxyFetchRequest } from "./index-BJztAQIP.js";
|
|
2
|
+
|
|
3
|
+
//#region src/lib/extension-prompt.d.ts
|
|
4
|
+
declare const promptInstall: (reason?: string) => Promise<boolean>;
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/lib/auto.d.ts
|
|
7
|
+
declare const isExtensionAvailable: () => boolean;
|
|
8
|
+
declare const fetch: (input: RequestInfo | URL, init?: RequestInit & {
|
|
9
|
+
reason?: string;
|
|
10
|
+
render?: boolean;
|
|
11
|
+
}) => Promise<Response>;
|
|
12
|
+
declare namespace extension_d_exports {
|
|
13
|
+
export { ATTACH_FRAME_EVENT_KEY, AttachFrameOptions, BoxedVideoElement, CookieDetails, FetchInit, Frame, FrameBackend, GotoOptions, HeaderOperation, PermissionGrant, PermissionRequest, ProxyFetchRequest, RemoteVideoElement, RequestHeaderRule, SiteCookie, VideoElementState, assertAttachableFrameUrl, assertFetchableUrl, assertLockdownApplicable, attachFrame, attachFramePermission, isExtensionAvailable as available, box, cookies, createFrame, createVideoElementHandle, extension as events, extension, fetch$1 as fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, gotoPermission, handleRevivableModules, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isType, modifyRequestHeadersPermission, permissions, promptInstall, readCookiePermission, removeRequestHeaderRule, revive, setMissingExtensionHandler, setRequestHeaderRule, type, waitForExtensionExposure };
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { promptInstall as i, fetch as n, isExtensionAvailable as r, extension_d_exports as t };
|
package/extension.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { A as RequestHeaderRule, B as assertFetchableUrl, C as attachFramePermission, D as assertLockdownApplicable, E as assertAttachableFrameUrl, F as SiteCookie, G as isBlockedFetchUrl, H as fetchCredentialedPermission, I as cookies, K as isLocalNetworkUrl, L as readCookiePermission, M as removeRequestHeaderRule, N as setRequestHeaderRule, O as isBlockedFrameUrl, P as CookieDetails, R as FetchInit, S as GotoOptions, T as gotoPermission, U as fetchLocalPermission, V as fetch, W as fetchPermission, _ as ATTACH_FRAME_EVENT_KEY, a as handleRevivableModules, b as Frame, c as VideoElementState, d as isType, f as revive, g as permissions, h as PermissionRequest, i as waitForExtensionExposure, j as modifyRequestHeadersPermission, k as HeaderOperation, l as box, m as PermissionGrant, n as isExtensionExposed, o as BoxedVideoElement, p as type, r as setMissingExtensionHandler, s as RemoteVideoElement, t as extension, u as createVideoElementHandle, v as attachFrame, w as createFrame, x as FrameBackend, y as AttachFrameOptions, z as ProxyFetchRequest } from "./index-BJztAQIP.js";
|
|
2
|
+
import { i as promptInstall, r as isExtensionAvailable } from "./extension-3pxUYwrA.js";
|
|
3
|
+
export { ATTACH_FRAME_EVENT_KEY, AttachFrameOptions, BoxedVideoElement, CookieDetails, FetchInit, Frame, FrameBackend, GotoOptions, HeaderOperation, PermissionGrant, PermissionRequest, ProxyFetchRequest, RemoteVideoElement, RequestHeaderRule, SiteCookie, VideoElementState, assertAttachableFrameUrl, assertFetchableUrl, assertLockdownApplicable, attachFrame, attachFramePermission, isExtensionAvailable as available, box, cookies, createFrame, createVideoElementHandle, extension as events, extension, fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, gotoPermission, handleRevivableModules, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isType, modifyRequestHeadersPermission, permissions, promptInstall, readCookiePermission, removeRequestHeaderRule, revive, setMissingExtensionHandler, setRequestHeaderRule, type, waitForExtensionExposure };
|
package/fs/promises.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { a as WriteData, i as Stats, n as MakeOptions, o as WriteOptions, r as ReadOptions } from "../index-C6ZoDJg8.js";
|
|
2
|
+
import { promises } from "../fs.js";
|
|
3
|
+
|
|
4
|
+
//#region src/lib/fs/promises.d.ts
|
|
5
|
+
declare const readFile: (path: import("node:fs").PathLike, options?: ReadOptions) => Promise<Buffer | string>, writeFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>, appendFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>, unlink: (path: import("node:fs").PathLike) => Promise<void>, rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => Promise<void>, readdir: (path: import("node:fs").PathLike) => Promise<string[]>, mkdir: (path: import("node:fs").PathLike, options?: MakeOptions) => Promise<void>, rm: (path: import("node:fs").PathLike, options?: {
|
|
6
|
+
recursive?: boolean;
|
|
7
|
+
force?: boolean;
|
|
8
|
+
}) => Promise<void>, rmdir: (path: import("node:fs").PathLike, options?: {
|
|
9
|
+
recursive?: boolean;
|
|
10
|
+
}) => Promise<void>, stat: (path: import("node:fs").PathLike) => Promise<Stats>, lstat: (path: import("node:fs").PathLike) => Promise<Stats>, access: (path: import("node:fs").PathLike) => Promise<void>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { access, appendFile, promises as default, lstat, mkdir, readFile, readdir, rename, rm, rmdir, stat, unlink, writeFile };
|
package/fs-K7ROdxDx.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { a as WriteData, i as Stats, n as MakeOptions, o as WriteOptions, r as ReadOptions, t as Callback } from "./index-C6ZoDJg8.js";
|
|
2
|
+
|
|
3
|
+
//#region src/lib/storage.d.ts
|
|
4
|
+
type FileEntry = {
|
|
5
|
+
path: string;
|
|
6
|
+
size: number;
|
|
7
|
+
contentType: string | null;
|
|
8
|
+
updatedAt: string;
|
|
9
|
+
};
|
|
10
|
+
type StorageQuota = {
|
|
11
|
+
usedBytes: number;
|
|
12
|
+
limitBytes: number;
|
|
13
|
+
remaining: number;
|
|
14
|
+
objects: number;
|
|
15
|
+
maxObjects: number;
|
|
16
|
+
};
|
|
17
|
+
declare const quota: () => Promise<StorageQuota>;
|
|
18
|
+
declare namespace fs_d_exports {
|
|
19
|
+
export { FileEntry, Stats, StorageQuota, available, mkdir, promises, quota, readFile, readdir, rename, rm, stat, unlink, writeFile };
|
|
20
|
+
}
|
|
21
|
+
declare const available: () => Promise<boolean>, readFile: (path: import("node:fs").PathLike, a: ReadOptions | Callback<Buffer | string>, b?: Callback<Buffer | string>) => void, writeFile: (path: import("node:fs").PathLike, data: WriteData, a: WriteOptions | Callback<void>, b?: Callback<void>) => void, unlink: (path: import("node:fs").PathLike, callback: Callback<void>) => void, rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike, callback: Callback<void>) => void, readdir: (path: import("node:fs").PathLike, a: unknown, b?: Callback<string[]>) => void, mkdir: (path: import("node:fs").PathLike, a: MakeOptions | Callback<void>, b?: Callback<void>) => void, rm: (path: import("node:fs").PathLike, a: {
|
|
22
|
+
recursive?: boolean;
|
|
23
|
+
} | Callback<void>, b?: Callback<void>) => void, stat: (path: import("node:fs").PathLike, callback: Callback<Stats>) => void, promises: {
|
|
24
|
+
readFile: (path: import("node:fs").PathLike, options?: ReadOptions) => Promise<Buffer | string>;
|
|
25
|
+
writeFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>;
|
|
26
|
+
unlink: (path: import("node:fs").PathLike) => Promise<void>;
|
|
27
|
+
rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => Promise<void>;
|
|
28
|
+
readdir: (path: import("node:fs").PathLike) => Promise<string[]>;
|
|
29
|
+
mkdir: (_path?: import("node:fs").PathLike, _options?: MakeOptions) => Promise<void>;
|
|
30
|
+
rm: (path: import("node:fs").PathLike, options?: {
|
|
31
|
+
recursive?: boolean;
|
|
32
|
+
}) => Promise<void>;
|
|
33
|
+
rmdir: (path: import("node:fs").PathLike, options?: {
|
|
34
|
+
recursive?: boolean;
|
|
35
|
+
}) => Promise<void>;
|
|
36
|
+
stat: (path: import("node:fs").PathLike) => Promise<Stats>;
|
|
37
|
+
lstat: (path: import("node:fs").PathLike) => Promise<Stats>;
|
|
38
|
+
access: (path: import("node:fs").PathLike) => Promise<void>;
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { readFile as a, rm as c, writeFile as d, FileEntry as f, promises as i, stat as l, quota as m, fs_d_exports as n, readdir as o, StorageQuota as p, mkdir as r, rename as s, available as t, unlink as u };
|
package/fs.d.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { a as WriteData, i as Stats, n as MakeOptions, o as WriteOptions, r as ReadOptions, t as Callback } from "./index-C6ZoDJg8.js";
|
|
2
|
+
|
|
3
|
+
//#region src/lib/fs/index.d.ts
|
|
4
|
+
declare namespace index_d_exports {
|
|
5
|
+
export { Stats, appendFile, appendFileSync, available, _default as default, exists, existsSync, flush, lstatSync, mkdir, mkdirSync, mount, promises, pull, readFile, readFileSync, readdir, readdirSync, remount, rename, renameSync, rm, rmSync, rmdirSync, stat, statSync, unlink, unlinkSync, writeFile, writeFileSync };
|
|
6
|
+
}
|
|
7
|
+
declare const available: () => Promise<boolean>, readFileSync: (path: import("node:fs").PathLike, options?: ReadOptions) => Buffer | string, writeFileSync: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => void, appendFileSync: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => void, existsSync: (path: import("node:fs").PathLike) => boolean, statSync: (path: import("node:fs").PathLike) => Stats, lstatSync: (path: import("node:fs").PathLike) => Stats, readdirSync: (path: import("node:fs").PathLike) => string[], mkdirSync: (path: import("node:fs").PathLike, options?: MakeOptions) => void, rmSync: (path: import("node:fs").PathLike, options?: {
|
|
8
|
+
recursive?: boolean;
|
|
9
|
+
force?: boolean;
|
|
10
|
+
}) => void, rmdirSync: (path: import("node:fs").PathLike, options?: {
|
|
11
|
+
recursive?: boolean;
|
|
12
|
+
}) => void, unlinkSync: (path: import("node:fs").PathLike) => void, renameSync: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => void, readFile: (path: import("node:fs").PathLike, a: ReadOptions | Callback<Buffer | string>, b?: Callback<Buffer | string>) => void, writeFile: (path: import("node:fs").PathLike, data: WriteData, a: WriteOptions | Callback<void>, b?: Callback<void>) => void, appendFile: (path: import("node:fs").PathLike, data: WriteData, a: WriteOptions | Callback<void>, b?: Callback<void>) => void, stat: (path: import("node:fs").PathLike, callback: Callback<Stats>) => void, readdir: (path: import("node:fs").PathLike, a: unknown, b?: Callback<string[]>) => void, mkdir: (path: import("node:fs").PathLike, a: MakeOptions | Callback<void>, b?: Callback<void>) => void, rm: (path: import("node:fs").PathLike, a: {
|
|
13
|
+
recursive?: boolean;
|
|
14
|
+
force?: boolean;
|
|
15
|
+
} | Callback<void>, b?: Callback<void>) => void, unlink: (path: import("node:fs").PathLike, callback: Callback<void>) => void, rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike, callback: Callback<void>) => void, exists: (path: import("node:fs").PathLike, callback: (exists: boolean) => void) => void, promises: {
|
|
16
|
+
readFile: (path: import("node:fs").PathLike, options?: ReadOptions) => Promise<Buffer | string>;
|
|
17
|
+
writeFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>;
|
|
18
|
+
appendFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>;
|
|
19
|
+
stat: (path: import("node:fs").PathLike) => Promise<Stats>;
|
|
20
|
+
lstat: (path: import("node:fs").PathLike) => Promise<Stats>;
|
|
21
|
+
readdir: (path: import("node:fs").PathLike) => Promise<string[]>;
|
|
22
|
+
mkdir: (path: import("node:fs").PathLike, options?: MakeOptions) => Promise<void>;
|
|
23
|
+
rm: (path: import("node:fs").PathLike, options?: {
|
|
24
|
+
recursive?: boolean;
|
|
25
|
+
force?: boolean;
|
|
26
|
+
}) => Promise<void>;
|
|
27
|
+
rmdir: (path: import("node:fs").PathLike, options?: {
|
|
28
|
+
recursive?: boolean;
|
|
29
|
+
}) => Promise<void>;
|
|
30
|
+
unlink: (path: import("node:fs").PathLike) => Promise<void>;
|
|
31
|
+
rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => Promise<void>;
|
|
32
|
+
access: (path: import("node:fs").PathLike) => Promise<void>;
|
|
33
|
+
}, mount: () => Promise<void>, flush: () => Promise<void>, remount: () => Promise<void>;
|
|
34
|
+
declare const pull: (path: string) => Promise<Blob>;
|
|
35
|
+
declare const _default: {
|
|
36
|
+
available: () => Promise<boolean>;
|
|
37
|
+
readFileSync: (path: import("node:fs").PathLike, options?: ReadOptions) => Buffer | string;
|
|
38
|
+
writeFileSync: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => void;
|
|
39
|
+
appendFileSync: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => void;
|
|
40
|
+
existsSync: (path: import("node:fs").PathLike) => boolean;
|
|
41
|
+
statSync: (path: import("node:fs").PathLike) => Stats;
|
|
42
|
+
lstatSync: (path: import("node:fs").PathLike) => Stats;
|
|
43
|
+
readdirSync: (path: import("node:fs").PathLike) => string[];
|
|
44
|
+
mkdirSync: (path: import("node:fs").PathLike, options?: MakeOptions) => void;
|
|
45
|
+
rmSync: (path: import("node:fs").PathLike, options?: {
|
|
46
|
+
recursive?: boolean;
|
|
47
|
+
force?: boolean;
|
|
48
|
+
}) => void;
|
|
49
|
+
rmdirSync: (path: import("node:fs").PathLike, options?: {
|
|
50
|
+
recursive?: boolean;
|
|
51
|
+
}) => void;
|
|
52
|
+
unlinkSync: (path: import("node:fs").PathLike) => void;
|
|
53
|
+
renameSync: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => void;
|
|
54
|
+
readFile: (path: import("node:fs").PathLike, a: ReadOptions | Callback<Buffer | string>, b?: Callback<Buffer | string>) => void;
|
|
55
|
+
writeFile: (path: import("node:fs").PathLike, data: WriteData, a: WriteOptions | Callback<void>, b?: Callback<void>) => void;
|
|
56
|
+
appendFile: (path: import("node:fs").PathLike, data: WriteData, a: WriteOptions | Callback<void>, b?: Callback<void>) => void;
|
|
57
|
+
stat: (path: import("node:fs").PathLike, callback: Callback<Stats>) => void;
|
|
58
|
+
readdir: (path: import("node:fs").PathLike, a: unknown, b?: Callback<string[]>) => void;
|
|
59
|
+
mkdir: (path: import("node:fs").PathLike, a: MakeOptions | Callback<void>, b?: Callback<void>) => void;
|
|
60
|
+
rm: (path: import("node:fs").PathLike, a: {
|
|
61
|
+
recursive?: boolean;
|
|
62
|
+
force?: boolean;
|
|
63
|
+
} | Callback<void>, b?: Callback<void>) => void;
|
|
64
|
+
unlink: (path: import("node:fs").PathLike, callback: Callback<void>) => void;
|
|
65
|
+
rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike, callback: Callback<void>) => void;
|
|
66
|
+
exists: (path: import("node:fs").PathLike, callback: (exists: boolean) => void) => void;
|
|
67
|
+
promises: {
|
|
68
|
+
readFile: (path: import("node:fs").PathLike, options?: ReadOptions) => Promise<Buffer | string>;
|
|
69
|
+
writeFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>;
|
|
70
|
+
appendFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>;
|
|
71
|
+
stat: (path: import("node:fs").PathLike) => Promise<Stats>;
|
|
72
|
+
lstat: (path: import("node:fs").PathLike) => Promise<Stats>;
|
|
73
|
+
readdir: (path: import("node:fs").PathLike) => Promise<string[]>;
|
|
74
|
+
mkdir: (path: import("node:fs").PathLike, options?: MakeOptions) => Promise<void>;
|
|
75
|
+
rm: (path: import("node:fs").PathLike, options?: {
|
|
76
|
+
recursive?: boolean;
|
|
77
|
+
force?: boolean;
|
|
78
|
+
}) => Promise<void>;
|
|
79
|
+
rmdir: (path: import("node:fs").PathLike, options?: {
|
|
80
|
+
recursive?: boolean;
|
|
81
|
+
}) => Promise<void>;
|
|
82
|
+
unlink: (path: import("node:fs").PathLike) => Promise<void>;
|
|
83
|
+
rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => Promise<void>;
|
|
84
|
+
access: (path: import("node:fs").PathLike) => Promise<void>;
|
|
85
|
+
};
|
|
86
|
+
mount: () => Promise<void>;
|
|
87
|
+
flush: () => Promise<void>;
|
|
88
|
+
remount: () => Promise<void>;
|
|
89
|
+
pull: (path: string) => Promise<Blob>;
|
|
90
|
+
};
|
|
91
|
+
//#endregion
|
|
92
|
+
export { type Stats, appendFile, appendFileSync, available, _default as default, exists, existsSync, flush, lstatSync, mkdir, mkdirSync, mount, promises, pull, readFile, readFileSync, readdir, readdirSync, remount, rename, renameSync, rm, rmSync, rmdirSync, stat, statSync, index_d_exports as t, unlink, unlinkSync, writeFile, writeFileSync };
|
package/http.d.ts
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { n as Socket, t as Server$1 } from "./net-BDW1AVX1.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 };
|