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

refactor: move init command functions into lib and introduce tests #168

Merged
merged 1 commit into from
Oct 15, 2018

Conversation

0x-r4bbit
Copy link
Contributor

@0x-r4bbit 0x-r4bbit commented Aug 10, 2018

@izqui @sohkai here's a first POC that shows what I was aiming for. Notice how the individual tasks have been extracted from the TaskList, so they can be imported individually and therefore be tested in isolation.

I added some inline comments with some additional thoughts as well.

This is definitely not the most beautiful architecture, but I think it takes us one step further towards a testable code base.

Let me know what you think.

@@ -7,6 +7,64 @@ const fs = require('fs-extra')
const { installDeps } = require('../util')
const defaultAPMName = require('../helpers/default-apm')


const handlerTasks = {
checkProjectExistence: (options) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

handlerTasks is exported below so tasks can be imported individually when testing.

Also, each handler task receives options. That's because a command's handler might introduce some additional logic and properties that may be needed within handler tasks.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think in general options should be replaced by the actual option values that this particular task needs, in this case: options -> { basename }.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes makes sense. It probably makes sense to find a general API that covers all possible cases, so that, whenever a new CLI functions is introduced, they expect the same parameters etc. Will have to look at other tasks to see what exactly would work. But we can definitely just go with destruction patterns for now.

handlerTasks.checkProjectExistence({ basename }),
handlerTasks.cloneTemplate({ template, basename }),
handlerTasks.prepareTemplate({ name, basename }),
handlerTasks.installDependencies({ basename })
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd even take this one step further and do it similar to how Pando is doing it (as @sohkai mentioned), where there could be a AragonCLI library, that comes with all the tasks, which we can then use in CLI wrapper commands.

The library would be the core that'd be tested, while the CLI wrapper commands could be used for e2e tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I like that idea actually. Also I think the task title shouldn't be at library level (they are the CLI's UI), as it kind of is right now by being provided as a property to the task object (due to how TaskList works)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I agree with that. We can roll that back. In fact, right now I'd vote for introducing a lib folder with all the functions that will be consumed by tasklist (and therefor CLI wrappers).

Once that is done, we can think about how to move away from Tasklist (if this is still something that should happen).

@0x-r4bbit 0x-r4bbit mentioned this pull request Aug 10, 2018
Copy link
Contributor

@izqui izqui left a comment

Choose a reason for hiding this comment

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

I like where this is going. The current architecture of the CLI is built around working with TaskList. Things like context passing across tasks (and between tasks that execute a nested TaskList) could end up making testing more complicated. Scoping and reducing the side-effects between tasks will make testing easier.

I would say progressively moving away from TaskList could be a good decision, given how it is 'forcing' us to write code that is harder to test, and the fact that it limits our ability to output to the console (as discussed here)

@@ -7,6 +7,64 @@ const fs = require('fs-extra')
const { installDeps } = require('../util')
const defaultAPMName = require('../helpers/default-apm')


const handlerTasks = {
checkProjectExistence: (options) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think in general options should be replaced by the actual option values that this particular task needs, in this case: options -> { basename }.

handlerTasks.checkProjectExistence({ basename }),
handlerTasks.cloneTemplate({ template, basename }),
handlerTasks.prepareTemplate({ name, basename }),
handlerTasks.installDependencies({ basename })
Copy link
Contributor

Choose a reason for hiding this comment

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

I like that idea actually. Also I think the task title shouldn't be at library level (they are the CLI's UI), as it kind of is right now by being provided as a property to the task object (due to how TaskList works)

title: 'Install package dependencies',
task: async (ctx, task) => (await installDeps(basename, task)),
}
handlerTasks.checkProjectExistence({ basename }),
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a note: in some commands, context from one task to another is passed by writing to the ctx object. In order to test individual tasks, the context will need to be properly set. Example: https://github.com/aragon/aragon-cli/blob/master/src/commands/apm_cmds/publish.js#L217

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@0x-r4bbit
Copy link
Contributor Author

I would say progressively moving away from TaskList could be a good decision

Depends.. I assume TaskList (listr) has been introduced for a good reason. So maybe we can figure out first, what TaskList adds to the able and then decide how to move on with it?

@izqui
Copy link
Contributor

izqui commented Aug 10, 2018

I think it was introduced mostly for UI reasons when working on the aragon run command, that has a bunch of steps and sub-tasks. Since that it has been extended to all commands for consistency's sake. The limited flexibility for outputting to the console while tasks are running is a major pain point.

My comment about removing it all-together is a bit extreme, but I think it shouldn't influence how the CLI is architected too much.

@0x-r4bbit
Copy link
Contributor Author

Gotcha, thanks!

@@ -6,6 +6,8 @@ const path = require('path')
const fs = require('fs-extra')
const { installDeps } = require('../util')
const defaultAPMName = require('../helpers/default-apm')
import { checkProjectExists } from '../lib/check-project-exists';
import { prepareTemplate } from '../lib/prepare-template';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discussed, we're introducing a lib folder here that would have all the actual functions etc. that can be used to compose CLI commands.

Also notice that I'm using import syntax here. This doesn't look very nice as the project so far seems to use commonjs syntax. I'm happy to change that to commonjs, however, I'd personally vote for rather slowly moving to ECMAScript module syntax as this is an official standard (by now).

If you agree with that, we can decide whether we change those imports in one go, or progressively as we go along (also here my personally vote: better progressively and keep shipping at the cost of having some temporary inconsistencies)

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good. The lib directory may end up having a ton of files if we extract all individual tasks. I propose we create a directory for every command (the ones you have created now would go under lib/init/).

If we do that, how would you feel about having an index file per command in the lib dir and export all the different tasks?

import { prepareTemplate, checkProjectExists } from '../lib/init'

For the import/exports, I agree on changing as we go.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I propose we create a directory for every command (the ones you have created now would go under lib/init/).

We can certainly do that, just keep in mind that there might be lib functions that will be used across tasks, or maybe even other lib functions. However, lib functions that exists only for a dedicated command, then definitely go in corresponding sub folders.

If we do that, how would you feel about having an index file per command in the lib dir and export all the different tasks?

Sure, we can do that. No strong feelings about that. :)

}
},
{
title: 'Install package dependencies',
title: 'Installing package dependencies',
Copy link
Contributor Author

@0x-r4bbit 0x-r4bbit Aug 10, 2018

Choose a reason for hiding this comment

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

Basically went back to having the tasks defined inline, as the actual functionality is moved into lib modules now. That way, we can easily move away from tasklist at some point, without having to worry about touch test imports.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perfect

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm working on #98, is ok to refactor my implementation of the new command aragon start?

import path from 'path';
import fs from 'fs-extra';

export async function prepareTemplate(basename, appName) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@izqui As you can see, I didn't go with the destruction syntax here any more. The main reason really is that, we keep composing the tasks within the handler where we have full control over what parameters are being passed to library functions.

Happy to go with options object with destruction syntax again, if you have strong feelings about that.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 I think explicitly passing the parameters each function needs is better than the options object.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wonderful!

@0x-r4bbit
Copy link
Contributor Author

Alright, updated the PR and added some inline comments. I basically rolled back to having inline tasks but moving the core functionalities into lib modules.

The nice thing about that is that we can now start writing tests for those library functions, without the whole tasklist ceremony. In fact, we also don't have to worry about tasks that use third party code we don't have control over (e.g. clone() should be tested by git-clone's author).

I think this could be a reasonable start to move the CLI structure in a more testable direction.

PTAL :)

Copy link
Contributor

@izqui izqui left a comment

Choose a reason for hiding this comment

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

I like the direction of this!!

In more complex commands (such as publish or run) where the ctx object is used to pass context around tasks, the needed pieces of context could be passed to the functions directly and then return the results that need to be saved in the context.

The only issue with this could be executing sub-TaskLists (which we use quite a bit for complex commands), that automatically inherit the context and can write to it (for example, the publish command uses the deploy command to deploy a contract and then reads from the context the address where the contract was deployed to here). We need to think how these cases would look like: the logic of task is just executing another task.

@@ -6,6 +6,8 @@ const path = require('path')
const fs = require('fs-extra')
const { installDeps } = require('../util')
const defaultAPMName = require('../helpers/default-apm')
import { checkProjectExists } from '../lib/check-project-exists';
import { prepareTemplate } from '../lib/prepare-template';
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good. The lib directory may end up having a ton of files if we extract all individual tasks. I propose we create a directory for every command (the ones you have created now would go under lib/init/).

If we do that, how would you feel about having an index file per command in the lib dir and export all the different tasks?

import { prepareTemplate, checkProjectExists } from '../lib/init'

For the import/exports, I agree on changing as we go.

}
},
{
title: 'Install package dependencies',
title: 'Installing package dependencies',
Copy link
Contributor

Choose a reason for hiding this comment

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

Perfect

import path from 'path';
import fs from 'fs-extra';

export async function prepareTemplate(basename, appName) {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 I think explicitly passing the parameters each function needs is better than the options object.

@0x-r4bbit
Copy link
Contributor Author

The only issue with this could be executing sub-TaskLists (which we use quite a bit for complex commands), that automatically inherit the context and can write to it (for example, the publish command uses the deploy command to deploy a contract and then reads from the context the address where the contract was deployed to here). We need to think how these cases would look like: the logic of task is just executing another task.

Yes. I haven't actually paid attention to those yet because I first wanted to make a very concrete example of what the proposed change would look like.

I'd propose, I update this PR once more with the changes you've requested (introducing sub folders in lib) and also adding first tests and then we can take it from there and work our way through command by command.

@0x-r4bbit 0x-r4bbit force-pushed the feat/test-setup branch 2 times, most recently from 77c602d to c4491f3 Compare August 13, 2018 11:10
@0x-r4bbit
Copy link
Contributor Author

@izqui this is now updated and introduces first couple of tests.

@0x-r4bbit 0x-r4bbit changed the title WIP: propose code structure for better testability refactor: move init command functions into lib and introduce tests Aug 13, 2018
@kernelwhisperer
Copy link
Contributor

This looks great 👍
@izqui should we merge this?

@izqui
Copy link
Contributor

izqui commented Oct 12, 2018

Agreed! Feel free to merge @0x6431346e after testing it :)

@kernelwhisperer
Copy link
Contributor

Agreed! Feel free to merge @0x6431346e after testing it :)

