@graphprotocol/graph-cli 0.45.0-rc-20230329212837-e73f4b4 → 0.45.0-rc-20230329233746-71acd5e
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 +11 -1
- package/dist/command-helpers/abi.js +5 -5
- package/dist/commands/test.js +3 -3
- package/oclif.manifest.json +1 -1
- package/package.json +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @graphprotocol/graph-cli
|
|
2
2
|
|
|
3
|
-
## 0.45.0-rc-
|
|
3
|
+
## 0.45.0-rc-20230329233746-71acd5e
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
### Patch Changes
|
|
12
12
|
|
|
13
|
+
- [#1218](https://github.com/graphprotocol/graph-tooling/pull/1218)
|
|
14
|
+
[`01046d9`](https://github.com/graphprotocol/graph-tooling/commit/01046d946f42f436fb10d54c5c959012cd6fef67)
|
|
15
|
+
Thanks [@saihaj](https://github.com/saihaj)! - dependencies updates:
|
|
16
|
+
|
|
17
|
+
- Added dependency
|
|
18
|
+
[`@whatwg-node/fetch@^0.8.4` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.8.4) (to
|
|
19
|
+
`dependencies`)
|
|
20
|
+
- Removed dependency [`node-fetch@2.6.0` ↗︎](https://www.npmjs.com/package/node-fetch/v/2.6.0)
|
|
21
|
+
(from `dependencies`)
|
|
22
|
+
|
|
13
23
|
- [#1207](https://github.com/graphprotocol/graph-tooling/pull/1207)
|
|
14
24
|
[`ad275b3`](https://github.com/graphprotocol/graph-tooling/commit/ad275b31e635dab03cfefda00617ef9f612b01c0)
|
|
15
25
|
Thanks [@saihaj](https://github.com/saihaj)! - bring back short hand for version and help
|
|
@@ -4,12 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.loadAbiFromBlockScout = exports.getStartBlockForContract = exports.fetchTransactionByHashFromRPC = exports.fetchContractCreationHashWithRetry = exports.fetchDeployContractTransactionFromEtherscan = exports.loadStartBlockForContract = exports.loadAbiFromEtherscan = void 0;
|
|
7
|
+
const fetch_1 = require("@whatwg-node/fetch");
|
|
7
8
|
const immutable_1 = __importDefault(require("immutable"));
|
|
8
|
-
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
9
9
|
const spinner_1 = require("./spinner");
|
|
10
10
|
const loadAbiFromEtherscan = async (ABICtor, network, address) => await (0, spinner_1.withSpinner)(`Fetching ABI from Etherscan`, `Failed to fetch ABI from Etherscan`, `Warnings while fetching ABI from Etherscan`, async () => {
|
|
11
11
|
const scanApiUrl = getEtherscanLikeAPIUrl(network);
|
|
12
|
-
const result = await (0,
|
|
12
|
+
const result = await (0, fetch_1.fetch)(`${scanApiUrl}?module=contract&action=getabi&address=${address}`);
|
|
13
13
|
const json = await result.json();
|
|
14
14
|
// Etherscan returns a JSON object that has a `status`, a `message` and
|
|
15
15
|
// a `result` field. The `status` is '0' in case of errors and '1' in
|
|
@@ -37,7 +37,7 @@ const fetchContractCreationHashWithRetry = async (url, retryCount) => {
|
|
|
37
37
|
let json;
|
|
38
38
|
for (let i = 0; i < retryCount; i++) {
|
|
39
39
|
try {
|
|
40
|
-
const result = await (0,
|
|
40
|
+
const result = await (0, fetch_1.fetch)(url);
|
|
41
41
|
json = await result.json();
|
|
42
42
|
if (json.status !== '0') {
|
|
43
43
|
return json;
|
|
@@ -57,7 +57,7 @@ const fetchTransactionByHashFromRPC = async (network, transactionHash) => {
|
|
|
57
57
|
const RPCURL = getPublicRPCEndpoint(network);
|
|
58
58
|
if (!RPCURL)
|
|
59
59
|
throw new Error(`Unable to fetch RPC URL for ${network}`);
|
|
60
|
-
const result = await (0,
|
|
60
|
+
const result = await (0, fetch_1.fetch)(String(RPCURL), {
|
|
61
61
|
method: 'POST',
|
|
62
62
|
headers: {
|
|
63
63
|
'Content-Type': 'application/json',
|
|
@@ -89,7 +89,7 @@ const getStartBlockForContract = async (network, address) => {
|
|
|
89
89
|
};
|
|
90
90
|
exports.getStartBlockForContract = getStartBlockForContract;
|
|
91
91
|
const loadAbiFromBlockScout = async (ABICtor, network, address) => await (0, spinner_1.withSpinner)(`Fetching ABI from BlockScout`, `Failed to fetch ABI from BlockScout`, `Warnings while fetching ABI from BlockScout`, async () => {
|
|
92
|
-
const result = await (0,
|
|
92
|
+
const result = await (0, fetch_1.fetch)(`https://blockscout.com/${network.replace('-', '/')}/api?module=contract&action=getabi&address=${address}`);
|
|
93
93
|
const json = await result.json();
|
|
94
94
|
// BlockScout returns a JSON object that has a `status`, a `message` and
|
|
95
95
|
// a `result` field. The `status` is '0' in case of errors and '1' in
|
package/dist/commands/test.js
CHANGED
|
@@ -7,10 +7,10 @@ const child_process_1 = require("child_process");
|
|
|
7
7
|
const os_1 = __importDefault(require("os"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const core_1 = require("@oclif/core");
|
|
10
|
+
const fetch_1 = require("@whatwg-node/fetch");
|
|
10
11
|
const binary_install_raw_1 = require("binary-install-raw");
|
|
11
12
|
const gluegun_1 = require("gluegun");
|
|
12
13
|
const js_yaml_1 = __importDefault(require("js-yaml"));
|
|
13
|
-
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
14
14
|
const semver_1 = __importDefault(require("semver"));
|
|
15
15
|
class TestCommand extends core_1.Command {
|
|
16
16
|
async run() {
|
|
@@ -48,7 +48,7 @@ class TestCommand extends core_1.Command {
|
|
|
48
48
|
// Fetch the latest version tag if version is not specified with -v/--version or if the version is not cached
|
|
49
49
|
if (opts.force || (!opts.version && !opts.latestVersion)) {
|
|
50
50
|
this.log('Fetching latest version tag...');
|
|
51
|
-
const result = await (0,
|
|
51
|
+
const result = await (0, fetch_1.fetch)('https://api.github.com/repos/LimeChain/matchstick/releases/latest');
|
|
52
52
|
const json = await result.json();
|
|
53
53
|
opts.latestVersion = json.tag_name;
|
|
54
54
|
gluegun_1.filesystem.file(opts.cachePath, {
|
|
@@ -264,7 +264,7 @@ async function dockerfile(dockerfilePath, versionOpt, latestVersion) {
|
|
|
264
264
|
const spinner = gluegun_1.print.spin('Generating Dockerfile...');
|
|
265
265
|
try {
|
|
266
266
|
// Fetch the Dockerfile template content from the demo-subgraph repo
|
|
267
|
-
const content = await (0,
|
|
267
|
+
const content = await (0, fetch_1.fetch)('https://raw.githubusercontent.com/LimeChain/demo-subgraph/main/Dockerfile').then(response => {
|
|
268
268
|
if (response.ok) {
|
|
269
269
|
return response.text();
|
|
270
270
|
}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphprotocol/graph-cli",
|
|
3
|
-
"version": "0.45.0-rc-
|
|
3
|
+
"version": "0.45.0-rc-20230329233746-71acd5e",
|
|
4
4
|
"description": "CLI for building for and deploying to The Graph",
|
|
5
5
|
"license": "(Apache-2.0 OR MIT)",
|
|
6
6
|
"engines": {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@float-capital/float-subgraph-uncrashable": "^0.0.0-alpha.4",
|
|
21
21
|
"@oclif/core": "2.0.7",
|
|
22
|
+
"@whatwg-node/fetch": "^0.8.4",
|
|
22
23
|
"assemblyscript": "0.19.23",
|
|
23
24
|
"binary-install-raw": "0.0.13",
|
|
24
25
|
"chalk": "3.0.0",
|
|
@@ -34,7 +35,6 @@
|
|
|
34
35
|
"ipfs-http-client": "34.0.0",
|
|
35
36
|
"jayson": "3.6.6",
|
|
36
37
|
"js-yaml": "3.13.1",
|
|
37
|
-
"node-fetch": "2.6.0",
|
|
38
38
|
"prettier": "1.19.1",
|
|
39
39
|
"request": "2.88.2",
|
|
40
40
|
"semver": "7.3.5",
|
|
@@ -49,11 +49,10 @@
|
|
|
49
49
|
"@types/fs-extra": "^9.0.13",
|
|
50
50
|
"@types/jest": "^26.0.24",
|
|
51
51
|
"@types/js-yaml": "^3.12.7",
|
|
52
|
-
"@types/node-fetch": "^2.6.2",
|
|
53
52
|
"@types/semver": "^7.3.13",
|
|
54
53
|
"@types/which": "^2.0.1",
|
|
55
54
|
"copyfiles": "^2.4.1",
|
|
56
|
-
"jest": "26.
|
|
55
|
+
"jest": "26.6.3",
|
|
57
56
|
"oclif": "3.6.1",
|
|
58
57
|
"spawn-command": "0.0.2-1",
|
|
59
58
|
"strip-ansi": "6.0.1",
|