squishjs 1.1.0 → 1.1.1
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 +4 -1
package/package.json
CHANGED
package/src/Asset.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const { getAppDataPath } = require('./utils');
|
|
3
3
|
|
|
4
|
+
// assets is the old stuff, save it for backward compatibility
|
|
5
|
+
const ASSET_URL = process.env.API_URL ? `${process.env.API_URL}/assets`: 'https://assets.homegames.io';
|
|
6
|
+
|
|
4
7
|
class Asset {
|
|
5
8
|
constructor(info, data = null) {
|
|
6
9
|
this.info = info;
|
|
@@ -164,7 +167,7 @@ class Asset {
|
|
|
164
167
|
});
|
|
165
168
|
|
|
166
169
|
let data = '';
|
|
167
|
-
getModule.get(
|
|
170
|
+
getModule.get(`${ASSET_URL}/${assetId}`, (res) => {
|
|
168
171
|
res.on('data', (chunk) => {
|
|
169
172
|
data += chunk;
|
|
170
173
|
writeStream.write(chunk);
|