@@ -13,7 +13,7 @@ import * as Queue from "./layout/queue.js"
1313 * readonly metadata: UnixFS.Metadata
1414 * readonly config: API.EncoderSettings<Layout>
1515 * readonly writer: API.BlockWriter
16- * readonly linkMetadataWriter ?: API.LinkMetadataWriter
16+ * readonly unixFsFileLinkWriter ?: API.UnixFsFileLinkWriter
1717 * chunker: Chunker.Chunker
1818 * layout: Layout
1919 * nodeQueue: Queue.Queue
@@ -26,7 +26,7 @@ import * as Queue from "./layout/queue.js"
2626 * readonly metadata: UnixFS.Metadata
2727 * readonly config: API.EncoderSettings<Layout>
2828 * readonly writer: API.BlockWriter
29- * readonly linkMetadataWriter ?: API.LinkMetadataWriter
29+ * readonly unixFsFileLinkWriter ?: API.UnixFsFileLinkWriter
3030 * readonly rootID: Layout.NodeID
3131 * readonly end?: Task.Fork<void, never>
3232 * chunker?: null
@@ -41,7 +41,7 @@ import * as Queue from "./layout/queue.js"
4141 * readonly metadata: UnixFS.Metadata
4242 * readonly config: API.EncoderSettings<Layout>
4343 * readonly writer: API.BlockWriter
44- * readonly linkMetadataWriter ?: API.LinkMetadataWriter
44+ * readonly unixFsFileLinkWriter ?: API.UnixFsFileLinkWriter
4545 * readonly link: Layout.Link
4646 * chunker?: null
4747 * layout?: null
@@ -66,7 +66,7 @@ import * as Queue from "./layout/queue.js"
6666 * |{type:"write", bytes:Uint8Array}
6767 * |{type:"link", link:API.EncodedFile}
6868 * |{type:"block"}
69- * |{type:"linkMetadata "}
69+ * |{type:"fileLink "}
7070 * |{type: "close"}
7171 * |{type: "end"}
7272 * } Message
@@ -87,7 +87,7 @@ export const update = (message, state) => {
8787 case "block" :
8888 return { state, effect : Task . none ( ) }
8989 /* c8 ignore next 2 */
90- case "linkMetadata " :
90+ case "fileLink " :
9191 return { state, effect : Task . none ( ) }
9292 case "close" :
9393 return close ( state )
@@ -124,7 +124,7 @@ export const init = (writer, metadata, config, options = {}) => {
124124 // overhead.
125125 // @see https://github.com/Gozala/vectrie
126126 nodeQueue : Queue . mutable ( ) ,
127- linkMetadataWriter : options . linkMetadataWriter ,
127+ unixFsFileLinkWriter : options . unixFsFileLinkWriter ,
128128 }
129129}
130130/**
@@ -197,7 +197,7 @@ export const link = (state, { id, link, block }) => {
197197 ? state . end . resume ( )
198198 : Task . none ( )
199199
200- if ( ! state . linkMetadataWriter ) {
200+ if ( ! state . unixFsFileLinkWriter ) {
201201 return {
202202 state : newState ,
203203 effect : Task . listen ( {
@@ -213,7 +213,7 @@ export const link = (state, { id, link, block }) => {
213213 effect : Task . listen ( {
214214 link : Task . effects ( tasks ) ,
215215 block : writeBlock ( state . writer , block ) ,
216- linkMetadata : writeLinkMetadata ( state . linkMetadataWriter , link ) ,
216+ fileLink : writeFileLink ( state . unixFsFileLinkWriter , link ) ,
217217 end,
218218 } ) ,
219219 }
@@ -361,12 +361,12 @@ export const writeBlock = function* (writer, block) {
361361}
362362
363363/**
364- * @param {API.LinkMetadataWriter } writer
364+ * @param {API.UnixFsFileLinkWriter } writer
365365 * @param {Layout.Link } link
366366 * @returns {Task.Task<void, never> }
367367 */
368368
369- export const writeLinkMetadata = function * ( writer , link ) {
369+ export const writeFileLink = function * ( writer , link ) {
370370 /* c8 ignore next 3 */
371371 if ( ! writer ) {
372372 return
0 commit comments