Done. Tested by building and using npm link to init a new project 💯

@kernelwhisperer kernelwhisperer merged commit 525b1de into aragon:master Oct 15, 2018
@0x-r4bbit 0x-r4bbit deleted the feat/test-setup branch October 15, 2018 07:00
@0x-r4bbit
Copy link
Contributor Author

Yay! Happy this has landed!

@izqui
Copy link
Contributor

izqui commented Oct 15, 2018

Thanks for this amazing contribution @PascalPrecht!!

0xGabi pushed a commit to 0xGabi/aragon-cli that referenced this pull request Jan 5, 2019
refactor: move init command functions into lib and introduce tests
@0xGabi 0xGabi mentioned this pull request Jan 9, 2019
2 tasks
0xGabi pushed a commit that referenced this pull request Feb 25, 2019
refactor: move init command functions into lib and introduce tests
0xGabi added a commit that referenced this pull request Feb 28, 2019
* Fix setPermissions in dao install (#303)

* Fix app install command (#287)

Add NO_MANAGER (0x00..) to set permission task on app installation. Before
ANY_ENTITTY (0xff...) was being used, so permissions were being blocked.

* Upgrade version to 5.2.2

* Update ganache-core to 2.3.2 (#302)

* Update ganache-core to 2.3.2

* Add package-lock.json to make CI pass

* Fix bug in `aragon dao acl` command (#304)

Fix printing bug in `aragon dao acl`

* Create CONTRIBUTING.md

* Add documentation about .ipfsignore

close #135

* Update README.md

* Update README.md

* Add help text to `aragon dao install --app-init` option (#312)

If install command doesn't find initialization method, it won't
initialize the newly installed app, but this is not obvious from the
help instructions.
Although it's "dangerous", sometimes it's useful to install an app
without initializing. For instance, Token Manager: to initialize it
the token must be provided, and this token must have this new Token
Manager app as controller. Therefore token controller must be changed
in between creation and initialization of Token Manager app.

* Add filter for files passed as parameter to not be ignored (#313)

* add filter for files

* consider ignore files without eol at the end

* Add ipfs-check to 'aragon new dao' (#305)

* lerna import aragon-cli and create-aragon-app

* delete old root files

* delete files from package dont needed localy

* update lock files after bootstrap

* Delete packages to reimport again

* Initial commit

* First Commit

* Add README

* add yargs default command

* 1.0.1

* Update README.md

* Update README.md

* 1.0.2

* Update README.md

* 1.0.3

* Update README.md

* 1.0.4

* Update: prepare-template for environments

* 1.0.5

* Fix: changes after review

* 1.0.6

* Fix: remove test from documentation lint

* Initial

* Rename package to @aragon/cli

* Merge pull request #16 from aragon/ens-address

Add ENS registry address flag

* 1.1.0

* Update authorship

* Merge pull request #20 from aragon/scaffolding

Support scaffolding

* 1.2.0

* Create LICENSE

* Merge pull request #21 from aragon/rename-module-to-app

Rename module to application

* 1.2.1

* Update examples in README

* Merge pull request #22 from aragon/refactor

Initial refactor

* Update usage in README

* Bump yargs to 10.1.x

* Refactor CLI entrypoint to use middlewares

* Merge pull request #28 from macor161/node-version

Add node version dependency

* 2.0.0

* hackathon fix #1

* 2.0.1

* Merge pull request #30 from aragon/os3

[WIP] Parse functions and new roles and add onlyArtifacts flag to publish

* Merge pull request #36 from aragon/bin-rename

Rename bin from aragon-dev-cli to aragon

* Merge pull request #40 from gasolin/arapp

Rename module.json to arapp.json, fix #29

* Merge pull request #38 from aragon/rinkeby-publish

make publish work on rinkeby

* Merge pull request #41 from aragon/pin-web3

Pin web3 to beta.26

* v2.0.5

* Merge pull request #42 from aragon/pin-ganache

Pin ganache-core to under 2.1.0

* v2.0.6

* Merge pull request #44 from aragon/fix-no-params

Solidity extractor: fix parameter parsing when no params exist

* Merge pull request #45 from aragon/fix-function-in-comment

Solidity extractor: fix usages of 'function' in comment flagging declarations

* v2.0.7

* Return content URI even if artifact doesn't exist

* Merge pull request #49 from aragon/grant

aragon grant

* Delete .node-version

* Delete wallaby.js

* Merge pull request #52 from aragon/cleanup-reporter

Clean up reporter

* Merge pull request #53 from aragon/cleanup-commands

Clean up commands

* Merge pull request #59 from aragon/apm.js

Use `@aragon/apm`

* Merge pull request #58 from aragon/better-ignore

Better ignore

* Add a brand new README

* Add configuration docs

* Merge branch 'beta'

* Fixing RPC flags

* Couple changes

* Version bump

* Fixes #72

* Bump version

* Fixes #88

* Fixes #80

* Fixes #77

* Groups APM ops into aragon apm subcommand (#87)

* Make DAO a more generic command group (#87)

* Added all apm subcommands

* Closes #87

* Added dao and apm aliases for command line. Not updating ganache snapshots anymore, rather automatically bumping the package version if using aragon run

* Bumping version

* Remove aragon-dev-cli entrypoint, finishing rename

* Rename aliases

* Fix init name issue, close #76

* Merge pull request #91 from aragon/deploy-command

Implement deploy command and use it everywhere + tons of low hanging fruit

* Add warning if wrapper port was already open. Close #75

* Requiring node >=8

* Merge pull request #94 from aragon/dao-install

New commands (dao new, dao install, dao upgrade, aragon ipfs) + aragon run refactor

* Publish to npm

* Merge branch 'master' of github.com:aragon/aragon-dev-cli

* 4.0.0

* Merge pull request #101 from aragon/update_readme

Update README

* Merge pull request #104 from aragon/wrapper-pin

Pin wrapper to master

* 4.0.1

* IPFS check option in publish and update to @aragon/cli 1.1.2

* 4.0.2

* Always publish manifest from project root

* 4.0.3

* Fix

* Merge branch 'master' of github.com:aragon/aragon-dev-cli

* Update web3 to 1.0.0-beta.34

* Merge master

* Merge pull request #112 from aragon/print-mnemonic-phrase

Print mnemonic phrase when running the dev chain

* 4.1.1

* Update README.md

* Bypass no artifact found for bare kit hardcoding ABI temporarily (#126)

Temp fix for

```
`Fetching kit bare-kit.aragonpm.eth@latest
→ Cannot find artifacts in APM repo. Please make sure the package is public ...`
```

This should make the bare-kit work regardless of whether my ipfs daemon is on lol

* 4.1.2

* Update package-lock.json

* Update @aragon/apm and pin 1.1.6

* 4.1.3

* Merge pull request #155 from jtremback/network-id-fix

janky network id fix

* Fix missing opn import (#157)

* Merge pull request #161 from aragon/pin-ethereumjs-wallet

Bump ganache-core version to ensure ethereumjs-wallet is pinned to 0.6.0

* 4.1.4

* Merge pull request #162 from PascalPrecht/fix/129

fix: don't use yarn for aragon init

* Merge pull request #164 from PascalPrecht/fix/init-cmd

fix(commands/init): throw meaningful error if project folder already exists

* Merge pull request #165 from aragon/cleanup-comment

Chore: Clean up commented log

* Merge pull request #144 from aragon/only-content-artifacts

Always generate artifact if there is a contract linked in the arapp file

* Merge pull request #169 from aragon/apm-dep

Add apm.js dependency

* Merge pull request #140 from aragon/custom-build

Implement custom build script in 'apm publish'

* Merge pull request #145 from aragon/publish-deploy-contract

Pass contract name specified in publish to deploy

* 4.1.5

* Merge pull request #170 from aragon/devchain-resets

Improve experience around devchain resets

* Merge pull request #178 from PascalPrecht/fix/commands/apm/publish-error-msg

fix(commands/apm/publish): fix link to version upgrade rules

* Merge pull request #176 from PascalPrecht/fix/commands/apm/grant

fix(commands/apm/grant): use updated CREATE_VERSION_ROLE hash

* Merge pull request #174 from PascalPrecht/uiux/commands/apm

uiux(commands/apm): show meaningful error messages

* Merge pull request #181 from aragon/wrapper-commit

Fix wrapper commit not being checked out and update wrapper commit

* 4.1.6

* Improve error message when provider is unaccessible (#185)

Improve error message when provider is unaccessible and support provider lazy loading

* Add react-kit alias for aragon init (#184)

* Remove apm alias and update readme references (#183)

* Remove apm alias and update readme references

* Add aragon package alias for aragon apm

* Add call command (#141)

* Add call command

* debug cleanup

* responded to comments

* Improve error message when provider is unaccessible (#185)

Improve error message when provider is unaccessible and support provider lazy loading

* Add react-kit alias for aragon init (#184)

* Remove apm alias and update readme references (#183)

* Remove apm alias and update readme references

* Add aragon package alias for aragon apm

* Minor clean up to exec command

* Added link to dev portal in README

* Update to latest @aragon/wrapper and display permission managers (#187)

* Update to @aragon/[email protected]

* Only show permissions in dao acl when there are allowed entities

* Display permission manager in dao acl command

* Added HTTP provider feature (WIP) (#171)

* Added HTTP provider option

* Rename http provider flags

* Update to @aragon/apm 2.0.1

* Small improvements to http provider

* Implement ACL write commands (#190)

* dao acl view: fix truncated proxy addresses

* dao exec: extract exec logic into handler for reusability

* aragonjs-wrapper: clean up unused code

* dao acl grant: Implement command

* dao acl create: Implement command

* dao acl revoke: Implement command

* dao acl set-manager: Implement command

* dao acl remove-manager: Implement command

* Exec handler clean up

* dao acl: allow role names

* Update to @aragon/wrapper 2.0.0-beta.43

* Fix wrapper connection ipfs settings

* Update package-lock.json

* 4.2.0

* Add core-js dependency

* 4.2.1

* Remove core-js dep and use babel-polyfill

* 4.2.2

* Make babel-polyfill dependency

* 4.2.3

* [WIP] Update to aragonOS 4 (#186)

Update to aragonOS 4

* Update wrapper version

* 5.0.0

* Install go-ipfs as dependency, remove the need for manual install (#205)

* Install go-ipfs as dependency, remove the need for manual install

* Typo fix

* Using spaces for ipfs.js

* Remove unused return value in ensureIPFSInitialized

* feat(commands/run): introduce --client-version and --client-port (#194)

* refactor: move aragon client version into package.json property

NPM's package files support custom properties for library specific usages.
This commit moves the aragon client version into a newly introduced
`aragon` properties section.

* refactor: rename WRAPPER_PATH, WRAPPER_PORT to CLIENT_PATH, CLIENT_PORT

* feat(commands/run): introduce --client-version and --client-port

This commit introduces a new option `--client-version` that can be used to
specify the Aragon client version to be used as discussed in #182. A version
can be any commit-ish values (hashes, branches, tags).

Example:

```
$ aragon run --client-version=fa2025232330bc3e4d3b792cab4bf44d754d33e6
```
Or

```
$ aragon run --client-version=dev
```

It also offers a new option `--client-port` to configure the port on which
the client is being served from.

Notice that this option is being ignored at the moment, which will be addressed
in a future commit. For more info: #198

Closes #182

* Removed homedir dependency (#208)

* feat(commands/run): introduce --client-path option (#200)

This commit enables users to pass a `--client-path` to the `run` command.
The path specifies the location to an already existing installation of the
Aragon client on the local machine, allowing developers to test custom versions
of the app.

Closes #199

* fix(apm/publish): check if artifact.json already exist (#175)

* fix(apm/publish): check whether artifact.json already exist

And throw if it doesn't. CLI users will have to generate the artifact.json
explicitly using `apm publish --only-artifacts`.

Closes #159

* feat(apm/publish): allow users to generate artifact if it doesn't exist

* Update @aragon/apm to 2.0.2 (#210)

* Using local dependencies by default, and falling back to global if not found (#207)

* fix(commands/run): ensure configured client wrapper port is used (#201)

Prior to this commit, using `WRAPPER_PORT` and changing it to a users needs
didn't have any effect as

a) the port has never been passed down to the Aragon client
b) Aragon client's script isn't prepared to retrieve values from the environment

This commit ensures that the port is set as an environment variable,
enabling Aragon client to take advantage of it.

Fixes #198

* Merge pull request #209 from aragon/remove-aragon-apps-dep

Moved @aragon/apps-* to devDependencies

* Remove unnecessary BROWSER env var in aragon run (#212)

* Merge pull request #216 from aragon/bugfix/215-update-wrapper-commit

Update Aragon Core to latest(526a19)

* Merge pull request #168 from PascalPrecht/feat/test-setup

refactor: move init command functions into lib and introduce tests

* Update deps

* 5.1.0

* Fix solidity extractor (#229)

* Fix solidity extractor when radspec strings have function calls

* Add string type

* Fix visibility modifier detection in multiline function declaration

* Add timeout for starting IPFS and better error handling (#211)

* Add timeout for starting IPFS and better error handling

* Always migrate on IPFS daemon start to avoid user prompt

* Bugfix/220 fix linting (#221)

* Fix linting command and autofix lint errors

* Manually fix lint errors

* Add babel-eslint and fix the ava config

* Add documentation lint

* Upgrade babel dependencies

* Fix identation + ipfs cors check

* Fix CORS check for ipfs

* Use existent artifact file if present (#226)

* 5.1.1

* fix bug in printing apps table (#236)

* apm publish: Improve publish feedback (#231)

* apm publish: Improve publish feedback

* apm publish: Print publish directory path on debug

* Add deployment artifacts to artifact.json (#232)

* Add deployment artifacts to artifact.json

* Clean up artifact generation

* Fetch artifacts from previous version if running in --only-content mode

* Fix crash when there are no compiler optimization settings

* Use gas price from truffle config file (#228)

* Use gas price from truffle config file

* Fix lint

* Enable environments in arapp.json (#230)

* enable environments in arapp.json

* suggested changes

* pass userApps directly to listApps

* fix merge conflict

* Fix skip network commands

* Minor bug fixes to publish command

* Fix

* remove licenses when preparing template (#234)

* Update to @aragon/wrapper 2.0.0 (#240)

* 5.2.0-beta.1

* Always alow to provide --network flag if running the contracts command (#247)

* Always alow to provide --network flag if running the contracts command

* 5.2.0-beta.2

* Fix exec command when run with multiple arguments (#241)

* Add --use-frame flag for using frame as the web3 provider (#242)

* Dont require artifact to exist after publishing (#250)

* aragon apm grant: support granting permissions to many addresses (#251)

* 5.2.0-beta.3

* dao acl *: Add middleware (#256)

* 5.2.0-beta.3

* dao acl: Add middleware

* 5.2.0-beta.4

* Fix IPFS dependency pinning to 0.4.17 (#260)

* Add origin header to frame provider (#258)

* Add origin header to frame provider

* Fix naming

* 5.2.0

* Merge pull request #262 from aragon/print_ens

Add ENS address output to `aragon devchain`

* 'wrapper' -> 'client' in logs (#269)

* Merge pull request #245 from perissology/ipfs-check

implement better ipfs running check

* Merge pull request #252 from perissology/acl-view

fix bug in acl view cmd

* Merge pull request #223 from jvluso/debug

Add silent and debug logging options

* Merge pull request #268 from aragon/0.6

Update to aragon 0.6 dependencies

* Merge pull request #280 from aragon/fix_ganache

Pin ganache version to 2.2.1

* Merge pull request #279 from galactusss/pre-commit

Add husky for pre-commit: lint-stage & pre-push: test

* Merge pull request #284 from aragon/apm-versions-verbose-error

Show more info when content cannot be found

* Support 'dao upgrade' and 'dao install' on live DAOs (transaction pathing) (#270)

* Append .aragonid.eth if needed

* Update to @aragon/wrapper 3.0.0 beta and add wsProvider to environment

* Add transaction pathing for dao install and dao upgrade

* Add wsProvider support for 'dao apps' and 'dao acl' commands

* chore: update license to Aragon Association (#292)

* chore: update license text (#293)

* Fix setPermissions in dao install (#303)

* Fix app install command (#287)

Add NO_MANAGER (0x00..) to set permission task on app installation. Before
ANY_ENTITTY (0xff...) was being used, so permissions were being blocked.

* Upgrade version to 5.2.2

* Update ganache-core to 2.3.2 (#302)

* Update ganache-core to 2.3.2

* Add package-lock.json to make CI pass

* Fix bug in `aragon dao acl` command (#304)

Fix printing bug in `aragon dao acl`

* Create CONTRIBUTING.md

* Add documentation about .ipfsignore

close #135

* Update README.md

* Update README.md

* Add help text to `aragon dao install --app-init` option (#312)

If install command doesn't find initialization method, it won't
initialize the newly installed app, but this is not obvious from the
help instructions.
Although it's "dangerous", sometimes it's useful to install an app
without initializing. For instance, Token Manager: to initialize it
the token must be provided, and this token must have this new Token
Manager app as controller. Therefore token controller must be changed
in between creation and initialization of Token Manager app.

* Add filter for files passed as parameter to not be ignored (#313)

* add filter for files

* consider ignore files without eol at the end

* Add ipfs-check to 'aragon new dao' (#305)

* deprecate aragon init (#323)

* Handle arapp.json parse errors (#330)

Testet! Great feature added

* Create a new ganache db for each version (#329)

* Change dao exec to use wsRPC (#338)

* Add global environments (#336)

* Print permissionless apps (#340)

* New command: change-controller (#339)

* Allow MiniMe token creation (#335)

* Pin ganache to 2.2.1 (#341)

* Use tx pathing for setPermissions (#334)

* Use tx pathing for setPermissions

* Fix setPermissions

* fix(dao install): update error message when installing app without roles (#343)

Rewords to "roles" as it's the key in the `arapp.json`. Also gives a bit more guidance as to how to find more information.

* Bump minor -> 5.3.0 (#342)

* Update client version to 0.6.2

* 5.3.1

* feat: upgrade aragon client (#345)

Includes windows-compatible scripts for aragon/aragon

* 5.3.2

* Pin web3 (#354)

* 5.3.3

* fix: Remove path and roles from being mandatory in arapp.json schema (#351)

* Fix gasLimit issue for dao new (#361)

* Fix gas on grant and publish (#366)

* Add staging as default environment (#368)

* aragon init: prepare template for environments

* Update: prepare-template for environments

* Fix: update lint test folder

* Fix: update ava tests

* Fix: ava test

* Fix: changes after review

* Implement `dao act` command for Agent app integration (#356)

* WIP: dao act command

* dao act: working

* dao act: cleanup

* Fix target explanation

Co-Authored-By: izqui <[email protected]>

* Upgrade @aragon/wrapper (#359)

* Fix ABI import of the Kernel

* Fix ABI import of the Kernel

* Fix: Remove documentation lint for test

* Pin last @aragon/wrapper beta

* Update install.js

Add abi format

* Update package.json

Fix: lint rule typo

* Bump version to beta and remove package-lock.json

* Fix: version typo

* Testing: sharness environment (#363)

* Testing: sharness environment setup

* Add sharness tests to help and version

* Test: Add create-aragon-app and aragon init test

* Test: Update create-aragon-app and init tests

* Add aragon ipfs

* Fix attempt for aragon_ipfs test

* Update travis.yml to install last npm version

* pin v5.4 and update client version

* Clean redundant files

* Fix travis

* Disable npm ci when installing
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.

5 participants