OpenFn / OpenFn/kit

CLI: don't minify output state

Open
#351 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
21
Forks
23
Avg merge
1d 22h
Merged PRs (30d)
17

Description

When the CLI writes state to disk, it'll prettify the output.

For large state objects, the extra whitespace can result in significantly larger files.

This is usually useful when using the CLI in dev, because it lets you easily read your output.

But Lightning shouldn't ever pretty print the result.

Options:

  1. Always pretty print but include a --minifiy-output option
  2. Never pretty print but include a --prettify-output option

We should optimise the CLI for devs working on a local machine, which I think means we should prettify by default. Which means we do 1).

Note that this doesn't affect the runtime manager in the new architecture, as serialized state will always be minified.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the CLI code that writes state to disk and inspect how its output formatting is selected. Compare the two proposed flag behaviors, keeping the runtime manager out of scope as stated. Done means the CLI's chosen formatting behavior and option are covered, while serialized runtime-manager state remains minified.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.