@@ -13,7 +13,7 @@ import * as Queue from "./layout/queue.js"
13
13
* readonly metadata: UnixFS.Metadata
14
14
* readonly config: API.EncoderSettings<Layout>
15
15
* readonly writer: API.BlockWriter
16
- * readonly linkMetadataWriter ?: API.LinkMetadataWriter
16
+ * readonly unixFsFileLinkWriter ?: API.UnixFsFileLinkWriter
17
17
* chunker: Chunker.Chunker
18
18
* layout: Layout
19
19
* nodeQueue: Queue.Queue
@@ -26,7 +26,7 @@ import * as Queue from "./layout/queue.js"
26
26
* readonly metadata: UnixFS.Metadata
27
27
* readonly config: API.EncoderSettings<Layout>
28
28
* readonly writer: API.BlockWriter
29
- * readonly linkMetadataWriter ?: API.LinkMetadataWriter
29
+ * readonly unixFsFileLinkWriter ?: API.UnixFsFileLinkWriter
30
30
* readonly rootID: Layout.NodeID
31
31
* readonly end?: Task.Fork<void, never>
32
32
* chunker?: null
@@ -41,7 +41,7 @@ import * as Queue from "./layout/queue.js"
41
41
* readonly metadata: UnixFS.Metadata
42
42
* readonly config: API.EncoderSettings<Layout>
43
43
* readonly writer: API.BlockWriter
44
- * readonly linkMetadataWriter ?: API.LinkMetadataWriter
44
+ * readonly unixFsFileLinkWriter ?: API.UnixFsFileLinkWriter
45
45
* readonly link: Layout.Link
46
46
* chunker?: null
47
47
* layout?: null
@@ -66,7 +66,7 @@ import * as Queue from "./layout/queue.js"
66
66
* |{type:"write", bytes:Uint8Array}
67
67
* |{type:"link", link:API.EncodedFile}
68
68
* |{type:"block"}
69
- * |{type:"linkMetadata "}
69
+ * |{type:"fileLink "}
70
70
* |{type: "close"}
71
71
* |{type: "end"}
72
72
* } Message
@@ -87,7 +87,7 @@ export const update = (message, state) => {
87
87
case "block" :
88
88
return { state, effect : Task . none ( ) }
89
89
/* c8 ignore next 2 */
90
- case "linkMetadata " :
90
+ case "fileLink " :
91
91
return { state, effect : Task . none ( ) }
92
92
case "close" :
93
93
return close ( state )
@@ -124,7 +124,7 @@ export const init = (writer, metadata, config, options = {}) => {
124
124
// overhead.
125
125
// @see https://github.com/Gozala/vectrie
126
126
nodeQueue : Queue . mutable ( ) ,
127
- linkMetadataWriter : options . linkMetadataWriter ,
127
+ unixFsFileLinkWriter : options . unixFsFileLinkWriter ,
128
128
}
129
129
}
130
130
/**
@@ -197,7 +197,7 @@ export const link = (state, { id, link, block }) => {
197
197
? state . end . resume ( )
198
198
: Task . none ( )
199
199
200
- if ( ! state . linkMetadataWriter ) {
200
+ if ( ! state . unixFsFileLinkWriter ) {
201
201
return {
202
202
state : newState ,
203
203
effect : Task . listen ( {
@@ -213,7 +213,7 @@ export const link = (state, { id, link, block }) => {
213
213
effect : Task . listen ( {
214
214
link : Task . effects ( tasks ) ,
215
215
block : writeBlock ( state . writer , block ) ,
216
- linkMetadata : writeLinkMetadata ( state . linkMetadataWriter , link ) ,
216
+ fileLink : writeFileLink ( state . unixFsFileLinkWriter , link ) ,
217
217
end,
218
218
} ) ,
219
219
}
@@ -361,12 +361,12 @@ export const writeBlock = function* (writer, block) {
361
361
}
362
362
363
363
/**
364
- * @param {API.LinkMetadataWriter } writer
364
+ * @param {API.UnixFsFileLinkWriter } writer
365
365
* @param {Layout.Link } link
366
366
* @returns {Task.Task<void, never> }
367
367
*/
368
368
369
- export const writeLinkMetadata = function * ( writer , link ) {
369
+ export const writeFileLink = function * ( writer , link ) {
370
370
/* c8 ignore next 3 */
371
371
if ( ! writer ) {
372
372
return
0 commit comments