@fkn/lib 0.4.9 → 0.5.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.
Files changed (88) hide show
  1. package/account.cjs +1 -0
  2. package/account.d.ts +17 -0
  3. package/account.js +28 -0
  4. package/api-ByfayMm1.js +67 -0
  5. package/api-CDb2pv7C.cjs +1 -0
  6. package/background-Dk_vaVP1.cjs +1 -0
  7. package/{background-CTsVv_a0.js → background-TtzKw6g0.js} +5 -4
  8. package/chunk-B6C_zzib.cjs +1 -0
  9. package/chunk-CPXzm0be.js +11 -0
  10. package/cloud/dgram.cjs +1 -0
  11. package/cloud/dgram.d.ts +537 -0
  12. package/cloud/dgram.js +4 -0
  13. package/cloud/dns.cjs +1 -0
  14. package/cloud/dns.d.ts +12 -0
  15. package/cloud/dns.js +3 -0
  16. package/cloud/fs/promises.cjs +1 -0
  17. package/cloud/fs/promises.d.ts +45 -0
  18. package/cloud/fs/promises.js +8 -0
  19. package/cloud/fs.cjs +1 -0
  20. package/cloud/fs.d.ts +75 -0
  21. package/cloud/fs.js +20 -0
  22. package/cloud/http.cjs +1 -0
  23. package/cloud/http.d.ts +767 -0
  24. package/cloud/http.js +5 -0
  25. package/cloud/net.cjs +1 -0
  26. package/cloud/net.d.ts +606 -0
  27. package/cloud/net.js +4 -0
  28. package/cloud-BVnscun4.js +33 -0
  29. package/cloud-DTL2B5pW.cjs +1 -0
  30. package/cloud.cjs +1 -0
  31. package/cloud.d.ts +1048 -0
  32. package/cloud.js +12 -0
  33. package/desktop.cjs +1 -0
  34. package/desktop.d.ts +49 -0
  35. package/desktop.js +51 -0
  36. package/dgram-5YUb70O2.js +326 -0
  37. package/dgram-Cdi6Y7zJ.cjs +1 -0
  38. package/dgram.cjs +1 -0
  39. package/dgram.d.ts +537 -0
  40. package/dgram.js +4 -0
  41. package/dns.cjs +1 -0
  42. package/dns.d.ts +12 -0
  43. package/dns.js +6 -0
  44. package/extension-9Uv_0HdS.cjs +1 -0
  45. package/extension-Dgz0UTy0.js +245 -0
  46. package/extension.cjs +1 -0
  47. package/extension.d.ts +853 -0
  48. package/extension.js +5 -0
  49. package/fs/promises.cjs +1 -0
  50. package/fs/promises.d.ts +46 -0
  51. package/fs/promises.js +8 -0
  52. package/fs-B7JumDCn.js +78 -0
  53. package/fs-DrwvwtqC.cjs +1 -0
  54. package/fs.cjs +1 -0
  55. package/fs.d.ts +84 -0
  56. package/fs.js +5 -0
  57. package/http.cjs +9 -0
  58. package/http.d.ts +767 -0
  59. package/http.js +541 -0
  60. package/index.cjs +1 -9
  61. package/index.d.ts +197 -140
  62. package/index.js +27 -1879
  63. package/locator-Cf7M3QKN.cjs +53 -0
  64. package/{locator-Q5m8i40Z.js → locator-DxAsGV_o.js} +331 -337
  65. package/net-Bl6_W3bd.js +275 -0
  66. package/net-C5kWnI4C.cjs +1 -0
  67. package/net.cjs +1 -0
  68. package/net.d.ts +606 -0
  69. package/net.js +4 -0
  70. package/node-fs-Bd_UUx1m.js +361 -0
  71. package/node-fs-lrlD_zqB.cjs +1 -0
  72. package/opfs/promises.cjs +1 -0
  73. package/opfs/promises.d.ts +46 -0
  74. package/opfs/promises.js +6 -0
  75. package/opfs-BfcYLPGb.js +55 -0
  76. package/opfs-Dsi4FkJU.cjs +1 -0
  77. package/opfs.cjs +1 -0
  78. package/opfs.d.ts +83 -0
  79. package/opfs.js +35 -0
  80. package/package.json +91 -1
  81. package/proxy-A9UvWUaF.cjs +1 -0
  82. package/proxy-wiZN4eTR.js +14 -0
  83. package/storage-BadvHtv0.cjs +1 -0
  84. package/storage-z0q3iena.js +13 -0
  85. package/utils-BsNRWMfl.cjs +1 -0
  86. package/utils-CNydj3OT.js +52 -0
  87. package/background-BqRFQggD.cjs +0 -1
  88. package/locator-Cjl21Nkt.cjs +0 -53
