-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
The go implementation stores a backup of the config every time a profile is applied. I'm not sure that's necessary, @alanshaw do you think we need it? |
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
051c434
to
6b82ae1
Compare
FYI @dirkmc I have rebased and updated deps |
const out = await ipfs('config profile apply server') | ||
expect(out).not.includes('PrivKey') | ||
}) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these just be interface-ipfs-core
tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm hesitant for two reasons:
- We test to see if the profile was correctly applied by inspecting the config which requires the tests to have knowledge of what the profiles are - as implemented this would involve adding
ipfs
as a dependency of the interface tests which it is not currently - There are CLI features that aren't in the interface definition (for better or for worse) like listing available profiles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've exposed profile definitions over the http interface so these can be moved now, hooray!
@hacdias @olizilla @lidel we're adding profiles to js-ipfs. I'd like to add a desktop profile - what would that look like? Is desktop the default? What changes to the browser config should we make? Should we also have a browser profile so you can switch to it in other environments? Are we missing any other profiles? Please help 🙏 |
Prior art in go-ipfs/docs/config.md#profiles:
I think we could scope initial js-ipfs profiles to:
Hope this helps as a starting point :) |
Merged master into this PR to fix the merge conflicts. Still needs a bunch of work to address the PR comments and probably to integrate with #2428 |
I wonder if we could have an |
Anyone know why the method this adds is To me at least, it's a bit more obvious what the second one is going to do. |
Or better yet: Promise<Array<{ name: String, description: String }>> ipfs.config.profiles.list()
Promise<void> ipfs.config.profiles.apply(name, { dryRun: Boolean }) |
The functions in my previous comment are implemented so the list of available profiles is now exposed over the http api. Depends on: |
Workaround for chaijs/chai#1298
Fixes #2148
Depends on