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(core-container): use system paths for configuration and data #1987

Merged
merged 9 commits into from
Jan 16, 2019

Conversation

faustbrian
Copy link
Contributor

@faustbrian faustbrian commented Jan 16, 2019

Proposed changes

Adds the possibility of using the paths that an operating recommends for configuration and data storage. Below is an example of how this would look like.

{
  data: '/home/dev/.local/share/ark-nodejs',
  config: '/home/dev/.config/ark-nodejs',
  cache: '/home/dev/.cache/ark-nodejs',
  log: '/home/dev/.local/state/ark-nodejs',
  temp: '/tmp/dev/ark-nodejs'
}

Instead of asking people to do yarn relay:devnet --config ~/.ark/config --data ~/.ark/config they could simply do yarn relay:devnet --token ark or yarn relay:devnet --token kaput and it will use the correct system paths with the correct permissions on macOS, Linux or Windows. This also exposes other useful paths we can use in the future like cache or logs.

I kept the --config and --data flags for now but I am considering to remove them and use only the system paths.

This is a follow up to #1970.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes

@codecov-io
Copy link

codecov-io commented Jan 16, 2019

Codecov Report

Merging #1987 into develop will increase coverage by 0.03%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop   #1987      +/-   ##
==========================================
+ Coverage    38.66%   38.7%   +0.03%     
==========================================
  Files          385     385              
  Lines         8279    8286       +7     
  Branches      1161    1162       +1     
==========================================
+ Hits          3201    3207       +6     
- Misses        5066    5067       +1     
  Partials        12      12
Impacted Files Coverage Δ
packages/core-test-utils/src/helpers/container.ts 0% <ø> (ø) ⬆️
packages/core-database-postgres/src/connection.ts 0% <0%> (ø) ⬆️
packages/core-blockchain/src/state-storage.ts 86.48% <100%> (ø) ⬆️
packages/core-container/src/environment.ts 73.07% <84.61%> (+0.85%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7e7cb6...34aeec7. Read the comment docs.

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.

3 participants