@graphprotocol/graph-cli 0.93.3 → 0.93.4-alpha-20241227045422-3afadaa4eb980bad60f178d357c8a654dc0e2e47
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 +9 -0
- package/dist/scaffold/tests.js +7 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @graphprotocol/graph-cli
|
|
2
2
|
|
|
3
|
+
## 0.93.4-alpha-20241227045422-3afadaa4eb980bad60f178d357c8a654dc0e2e47
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1884](https://github.com/graphprotocol/graph-tooling/pull/1884)
|
|
8
|
+
[`3afadaa`](https://github.com/graphprotocol/graph-tooling/commit/3afadaa4eb980bad60f178d357c8a654dc0e2e47)
|
|
9
|
+
Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - `graph init`: fix tests generation
|
|
10
|
+
for events with [][] params #1878
|
|
11
|
+
|
|
3
12
|
## 0.93.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/scaffold/tests.js
CHANGED
|
@@ -97,7 +97,13 @@ const isNativeType = (type) => {
|
|
|
97
97
|
const natives = [/i32/, /string/, /boolean/];
|
|
98
98
|
return natives.some(rx => rx.test(type));
|
|
99
99
|
};
|
|
100
|
-
|
|
100
|
+
// get inner type: Array<T> -> T, Array<Array<T>> -> T
|
|
101
|
+
const fetchArrayInnerType = (type) => {
|
|
102
|
+
const match = type.match(/Array<(.+)>/);
|
|
103
|
+
if (!match)
|
|
104
|
+
return null;
|
|
105
|
+
return fetchArrayInnerType(match[1]) || match;
|
|
106
|
+
};
|
|
101
107
|
// Generates the example test.ts file
|
|
102
108
|
const generateExampleTest = (contract, event, indexEvents, importTypes) => {
|
|
103
109
|
const entity = indexEvents ? String(event._alias) : 'ExampleEntity';
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphprotocol/graph-cli",
|
|
3
|
-
"version": "0.93.
|
|
3
|
+
"version": "0.93.4-alpha-20241227045422-3afadaa4eb980bad60f178d357c8a654dc0e2e47",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI for building for and deploying to The Graph",
|
|
6
6
|
"license": "(Apache-2.0 OR MIT)",
|