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

Implement upload command #100

Open
5 tasks
elliotBraem opened this issue May 16, 2024 · 0 comments
Open
5 tasks

Implement upload command #100

elliotBraem opened this issue May 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@elliotBraem
Copy link
Contributor

This used to be a feature of bos-workspace 0.0.1, but was only partially carried over from the refactor. To be completed after #99.

The purpose of the command is to upload other data, besides widget to the social contract. As you can see, looking at an account's data tree on social contract, see every.near's here, there can be other data aside from widget such as "type", "thing", "project"... we want to enable the ability to manage and upload these files from bos-workspace.

The prior implementation of this can be found HERE, feel free to use it as a reference. In short, it loops through all the files in designated directories and builds a large data.json, converts to base64, then uploads to social contract via near cli command.

I think in the new implementation, we should do the same, but associate it with a configuration in the bos.config.json that designates which directories should be uploaded. For example:

bos.config.json

{
    "account": "sample.near",
    "data": { 
      "include": ["type", "thing", "project"]
    }
  }

Where the strings in "include" are references to the directory names in same level as the bos.config.json. An example of a repository that would use this feature is hyperfiles.

Acceptance criteria

  • Upload command uploads data to social.near contract
  • Command throws error if an "included" directory does not exist
  • Test coverage
    • should throw error if included directory does not exist
    • should call social contract with correct values & base64 encoded json
@elliotBraem elliotBraem added the enhancement New feature or request label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant