@graphprotocol/graph-cli 0.48.0-alpha-20230425170121-df2293c → 0.48.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 +12 -5
- package/bin/run +6 -0
- package/bin/run.cmd +3 -0
- package/dist/codegen/schema.js +0 -3
- package/dist/codegen/schema.test.js +0 -27
- package/dist/command-helpers/studio.d.ts +1 -1
- package/dist/command-helpers/studio.js +2 -0
- package/oclif.manifest.json +1 -1
- package/package.json +7 -4
- package/dist/bin.d.ts +0 -2
- package/dist/bin.js +0 -34
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
# @graphprotocol/graph-cli
|
|
2
2
|
|
|
3
|
-
## 0.48.0
|
|
3
|
+
## 0.48.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
- [#
|
|
8
|
-
[`
|
|
9
|
-
Thanks [@
|
|
10
|
-
|
|
7
|
+
- [#1257](https://github.com/graphprotocol/graph-tooling/pull/1257)
|
|
8
|
+
[`17b90d7`](https://github.com/graphprotocol/graph-tooling/commit/17b90d7e2d4abdd850755adc4630975fd2b957e7)
|
|
9
|
+
Thanks [@enisdenjo](https://github.com/enisdenjo)! - Bundle CLI as binary
|
|
10
|
+
|
|
11
|
+
## 0.47.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#1308](https://github.com/graphprotocol/graph-tooling/pull/1308)
|
|
16
|
+
[`dd765f4`](https://github.com/graphprotocol/graph-tooling/commit/dd765f4beb9e4964718b03428b39541bc48e6025)
|
|
17
|
+
Thanks [@saihaj](https://github.com/saihaj)! - allow `fantom` and `matic`
|
|
11
18
|
|
|
12
19
|
## 0.47.1
|
|
13
20
|
|
package/bin/run
ADDED
package/bin/run.cmd
ADDED
package/dist/codegen/schema.js
CHANGED
|
@@ -138,9 +138,6 @@ class SchemaCodeGenerator {
|
|
|
138
138
|
\`Entities of type ${entityName} must have an ID of type ${idField.gqlTypeName()} but the id '\${id.displayData()}' is of type \${id.displayKind()}\`)
|
|
139
139
|
store.set('${entityName}', ${idField.tsValueToString()}, this)
|
|
140
140
|
}`),
|
|
141
|
-
tsCodegen.staticMethod('loadInBlock', [tsCodegen.param('id', tsCodegen.namedType(idField.typeName()))], tsCodegen.nullableType(tsCodegen.namedType(entityName)), `
|
|
142
|
-
return changetype<${entityName} | null>(store.get_in_block('${entityName}', ${idField.tsToString()}))
|
|
143
|
-
`),
|
|
144
141
|
tsCodegen.staticMethod('load', [tsCodegen.param('id', tsCodegen.namedType(idField.typeName()))], tsCodegen.nullableType(tsCodegen.namedType(entityName)), `
|
|
145
142
|
return changetype<${entityName} | null>(store.get('${entityName}', ${idField.tsToString()}))
|
|
146
143
|
`),
|
|
@@ -128,15 +128,6 @@ describe('Schema code generator', () => {
|
|
|
128
128
|
\`Entities of type Account must have an ID of type String but the id '\${id.displayData()}' is of type \${id.displayKind()}\`)
|
|
129
129
|
store.set('Account', id.toString(), this)
|
|
130
130
|
}
|
|
131
|
-
`,
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
name: 'loadInBlock',
|
|
135
|
-
static: true,
|
|
136
|
-
params: [new typescript_1.Param('id', new typescript_1.NamedType('string'))],
|
|
137
|
-
returnType: new typescript_1.NullableType(new typescript_1.NamedType('Account')),
|
|
138
|
-
body: `
|
|
139
|
-
return changetype<Account | null>(store.get_in_block('Account', id))
|
|
140
131
|
`,
|
|
141
132
|
},
|
|
142
133
|
{
|
|
@@ -316,15 +307,6 @@ describe('Schema code generator', () => {
|
|
|
316
307
|
\`Entities of type Wallet must have an ID of type String but the id '\${id.displayData()}' is of type \${id.displayKind()}\`)
|
|
317
308
|
store.set('Wallet', id.toString(), this)
|
|
318
309
|
}
|
|
319
|
-
`,
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
name: 'loadInBlock',
|
|
323
|
-
static: true,
|
|
324
|
-
params: [new typescript_1.Param('id', new typescript_1.NamedType('string'))],
|
|
325
|
-
returnType: new typescript_1.NullableType(new typescript_1.NamedType('Wallet')),
|
|
326
|
-
body: `
|
|
327
|
-
return changetype<Wallet | null>(store.get_in_block('Wallet', id))
|
|
328
310
|
`,
|
|
329
311
|
},
|
|
330
312
|
{
|
|
@@ -443,15 +425,6 @@ describe('Schema code generator', () => {
|
|
|
443
425
|
" store.set('Task', id.toBytes().toHexString(), this)\n" +
|
|
444
426
|
' }',
|
|
445
427
|
},
|
|
446
|
-
{
|
|
447
|
-
name: 'loadInBlock',
|
|
448
|
-
static: true,
|
|
449
|
-
params: [new typescript_1.Param('id', new typescript_1.NamedType('Bytes'))],
|
|
450
|
-
returnType: new typescript_1.NullableType(new typescript_1.NamedType('Task')),
|
|
451
|
-
body: '\n' +
|
|
452
|
-
" return changetype<Task | null>(store.get_in_block('Task', id.toHexString()))\n" +
|
|
453
|
-
' ',
|
|
454
|
-
},
|
|
455
428
|
{
|
|
456
429
|
name: 'load',
|
|
457
430
|
static: true,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const allowedStudioNetworks: readonly ["mainnet", "rinkeby", "goerli", "gnosis", "chapel", "optimism-goerli", "clover", "fantom-testnet", "arbitrum-goerli", "fuji", "celo-alfajores", "mumbai", "aurora-testnet", "near-testnet", "theta-testnet-001", "osmo-test-4", "base-testnet", "celo", "arbitrum-one", "avalanche", "zksync-era", "sepolia", "polygon-zkevm-testnet", "polygon-zkevm"];
|
|
1
|
+
export declare const allowedStudioNetworks: readonly ["mainnet", "rinkeby", "goerli", "gnosis", "chapel", "optimism-goerli", "clover", "fantom", "matic", "fantom-testnet", "arbitrum-goerli", "fuji", "celo-alfajores", "mumbai", "aurora-testnet", "near-testnet", "theta-testnet-001", "osmo-test-4", "base-testnet", "celo", "arbitrum-one", "avalanche", "zksync-era", "sepolia", "polygon-zkevm-testnet", "polygon-zkevm"];
|
|
2
2
|
export declare const validateStudioNetwork: ({ studio, product, network, }: {
|
|
3
3
|
studio?: string | boolean | undefined;
|
|
4
4
|
product?: string | undefined;
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphprotocol/graph-cli",
|
|
3
|
-
"version": "0.48.0
|
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"description": "CLI for building for and deploying to The Graph",
|
|
5
5
|
"license": "(Apache-2.0 OR MIT)",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=14"
|
|
8
8
|
},
|
|
9
9
|
"bin": {
|
|
10
|
-
"graph": "
|
|
10
|
+
"graph": "bin/run"
|
|
11
11
|
},
|
|
12
12
|
"main": "dist/index.js",
|
|
13
13
|
"files": [
|
|
14
14
|
"CHANGELOG.md",
|
|
15
|
+
"bin",
|
|
15
16
|
"dist",
|
|
16
17
|
"oclif.manifest.json",
|
|
17
|
-
"README.md"
|
|
18
|
+
"README.md",
|
|
19
|
+
"!dist/*.tar.gz"
|
|
18
20
|
],
|
|
19
21
|
"dependencies": {
|
|
20
22
|
"@float-capital/float-subgraph-uncrashable": "^0.0.0-alpha.4",
|
|
@@ -73,7 +75,8 @@
|
|
|
73
75
|
]
|
|
74
76
|
},
|
|
75
77
|
"scripts": {
|
|
76
|
-
"build": "tsc -b tsconfig.build.json && oclif manifest && copyfiles -u 1 src/**/*.graphql dist/
|
|
78
|
+
"build": "tsc -b tsconfig.build.json && oclif manifest && oclif readme && copyfiles -u 1 src/**/*.graphql dist/",
|
|
79
|
+
"oclif:pack": "npm pack && pnpm oclif pack tarballs --no-xz && node scripts/rename-tarballs.mjs",
|
|
77
80
|
"test": "jest --verbose",
|
|
78
81
|
"test:add": "jest tests/cli/add.test.ts --verbose",
|
|
79
82
|
"test:init": "jest tests/cli/init.test.ts --verbose",
|
package/dist/bin.d.ts
DELETED
package/dist/bin.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
-
if (mod && mod.__esModule) return mod;
|
|
21
|
-
var result = {};
|
|
22
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
-
__setModuleDefault(result, mod);
|
|
24
|
-
return result;
|
|
25
|
-
};
|
|
26
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
|
-
};
|
|
29
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const oclif = __importStar(require("@oclif/core"));
|
|
31
|
-
const flush_1 = __importDefault(require("@oclif/core/flush"));
|
|
32
|
-
// @ts-expect-error Handle is a pure JS file
|
|
33
|
-
const handle_1 = __importDefault(require("@oclif/core/handle"));
|
|
34
|
-
oclif.run().then(flush_1.default).catch(handle_1.default);
|