@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
|
@@ -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 =
|
|
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.
|
|
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,
|
package/dist/compiler/index.js
CHANGED
|
@@ -449,9 +449,9 @@ class Compiler {
|
|
|
449
449
|
}
|
|
450
450
|
async _uploadToIPFS(file) {
|
|
451
451
|
try {
|
|
452
|
-
const hash = (await this.ipfs.add(
|
|
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}`);
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED