@graphprotocol/graph-cli 0.51.2-alpha-20230620194216-37a1e4d → 0.51.2-alpha-20230621172007-4f03cf8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @graphprotocol/graph-cli
2
2
 
3
- ## 0.51.2-alpha-20230620194216-37a1e4d
3
+ ## 0.51.2-alpha-20230621172007-4f03cf8
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -54,7 +54,8 @@ class InitCommand extends core_1.Command {
54
54
  const commands = {
55
55
  link: yarn ? 'yarn link @graphprotocol/graph-cli' : 'npm link @graphprotocol/graph-cli',
56
56
  install: yarn ? 'yarn' : 'npm install',
57
- codegen: yarn ? 'yarn codegen' : 'npm run codegen',
57
+ // this ensure we run code-generation from our CLI instead of some script in package.json
58
+ codegen: yarn ? 'yarn graph codegen' : 'npx graph codegen',
58
59
  deploy: yarn ? 'yarn deploy' : 'npm run deploy',
59
60
  };
60
61
  // If all parameters are provided from the command-line,
@@ -646,9 +647,7 @@ Subgraph ${subgraphName} created in ${relativeDir}
646
647
 
647
648
  Make sure to visit the documentation on https://thegraph.com/docs/ for further information.`);
648
649
  }
649
- async function initSubgraphFromExample({
650
- // protocolInstance,
651
- fromExample, allowSimpleName, subgraphName, directory, }, { commands, }) {
650
+ async function initSubgraphFromExample({ fromExample, allowSimpleName, subgraphName, directory, }, { commands, }) {
652
651
  // Fail if the subgraph name is invalid
653
652
  if (!revalidateSubgraphName.bind(this)(subgraphName, { allowSimpleName })) {
654
653
  process.exitCode = 1;
@@ -734,14 +733,12 @@ fromExample, allowSimpleName, subgraphName, directory, }, { commands, }) {
734
733
  this.exit(1);
735
734
  return;
736
735
  }
737
- // if (!isSubstreams) {
738
- // // Run code-generation
739
- // const codegen = await runCodegen(directory, commands.codegen);
740
- // if (codegen !== true) {
741
- // this.exit(1);
742
- // return;
743
- // }
744
- // }
736
+ // Run code-generation
737
+ const codegen = await runCodegen(directory, commands.codegen);
738
+ if (codegen !== true) {
739
+ this.exit(1);
740
+ return;
741
+ }
745
742
  printNextSteps.bind(this)({ subgraphName, directory }, { commands });
746
743
  }
747
744
  async function initSubgraphFromContract({ protocolInstance, allowSimpleName, subgraphName, directory, abi, network, contract, indexEvents, contractName, node, studio, product, startBlock, spkgPath, }, { commands, addContract, }) {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.51.2-alpha-20230620194216-37a1e4d",
2
+ "version": "0.51.2-alpha-20230621172007-4f03cf8",
3
3
  "commands": {
4
4
  "add": {
5
5
  "id": "add",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphprotocol/graph-cli",
3
- "version": "0.51.2-alpha-20230620194216-37a1e4d",
3
+ "version": "0.51.2-alpha-20230621172007-4f03cf8",
4
4
  "description": "CLI for building for and deploying to The Graph",
5
5
  "license": "(Apache-2.0 OR MIT)",
6
6
  "engines": {