squishjs 1.0.11 → 1.1.0
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/package.json +1 -1
- package/src/Asset.js +2 -5
package/package.json
CHANGED
package/src/Asset.js
CHANGED
|
@@ -157,17 +157,14 @@ class Asset {
|
|
|
157
157
|
const filePath = `${path}/${fileHash}`;
|
|
158
158
|
|
|
159
159
|
const writeStream = this.fs.createWriteStream(filePath);
|
|
160
|
+
const getModule = this.https;
|
|
160
161
|
|
|
161
162
|
writeStream.on('close', () => {
|
|
162
163
|
resolve(filePath);
|
|
163
164
|
});
|
|
164
165
|
|
|
165
166
|
let data = '';
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
const getModule = assetSource.startsWith('https') ? this.https : this.http;
|
|
169
|
-
|
|
170
|
-
getModule.get(`${assetSource}/${assetId}`, (res) => {
|
|
167
|
+
getModule.get(`https://assets.homegames.io/${assetId}`, (res) => {
|
|
171
168
|
res.on('data', (chunk) => {
|
|
172
169
|
data += chunk;
|
|
173
170
|
writeStream.write(chunk);
|