@graphprotocol/graph-cli 0.52.1-alpha-20230718212224-9d21810 → 0.52.1-alpha-20230719201219-dde01c9

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,16 +1,21 @@
1
1
  # @graphprotocol/graph-cli
2
2
 
3
- ## 0.52.1-alpha-20230718212224-9d21810
3
+ ## 0.52.1-alpha-20230719201219-dde01c9
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - [#1400](https://github.com/graphprotocol/graph-tooling/pull/1400)
8
- [`d7a5634`](https://github.com/graphprotocol/graph-tooling/commit/d7a5634e5ba40873e62ff580db51b83f995e9e83)
8
+ [`e7423aa`](https://github.com/graphprotocol/graph-tooling/commit/e7423aa5a73a5b8a7919f92c558c49fe61be9c23)
9
9
  Thanks [@saihaj](https://github.com/saihaj)! - only update `network.json` file during `graph add`
10
10
  if it exists
11
11
 
12
+ - [#1403](https://github.com/graphprotocol/graph-tooling/pull/1403)
13
+ [`dde01c9`](https://github.com/graphprotocol/graph-tooling/commit/dde01c95527b6473e0eda6a533aa524d83f41e7c)
14
+ Thanks [@saihaj](https://github.com/saihaj)! - do not ask for local path when trying to add more
15
+ contracts during init
16
+
12
17
  - [#1400](https://github.com/graphprotocol/graph-tooling/pull/1400)
13
- [`d7a5634`](https://github.com/graphprotocol/graph-tooling/commit/d7a5634e5ba40873e62ff580db51b83f995e9e83)
18
+ [`e7423aa`](https://github.com/graphprotocol/graph-tooling/commit/e7423aa5a73a5b8a7919f92c558c49fe61be9c23)
14
19
  Thanks [@saihaj](https://github.com/saihaj)! - ask for start block in `graph add` if we cannot
15
20
  fetch the start block from etherscan
16
21
 
@@ -277,7 +277,9 @@ async function processFromExampleInitForm({ directory: initDirectory, subgraphNa
277
277
  initial: initSubgraphName,
278
278
  validate: name => {
279
279
  try {
280
- (0, subgraph_1.validateSubgraphName)(name, { allowSimpleName: initAllowSimpleName });
280
+ (0, subgraph_1.validateSubgraphName)(name, {
281
+ allowSimpleName: initAllowSimpleName,
282
+ });
281
283
  return true;
282
284
  }
283
285
  catch (e) {
@@ -360,7 +362,9 @@ async function processInitForm({ protocol: initProtocol, product: initProduct, s
360
362
  initial: initSubgraphName,
361
363
  validate: name => {
362
364
  try {
363
- (0, subgraph_1.validateSubgraphName)(name, { allowSimpleName: initAllowSimpleName });
365
+ (0, subgraph_1.validateSubgraphName)(name, {
366
+ allowSimpleName: initAllowSimpleName,
367
+ });
364
368
  return true;
365
369
  }
366
370
  catch (e) {
@@ -819,7 +823,10 @@ async function initSubgraphFromContract({ protocolInstance, allowSimpleName, sub
819
823
  return;
820
824
  }
821
825
  while (addContract) {
822
- addContract = await addAnotherContract.bind(this)({ protocolInstance, directory });
826
+ addContract = await addAnotherContract.bind(this)({
827
+ protocolInstance,
828
+ directory,
829
+ });
823
830
  }
824
831
  }
825
832
  printNextSteps.bind(this)({ subgraphName, directory }, { commands });
@@ -831,7 +838,6 @@ async function addAnotherContract({ protocolInstance, directory, }) {
831
838
  });
832
839
  const addContractConfirmation = addContractAnswer.toLowerCase() === 'y';
833
840
  if (addContractConfirmation) {
834
- let abiFromFile = false;
835
841
  const ProtocolContract = protocolInstance.getContract();
836
842
  let contract = '';
837
843
  for (;;) {
@@ -844,15 +850,6 @@ async function addAnotherContract({ protocolInstance, directory, }) {
844
850
  }
845
851
  this.log(`✖ ${error}`);
846
852
  }
847
- const localAbi = await core_1.ux.prompt('\nProvide local ABI path? (y/n)', {
848
- required: true,
849
- type: 'single',
850
- });
851
- abiFromFile = localAbi.toLowerCase() === 'y';
852
- let abiPath = '';
853
- if (abiFromFile) {
854
- abiPath = await core_1.ux.prompt('\nABI file (path)', { required: true });
855
- }
856
853
  const contractName = await core_1.ux.prompt('\nContract Name', {
857
854
  required: true,
858
855
  default: 'Contract',
@@ -864,14 +861,6 @@ async function addAnotherContract({ protocolInstance, directory, }) {
864
861
  process.chdir(directory);
865
862
  }
866
863
  const commandLine = [contract, '--contract-name', contractName];
867
- if (abiFromFile) {
868
- if (abiPath.includes(directory)) {
869
- commandLine.push('--abi', path_1.default.normalize(abiPath.replace(directory, '')));
870
- }
871
- else {
872
- commandLine.push('--abi', abiPath);
873
- }
874
- }
875
864
  await add_1.default.run(commandLine);
876
865
  }
877
866
  catch (e) {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.52.1-alpha-20230718212224-9d21810",
2
+ "version": "0.52.1-alpha-20230719201219-dde01c9",
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.52.1-alpha-20230718212224-9d21810",
3
+ "version": "0.52.1-alpha-20230719201219-dde01c9",
4
4
  "description": "CLI for building for and deploying to The Graph",
5
5
  "license": "(Apache-2.0 OR MIT)",
6
6
  "engines": {