@graphprotocol/graph-cli 0.42.3 → 0.42.4

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,5 +1,14 @@
1
1
  # @graphprotocol/graph-cli
2
2
 
3
+ ## 0.42.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1185](https://github.com/graphprotocol/graph-tooling/pull/1185)
8
+ [`edf14d6`](https://github.com/graphprotocol/graph-tooling/commit/edf14d6fa580e99b317a977d0b693f182e746d4e)
9
+ Thanks [@incrypto32](https://github.com/incrypto32)! - Fix graph init failing to add more than one
10
+ contract
11
+
3
12
  ## 0.42.3
4
13
 
5
14
  ### Patch Changes
@@ -752,7 +752,7 @@ async function addAnotherContract({ protocolInstance, directory, }) {
752
752
  const ProtocolContract = protocolInstance.getContract();
753
753
  let contract = '';
754
754
  for (;;) {
755
- contract = await core_1.ux.prompt(`Contract ${ProtocolContract.identifierName()}`, {
755
+ contract = await core_1.ux.prompt(`\nContract ${ProtocolContract.identifierName()}`, {
756
756
  required: true,
757
757
  });
758
758
  const { valid, error } = (0, validation_1.validateContract)(contract, ProtocolContract);
@@ -761,23 +761,26 @@ async function addAnotherContract({ protocolInstance, directory, }) {
761
761
  }
762
762
  this.log(`✖ ${error}`);
763
763
  }
764
- const localAbi = await core_1.ux.prompt('Provide local ABI path? (y/n)', {
764
+ const localAbi = await core_1.ux.prompt('\nProvide local ABI path? (y/n)', {
765
765
  required: true,
766
766
  type: 'single',
767
767
  });
768
768
  abiFromFile = localAbi.toLowerCase() === 'y';
769
769
  let abiPath = '';
770
770
  if (abiFromFile) {
771
- abiPath = await core_1.ux.prompt('ABI file (path)', { required: true });
771
+ abiPath = await core_1.ux.prompt('\nABI file (path)', { required: true });
772
772
  }
773
- const contractName = await core_1.ux.prompt('Contract Name', { required: true, default: 'Contract' });
773
+ const contractName = await core_1.ux.prompt('\nContract Name', {
774
+ required: true,
775
+ default: 'Contract',
776
+ });
774
777
  // Get the cwd before process.chdir in order to switch back in the end of command execution
775
778
  const cwd = process.cwd();
776
779
  try {
777
780
  if (fs_1.default.existsSync(directory)) {
778
781
  process.chdir(directory);
779
782
  }
780
- const commandLine = ['add', contract, '--contract-name', contractName];
783
+ const commandLine = [contract, '--contract-name', contractName];
781
784
  if (abiFromFile) {
782
785
  if (abiPath.includes(directory)) {
783
786
  commandLine.push('--abi', path_1.default.normalize(abiPath.replace(directory, '')));
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.42.3",
2
+ "version": "0.42.4",
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.42.3",
3
+ "version": "0.42.4",
4
4
  "description": "CLI for building for and deploying to The Graph",
5
5
  "license": "(Apache-2.0 OR MIT)",
6
6
  "engines": {