@dcl/sdk 7.0.0-2956503917.commit-061e376 → 7.0.0-2957285950.commit-2a77ef6
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/dist/ecs7/index.d.ts +2 -6
- package/dist/ecs7/index.js +1348 -10
- package/dist/ecs7/index.min.js +1 -1
- package/dist/ecs7/index.min.js.map +1 -1
- package/package.json +4 -4
- package/src/cli/mock-catalyst/index.js +4 -4
- package/src/cli/setupUtils.js +1 -1
- package/src/cli/wearables.js +10 -10
- package/src/setupProxy.js +1 -1
- package/types/ecs7/index.d.ts +1 -5
- package/types/tsconfig.ecs7.json +2 -2
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dcl/sdk",
|
3
|
-
"version": "7.0.0-
|
3
|
+
"version": "7.0.0-2957285950.commit-2a77ef6",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/src/index.js",
|
6
6
|
"typings": "dist/index.d.ts",
|
@@ -27,8 +27,8 @@
|
|
27
27
|
"src/cli/**/*.js"
|
28
28
|
],
|
29
29
|
"dependencies": {
|
30
|
-
"@dcl/amd": "6.11.5-
|
31
|
-
"@dcl/build-ecs": "6.11.5-
|
30
|
+
"@dcl/amd": "6.11.5-2957285950.commit-2a77ef6",
|
31
|
+
"@dcl/build-ecs": "6.11.5-2957285950.commit-2a77ef6",
|
32
32
|
"@dcl/kernel": "1.0.0-2638443584.commit-696a74b",
|
33
33
|
"@dcl/posix": "^1.0.4",
|
34
34
|
"@dcl/schemas": "4.8.0",
|
@@ -38,5 +38,5 @@
|
|
38
38
|
"ignore": "^5.1.8"
|
39
39
|
},
|
40
40
|
"minCliVersion": "3.10.2",
|
41
|
-
"commit": "
|
41
|
+
"commit": "2a77ef6f1a5048b8d1b138ce6de416489221e9e2"
|
42
42
|
}
|
@@ -47,7 +47,7 @@ var mockCatalyst = function (app, baseFolders) {
|
|
47
47
|
res.json([
|
48
48
|
{
|
49
49
|
serverName: 'localhost',
|
50
|
-
url: "http://"
|
50
|
+
url: "http://".concat(req.get('host')),
|
51
51
|
layer: 'stub',
|
52
52
|
usersCount: 0,
|
53
53
|
maxUsers: 100,
|
@@ -58,7 +58,7 @@ var mockCatalyst = function (app, baseFolders) {
|
|
58
58
|
app.get('/lambdas/contracts/servers', function (req, res) {
|
59
59
|
res.json([
|
60
60
|
{
|
61
|
-
address: "http://"
|
61
|
+
address: "http://".concat(req.get('host')),
|
62
62
|
owner: '0x0000000000000000000000000000000000000000',
|
63
63
|
id: '0x0000000000000000000000000000000000000000000000000000000000000000'
|
64
64
|
}
|
@@ -70,7 +70,7 @@ var mockCatalyst = function (app, baseFolders) {
|
|
70
70
|
return __generator(this, function (_b) {
|
71
71
|
switch (_b.label) {
|
72
72
|
case 0:
|
73
|
-
baseUrl = req.protocol
|
73
|
+
baseUrl = "".concat(req.protocol, "://").concat(req.get('host'), "/content/contents");
|
74
74
|
_b.label = 1;
|
75
75
|
case 1:
|
76
76
|
_b.trys.push([1, 6, , 7]);
|
@@ -81,7 +81,7 @@ var mockCatalyst = function (app, baseFolders) {
|
|
81
81
|
case 2:
|
82
82
|
previewWearables = _b.sent();
|
83
83
|
if (!(previewWearables.length === 1)) return [3 /*break*/, 5];
|
84
|
-
return [4 /*yield*/, fetch("https://peer.decentraland.org"
|
84
|
+
return [4 /*yield*/, fetch("https://peer.decentraland.org".concat(req.originalUrl))];
|
85
85
|
case 3: return [4 /*yield*/, (_b.sent()).json()];
|
86
86
|
case 4:
|
87
87
|
deployedProfile = _b.sent();
|
package/src/cli/setupUtils.js
CHANGED
@@ -275,7 +275,7 @@ var downloadFile = function (url, path, timeout_seg) {
|
|
275
275
|
setTimeout(function () {
|
276
276
|
if (!finished) {
|
277
277
|
request.destroy();
|
278
|
-
reject(new Error("Timeout "
|
278
|
+
reject(new Error("Timeout ".concat(url)));
|
279
279
|
}
|
280
280
|
}, timeout_seg * 1000);
|
281
281
|
})];
|
package/src/cli/wearables.js
CHANGED
@@ -60,15 +60,15 @@ var serveWearable = function (_a) {
|
|
60
60
|
var wearableJson = JSON.parse(fs.readFileSync(wearableJsonPath).toString());
|
61
61
|
if (!(0, exports.wearableValidator)(wearableJson)) {
|
62
62
|
var errors = (exports.wearableValidator.errors || [])
|
63
|
-
.map(function (a) { return a.dataPath
|
63
|
+
.map(function (a) { return "".concat(a.dataPath, " ").concat(a.message); })
|
64
64
|
.join('');
|
65
65
|
if (errors.length > 0) {
|
66
|
-
console.error("Unable to validate '"
|
66
|
+
console.error("Unable to validate '".concat(wearableJsonPath, "' properly, please check it: ").concat(errors));
|
67
67
|
}
|
68
68
|
else {
|
69
|
-
console.error("Unable to validate '"
|
69
|
+
console.error("Unable to validate '".concat(wearableJsonPath, "' properly, please check it."));
|
70
70
|
}
|
71
|
-
throw new Error("Invalid wearable.json ("
|
71
|
+
throw new Error("Invalid wearable.json (".concat(wearableJson, ")"));
|
72
72
|
}
|
73
73
|
else {
|
74
74
|
}
|
@@ -85,10 +85,10 @@ var serveWearable = function (_a) {
|
|
85
85
|
var thumbnailFiltered = hashedFiles.filter(function ($) { return ($ === null || $ === void 0 ? void 0 : $.file) === wearableJson.thumbnail; });
|
86
86
|
var thumbnail = thumbnailFiltered.length > 0 &&
|
87
87
|
((_b = thumbnailFiltered[0]) === null || _b === void 0 ? void 0 : _b.hash) &&
|
88
|
-
baseUrl
|
88
|
+
"".concat(baseUrl, "/").concat(thumbnailFiltered[0].hash);
|
89
89
|
var wearableJsonWithContents = __assign(__assign({}, wearableJson), { baseUrl: baseUrl, thumbnail: thumbnail, data: __assign(__assign({}, wearableJson.data), { thumbnail: thumbnail, scene: hashedFiles, baseUrl: baseUrl, representations: wearableJson.data.representations.map(function (representation) { return (__assign(__assign({}, representation), { contents: hashedFiles.map(function (file) { return ({
|
90
|
-
key: ""
|
91
|
-
url: baseUrl
|
90
|
+
key: "".concat(file === null || file === void 0 ? void 0 : file.file),
|
91
|
+
url: "".concat(baseUrl, "/").concat(file === null || file === void 0 ? void 0 : file.hash)
|
92
92
|
}); }) })); }) }) });
|
93
93
|
return wearableJsonWithContents;
|
94
94
|
};
|
@@ -109,7 +109,7 @@ var getAllPreviewWearables = function (_a) {
|
|
109
109
|
ret.push(serveWearable({ wearableJsonPath: wearableJsonPath, baseUrl: baseUrl }));
|
110
110
|
}
|
111
111
|
catch (err) {
|
112
|
-
console.error("Couldn't mock the wearable "
|
112
|
+
console.error("Couldn't mock the wearable ".concat(wearableJsonPath, ". Please verify the correct format and scheme."), err);
|
113
113
|
}
|
114
114
|
}
|
115
115
|
return ret;
|
@@ -119,7 +119,7 @@ var mockPreviewWearables = function (app, baseFolders) {
|
|
119
119
|
app.use('/preview-wearables/:id', function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
120
120
|
var baseUrl, wearables, wearableId;
|
121
121
|
return __generator(this, function (_a) {
|
122
|
-
baseUrl = req.protocol
|
122
|
+
baseUrl = "".concat(req.protocol, "://").concat(req.get('host'), "/content/contents");
|
123
123
|
wearables = (0, exports.getAllPreviewWearables)({
|
124
124
|
baseUrl: baseUrl,
|
125
125
|
baseFolders: baseFolders
|
@@ -134,7 +134,7 @@ var mockPreviewWearables = function (app, baseFolders) {
|
|
134
134
|
app.use('/preview-wearables', function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
135
135
|
var baseUrl;
|
136
136
|
return __generator(this, function (_a) {
|
137
|
-
baseUrl = req.protocol
|
137
|
+
baseUrl = "".concat(req.protocol, "://").concat(req.get('host'), "/content/contents");
|
138
138
|
return [2 /*return*/, res.json({
|
139
139
|
ok: true,
|
140
140
|
data: (0, exports.getAllPreviewWearables)({ baseUrl: baseUrl, baseFolders: baseFolders })
|
package/src/setupProxy.js
CHANGED
@@ -151,7 +151,7 @@ var setupProxy = function (dcl, app) {
|
|
151
151
|
var featureFlagResponse, featureFlagBody;
|
152
152
|
return __generator(this, function (_a) {
|
153
153
|
switch (_a.label) {
|
154
|
-
case 0: return [4 /*yield*/, fetch("https://feature-flags.decentraland.zone/"
|
154
|
+
case 0: return [4 /*yield*/, fetch("https://feature-flags.decentraland.zone/".concat(req.params.file))];
|
155
155
|
case 1:
|
156
156
|
featureFlagResponse = _a.sent();
|
157
157
|
return [4 /*yield*/, featureFlagResponse.json()];
|
package/types/ecs7/index.d.ts
CHANGED
@@ -462,10 +462,6 @@ declare type EcsResult<T extends ISchema> = T extends ISchema ? ReturnType<T['de
|
|
462
462
|
*/
|
463
463
|
declare function Engine({ transports }?: IEngineParams): IEngine;
|
464
464
|
|
465
|
-
/**
|
466
|
-
* @alpha * This file initialization is an alpha one. This is based on the old-ecs
|
467
|
-
* init and it'll be changing.
|
468
|
-
*/
|
469
465
|
declare const engine: IEngine;
|
470
466
|
|
471
467
|
/**
|
@@ -601,7 +597,7 @@ declare type IEngine = {
|
|
601
597
|
* Example:
|
602
598
|
* ```ts
|
603
599
|
* for (const [entity, boxShape, transform] of engine.getEntitiesWith(BoxShape, Transform)) {
|
604
|
-
*
|
600
|
+
* // the properties of boxShape and transform are read only
|
605
601
|
* }
|
606
602
|
* ```
|
607
603
|
*/
|