@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.
Files changed (127) hide show
  1. package/account.d.ts +15 -0
  2. package/api-B0jZnr_N.d.ts +554 -0
  3. package/cloud/dgram.d.ts +2 -0
  4. package/cloud/dns.d.ts +3 -0
  5. package/cloud/fs/promises.d.ts +9 -0
  6. package/cloud/fs.d.ts +3 -0
  7. package/cloud/http.d.ts +2 -0
  8. package/cloud/net.d.ts +2 -0
  9. package/cloud-B4KIFGwa.cjs +1 -0
  10. package/{cloud-BFyf2uC7.js → cloud-Dsb33tl6.js} +29 -15
  11. package/cloud-jJi2d0cs.d.ts +41 -0
  12. package/cloud.cjs +1 -1
  13. package/cloud.d.ts +7 -0
  14. package/cloud.js +1 -1
  15. package/connect-button-D8KXSL6s.d.ts +4 -0
  16. package/desktop.d.ts +52 -0
  17. package/dgram.d.ts +91 -0
  18. package/dns.d.ts +12 -0
  19. package/extension-3pxUYwrA.d.ts +16 -0
  20. package/extension.d.ts +3 -0
  21. package/fs/promises.d.ts +12 -0
  22. package/fs-K7ROdxDx.d.ts +41 -0
  23. package/fs.d.ts +92 -0
  24. package/http.d.ts +186 -0
  25. package/index-BJztAQIP.d.ts +721 -0
  26. package/index-C6ZoDJg8.d.ts +31 -0
  27. package/index.cjs +1 -1
  28. package/index.d.ts +28 -0
  29. package/index.js +1 -1
  30. package/lookup-BtwWaCZJ.d.ts +7 -0
  31. package/net-5SVFcuzM.d.ts +140 -0
  32. package/net.d.ts +2 -0
  33. package/opfs/promises.d.ts +12 -0
  34. package/opfs.d.ts +90 -0
  35. package/package.json +23 -23
  36. package/packages-D36R2vBv.d.ts +108 -0
  37. package/packages.d.ts +2 -0
  38. package/react.d.ts +14 -0
  39. package/api/account.d.ts +0 -7
  40. package/api/broker-bridge.d.ts +0 -12
  41. package/api/connect-store.d.ts +0 -9
  42. package/api/connect.d.ts +0 -2
  43. package/api/data-plane.d.ts +0 -28
  44. package/api/dns/index.d.ts +0 -1
  45. package/api/dns/lookup.d.ts +0 -8
  46. package/api/index.d.ts +0 -78
  47. package/api/install-prompt.d.ts +0 -2
  48. package/api/local-net/index.d.ts +0 -43
  49. package/api/overlay-mount.d.ts +0 -2
  50. package/api/overlay.d.ts +0 -17
  51. package/api/packages/host.d.ts +0 -12
  52. package/api/packages/identity.d.ts +0 -1
  53. package/api/packages/index.d.ts +0 -34
  54. package/api/packages/picker.d.ts +0 -28
  55. package/api/packages/registry.d.ts +0 -20
  56. package/api/packages/store.d.ts +0 -6
  57. package/api/packages/types.d.ts +0 -56
  58. package/api/preconnect.d.ts +0 -1
  59. package/api/proxy/index.d.ts +0 -1
  60. package/api/proxy/proxy-fetch.d.ts +0 -5
  61. package/api/quota.d.ts +0 -10
  62. package/api/rate-token.d.ts +0 -3
  63. package/api/session-limit.d.ts +0 -1
  64. package/api/storage.d.ts +0 -20
  65. package/api/toast.d.ts +0 -1
  66. package/api/token-source.d.ts +0 -4
  67. package/api/ui-events.d.ts +0 -8
  68. package/api/ui-host.d.ts +0 -2
  69. package/api/webvpn/index.d.ts +0 -3
  70. package/api/webvpn/packets/metadata.d.ts +0 -31
  71. package/api/webvpn/packets/tcp-listener.d.ts +0 -39
  72. package/api/webvpn/packets/tcp.d.ts +0 -88
  73. package/api/webvpn/packets/udp.d.ts +0 -183
  74. package/api/webvpn/packets/utils.d.ts +0 -24
  75. package/api/webvpn/tcp-listener.d.ts +0 -11
  76. package/api/webvpn/tcp.d.ts +0 -33
  77. package/api/webvpn/udp.d.ts +0 -33
  78. package/api/webvpn/utils.d.ts +0 -26
  79. package/api/webvpn/webtransport.d.ts +0 -62
  80. package/api/worker/client.d.ts +0 -3
  81. package/api/worker/protocol.d.ts +0 -15
  82. package/cloud-5o7yJHeX.cjs +0 -1
  83. package/lib/account.d.ts +0 -14
  84. package/lib/api.d.ts +0 -300
  85. package/lib/auto.d.ts +0 -5
  86. package/lib/cloud/dgram.d.ts +0 -2
  87. package/lib/cloud/dns.d.ts +0 -1
  88. package/lib/cloud/frame.d.ts +0 -3
  89. package/lib/cloud/fs-promises.d.ts +0 -5
  90. package/lib/cloud/fs.d.ts +0 -22
  91. package/lib/cloud/http.d.ts +0 -2
  92. package/lib/cloud/net.d.ts +0 -2
  93. package/lib/cloud.d.ts +0 -10
  94. package/lib/connect-button.d.ts +0 -1
  95. package/lib/connect.d.ts +0 -1
  96. package/lib/desktop.d.ts +0 -47
  97. package/lib/dns.d.ts +0 -6
  98. package/lib/dom.d.ts +0 -2
  99. package/lib/extension-prompt.d.ts +0 -1
  100. package/lib/extension.d.ts +0 -4
  101. package/lib/fkn-target.d.ts +0 -1
  102. package/lib/frame.d.ts +0 -2
  103. package/lib/fs/content-type.d.ts +0 -1
  104. package/lib/fs/hybrid.d.ts +0 -10
  105. package/lib/fs/index.d.ts +0 -87
  106. package/lib/fs/opfs.d.ts +0 -8
  107. package/lib/fs/promises.d.ts +0 -8
  108. package/lib/fs/types.d.ts +0 -16
  109. package/lib/index.d.ts +0 -18
  110. package/lib/node-fs/index.d.ts +0 -95
  111. package/lib/node-fs/shared.d.ts +0 -39
  112. package/lib/node-fs/store.d.ts +0 -21
  113. package/lib/opfs/index.d.ts +0 -84
  114. package/lib/opfs/promises.d.ts +0 -8
  115. package/lib/overlay.d.ts +0 -14
  116. package/lib/packages.d.ts +0 -69
  117. package/lib/proxy.d.ts +0 -5
  118. package/lib/quota.d.ts +0 -20
  119. package/lib/react.d.ts +0 -7
  120. package/lib/relay.d.ts +0 -5
  121. package/lib/storage.d.ts +0 -22
  122. package/lib/webvpn/dgram.d.ts +0 -86
  123. package/lib/webvpn/http.d.ts +0 -180
  124. package/lib/webvpn/index.d.ts +0 -1
  125. package/lib/webvpn/net.d.ts +0 -132
  126. package/lib/webvpn/utils.d.ts +0 -32
  127. package/sandbox.d.ts +0 -7
