@graphprotocol/graph-cli 0.49.0-alpha-20230503021722-4d9a2fc → 0.49.0-alpha-20230503100511-80612fa
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 +6 -8
- package/dist/protocols/index.js +8 -1
- package/dist/type-generator.d.ts +1 -1
- package/dist/type-generator.js +4 -0
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
# @graphprotocol/graph-cli
|
|
2
2
|
|
|
3
|
-
## 0.49.0-alpha-
|
|
3
|
+
## 0.49.0-alpha-20230503100511-80612fa
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
+
- [#1327](https://github.com/graphprotocol/graph-tooling/pull/1327)
|
|
8
|
+
[`a70ac44`](https://github.com/graphprotocol/graph-tooling/commit/a70ac44575a486128fafd3ee9e9e6fbb05bc642e)
|
|
9
|
+
Thanks [@saihaj](https://github.com/saihaj)! - do not generate types, instead show a message to
|
|
10
|
+
user to use substreams CLI for codegen.
|
|
11
|
+
|
|
7
12
|
- [#1306](https://github.com/graphprotocol/graph-tooling/pull/1306)
|
|
8
13
|
[`f5e4b58`](https://github.com/graphprotocol/graph-tooling/commit/f5e4b58989edc5f3bb8211f1b912449e77832de8)
|
|
9
14
|
Thanks [@saihaj](https://github.com/saihaj)! - Add loadInBlock function for entities as part of
|
|
10
15
|
codegen
|
|
11
16
|
|
|
12
|
-
### Patch Changes
|
|
13
|
-
|
|
14
|
-
- [#1331](https://github.com/graphprotocol/graph-tooling/pull/1331)
|
|
15
|
-
[`4d9a2fc`](https://github.com/graphprotocol/graph-tooling/commit/4d9a2fc333c9541350ca87029e4dc31635ca8a25)
|
|
16
|
-
Thanks [@saihaj](https://github.com/saihaj)! - only allow mainnet for substreams in network
|
|
17
|
-
selection for init
|
|
18
|
-
|
|
19
17
|
## 0.48.0
|
|
20
18
|
|
|
21
19
|
### Minor Changes
|
package/dist/protocols/index.js
CHANGED
|
@@ -88,7 +88,7 @@ class Protocol {
|
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
static availableNetworks() {
|
|
91
|
-
|
|
91
|
+
let networks = immutable_1.default.fromJS({
|
|
92
92
|
arweave: ['arweave-mainnet'],
|
|
93
93
|
ethereum: [
|
|
94
94
|
'mainnet',
|
|
@@ -135,6 +135,13 @@ class Protocol {
|
|
|
135
135
|
],
|
|
136
136
|
substreams: ['mainnet'],
|
|
137
137
|
});
|
|
138
|
+
const allNetworks = [];
|
|
139
|
+
// eslint-disable-next-line unicorn/no-array-for-each
|
|
140
|
+
networks.forEach(value => {
|
|
141
|
+
allNetworks.push(...value);
|
|
142
|
+
});
|
|
143
|
+
networks = networks.set('substreams', immutable_1.default.List(allNetworks));
|
|
144
|
+
return networks;
|
|
138
145
|
}
|
|
139
146
|
static normalizeName(name) {
|
|
140
147
|
return Protocol.availableProtocols().findKey(possibleNames => {
|
package/dist/type-generator.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export default class TypeGenerator {
|
|
|
16
16
|
private protocol;
|
|
17
17
|
private protocolTypeGenerator;
|
|
18
18
|
constructor(options: TypeGeneratorOptions);
|
|
19
|
-
generateTypes(): Promise<boolean>;
|
|
19
|
+
generateTypes(): Promise<boolean | undefined>;
|
|
20
20
|
generateUncrashableEntities(graphSchema: any): Promise<any>;
|
|
21
21
|
loadSubgraph({ quiet }?: {
|
|
22
22
|
quiet: boolean;
|
package/dist/type-generator.js
CHANGED
|
@@ -58,6 +58,10 @@ class TypeGenerator {
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
async generateTypes() {
|
|
61
|
+
if (this.protocol.name === 'substreams') {
|
|
62
|
+
toolbox.print.success('Subgraph uses a substream datasource. Codegeneration is not required.');
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
61
65
|
try {
|
|
62
66
|
if (!this.options.skipMigrations && this.options.subgraphManifest) {
|
|
63
67
|
await (0, migrations_1.applyMigrations)({
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED