(patch)
| 36 | } |
| 37 | |
| 38 | patchAndSave(patch) { |
| 39 | const id = patch.get("id") |
| 40 | patch.delete("id") |
| 41 | const target = this.makeFilePath(id) |
| 42 | if (!Disk.exists(target)) { |
| 43 | console.log(`No match for ${id}`) |
| 44 | return |
| 45 | } |
| 46 | console.log(`Patching ${id}`) |
| 47 | const particle = new Particle(Disk.read(target)).patch(patch) |
| 48 | return this._formatAndSave(target, particle) |
| 49 | } |
| 50 | |
| 51 | async setAndSave(file, measurementPath, measurementValue) { |
| 52 | const particle = this.getParticle(file) |
no test coverage detected