@graphprotocol/graph-cli 0.69.1 → 0.70.0-alpha-20240415174849-cf18231

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,22 @@
1
1
  # @graphprotocol/graph-cli
2
2
 
3
+ ## 0.70.0-alpha-20240415174849-cf18231
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1629](https://github.com/graphprotocol/graph-tooling/pull/1629)
8
+ [`cf18231`](https://github.com/graphprotocol/graph-tooling/commit/cf18231805e107644e634b548f2e762977165a3c)
9
+ Thanks [@saihaj](https://github.com/saihaj)! - generate gitignore file
10
+
11
+ ## 0.69.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [#1623](https://github.com/graphprotocol/graph-tooling/pull/1623)
16
+ [`121843e`](https://github.com/graphprotocol/graph-tooling/commit/121843e982c69ffb31aae911431a68a2349ea062)
17
+ Thanks [@Shiyasmohd](https://github.com/Shiyasmohd)! - cli: added etherscan API URL & public RPC
18
+ endpoint for etherlink-testnet
19
+
3
20
  ## 0.69.1
4
21
 
5
22
  ### Patch Changes
@@ -190,6 +190,8 @@ const getEtherscanLikeAPIUrl = (network) => {
190
190
  return `https://api.routescan.io/v2/network/testnet/evm/168587773/etherscan/api`;
191
191
  case 'blast-mainnet':
192
192
  return `https://api.routescan.io/v2/network/mainnet/evm/81457/etherscan/api`;
193
+ case 'etherlink-testnet':
194
+ return `https://testnet-explorer.etherlink.com/api`;
193
195
  default:
194
196
  return `https://api-${network}.etherscan.io/api`;
195
197
  }
@@ -284,6 +286,8 @@ const getPublicRPCEndpoint = (network) => {
284
286
  return 'https://rpc.blast.io';
285
287
  case 'optimism-sepolia':
286
288
  return 'https://sepolia.optimism.io';
289
+ case 'etherlink-testnet':
290
+ return `https://node.ghostnet.etherlink.com`;
287
291
  default:
288
292
  throw new Error(`Unknown network: ${network}`);
289
293
  }
@@ -18,6 +18,7 @@ export declare const generateScaffold: ({ protocolInstance, abi, contract, netwo
18
18
  'subgraph.yaml': string;
19
19
  'schema.graphql': string;
20
20
  'package.json': string;
21
+ '.gitignore': string;
21
22
  'tsconfig.json'?: undefined;
22
23
  'docker-compose.yml'?: undefined;
23
24
  src?: undefined;
@@ -29,6 +30,7 @@ export declare const generateScaffold: ({ protocolInstance, abi, contract, netwo
29
30
  'schema.graphql': string;
30
31
  'tsconfig.json': string;
31
32
  'docker-compose.yml': string;
33
+ '.gitignore': string;
32
34
  src: {
33
35
  [x: string]: string;
34
36
  } | undefined;
@@ -0,0 +1 @@
1
+ export declare const getGitIgnore: () => string;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getGitIgnore = void 0;
4
+ const getGitIgnore = () => {
5
+ return `# Graph CLI generated artifacts
6
+ build/
7
+ generated/
8
+
9
+ # Dependency directories
10
+ node_modules/
11
+ jspm_packages/
12
+
13
+ # Logs
14
+ logs
15
+ *.log
16
+ npm-debug.log*
17
+ yarn-debug.log*
18
+ yarn-error.log*
19
+
20
+ # Optional npm cache directory
21
+ .npm
22
+
23
+ # Optional eslint cache
24
+ .eslintcache
25
+
26
+ # dotenv environment variables file
27
+ .env
28
+
29
+ # Testing
30
+ coverage
31
+ coverage.json
32
+
33
+ # Typechain
34
+ typechain
35
+ typechain-types
36
+
37
+ # Hardhat files
38
+ cache
39
+ `;
40
+ };
41
+ exports.getGitIgnore = getGitIgnore;
@@ -30,6 +30,7 @@ export default class Scaffold {
30
30
  generateSchema(): Promise<string>;
31
31
  generateTsConfig(): Promise<string>;
32
32
  generateDockerFileConfig(): Promise<string>;
33
+ generateGitIgnoreFile(): string;
33
34
  generateMappings(): Promise<{
34
35
  [x: string]: string;
35
36
  } | undefined>;
@@ -44,6 +45,7 @@ export default class Scaffold {
44
45
  'subgraph.yaml': string;
45
46
  'schema.graphql': string;
46
47
  'package.json': string;
48
+ '.gitignore': string;
47
49
  'tsconfig.json'?: undefined;
48
50
  'docker-compose.yml'?: undefined;
49
51
  src?: undefined;
@@ -55,6 +57,7 @@ export default class Scaffold {
55
57
  'schema.graphql': string;
56
58
  'tsconfig.json': string;
57
59
  'docker-compose.yml': string;
60
+ '.gitignore': string;
58
61
  src: {
59
62
  [x: string]: string;
60
63
  } | undefined;
@@ -8,6 +8,7 @@ const prettier_1 = __importDefault(require("prettier"));
8
8
  const subgraph_1 = require("../command-helpers/subgraph");
9
9
  const version_1 = require("../version");
10
10
  const get_docker_file_1 = require("./get-docker-file");
11
+ const get_git_ignore_1 = require("./get-git-ignore");
11
12
  const mapping_1 = require("./mapping");
12
13
  const schema_1 = require("./schema");
13
14
  const tests_1 = require("./tests");
@@ -110,6 +111,9 @@ dataSources:
110
111
  async generateDockerFileConfig() {
111
112
  return await prettier_1.default.format((0, get_docker_file_1.getDockerFile)(), { parser: 'yaml' });
112
113
  }
114
+ generateGitIgnoreFile() {
115
+ return (0, get_git_ignore_1.getGitIgnore)();
116
+ }
113
117
  async generateMappings() {
114
118
  return this.protocol.getMappingScaffold()
115
119
  ? { [`${gluegun_1.strings.kebabCase(this.contractName)}.ts`]: await this.generateMapping() }
@@ -148,6 +152,7 @@ dataSources:
148
152
  'subgraph.yaml': await this.generateManifest(),
149
153
  'schema.graphql': await this.generateSchema(),
150
154
  'package.json': await this.generatePackageJsonForSubstreams(),
155
+ '.gitignore': await this.generateGitIgnoreFile(),
151
156
  };
152
157
  }
153
158
  return {
@@ -156,6 +161,7 @@ dataSources:
156
161
  'schema.graphql': await this.generateSchema(),
157
162
  'tsconfig.json': await this.generateTsConfig(),
158
163
  'docker-compose.yml': await this.generateDockerFileConfig(),
164
+ '.gitignore': await this.generateGitIgnoreFile(),
159
165
  src: await this.generateMappings(),
160
166
  abis: await this.generateABIs(),
161
167
  tests: await this.generateTests(),
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.69.1",
2
+ "version": "0.70.0-alpha-20240415174849-cf18231",
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.69.1",
3
+ "version": "0.70.0-alpha-20240415174849-cf18231",
4
4
  "description": "CLI for building for and deploying to The Graph",
5
5
  "license": "(Apache-2.0 OR MIT)",
6
6
  "engines": {