package/cloud/fs.d.ts ADDED
@@ -0,0 +1,75 @@
1
+ import * as node_fs from 'node:fs';
2
+
3
+ type ReadOptions = BufferEncoding | {
4
+ encoding?: BufferEncoding | null;
5
+ flag?: string;
6
+ } | null | undefined;
7
+ type WriteOptions = BufferEncoding | {
8
+ encoding?: BufferEncoding | null;
9
+ mode?: number;
10
+ flag?: string;
11
+ contentType?: string;
12
+ } | null | undefined;
13
+ type WriteData = string | Uint8Array | ArrayBuffer | DataView;
14
+ type MakeOptions = {
15
+ recursive?: boolean;
16
+ } | number | null | undefined;
17
+ type Callback<R> = (error: NodeJS.ErrnoException | null, result?: R) => void;
18
+ type Stats = {
19
+ size: number;
20
+ mtimeMs: number;
21
+ mtime: Date;
22
+ atimeMs: number;
23
+ ctimeMs: number;
24
+ mode: number;
25
+ isFile: () => boolean;
26
+ isDirectory: () => boolean;
27
+ isSymbolicLink: () => boolean;
28
+ };
29
+
30
+ type FileEntry = {
31
+ path: string;
32
+ size: number;
33
+ contentType: string | null;
34
+ updatedAt: string;
35
+ };
36
+ type StorageQuota = {
37
+ usedBytes: number;
38
+ limitBytes: number;
39
+ remaining: number;
40
+ objects: number;
41
+ maxObjects: number;
42
+ };
43
+ declare const quota: () => Promise<StorageQuota>;
44
+
45
+ declare const available: () => Promise<boolean>;
46
+ declare const readFile: (path: node_fs.PathLike, a: ReadOptions | Callback<Buffer | string>, b?: Callback<Buffer | string>) => void;
47
+ declare const writeFile: (path: node_fs.PathLike, data: WriteData, a: WriteOptions | Callback<void>, b?: Callback<void>) => void;
48
+ declare const unlink: (path: node_fs.PathLike, callback: Callback<void>) => void;
49
+ declare const rename: (from: node_fs.PathLike, to: node_fs.PathLike, callback: Callback<void>) => void;
50
+ declare const readdir: (path: node_fs.PathLike, a: unknown, b?: Callback<string[]>) => void;
51
+ declare const mkdir: (path: node_fs.PathLike, a: MakeOptions | Callback<void>, b?: Callback<void>) => void;
52
+ declare const rm: (path: node_fs.PathLike, a: {
53
+ recursive?: boolean;
54
+ } | Callback<void>, b?: Callback<void>) => void;
55
+ declare const stat: (path: node_fs.PathLike, callback: Callback<Stats>) => void;
56
+ declare const promises: {
57
+ readFile: (path: node_fs.PathLike, options?: ReadOptions) => Promise<Buffer | string>;
58
+ writeFile: (path: node_fs.PathLike, data: WriteData, options?: WriteOptions) => Promise<void>;
59
+ unlink: (path: node_fs.PathLike) => Promise<void>;
60
+ rename: (from: node_fs.PathLike, to: node_fs.PathLike) => Promise<void>;
61
+ readdir: (path: node_fs.PathLike) => Promise<string[]>;
62
+ mkdir: (_path?: node_fs.PathLike, _options?: MakeOptions) => Promise<void>;
63
+ rm: (path: node_fs.PathLike, options?: {
64
+ recursive?: boolean;
65
+ }) => Promise<void>;
66
+ rmdir: (path: node_fs.PathLike, options?: {
67
+ recursive?: boolean;
68
+ }) => Promise<void>;
69
+ stat: (path: node_fs.PathLike) => Promise<Stats>;
70
+ lstat: (path: node_fs.PathLike) => Promise<Stats>;
71
+ access: (path: node_fs.PathLike) => Promise<void>;
72
+ };
73
+
74
+ export { available, mkdir, promises, quota, readFile, readdir, rename, rm, stat, unlink, writeFile };
75
+ export type { FileEntry, Stats, StorageQuota };
package/cloud/fs.js ADDED
@@ -0,0 +1,20 @@
1
+ import { n as e } from "../chunk-CPXzm0be.js";
2
+ import "../api-ByfayMm1.js";
3
+ import { t } from "../node-fs-Bd_UUx1m.js";
4
+ import { o as n, r } from "../storage-z0q3iena.js";
5
+ //#region src/lib/cloud/fs.ts
6
+ var i = /* @__PURE__ */ e({
7
+ available: () => a,
8
+ mkdir: () => d,
9
+ promises: () => m,
10
+ quota: () => r,
11
+ readFile: () => o,
12
+ readdir: () => u,
13
+ rename: () => l,
14
+ rm: () => f,
15
+ stat: () => p,
16
+ unlink: () => c,
17
+ writeFile: () => s
18
+ }), { available: a, readFile: o, writeFile: s, unlink: c, rename: l, readdir: u, mkdir: d, rm: f, stat: p, promises: m } = t(n, { memfs: !1 });
19
+ //#endregion
20
+ export { a as available, d as mkdir, m as promises, r as quota, o as readFile, u as readdir, l as rename, f as rm, p as stat, i as t, c as unlink, s as writeFile };
package/cloud/http.cjs ADDED
@@ -0,0 +1 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../api-CDb2pv7C.cjs`),require(`../utils-BsNRWMfl.cjs`),require(`../net-C5kWnI4C.cjs`);const e=require(`../http.cjs`);exports.Agent=e.Agent,exports.ClientRequest=e.ClientRequest,exports.HTTPParser=e.HTTPParser,exports.IncomingMessage=e.IncomingMessage,exports.METHODS=e.METHODS,exports.STATUS_CODES=e.STATUS_CODES,exports.Server=e.Server,exports.ServerResponse=e.ServerResponse,exports._default=e._default,exports.default=e._default,exports.createServer=e.createServer,exports.get=e.get,exports.globalAgent=e.globalAgent,exports.request=e.request;