@graphprotocol/graph-cli 0.45.2-alpha-20230410042208-b2d928e → 0.45.2-alpha-20230410185023-67f6b74

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-20230410042208-b2d928e
3
+ ## 0.45.2-alpha-20230410185023-67f6b74
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -33,10 +33,8 @@ 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
- // Parse the IPFS URL
37
- let url;
38
36
  try {
39
- url = ipfs ? new url_1.URL(ipfs) : undefined;
37
+ new url_1.URL(ipfs);
40
38
  }
41
39
  catch (e) {
42
40
  toolbox.print.error(`Invalid IPFS URL: ${ipfs}
@@ -44,15 +42,7 @@ The IPFS URL must be of the following format: http(s)://host[:port]/[path]`);
44
42
  return null;
45
43
  }
46
44
  // Connect to the IPFS node (if a node address was provided)
47
- ipfs = ipfs
48
- ? (0, ipfs_http_client_1.create)({
49
- protocol: url?.protocol.replace(/[:]+$/, ''),
50
- host: url?.hostname,
51
- port: url?.port ? parseInt(url?.port) : undefined,
52
- apiPath: url?.pathname.replace(/\/$/, '') + '/api/v0/',
53
- headers,
54
- })
55
- : undefined;
45
+ ipfs = ipfs ? (0, ipfs_http_client_1.create)({ url: ipfs, headers }) : undefined;
56
46
  return new compiler_1.default({
57
47
  ipfs,
58
48
  subgraphManifest: manifest,
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.45.2-alpha-20230410042208-b2d928e",
2
+ "version": "0.45.2-alpha-20230410185023-67f6b74",
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-20230410042208-b2d928e",
3
+ "version": "0.45.2-alpha-20230410185023-67f6b74",
4
4
  "description": "CLI for building for and deploying to The Graph",
5
5
  "license": "(Apache-2.0 OR MIT)",
6
6
  "engines": {