Apps need a programmatic API to rename a project (see INLMC-102)
Proposal
Offer project.rename() as an API that renames the project file in the filesystem WITHOUT triggering a reload of the project. A reload of the project would lead to decreased UX.
Signature
use an object as arg for future proofing
async because I/O operations
throws if rename didn't work
throw if name contains ".inlang" as file ending is abstracted in apps (see FINK-55 and INLMC-102)
console.log(project.name())
>> foo
await project.rename({ to: "backend" })
console.log(project.name())
>> backend
await project.rename({ to: "frontend.inlang" })
>> 💥 throw ProjectRenameError("To must not end with the filextension")
Context
Apps need a programmatic API to rename a project (see INLMC-102)
Proposal
Offer
project.rename()
as an API that renames the project file in the filesystem WITHOUT triggering a reload of the project. A reload of the project would lead to decreased UX.Signature