@graphprotocol/graph-cli 0.45.2-alpha-20230410035302-e6fb987 → 0.45.2-alpha-20230410042208-b2d928e

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-20230410035302-e6fb987
3
+ ## 0.45.2-alpha-20230410042208-b2d928e
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.createCompiler = void 0;
30
30
  const url_1 = require("url");
31
31
  const toolbox = __importStar(require("gluegun"));
32
- const ipfs_http_client_1 = __importDefault(require("ipfs-http-client"));
32
+ 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, }) {
@@ -45,7 +45,7 @@ The IPFS URL must be of the following format: http(s)://host[:port]/[path]`);
45
45
  }
46
46
  // Connect to the IPFS node (if a node address was provided)
47
47
  ipfs = ipfs
48
- ? ipfs_http_client_1.default.create({
48
+ ? (0, ipfs_http_client_1.create)({
49
49
  protocol: url?.protocol.replace(/[:]+$/, ''),
50
50
  host: url?.hostname,
51
51
  port: url?.port ? parseInt(url?.port) : undefined,
@@ -449,9 +449,9 @@ class Compiler {
449
449
  }
450
450
  async _uploadToIPFS(file) {
451
451
  try {
452
- const hash = (await this.ipfs.add([file]))[0].hash;
452
+ const hash = (await this.ipfs.add(file)).cid;
453
453
  await this.ipfs.pin.add(hash);
454
- return hash;
454
+ return hash.toString();
455
455
  }
456
456
  catch (e) {
457
457
  throw Error(`Failed to upload file to IPFS: ${e.message}`);
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.45.2-alpha-20230410035302-e6fb987",
2
+ "version": "0.45.2-alpha-20230410042208-b2d928e",
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-20230410035302-e6fb987",
3
+ "version": "0.45.2-alpha-20230410042208-b2d928e",
4
4
  "description": "CLI for building for and deploying to The Graph",
5
5
  "license": "(Apache-2.0 OR MIT)",
6
6
  "engines": {