Skip to content

replit/toml-editor

Folders and files

NameName
Last commit message
Last commit date
Mar 28, 2024
Nov 21, 2023
Jan 7, 2025
Mar 28, 2024
Jan 3, 2025
Jan 3, 2025
Mar 13, 2024
Apr 2, 2024
Mar 28, 2024
Nov 21, 2023

Repository files navigation

Toml Editor

This is the toml editor which is used by the dotreplit service to update the .replit file while preserving formatting (e.g. line spacing and comments).

To run a dev build, just run cargo run. For a production build, run cargo build --release.

More info about this here

Once this is running, it reads json input from stdin and returns output through stdout.

The json it reads in is in the format of https://datatracker.ietf.org/doc/html/rfc6902 with one slight difference. The value field is a stringified json instead of the actual json value.

Below is an example set of operations:
(note - these examples will have spacing and formatting to make it easier to read but when testing, this should all be removed).

[
  { "op": "add", "path": "foo", "value": 123 },
  { "op": "add", "path": "bar/1", "value": "{\"test\": 234}"}
]

You can include the file path of the .replit file like so ./toml-editor -p <path>. If you do not, it will default to looking in the current directory for the .replit file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published