package/lib/api.d.ts DELETED
@@ -1,300 +0,0 @@
1
- export type { Resolvers } from '../api';
2
- export declare const hasTransport: boolean;
3
- export declare const apiPromise: Promise<{
4
- readonly cloud: {
5
- readonly fetch: (input: string | Request | URL, init?: (RequestInit & {
6
- render?: boolean;
7
- }) | undefined) => Promise<Response>;
8
- readonly quota: () => Promise<{
9
- overQuota: boolean;
10
- remaining: number;
11
- usedBytes: number;
12
- limitBytes: number;
13
- premium: boolean;
14
- bytesPerSecond: number;
15
- }>;
16
- readonly dns: {
17
- readonly lookup: (hostname: string, options?: {
18
- all?: boolean | undefined;
19
- family?: 0 | 4 | 6;
20
- } | undefined) => Promise<{
21
- address: string;
22
- family: 0 | 4 | 6;
23
- }[] | {
24
- address: string;
25
- family: 0 | 4 | 6;
26
- } | undefined>;
27
- };
28
- readonly fs: {
29
- readonly available: () => Promise<boolean>;
30
- readonly list: () => Promise<{
31
- path: string;
32
- size: number;
33
- contentType: string | null;
34
- updatedAt: string;
35
- }[]>;
36
- readonly quota: () => Promise<{
37
- usedBytes: number;
38
- limitBytes: number;
39
- remaining: number;
40
- objects: number;
41
- maxObjects: number;
42
- }>;
43
- readonly readFile: (path: string) => Promise<Uint8Array<ArrayBufferLike>>;
44
- readonly writeFile: (path: string, data: import("../api/storage").WriteData, contentType: string | null) => Promise<void>;
45
- readonly remove: (path: string) => Promise<void>;
46
- };
47
- readonly webvpn: {
48
- readonly tcpSocket: (args_0: {
49
- remoteAddress: string;
50
- remotePort: number;
51
- }) => Promise<{
52
- localAddress: string;
53
- localFamily: 'IPv4' | 'IPv6';
54
- localPort: number;
55
- remoteAddress: string;
56
- remoteFamily: 'IPv4' | 'IPv6';
57
- remotePort: number;
58
- dataReadableStream: ReadableStream<Uint8Array>;
59
- dataWritableStream: WritableStream<Uint8Array>;
60
- end: () => Promise<void>;
61
- destroy: () => Promise<void>;
62
- destroySoon: () => Promise<void>;
63
- resetAndDestroy: () => Promise<void>;
64
- setOption: (option: import("../api/webvpn/tcp").TcpSocketOption) => Promise<void>;
65
- }>;
66
- readonly tcpSocketListener: (args_0: {
67
- localAddress: string;
68
- localPort: number;
69
- onConnection: (connection: import("../api/webvpn/tcp").TcpSocketResult) => void;
70
- }) => Promise<{
71
- localAddress: string;
72
- localFamily: "IPv4" | "IPv6";
73
- localPort: number;
74
- close: () => Promise<void>;
75
- }>;
76
- readonly udpSocket: (args_0: {
77
- type: 'udp4' | 'udp6';
78
- port: number;
79
- address: string;
80
- dataPort?: boolean;
81
- }) => Promise<{
82
- socketId: number;
83
- dataPort: MessagePort | undefined;
84
- localAddress: string;
85
- localFamily: "IPv4" | "IPv6";
86
- localPort: number;
87
- dataReadableStream: ReadableStream<{
88
- data: ArrayBuffer;
89
- size: number;
90
- family: 'IPv4' | 'IPv6';
91
- address: string;
92
- port: number;
93
- }>;
94
- connect: (args_0: {
95
- remoteAddress: string;
96
- remotePort: number;
97
- }) => Promise<void>;
98
- send: (args_0: {
99
- message: ArrayBuffer;
100
- address?: string;
101
- port?: number;
102
- }) => Promise<void>;
103
- close: () => Promise<void>;
104
- setOption: (option: import("../api/webvpn/udp").UdpSocketOption) => Promise<void>;
105
- }>;
106
- };
107
- };
108
- readonly overlay: {
109
- readonly setHost: (push: (state: {
110
- modal: boolean;
111
- rects: {
112
- x: number;
113
- y: number;
114
- width: number;
115
- height: number;
116
- }[];
117
- }) => unknown) => Promise<void>;
118
- };
119
- readonly installPrompt: {
120
- readonly show: (reason?: string | undefined) => Promise<void>;
121
- readonly hide: () => Promise<void>;
122
- };
123
- readonly connect: {
124
- readonly prompt: (consumerOrigin: string) => Promise<boolean>;
125
- };
126
- readonly packages: {
127
- search: (query: import("./packages").PackageQuery) => Promise<{
128
- error: import("./packages").PackagesErrorCode;
129
- message: string;
130
- } | {
131
- results: {
132
- uri: string;
133
- origin: 'npm';
134
- name: string;
135
- version: string;
136
- description: string;
137
- keywords: string[];
138
- publisher: string | null;
139
- downloadsMonthly: number | null;
140
- links: {
141
- npm?: string;
142
- homepage?: string;
143
- repository?: string;
144
- };
145
- installed: boolean;
146
- }[];
147
- }>;
148
- pick: (query: import("./packages").PackageQuery, options?: import("./packages").PickOptions | undefined) => Promise<{
149
- error: import("./packages").PackagesErrorCode;
150
- message: string;
151
- } | {
152
- results: {
153
- uri: string;
154
- origin: 'npm';
155
- name: string;
156
- version: string;
157
- description: string;
158
- keywords: string[];
159
- publisher: string | null;
160
- downloadsMonthly: number | null;
161
- links: {
162
- npm?: string;
163
- homepage?: string;
164
- repository?: string;
165
- };
166
- installed: boolean;
167
- }[];
168
- failed: string[];
169
- } | {
170
- declined: true;
171
- }>;
172
- install: (uri: string, options?: import("./packages").InstallOptions | undefined) => Promise<{
173
- error: import("./packages").PackagesErrorCode;
174
- message: string;
175
- } | {
176
- installed: {
177
- uri: string;
178
- name: string;
179
- version: string;
180
- installedAt: number;
181
- };
182
- } | {
183
- declined: true;
184
- }>;
185
- list: () => Promise<{
186
- results: {
187
- uri: string;
188
- name: string;
189
- version: string;
190
- installedAt: number;
191
- }[];
192
- }>;
193
- uninstall: (uri: string) => Promise<{
194
- error: import("./packages").PackagesErrorCode;
195
- message: string;
196
- } | {
197
- ok: true;
198
- }>;
199
- connect: (uri: string, options?: import("./packages").ConnectOptions | undefined) => Promise<{
200
- error: import("./packages").PackagesErrorCode;
201
- message: string;
202
- } | {
203
- port: MessagePort;
204
- closed: Promise<void>;
205
- }>;
206
- };
207
- readonly account: {
208
- readonly info: () => Promise<{
209
- name: string;
210
- image: string | null;
211
- premium: boolean;
212
- premiumUntil: string | null;
213
- } | null>;
214
- readonly login: (consumerOrigin: string) => Promise<boolean>;
215
- readonly logout: () => Promise<void>;
216
- readonly onChange: (listener: () => void) => Promise<() => Promise<void>>;
217
- };
218
- readonly proxyFetch: (input: string | Request | URL, init?: (RequestInit & {
219
- render?: boolean;
220
- }) | undefined) => Promise<Response>;
221
- readonly webVpnTcpSocket: (args_0: {
222
- remoteAddress: string;
223
- remotePort: number;
224
- }) => Promise<{
225
- localAddress: string;
226
- localFamily: 'IPv4' | 'IPv6';
227
- localPort: number;
228
- remoteAddress: string;
229
- remoteFamily: 'IPv4' | 'IPv6';
230
- remotePort: number;
231
- dataReadableStream: ReadableStream<Uint8Array>;
232
- dataWritableStream: WritableStream<Uint8Array>;
233
- end: () => Promise<void>;
234
- destroy: () => Promise<void>;
235
- destroySoon: () => Promise<void>;
236
- resetAndDestroy: () => Promise<void>;
237
- setOption: (option: import("../api/webvpn/tcp").TcpSocketOption) => Promise<void>;
238
- }>;
239
- readonly webVpnTcpSocketListener: (args_0: {
240
- localAddress: string;
241
- localPort: number;
242
- onConnection: (connection: import("../api/webvpn/tcp").TcpSocketResult) => void;
243
- }) => Promise<{
244
- localAddress: string;
245
- localFamily: "IPv4" | "IPv6";
246
- localPort: number;
247
- close: () => Promise<void>;
248
- }>;
249
- readonly webVpnUdpSocket: (args_0: {
250
- type: 'udp4' | 'udp6';
251
- port: number;
252
- address: string;
253
- dataPort?: boolean;
254
- }) => Promise<{
255
- socketId: number;
256
- dataPort: MessagePort | undefined;
257
- localAddress: string;
258
- localFamily: "IPv4" | "IPv6";
259
- localPort: number;
260
- dataReadableStream: ReadableStream<{
261
- data: ArrayBuffer;
262
- size: number;
263
- family: 'IPv4' | 'IPv6';
264
- address: string;
265
- port: number;
266
- }>;
267
- connect: (args_0: {
268
- remoteAddress: string;
269
- remotePort: number;
270
- }) => Promise<void>;
271
- send: (args_0: {
272
- message: ArrayBuffer;
273
- address?: string;
274
- port?: number;
275
- }) => Promise<void>;
276
- close: () => Promise<void>;
277
- setOption: (option: import("../api/webvpn/udp").UdpSocketOption) => Promise<void>;
278
- }>;
279
- readonly dnsLookup: (hostname: string, options?: {
280
- all?: boolean | undefined;
281
- family?: 0 | 4 | 6;
282
- } | undefined) => Promise<{
283
- address: string;
284
- family: 0 | 4 | 6;
285
- }[] | {
286
- address: string;
287
- family: 0 | 4 | 6;
288
- } | undefined>;
289
- readonly setOverlayHost: (push: (state: {
290
- modal: boolean;
291
- rects: {
292
- x: number;
293
- y: number;
294
- width: number;
295
- height: number;
296
- }[];
297
- }) => unknown) => Promise<void>;
298
- readonly showInstallPrompt: (reason?: string | undefined) => Promise<void>;
299
- readonly hideInstallPrompt: () => Promise<void>;
300
- }>;
package/lib/auto.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export declare const isExtensionAvailable: () => boolean;
2
- export declare const fetch: (input: RequestInfo | URL, init?: RequestInit & {
3
- reason?: string;
4
- render?: boolean;
5
- }) => Promise<Response>;
@@ -1,2 +0,0 @@
1
- export * from '../webvpn/dgram';
2
- export { default } from '../webvpn/dgram';
@@ -1 +0,0 @@
1
- export * from '../dns';
@@ -1,3 +0,0 @@
1
- import type { AttachFrameOptions, Frame } from '@mfkn/web-extension';
2
- export declare const attachFrame: ({ iframe, domains, syncCookies, lockdown }: AttachFrameOptions) => Promise<Frame>;
3
- export declare const available: () => boolean;
@@ -1,5 +0,0 @@
1
- export declare const readFile: (path: import("node:fs").PathLike, options?: import("../node-fs/shared").ReadOptions) => Promise<Buffer | string>, writeFile: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, options?: import("../node-fs/shared").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?: import("../node-fs/shared").MakeOptions) => Promise<void>, rm: (path: import("node:fs").PathLike, options?: {
2
- recursive?: boolean;
3
- }) => Promise<void>, rmdir: (path: import("node:fs").PathLike, options?: {
4
- recursive?: boolean;
5
- }) => Promise<void>, stat: (path: import("node:fs").PathLike) => Promise<import("./fs").Stats>, lstat: (path: import("node:fs").PathLike) => Promise<import("./fs").Stats>, access: (path: import("node:fs").PathLike) => Promise<void>;
package/lib/cloud/fs.d.ts DELETED
@@ -1,22 +0,0 @@
1
- export type { Stats } from '../node-fs';
2
- export { quota } from '../storage';
3
- export type { FileEntry, StorageQuota } from '../storage';
4
- export declare const available: () => Promise<boolean>, readFile: (path: import("node:fs").PathLike, a: import("../node-fs/shared").ReadOptions | import("../node-fs/shared").Callback<Buffer | string>, b?: import("../node-fs/shared").Callback<Buffer | string>) => void, writeFile: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, a: import("../node-fs/shared").WriteOptions | import("../node-fs/shared").Callback<void>, b?: import("../node-fs/shared").Callback<void>) => void, unlink: (path: import("node:fs").PathLike, callback: import("../node-fs/shared").Callback<void>) => void, rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike, callback: import("../node-fs/shared").Callback<void>) => void, readdir: (path: import("node:fs").PathLike, a: unknown, b?: import("../node-fs/shared").Callback<string[]>) => void, mkdir: (path: import("node:fs").PathLike, a: import("../node-fs/shared").MakeOptions | import("../node-fs/shared").Callback<void>, b?: import("../node-fs/shared").Callback<void>) => void, rm: (path: import("node:fs").PathLike, a: {
5
- recursive?: boolean;
6
- } | import("../node-fs/shared").Callback<void>, b?: import("../node-fs/shared").Callback<void>) => void, stat: (path: import("node:fs").PathLike, callback: import("../node-fs/shared").Callback<import("./fs").Stats>) => void, promises: {
7
- readFile: (path: import("node:fs").PathLike, options?: import("../node-fs/shared").ReadOptions) => Promise<Buffer | string>;
8
- writeFile: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, options?: import("../node-fs/shared").WriteOptions) => Promise<void>;
9
- unlink: (path: import("node:fs").PathLike) => Promise<void>;
10
- rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => Promise<void>;
11
- readdir: (path: import("node:fs").PathLike) => Promise<string[]>;
12
- mkdir: (_path?: import("node:fs").PathLike, _options?: import("../node-fs/shared").MakeOptions) => Promise<void>;
13
- rm: (path: import("node:fs").PathLike, options?: {
14
- recursive?: boolean;
15
- }) => Promise<void>;
16
- rmdir: (path: import("node:fs").PathLike, options?: {
17
- recursive?: boolean;
18
- }) => Promise<void>;
19
- stat: (path: import("node:fs").PathLike) => Promise<import("./fs").Stats>;
20
- lstat: (path: import("node:fs").PathLike) => Promise<import("./fs").Stats>;
21
- access: (path: import("node:fs").PathLike) => Promise<void>;
22
- };
@@ -1,2 +0,0 @@
1
- export * from '../webvpn/http';
2
- export { default } from '../webvpn/http';
@@ -1,2 +0,0 @@
1
- export * from '../webvpn/net';
2
- export { default } from '../webvpn/net';
package/lib/cloud.d.ts DELETED
@@ -1,10 +0,0 @@
1
- export { cloudFetch as fetch } from './proxy';
2
- export { attachFrame } from './cloud/frame';
3
- export { quota } from './quota';
4
- export type { QuotaStatus } from './quota';
5
- export * as dns from './dns';
6
- export * as fs from './cloud/fs';
7
- export * as net from './webvpn/net';
8
- export * as dgram from './webvpn/dgram';
9
- export * as http from './webvpn/http';
10
- export declare const available: () => boolean;
@@ -1 +0,0 @@
1
- export declare const connectButtonUrl: (origin?: string) => string;
package/lib/connect.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const connect: () => Promise<boolean>;
package/lib/desktop.d.ts DELETED
@@ -1,47 +0,0 @@
1
- export declare const available: () => boolean;
2
- export declare const fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
3
- export declare const dns: {
4
- lookup: (..._args: unknown[]) => never;
5
- };
6
- export declare const net: {
7
- connect: (..._args: unknown[]) => never;
8
- createConnection: (..._args: unknown[]) => never;
9
- createServer: (..._args: unknown[]) => never;
10
- };
11
- export declare const dgram: {
12
- createSocket: (..._args: unknown[]) => never;
13
- };
14
- export declare const fs: {
15
- available: () => Promise<boolean>;
16
- readFile: (..._args: unknown[]) => never;
17
- readFileSync: (..._args: unknown[]) => never;
18
- writeFile: (..._args: unknown[]) => never;
19
- writeFileSync: (..._args: unknown[]) => never;
20
- appendFile: (..._args: unknown[]) => never;
21
- appendFileSync: (..._args: unknown[]) => never;
22
- existsSync: (..._args: unknown[]) => never;
23
- stat: (..._args: unknown[]) => never;
24
- statSync: (..._args: unknown[]) => never;
25
- readdir: (..._args: unknown[]) => never;
26
- readdirSync: (..._args: unknown[]) => never;
27
- mkdir: (..._args: unknown[]) => never;
28
- mkdirSync: (..._args: unknown[]) => never;
29
- rm: (..._args: unknown[]) => never;
30
- rmSync: (..._args: unknown[]) => never;
31
- unlink: (..._args: unknown[]) => never;
32
- unlinkSync: (..._args: unknown[]) => never;
33
- rename: (..._args: unknown[]) => never;
34
- renameSync: (..._args: unknown[]) => never;
35
- mount: (..._args: unknown[]) => never;
36
- flush: (..._args: unknown[]) => never;
37
- promises: {
38
- readFile: (..._args: unknown[]) => never;
39
- writeFile: (..._args: unknown[]) => never;
40
- unlink: (..._args: unknown[]) => never;
41
- rename: (..._args: unknown[]) => never;
42
- readdir: (..._args: unknown[]) => never;
43
- mkdir: (..._args: unknown[]) => never;
44
- rm: (..._args: unknown[]) => never;
45
- stat: (..._args: unknown[]) => never;
46
- };
47
- };
package/lib/dns.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import type { AddressLookupResult } from '../api/dns';
2
- export type { AddressLookupResult } from '../api/dns';
3
- export declare const lookup: <T extends boolean = false>(hostname: string, options?: {
4
- all?: T;
5
- family?: 0 | 4 | 6;
6
- }) => Promise<T extends true ? AddressLookupResult[] : AddressLookupResult | undefined>;
package/lib/dom.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare const iframe: HTMLIFrameElement | null;
2
- export declare const targetWindow: Window | null;
@@ -1 +0,0 @@
1
- export declare const promptInstall: (reason?: string) => Promise<boolean>;
@@ -1,4 +0,0 @@
1
- export * from '@mfkn/web-extension';
2
- export { extension as events } from '@mfkn/web-extension';
3
- export { promptInstall } from './extension-prompt';
4
- export { isExtensionAvailable as available } from './auto';
@@ -1 +0,0 @@
1
- export declare const assertNotFknTarget: (input: RequestInfo | URL) => void;
package/lib/frame.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import type { AttachFrameOptions, Frame } from '@mfkn/web-extension';
2
- export declare const attachFrame: (options: AttachFrameOptions) => Promise<Frame>;
@@ -1 +0,0 @@
1
- export declare const resolveContentType: (path: string, override?: string) => string | undefined;
@@ -1,10 +0,0 @@
1
- import type { FileEntry, WriteData } from './types';
2
- export type { FileEntry, FileSystem, WriteData } from './types';
3
- export declare const available: () => Promise<boolean>;
4
- export declare const list: () => Promise<FileEntry[]>;
5
- export declare const readFile: (path: string) => Promise<Blob>;
6
- export declare const writeFile: (path: string, data: WriteData, opts?: {
7
- contentType?: string;
8
- }) => Promise<void>;
9
- export declare const remove: (path: string) => Promise<void>;
10
- export declare const pull: (path: string) => Promise<Blob>;
package/lib/fs/index.d.ts DELETED
@@ -1,87 +0,0 @@
1
- import * as hybrid from './hybrid';
2
- export type { Stats } from '../node-fs';
3
- export declare const available: () => Promise<boolean>, readFileSync: (path: import("node:fs").PathLike, options?: import("../node-fs/shared").ReadOptions) => Buffer | string, writeFileSync: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, options?: import("../node-fs/shared").WriteOptions) => void, appendFileSync: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, options?: import("../node-fs/shared").WriteOptions) => void, existsSync: (path: import("node:fs").PathLike) => boolean, statSync: (path: import("node:fs").PathLike) => import(".").Stats, lstatSync: (path: import("node:fs").PathLike) => import(".").Stats, readdirSync: (path: import("node:fs").PathLike) => string[], mkdirSync: (path: import("node:fs").PathLike, options?: import("../node-fs/shared").MakeOptions) => void, rmSync: (path: import("node:fs").PathLike, options?: {
4
- recursive?: boolean;
5
- force?: boolean;
6
- }) => void, rmdirSync: (path: import("node:fs").PathLike, options?: {
7
- recursive?: boolean;
8
- }) => 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: import("../node-fs/shared").ReadOptions | import("../node-fs/shared").Callback<Buffer | string>, b?: import("../node-fs/shared").Callback<Buffer | string>) => void, writeFile: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, a: import("../node-fs/shared").WriteOptions | import("../node-fs/shared").Callback<void>, b?: import("../node-fs/shared").Callback<void>) => void, appendFile: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, a: import("../node-fs/shared").WriteOptions | import("../node-fs/shared").Callback<void>, b?: import("../node-fs/shared").Callback<void>) => void, stat: (path: import("node:fs").PathLike, callback: import("../node-fs/shared").Callback<import(".").Stats>) => void, readdir: (path: import("node:fs").PathLike, a: unknown, b?: import("../node-fs/shared").Callback<string[]>) => void, mkdir: (path: import("node:fs").PathLike, a: import("../node-fs/shared").MakeOptions | import("../node-fs/shared").Callback<void>, b?: import("../node-fs/shared").Callback<void>) => void, rm: (path: import("node:fs").PathLike, a: {
9
- recursive?: boolean;
10
- force?: boolean;
11
- } | import("../node-fs/shared").Callback<void>, b?: import("../node-fs/shared").Callback<void>) => void, unlink: (path: import("node:fs").PathLike, callback: import("../node-fs/shared").Callback<void>) => void, rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike, callback: import("../node-fs/shared").Callback<void>) => void, exists: (path: import("node:fs").PathLike, callback: (exists: boolean) => void) => void, promises: {
12
- readFile: (path: import("node:fs").PathLike, options?: import("../node-fs/shared").ReadOptions) => Promise<Buffer | string>;
13
- writeFile: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, options?: import("../node-fs/shared").WriteOptions) => Promise<void>;
14
- appendFile: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, options?: import("../node-fs/shared").WriteOptions) => Promise<void>;
15
- stat: (path: import("node:fs").PathLike) => Promise<import(".").Stats>;
16
- lstat: (path: import("node:fs").PathLike) => Promise<import(".").Stats>;
17
- readdir: (path: import("node:fs").PathLike) => Promise<string[]>;
18
- mkdir: (path: import("node:fs").PathLike, options?: import("../node-fs/shared").MakeOptions) => Promise<void>;
19
- rm: (path: import("node:fs").PathLike, options?: {
20
- recursive?: boolean;
21
- force?: boolean;
22
- }) => Promise<void>;
23
- rmdir: (path: import("node:fs").PathLike, options?: {
24
- recursive?: boolean;
25
- }) => 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
- access: (path: import("node:fs").PathLike) => Promise<void>;
29
- }, mount: () => Promise<void>, flush: () => Promise<void>, remount: () => Promise<void>;
30
- export declare const pull: typeof hybrid.pull;
31
- declare const _default: {
32
- available: () => Promise<boolean>;
33
- readFileSync: (path: import("node:fs").PathLike, options?: import("../node-fs/shared").ReadOptions) => Buffer | string;
34
- writeFileSync: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, options?: import("../node-fs/shared").WriteOptions) => void;
35
- appendFileSync: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, options?: import("../node-fs/shared").WriteOptions) => void;
36
- existsSync: (path: import("node:fs").PathLike) => boolean;
37
- statSync: (path: import("node:fs").PathLike) => import(".").Stats;
38
- lstatSync: (path: import("node:fs").PathLike) => import(".").Stats;
39
- readdirSync: (path: import("node:fs").PathLike) => string[];
40
- mkdirSync: (path: import("node:fs").PathLike, options?: import("../node-fs/shared").MakeOptions) => void;
41
- rmSync: (path: import("node:fs").PathLike, options?: {
42
- recursive?: boolean;
43
- force?: boolean;
44
- }) => void;
45
- rmdirSync: (path: import("node:fs").PathLike, options?: {
46
- recursive?: boolean;
47
- }) => void;
48
- unlinkSync: (path: import("node:fs").PathLike) => void;
49
- renameSync: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => void;
50
- readFile: (path: import("node:fs").PathLike, a: import("../node-fs/shared").ReadOptions | import("../node-fs/shared").Callback<Buffer | string>, b?: import("../node-fs/shared").Callback<Buffer | string>) => void;
51
- writeFile: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, a: import("../node-fs/shared").WriteOptions | import("../node-fs/shared").Callback<void>, b?: import("../node-fs/shared").Callback<void>) => void;
52
- appendFile: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, a: import("../node-fs/shared").WriteOptions | import("../node-fs/shared").Callback<void>, b?: import("../node-fs/shared").Callback<void>) => void;
53
- stat: (path: import("node:fs").PathLike, callback: import("../node-fs/shared").Callback<import(".").Stats>) => void;
54
- readdir: (path: import("node:fs").PathLike, a: unknown, b?: import("../node-fs/shared").Callback<string[]>) => void;
55
- mkdir: (path: import("node:fs").PathLike, a: import("../node-fs/shared").MakeOptions | import("../node-fs/shared").Callback<void>, b?: import("../node-fs/shared").Callback<void>) => void;
56
- rm: (path: import("node:fs").PathLike, a: {
57
- recursive?: boolean;
58
- force?: boolean;
59
- } | import("../node-fs/shared").Callback<void>, b?: import("../node-fs/shared").Callback<void>) => void;
60
- unlink: (path: import("node:fs").PathLike, callback: import("../node-fs/shared").Callback<void>) => void;
61
- rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike, callback: import("../node-fs/shared").Callback<void>) => void;
62
- exists: (path: import("node:fs").PathLike, callback: (exists: boolean) => void) => void;
63
- promises: {
64
- readFile: (path: import("node:fs").PathLike, options?: import("../node-fs/shared").ReadOptions) => Promise<Buffer | string>;
65
- writeFile: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, options?: import("../node-fs/shared").WriteOptions) => Promise<void>;
66
- appendFile: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, options?: import("../node-fs/shared").WriteOptions) => Promise<void>;
67
- stat: (path: import("node:fs").PathLike) => Promise<import(".").Stats>;
68
- lstat: (path: import("node:fs").PathLike) => Promise<import(".").Stats>;
69
- readdir: (path: import("node:fs").PathLike) => Promise<string[]>;
70
- mkdir: (path: import("node:fs").PathLike, options?: import("../node-fs/shared").MakeOptions) => Promise<void>;
71
- rm: (path: import("node:fs").PathLike, options?: {
72
- recursive?: boolean;
73
- force?: boolean;
74
- }) => Promise<void>;
75
- rmdir: (path: import("node:fs").PathLike, options?: {
76
- recursive?: boolean;
77
- }) => Promise<void>;
78
- unlink: (path: import("node:fs").PathLike) => Promise<void>;
79
- rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => Promise<void>;
80
- access: (path: import("node:fs").PathLike) => Promise<void>;
81
- };
82
- mount: () => Promise<void>;
83
- flush: () => Promise<void>;
84
- remount: () => Promise<void>;
85
- pull: typeof hybrid.pull;
86
- };
87
- export default _default;
package/lib/fs/opfs.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import type { FileEntry, WriteData } from './types';
2
- export declare const available: () => Promise<boolean>;
3
- export declare const writeFile: (path: string, data: WriteData, opts?: {
4
- contentType?: string;
5
- }) => Promise<void>;
6
- export declare const readFile: (path: string) => Promise<Blob>;
7
- export declare const remove: (path: string) => Promise<void>;
8
- export declare const list: () => Promise<FileEntry[]>;
@@ -1,8 +0,0 @@
1
- import { promises } from './index';
2
- export declare const readFile: (path: import("node:fs").PathLike, options?: import("../node-fs/shared").ReadOptions) => Promise<Buffer | string>, writeFile: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, options?: import("../node-fs/shared").WriteOptions) => Promise<void>, appendFile: (path: import("node:fs").PathLike, data: import("../node-fs/shared").WriteData, options?: import("../node-fs/shared").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?: import("../node-fs/shared").MakeOptions) => Promise<void>, rm: (path: import("node:fs").PathLike, options?: {
3
- recursive?: boolean;
4
- force?: boolean;
5
- }) => Promise<void>, rmdir: (path: import("node:fs").PathLike, options?: {
6
- recursive?: boolean;
7
- }) => Promise<void>, stat: (path: import("node:fs").PathLike) => Promise<import("./index").Stats>, lstat: (path: import("node:fs").PathLike) => Promise<import("./index").Stats>, access: (path: import("node:fs").PathLike) => Promise<void>;
8
- export default promises;
package/lib/fs/types.d.ts DELETED
@@ -1,16 +0,0 @@
1
- export type FileEntry = {
2
- path: string;
3
- size: number;
4
- contentType: string | null;
5
- updatedAt: string | null;
6
- };
7
- export type WriteData = Blob | ArrayBuffer | Uint8Array | string;
8
- export type FileSystem = {
9
- available: () => Promise<boolean>;
10
- list: () => Promise<FileEntry[]>;
11
- readFile: (path: string) => Promise<Blob>;
12
- writeFile: (path: string, data: WriteData, opts?: {
13
- contentType?: string;
14
- }) => Promise<void>;
15
- remove: (path: string) => Promise<void>;
16
- };
package/lib/index.d.ts DELETED
@@ -1,18 +0,0 @@
1
- export * from '@mfkn/web-extension';
2
- export * as cloud from './cloud';
3
- export * as extension from './extension';
4
- export * as desktop from './desktop';
5
- export { fetch } from './auto';
6
- export * as dns from './dns';
7
- export * as fs from './fs';
8
- export * as opfs from './opfs';
9
- export * as net from './webvpn/net';
10
- export * as dgram from './webvpn/dgram';
11
- export * as http from './webvpn/http';
12
- export { attachFrame } from './frame';
13
- export { relayWorker } from './relay';
14
- export * as packages from './packages';
15
- export { promptInstall } from './extension-prompt';
16
- export { connect } from './connect';
17
- export * as account from './account';
18
- export { connectButtonUrl } from './connect-button';