@fkn/lib 0.9.40 → 0.9.42

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 (98) hide show
  1. package/account-generation-B-6Pn0b5.cjs +1 -0
  2. package/account-generation-XNWOvLea.js +28 -0
  3. package/account.cjs +1 -1
  4. package/account.d.ts +11 -0
  5. package/account.js +8 -20
  6. package/api--LOXTOpv.cjs +3 -0
  7. package/{api-Dp-2AT3u.js → api-DIgTslNb.js} +154 -114
  8. package/{api-BE5zPvFZ.d.ts → api-SwxtiYVU.d.ts} +38 -14
  9. package/api.cjs +1 -1
  10. package/api.d.ts +3 -3
  11. package/api.js +2 -2
  12. package/attach-policy.cjs +1 -1
  13. package/attach-policy.js +2 -2
  14. package/cloud/dns.d.ts +1 -1
  15. package/cloud/fetch.cjs +1 -1
  16. package/cloud/fetch.d.ts +1 -1
  17. package/cloud/fetch.js +1 -1
  18. package/cloud/fs/promises.d.ts +1 -1
  19. package/cloud/fs.cjs +1 -1
  20. package/cloud/fs.d.ts +4 -4
  21. package/cloud/fs.js +31 -24
  22. package/cloud/net.d.ts +1 -1
  23. package/cloud-868OlBKn.cjs +1 -0
  24. package/{cloud-5eldoFxK.d.ts → cloud-DUH-v10C.d.ts} +6 -4
  25. package/cloud-f3j4s8yZ.js +545 -0
  26. package/cloud.cjs +1 -1
  27. package/cloud.d.ts +4 -4
  28. package/cloud.js +2 -2
  29. package/{contract-Cvr_8gCL.d.ts → contract-CCxPKIC7.d.ts} +105 -13
  30. package/contract.d.ts +3 -2
  31. package/dgram.cjs +1 -1
  32. package/dgram.d.ts +2 -2
  33. package/dgram.js +1 -1
  34. package/dns.cjs +1 -1
  35. package/dns.d.ts +1 -1
  36. package/dns.js +1 -1
  37. package/extension-BOBuYwZc.js +92 -0
  38. package/extension-hoUs5yJ7.cjs +1 -0
  39. package/{extension-DMU-CwMw.d.ts → extension-yhwDSIiD.d.ts} +22 -3
  40. package/extension.cjs +1 -1
  41. package/extension.d.ts +3 -3
  42. package/extension.js +3 -3
  43. package/fs/promises.cjs +1 -1
  44. package/fs/promises.d.ts +1 -1
  45. package/fs/promises.js +1 -1
  46. package/fs-CVnmXRf7.js +513 -0
  47. package/{fs--NhtUyYa.d.ts → fs-D0MMRnHC.d.ts} +8 -4
  48. package/fs-p0bOOj5n.cjs +1 -0
  49. package/fs.cjs +1 -1
  50. package/fs.d.ts +4 -3
  51. package/fs.js +4 -2
  52. package/{hosts-9dYv63ud.cjs → hosts-GNBhZO3-.cjs} +1 -1
  53. package/{hosts-BzbzOhG8.js → hosts-t7CKGTRz.js} +4 -1
  54. package/http.d.ts +1 -1
  55. package/{index-D2CA-NX5.d.ts → index-BtFiGoVQ.d.ts} +465 -51
  56. package/{index-kuPqkS_-.d.ts → index-D2lvaQDs.d.ts} +28 -38
  57. package/index.cjs +1 -1
  58. package/index.d.ts +17 -17
  59. package/index.js +62 -59
  60. package/lib-CfdmsLoI.cjs +53 -0
  61. package/{lib-C4Eeg9eM.js → lib-DppqX10G.js} +470 -302
  62. package/{messages-C66ghz_A.d.ts → messages-CRcziTuC.d.ts} +17 -1
  63. package/messages.cjs +1 -1
  64. package/messages.d.ts +2 -2
  65. package/messages.js +2 -2
  66. package/{net-zThwNoA8.d.ts → net-DcLF-6E-.d.ts} +2 -2
  67. package/net.cjs +1 -1
  68. package/net.d.ts +1 -1
  69. package/net.js +1 -1
  70. package/{node-fs-BZy9bzKd.js → node-fs-CK2wWIYS.js} +140 -137
  71. package/node-fs-nfX7wisL.cjs +1 -0
  72. package/opfs.cjs +1 -1
  73. package/opfs.js +1 -1
  74. package/package.json +1 -1
  75. package/packages.cjs +1 -1
  76. package/packages.d.ts +1 -1
  77. package/packages.js +14 -14
  78. package/{proxy-Dc0gDOxz.d.ts → proxy-CE46SkyA.d.ts} +2 -2
  79. package/{proxy-DjoPtJH9.cjs → proxy-CFK-KiwE.cjs} +1 -1
  80. package/{proxy-DMTdQ4dN.js → proxy-Dixbk1WL.js} +1 -1
  81. package/rooms.cjs +1 -1
  82. package/rooms.d.ts +1 -1
  83. package/rooms.js +11 -11
  84. package/storage-BVr2Rb-d.d.ts +167 -0
  85. package/storage-D2cUJlVH.cjs +1 -0
  86. package/storage-Dn1gTLSZ.js +123 -0
  87. package/api-jOTOA-5n.cjs +0 -3
  88. package/cloud-BLv19j-W.js +0 -480
  89. package/cloud-D7aQY4GH.cjs +0 -1
  90. package/extension-B9v933cT.js +0 -89
  91. package/extension-D2zMdc2f.cjs +0 -1
  92. package/fs-CaQFRiIT.cjs +0 -1
  93. package/fs-D3IsGdnN.js +0 -360
  94. package/lib-BfAg9mHD.cjs +0 -53
  95. package/node-fs-BNTPsX5c.cjs +0 -1
  96. package/storage-BJd-mWHE.cjs +0 -1
  97. package/storage-DSvL-t80.js +0 -67
  98. package/storage-ZrY4Y4L5.d.ts +0 -88
