import { TObjectValues } from "../types"; import { fill } from "../utils"; import { ACTION_GROUP_ACTION } from "../constants"; import { ActionGroupNode } from "../nodes"; export class BaseFile { path: string = '/'; name: string = 'file.txt'; content: any = null; actionGroups: ActionGroupNode[] = []; actionGroupActions: TObjectValues[] = [ACTION_GROUP_ACTION.UPDATE_DATABASE]; constructor(payload: Partial = {}) { this.fill(payload); } fill = fill; get isEmpty() { return !this.content; } get modInfoPath() { if (this.path.startsWith('/')) { return `${this.path}${this.name}`.slice(1); } return `${this.path}${this.name}`; } write(dist: string) { } }