@graphprotocol/graph-cli 0.65.0-alpha-20240111165930-d9ce44f → 0.65.0
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 +2 -2
- package/dist/commands/init.js +5 -0
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# @graphprotocol/graph-cli
|
|
2
2
|
|
|
3
|
-
## 0.65.0
|
|
3
|
+
## 0.65.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
7
|
- [#1557](https://github.com/graphprotocol/graph-tooling/pull/1557)
|
|
8
|
-
[`
|
|
8
|
+
[`e84f233`](https://github.com/graphprotocol/graph-tooling/commit/e84f233ee156863136b120a79a91ec692a6f5677)
|
|
9
9
|
Thanks [@saihaj](https://github.com/saihaj)! - fetch supported networks from API
|
|
10
10
|
|
|
11
11
|
## 0.64.1
|
package/dist/commands/init.js
CHANGED
|
@@ -52,6 +52,7 @@ const initDebugger = (0, debug_1.default)('graph-cli:commands:init');
|
|
|
52
52
|
const AVAILABLE_NETWORKS = async () => {
|
|
53
53
|
const logger = initDebugger.extend('AVAILABLE_NETWORKS');
|
|
54
54
|
try {
|
|
55
|
+
logger('fetching chain_list from studio');
|
|
55
56
|
const res = await fetch(node_1.SUBGRAPH_STUDIO_URL, {
|
|
56
57
|
method: 'POST',
|
|
57
58
|
headers: {
|
|
@@ -71,6 +72,7 @@ const AVAILABLE_NETWORKS = async () => {
|
|
|
71
72
|
}
|
|
72
73
|
const result = await res.json();
|
|
73
74
|
if (result?.result) {
|
|
75
|
+
logger('chain_list result: %o', result.result);
|
|
74
76
|
return result.result;
|
|
75
77
|
}
|
|
76
78
|
logger("Unable to get result for 'chain_list' from studio: %O", result);
|
|
@@ -500,6 +502,9 @@ async function processInitForm({ protocol: initProtocol, product: initProduct, s
|
|
|
500
502
|
},
|
|
501
503
|
]);
|
|
502
504
|
const choices = (await AVAILABLE_NETWORKS())?.[product === 'subgraph-studio' ? 'studio' : 'hostedService'];
|
|
505
|
+
if (!choices) {
|
|
506
|
+
this.error('Unable to fetch available networks from API. Please report this issue. As a workaround you can pass `--network` flag from the available networks: https://thegraph.com/docs/en/developing/supported-networks', { exit: 1 });
|
|
507
|
+
}
|
|
503
508
|
const { network } = await gluegun_1.prompt.ask([
|
|
504
509
|
{
|
|
505
510
|
type: 'select',
|
package/oclif.manifest.json
CHANGED