Explorer

definy.apply-part-changes

description
Apply every part change in order
type
Fn(modules: List<@core.project-snapshot-module>, uploads: List<@definy.mcp-part-upload>) -> List<@core.project-snapshot-module>
expression
fn(modules$0, uploads$1) =>
  @core.list-fold(
    T: @definy.mcp-part-upload,
    A: List<@core.project-snapshot-module>,
    reducer: fn(acc$2, item$3) =>
      @definy.apply-part-change(
        modules: $2,
        module_name: $3.module_name,
        name: $3.name,
        content_hash: match $3.content {
          #some(content$4) =>
            #some($4.content_hash),
          #none(_) =>
            #none
        }
      ),
    init: $0,
    xs: $1
  )
visibility
public
definy.apply-part-changes (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: K1dwU5xG6-VFccTW5LZjUe9Y8u7u7ezetdWkt1N1oYY
content hash: xKOPbtEEWRvTRohMStbD_58sjJEst51D2KX5DMCca64