@graphprotocol/graph-cli 0.37.3-alpha-20230111142142-c48ca88 → 0.37.3-alpha-20230111150012-96ec4db
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/compiler/index.js +3 -2
- package/package.json +1 -1
- package/src/compiler/index.ts +3 -2
package/CHANGELOG.md
CHANGED
package/dist/compiler/index.js
CHANGED
|
@@ -78,7 +78,7 @@ class Compiler {
|
|
|
78
78
|
}
|
|
79
79
|
this.globalsFile = path_1.default.join(globalsLib, globalsFile);
|
|
80
80
|
}
|
|
81
|
-
// @ts-expect-error
|
|
81
|
+
// @ts-expect-error assigned or not, we dont care
|
|
82
82
|
if (!this.globalsFile) {
|
|
83
83
|
throw new Error('Globals file is missing.');
|
|
84
84
|
}
|
|
@@ -455,7 +455,8 @@ class Compiler {
|
|
|
455
455
|
let uploadCacheKey = this.cacheKeyForFile(absoluteFile);
|
|
456
456
|
let alreadyUploaded = uploadedFiles.has(uploadCacheKey);
|
|
457
457
|
if (!alreadyUploaded) {
|
|
458
|
-
|
|
458
|
+
// @ts-expect-error Buffer.from with Buffer data can indeed accept utf-8
|
|
459
|
+
let content = Buffer.from(await fs_extra_1.default.readFile(absoluteFile), 'utf-8');
|
|
459
460
|
let hash = await this._uploadToIPFS({
|
|
460
461
|
path: path_1.default.relative(this.options.outputDir, absoluteFile),
|
|
461
462
|
content: content,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphprotocol/graph-cli",
|
|
3
|
-
"version": "0.37.3-alpha-
|
|
3
|
+
"version": "0.37.3-alpha-20230111150012-96ec4db",
|
|
4
4
|
"license": "(Apache-2.0 OR MIT)",
|
|
5
5
|
"description": "CLI for building for and deploying to The Graph",
|
|
6
6
|
"main": "dist/cli.js",
|
package/src/compiler/index.ts
CHANGED
|
@@ -74,7 +74,7 @@ export default class Compiler {
|
|
|
74
74
|
this.globalsFile = path.join(globalsLib, globalsFile)
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
// @ts-expect-error
|
|
77
|
+
// @ts-expect-error assigned or not, we dont care
|
|
78
78
|
if (!this.globalsFile) {
|
|
79
79
|
throw new Error('Globals file is missing.')
|
|
80
80
|
}
|
|
@@ -696,7 +696,8 @@ export default class Compiler {
|
|
|
696
696
|
let alreadyUploaded = uploadedFiles.has(uploadCacheKey)
|
|
697
697
|
|
|
698
698
|
if (!alreadyUploaded) {
|
|
699
|
-
|
|
699
|
+
// @ts-expect-error Buffer.from with Buffer data can indeed accept utf-8
|
|
700
|
+
let content = Buffer.from(await fs.readFile(absoluteFile), 'utf-8')
|
|
700
701
|
let hash = await this._uploadToIPFS({
|
|
701
702
|
path: path.relative(this.options.outputDir, absoluteFile),
|
|
702
703
|
content: content,
|