@pagopa/dx-cli
Version:
A CLI useful to manage DX tools.
17 lines (16 loc) • 346 B
JavaScript
import { okAsync } from "neverthrow";
export class LocalCodemodRegistry {
#m;
constructor() {
this.#m = new Map();
}
add(codemod) {
this.#m.set(codemod.id, codemod);
}
getAll() {
return okAsync(Array.from(this.#m.values()));
}
getById(id) {
return okAsync(this.#m.get(id));
}
}