@graphprotocol/graph-cli 0.93.3 → 0.93.4-alpha-20241228005116-7e806ab19ee034e8990713973449110038ee1068
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/codegen/schema.test.js +8 -8
- package/dist/codegen/types/index.test.js +1 -1
- package/dist/codegen/util.test.js +1 -1
- package/dist/command-helpers/compiler.test.js +1 -1
- package/dist/command-helpers/contracts.test.js +1 -1
- package/dist/command-helpers/version.test.js +1 -1
- package/dist/protocols/ethereum/codegen/abi.test.js +1 -1
- package/dist/protocols/substreams/manifest.graphql +5 -0
- package/dist/validation/schema.test.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @graphprotocol/graph-cli
|
|
2
2
|
|
|
3
|
+
## 0.93.4-alpha-20241228005116-7e806ab19ee034e8990713973449110038ee1068
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1879](https://github.com/graphprotocol/graph-tooling/pull/1879)
|
|
8
|
+
[`f6079a6`](https://github.com/graphprotocol/graph-tooling/commit/f6079a68c016e8d9864f2fc94526a60d4b21eb69)
|
|
9
|
+
Thanks [@McAronDev](https://github.com/McAronDev)! - fix bug with missing Graft type in SpS
|
|
10
|
+
manifest definition
|
|
11
|
+
|
|
3
12
|
## 0.93.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -26,7 +26,7 @@ const testEntity = async (generatedTypes, expectedEntity) => {
|
|
|
26
26
|
}
|
|
27
27
|
expect(methods.length).toBe(expectedEntity.methods.length);
|
|
28
28
|
};
|
|
29
|
-
describe
|
|
29
|
+
describe('Schema code generator', { concurrent: true }, () => {
|
|
30
30
|
test('Should generate nothing for non entity types', () => {
|
|
31
31
|
const codegen = createSchemaCodeGen(`
|
|
32
32
|
type Foo {
|
|
@@ -200,7 +200,7 @@ describe.concurrent('Schema code generator', () => {
|
|
|
200
200
|
return 0
|
|
201
201
|
} else {
|
|
202
202
|
return value.toI32()
|
|
203
|
-
}
|
|
203
|
+
}
|
|
204
204
|
`,
|
|
205
205
|
},
|
|
206
206
|
{
|
|
@@ -296,7 +296,7 @@ describe.concurrent('Schema code generator', () => {
|
|
|
296
296
|
params: [],
|
|
297
297
|
returnType: new NamedType('WalletLoader'),
|
|
298
298
|
body: `
|
|
299
|
-
return new WalletLoader("Account", this.get('id')!.toString(), "wallets")
|
|
299
|
+
return new WalletLoader("Account", this.get('id')!.toString(), "wallets")
|
|
300
300
|
`,
|
|
301
301
|
},
|
|
302
302
|
],
|
|
@@ -542,7 +542,7 @@ describe.concurrent('Schema code generator', () => {
|
|
|
542
542
|
id: Bytes!
|
|
543
543
|
related: [RelatedBytes!]! @derivedFrom(field: "related")
|
|
544
544
|
}
|
|
545
|
-
|
|
545
|
+
|
|
546
546
|
type RelatedBytes @entity {
|
|
547
547
|
id: ID!
|
|
548
548
|
related: WithBytes!
|
|
@@ -619,17 +619,17 @@ describe.concurrent('Schema code generator', () => {
|
|
|
619
619
|
test('no derived loader for interface', () => {
|
|
620
620
|
const codegen = createSchemaCodeGen(`
|
|
621
621
|
interface IExample {
|
|
622
|
-
id: ID!
|
|
622
|
+
id: ID!
|
|
623
623
|
main: Main!
|
|
624
624
|
num: Int!
|
|
625
625
|
}
|
|
626
|
-
|
|
626
|
+
|
|
627
627
|
type Example1 implements IExample @entity {
|
|
628
|
-
id: ID!
|
|
628
|
+
id: ID!
|
|
629
629
|
main: Main!
|
|
630
630
|
num: Int!
|
|
631
631
|
}
|
|
632
|
-
|
|
632
|
+
|
|
633
633
|
type Main @entity {
|
|
634
634
|
id: ID!
|
|
635
635
|
examples: [IExample!]! @derivedFrom(field: "main")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test } from 'vitest';
|
|
2
2
|
import * as codegen from './index.js';
|
|
3
|
-
describe
|
|
3
|
+
describe('ethereum.Value -> AssemblyScript', { concurrent: true }, () => {
|
|
4
4
|
// Scalar values
|
|
5
5
|
test('address -> Address', () => {
|
|
6
6
|
expect(codegen.ethereumToAsc('x', 'address')).toBe('x.toAddress()');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test } from 'vitest';
|
|
2
2
|
import { disambiguateNames, unrollTuple } from './util.js';
|
|
3
|
-
describe
|
|
3
|
+
describe('Codegen utilities', { concurrent: true }, () => {
|
|
4
4
|
test('Name disambiguation', () => {
|
|
5
5
|
expect(disambiguateNames({
|
|
6
6
|
values: ['a', 'b', 'c'],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
2
|
import { appendApiVersionForGraph } from './compiler.js';
|
|
3
|
-
describe
|
|
3
|
+
describe('appendApiVersionForGraph', { concurrent: true }, () => {
|
|
4
4
|
it('append /api/v0 to Prod URL with trailing slash', () => {
|
|
5
5
|
expect(appendApiVersionForGraph('https://api.thegraph.com/ipfs/')).toBe('https://api.thegraph.com/ipfs/api/v0');
|
|
6
6
|
});
|
|
@@ -79,7 +79,7 @@ const TEST_CONTRACT_START_BLOCKS = {
|
|
|
79
79
|
// clover: {
|
|
80
80
|
// },
|
|
81
81
|
};
|
|
82
|
-
describe
|
|
82
|
+
describe('getStartBlockForContract', { sequential: true }, async () => {
|
|
83
83
|
const registry = await loadRegistry();
|
|
84
84
|
const contractService = new ContractService(registry);
|
|
85
85
|
for (const [network, contracts] of Object.entries(TEST_CONTRACT_START_BLOCKS)) {
|
|
@@ -2,7 +2,7 @@ import { beforeEach, describe, expect, test, vi } from 'vitest';
|
|
|
2
2
|
import * as loadManifestUtils from '../migrations/util/load-manifest.js';
|
|
3
3
|
import * as graphTsUtil from '../migrations/util/versions.js';
|
|
4
4
|
import { assertGraphTsVersion, assertManifestApiVersion } from './version.js';
|
|
5
|
-
describe
|
|
5
|
+
describe('Version Command Helpers', { concurrent: true }, () => {
|
|
6
6
|
beforeEach(() => {
|
|
7
7
|
vi.resetModules();
|
|
8
8
|
});
|
|
@@ -6,7 +6,7 @@ import AbiCodeGenerator from './abi.js';
|
|
|
6
6
|
let tempdir;
|
|
7
7
|
let abi;
|
|
8
8
|
let generatedTypes = [];
|
|
9
|
-
describe
|
|
9
|
+
describe('ABI code generation', { concurrent: true }, () => {
|
|
10
10
|
beforeAll(async () => {
|
|
11
11
|
tempdir = await fs.mkdtemp('abi-codegen');
|
|
12
12
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test } from 'vitest';
|
|
2
2
|
import { typeSuggestion } from './schema.js';
|
|
3
|
-
describe
|
|
3
|
+
describe('Schema validation', { concurrent: true }, () => {
|
|
4
4
|
test('Type suggestions', () => {
|
|
5
5
|
expect(typeSuggestion('Address')).toEqual('Bytes');
|
|
6
6
|
expect(typeSuggestion('address')).toEqual('Bytes');
|
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-20241228005116-7e806ab19ee034e8990713973449110038ee1068",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI for building for and deploying to The Graph",
|
|
6
6
|
"license": "(Apache-2.0 OR MIT)",
|
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
},
|
|
87
87
|
"scripts": {
|
|
88
88
|
"build": "tsc -b tsconfig.build.json && oclif manifest && oclif readme && copyfiles -u 1 src/**/*.graphql dist/",
|
|
89
|
+
"build:dev": "tsc -b tsconfig.dev.json",
|
|
89
90
|
"oclif:pack": "npm pack && pnpm oclif pack tarballs --no-xz",
|
|
90
91
|
"test": "vitest run --bail=1",
|
|
91
92
|
"test:add": "vitest run tests/cli/add.test.ts",
|