(tag: string)
| 269 | } |
| 270 | |
| 271 | private _checkpointPath(tag: string): string { |
| 272 | if (!tag.length) { |
| 273 | throw new Error('No checkpoint tag specified.'); |
| 274 | } |
| 275 | if (!this.anusDir) { |
| 276 | throw new Error('Checkpoint file path not set.'); |
| 277 | } |
| 278 | // Encode the tag to handle all special characters safely. |
| 279 | const encodedTag = encodeTagName(tag); |
| 280 | return path.join(this.anusDir, `checkpoint-${encodedTag}.json`); |
| 281 | } |
| 282 | |
| 283 | private async _getCheckpointPath(tag: string): Promise<string> { |
| 284 | // 1. Check for the new encoded path first. |
no test coverage detected