@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
|
@@ -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
|
-
|
|
38
|
+
if (ipfs)
|
|
39
|
+
new url_1.URL(ipfs);
|
|
38
40
|
}
|
|
39
41
|
catch (e) {
|
|
40
42
|
toolbox.print.error(`Invalid IPFS URL: ${ipfs}
|
package/dist/compiler/index.js
CHANGED
|
@@ -449,8 +449,8 @@ class Compiler {
|
|
|
449
449
|
}
|
|
450
450
|
async _uploadToIPFS(file) {
|
|
451
451
|
try {
|
|
452
|
-
const hash = (await this.ipfs.add(file))
|
|
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) {
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED