@graphprotocol/graph-cli 0.59.0-alpha-20230928143131-f349bfd → 0.59.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 CHANGED
@@ -1,19 +1,29 @@
1
1
  # @graphprotocol/graph-cli
2
2
 
3
- ## 0.59.0-alpha-20230928143131-f349bfd
3
+ ## 0.59.0
4
4
 
5
5
  ### Minor Changes
6
6
 
7
7
  - [#1457](https://github.com/graphprotocol/graph-tooling/pull/1457)
8
- [`f349bfd`](https://github.com/graphprotocol/graph-tooling/commit/f349bfd12da3feecc5227020d39eb5802a5d4e1c)
8
+ [`b7dc8a5`](https://github.com/graphprotocol/graph-tooling/commit/b7dc8a5fe32d0241f2bef5f118a9e1de819b61a9)
9
9
  Thanks [@saihaj](https://github.com/saihaj)! - do not generate loader for interfaces
10
10
 
11
11
  ### Patch Changes
12
12
 
13
+ - [#1470](https://github.com/graphprotocol/graph-tooling/pull/1470)
14
+ [`4c1ca35`](https://github.com/graphprotocol/graph-tooling/commit/4c1ca35d7c5cf6ee3aae119d578978e55074f5e9)
15
+ Thanks [@axiomatic-aardvark](https://github.com/axiomatic-aardvark)! - Update 'test' command to
16
+ reflect new matchstick version
17
+
13
18
  - [#1458](https://github.com/graphprotocol/graph-tooling/pull/1458)
14
19
  [`05e61d2`](https://github.com/graphprotocol/graph-tooling/commit/05e61d212caf8bdb735e8527dbbab6a0beca516d)
15
20
  Thanks [@saihaj](https://github.com/saihaj)! - do not init a git repo if a repo already exists
16
21
 
22
+ - [#1462](https://github.com/graphprotocol/graph-tooling/pull/1462)
23
+ [`b5f28bc`](https://github.com/graphprotocol/graph-tooling/commit/b5f28bc33a43b84ce4b6fe004c553e4de5e896a6)
24
+ Thanks [@omahs](https://github.com/omahs)! - deprecate `--skip-wait-for-etherium` for
25
+ `graph local`
26
+
17
27
  - [#1459](https://github.com/graphprotocol/graph-tooling/pull/1459)
18
28
  [`129d003`](https://github.com/graphprotocol/graph-tooling/commit/129d003838b9b138391835f5a03b21aa05c34e15)
19
29
  Thanks [@pustovalov](https://github.com/pustovalov)! - fix ABI api endpoint aurora networks
@@ -13,6 +13,7 @@ export default class LocalCommand extends Command {
13
13
  'standalone-node': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
14
14
  'standalone-node-args': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
15
15
  'skip-wait-for-ipfs': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
+ 'skip-wait-for-ethereum': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
17
  'skip-wait-for-etherium': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
18
  'skip-wait-for-postgres': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
19
  timeout: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
@@ -17,7 +17,8 @@ const spinner_1 = require("../command-helpers/spinner");
17
17
  tmp_promise_1.default.setGracefulCleanup();
18
18
  class LocalCommand extends core_1.Command {
19
19
  async run() {
20
- const { args: { 'local-command': testCommand }, flags: { 'compose-file': composeFileFlag, 'ethereum-logs': ethereumLogsFlag, 'node-image': nodeImage, 'node-logs': nodeLogsFlag, 'skip-wait-for-etherium': skipWaitForEthereum, 'skip-wait-for-ipfs': skipWaitForIpfs, 'skip-wait-for-postgres': skipWaitForPostgres, 'standalone-node': standaloneNode, 'standalone-node-args': standaloneNodeArgs, timeout, }, } = await this.parse(LocalCommand);
20
+ const { args: { 'local-command': testCommand }, flags: { 'compose-file': composeFileFlag, 'ethereum-logs': ethereumLogsFlag, 'node-image': nodeImage, 'node-logs': nodeLogsFlag, 'skip-wait-for-etherium': skipWaitForEthereumTypo, 'skip-wait-for-ethereum': skipWaitForEthereumGood, 'skip-wait-for-ipfs': skipWaitForIpfs, 'skip-wait-for-postgres': skipWaitForPostgres, 'standalone-node': standaloneNode, 'standalone-node-args': standaloneNodeArgs, timeout, }, } = await this.parse(LocalCommand);
21
+ const skipWaitForEthereum = skipWaitForEthereumTypo || skipWaitForEthereumGood;
21
22
  // Obtain the Docker Compose file for services that the tests run against
22
23
  const composeFile = composeFileFlag ||
23
24
  path_1.default.join(__dirname, '..', '..', 'resources', 'test', standaloneNode ? 'docker-compose-standalone-node.yml' : 'docker-compose.yml');
@@ -25,7 +26,10 @@ class LocalCommand extends core_1.Command {
25
26
  this.error(`Docker Compose file "${composeFile}" not found`, { exit: 1 });
26
27
  }
27
28
  // Create temporary directory to operate in
28
- const { path: tempdir } = await tmp_promise_1.default.dir({ prefix: 'graph-test', unsafeCleanup: true });
29
+ const { path: tempdir } = await tmp_promise_1.default.dir({
30
+ prefix: 'graph-test',
31
+ unsafeCleanup: true,
32
+ });
29
33
  try {
30
34
  await configureTestEnvironment(tempdir, composeFile, nodeImage);
31
35
  }
@@ -170,8 +174,15 @@ LocalCommand.flags = {
170
174
  'skip-wait-for-ipfs': core_1.Flags.boolean({
171
175
  summary: "Don't wait for IPFS to be up at localhost:15001",
172
176
  }),
177
+ 'skip-wait-for-ethereum': core_1.Flags.boolean({
178
+ summary: "Don't wait for Ethereum to be up at localhost:18545",
179
+ }),
180
+ // TODO: Remove in next major release
173
181
  'skip-wait-for-etherium': core_1.Flags.boolean({
174
182
  summary: "Don't wait for Ethereum to be up at localhost:18545",
183
+ deprecated: {
184
+ message: 'Use --skip-wait-for-ethereum instead',
185
+ },
175
186
  }),
176
187
  'skip-wait-for-postgres': core_1.Flags.boolean({
177
188
  summary: "Don't wait for Postgres to be up at localhost:15432",
@@ -123,7 +123,7 @@ async function runBinary(datasource, opts) {
123
123
  const versionOpt = opts.version;
124
124
  const latestVersion = opts.latestVersion;
125
125
  const recompileOpt = opts.recompile;
126
- const platform = await getPlatform.bind(this)(logsOpt);
126
+ const platform = await getPlatform.bind(this)(versionOpt || latestVersion, logsOpt);
127
127
  const url = `https://github.com/LimeChain/matchstick/releases/download/${versionOpt || latestVersion}/${platform}`;
128
128
  if (logsOpt) {
129
129
  this.log(`Download link: ${url}`);
@@ -141,7 +141,7 @@ async function runBinary(datasource, opts) {
141
141
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
142
142
  args.length > 0 ? binary.run(...args) : binary.run();
143
143
  }
144
- async function getPlatform(logsOpt) {
144
+ async function getPlatform(matchstickVersion, logsOpt) {
145
145
  const type = os_1.default.type();
146
146
  const arch = os_1.default.arch();
147
147
  const cpuCore = os_1.default.cpus()[0];
@@ -154,23 +154,34 @@ async function getPlatform(logsOpt) {
154
154
  this.log(`OS type: ${linuxDistro || type}\nOS arch: ${arch}\nOS release: ${release}\nOS major version: ${majorVersion}\nCPU model: ${cpuCore.model}`);
155
155
  }
156
156
  if (arch === 'x64' || isAppleSilicon) {
157
- if (type === 'Darwin') {
158
- if (majorVersion === 18 || majorVersion === 19) {
159
- return 'binary-macos-10.15'; // GitHub dropped support for macOS 10.14 in Actions, but it seems 10.15 binary works on 10.14 too
157
+ if (semver_1.default.gt(matchstickVersion, '0.5.4')) {
158
+ if (type === 'Darwin') {
159
+ if (isAppleSilicon) {
160
+ return 'binary-macos-12-m1';
161
+ }
162
+ return 'binary-macos-12';
160
163
  }
161
- if (isAppleSilicon) {
162
- return 'binary-macos-11-m1';
164
+ if (type === 'Linux' && majorVersion === 22) {
165
+ return 'binary-linux-22';
163
166
  }
164
- return 'binary-macos-11';
165
167
  }
166
- if (type === 'Linux') {
167
- if (majorVersion === 18) {
168
- return 'binary-linux-18';
168
+ else {
169
+ if (type === 'Darwin') {
170
+ if (majorVersion === 18 || majorVersion === 19) {
171
+ return 'binary-macos-10.15';
172
+ }
173
+ if (isAppleSilicon) {
174
+ return 'binary-macos-11-m1';
175
+ }
176
+ return 'binary-macos-11';
169
177
  }
170
- if (majorVersion === 22) {
171
- return 'binary-linux-22';
178
+ if (type === 'Linux') {
179
+ return majorVersion === 18
180
+ ? 'binary-linux-18'
181
+ : majorVersion === 22
182
+ ? 'binary-linux-22'
183
+ : 'binary-linux-20';
172
184
  }
173
- return 'binary-linux-20';
174
185
  }
175
186
  }
176
187
  throw new Error(`Unsupported platform: ${type} ${arch} ${majorVersion}`);
@@ -43,7 +43,7 @@ class EthereumSubgraph {
43
43
  return dataSourcesAndTemplates.reduce((errors, dataSourceOrTemplate) => errors.concat(this.validateDataSourceAbis(dataSourceOrTemplate.get('dataSource'), dataSourceOrTemplate.get('path'))), immutable_1.default.List());
44
44
  }
45
45
  validateDataSourceAbis(dataSource, path) {
46
- // Validate that the the "source > abi" reference of all data sources
46
+ // Validate that the "source > abi" reference of all data sources
47
47
  // points to an existing ABI in the data source ABIs
48
48
  const abiName = dataSource.getIn(['source', 'abi']);
49
49
  const abiNames = dataSource.getIn(['mapping', 'abis']).map((abi) => abi.get('name'));
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.59.0-alpha-20230928143131-f349bfd",
2
+ "version": "0.59.0",
3
3
  "commands": {
4
4
  "add": {
5
5
  "id": "add",
@@ -724,11 +724,20 @@
724
724
  "summary": "Don't wait for IPFS to be up at localhost:15001",
725
725
  "allowNo": false
726
726
  },
727
+ "skip-wait-for-ethereum": {
728
+ "name": "skip-wait-for-ethereum",
729
+ "type": "boolean",
730
+ "summary": "Don't wait for Ethereum to be up at localhost:18545",
731
+ "allowNo": false
732
+ },
727
733
  "skip-wait-for-etherium": {
728
734
  "name": "skip-wait-for-etherium",
729
735
  "type": "boolean",
730
736
  "summary": "Don't wait for Ethereum to be up at localhost:18545",
731
- "allowNo": false
737
+ "allowNo": false,
738
+ "deprecated": {
739
+ "message": "Use --skip-wait-for-ethereum instead"
740
+ }
732
741
  },
733
742
  "skip-wait-for-postgres": {
734
743
  "name": "skip-wait-for-postgres",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphprotocol/graph-cli",
3
- "version": "0.59.0-alpha-20230928143131-f349bfd",
3
+ "version": "0.59.0",
4
4
  "description": "CLI for building for and deploying to The Graph",
5
5
  "license": "(Apache-2.0 OR MIT)",
6
6
  "engines": {