@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 +1 -1
- package/dist/command-helpers/compiler.js +2 -12
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -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
|
-
|
|
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,
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED