@graphprotocol/graph-cli 0.56.0 → 0.56.1-alpha-20230831183043-db0b651

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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @graphprotocol/graph-cli
2
2
 
3
+ ## 0.56.1-alpha-20230831183043-db0b651
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1435](https://github.com/graphprotocol/graph-tooling/pull/1435)
8
+ [`f05b47c`](https://github.com/graphprotocol/graph-tooling/commit/f05b47cf64912d0c66255c9f0076f1696a708ff2)
9
+ Thanks [@saihaj](https://github.com/saihaj)! - dependencies updates:
10
+
11
+ - Updated dependency [`prettier@3.0.3` ↗︎](https://www.npmjs.com/package/prettier/v/3.0.3) (from
12
+ `1.19.1`, in `dependencies`)
13
+
14
+ - [#1435](https://github.com/graphprotocol/graph-tooling/pull/1435)
15
+ [`f05b47c`](https://github.com/graphprotocol/graph-tooling/commit/f05b47cf64912d0c66255c9f0076f1696a708ff2)
16
+ Thanks [@saihaj](https://github.com/saihaj)! - update prettier
17
+
3
18
  ## 0.56.0
4
19
 
5
20
  ### Minor Changes
@@ -628,8 +643,8 @@
628
643
  [`044cd92`](https://github.com/graphprotocol/graph-tooling/commit/044cd92d0ceb9628c7f7fbe3627a09b867710247)
629
644
  Thanks [@enisdenjo](https://github.com/enisdenjo)! - dependencies updates:
630
645
 
631
- - Added dependency [`@oclif/core@2.0.7` ↗︎](https://www.npmjs.com/package/@oclif/core/v/2.0.7) (to
632
- `dependencies`)
646
+ - Added dependency [`@oclif/core@2.0.7` ↗︎](https://www.npmjs.com/package/@oclif/core/v/2.0.7)
647
+ (to `dependencies`)
633
648
 
634
649
  - [#1074](https://github.com/graphprotocol/graph-tooling/pull/1074)
635
650
  [`e84d1e8`](https://github.com/graphprotocol/graph-tooling/commit/e84d1e873d9b2a8967c5fe2a85fce48b2caeb75f)
@@ -725,8 +740,8 @@
725
740
  [`4c5e452`](https://github.com/graphprotocol/graph-cli/commit/4c5e452cbc2eceb75db29019fb3b4c769c9618f4)
726
741
  Thanks [@saihaj](https://github.com/saihaj)! - dependencies updates:
727
742
 
728
- - Updated dependency [`immutable@4.2.1` ↗︎](https://www.npmjs.com/package/immutable/v/4.2.1) (from
729
- `3.8.2`, in `dependencies`)
743
+ - Updated dependency [`immutable@4.2.1` ↗︎](https://www.npmjs.com/package/immutable/v/4.2.1)
744
+ (from `3.8.2`, in `dependencies`)
730
745
 
731
746
  - [`d42f199`](https://github.com/graphprotocol/graph-cli/commit/d42f199502df7bac79e8cafc667d5c712f5a3599)
732
747
  Thanks [@darienmh](https://github.com/darienmh)! - fix `chapel` network etherscan URL
@@ -1,6 +1,6 @@
1
+ import type { DefinitionNode, FieldDefinitionNode, InterfaceTypeDefinitionNode, NamedTypeNode, ObjectTypeDefinitionNode, TypeNode } from 'graphql/language';
1
2
  import Schema from '../schema';
2
3
  import * as tsCodegen from './typescript';
3
- import type { DefinitionNode, FieldDefinitionNode, InterfaceTypeDefinitionNode, NamedTypeNode, ObjectTypeDefinitionNode, TypeNode } from 'graphql/language';
4
4
  declare class IdField {
5
5
  static BYTES: symbol;
6
6
  static STRING: symbol;
@@ -4,8 +4,8 @@ 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");
8
7
  const immutable_1 = __importDefault(require("immutable"));
8
+ const fetch_1 = require("@whatwg-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);
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.fromManifest = exports.fromManifestString = exports.fromFilePath = void 0;
7
- const js_yaml_1 = __importDefault(require("js-yaml"));
8
7
  const immutable_1 = __importDefault(require("immutable"));
8
+ const js_yaml_1 = __importDefault(require("js-yaml"));
9
9
  const load_manifest_1 = require("../migrations/util/load-manifest");
10
10
  // Loads manifest from file path and returns all:
11
11
  // - data sources
@@ -15,26 +15,26 @@ export declare const generateScaffold: ({ protocolInstance, abi, contract, netwo
15
15
  node?: string | undefined;
16
16
  spkgPath?: string | undefined;
17
17
  }, spinner: Spinner) => Promise<{
18
- 'subgraph.yaml': string;
19
- 'schema.graphql': string;
20
- 'package.json': string;
18
+ 'subgraph.yaml': Promise<string>;
19
+ 'schema.graphql': Promise<string>;
20
+ 'package.json': Promise<string>;
21
21
  'tsconfig.json'?: undefined;
22
22
  src?: undefined;
23
23
  abis?: undefined;
24
24
  tests?: undefined;
25
25
  } | {
26
- 'package.json': string;
27
- 'subgraph.yaml': string;
28
- 'schema.graphql': string;
29
- 'tsconfig.json': string;
26
+ 'package.json': Promise<string>;
27
+ 'subgraph.yaml': Promise<string>;
28
+ 'schema.graphql': Promise<string>;
29
+ 'tsconfig.json': Promise<string>;
30
30
  src: {
31
- [x: string]: string;
31
+ [x: string]: Promise<string>;
32
32
  } | undefined;
33
33
  abis: {
34
- [x: string]: string;
34
+ [x: string]: Promise<string>;
35
35
  } | undefined;
36
36
  tests: {
37
- [x: string]: string;
37
+ [x: string]: Promise<string>;
38
38
  } | undefined;
39
39
  }>;
40
40
  export declare const writeScaffold: (scaffold: any, directory: string, spinner: Spinner) => Promise<void>;
@@ -17,9 +17,9 @@ const tests_1 = require("../scaffold/tests");
17
17
  const spinner_1 = require("./spinner");
18
18
  const generateDataSource = async (protocol, contractName, network, contractAddress, abi, startBlock) => {
19
19
  const protocolManifest = protocol.getManifestScaffold();
20
- return immutable_1.Map.of('kind', protocol.name, 'name', contractName, 'network', network, 'source', yaml_1.default.parse(prettier_1.default.format(protocolManifest.source({ contract: contractAddress, contractName, startBlock }), {
20
+ return immutable_1.Map.of('kind', protocol.name, 'name', contractName, 'network', network, 'source', yaml_1.default.parse(await prettier_1.default.format(protocolManifest.source({ contract: contractAddress, contractName, startBlock }), {
21
21
  parser: 'yaml',
22
- })), 'mapping', yaml_1.default.parse(prettier_1.default.format(protocolManifest.mapping({ abi, contractName }), {
22
+ })), 'mapping', yaml_1.default.parse(await prettier_1.default.format(protocolManifest.mapping({ abi, contractName }), {
23
23
  parser: 'yaml',
24
24
  }))).asMutable();
25
25
  };
@@ -26,10 +26,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- const core_1 = require("@oclif/core");
30
- const errors_1 = require("@oclif/core/lib/errors");
31
29
  const gluegun_1 = require("gluegun");
32
30
  const immutable_1 = __importDefault(require("immutable"));
31
+ const core_1 = require("@oclif/core");
32
+ const errors_1 = require("@oclif/core/lib/errors");
33
33
  const abi_1 = require("../command-helpers/abi");
34
34
  const DataSourcesExtractor = __importStar(require("../command-helpers/data-sources"));
35
35
  const network_1 = require("../command-helpers/network");
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const core_1 = require("@oclif/core");
4
3
  const gluegun_1 = require("gluegun");
4
+ const core_1 = require("@oclif/core");
5
5
  const auth_1 = require("../command-helpers/auth");
6
6
  const node_1 = require("../command-helpers/node");
7
7
  class AuthCommand extends core_1.Command {
@@ -26,8 +26,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- const core_1 = require("@oclif/core");
30
29
  const gluegun_1 = require("gluegun");
30
+ const core_1 = require("@oclif/core");
31
31
  const compiler_1 = require("../command-helpers/compiler");
32
32
  const DataSourcesExtractor = __importStar(require("../command-helpers/data-sources"));
33
33
  const network_1 = require("../command-helpers/network");
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const core_1 = require("@oclif/core");
4
3
  const gluegun_1 = require("gluegun");
4
+ const core_1 = require("@oclif/core");
5
5
  class CleanCommand extends core_1.Command {
6
6
  async run() {
7
7
  const { flags: { 'codegen-dir': codegenDir, 'build-dir': buildDir }, } = await this.parse(CleanCommand);
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const url_1 = require("url");
4
- const core_1 = require("@oclif/core");
5
4
  const gluegun_1 = require("gluegun");
5
+ const core_1 = require("@oclif/core");
6
6
  const auth_1 = require("../command-helpers/auth");
7
7
  const jsonrpc_1 = require("../command-helpers/jsonrpc");
8
8
  const node_1 = require("../command-helpers/node");
@@ -28,8 +28,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const path_1 = __importDefault(require("path"));
30
30
  const url_1 = require("url");
31
- const core_1 = require("@oclif/core");
32
31
  const gluegun_1 = require("gluegun");
32
+ const ipfs_http_client_1 = require("ipfs-http-client");
33
+ const core_1 = require("@oclif/core");
33
34
  const auth_1 = require("../command-helpers/auth");
34
35
  const compiler_1 = require("../command-helpers/compiler");
35
36
  const DataSourcesExtractor = __importStar(require("../command-helpers/data-sources"));
@@ -40,7 +41,6 @@ const node_1 = require("../command-helpers/node");
40
41
  const studio_1 = require("../command-helpers/studio");
41
42
  const version_1 = require("../command-helpers/version");
42
43
  const protocols_1 = __importDefault(require("../protocols"));
43
- const ipfs_http_client_1 = require("ipfs-http-client");
44
44
  const headersFlag = core_1.Flags.custom({
45
45
  summary: 'Add custom headers that will be used by the IPFS HTTP client.',
46
46
  aliases: ['hdr'],
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const fs_1 = __importDefault(require("fs"));
7
7
  const os_1 = __importDefault(require("os"));
8
8
  const path_1 = __importDefault(require("path"));
9
- const core_1 = require("@oclif/core");
10
9
  const gluegun_1 = require("gluegun");
10
+ const core_1 = require("@oclif/core");
11
11
  const abi_1 = require("../command-helpers/abi");
12
12
  const network_1 = require("../command-helpers/network");
13
13
  const node_1 = require("../command-helpers/node");
@@ -7,11 +7,11 @@ const child_process_1 = require("child_process");
7
7
  const http_1 = __importDefault(require("http"));
8
8
  const net_1 = __importDefault(require("net"));
9
9
  const path_1 = __importDefault(require("path"));
10
- const core_1 = require("@oclif/core");
11
10
  const docker_compose_1 = __importDefault(require("docker-compose"));
12
11
  const gluegun_1 = require("gluegun");
13
12
  const strip_ansi_1 = __importDefault(require("strip-ansi"));
14
13
  const tmp_promise_1 = __importDefault(require("tmp-promise"));
14
+ const core_1 = require("@oclif/core");
15
15
  const spinner_1 = require("../command-helpers/spinner");
16
16
  // Clean up temporary files even when an uncaught exception occurs
17
17
  tmp_promise_1.default.setGracefulCleanup();
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const url_1 = require("url");
4
- const core_1 = require("@oclif/core");
5
4
  const gluegun_1 = require("gluegun");
5
+ const core_1 = require("@oclif/core");
6
6
  const auth_1 = require("../command-helpers/auth");
7
7
  const jsonrpc_1 = require("../command-helpers/jsonrpc");
8
8
  const node_1 = require("../command-helpers/node");
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const child_process_1 = require("child_process");
7
7
  const os_1 = __importDefault(require("os"));
8
8
  const path_1 = __importDefault(require("path"));
9
- const core_1 = require("@oclif/core");
10
- const fetch_1 = require("@whatwg-node/fetch");
11
9
  const binary_install_raw_1 = require("binary-install-raw");
12
10
  const gluegun_1 = require("gluegun");
13
11
  const js_yaml_1 = __importDefault(require("js-yaml"));
14
12
  const semver_1 = __importDefault(require("semver"));
13
+ const core_1 = require("@oclif/core");
14
+ const fetch_1 = require("@whatwg-node/fetch");
15
15
  class TestCommand extends core_1.Command {
16
16
  async run() {
17
17
  const { args: { datasource }, flags: { coverage, docker, force, logs, recompile, version }, } = await this.parse(TestCommand);
@@ -24,42 +24,42 @@ export default class Scaffold {
24
24
  startBlock?: string;
25
25
  spkgPath?: string;
26
26
  constructor(options: ScaffoldOptions);
27
- generatePackageJson(): string;
28
- generatePackageJsonForSubstreams(): string;
29
- generateManifest(): string;
30
- generateSchema(): string;
31
- generateTsConfig(): string;
27
+ generatePackageJson(): Promise<string>;
28
+ generatePackageJsonForSubstreams(): Promise<string>;
29
+ generateManifest(): Promise<string>;
30
+ generateSchema(): Promise<string>;
31
+ generateTsConfig(): Promise<string>;
32
32
  generateMappings(): {
33
- [x: string]: string;
33
+ [x: string]: Promise<string>;
34
34
  } | undefined;
35
- generateMapping(): string;
35
+ generateMapping(): Promise<string>;
36
36
  generateABIs(): {
37
- [x: string]: string;
37
+ [x: string]: Promise<string>;
38
38
  } | undefined;
39
39
  generateTests(): {
40
- [x: string]: string;
40
+ [x: string]: Promise<string>;
41
41
  } | undefined;
42
42
  generate(): {
43
- 'subgraph.yaml': string;
44
- 'schema.graphql': string;
45
- 'package.json': string;
43
+ 'subgraph.yaml': Promise<string>;
44
+ 'schema.graphql': Promise<string>;
45
+ 'package.json': Promise<string>;
46
46
  'tsconfig.json'?: undefined;
47
47
  src?: undefined;
48
48
  abis?: undefined;
49
49
  tests?: undefined;
50
50
  } | {
51
- 'package.json': string;
52
- 'subgraph.yaml': string;
53
- 'schema.graphql': string;
54
- 'tsconfig.json': string;
51
+ 'package.json': Promise<string>;
52
+ 'subgraph.yaml': Promise<string>;
53
+ 'schema.graphql': Promise<string>;
54
+ 'tsconfig.json': Promise<string>;
55
55
  src: {
56
- [x: string]: string;
56
+ [x: string]: Promise<string>;
57
57
  } | undefined;
58
58
  abis: {
59
- [x: string]: string;
59
+ [x: string]: Promise<string>;
60
60
  } | undefined;
61
61
  tests: {
62
- [x: string]: string;
62
+ [x: string]: Promise<string>;
63
63
  } | undefined;
64
64
  };
65
65
  }
@@ -1,3 +1,3 @@
1
1
  export declare const generateTestsFiles: (contract: any, events: any[], indexEvents?: boolean) => {
2
- [x: string]: string;
2
+ [x: string]: Promise<string>;
3
3
  };
package/dist/schema.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import SchemaCodeGenerator from './codegen/schema';
2
1
  import type { DocumentNode } from 'graphql/language';
2
+ import SchemaCodeGenerator from './codegen/schema';
3
3
  export default class Schema {
4
4
  filename: string;
5
5
  document: string;
@@ -27,13 +27,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const path_1 = __importDefault(require("path"));
30
- // @ts-expect-error TODO: type out if necessary
31
- const Index_bs_js_1 = __importDefault(require("@float-capital/float-subgraph-uncrashable/src/Index.bs.js"));
32
30
  const fs_extra_1 = __importDefault(require("fs-extra"));
33
31
  const toolbox = __importStar(require("gluegun"));
34
32
  const graphql = __importStar(require("graphql/language"));
35
33
  const immutable_1 = __importDefault(require("immutable"));
36
34
  const prettier_1 = __importDefault(require("prettier"));
35
+ // @ts-expect-error TODO: type out if necessary
36
+ const Index_bs_js_1 = __importDefault(require("@float-capital/float-subgraph-uncrashable/src/Index.bs.js"));
37
37
  const template_1 = __importDefault(require("./codegen/template"));
38
38
  const typescript_1 = require("./codegen/typescript");
39
39
  const fs_1 = require("./command-helpers/fs");
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.56.0",
2
+ "version": "0.56.1-alpha-20230831183043-db0b651",
3
3
  "commands": {
4
4
  "add": {
5
5
  "id": "add",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphprotocol/graph-cli",
3
- "version": "0.56.0",
3
+ "version": "0.56.1-alpha-20230831183043-db0b651",
4
4
  "description": "CLI for building for and deploying to The Graph",
5
5
  "license": "(Apache-2.0 OR MIT)",
6
6
  "engines": {
@@ -37,7 +37,7 @@
37
37
  "ipfs-http-client": "55.0.0",
38
38
  "jayson": "4.0.0",
39
39
  "js-yaml": "3.14.1",
40
- "prettier": "1.19.1",
40
+ "prettier": "3.0.3",
41
41
  "request": "2.88.2",
42
42
  "semver": "7.4.0",
43
43
  "sync-request": "6.1.0",