@fkn/lib 0.4.9 → 0.5.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.cjs +1 -0
- package/account.d.ts +17 -0
- package/account.js +28 -0
- package/api-ByfayMm1.js +67 -0
- package/api-CDb2pv7C.cjs +1 -0
- package/background-Dk_vaVP1.cjs +1 -0
- package/{background-CTsVv_a0.js → background-TtzKw6g0.js} +5 -4
- package/chunk-B6C_zzib.cjs +1 -0
- package/chunk-CPXzm0be.js +11 -0
- package/cloud/dgram.cjs +1 -0
- package/cloud/dgram.d.ts +537 -0
- package/cloud/dgram.js +4 -0
- package/cloud/dns.cjs +1 -0
- package/cloud/dns.d.ts +12 -0
- package/cloud/dns.js +3 -0
- package/cloud/fs/promises.cjs +1 -0
- package/cloud/fs/promises.d.ts +45 -0
- package/cloud/fs/promises.js +8 -0
- package/cloud/fs.cjs +1 -0
- package/cloud/fs.d.ts +75 -0
- package/cloud/fs.js +20 -0
- package/cloud/http.cjs +1 -0
- package/cloud/http.d.ts +767 -0
- package/cloud/http.js +5 -0
- package/cloud/net.cjs +1 -0
- package/cloud/net.d.ts +606 -0
- package/cloud/net.js +4 -0
- package/cloud-BrY9dKwV.cjs +1 -0
- package/cloud-C-LK4DWa.js +33 -0
- package/cloud.cjs +1 -0
- package/cloud.d.ts +1053 -0
- package/cloud.js +12 -0
- package/desktop.cjs +1 -0
- package/desktop.d.ts +49 -0
- package/desktop.js +51 -0
- package/dgram-C5rGcbej.cjs +1 -0
- package/dgram-DS5_yPc5.js +330 -0
- package/dgram.cjs +1 -0
- package/dgram.d.ts +541 -0
- package/dgram.js +4 -0
- package/dns.cjs +1 -0
- package/dns.d.ts +12 -0
- package/dns.js +6 -0
- package/extension-9Uv_0HdS.cjs +1 -0
- package/extension-Dgz0UTy0.js +245 -0
- package/extension.cjs +1 -0
- package/extension.d.ts +853 -0
- package/extension.js +5 -0
- package/fs/promises.cjs +1 -0
- package/fs/promises.d.ts +65 -0
- package/fs/promises.js +8 -0
- package/fs-BiS_UsCn.js +82 -0
- package/fs-CmgWrokB.cjs +1 -0
- package/fs.cjs +1 -0
- package/fs.d.ts +138 -0
- package/fs.js +5 -0
- package/http.cjs +9 -0
- package/http.d.ts +767 -0
- package/http.js +541 -0
- package/index.cjs +1 -9
- package/index.d.ts +261 -146
- package/index.js +27 -1879
- package/locator-Cf7M3QKN.cjs +53 -0
- package/{locator-Q5m8i40Z.js → locator-DxAsGV_o.js} +331 -337
- package/net-Bl6_W3bd.js +275 -0
- package/net-C5kWnI4C.cjs +1 -0
- package/net.cjs +1 -0
- package/net.d.ts +606 -0
- package/net.js +4 -0
- package/node-fs-Bd_UUx1m.js +361 -0
- package/node-fs-lrlD_zqB.cjs +1 -0
- package/opfs/promises.cjs +1 -0
- package/opfs/promises.d.ts +46 -0
- package/opfs/promises.js +6 -0
- package/opfs-BfcYLPGb.js +55 -0
- package/opfs-Dsi4FkJU.cjs +1 -0
- package/opfs.cjs +1 -0
- package/opfs.d.ts +83 -0
- package/opfs.js +35 -0
- package/package.json +91 -1
- package/proxy-A9UvWUaF.cjs +1 -0
- package/proxy-wiZN4eTR.js +14 -0
- package/storage-BadvHtv0.cjs +1 -0
- package/storage-z0q3iena.js +13 -0
- package/utils-BsNRWMfl.cjs +1 -0
- package/utils-CNydj3OT.js +52 -0
- package/background-BqRFQggD.cjs +0 -1
- 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;
|