Explorer

definy.project-module-ids

description
The module IDs of the first snapshot of the project from index (none: empty)
type
Fn(commits: List<@definy.event-snapshot>, project_name: String, index: Number) -> List<String>
expression
fn(commits$0, project_name$1, index$2) =>
  match @core.list-get(list: $0, index: $2) {
    #none(_) =>
      [],
    #some(commit$3) =>
      match @core.equal(left: $3.commit.project_name, right: $1) {
        true =>
          @core.list-map(
            T: @definy.stored-snapshot-module,
            U: String,
            f: fn(item$4) =>
              $4.id,
            xs: $3.commit.modules
          ),
        false =>
          @definy.project-module-ids(commits: $0, project_name: $1, index: @core.plus(left: $2, right: 1))
      }
  }
visibility
public
definy.project-module-ids (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: 2HPl_iL5uy3R2w_LT_6Qfl36nzL247MobcHzY7-zZoU
content hash: U5f2Et7dGczJjf_m236jKVo8QzBJLPtWmgewMdOQhIs