Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): Expand options for storing values #2237

Merged
merged 2 commits into from
Apr 25, 2024
Merged

Conversation

kriskowal
Copy link
Member

@kriskowal kriskowal commented Apr 23, 2024

In, #2226 we gain the ability to marshal copy data and remotables that are backed by formulas.

This change surfaces these features to the CLI by exposing a variety of flags.

> endo store --json '{"hello": "world"}' --name greeting
> endo show greeting
{ hello: 'world' }
> endo store --text 'Hello, World!' --name greeting
> endo show greeting
Hello, World!
> endo store --bigint 42 --name meaningful-bigint
> endo show meaningful-bigint
42n
> endo store --json-stdin --name greeting < <(jq -n '{hello:"world"}')
> endo show greeting
{ hello: 'world' }
> endo store --text-stdin --name greeting < <(echo hi)
> endo show greeting
hi
> endo store --stdin --name greeting < <(echo hi)
> endo show greeting
Object [Alleged: Readable file with SHA-512 d78abb05...] {}
> endo cat greeting
hi

packages/cli/src/commands/show.js Outdated Show resolved Hide resolved
packages/cli/src/commands/store.js Outdated Show resolved Hide resolved
packages/cli/src/commands/store.js Outdated Show resolved Hide resolved
@rekmarks

This comment was marked as resolved.

Copy link
Contributor

@rekmarks rekmarks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion to DRY up store.js, otherwise LGTM.

packages/cli/src/commands/store.js Outdated Show resolved Hide resolved
@kriskowal kriskowal force-pushed the kriskowal-daemon-store-value branch from b5b6aeb to a4a53d0 Compare April 25, 2024 20:28
Base automatically changed from kriskowal-daemon-store-value to master April 25, 2024 20:38
Copy link
Contributor

@rekmarks rekmarks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it!

@kriskowal kriskowal merged commit 2afacc5 into master Apr 25, 2024
17 checks passed
@kriskowal kriskowal deleted the kriskowal-cli-store branch April 25, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants