Function
fromBabelGlob
(migrations: Record<string, any>)
Source from the content-addressed store, hash-verified
| 317 | * @category loaders |
| 318 | */ |
| 319 | export const fromBabelGlob = (migrations: Record<string, any>): Loader => |
| 320 | pipe( |
| 321 | Object.keys(migrations), |
| 322 | Arr.filterMap((_) => Option.fromNullable(_.match(/^_(\d+)_([^.]+?)(Js|Ts)?$/))), |
| 323 | Arr.map( |
| 324 | ([key, id, name]): ResolvedMigration => [ |
| 325 | Number(id), |
| 326 | name, |
| 327 | Effect.succeed(migrations[key]) |
| 328 | ] |
| 329 | ), |
| 330 | Arr.sort(migrationOrder), |
| 331 | Effect.succeed |
| 332 | ) |
| 333 | |
| 334 | /** |
| 335 | * @since 1.0.0 |
Callers
nothing calls this directly
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…