@@ -1,88 +0,0 @@
1
- declare namespace storage_d_exports {
2
- export { CloudAvailability, EncryptionStatus, FileEntry, SealedRead, StorageLockedError, StorageNotFoundError, StorageQuota, WriteData, availability, available, encryption, isNotFound, list, quota, readFile, readFileSealed, remove, unlock, writeFile };
3
- }
4
- type FileEntry = {
5
- path: string;
6
- size: number;
7
- contentType: string | null;
8
- updatedAt: string;
9
- encryption: string | null;
10
- };
11
- type StorageQuota = {
12
- usedBytes: number;
13
- limitBytes: number;
14
- remaining: number;
15
- objects: number;
16
- maxObjects: number;
17
- };
18
- type EncryptionStatus = {
19
- unlocked: boolean;
20
- enrolled: boolean;
21
- keyEpoch: number | null;
22
- };
23
- type WriteData = Blob | ArrayBuffer | Uint8Array | string;
24
- declare class StorageLockedError extends Error {
25
- code: string;
26
- constructor();
27
- }
28
- /**
29
- * There is no object at this path. Test `err.code === STORAGE_NOT_FOUND`, never the message.
30
- *
31
- * Absence arrives from two places that word it completely differently: the api refusing to presign
32
- * a path with no committed row says "Not found", and a presign that succeeded followed by an object
33
- * fetch that 404s says "storage: read failed (404)". Neither is a fault, both mean the same thing,
34
- * and matching either by hand means matching both. Ripple matched only the first, so a missing
35
- * backup read as a transient failure, retried forever, and a library went un-backed-up for a day
36
- * without a single error anywhere.
37
- *
38
- * The distinction matters more than it sounds. "There is nothing here" is safe to overwrite;
39
- * "I could not tell you" is not, and a caller that confuses them either never writes a first
40
- * backup or destroys a real one.
41
- */
42
- declare class StorageNotFoundError extends Error {
43
- code: string;
44
- constructor(message?: string);
45
- }
46
- /** Whether an error from this module means the path is empty, as opposed to unreadable. */
47
- declare const isNotFound: (error: unknown) => boolean;
48
- declare const available: () => Promise<boolean>;
49
- type CloudAvailability = 'connected' | 'disconnected' | 'unknown';
50
- /**
51
- * Whether the cloud half is backed by an account, as three answers rather than two:
52
- * 'disconnected' is an ANSWER (signed out, or the api refusing the stored token), 'unknown'
53
- * means nobody could be asked, including a broker that never came up. Always settles within
54
- * the probe deadline. A caller owing data to the cloud may drop that obligation only on
55
- * 'disconnected'; treating 'unknown' the same silently loses the write.
56
- */
57
- declare const availability: () => Promise<CloudAvailability>;
58
- declare const list: () => Promise<FileEntry[]>;
59
- declare const quota: () => Promise<StorageQuota>;
60
- declare const readFile: (path: string) => Promise<Blob>;
61
- /** The bytes of a cloud object and the seal time they carry, as an ISO string or null. */
62
- type SealedRead = {
63
- data: Uint8Array;
64
- sealedAt: string | null;
65
- };
66
- /**
67
- * A cloud read that also reports when the copy was sealed.
68
- *
69
- * `sealedAt` is an ISO string, or null when the envelope carries no such field (one written before
70
- * the seal time existed) or when the data plane is older than this call. The value is
71
- * AUTHENTICATED, so the server can neither forge nor alter it, and it is the WRITER's own claim
72
- * about when it sealed, so on its own it does not prove this copy is the newest one: an older but
73
- * perfectly authentic copy of the same path is still authentic. An app that needs that answer keeps
74
- * a high-water mark per path and compares. Do not confuse it with the `updatedAt` on a listing,
75
- * which is the server's hint and is fine for display and nothing else.
76
- *
77
- * The bytes and the stamp come from ONE read of ONE envelope, which is what makes the stamp
78
- * describe the bytes returned beside it. `readFile` is unchanged and unaffected.
79
- */
80
- declare const readFileSealed: (path: string) => Promise<SealedRead>;
81
- declare const writeFile: (path: string, data: WriteData, opts?: {
82
- contentType?: string;
83
- }) => Promise<void>;
84
- declare const remove: (path: string) => Promise<void>;
85
- declare const encryption: () => Promise<EncryptionStatus>;
86
- declare const unlock: () => Promise<boolean>;
87
- //#endregion
88
- export { StorageNotFoundError as a, isNotFound as c, storage_d_exports as d, unlock as f, StorageLockedError as i, quota as l, FileEntry as n, StorageQuota as o, SealedRead as r, encryption as s, EncryptionStatus as t, readFileSealed as u };