@graphprotocol/graph-cli 0.45.2-alpha-20230410190041-8560135 → 0.45.2-alpha-20230410191141-d7fddb0

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,6 +1,6 @@
1
1
  # @graphprotocol/graph-cli
2
2
 
3
- ## 0.45.2-alpha-20230410190041-8560135
3
+ ## 0.45.2-alpha-20230410191141-d7fddb0
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -33,8 +33,10 @@ const ipfs_http_client_1 = require("ipfs-http-client");
33
33
  const compiler_1 = __importDefault(require("../compiler"));
34
34
  // Helper function to construct a subgraph compiler
35
35
  function createCompiler(manifest, { ipfs, headers, outputDir, outputFormat, skipMigrations, blockIpfsMethods, protocol, }) {
36
+ // Validate the IPFS URL (if a node address was provided)
36
37
  try {
37
- new url_1.URL(ipfs);
38
+ if (ipfs)
39
+ new url_1.URL(ipfs);
38
40
  }
39
41
  catch (e) {
40
42
  toolbox.print.error(`Invalid IPFS URL: ${ipfs}
@@ -449,8 +449,8 @@ class Compiler {
449
449
  }
450
450
  async _uploadToIPFS(file) {
451
451
  try {
452
- const hash = (await this.ipfs.add(file)).cid;
453
- await this.ipfs.pin.add(hash);
452
+ const hash = (await this.ipfs.add(file));
453
+ await this.ipfs.pin.add(hash.cid);
454
454
  return hash.toString();
455
455
  }
456
456
  catch (e) {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.45.2-alpha-20230410190041-8560135",
2
+ "version": "0.45.2-alpha-20230410191141-d7fddb0",
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.45.2-alpha-20230410190041-8560135",
3
+ "version": "0.45.2-alpha-20230410191141-d7fddb0",
4
4
  "description": "CLI for building for and deploying to The Graph",
5
5
  "license": "(Apache-2.0 OR MIT)",
6
6
  "engines": {