@helia/mfs 0.0.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.
@@ -0,0 +1,225 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * `@helia/mfs` is an implementation of a {@link https://docs.ipfs.tech/concepts/file-systems/ Mutable File System} powered by {@link https://github.com/ipfs/helia Helia}.
5
+ *
6
+ * See the {@link MFS MFS interface} for all available operations.
7
+ *
8
+ * @example
9
+ *
10
+ * ```typescript
11
+ * import { createHelia } from 'helia'
12
+ * import { mfs } from '@helia/mfs'
13
+ *
14
+ * const helia = createHelia({
15
+ * // ... helia config
16
+ * })
17
+ * const fs = mfs(helia)
18
+ *
19
+ * // create an empty directory
20
+ * await fs.mkdir('/my-directory')
21
+ *
22
+ * // add a file to the directory
23
+ * await fs.writeBytes(Uint8Array.from([0, 1, 2, 3]), '/my-directory/foo.txt')
24
+ *
25
+ * // read the file
26
+ * for await (const buf of fs.cat('/my-directory/foo.txt')) {
27
+ * console.info(buf)
28
+ * }
29
+ * ```
30
+ */
31
+ import { CID } from 'multiformats/cid';
32
+ import type { Blocks } from '@helia/interface/blocks';
33
+ import type { UnixFSEntry } from 'ipfs-unixfs-exporter';
34
+ import type { Datastore } from 'interface-datastore';
35
+ import type { AddOptions, CatOptions, ChmodOptions, CpOptions, LsOptions, MkdirOptions as UnixFsMkdirOptions, RmOptions as UnixFsRmOptions, StatOptions, TouchOptions, UnixFSStats } from '@helia/unixfs';
36
+ import type { ByteStream } from 'ipfs-unixfs-importer';
37
+ import { type Mtime } from 'ipfs-unixfs';
38
+ export interface MFSComponents {
39
+ blockstore: Blocks;
40
+ datastore: Datastore;
41
+ }
42
+ export interface MFSInit {
43
+ /**
44
+ * The key used to store the root CID in the datastore (default: '/local/filesroot')
45
+ */
46
+ key?: string;
47
+ }
48
+ export type WriteOptions = AddOptions & CpOptions & {
49
+ /**
50
+ * An optional mode to set on the new file
51
+ */
52
+ mode: number;
53
+ /**
54
+ * An optional mtime to set on the new file
55
+ */
56
+ mtime: Mtime;
57
+ };
58
+ export type MkdirOptions = AddOptions & StatOptions & CpOptions & UnixFsMkdirOptions;
59
+ /**
60
+ * Options to pass to the rm command
61
+ */
62
+ export interface RmOptions extends UnixFsRmOptions {
63
+ /**
64
+ * If true, allow attempts to delete files or directories that do not exist
65
+ * (default: false)
66
+ */
67
+ force: boolean;
68
+ }
69
+ /**
70
+ * The UnixFS interface provides familiar filesystem operations to make working with
71
+ * UnixFS DAGs simple and intuitive.
72
+ */
73
+ export interface MFS {
74
+ /**
75
+ * Add a single `Uint8Array` to your Helia node as a file.
76
+ *
77
+ * @example
78
+ *
79
+ * ```typescript
80
+ * const cid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3]))
81
+ *
82
+ * console.info(cid)
83
+ * ```
84
+ */
85
+ writeBytes: (bytes: Uint8Array, path: string, options?: Partial<WriteOptions>) => Promise<void>;
86
+ /**
87
+ * Add a stream of `Uint8Array` to your Helia node as a file.
88
+ *
89
+ * @example
90
+ *
91
+ * ```typescript
92
+ * import fs from 'node:fs'
93
+ *
94
+ * const stream = fs.createReadStream('./foo.txt')
95
+ * const cid = await fs.addByteStream(stream)
96
+ *
97
+ * console.info(cid)
98
+ * ```
99
+ */
100
+ writeByteStream: (bytes: ByteStream, path: string, options?: Partial<WriteOptions>) => Promise<void>;
101
+ /**
102
+ * Retrieve the contents of a file from your Helia node.
103
+ *
104
+ * @example
105
+ *
106
+ * ```typescript
107
+ * for await (const buf of fs.cat(cid)) {
108
+ * console.info(buf)
109
+ * }
110
+ * ```
111
+ */
112
+ cat: (path: string, options?: Partial<CatOptions>) => AsyncIterable<Uint8Array>;
113
+ /**
114
+ * Change the permissions on a file or directory in a DAG
115
+ *
116
+ * @example
117
+ *
118
+ * ```typescript
119
+ * const beforeCid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3]))
120
+ * const beforeStats = await fs.stat(beforeCid)
121
+ *
122
+ * const afterCid = await fs.chmod(cid, 0x755)
123
+ * const afterStats = await fs.stat(afterCid)
124
+ *
125
+ * console.info(beforeCid, beforeStats)
126
+ * console.info(afterCid, afterStats)
127
+ * ```
128
+ */
129
+ chmod: (path: string, mode: number, options?: Partial<ChmodOptions>) => Promise<void>;
130
+ /**
131
+ * Add a file or directory to a target directory.
132
+ *
133
+ * @example
134
+ *
135
+ * ```typescript
136
+ * const fileCid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3]))
137
+ * const directoryCid = await fs.addDirectory()
138
+ *
139
+ * const updatedCid = await fs.cp(fileCid, directoryCid, 'foo.txt')
140
+ *
141
+ * console.info(updatedCid)
142
+ * ```
143
+ */
144
+ cp: (source: CID | string, destination: string, options?: Partial<CpOptions>) => Promise<void>;
145
+ /**
146
+ * List directory contents.
147
+ *
148
+ * @example
149
+ *
150
+ * ```typescript
151
+ * for await (const entry of fs.ls(directoryCid)) {
152
+ * console.info(etnry)
153
+ * }
154
+ * ```
155
+ */
156
+ ls: (path?: string, options?: Partial<LsOptions>) => AsyncIterable<UnixFSEntry>;
157
+ /**
158
+ * Make a new directory under an existing directory.
159
+ *
160
+ * @example
161
+ *
162
+ * ```typescript
163
+ * const directoryCid = await fs.addDirectory()
164
+ *
165
+ * const updatedCid = await fs.mkdir(directoryCid, 'new-dir')
166
+ *
167
+ * console.info(updatedCid)
168
+ * ```
169
+ */
170
+ mkdir: (path: string, options?: Partial<MkdirOptions>) => Promise<void>;
171
+ /**
172
+ * Remove a file or directory from an existing directory.
173
+ *
174
+ * @example
175
+ *
176
+ * ```typescript
177
+ * const directoryCid = await fs.addDirectory()
178
+ * const updatedCid = await fs.mkdir(directoryCid, 'new-dir')
179
+ *
180
+ * const finalCid = await fs.rm(updatedCid, 'new-dir')
181
+ *
182
+ * console.info(finalCid)
183
+ * ```
184
+ */
185
+ rm: (path: string, options?: Partial<RmOptions>) => Promise<void>;
186
+ /**
187
+ * Return statistics about a UnixFS DAG.
188
+ *
189
+ * @example
190
+ *
191
+ * ```typescript
192
+ * const fileCid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3]))
193
+ *
194
+ * const stats = await fs.stat(fileCid)
195
+ *
196
+ * console.info(stats)
197
+ * ```
198
+ */
199
+ stat: (path: string, options?: Partial<StatOptions>) => Promise<UnixFSStats>;
200
+ /**
201
+ * Update the mtime of a UnixFS DAG
202
+ *
203
+ * @example
204
+ *
205
+ * ```typescript
206
+ * const beforeCid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3]))
207
+ * const beforeStats = await fs.stat(beforeCid)
208
+ *
209
+ * const afterCid = await fs.touch(beforeCid)
210
+ * const afterStats = await fs.stat(afterCid)
211
+ *
212
+ * console.info(beforeCid, beforeStats)
213
+ * console.info(afterCid, afterStats)
214
+ * ```
215
+ */
216
+ touch: (path: string, options?: Partial<TouchOptions>) => Promise<void>;
217
+ }
218
+ /**
219
+ * Create a {@link MFS} instance powered by {@link https://github.com/ipfs/helia Helia}
220
+ */
221
+ export declare function mfs(helia: {
222
+ blockstore: Blocks;
223
+ datastore: Datastore;
224
+ }, init?: MFSInit): MFS;
225
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAEtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,IAAI,kBAAkB,EAAE,SAAS,IAAI,eAAe,EAAE,WAAW,EAAE,YAAY,EAAU,WAAW,EAAE,MAAM,eAAe,CAAA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@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * `@helia/mfs` is an implementation of a {@link https://docs.ipfs.tech/concepts/file-systems/ Mutable File System} powered by {@link https://github.com/ipfs/helia Helia}.
5
+ *
6
+ * See the {@link MFS MFS interface} for all available operations.
7
+ *
8
+ * @example
9
+ *
10
+ * ```typescript
11
+ * import { createHelia } from 'helia'
12
+ * import { mfs } from '@helia/mfs'
13
+ *
14
+ * const helia = createHelia({
15
+ * // ... helia config
16
+ * })
17
+ * const fs = mfs(helia)
18
+ *
19
+ * // create an empty directory
20
+ * await fs.mkdir('/my-directory')
21
+ *
22
+ * // add a file to the directory
23
+ * await fs.writeBytes(Uint8Array.from([0, 1, 2, 3]), '/my-directory/foo.txt')
24
+ *
25
+ * // read the file
26
+ * for await (const buf of fs.cat('/my-directory/foo.txt')) {
27
+ * console.info(buf)
28
+ * }
29
+ * ```
30
+ */
31
+ import { Key } from 'interface-datastore';
32
+ import { CID } from 'multiformats/cid';
33
+ import { unixfs } from '@helia/unixfs';
34
+ import { AlreadyExistsError, DoesNotExistError, InvalidParametersError, NotADirectoryError } from '@helia/unixfs/errors';
35
+ import { logger } from '@libp2p/logger';
36
+ import { basename } from './utils/basename.js';
37
+ import { UnixFS as IPFSUnixFS } from 'ipfs-unixfs';
38
+ const log = logger('helia:mfs');
39
+ class DefaultMFS {
40
+ components;
41
+ unixfs;
42
+ root;
43
+ key;
44
+ constructor(components, init = {}) {
45
+ this.components = components;
46
+ this.key = new Key(init.key ?? '/locals/filesroot');
47
+ this.unixfs = unixfs(components);
48
+ }
49
+ async #getRootCID() {
50
+ if (this.root == null) {
51
+ try {
52
+ const buf = await this.components.datastore.get(this.key);
53
+ this.root = CID.decode(buf);
54
+ }
55
+ catch (err) {
56
+ if (err.code !== 'ERR_NOT_FOUND') {
57
+ throw err;
58
+ }
59
+ this.root = await this.unixfs.addDirectory();
60
+ }
61
+ }
62
+ return this.root;
63
+ }
64
+ async writeBytes(bytes, path, options) {
65
+ const cid = await this.unixfs.addFile({
66
+ content: bytes,
67
+ mode: options?.mode,
68
+ mtime: options?.mtime,
69
+ }, options);
70
+ await this.cp(cid, path, options);
71
+ }
72
+ async writeByteStream(bytes, path, options) {
73
+ const cid = await this.unixfs.addFile({
74
+ content: bytes,
75
+ mode: options?.mode,
76
+ mtime: options?.mtime,
77
+ }, options);
78
+ await this.cp(cid, path, options);
79
+ }
80
+ async *cat(path, options = {}) {
81
+ const root = await this.#getRootCID();
82
+ const trail = await this.#walkPath(root, path, {
83
+ ...options,
84
+ createMissingDirectories: false,
85
+ finalSegmentMustBeDirectory: false
86
+ });
87
+ yield* this.unixfs.cat(trail[trail.length - 1].cid, options);
88
+ }
89
+ async chmod(path, mode, options = {}) {
90
+ const root = await this.#getRootCID();
91
+ this.root = await this.unixfs.chmod(root, mode, {
92
+ ...options,
93
+ path
94
+ });
95
+ }
96
+ async cp(source, destination, options) {
97
+ const root = await this.#getRootCID();
98
+ const force = options?.force ?? false;
99
+ if (typeof source === 'string') {
100
+ const stat = await this.stat(source, options);
101
+ source = stat.cid;
102
+ }
103
+ if (!force) {
104
+ await this.#ensurePathDoesNotExist(destination, options);
105
+ }
106
+ const fileName = basename(destination);
107
+ const containingDirectory = destination.substring(0, destination.length - `/${fileName}`.length);
108
+ let trail = [{
109
+ cid: root,
110
+ name: ''
111
+ }];
112
+ if (containingDirectory !== '') {
113
+ trail = await this.#walkPath(root, containingDirectory, {
114
+ ...options,
115
+ createMissingDirectories: options?.force ?? false,
116
+ finalSegmentMustBeDirectory: true
117
+ });
118
+ }
119
+ trail.push({
120
+ cid: source,
121
+ name: fileName
122
+ });
123
+ this.root = await this.#persistPath(trail, options);
124
+ }
125
+ async *ls(path, options) {
126
+ const root = await this.#getRootCID();
127
+ if (options?.path != null) {
128
+ path = `${path}/${options.path}`;
129
+ }
130
+ yield* this.unixfs.ls(root, {
131
+ ...options,
132
+ path
133
+ });
134
+ }
135
+ async mkdir(path, options) {
136
+ const force = options?.force ?? false;
137
+ if (!force) {
138
+ await this.#ensurePathDoesNotExist(path, options);
139
+ }
140
+ const dirName = basename(path);
141
+ const containingDirectory = path.substring(0, path.length - `/${dirName}`.length);
142
+ const root = await this.#getRootCID();
143
+ let trail = [{
144
+ cid: root,
145
+ name: ''
146
+ }];
147
+ if (containingDirectory !== '') {
148
+ trail = await this.#walkPath(root, containingDirectory, {
149
+ ...options,
150
+ createMissingDirectories: force,
151
+ finalSegmentMustBeDirectory: true
152
+ });
153
+ }
154
+ trail.push({
155
+ cid: await this.unixfs.addDirectory({
156
+ mode: options?.mode,
157
+ mtime: options?.mtime
158
+ }, options),
159
+ name: basename(path)
160
+ });
161
+ this.root = await this.#persistPath(trail, options);
162
+ }
163
+ async rm(path, options) {
164
+ const force = options?.force ?? false;
165
+ if (!force) {
166
+ await this.#ensurePathExists(path, options);
167
+ }
168
+ const root = await this.#getRootCID();
169
+ const trail = await this.#walkPath(root, path, {
170
+ ...options,
171
+ createMissingDirectories: false,
172
+ finalSegmentMustBeDirectory: false
173
+ });
174
+ const lastSegment = trail.pop();
175
+ if (lastSegment == null) {
176
+ throw new InvalidParametersError('path was too short');
177
+ }
178
+ // remove directory entry
179
+ const containingDir = trail[trail.length - 1];
180
+ containingDir.cid = await this.unixfs.rm(containingDir.cid, lastSegment.name, options);
181
+ this.root = await this.#persistPath(trail, options);
182
+ }
183
+ async stat(path, options) {
184
+ const root = await this.#getRootCID();
185
+ const trail = await this.#walkPath(root, path, {
186
+ ...options,
187
+ createMissingDirectories: false,
188
+ finalSegmentMustBeDirectory: false
189
+ });
190
+ const finalEntry = trail.pop();
191
+ if (finalEntry == null) {
192
+ throw new DoesNotExistError();
193
+ }
194
+ return this.unixfs.stat(finalEntry.cid, {
195
+ ...options
196
+ });
197
+ }
198
+ async touch(path, options) {
199
+ const root = await this.#getRootCID();
200
+ const trail = await this.#walkPath(root, path, {
201
+ ...options,
202
+ createMissingDirectories: false,
203
+ finalSegmentMustBeDirectory: false
204
+ });
205
+ let finalEntry = trail[trail.length - 1];
206
+ if (finalEntry == null) {
207
+ throw new DoesNotExistError();
208
+ }
209
+ finalEntry.cid = await this.unixfs.touch(finalEntry.cid, options);
210
+ this.root = await this.#persistPath(trail, options);
211
+ }
212
+ async #walkPath(root, path, opts) {
213
+ if (!path.startsWith('/')) {
214
+ throw new InvalidParametersError('path must be absolute');
215
+ }
216
+ const stat = await this.unixfs.stat(root, {
217
+ ...opts,
218
+ offline: true
219
+ });
220
+ let output = [{
221
+ cid: root,
222
+ name: '',
223
+ unixfs: stat.unixfs
224
+ }];
225
+ let cid = root;
226
+ let parts = path.split('/').filter(Boolean);
227
+ for (let i = 0; i < parts.length; i++) {
228
+ const segment = parts[i];
229
+ try {
230
+ const stat = await this.unixfs.stat(cid, {
231
+ ...opts,
232
+ offline: true,
233
+ path: segment
234
+ });
235
+ output.push({
236
+ cid: stat.cid,
237
+ name: segment,
238
+ unixfs: stat.unixfs
239
+ });
240
+ cid = stat.cid;
241
+ }
242
+ catch (err) {
243
+ log.error('could not resolve path segment %s of %s under %c', segment, path, root);
244
+ if (opts.createMissingDirectories) {
245
+ const cid = await this.unixfs.addDirectory();
246
+ output.push({
247
+ cid: cid,
248
+ name: segment,
249
+ unixfs: new IPFSUnixFS({ type: 'directory' })
250
+ });
251
+ }
252
+ else {
253
+ throw new DoesNotExistError(`${path} does not exist`);
254
+ }
255
+ }
256
+ }
257
+ const lastSegment = output[output.length - 1];
258
+ if (opts.finalSegmentMustBeDirectory === true && lastSegment.unixfs?.isDirectory() !== true) {
259
+ throw new NotADirectoryError(`${path} was not a directory`);
260
+ }
261
+ return output;
262
+ }
263
+ async #persistPath(path, options = {}) {
264
+ let child = path.pop();
265
+ if (child == null) {
266
+ throw new InvalidParametersError('path was too short');
267
+ }
268
+ let cid = child.cid;
269
+ for (let i = path.length - 1; i > -1; i--) {
270
+ const segment = path[i];
271
+ segment.cid = await this.unixfs.cp(child.cid, segment.cid, child.name, {
272
+ ...options,
273
+ force: true
274
+ });
275
+ child = segment;
276
+ cid = segment.cid;
277
+ }
278
+ await this.components.datastore.put(this.key, cid.bytes, options);
279
+ return cid;
280
+ }
281
+ async #ensurePathExists(path, options = {}) {
282
+ const exists = await this.#pathExists(path, options);
283
+ if (!exists) {
284
+ throw new DoesNotExistError();
285
+ }
286
+ }
287
+ async #ensurePathDoesNotExist(path, options = {}) {
288
+ const exists = await this.#pathExists(path, options);
289
+ if (exists) {
290
+ throw new AlreadyExistsError();
291
+ }
292
+ }
293
+ async #pathExists(path, options = {}) {
294
+ try {
295
+ await this.stat(path, {
296
+ ...options,
297
+ offline: true
298
+ });
299
+ return true;
300
+ }
301
+ catch {
302
+ return false;
303
+ }
304
+ }
305
+ }
306
+ /**
307
+ * Create a {@link MFS} instance powered by {@link https://github.com/ipfs/helia Helia}
308
+ */
309
+ export function mfs(helia, init = {}) {
310
+ return new DefaultMFS(helia, init);
311
+ }
312
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAKtC,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAExH,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAE9C,OAAO,EAAE,MAAM,IAAI,UAAU,EAAc,MAAM,aAAa,CAAA;AAE9D,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;AAiN/B,MAAM,UAAU;IACG,UAAU,CAAe;IACzB,MAAM,CAAQ;IACvB,IAAI,CAA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AAA;QAEpD,IAAI,CAAC,MAAM,EAAE;YACX,MAAM,IAAI,iBAAiB,EAAE,CAAA;SAC9B;IACH,CAAC;IAED,KAAK,CAAC,uBAAuB,CAAE,IAAY,EAAE,UAAuB,EAAE;QACpE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;QAEpD,IAAI,MAAM,EAAE;YACV,MAAM,IAAI,kBAAkB,EAAE,CAAA;SAC/B;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAAE,IAAY,EAAE,UAAuB,EAAE;QACxD,IAAI;YACF,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gBACpB,GAAG,OAAO;gBACV,OAAO,EAAE,IAAI;aACd,CAAC,CAAA;YAEF,OAAO,IAAI,CAAA;SACZ;QAAC,MAAM;YACN,OAAO,KAAK,CAAA;SACb;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,GAAG,CAAE,KAAmD,EAAE,OAAgB,EAAE;IAC1F,OAAO,IAAI,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;AACpC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function basename(path: string): string;
2
+ //# sourceMappingURL=basename.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basename.d.ts","sourceRoot":"","sources":["../../../src/utils/basename.ts"],"names":[],"mappings":"AACA,wBAAgB,QAAQ,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C"}
@@ -0,0 +1,4 @@
1
+ export function basename(path) {
2
+ return path.split('/').pop() ?? '';
3
+ }
4
+ //# sourceMappingURL=basename.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basename.js","sourceRoot":"","sources":["../../../src/utils/basename.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,QAAQ,CAAE,IAAY;IACpC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,CAAA;AACpC,CAAC"}
@@ -0,0 +1,9 @@
1
+ {
2
+ "MFS": "https://ipfs.github.io/helia-mfs/interfaces/MFS.html",
3
+ "MFSComponents": "https://ipfs.github.io/helia-mfs/interfaces/MFSComponents.html",
4
+ "MFSInit": "https://ipfs.github.io/helia-mfs/interfaces/MFSInit.html",
5
+ "RmOptions": "https://ipfs.github.io/helia-mfs/interfaces/RmOptions.html",
6
+ "MkdirOptions": "https://ipfs.github.io/helia-mfs/types/MkdirOptions.html",
7
+ "WriteOptions": "https://ipfs.github.io/helia-mfs/types/WriteOptions.html",
8
+ "mfs": "https://ipfs.github.io/helia-mfs/functions/mfs-1.html"
9
+ }