-
Notifications
You must be signed in to change notification settings - Fork 204
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(action-menu)!: move to separate package #1049
feat(action-menu)!: move to separate package #1049
Conversation
Signed-off-by: Ariel Gentile <[email protected]>
Codecov Report
@@ Coverage Diff @@
## 0.3.0-pre #1049 +/- ##
=============================================
- Coverage 88.22% 88.18% -0.05%
=============================================
Files 680 680
Lines 15852 15828 -24
Branches 2548 2548
=============================================
- Hits 13986 13958 -28
- Misses 1861 1865 +4
Partials 5 5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
packages/action-menu/README.md
Outdated
</p> | ||
<br /> | ||
|
||
TODO |
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.
Instead of todo, could we add a very simple installation + how to add it as a module (basically install + what you have in the breaking change message).
We should also do this for question answer
packages/action-menu/package.json
Outdated
"class-validator": "0.13.1" | ||
}, | ||
"devDependencies": { | ||
"@aries-framework/core": "0.2.4", |
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.
No need to have it as a dev dependencie if it is already a dependency, right?
Also, I think it should be a peer dep
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.
Yes. And regarding the version number, should it always match the version of AFJ core/node/react-native?
For the moment it's 0.2.4 but I guess we'll need to update to 0.3.0 for all packages in a further PR before merging to main.
} | ||
|
||
const publicDidSeed = process.env.TEST_AGENT_PUBLIC_DID_SEED ?? '000000000000000000000000Trustee9' | ||
export function getBaseConfig(name: string, extraConfig: Partial<InitConfig> = {}) { |
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.
You can import these from the helpers.ts test file directly. We should look at creating an internal/private @aries-framework/test-utils package over time, but for now the direct import works fine I think. Otherwise we're going to duplicate the same setup a lot of times.
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.
Agree. Actually it seems that it was a copy-paste issue from question-answer, as I'm not using it. :-) Will update it in question-answer as well.
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
@@ -6,7 +6,7 @@ | |||
height="250px" |
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.
Not as a comment on your work, but we should probably export the dummyModule so other people can get started aswell :).
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.
What do you mean exactly by this @blu3beri?
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.
We have a samples/extension-module in AFJ explaining to people on how to create an extension module, the old way. If we update that everyone has a clear example to start modularising other modules and their custom modules that they might use.
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.
Ah gotcha! Yes totally agree
) Signed-off-by: Ariel Gentile <[email protected]> BREAKING CHANGE: action-menu module has been removed from the core and moved to a separate package. To integrate it in an Agent instance, it can be injected in constructor like this: ```ts const agent = new Agent({ config: { /* config */ }, dependencies: agentDependencies, modules: { actionMenu: new ActionMenuModule(), /* other custom modules */ } }) ``` Then, module API can be accessed in `agent.modules.actionMenu`. chore: fix merge errors Signed-off-by: Ariel Gentile <[email protected]> chore: revert snapshot Signed-off-by: Ariel Gentile <[email protected]> chore: add new line Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile [email protected]
BREAKING CHANGE: action-menu module has been removed from the core and moved to a separate package. To integrate it in an Agent instance, it can be injected in constructor like this:
Then, module API can be accessed in
agent.modules.actionMenu
.