graph-tooling
graph-tooling copied to clipboard
Call commands internally instead of as `npm/yarn` script
Which packages are impacted by your issue?
@graphprotocol/graph-cli
Describe the issue
On init or add the codegen command for example is executed as a yarn/npm script
There are already places where commands are invoked internally, for example the add command when adding more contracts on init https://github.com/graphprotocol/graph-tooling/blob/main/packages/cli/src/commands/init.ts#L1073
That may also make the install dependencies step obsolete during the init process and be left for the users to do manually with their preferred package manager
Expected behavior
The cli should call the commands internally instead of using the generated npm/yarn script from the package.json to execute codegen
I think this is also important given we are going to be publishing this as binary soon #1257